@shardworks/nexus 0.1.118 → 0.1.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -67
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +0 -12
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +9 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/test-helpers.d.ts.map +1 -1
- package/dist/commands/test-helpers.js +1 -0
- package/dist/commands/test-helpers.js.map +1 -1
- package/dist/helpers.d.ts +11 -0
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +40 -0
- package/dist/helpers.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +13 -5
- package/dist/program.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ Writes the minimum viable guild. Does not run `git init`, create the database, o
|
|
|
96
96
|
```sh
|
|
97
97
|
nsg init ./my-guild --name my-guild
|
|
98
98
|
cd my-guild
|
|
99
|
-
nsg plugin install @shardworks/
|
|
99
|
+
nsg plugin install @shardworks/clerk
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
#### `nsg plugin install`
|
|
@@ -104,8 +104,8 @@ nsg plugin install @shardworks/nexus-stdlib
|
|
|
104
104
|
Accepts npm package specifiers, version pins, and git URLs:
|
|
105
105
|
|
|
106
106
|
```sh
|
|
107
|
-
nsg plugin install @shardworks/
|
|
108
|
-
nsg plugin install
|
|
107
|
+
nsg plugin install @shardworks/clerk
|
|
108
|
+
nsg plugin install @shardworks/clerk@1.2.0
|
|
109
109
|
nsg plugin install git+https://github.com/acme/my-plugin.git
|
|
110
110
|
|
|
111
111
|
# Symlink a local directory (dev workflow)
|
|
@@ -118,91 +118,89 @@ Plugin install is a pure npm + guild.json operation — it adds the package as a
|
|
|
118
118
|
|
|
119
119
|
## Standard Guild Commands
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
The Guild CLI bundles command implementations from several plugin packages. Each plugin registers its own command groups.
|
|
122
122
|
|
|
123
123
|
### Commissions and Writs
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|---|---|---|
|
|
127
|
-
| `nsg writ post` | nexus-stdlib | Post a new commission (creates a mandate writ) |
|
|
128
|
-
| `nsg writ list` | nexus-stdlib | List writs with optional filters |
|
|
129
|
-
| `nsg writ show` | nexus-stdlib | Show full detail for a writ |
|
|
130
|
-
| `nsg writ update` | nexus-stdlib | Update writ fields (status, spec, etc.) |
|
|
131
|
-
|
|
132
|
-
### Animas
|
|
125
|
+
All commission and writ commands come from the `clerk` plugin.
|
|
133
126
|
|
|
134
127
|
| Command | Source | Description |
|
|
135
128
|
|---|---|---|
|
|
136
|
-
| `nsg
|
|
137
|
-
| `nsg
|
|
138
|
-
| `nsg
|
|
139
|
-
| `nsg
|
|
140
|
-
| `nsg
|
|
141
|
-
| `nsg
|
|
129
|
+
| `nsg commission post` | clerk | Post a new commission, creating a writ in ready status |
|
|
130
|
+
| `nsg writ list` | clerk | List writs with optional filters |
|
|
131
|
+
| `nsg writ show` | clerk | Show full detail for a writ |
|
|
132
|
+
| `nsg writ accept` | clerk | Accept a writ, transitioning it from ready to active |
|
|
133
|
+
| `nsg writ complete` | clerk | Complete a writ, transitioning it from active to completed |
|
|
134
|
+
| `nsg writ fail` | clerk | Fail a writ, transitioning it from active to failed |
|
|
135
|
+
| `nsg writ cancel` | clerk | Cancel a writ, transitioning it from ready or active to cancelled |
|
|
136
|
+
| `nsg writ link` | clerk | Link two writs with a typed relationship |
|
|
137
|
+
| `nsg writ unlink` | clerk | Remove a link between two writs |
|
|
138
|
+
|
|
139
|
+
### Sessions
|
|
142
140
|
|
|
143
|
-
|
|
141
|
+
Session commands come from the `animator` and `parlour` plugins.
|
|
144
142
|
|
|
145
143
|
| Command | Source | Description |
|
|
146
144
|
|---|---|---|
|
|
147
|
-
| `nsg
|
|
148
|
-
| `nsg
|
|
149
|
-
| `nsg session
|
|
150
|
-
| `nsg
|
|
151
|
-
| `nsg conversation
|
|
152
|
-
| `nsg conversation
|
|
153
|
-
| `nsg conversation end` | parlour (supportKit) | End an active conversation |
|
|
145
|
+
| `nsg summon` | animator | Summon an anima -- compose context and launch a session |
|
|
146
|
+
| `nsg session list` | animator | List recent sessions with optional filters |
|
|
147
|
+
| `nsg session show` | animator | Show full detail for a single session by id |
|
|
148
|
+
| `nsg conversation list` | parlour | List conversations with optional filters |
|
|
149
|
+
| `nsg conversation show` | parlour | Show full detail for a conversation including all turns |
|
|
150
|
+
| `nsg conversation end` | parlour | End an active conversation |
|
|
154
151
|
|
|
155
|
-
###
|
|
152
|
+
### Codexes and Drafts
|
|
156
153
|
|
|
157
|
-
|
|
158
|
-
|---|---|---|
|
|
159
|
-
| `nsg signal` | nexus-stdlib | Signal a custom event |
|
|
160
|
-
| `nsg clock start` | cli (v1) | Start the Clockworks daemon |
|
|
161
|
-
| `nsg clock stop` | cli (v1) | Stop the Clockworks daemon |
|
|
162
|
-
| `nsg clock status` | cli (v1) | Show daemon status |
|
|
163
|
-
| `nsg clock tick` | cli (v1) | Process one pending event (manual mode) |
|
|
164
|
-
| `nsg clock run` | cli (v1) | Process all pending events (manual mode) |
|
|
165
|
-
| `nsg clock list` | cli (v1) | List standing orders |
|
|
166
|
-
| `nsg event list` | nexus-stdlib | List recent events |
|
|
167
|
-
| `nsg event show` | nexus-stdlib | Show event detail |
|
|
168
|
-
|
|
169
|
-
### Codexes
|
|
154
|
+
Codex and draft commands come from the `codexes` plugin.
|
|
170
155
|
|
|
171
156
|
| Command | Source | Description |
|
|
172
157
|
|---|---|---|
|
|
173
|
-
| `nsg codex add` | codexes
|
|
174
|
-
| `nsg codex list` | codexes
|
|
175
|
-
| `nsg codex show` | codexes
|
|
176
|
-
| `nsg codex remove` | codexes
|
|
177
|
-
| `nsg codex push` | codexes
|
|
178
|
-
| `nsg draft open` | codexes
|
|
179
|
-
| `nsg draft list` | codexes
|
|
180
|
-
| `nsg draft abandon` | codexes
|
|
181
|
-
| `nsg draft seal` | codexes
|
|
182
|
-
|
|
183
|
-
###
|
|
158
|
+
| `nsg codex add` | codexes | Register an existing git repository as a guild codex |
|
|
159
|
+
| `nsg codex list` | codexes | List all codexes registered with the guild |
|
|
160
|
+
| `nsg codex show` | codexes | Show details of a registered codex including active draft bindings |
|
|
161
|
+
| `nsg codex remove` | codexes | Remove a codex from the guild (does not affect the remote repository) |
|
|
162
|
+
| `nsg codex push` | codexes | Push a branch to the codex remote |
|
|
163
|
+
| `nsg draft open` | codexes | Open a draft binding on a codex (creates an isolated git worktree) |
|
|
164
|
+
| `nsg draft list` | codexes | List active draft bindings, optionally filtered by codex |
|
|
165
|
+
| `nsg draft abandon` | codexes | Abandon a draft binding (removes the git worktree and branch) |
|
|
166
|
+
| `nsg draft seal` | codexes | Seal a draft binding into the codex (ff-only merge or rebase; no merge commits) |
|
|
167
|
+
|
|
168
|
+
### Rigs
|
|
169
|
+
|
|
170
|
+
Rig and crawl commands come from the `spider` plugin.
|
|
184
171
|
|
|
185
172
|
| Command | Source | Description |
|
|
186
173
|
|---|---|---|
|
|
187
|
-
| `nsg
|
|
188
|
-
| `nsg
|
|
189
|
-
| `nsg
|
|
174
|
+
| `nsg rig list` | spider | List rigs with optional filters |
|
|
175
|
+
| `nsg rig show` | spider | Retrieve a rig by id |
|
|
176
|
+
| `nsg rig for-writ` | spider | Find the rig for a given writ |
|
|
177
|
+
| `nsg rig resume` | spider | Manually clear a block on a specific engine, regardless of checker result |
|
|
178
|
+
| `nsg crawl one` | spider | Execute one step of the Spider's crawl loop |
|
|
179
|
+
| `nsg crawl continual` | spider | Run the Spider's crawl loop continuously |
|
|
190
180
|
|
|
191
|
-
|
|
181
|
+
### Introspection
|
|
192
182
|
|
|
193
|
-
|
|
183
|
+
Introspection commands come from the `tools` plugin (Instrumentarium).
|
|
194
184
|
|
|
195
|
-
|
|
185
|
+
| Command | Source | Description |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| `nsg tools list` | tools | List available tools with optional caller/plugin filters |
|
|
188
|
+
| `nsg tools show` | tools | Show full detail for a tool by name |
|
|
196
189
|
|
|
197
|
-
|
|
198
|
-
- Framework commands: `init`, `status`, `version`, `upgrade`, `plugin list/install/remove/upgrade`
|
|
199
|
-
- All tool-based commands discovered via The Instrumentarium
|
|
190
|
+
### Planned
|
|
200
191
|
|
|
201
|
-
|
|
202
|
-
- `consult`, `convene` — interactive session launchers (need Animator/Parlour integration)
|
|
203
|
-
- `clock *` — Clockworks daemon management
|
|
204
|
-
- `codex *` / `draft *` — codex and draft lifecycle (migrated to codexes-apparatus)
|
|
205
|
-
- `dashboard` — guild dashboard
|
|
206
|
-
- `guild restore`, `guild upgrade-books` — guild maintenance
|
|
192
|
+
The following commands are planned but not yet implemented. No plugin currently contributes them.
|
|
207
193
|
|
|
208
|
-
|
|
194
|
+
| Command | Source | Description |
|
|
195
|
+
|---|---|---|
|
|
196
|
+
| `nsg anima create` | — | *(Planned)* Create a new anima |
|
|
197
|
+
| `nsg anima list` | — | *(Planned)* List animas |
|
|
198
|
+
| `nsg anima show` | — | *(Planned)* Show anima detail |
|
|
199
|
+
| `nsg anima update` | — | *(Planned)* Update anima configuration |
|
|
200
|
+
| `nsg anima remove` | — | *(Planned)* Retire an anima |
|
|
201
|
+
| `nsg anima manifest` | — | *(Planned)* Preview the manifest for an anima |
|
|
202
|
+
| `nsg signal` | — | *(Planned)* Signal a custom event |
|
|
203
|
+
| `nsg event list` | — | *(Planned)* List recent events |
|
|
204
|
+
| `nsg event show` | — | *(Planned)* Show event detail |
|
|
205
|
+
| `nsg dispatch list` | — | *(Planned)* List recent dispatches |
|
|
206
|
+
| `nsg audit list` | — | *(Planned)* List audit entries |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;;;;;;AAIxB,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;;;;;;AAIxB,wBAyEG"}
|
package/dist/commands/init.js
CHANGED
|
@@ -40,16 +40,6 @@ export default tool({
|
|
|
40
40
|
fs.mkdirSync(home, { recursive: true });
|
|
41
41
|
// .nexus infrastructure (gitignored)
|
|
42
42
|
fs.mkdirSync(path.join(home, '.nexus'), { recursive: true });
|
|
43
|
-
// Scaffold guild directories
|
|
44
|
-
const dirs = [
|
|
45
|
-
'roles',
|
|
46
|
-
'codex',
|
|
47
|
-
];
|
|
48
|
-
for (const dir of dirs) {
|
|
49
|
-
const full = path.join(home, dir);
|
|
50
|
-
fs.mkdirSync(full, { recursive: true });
|
|
51
|
-
fs.writeFileSync(path.join(full, '.gitkeep'), '');
|
|
52
|
-
}
|
|
53
43
|
// guild.json — V2 format: plugin-centric, model in settings
|
|
54
44
|
const guildConfig = createInitialGuildConfig(name, VERSION, model);
|
|
55
45
|
writeGuildConfig(home, guildConfig);
|
|
@@ -70,8 +60,6 @@ export default tool({
|
|
|
70
60
|
fs.writeFileSync(path.join(home, 'package.json'), JSON.stringify(packageJson, null, 2) + '\n');
|
|
71
61
|
// .gitignore
|
|
72
62
|
fs.writeFileSync(path.join(home, '.gitignore'), ['node_modules/', '.nexus/', ''].join('\n'));
|
|
73
|
-
// codex placeholder
|
|
74
|
-
fs.writeFileSync(path.join(home, 'codex', 'all.md'), '');
|
|
75
63
|
// npm install to get dependencies into node_modules
|
|
76
64
|
if (Object.keys(dependencies).length > 0) {
|
|
77
65
|
execFileSync('npm', ['install'], { cwd: home, stdio: 'pipe' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAA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Y;SACb,CAAC;QACF,EAAE,CAAC,aAAa,CACd,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,EAC/B,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAC5C,CAAC;QAEF,aAAa;QACb,EAAE,CAAC,aAAa,CACd,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,EAC7B,CAAC,eAAe,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5C,CAAC;QAEF,oDAAoD;QACpD,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzC,YAAY,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,KAAK,GAAG;YACZ,UAAU,IAAI,gBAAgB,IAAI,EAAE;YACpC,EAAE;YACF,QAAQ,MAAM,CAAC,IAAI,EAAE;YACrB,iFAAiF;YACjF,4EAA4E;YAC5E,EAAE;SACH,CAAC;QACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;;;;AAExB,
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;;;;AAExB,wBAqDG"}
|
package/dist/commands/status.js
CHANGED
|
@@ -28,6 +28,7 @@ export default tool({
|
|
|
28
28
|
}
|
|
29
29
|
const { home } = g;
|
|
30
30
|
const config = readGuildConfig(home);
|
|
31
|
+
const failed = g.failedPlugins();
|
|
31
32
|
// Note: at status time we don't load/start plugins — we just report what's
|
|
32
33
|
// declared in guild.json. Type discrimination (kit vs apparatus) requires
|
|
33
34
|
// loading the modules, which is deferred to avoid startup cost for status.
|
|
@@ -37,6 +38,7 @@ export default tool({
|
|
|
37
38
|
home,
|
|
38
39
|
model: config.settings?.model ?? '(not set)',
|
|
39
40
|
plugins: [...config.plugins].sort(),
|
|
41
|
+
failedPlugins: failed,
|
|
40
42
|
};
|
|
41
43
|
if (params.json) {
|
|
42
44
|
return result;
|
|
@@ -48,6 +50,13 @@ export default tool({
|
|
|
48
50
|
`Model: ${result.model}`,
|
|
49
51
|
`Plugins: ${result.plugins.length > 0 ? result.plugins.join(', ') : '(none)'}`,
|
|
50
52
|
];
|
|
53
|
+
if (failed.length > 0) {
|
|
54
|
+
lines.push('');
|
|
55
|
+
lines.push('Failed plugins:');
|
|
56
|
+
for (const f of failed) {
|
|
57
|
+
lines.push(` ${f.id}: ${f.reason}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
51
60
|
return lines.join('\n');
|
|
52
61
|
},
|
|
53
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,IAAI,CAAC;IAClB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kDAAkD;IAC/D,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,CAAC,O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/commands/test-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/test-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAWrD;AAED,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,IAAI,CASpF;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAGpF;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,IAAI,IAAI,CAMvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-helpers.js","sourceRoot":"","sources":["../../src/commands/test-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE9D,sDAAsD;AACtD,IAAI,OAAO,GAAa,EAAE,CAAC;AAE3B,uEAAuE;AACvE,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,QAAQ,CAAC;QACP,IAAI;QACJ,SAAS,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAA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C;AACf,CAAC"}
|
package/dist/helpers.d.ts
CHANGED
|
@@ -16,6 +16,17 @@ export declare function toFlag(key: string): string;
|
|
|
16
16
|
* Used to register Commander flags without <value> for boolean params.
|
|
17
17
|
*/
|
|
18
18
|
export declare function isBooleanSchema(schema: z.ZodTypeAny): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Coerce Commander string opts to match the expected Zod schema types.
|
|
21
|
+
*
|
|
22
|
+
* Commander passes all --option <value> arguments as strings. This function
|
|
23
|
+
* walks the Zod shape and converts string values to numbers where the
|
|
24
|
+
* schema expects z.number() (including when wrapped in ZodOptional/ZodDefault).
|
|
25
|
+
*
|
|
26
|
+
* Undefined values pass through unchanged — Zod handles optional/default.
|
|
27
|
+
* Non-number schemas are left untouched.
|
|
28
|
+
*/
|
|
29
|
+
export declare function coerceCliOpts(shape: Record<string, z.ZodTypeAny>, opts: Record<string, unknown>): Record<string, unknown>;
|
|
19
30
|
/**
|
|
20
31
|
* Determine which hyphen prefixes have enough tools to warrant a group.
|
|
21
32
|
*
|
package/dist/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,GAAG,OAAO,CAO7D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAetE"}
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,GAAG,OAAO,CAO7D;AAuBD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,EACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAazB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAetE"}
|
package/dist/helpers.js
CHANGED
|
@@ -22,6 +22,46 @@ export function isBooleanSchema(schema) {
|
|
|
22
22
|
!schema.safeParse(42).success &&
|
|
23
23
|
!schema.safeParse('test').success);
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Check whether a Zod schema is a number type, possibly wrapped
|
|
27
|
+
* in ZodOptional and/or ZodDefault.
|
|
28
|
+
*/
|
|
29
|
+
function isNumberSchema(schema) {
|
|
30
|
+
let inner = schema;
|
|
31
|
+
if (inner instanceof z.ZodOptional) {
|
|
32
|
+
inner = inner.unwrap();
|
|
33
|
+
}
|
|
34
|
+
if (inner instanceof z.ZodDefault) {
|
|
35
|
+
inner = inner.unwrap();
|
|
36
|
+
}
|
|
37
|
+
// Handle the reverse nesting order too (default wrapping optional)
|
|
38
|
+
if (inner instanceof z.ZodOptional) {
|
|
39
|
+
inner = inner.unwrap();
|
|
40
|
+
}
|
|
41
|
+
return inner instanceof z.ZodNumber;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Coerce Commander string opts to match the expected Zod schema types.
|
|
45
|
+
*
|
|
46
|
+
* Commander passes all --option <value> arguments as strings. This function
|
|
47
|
+
* walks the Zod shape and converts string values to numbers where the
|
|
48
|
+
* schema expects z.number() (including when wrapped in ZodOptional/ZodDefault).
|
|
49
|
+
*
|
|
50
|
+
* Undefined values pass through unchanged — Zod handles optional/default.
|
|
51
|
+
* Non-number schemas are left untouched.
|
|
52
|
+
*/
|
|
53
|
+
export function coerceCliOpts(shape, opts) {
|
|
54
|
+
const result = { ...opts };
|
|
55
|
+
for (const [key, schema] of Object.entries(shape)) {
|
|
56
|
+
const value = result[key];
|
|
57
|
+
if (typeof value !== 'string')
|
|
58
|
+
continue;
|
|
59
|
+
if (isNumberSchema(schema)) {
|
|
60
|
+
result[key] = Number(value);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
25
65
|
/**
|
|
26
66
|
* Determine which hyphen prefixes have enough tools to warrant a group.
|
|
27
67
|
*
|
package/dist/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,OAAO,KAAK,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,MAAoB;IAClD,OAAO,CACL,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO;QAC9B,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO;QAC/B,CAAC,MAAM,CAAC,SAAS,CAA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AAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB;IACvD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE/C,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,GAAG,KAAK,CAAC,CAAC;YAAE,SAAS;QACzB,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACpC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,YAAY,EAAE,CAAC;QAC3C,IAAI,KAAK,IAAI,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/program.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAyGH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA8D1C"}
|
package/dist/program.js
CHANGED
|
@@ -22,7 +22,7 @@ import { z } from 'zod';
|
|
|
22
22
|
import { findGuildRoot, guild } from '@shardworks/nexus-core';
|
|
23
23
|
import { createGuild } from '@shardworks/nexus-arbor';
|
|
24
24
|
import { frameworkCommands } from "./commands/index.js";
|
|
25
|
-
import { toFlag, isBooleanSchema, findGroupPrefixes } from "./helpers.js";
|
|
25
|
+
import { toFlag, isBooleanSchema, findGroupPrefixes, coerceCliOpts } from "./helpers.js";
|
|
26
26
|
/**
|
|
27
27
|
* Build a Commander command from a ToolDefinition.
|
|
28
28
|
*
|
|
@@ -51,7 +51,8 @@ function buildToolCommand(commandName, toolDef) {
|
|
|
51
51
|
}
|
|
52
52
|
cmd.action(async (opts) => {
|
|
53
53
|
try {
|
|
54
|
-
const
|
|
54
|
+
const coerced = coerceCliOpts(shape, opts);
|
|
55
|
+
const validated = toolDef.params.parse(coerced);
|
|
55
56
|
const result = await toolDef.handler(validated);
|
|
56
57
|
const output = typeof result === 'string' ? result : JSON.stringify(result, null, 2);
|
|
57
58
|
console.log(output);
|
|
@@ -134,7 +135,14 @@ export async function main() {
|
|
|
134
135
|
// If the guild doesn't have the tools apparatus installed, no plugin
|
|
135
136
|
// tools are available — only framework commands.
|
|
136
137
|
if (home) {
|
|
137
|
-
|
|
138
|
+
try {
|
|
139
|
+
await createGuild(home);
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
143
|
+
console.warn(`[nsg] Guild failed to load: ${message}`);
|
|
144
|
+
console.warn('[nsg] Plugin-contributed commands are unavailable. Framework commands still work.');
|
|
145
|
+
}
|
|
138
146
|
try {
|
|
139
147
|
const instrumentarium = guild().apparatus('tools');
|
|
140
148
|
const pluginTools = instrumentarium.list()
|
|
@@ -143,8 +151,8 @@ export async function main() {
|
|
|
143
151
|
registerTools(program, pluginTools);
|
|
144
152
|
}
|
|
145
153
|
catch {
|
|
146
|
-
// No Instrumentarium installed
|
|
147
|
-
//
|
|
154
|
+
// No Instrumentarium installed or guild failed to load —
|
|
155
|
+
// only framework commands available.
|
|
148
156
|
}
|
|
149
157
|
}
|
|
150
158
|
program.parse(process.argv);
|
package/dist/program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIzF;;;;;;;;GAQG;AACH,SAAS,gBAAgB,CACvB,WAAmB,EACnB,OAAuB;IAEvB,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAEtE,MAAM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 -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"commander": "14.0.3",
|
|
23
23
|
"zod": "4.3.6",
|
|
24
|
-
"@shardworks/
|
|
25
|
-
"@shardworks/
|
|
26
|
-
"@shardworks/nexus-
|
|
24
|
+
"@shardworks/tools-apparatus": "0.1.120",
|
|
25
|
+
"@shardworks/nexus-core": "0.1.120",
|
|
26
|
+
"@shardworks/nexus-arbor": "0.1.120"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "25.5.0"
|