openyida 2026.7.9 → 2026.7.12-1

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 (52) hide show
  1. package/README.md +3 -5
  2. package/bin/yida.js +7 -1
  3. package/lib/core/agent-capabilities.js +84 -0
  4. package/lib/core/command-manifest.js +407 -1
  5. package/lib/core/locales/ar.js +1 -0
  6. package/lib/core/locales/de.js +1 -0
  7. package/lib/core/locales/en.js +1 -0
  8. package/lib/core/locales/es.js +1 -0
  9. package/lib/core/locales/fr.js +1 -0
  10. package/lib/core/locales/hi.js +1 -0
  11. package/lib/core/locales/ja.js +1 -0
  12. package/lib/core/locales/ko.js +1 -0
  13. package/lib/core/locales/pt.js +1 -0
  14. package/lib/core/locales/vi.js +1 -0
  15. package/lib/core/locales/zh-HK.js +1 -0
  16. package/lib/core/locales/zh.js +1 -0
  17. package/package.json +1 -1
  18. package/scripts/build-skills-package.js +82 -5
  19. package/scripts/eval/routing.js +31 -4
  20. package/scripts/eval/scenarios/routing-core.json +15 -0
  21. package/scripts/postinstall.js +40 -26
  22. package/scripts/validate-command-manifest.js +45 -1
  23. package/scripts/validate-skills.js +250 -0
  24. package/yida-skills/SKILL.md +83 -93
  25. package/yida-skills/references/development-rules.md +2 -2
  26. package/yida-skills/skills/sls-log-workbench/SKILL.md +72 -575
  27. package/yida-skills/skills/sls-log-workbench/references/workbench-reference.md +130 -0
  28. package/yida-skills/skills/yida-app/SKILL.md +56 -501
  29. package/yida-skills/skills/yida-app/references/app-build-contract.md +145 -0
  30. package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +11 -8
  31. package/yida-skills/skills/yida-canvas-custom-page/references/canvas-design-system.md +1 -1
  32. package/yida-skills/skills/yida-chart/SKILL.md +2 -2
  33. package/yida-skills/skills/yida-chart/references/echarts-bindding-guide.md +1 -1
  34. package/yida-skills/skills/yida-chart/references/echarts-code-template.md +1 -1
  35. package/yida-skills/skills/yida-chart/references/echarts-design-spec.md +1 -1
  36. package/yida-skills/skills/yida-create-app/SKILL.md +2 -2
  37. package/yida-skills/skills/yida-create-page/SKILL.md +3 -3
  38. package/yida-skills/skills/yida-create-process/SKILL.md +2 -2
  39. package/yida-skills/skills/yida-custom-page/SKILL.md +5 -5
  40. package/yida-skills/skills/yida-custom-page/references/coding-guide.md +1 -1
  41. package/yida-skills/skills/yida-custom-page/references/design-system.md +1 -1
  42. package/yida-skills/skills/yida-dashboard/SKILL.md +1 -1
  43. package/yida-skills/skills/yida-integration/SKILL.md +1 -1
  44. package/yida-skills/skills/yida-page-uiux/SKILL.md +1 -1
  45. package/yida-skills/skills/yida-page-uiux/workflow/step-0-nav-shape.md +2 -2
  46. package/yida-skills/skills/yida-ppt/SKILL.md +2 -2
  47. package/yida-skills/skills/yida-ppt-slider/SKILL.md +1 -1
  48. package/yida-skills/skills/yida-ppt-slider/references/echarts-race-example.md +1 -1
  49. package/yida-skills/skills/yida-process-rule/SKILL.md +1 -1
  50. package/yida-skills/skills/yida-publish-page/SKILL.md +12 -11
  51. package/yida-skills/skills/yida-table-form/references/examples.md +1 -1
  52. package/yida-skills/skills-index.json +430 -0
package/README.md CHANGED
@@ -55,13 +55,10 @@ If Codex is already installed, OpenYida also imports a local Codex plugin during
55
55
  Run this from the AI coding workspace where you want OpenYida to operate:
56
56
 
57
57
  ```bash
58
- openyida env
59
- openyida env --json
60
- openyida commands --json
58
+ openyida agent-capabilities --json
61
59
  ```
62
60
 
