@formlm/cli 0.1.3 → 0.2.0

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.
Files changed (43) hide show
  1. package/README.md +231 -77
  2. package/dist/commands/connect.d.ts +3 -0
  3. package/dist/commands/connect.d.ts.map +1 -0
  4. package/dist/commands/connect.js +555 -0
  5. package/dist/commands/connect.js.map +1 -0
  6. package/dist/commands/expert.d.ts +3 -0
  7. package/dist/commands/expert.d.ts.map +1 -0
  8. package/dist/commands/expert.js +123 -0
  9. package/dist/commands/expert.js.map +1 -0
  10. package/dist/commands/field.js +3 -3
  11. package/dist/commands/field.js.map +1 -1
  12. package/dist/commands/report.d.ts +3 -0
  13. package/dist/commands/report.d.ts.map +1 -0
  14. package/dist/commands/report.js +507 -0
  15. package/dist/commands/report.js.map +1 -0
  16. package/dist/commands/scale.d.ts +3 -0
  17. package/dist/commands/scale.d.ts.map +1 -0
  18. package/dist/commands/scale.js +289 -0
  19. package/dist/commands/scale.js.map +1 -0
  20. package/dist/commands/share.js +1 -1
  21. package/dist/commands/share.js.map +1 -1
  22. package/dist/commands/skill.d.ts +15 -0
  23. package/dist/commands/skill.d.ts.map +1 -0
  24. package/dist/commands/skill.js +31 -0
  25. package/dist/commands/skill.js.map +1 -0
  26. package/dist/commands/smart.d.ts +16 -0
  27. package/dist/commands/smart.d.ts.map +1 -0
  28. package/dist/commands/smart.js +81 -0
  29. package/dist/commands/smart.js.map +1 -0
  30. package/dist/commands/snapshot.d.ts +13 -0
  31. package/dist/commands/snapshot.d.ts.map +1 -0
  32. package/dist/commands/snapshot.js +61 -0
  33. package/dist/commands/snapshot.js.map +1 -0
  34. package/dist/exec.d.ts +8 -2
  35. package/dist/exec.d.ts.map +1 -1
  36. package/dist/exec.js +28 -2
  37. package/dist/exec.js.map +1 -1
  38. package/dist/index.js +23 -8
  39. package/dist/index.js.map +1 -1
  40. package/dist/mcp.d.ts.map +1 -1
  41. package/dist/mcp.js +441 -272
  42. package/dist/mcp.js.map +1 -1
  43. package/package.json +1 -1
@@ -0,0 +1,289 @@
1
+ import { execCommand } from '../exec.js';
2
+ import { output } from '../output.js';
3
+ function normBool(v) {
4
+ if (v === undefined)
5
+ return undefined;
6
+ if (typeof v === 'boolean')
7
+ return v;
8
+ return v === 'true' || v === '1';
9
+ }
10
+ export function registerScaleCommand(parent) {
11
+ const scale = parent.command('scale').description('Scale dimensions, field associations & score ranges');
12
+ // ========== Dimension Management ==========
13
+ scale
14
+ .command('query')
15
+ .alias('list')
16
+ .description('List all scale dimensions (use --md for token-efficient markdown)')
17
+ .requiredOption('--app <appId>', 'App ID')
18
+ .option('--md', 'Markdown table output (for AI)')
19
+ .option('--human', 'Humanized display (hides system IDs)')
20
+ .option('--filter <keyword>', 'Keyword filter (matches id/name/keys)')
21
+ .action(async (opts) => {
22
+ let cmd = `assess scale query --app ${opts.app}`;
23
+ if (opts.md)
24
+ cmd += ' --md';
25
+ if (opts.human)
26
+ cmd += ' --human';
27
+ if (opts.filter)
28
+ cmd += ` --filter "${opts.filter}"`;
29
+ if (!opts.md && !opts.human)
30
+ cmd += ' --json';
31
+ output(await execCommand(cmd));
32
+ });
33
+ scale
34
+ .command('find')
35
+ .description('Find a single scale dimension by ID or keyword (returns full details)')
36
+ .requiredOption('--app <appId>', 'App ID')
37
+ .option('--id <scaleId>', 'Scale dimension ID')
38
+ .option('--filter <keyword>', 'Keyword filter')
39
+ .action(async (opts) => {
40
+ let cmd = `assess scale find --app ${opts.app}`;
41
+ if (opts.id)
42
+ cmd += ` --id ${opts.id}`;
43
+ if (opts.filter)
44
+ cmd += ` --filter "${opts.filter}"`;
45
+ cmd += ' --json';
46
+ output(await execCommand(cmd));
47
+ });
48
+ scale
49
+ .command('add')
50
+ .description('Add a scale dimension (or update if ID exists). Required before adding score ranges')
51
+ .requiredOption('--app <appId>', 'App ID')
52
+ .requiredOption('--id <scaleId>', 'Dimension ID')
53
+ .requiredOption('--name <name>', 'Dimension name')
54
+ .option('--format <format>', 'Calculation: sum (total) / avg (average) / count (item count)', 'sum')
55
+ .option('--direction <direction>', 'Scale direction: positive (high=good) / negative (symptom, high=bad)')
56
+ .option('--weight <weight>', 'Dimension weight', parseFloat)
57
+ .option('--kbText <text>', 'Knowledge base text (required by server, max 500 chars)')
58
+ .action(async (opts) => {
59
+ let cmd = `assess scale add --app ${opts.app} --id ${opts.id} --name "${opts.name}" --format ${opts.format}`;
60
+ if (opts.direction)
61
+ cmd += ` --direction ${opts.direction}`;
62
+ if (opts.weight !== undefined)
63
+ cmd += ` --weight ${opts.weight}`;
64
+ if (opts.kbText)
65
+ cmd += ` --kbText "${opts.kbText}"`;
66
+ cmd += ' --json';
67
+ output(await execCommand(cmd));
68
+ });
69
+ scale
70
+ .command('update')
71
+ .description('Update a scale dimension')
72
+ .requiredOption('--app <appId>', 'App ID')
73
+ .requiredOption('--id <scaleId>', 'Dimension ID')
74
+ .option('--name <name>', 'Dimension name')
75
+ .option('--format <format>', 'Calculation: sum / avg / count')
76
+ .option('--direction <direction>', 'Scale direction: positive / negative')
77
+ .option('--weight <weight>', 'Dimension weight', parseFloat)
78
+ .option('--kbText <text>', 'Knowledge base text (max 500 chars)')
79
+ .action(async (opts) => {
80
+ let cmd = `assess scale update --app ${opts.app} --id ${opts.id}`;
81
+ if (opts.name)
82
+ cmd += ` --name "${opts.name}"`;
83
+ if (opts.format)
84
+ cmd += ` --format ${opts.format}`;
85
+ if (opts.direction)
86
+ cmd += ` --direction ${opts.direction}`;
87
+ if (opts.weight !== undefined)
88
+ cmd += ` --weight ${opts.weight}`;
89
+ if (opts.kbText)
90
+ cmd += ` --kbText "${opts.kbText}"`;
91
+ cmd += ' --json';
92
+ output(await execCommand(cmd));
93
+ });
94
+ scale
95
+ .command('set')
96
+ .description('Set a single property on a scale dimension (name/format/direction/weight/kbText/maxScore/minScore/negKeys/data.<id>.value)')
97
+ .requiredOption('--app <appId>', 'App ID')
98
+ .requiredOption('--id <scaleId>', 'Dimension ID')
99
+ .requiredOption('--property <property>', 'Property path (e.g. name, format, direction, data.<dataId>.value)')
100
+ .requiredOption('--value <value>', 'New value')
101
+ .action(async (opts) => {
102
+ const cmd = `assess scale set --app ${opts.app} --id ${opts.id} --property ${opts.property} --value "${opts.value}" --json`;
103
+ output(await execCommand(cmd));
104
+ });
105
+ scale
106
+ .command('remove')
107
+ .description('Remove a scale dimension')
108
+ .requiredOption('--app <appId>', 'App ID')
109
+ .requiredOption('--id <scaleId>', 'Dimension ID')
110
+ .action(async (opts) => {
111
+ const cmd = `assess scale remove --app ${opts.app} --id ${opts.id} --json`;
112
+ output(await execCommand(cmd));
113
+ });
114
+ scale
115
+ .command('clear')
116
+ .description('Clear all scale dimensions')
117
+ .requiredOption('--app <appId>', 'App ID')
118
+ .action(async (opts) => {
119
+ const cmd = `assess scale clear --app ${opts.app} --json`;
120
+ output(await execCommand(cmd));
121
+ });
122
+ scale
123
+ .command('config')
124
+ .description('Configure global scale options (enableSingle / enableOption)')
125
+ .requiredOption('--app <appId>', 'App ID')
126
+ .option('--enable-single [value]', 'Single display mode: only show matched dimension result (true/false)')
127
+ .option('--enable-option [value]', 'Expand option sub-items when associating dimensions (true/false)')
128
+ .action(async (opts) => {
129
+ let cmd = `assess scale config --app ${opts.app}`;
130
+ const es = normBool(opts.enableSingle);
131
+ if (es !== undefined)
132
+ cmd += ` --enable-single=${es}`;
133
+ const eo = normBool(opts.enableOption);
134
+ if (eo !== undefined)
135
+ cmd += ` --enable-option=${eo}`;
136
+ cmd += ' --json';
137
+ output(await execCommand(cmd));
138
+ });
139
+ // ========== Keys (Field Association) Management ==========
140
+ const keys = scale.command('keys').description('Associate fields with scale dimensions');
141
+ keys
142
+ .command('add')
143
+ .description('Associate fields with a scale dimension (via Field key). Supports --fields for batch, --polarities for auto reverse-scored fields')
144
+ .requiredOption('--app <appId>', 'App ID')
145
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
146
+ .option('--field <fieldKey>', 'Single field key (use with --fields for batch)')
147
+ .option('--fields <fieldKeys>', 'Batch field keys, comma-separated (e.g. X1,X2,X3)')
148
+ .option('--polarities <polarities>', 'Field polarity declarations: fieldKey:positive/symptom,... (auto-computes reverse-scored fields)')
149
+ .option('--negFields <fieldKeys>', '[Deprecated] Reverse-scored field keys, comma-separated. Use --polarities instead')
150
+ .action(async (opts) => {
151
+ let cmd = `assess scale keys add --app ${opts.app} --scale ${opts.scale}`;
152
+ if (opts.field)
153
+ cmd += ` --field ${opts.field}`;
154
+ if (opts.fields)
155
+ cmd += ` --fields ${opts.fields}`;
156
+ if (opts.polarities)
157
+ cmd += ` --polarities ${opts.polarities}`;
158
+ if (opts.negFields)
159
+ cmd += ` --negFields ${opts.negFields}`;
160
+ cmd += ' --json';
161
+ output(await execCommand(cmd));
162
+ });
163
+ keys
164
+ .command('remove')
165
+ .description('Disassociate fields from a scale dimension')
166
+ .requiredOption('--app <appId>', 'App ID')
167
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
168
+ .option('--field <fieldKey>', 'Single field key')
169
+ .option('--fields <fieldKeys>', 'Batch field keys, comma-separated')
170
+ .action(async (opts) => {
171
+ let cmd = `assess scale keys remove --app ${opts.app} --scale ${opts.scale}`;
172
+ if (opts.field)
173
+ cmd += ` --field ${opts.field}`;
174
+ if (opts.fields)
175
+ cmd += ` --fields ${opts.fields}`;
176
+ cmd += ' --json';
177
+ output(await execCommand(cmd));
178
+ });
179
+ keys
180
+ .command('list')
181
+ .description('List fields associated with a scale dimension')
182
+ .requiredOption('--app <appId>', 'App ID')
183
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
184
+ .action(async (opts) => {
185
+ const cmd = `assess scale keys list --app ${opts.app} --scale ${opts.scale} --json`;
186
+ output(await execCommand(cmd));
187
+ });
188
+ keys
189
+ .command('set')
190
+ .description('Set scoring direction for associated fields (negScore=true=reverse, false=normal)')
191
+ .requiredOption('--app <appId>', 'App ID')
192
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
193
+ .requiredOption('--fields <fieldKeys>', 'Field keys, comma-separated')
194
+ .requiredOption('--negScore <bool>', 'true=reverse-scored (high score inverted), false=normal', (v) => v === 'true')
195
+ .action(async (opts) => {
196
+ const cmd = `assess scale keys set --app ${opts.app} --scale ${opts.scale} --fields ${opts.fields} --negScore ${opts.negScore} --json`;
197
+ output(await execCommand(cmd));
198
+ });
199
+ // ========== Data (Score Ranges) Management ==========
200
+ const data = scale.command('data').description('Score range (result tier) management');
201
+ data
202
+ .command('add')
203
+ .description('Add score ranges. Batch mode: --ranges "0-7:Normal,8-14:Mild,15-21:Severe". Single mode: --min --max --value')
204
+ .requiredOption('--app <appId>', 'App ID')
205
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
206
+ .option('--ranges <ranges>', 'Batch format: min-max:value[:desc], comma-separated. e.g. "0-7:Normal,8-14:Mild,15-21:Severe"')
207
+ .option('--id <dataId>', 'Range ID (auto-generated if omitted, single mode only)')
208
+ .option('--min <min>', 'Min score (single mode)', parseFloat)
209
+ .option('--max <max>', 'Max score (single mode)', parseFloat)
210
+ .option('--value <value>', 'Result label (single mode)')
211
+ .option('--desc <description>', 'Range description')
212
+ .option('--unique [value]', 'Unique display in enableSingle mode (true/false)')
213
+ .action(async (opts) => {
214
+ let cmd = `assess scale data add --app ${opts.app} --scale ${opts.scale}`;
215
+ if (opts.ranges)
216
+ cmd += ` --ranges "${opts.ranges}"`;
217
+ if (opts.id)
218
+ cmd += ` --id ${opts.id}`;
219
+ if (opts.min !== undefined)
220
+ cmd += ` --min ${opts.min}`;
221
+ if (opts.max !== undefined)
222
+ cmd += ` --max ${opts.max}`;
223
+ if (opts.value)
224
+ cmd += ` --value "${opts.value}"`;
225
+ if (opts.desc)
226
+ cmd += ` --desc "${opts.desc}"`;
227
+ const u = normBool(opts.unique);
228
+ if (u !== undefined)
229
+ cmd += ` --unique=${u}`;
230
+ cmd += ' --json';
231
+ output(await execCommand(cmd));
232
+ });
233
+ data
234
+ .command('update')
235
+ .description('Update a score range')
236
+ .requiredOption('--app <appId>', 'App ID')
237
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
238
+ .requiredOption('--id <dataId>', 'Range ID')
239
+ .option('--min <min>', 'Min score', parseFloat)
240
+ .option('--max <max>', 'Max score', parseFloat)
241
+ .option('--value <value>', 'Result label')
242
+ .option('--desc <description>', 'Range description')
243
+ .option('--unique [value]', 'Unique display (true/false)')
244
+ .action(async (opts) => {
245
+ let cmd = `assess scale data update --app ${opts.app} --scale ${opts.scale} --id ${opts.id}`;
246
+ if (opts.min !== undefined)
247
+ cmd += ` --min ${opts.min}`;
248
+ if (opts.max !== undefined)
249
+ cmd += ` --max ${opts.max}`;
250
+ if (opts.value)
251
+ cmd += ` --value "${opts.value}"`;
252
+ if (opts.desc)
253
+ cmd += ` --desc "${opts.desc}"`;
254
+ const u = normBool(opts.unique);
255
+ if (u !== undefined)
256
+ cmd += ` --unique=${u}`;
257
+ cmd += ' --json';
258
+ output(await execCommand(cmd));
259
+ });
260
+ data
261
+ .command('remove')
262
+ .description('Remove a score range')
263
+ .requiredOption('--app <appId>', 'App ID')
264
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
265
+ .requiredOption('--id <dataId>', 'Range ID')
266
+ .action(async (opts) => {
267
+ const cmd = `assess scale data remove --app ${opts.app} --scale ${opts.scale} --id ${opts.id} --json`;
268
+ output(await execCommand(cmd));
269
+ });
270
+ data
271
+ .command('list')
272
+ .description('List all score ranges for a dimension')
273
+ .requiredOption('--app <appId>', 'App ID')
274
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
275
+ .action(async (opts) => {
276
+ const cmd = `assess scale data list --app ${opts.app} --scale ${opts.scale} --json`;
277
+ output(await execCommand(cmd));
278
+ });
279
+ data
280
+ .command('clear')
281
+ .description('Clear all score ranges for a dimension')
282
+ .requiredOption('--app <appId>', 'App ID')
283
+ .requiredOption('--scale <scaleId>', 'Dimension ID')
284
+ .action(async (opts) => {
285
+ const cmd = `assess scale data clear --app ${opts.app} --scale ${opts.scale} --json`;
286
+ output(await execCommand(cmd));
287
+ });
288
+ }
289
+ //# sourceMappingURL=scale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scale.js","sourceRoot":"","sources":["../../src/commands/scale.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,SAAS,QAAQ,CAAC,CAAU;IAC1B,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,IAAI,OAAO,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IACrC,OAAO,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,GAAG,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,qDAAqD,CAAC,CAAC;IAEzG,6CAA6C;IAE7C,KAAK;SACF,OAAO,CAAC,OAAO,CAAC;SAChB,KAAK,CAAC,MAAM,CAAC;SACb,WAAW,CAAC,mEAAmE,CAAC;SAChF,cAAc,CAAC,eAAe,EAAE,QAAQ,CAAC;SACzC,MAAM,CAAC,MAAM,EAAE,gCAAgC,CAAC;SAChD,MAAM,CAAC,SAAS,EAAE,sCAAsC,CAAC;SACzD,MAAM,CAAC,oBAAoB,EAAE,uCAAuC,CAAC;SACrE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACrB,IAAI,GAAG,GAAG,4BAA4B,IAAI,CAAC,GAAG,EAAE,CAAC;QACjD,IAAI,IAAI,CAAC,EAAE;YAAE,GAAG,IAAI,OAAO,CAAC;QAC5B,IAAI,IAAI,CAAC,KAAK;YAAE,GAAG,IAAI,UAAU,CAAC;QAClC,IAAI,IAAI,CAAC,MAAM;YAAE,GAAG,IAAI,cAAc,IAAI,CAAC,MAAM,GAAG,CAAC;QACrD,IAAI,CAAC,IAAI,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L,IAAI;SACD,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,wCAAwC,CAAC;SACrD,cAAc,CAAC,eAAe,EAAE,QAAQ,CAAC;SACzC,cAAc,CAAC,mBAAmB,EAAE,cAAc,CAAC;SACnD,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,GAAG,GAAG,iCAAiC,IAAI,CAAC,GAAG,YAAY,IAAI,CAAC,KAAK,SAAS,CAAC;QACrF,MAAM,CAAC,MAAM,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { execCommand } from '../exec.js';
2
2
  import { output } from '../output.js';
