Skip to content

Commit 4f5a87b

Browse files
authored
refactor(command-registry): move CLI flag grammar, text and command aliases down (#2561)
Move the vocabulary that both the CLI and commands read but no command's runtime depends on into the package below both: flag types, registry, groups and the four flag-definitions files, command-text, and cli-command-aliases. These are pure moves; only their import specifiers change. No compat re-export at the old paths — every consumer switches to the owning subpath. The per-command defaults stay where they are for now (the daemon's edge into the facet resolver is the harder cut and belongs with the daemon-closure work). Part of #2545 / #2543.
1 parent e3880f1 commit 4f5a87b

43 files changed

Lines changed: 81 additions & 45 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/agents/cli-flags.md‎

Lines changed: 2 additions & 1 deletion

‎packages/command-registry/package.json‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,26 @@
7070
"./batch-policy": {
7171
"types": "./src/batch-policy.ts",
7272
"default": "./src/batch-policy.ts"
73+
},
74+
"./flag-types": {
75+
"types": "./src/flag-types.ts",
76+
"default": "./src/flag-types.ts"
77+
},
78+
"./flag-registry": {
79+
"types": "./src/flag-registry.ts",
80+
"default": "./src/flag-registry.ts"
81+
},
82+
"./flag-groups": {
83+
"types": "./src/flag-groups.ts",
84+
"default": "./src/flag-groups.ts"
85+
},
86+
"./command-text": {
87+
"types": "./src/command-text.ts",
88+
"default": "./src/command-text.ts"
89+
},
90+
"./cli-command-aliases": {
91+
"types": "./src/cli-command-aliases.ts",
92+
"default": "./src/cli-command-aliases.ts"
7393
}
7494
}
7595
}

src/commands/cli-grammar/flag-registry.test.ts renamed to packages/command-registry/src/__tests__/flag-registry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { test } from 'vitest';
22
import assert from 'node:assert/strict';
3-
import { getFlagDefinition } from './flag-registry.ts';
3+
import { getFlagDefinition } from '../flag-registry.ts';
44
import { PLATFORM_SELECTORS } from '@agent-device/kernel/device';
55

66
test('--platform enumValues are derived from the canonical PLATFORM_SELECTORS tuple', () => {
File renamed without changes.
File renamed without changes.

src/commands/cli-grammar/flag-definitions-action.ts renamed to packages/command-registry/src/flag-definitions-action.ts

File renamed without changes.

src/commands/cli-grammar/flag-definitions-connection.ts renamed to packages/command-registry/src/flag-definitions-connection.ts

File renamed without changes.

src/commands/cli-grammar/flag-definitions-target.ts renamed to packages/command-registry/src/flag-definitions-target.ts

File renamed without changes.

src/commands/cli-grammar/flag-definitions-workflow.ts renamed to packages/command-registry/src/flag-definitions-workflow.ts

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)