63
- OpenYida detects the active agent environment, workspace path, login state, and organization context. Use `--json` when an agent needs a stable machine-readable snapshot.
64
- `openyida commands --json` emits the command manifest used by the CLI help, so agents can inspect available routes without scraping terminal output.
61
+ OpenYida detects the active agent environment, workspace path, login state, organization context, command manifest, and side-effect hints in one machine-readable snapshot. `openyida commands --json` remains available when an agent only needs the command manifest.
65
62
 
66
63
  ### 3. Log In
67
64
 
@@ -461,6 +458,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
461
458
  | Command | Description |
462
459
  |---------|-------------|
463
460
  | `openyida commands [--json]` | Output machine-readable command manifest |
461
+ | `openyida agent-capabilities [--json]` | Output one-shot agent capability snapshot |
464
462
  | `openyida a2a <serve\|agent-card> [options]` | Start local read-only A2A adapter or print Agent Card |
465
463
  | `openyida bridge start [--token <pair-token>] [--port 6736] [--origin https://demo.aliwork.com] [--open\|--no-open]` | Start OpenYida local web bridge service |
466
464
  | `openyida copy [--force]` | Copy project working directory |
package/bin/yida.js CHANGED
@@ -55,7 +55,7 @@ function shouldRunUpdateCheck() {
55
55
  if (!command || command === '--help' || command === '-h' || command === '--version' || command === '-v') {
56
56
  return false;
57
57
  }
58
- if (command === 'commands' || command === 'mcp') {
58
+ if (command === 'commands' || command === 'agent-capabilities' || command === 'mcp') {
59
59
  return false;
60
60
  }
61
61
  if (args.includes('--json') || args.includes('--check-only')) {
@@ -515,6 +515,12 @@ async function main() {
515
515
  break;
516
516
  }
517
517
 
518
+ case 'agent-capabilities': {
519
+ const { run } = require('../lib/core/agent-capabilities');
520
+ await run(args);
521
+ break;
522
+ }
523
+
518
524
  case 'mcp': {
519
525
  const { runStdioServer } = require('../lib/mcp/server');
520
526
  runStdioServer();
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+ const { version } = require('../../package.json');
5
+ const { t } = require('./i18n');
6
+ const { buildCommandManifest } = require('./command-manifest');
7
+ const { buildEnvironmentSnapshot } = require('./env');
8
+ const { checkLoginOnly } = require('../auth/login');
9
+
10
+ function redactLogin(login) {
11
+ const redacted = { ...login };
12
+ delete redacted.csrf_token;
13
+ delete redacted.cookies;
14
+ return redacted;
15
+ }
16
+
17
+ function buildAgentCapabilities() {
18
+ const envSnapshot = buildEnvironmentSnapshot();
19
+ const loginStatus = redactLogin(checkLoginOnly({ includeSecrets: false }));
20
+ const manifest = buildCommandManifest({ t, version });
21
+ const projectRoot = envSnapshot.active.projectRoot;
22
+
23
+ return {
24
+ schema_version: 1,
25
+ name: 'openyida-agent-capabilities',
26
+ openyida: {
27
+ version,
28
+ aliases: manifest.aliases,
29
+ command_prefix: manifest.command_prefix,
30
+ },
31
+ system: envSnapshot.system,
32
+ active: envSnapshot.active,
33
+ login: loginStatus,
34
+ recommended: {
35
+ preflight_command: 'openyida agent-capabilities --json',
36
+ mutation_guard: 'Run mutating commands only when login.status is ok or after a successful openyida login.',
37
+ workdir: projectRoot,
38
+ cache_dir: path.join(projectRoot, '.cache'),
39
+ openyida_task_cache_dir: path.join(projectRoot, '.cache', 'openyida'),
40
+ default_full_app_workflow: manifest.summary.core_workflows.full_app_fast_build,
41
+ },
42
+ skills: {
43
+ index_file: 'skills-index.json',
44
+ entry: 'openyida',
45
+ note: 'Use host use_skill/search_skills when available; otherwise load only the current-stage SKILL.md selected by the root routing table.',
46
+ },
47
+ commands: {
48
+ count: manifest.summary.command_count,
49
+ group_count: manifest.summary.group_count,
50
+ side_effect_counts: manifest.summary.side_effect_counts,
51
+ read_only_command_ids: manifest.summary.read_only_command_ids,
52
+ mutating_command_ids: manifest.summary.mutating_command_ids,
53
+ core_workflows: manifest.summary.core_workflows,
54
+ },
55
+ sideEffects: {
56
+ read_only_preflight: [
57
+ 'openyida agent-capabilities --json',
58
+ 'openyida env --json',
59
+ 'openyida login --check-only --json',
60
+ 'openyida commands --json',
61
+ ],
62
+ retry_policy: 'Do not repeat the same failed command without changing login state, organization, parameters, files, or field IDs.',
63
+ completion_contracts: {
64
+ full_app: 'Default fast_build is complete after creating the app, core forms, primary page, publishing it, and returning an access URL.',
65
+ },
66
+ },
67
+ command_manifest: {
68
+ schema_version: manifest.schema_version,
69
+ groups: manifest.groups,
70
+ side_effect_schema: manifest.side_effect_schema,
71
+ summary: manifest.summary,
72
+ commands: manifest.commands,
73
+ },
74
+ };
75
+ }
76
+
77
+ async function run() {
78
+ console.log(JSON.stringify(buildAgentCapabilities(), null, 2));
79
+ }
80
+
81
+ module.exports = {
82
+ buildAgentCapabilities,
83
+ run,
84
+ };
@@ -1,6 +1,335 @@
1
1
  'use strict';
2
2
 
3
+ const SIDE_EFFECT_BASES = Object.freeze({
4
+ local_read: Object.freeze({
5
+ kind: 'local_read',
6
+ mutates_yida: false,
7
+ mutates_local: false,
8
+ }),
9
+ local_write: Object.freeze({
10
+ kind: 'local_write',
11
+ mutates_yida: false,
12
+ mutates_local: true,
13
+ }),
14
+ remote_read: Object.freeze({
15
+ kind: 'remote_read',
16
+ mutates_yida: false,
17
+ mutates_local: false,
18
+ }),
19
+ remote_write: Object.freeze({
20
+ kind: 'remote_write',
21
+ mutates_yida: true,
22
+ mutates_local: false,
23
+ }),
24
+ mixed: Object.freeze({
25
+ kind: 'mixed',
26
+ mutates_yida: true,
27
+ mutates_local: true,
28
+ action_dependent: true,
29
+ note: 'Action-dependent command: inspect read_actions and mutating_actions for the selected subcommand/options before deciding whether it is safe to run.',
30
+ }),
31
+ });
32
+
33
+ const SIDE_EFFECT_SCHEMA = Object.freeze({
34
+ version: 1,
35
+ fields: {
36
+ kind: 'One of local_read, local_write, remote_read, remote_write, mixed.',
37
+ mutates_yida: 'Whether at least one action for this command can mutate remote Yida resources.',
38
+ mutates_local: 'Whether at least one action for this command can mutate local files, config, cache, services, or auth state.',
39
+ read_actions: 'For mixed commands, subcommands/options that are read-only.',
40
+ mutating_actions: 'For mixed commands, subcommands/options that mutate local or remote state.',
41
+ action_dependent: 'True for mixed commands; callers must inspect the selected action instead of trusting kind alone.',
42
+ },
43
+ kinds: {
44
+ local_read: 'Reads local state or validates local files without mutation.',
45
+ local_write: 'Writes local files, config, cache, auth state, or starts local-only setup.',
46
+ remote_read: 'Reads remote Yida/DingTalk state without mutation.',
47
+ remote_write: 'Mutates remote Yida/DingTalk resources.',
48
+ mixed: 'Action-dependent command. Inspect mutates_yida, mutates_local, read_actions, and mutating_actions for the selected subcommand/options; unknown actions should be treated as mutating.',
49
+ },
50
+ });
51
+
52
+ function sideEffect(kind, overrides = {}) {
53
+ if (!SIDE_EFFECT_BASES[kind]) {
54
+ throw new Error('Unknown side effect kind: ' + kind);
55
+ }
56
+ const effect = {
57
+ ...SIDE_EFFECT_BASES[kind],
58
+ ...overrides,
59
+ };
60
+ if (effect.kind === 'mixed') {
61
+ if (!Array.isArray(effect.read_actions)) {
62
+ effect.read_actions = [];
63
+ }
64
+ if (!Array.isArray(effect.mutating_actions)) {
65
+ effect.mutating_actions = [];
66
+ }
67
+ }
68
+ return effect;
69
+ }
70
+
71
+ function sideEffectEntries(ids, effect) {
72
+ return ids.map(id => [id, effect]);
73
+ }
74
+
75
+ function cloneSideEffect(effect) {
76
+ const cloned = { ...effect };
77
+ if (Array.isArray(effect.read_actions)) {
78
+ cloned.read_actions = [...effect.read_actions];
79
+ }
80
+ if (Array.isArray(effect.mutating_actions)) {
81
+ cloned.mutating_actions = [...effect.mutating_actions];
82
+ }
83
+ return cloned;
84
+ }
85
+
86
+ function cloneSideEffectSchema() {
87
+ return JSON.parse(JSON.stringify(SIDE_EFFECT_SCHEMA));
88
+ }
89
+
90
+ function listCommandSideEffectIds() {
91
+ return [...COMMAND_SIDE_EFFECTS.keys()].sort();
92
+ }
93
+
94
+ const COMMAND_SIDE_EFFECTS = new Map([
95
+ ...sideEffectEntries([
96
+ 'agent-capabilities',
97
+ 'check-page',
98
+ 'commands',
99
+ 'dingtalk-link',
100
+ 'env',
101
+ 'formula.evaluate',
102
+ 'integration.diagnose',
103
+ ], sideEffect('local_read')),
104
+
105
+ ...sideEffectEntries([
106
+ 'build-page',
107
+ 'cdn-config',
108
+ 'compile',
109
+ 'connector.gen-template',
110
+ 'connector.parse-api',
111
+ 'copy',
112
+ 'export-conversation',
113
+ 'flash-to-prd',
114
+ 'generate-page',
115
+ 'login',
116
+ 'logout',
117
+ 'sample',
118
+ 'update',
119
+ ], sideEffect('local_write')),
120
+
121
+ ...sideEffectEntries([
122
+ 'app-list',
123
+ 'basic-info',
124
+ 'connector.detail',
125
+ 'connector.list',
126
+ 'connector.list-actions',
127
+ 'connector.list-connections',
128
+ 'dws.contact-user-search',
129
+ 'get-page-config',
130
+ 'get-permission',
131
+ 'get-schema',
132
+ 'integration.check',
133
+ 'integration.list',
134
+ 'list-forms',
135
+ 'process.preview',
136
+ 'verify-short-url',
137
+ ], sideEffect('remote_read')),
138
+
139
+ ...sideEffectEntries([
140
+ 'add-validation',
141
+ 'append-chart',
142
+ 'cdn-refresh',
143
+ 'cdn-upload',
144
+ 'configure-process',
145
+ 'connector.add-action',
146
+ 'connector.create',
147
+ 'connector.create-connection',
148
+ 'connector.delete',
149
+ 'connector.delete-action',
150
+ 'connector.smart-create',
151
+ 'connector.test',
152
+ 'create-app',
153
+ 'create-form.add-option',
154
+ 'create-form.bind-datasource',
155
+ 'create-form.create',
156
+ 'create-form.patch',
157
+ 'create-form.rule',
158
+ 'create-form.update',
159
+ 'create-form.validation',
160
+ 'create-page',
161
+ 'create-process',
162
+ 'create-report',
163
+ 'externalize-form',
164
+ 'import',
165
+ 'integration.create',
166
+ 'integration.disable',
167
+ 'integration.enable',
168
+ 'publish',
169
+ 'save-permission',
170
+ 'save-share-config',
171
+ 'update-app',
172
+ 'update-form-config',
173
+ ], sideEffect('remote_write')),
174
+
175
+ ['ai', sideEffect('mixed', {
176
+ mutates_yida: true,
177
+ mutates_local: false,
178
+ read_actions: ['text', 'image --image-url'],
179
+ mutating_actions: ['image --file'],
180
+ })],
181
+ ['ai-form-setting', sideEffect('mixed', {
182
+ mutates_yida: true,
183
+ mutates_local: false,
184
+ read_actions: ['get', 'fields', 'models'],
185
+ mutating_actions: ['enable', 'disable', 'save'],
186
+ })],
187
+ ['agent-center', sideEffect('mixed', {
188
+ mutates_yida: true,
189
+ mutates_local: false,
190
+ read_actions: ['list', 'range', 'search-user'],
191
+ mutating_actions: ['create', 'update', 'cancel'],
192
+ })],
193
+ ['a2a', sideEffect('mixed', {
194
+ mutates_yida: false,
195
+ mutates_local: true,
196
+ read_actions: ['agent-card'],
197
+ mutating_actions: ['serve'],
198
+ })],
199
+ ['aggregate-table', sideEffect('mixed', {
200
+ mutates_yida: true,
201
+ mutates_local: false,
202
+ read_actions: ['list', 'inspect', 'preview', 'status'],
203
+ mutating_actions: ['create-empty', 'save', 'publish'],
204
+ })],
205
+ ['app-permission', sideEffect('mixed', {
206
+ mutates_yida: true,
207
+ mutates_local: false,
208
+ read_actions: ['get', 'search-user'],
209
+ mutating_actions: ['set', 'add', 'remove'],
210
+ })],
211
+ ['auth', sideEffect('mixed', {
212
+ mutates_yida: false,
213
+ mutates_local: true,
214
+ read_actions: ['status'],
215
+ mutating_actions: ['login', 'refresh', 'logout'],
216
+ })],
217
+ ['batch.file', sideEffect('mixed', {
218
+ mutates_yida: true,
219
+ mutates_local: true,
220
+ read_actions: [],
221
+ mutating_actions: ['depends on commands in file'],
222
+ })],
223
+ ['batch.inline', sideEffect('mixed', {
224
+ mutates_yida: true,
225
+ mutates_local: true,
226
+ read_actions: [],
227
+ mutating_actions: ['depends on inline commands'],
228
+ })],
229
+ ['bridge', sideEffect('mixed', {
230
+ mutates_yida: false,
231
+ mutates_local: true,
232
+ read_actions: [],
233
+ mutating_actions: ['start'],
234
+ })],
235
+ ['corp-efficiency', sideEffect('mixed', {
236
+ mutates_yida: true,
237
+ mutates_local: false,
238
+ read_actions: ['overview', 'details', 'detail', 'groups'],
239
+ mutating_actions: ['notify'],
240
+ })],
241
+ ['corp-manager', sideEffect('mixed', {
242
+ mutates_yida: true,
243
+ mutates_local: false,
244
+ read_actions: ['search-user', 'list'],
245
+ mutating_actions: ['add', 'remove', 'address-book'],
246
+ })],
247
+ ['data', sideEffect('mixed', {
248
+ mutates_yida: true,
249
+ mutates_local: false,
250
+ read_actions: ['query', 'get'],
251
+ mutating_actions: ['create', 'update', 'delete'],
252
+ })],
253
+ ['db-seq-fix', sideEffect('mixed', {
254
+ mutates_yida: true,
255
+ mutates_local: false,
256
+ read_actions: ['default', '--dry-run'],
257
+ mutating_actions: ['--fix'],
258
+ })],
259
+ ['doctor', sideEffect('mixed', {
260
+ mutates_yida: false,
261
+ mutates_local: true,
262
+ read_actions: ['default'],
263
+ mutating_actions: ['--fix'],
264
+ })],
265
+ ['dws', sideEffect('mixed', {
266
+ mutates_yida: false,
267
+ mutates_local: true,
268
+ read_actions: ['help', 'contact user search', 'calendar event list', 'approval instance list'],
269
+ mutating_actions: ['install', 'setup', 'todo task create', 'chat robot send', 'depends on dws command'],
270
+ })],
271
+ ['env-management', sideEffect('mixed', {
272
+ mutates_yida: false,
273
+ mutates_local: true,
274
+ read_actions: ['list', 'show'],
275
+ mutating_actions: ['setup', 'switch', 'add', 'remove'],
276
+ })],
277
+ ['er', sideEffect('mixed', {
278
+ mutates_yida: false,
279
+ mutates_local: true,
280
+ read_actions: ['default', '--format json'],
281
+ mutating_actions: ['--output'],
282
+ })],
283
+ ['export', sideEffect('mixed', {
284
+ mutates_yida: false,
285
+ mutates_local: true,
286
+ read_actions: ['read application schema'],
287
+ mutating_actions: ['write export file'],
288
+ })],
289
+ ['feedback', sideEffect('mixed', {
290
+ mutates_yida: true,
291
+ mutates_local: true,
292
+ read_actions: ['url', 'status'],
293
+ mutating_actions: ['setup', 'dismiss'],
294
+ })],
295
+ ['i18n', sideEffect('mixed', {
296
+ mutates_yida: true,
297
+ mutates_local: false,
298
+ read_actions: ['overview', 'config', 'languages', 'list'],
299
+ mutating_actions: ['upsert', 'delete', 'translate', 'translate-all', 'upgrade'],
300
+ })],
301
+ ['mcp', sideEffect('mixed', {
302
+ mutates_yida: false,
303
+ mutates_local: true,
304
+ read_actions: [],
305
+ mutating_actions: ['start stdio server'],
306
+ })],
307
+ ['nav-group', sideEffect('mixed', {
308
+ mutates_yida: true,
309
+ mutates_local: false,
310
+ read_actions: ['list'],
311
+ mutating_actions: ['create', 'rename', 'delete', 'move', 'order', 'hide', 'show'],
312
+ })],
313
+ ['org', sideEffect('mixed', {
314
+ mutates_yida: false,
315
+ mutates_local: true,
316
+ read_actions: ['list'],
317
+ mutating_actions: ['switch'],
318
+ })],
319
+ ['task-center', sideEffect('mixed', {
320
+ mutates_yida: true,
321
+ mutates_local: false,
322
+ read_actions: ['todo', 'created', 'processed', 'cc'],
323
+ mutating_actions: ['submit'],
324
+ })],
325
+ ]);
326
+
3
327
  function command(id, path, usage, descriptionKey, options = {}) {
328
+ const commandSideEffect = COMMAND_SIDE_EFFECTS.get(id);
329
+ if (!commandSideEffect) {
330
+ throw new Error('Missing side effect metadata for command: ' + id);
331
+ }
332
+
4
333
  return {
5
334
  id,
6
335
  path,
@@ -13,6 +342,7 @@ function command(id, path, usage, descriptionKey, options = {}) {
13
342
  aliases: options.aliases || [],
14
343
  examples: options.examples || [],
15
344
  hidden: options.hidden === true,
345
+ sideEffect: cloneSideEffect(commandSideEffect),
16
346
  };
17
347
  }
18
348
 
@@ -192,6 +522,10 @@ const COMMAND_GROUPS = [
192
522
  requiresLogin: false,
193
523
  output: 'json',
194
524
  }),
525
+ command('agent-capabilities', ['agent-capabilities'], 'agent-capabilities [--json]', 'help.cmd_agent_capabilities', {
526
+ requiresLogin: false,
527
+ output: 'json',
528
+ }),
195
529
  command('mcp', ['mcp'], 'mcp', 'help.cmd_commands', {
196
530
  requiresLogin: false,
197
531
  output: 'json',
@@ -260,12 +594,81 @@ function localizeCommand(entry, translate) {
260
594
  aliases: entry.aliases,
261
595
  examples: entry.examples,
262
596
  hidden: entry.hidden,
597
+ side_effect: cloneSideEffect(entry.sideEffect),
598
+ };
599
+ }
600
+
601
+ function summarizeLocalizedCommands(commands) {
602
+ const sideEffectCounts = {};
603
+ const idsBySideEffect = {};
604
+ const readOnlyCommandIds = [];
605
+ const mutatingCommandIds = [];
606
+
607
+ for (const entry of commands) {
608
+ const effect = entry.side_effect || {};
609
+ const kind = effect.kind || 'unknown';
610
+ sideEffectCounts[kind] = (sideEffectCounts[kind] || 0) + 1;
611
+ if (!idsBySideEffect[kind]) {
612
+ idsBySideEffect[kind] = [];
613
+ }
614
+ idsBySideEffect[kind].push(entry.id);
615
+
616
+ if (effect.mutates_yida === false && effect.mutates_local === false && kind !== 'mixed') {
617
+ readOnlyCommandIds.push(entry.id);
618
+ }
619
+ if (effect.mutates_yida === true || effect.mutates_local === true || kind === 'mixed') {
620
+ mutatingCommandIds.push(entry.id);
621
+ }
622
+ }
623
+
624
+ return {
625
+ command_count: commands.length,
626
+ group_count: COMMAND_GROUPS.length,
627
+ side_effect_counts: sideEffectCounts,
628
+ ids_by_side_effect: idsBySideEffect,
629
+ read_only_command_ids: readOnlyCommandIds,
630
+ mutating_command_ids: mutatingCommandIds,
631
+ core_workflows: {
632
+ full_app_fast_build: {
633
+ mode: 'fast_build',
634
+ trigger_phrases: ['默认方案', '不要追问', '直接创建', '尽快搭建'],
635
+ default_page_skill_id: 'yida-custom-page',
636
+ optional_canvas_skill_id: 'yida-canvas-custom-page',
637
+ canvas_usage: 'Use Code Canvas only when the user explicitly asks for it, the target page is already YidaCodeCanvas, or the current organization/page is confirmed to support Canvas.',
638
+ required_command_ids: [
639
+ 'agent-capabilities',
640
+ 'create-app',
641
+ 'create-form.create',
642
+ 'create-page',
643
+ 'publish',
644
+ ],
645
+ optional_read_command_ids: ['get-schema', 'list-forms'],
646
+ optional_after_done_command_ids: [
647
+ 'nav-group',
648
+ 'data',
649
+ 'save-share-config',
650
+ 'get-page-config',
651
+ 'create-report',
652
+ 'append-chart',
653
+ ],
654
+ do_not_default_skill_ids: [
655
+ 'yida-page-uiux',
656
+ 'yida-canvas-custom-page',
657
+ 'yida-data-source-connectors',
658
+ 'yida-data-management',
659
+ 'yida-nav-group',
660
+ 'yida-dashboard',
661
+ ],
662
+ completion_contract: 'Create app, core forms, primary page, publish it, and return an access URL.',
663
+ },
664
+ },
263
665
  };
264
666
  }
265
667
 
266
668
  function buildCommandManifest(options = {}) {
267
669
  const translate = typeof options.t === 'function' ? options.t : key => key;
268
670
  const commands = flattenCommandManifest();
671
+ const localizedCommands = commands.map(entry => localizeCommand(entry, translate));
269
672
 
270
673
  return {
271
674
  schema_version: 1,
@@ -279,7 +682,9 @@ function buildCommandManifest(options = {}) {
279
682
  title_key: group.titleKey,
280
683
  commands: group.commands.map(entry => entry.id),
281
684
  })),
282
- commands: commands.map(entry => localizeCommand(entry, translate)),
685
+ side_effect_schema: cloneSideEffectSchema(),
686
+ summary: summarizeLocalizedCommands(localizedCommands),
687
+ commands: localizedCommands,
283
688
  };
284
689
  }
285
690
 
@@ -287,4 +692,5 @@ module.exports = {
287
692
  COMMAND_GROUPS,
288
693
  buildCommandManifest,
289
694
  flattenCommandManifest,
695
+ listCommandSideEffectIds,
290
696
  };
@@ -85,6 +85,7 @@ module.exports = {
85
85
  cmd_dingtalk_link: 'إنشاء روابط DingTalk AppLink / dingtalk:// القديمة',
86
86
  group_utility: 'الأدوات',
87
87
  cmd_commands: 'Output machine-readable command manifest',
88
+ cmd_agent_capabilities: 'Output one-shot agent capability snapshot',
88
89
  cmd_a2a: 'Start local read-only A2A adapter or print Agent Card',
89
90
  cmd_bridge: 'Start OpenYida local web bridge service',
90
91
  cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
@@ -85,6 +85,7 @@ module.exports = {
85
85
  cmd_dingtalk_link: 'DingTalk AppLink / alte dingtalk:// Seitenlinks erzeugen',
86
86
  group_utility: 'Werkzeuge',
87
87
  cmd_commands: 'Maschinenlesbares Command Manifest ausgeben',
88
+ cmd_agent_capabilities: 'Einmaligen Agent Capability Snapshot ausgeben',
88
89
  cmd_a2a: 'Lokalen schreibgeschützten A2A-Adapter starten oder Agent Card ausgeben',
89
90
  cmd_bridge: 'Lokalen OpenYida Web-Bridge-Dienst starten',
90
91
  cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
@@ -89,6 +89,7 @@ module.exports = {
89
89
  cmd_dingtalk_link: 'Generate DingTalk AppLink / legacy dingtalk:// page links',
90
90
  group_utility: 'Utility',
91
91
  cmd_commands: 'Output machine-readable command manifest',
92
+ cmd_agent_capabilities: 'Output one-shot agent capability snapshot',
92
93
  cmd_a2a: 'Start local read-only A2A adapter or print Agent Card',
93
94
  cmd_bridge: 'Start OpenYida local web bridge service',
94
95
  cmd_copy: 'Copy project working directory',
@@ -85,6 +85,7 @@ module.exports = {
85
85
  cmd_dingtalk_link: 'Generar enlaces DingTalk AppLink / dingtalk:// heredados',
86
86
  group_utility: 'Utilidades',
87
87
  cmd_commands: 'Emitir manifiesto de comandos legible por máquina',
88
+ cmd_agent_capabilities: 'Emitir snapshot único de capacidades para agentes',
88
89
  cmd_a2a: 'Iniciar adaptador A2A local de solo lectura o imprimir Agent Card',
89
90
  cmd_bridge: 'Iniciar servicio local OpenYida web bridge',
90
91
  cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
@@ -85,6 +85,7 @@ module.exports = {
85
85
  cmd_dingtalk_link: 'Générer des liens DingTalk AppLink / dingtalk:// historiques',
86
86
  group_utility: 'Utilitaires',
87
87
  cmd_commands: 'Afficher le manifeste des commandes lisible par machine',
88
+ cmd_agent_capabilities: 'Afficher un instantané unique des capacités agent',
88
89
  cmd_a2a: 'Démarrer l’adaptateur A2A local en lecture seule ou afficher l’Agent Card',
89
90
  cmd_bridge: 'Démarrer le service web bridge local OpenYida',
90
91
  cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
@@ -85,6 +85,7 @@ module.exports = {
85
85
  cmd_dingtalk_link: 'DingTalk AppLink / legacy dingtalk:// पेज लिंक बनाएं',
86
86
  group_utility: 'उपकरण',
87
87
  cmd_commands: 'Output machine-readable command manifest',
88
+ cmd_agent_capabilities: 'Output one-shot agent capability snapshot',
88
89
  cmd_a2a: 'Start local read-only A2A adapter or print Agent Card',
89
90
  cmd_bridge: 'Start OpenYida local web bridge service',
90
91
  cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
@@ -87,6 +87,7 @@ module.exports = {
87
87
  cmd_dingtalk_link: 'DingTalk AppLink / 旧 dingtalk:// ページリンクを生成',
88
88
  group_utility: 'ユーティリティ',
89
89
  cmd_commands: '機械可読コマンド manifest を出力',
90
+ cmd_agent_capabilities: 'Agent 向けの一括 capability snapshot を出力',
90
91
  cmd_a2a: 'ローカル読み取り専用 A2A Adapter を起動、または Agent Card を出力',
91
92
  cmd_bridge: 'OpenYida ローカル Web ブリッジサービスを起動',
92
93
  cmd_db_seq_fix: 'PostgreSQL Sequence ドリフトを検出・修復',
@@ -85,6 +85,7 @@ module.exports = {
85
85
  cmd_dingtalk_link: 'DingTalk AppLink / 기존 dingtalk:// 페이지 링크 생성',
86
86
  group_utility: '유틸리티',
87
87
  cmd_commands: 'Output machine-readable command manifest',
88
+ cmd_agent_capabilities: 'Output one-shot agent capability snapshot',
88
89
  cmd_a2a: 'Start local read-only A2A adapter or print Agent Card',
89
90
  cmd_bridge: 'Start OpenYida local web bridge service',
90
91
  cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
@@ -85,6 +85,7 @@ module.exports = {
85
85
  cmd_dingtalk_link: 'Gerar links DingTalk AppLink / dingtalk:// legados',
86
86
  group_utility: 'Utilitários',
87
87
  cmd_commands: 'Emitir manifesto de comandos legível por máquina',
88
+ cmd_agent_capabilities: 'Emitir snapshot único de capacidades para agentes',
88
89
  cmd_a2a: 'Iniciar adaptador A2A local somente leitura ou imprimir Agent Card',
89
90
  cmd_bridge: 'Iniciar serviço local OpenYida web bridge',
90
91
  cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
@@ -85,6 +85,7 @@ module.exports = {
85
85
  cmd_dingtalk_link: 'Tạo liên kết DingTalk AppLink / dingtalk:// cũ',
86
86
  group_utility: 'Tiện ích',
87
87
  cmd_commands: 'Output machine-readable command manifest',
88
+ cmd_agent_capabilities: 'Output one-shot agent capability snapshot',
88
89
  cmd_a2a: 'Start local read-only A2A adapter or print Agent Card',
89
90
  cmd_bridge: 'Start OpenYida local web bridge service',
90
91
  cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
@@ -87,6 +87,7 @@ module.exports = {
87
87
  cmd_dingtalk_link: '生成釘釘 AppLink / 相容 dingtalk:// 跳轉連結',
88
88
  group_utility: '工具',
89
89
  cmd_commands: '輸出機器可讀命令清單',
90
+ cmd_agent_capabilities: '輸出 Agent 一次性能力快照',
90
91
  cmd_a2a: '啟動本機唯讀 A2A Adapter 或輸出 Agent Card',
91
92
  cmd_bridge: '啟動 OpenYida 本機網頁橋接服務',
92
93
  cmd_db_seq_fix: 'PostgreSQL Sequence 漂移偵測與修復',