3
3
  export function registerShareCommand(parent) {
4
- const share = parent.command('share').description('Share & publish management');
4
+ const share = parent.command('share').description('Share & publish management — set command is naturally idempotent (safe to re-run)');
5
5
  share
6
6
  .command('publish')
7
7
  .description('Publish the form for public access (each respondent can submit once; unlimited respondents; stays open until unpublished)')
@@ -1 +1 @@
1
- {"version":3,"file":"share.js","sourceRoot":"","sources":["../../src/commands/share.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;IAEhF,KAAK;SACF,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,2HAA2H,CAAC;SACxI,cAAc,CAAC,eAAe,EAAE,QAAQ,CAAC;SACzC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,GAAG,GAAG,0BAA0B,IAAI,CAAC,GAAG,0DAA0D,CAAC;QACzG,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC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CAAC,CAAC;IAEL,KAAK;SACF,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,0BAA0B,CAAC;SACvC,cAAc,CAAC,eAAe,EAAE,QAAQ,CAAC;SACzC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,GAAG,GAAG,0BAA0B,IAAI,CAAC,GAAG,EAAE,CAAC;QACjD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Command } from 'commander';
2
+ /**
3
+ * Skill Command — Fetch SKILL.md Domain Knowledge
4
+ *
5
+ * Returns the full SKILL.md content for a given skill module. These are the same
6
+ * skill documents that newapp.html's AssessAgent/BuilderAgent loads internally to
7
+ * enforce P0/P1/P2 constraints when generating CLI commands.
8
+ *
9
+ * AI agents should read the relevant skill document BEFORE constructing commands
10
+ * to ensure they follow all domain constraints.
11
+ *
12
+ * Available skills: form, scale, connect, report, expert, share
13
+ */
14
+ export declare function registerSkillCommand(parent: Command): void;
15
+ //# sourceMappingURL=skill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/commands/skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAe1D"}
@@ -0,0 +1,31 @@
1
+ import { execCommand } from '../exec.js';
2
+ import { output } from '../output.js';
3
+ /**
4
+ * Skill Command — Fetch SKILL.md Domain Knowledge
5
+ *
6
+ * Returns the full SKILL.md content for a given skill module. These are the same
7
+ * skill documents that newapp.html's AssessAgent/BuilderAgent loads internally to
8
+ * enforce P0/P1/P2 constraints when generating CLI commands.
9
+ *
10
+ * AI agents should read the relevant skill document BEFORE constructing commands
11
+ * to ensure they follow all domain constraints.
12
+ *
13
+ * Available skills: form, scale, connect, report, expert, share
14
+ */
15
+ export function registerSkillCommand(parent) {
16
+ parent
17
+ .command('skill')
18
+ .description('Get SKILL.md domain knowledge for a skill module (form/scale/connect/report/expert/share)')
19
+ .argument('<skillId>', 'Skill ID: form / scale / connect / report / expert / share')
20
+ .action(async (skillId) => {
21
+ const valid = ['form', 'scale', 'connect', 'report', 'expert', 'share'];
22
+ if (!valid.includes(skillId)) {
23
+ console.error(`❌ Invalid skill ID "${skillId}". Valid: ${valid.join(', ')}`);
24
+ process.exit(1);
25
+ }
26
+ const cmd = `assess skill ${skillId}`;
27
+ const result = await execCommand(cmd);
28
+ output(result);
29
+ });
30
+ }
31
+ //# sourceMappingURL=skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.js","sourceRoot":"","sources":["../../src/commands/skill.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,MAAM;SACH,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,2FAA2F,CAAC;SACxG,QAAQ,CAAC,WAAW,EAAE,4DAA4D,CAAC;SACnF,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAChC,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACxE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7B,OAAO,CAAC,KAAK,CAAC,uBAAuB,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC7E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,GAAG,GAAG,gBAAgB,OAAO,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Command } from 'commander';
2
+ /**
3
+ * Smart Pipeline Commands
4
+ *
5
+ * Wraps the server-side AssessAgent / BuilderAgent intelligent pipelines:
6
+ * - smart create: AssessAgent.plan() + execute() — natural language → full app
7
+ * - smart plan: AssessAgent.plan() only — preview plan without executing
8
+ * - smart modify: BuilderAgent Think → Plan → Execute → Reflect — modify existing app
9
+ *
10
+ * These are the RECOMMENDED entry points for AI agents (works with any MCP-compatible
11
+ * platform: Claude / Cursor / Codex CLI / Windsurf / etc., or direct CLI usage)
12
+ * because they embed the full SKILL.md domain knowledge, reference data injection,
13
+ * and multi-step orchestration that newapp.html uses internally.
14
+ */
15
+ export declare function registerSmartCommand(parent: Command): void;
16
+ //# sourceMappingURL=smart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart.d.ts","sourceRoot":"","sources":["../../src/commands/smart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAkE1D"}
@@ -0,0 +1,81 @@
1
+ import { execCommand } from '../exec.js';
2
+ import { output } from '../output.js';
3
+ /**
4
+ * Smart Pipeline Commands
5
+ *
6
+ * Wraps the server-side AssessAgent / BuilderAgent intelligent pipelines:
7
+ * - smart create: AssessAgent.plan() + execute() — natural language → full app
8
+ * - smart plan: AssessAgent.plan() only — preview plan without executing
9
+ * - smart modify: BuilderAgent Think → Plan → Execute → Reflect — modify existing app
10
+ *
11
+ * These are the RECOMMENDED entry points for AI agents (works with any MCP-compatible
12
+ * platform: Claude / Cursor / Codex CLI / Windsurf / etc., or direct CLI usage)
13
+ * because they embed the full SKILL.md domain knowledge, reference data injection,
14
+ * and multi-step orchestration that newapp.html uses internally.
15
+ */
16
+ export function registerSmartCommand(parent) {
17
+ const smart = parent.command('smart').description('Intelligent pipeline — natural language to live app (recommended for AI agents)');
18
+ // ── smart create ──────────────────────────────────────────────
19
+ smart
20
+ .command('create')
21
+ .description('Create a complete app from natural language description. The server runs AssessAgent: plan → execute → reflect. This is the fastest way to get a production-ready assessment app')
22
+ .requiredOption('--input <text>', 'Natural language description of the app you want to build (e.g. "a mental health screening questionnaire for college students")')
23
+ .option('--plan-type <type>', 'Plan type: assessment / consultation / survey / exam / quiz / learn (default: auto-detected by AI)')
24
+ .option('--style <style>', 'Visual style preference (e.g. "深色科技风" or "warm and friendly")')
25
+ .option('--question-count <count>', 'Question count range: 10-15 / 15-20 / 20-30')
26
+ .action(async (opts) => {
27
+ let cmd = `assess smart create --input "${opts.input}"`;
28
+ if (opts.planType)
29
+ cmd += ` --plan-type ${opts.planType}`;
30
+ if (opts.style)
31
+ cmd += ` --style "${opts.style}"`;
32
+ if (opts.questionCount)
33
+ cmd += ` --question-count ${opts.questionCount}`;
34
+ cmd += ' --json';
35
+ const result = await execCommand(cmd);
36
+ output(result);
37
+ });
38
+ // ── smart plan ───────────────────────────────────────────────
39
+ smart
40
+ .command('plan')
41
+ .description('Preview the execution plan WITHOUT executing it. Returns the task list for user review. Equivalent to newapp.html review stage')
42
+ .requiredOption('--input <text>', 'Natural language description of the app you want to build')
43
+ .option('--plan-type <type>', 'Plan type: assessment / consultation / survey / exam / quiz / learn (default: auto-detected by AI)')
44
+ .option('--style <style>', 'Visual style preference (e.g. "深色科技风" or "warm and friendly")')
45
+ .option('--question-count <count>', 'Question count range: 10-15 / 15-20 / 20-30')
46
+ .action(async (opts) => {
47
+ let cmd = `assess smart plan --input "${opts.input}"`;
48
+ if (opts.planType)
49
+ cmd += ` --plan-type ${opts.planType}`;
50
+ if (opts.style)
51
+ cmd += ` --style "${opts.style}"`;
52
+ if (opts.questionCount)
53
+ cmd += ` --question-count ${opts.questionCount}`;
54
+ cmd += ' --json';
55
+ const result = await execCommand(cmd);
56
+ output(result);
57
+ });
58
+ // ── smart modify ──────────────────────────────────────────────
59
+ smart
60
+ .command('modify')
61
+ .description('Modify an existing app using natural language. The server runs BuilderAgent: think → plan → execute → reflect. Automatically queries current state, generates precise modification commands, and validates results')
62
+ .requiredOption('--app <appId>', 'App ID to modify')
63
+ .requiredOption('--input <text>', 'Natural language description of the change (e.g. "add a depression subscale" or "change the cover page to a dark blue gradient")')
64
+ .action(async (opts) => {
65
+ const cmd = `assess smart modify --app ${opts.app} --input "${opts.input}" --json`;
66
+ const result = await execCommand(cmd);
67
+ output(result);
68
+ });
69
+ // ── smart confirm ───────────────────────────────────
70
+ smart
71
+ .command('confirm')
72
+ .description('Confirm and execute a medium/high risk plan previously returned by smart modify with planPreview=true. Pass the exact "plan" JSON unmodified. No web UI required')
73
+ .requiredOption('--app <appId>', 'App ID (same as used for smart modify)')
74
+ .requiredOption('--plan-json <json>', 'The exact "plan" field returned by smart modify (unmodified JSON)')
75
+ .action(async (opts) => {
76
+ const cmd = `assess smart confirm --app ${opts.app} --plan-json "${opts.planJson}" --json`;
77
+ const result = await execCommand(cmd);
78
+ output(result);
79
+ });
80
+ }
81
+ //# sourceMappingURL=smart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart.js","sourceRoot":"","sources":["../../src/commands/smart.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,iFAAiF,CAAC,CAAC;IAErI,iEAAiE;IAE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AACP,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Command } from 'commander';
2
+ /**
3
+ * Snapshot Command — Aggregated App State Query
4
+ *
5
+ * Fetches the current state of ALL 6 modules (form, scale, connect, report, expert, share)
6
+ * in a single command, returning a unified JSON snapshot. This is the equivalent of
7
+ * newapp.html's "reference data injection" step — it gives the AI agent full context
8
+ * about the current app state before generating modification commands.
9
+ *
10
+ * For each module, the query uses --md (markdown) format for token efficiency.
11
+ */
12
+ export declare function registerSnapshotCommand(parent: Command): void;
13
+ //# sourceMappingURL=snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/commands/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAqD7D"}
@@ -0,0 +1,61 @@
1
+ import { execCommand } from '../exec.js';
2
+ /**
3
+ * Snapshot Command — Aggregated App State Query
4
+ *
5
+ * Fetches the current state of ALL 6 modules (form, scale, connect, report, expert, share)
6
+ * in a single command, returning a unified JSON snapshot. This is the equivalent of
7
+ * newapp.html's "reference data injection" step — it gives the AI agent full context
8
+ * about the current app state before generating modification commands.
9
+ *
10
+ * For each module, the query uses --md (markdown) format for token efficiency.
11
+ */
12
+ export function registerSnapshotCommand(parent) {
13
+ parent
14
+ .command('snapshot')
15
+ .description('Get aggregated snapshot of ALL app modules (form + scale + connect + report + expert + share) — one call, full context')
16
+ .requiredOption('--app <appId>', 'App ID')
17
+ .option('--module <name>', 'Get only a specific module: form / scale / connect / report / expert / share (default: all)')
18
+ .action(async (opts) => {
19
+ const modules = opts.module
20
+ ? [opts.module]
21
+ : ['form', 'scale', 'connect', 'report', 'expert', 'share'];
22
+ const commands = {
23
+ form: `assess form query --app ${opts.app} --json`,
24
+ scale: `assess scale query --app ${opts.app} --md`,
25
+ connect: `assess connect query --app ${opts.app} --md`,
26
+ report: `assess report query --app ${opts.app} --md`,
27
+ expert: `assess expert query --app ${opts.app} --md`,
28
+ share: `assess share query --app ${opts.app} --json`,
29
+ };
30
+ // Execute requested modules in parallel
31
+ const entries = modules.filter((m) => commands[m]);
32
+ const results = await Promise.all(entries.map((m) => execCommand(commands[m]).then((r) => [m, r])));
33
+ const snapshot = { appId: opts.app };
34
+ const errors = [];
35
+ for (const [module, result] of results) {
36
+ if (result.code === 0) {
37
+ // Try to parse as JSON for structured modules, keep raw text for md modules
38
+ if (module === 'form' || module === 'share') {
39
+ try {
40
+ snapshot[module] = JSON.parse(result.data);
41
+ }
42
+ catch {
43
+ snapshot[module] = result.data || result.message;
44
+ }
45
+ }
46
+ else {
47
+ snapshot[module] = result.data || result.message;
48
+ }
49
+ }
50
+ else {
51
+ snapshot[module] = null;
52
+ errors.push(`${module}: ${result.message}`);
53
+ }
54
+ }
55
+ if (errors.length > 0) {
56
+ snapshot['_errors'] = errors;
57
+ }
58
+ console.log(JSON.stringify(snapshot, null, 2));
59
+ });
60
+ }
61
+ //# sourceMappingURL=snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/commands/snapshot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAe;IACrD,MAAM;SACH,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,wHAAwH,CAAC;SACrI,cAAc,CAAC,eAAe,EAAE,QAAQ,CAAC;SACzC,MAAM,CAAC,iBAAiB,EAAE,6FAA6F,CAAC;SACxH,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM;YACzB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;YACf,CAAC,CAAC,CAAC,MAAM,EAAE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C;oBAC7C,CAAC;oBAAC,MAAM,CAAC;wBACP,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC;oBACnD,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC;gBACnD,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;gBACxB,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,QAAQ,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;QAC/B,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACP,CAAC"}
package/dist/exec.d.ts CHANGED
@@ -5,9 +5,15 @@ export interface ExecResult {
5
5
  }
6
6
  /**
7
7
  * POST /api/v1/mcp/exec
8
- * Send CLI command to server for execution
8
+ * Send CLI command to server for execution.
9
+ *
10
+ * @param cmd Full CLI command string (e.g. "assess form add --app xxx ...")
11
+ * @param profileName Optional profile name override
12
+ * @param timeoutMs Request timeout in milliseconds.
13
+ * Default: 60_000 (60s) for most commands.
14
+ * Smart pipeline commands (assess smart create/modify) should use 300_000 (5min).
9
15
  */
10
- export declare function execCommand(cmd: string, profileName?: string): Promise<ExecResult>;
16
+ export declare function execCommand(cmd: string, profileName?: string, timeoutMs?: number): Promise<ExecResult>;
11
17
  /**
12
18
  * POST /api/v1/mcp/auth/login
13
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,GAAG,CAAC;CACX;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CA4CxF;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAsCpF;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAwCtE"}
1
+ {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,GAAG,CAAC;CACX;AAED;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,EACpB,SAAS,GAAE,MAAe,GACzB,OAAO,CAAC,UAAU,CAAC,CAgErB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAsCpF;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAwCtE"}