Skip to content

feat(codegen): cli.stashName so generated CLIs can share one signed-in state - #1651

Closed
pyramation wants to merge 1 commit into
mainfrom
feat/shared-config-store
Closed

feat(codegen): cli.stashName so generated CLIs can share one signed-in state#1651
pyramation wants to merge 1 commit into
mainfrom
feat/shared-config-store

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Codegen half of the one-store consolidation (constructive-planning#1430). A generated CLI passes its own name as the appstash tool name, so each one gets its own ~/.<cli>/ and its own login. New optional cli.stashName separates where state lives from what the tool is called:

cli: { toolName: 'csdk', stashName: 'constructive' }
-const store = createConfigStore("csdk");
+const store = createConfigStore("csdk", { stashName: "constructive" });

toolName still drives the CSDK_TOKEN / CSDK_API_ENDPOINT env prefixes and the command names in error messages, so sharing a directory doesn't blur the tools' identities. Omitted → byte-identical output to today, so no regeneration is forced on existing consumers.

Threaded through generateExecutorFile, generateMultiTargetExecutorFile and generateHelpersFile as a trailing optional arg (AST, per the codegen rules — createStoreCall() builds the object expression only when a stash name is present).

Also: genomic ^5.6.2 → ^5.6.4. The old genomic pinned inquirerer@4.9.1 transitively, so after #1650 the workspace resolved two copies and pgpm/core failed to build on a private-property mismatch between them (Types have separate declarations of a private property 'rl'). One copy now.

Nothing consumes stashName yet — csdk switching over (and deleting its local config-store.ts duplicate in favor of appstash's) needs stashName in a published appstash, which is dev-utils#105; that lands as a follow-up PR.

Tests: 3 cases in cli-generator.test.ts (absent → plain call, single-target, multi-target executor + helpers). Full codegen suite 364 passing, 123 snapshots unchanged.

Link to Devin session: https://app.devin.ai/sessions/783ae9ff63b445879450d5051d9d3d83
Requested by: @pyramation

…n state

Also bumps genomic to ^5.6.4 so the workspace resolves a single inquirerer (4.9.3).
@pyramation pyramation self-assigned this Aug 4, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant