openyida 2026.7.12 → 2026.7.14-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.
- package/README.md +6 -8
- package/lib/app/get-schema.js +109 -9
- package/lib/core/agent-capabilities.js +105 -5
- package/lib/core/command-manifest.js +476 -28
- package/package.json +1 -1
- package/scripts/eval/routing.js +31 -4
- package/scripts/eval/scenarios/routing-core.json +15 -0
- package/scripts/postinstall.js +18 -4
- package/scripts/validate-command-manifest.js +163 -0
- package/yida-skills/SKILL.md +25 -16
- package/yida-skills/skills/sls-log-workbench/SKILL.md +1 -1
- package/yida-skills/skills/yida-app/SKILL.md +16 -7
- package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +11 -8
- package/yida-skills/skills/yida-create-app/SKILL.md +2 -2
- package/yida-skills/skills/yida-create-page/SKILL.md +3 -3
- package/yida-skills/skills/yida-custom-page/SKILL.md +67 -20
- package/yida-skills/skills/yida-get-schema/SKILL.md +32 -8
- package/yida-skills/skills/yida-publish-page/SKILL.md +6 -0
- package/yida-skills/skills-index.json +6 -6
package/README.md
CHANGED
|
@@ -55,10 +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 agent-capabilities --json
|
|
58
|
+
openyida agent-capabilities --summary-json
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
OpenYida
|
|
61
|
+
OpenYida returns a compact machine-readable summary with the version, login state, workspace/cache paths, and command manifest digest. `openyida agent-capabilities --json` is the full diagnostic snapshot, where compact `workdir` maps to `active.projectRoot` and `workdir_exists` maps to `active.projectRootExists`. `openyida commands --json` remains available when an agent only needs the command manifest.
|
|
62
62
|
|
|
63
63
|
### 3. Log In
|
|
64
64
|
|
|
@@ -343,8 +343,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
343
343
|
| `openyida logout` | Logout / switch account |
|
|
344
344
|
| `openyida auth <status\|login\|refresh\|logout>` | Login state management |
|
|
345
345
|
| `openyida org <list\|switch>` | Organization management (list / switch) |
|
|
346
|
-
| `openyida env [--json]` | Detect AI tool environment & login state |
|
|
347
|
-
| `openyida env <setup\|list\|show\|switch\|add\|remove>` | Manage public/private Yida environment profiles |
|
|
346
|
+
| `openyida env [--json\|setup\|list\|show\|switch\|add\|remove] [options]` | Detect AI tool environment & login state |
|
|
348
347
|
|
|
349
348
|
### App Management
|
|
350
349
|
|
|
@@ -374,7 +373,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
374
373
|
| `openyida create-form add-option <appType> <formUuid> <fieldLabel> <option1> [option2] ...` | Update a form page |
|
|
375
374
|
| `openyida list-forms <appType> [--keyword <text>]` | List forms/pages in an app |
|
|
376
375
|
| `openyida aggregate-table <list\|create-empty\|inspect\|preview\|save\|publish\|status> <appType> ...` | Manage aggregate tables (virtualView) |
|
|
377
|
-
| `openyida get-schema <appType> <formUuid\|--all
|
|
376
|
+
| `openyida get-schema <appType> <formUuid\|--all> [--summary-json\|--field-map-json]` | Get one form Schema or all form Schemas |
|
|
378
377
|
| `openyida er <appType> [--format mermaid\|json] [--output file] [--include-system] [--include-pages]` | Export app entity relationship diagram |
|
|
379
378
|
| `openyida create-page <appType> "<name>" [--mode dashboard] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a custom display page |
|
|
380
379
|
| `openyida generate-page <template>` | Generate page from curated template |
|
|
@@ -458,7 +457,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
458
457
|
| Command | Description |
|
|
459
458
|
|---------|-------------|
|
|
460
459
|
| `openyida commands [--json]` | Output machine-readable command manifest |
|
|
461
|
-
| `openyida agent-capabilities [--json]` | Output one-shot agent capability snapshot |
|
|
460
|
+
| `openyida agent-capabilities [--json] [--summary-json\|--compact]` | Output one-shot agent capability snapshot |
|
|
462
461
|
| `openyida a2a <serve\|agent-card> [options]` | Start local read-only A2A adapter or print Agent Card |
|
|
463
462
|
| `openyida bridge start [--token <pair-token>] [--port 6736] [--origin https://demo.aliwork.com] [--open\|--no-open]` | Start OpenYida local web bridge service |
|
|
464
463
|
| `openyida copy [--force]` | Copy project working directory |
|
|
@@ -469,8 +468,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
469
468
|
| `openyida update` | Check and update to latest version |
|
|
470
469
|
| `openyida export-conversation [options]` | Export AI conversation records |
|
|
471
470
|
| `openyida feedback <setup\|url\|dismiss\|status> [options]` | Configure experience feedback form and local reminder state |
|
|
472
|
-
| `openyida batch <file
|
|
473
|
-
| `openyida batch --commands "cmd1 ; cmd2" [--stop-on-error] [--json]` | Run OpenYida commands in batch |
|
|
471
|
+
| `openyida batch <file>\|--commands "cmd1 ; cmd2" [--stop-on-error] [--json]` | Run OpenYida commands in batch |
|
|
474
472
|
| `openyida flash-to-prd --file <path> --name "<project>"` | Convert flash notes or meeting notes to a PRD prompt |
|
|
475
473
|
| `openyida ai <text\|image> [options]` | Call Yida AI text and image recognition APIs |
|
|
476
474
|
| `openyida cdn-config [options]` | Configure CDN / OSS upload |
|
package/lib/app/get-schema.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* get-schema.js - 宜搭表单 Schema 获取命令
|
|
3
3
|
*
|
|
4
4
|
* 用法:
|
|
5
|
-
* openyida get-schema <appType> <formUuid>
|
|
6
|
-
* openyida get-schema <appType> --all [--output-dir <dir>] [--concurrency N] [--retries N]
|
|
5
|
+
* openyida get-schema <appType> <formUuid> [--summary-json|--field-map-json]
|
|
6
|
+
* openyida get-schema <appType> --all [--summary-json] [--output-dir <dir>] [--concurrency N] [--retries N]
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -31,7 +31,7 @@ const FIELD_TYPES_NEEDING_VALUE_SUFFIX = new Set([
|
|
|
31
31
|
/**
|
|
32
32
|
* 从 Schema 中提取字段摘要,列出每个字段的真实 fieldId、组件别名和报表用 reportFieldCode。
|
|
33
33
|
* @param {object} schemaResult - getFormSchema API 返回结果
|
|
34
|
-
* @returns {Array<{label, componentName, fieldId, alias, reportFieldCode}>}
|
|
34
|
+
* @returns {Array<{label, componentName, fieldId, alias, reportFieldCode, options}>}
|
|
35
35
|
*/
|
|
36
36
|
function extractFieldSummary(schemaResult) {
|
|
37
37
|
const fields = [];
|
|
@@ -62,12 +62,17 @@ function extractFieldSummary(schemaResult) {
|
|
|
62
62
|
? `${fieldId}_value`
|
|
63
63
|
: fieldId;
|
|
64
64
|
if (fieldId) {
|
|
65
|
+
const options = extractOptionSummary(props);
|
|
66
|
+
const optionSource = getOptionSource(props) || [];
|
|
65
67
|
fields.push({
|
|
66
68
|
label,
|
|
67
69
|
componentName: node.componentName,
|
|
68
70
|
fieldId,
|
|
69
71
|
alias: aliasMaps.aliasByFieldId[fieldId] || '',
|
|
70
72
|
reportFieldCode,
|
|
73
|
+
options,
|
|
74
|
+
optionCount: optionSource.length,
|
|
75
|
+
optionsTruncated: optionSource.length > options.length,
|
|
71
76
|
});
|
|
72
77
|
}
|
|
73
78
|
}
|
|
@@ -87,6 +92,70 @@ function extractFieldSummary(schemaResult) {
|
|
|
87
92
|
return fields;
|
|
88
93
|
}
|
|
89
94
|
|
|
95
|
+
function normalizeOptionLabel(value) {
|
|
96
|
+
if (value === null || value === undefined) {
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
99
|
+
if (typeof value === 'object') {
|
|
100
|
+
return value.zh_CN || value.zh_HK || value.en_US || value.ja_JP || value.text || value.label || value.value || '';
|
|
101
|
+
}
|
|
102
|
+
return String(value);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function firstPresent(values) {
|
|
106
|
+
return values.find(value => value !== undefined && value !== null);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function normalizeOptionValue(value, fallback) {
|
|
110
|
+
if (value === null || value === undefined || value === '') {
|
|
111
|
+
return fallback;
|
|
112
|
+
}
|
|
113
|
+
if (typeof value === 'object') {
|
|
114
|
+
return value.value || value.label || value.text || fallback;
|
|
115
|
+
}
|
|
116
|
+
return String(value);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function optionArrayFromDataSource(dataSource) {
|
|
120
|
+
if (!dataSource) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
if (Array.isArray(dataSource)) {
|
|
124
|
+
return dataSource;
|
|
125
|
+
}
|
|
126
|
+
const candidates = [
|
|
127
|
+
dataSource.options,
|
|
128
|
+
dataSource.data,
|
|
129
|
+
dataSource.list,
|
|
130
|
+
dataSource.values,
|
|
131
|
+
];
|
|
132
|
+
return candidates.find(Array.isArray) || null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function getOptionSource(props = {}) {
|
|
136
|
+
return Array.isArray(props.options)
|
|
137
|
+
? props.options
|
|
138
|
+
: optionArrayFromDataSource(props.dataSource);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function extractOptionSummary(props = {}) {
|
|
142
|
+
const source = getOptionSource(props);
|
|
143
|
+
if (!source) {
|
|
144
|
+
return [];
|
|
145
|
+
}
|
|
146
|
+
return source.slice(0, 50).map((item, index) => {
|
|
147
|
+
if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {
|
|
148
|
+
const text = String(item);
|
|
149
|
+
return { label: text, value: text };
|
|
150
|
+
}
|
|
151
|
+
const label = normalizeOptionLabel(firstPresent([item.label, item.text, item.name, item.title, item.value]));
|
|
152
|
+
return {
|
|
153
|
+
label,
|
|
154
|
+
value: normalizeOptionValue(firstPresent([item.value, item.key, item.id]), label || String(index)),
|
|
155
|
+
};
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
90
159
|
function buildComponentAliasMaps(schemaResult) {
|
|
91
160
|
const aliasByFieldId = {};
|
|
92
161
|
const fieldIdByAlias = {};
|
|
@@ -136,6 +205,7 @@ function parseArgs(args) {
|
|
|
136
205
|
// 仅返回目标字段的 {componentName, fieldId, label, props}
|
|
137
206
|
field: '',
|
|
138
207
|
json: false,
|
|
208
|
+
summaryJson: false,
|
|
139
209
|
};
|
|
140
210
|
|
|
141
211
|
for (let index = 1; index < args.length; index++) {
|
|
@@ -159,6 +229,8 @@ function parseArgs(args) {
|
|
|
159
229
|
index++;
|
|
160
230
|
} else if (arg === '--json') {
|
|
161
231
|
parsed.json = true;
|
|
232
|
+
} else if (arg === '--summary-json' || arg === '--field-map-json') {
|
|
233
|
+
parsed.summaryJson = true;
|
|
162
234
|
} else if (!arg.startsWith('--') && !parsed.formUuid) {
|
|
163
235
|
parsed.formUuid = arg;
|
|
164
236
|
}
|
|
@@ -303,6 +375,18 @@ function printFieldSummary(result) {
|
|
|
303
375
|
process.stderr.write(` ${c.dim}注:SelectField/EmployeeField 在报表中需加 _value 后缀${c.reset}\n\n`);
|
|
304
376
|
}
|
|
305
377
|
|
|
378
|
+
function buildSchemaSummary(appType, formUuid, schemaResult, meta = {}) {
|
|
379
|
+
const fields = extractFieldSummary(schemaResult);
|
|
380
|
+
return {
|
|
381
|
+
success: true,
|
|
382
|
+
appType,
|
|
383
|
+
formUuid,
|
|
384
|
+
...meta,
|
|
385
|
+
fieldCount: fields.length,
|
|
386
|
+
fields,
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
|
|
306
390
|
function filterForms(forms, keyword) {
|
|
307
391
|
if (!keyword) {
|
|
308
392
|
return forms;
|
|
@@ -373,9 +457,19 @@ async function fetchSchemaRecord(appType, form, authRef, retries) {
|
|
|
373
457
|
};
|
|
374
458
|
}
|
|
375
459
|
|
|
376
|
-
function
|
|
460
|
+
function summarizeRecord(record) {
|
|
461
|
+
if (!record.success) {
|
|
462
|
+
return record;
|
|
463
|
+
}
|
|
464
|
+
const { schema, ...summary } = record;
|
|
465
|
+
void schema;
|
|
466
|
+
return summary;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
function writeBatchOutput(outputDir, records, options = {}) {
|
|
470
|
+
const compact = !!options.compact;
|
|
377
471
|
if (!outputDir) {
|
|
378
|
-
return records;
|
|
472
|
+
return compact ? records.map(summarizeRecord) : records;
|
|
379
473
|
}
|
|
380
474
|
|
|
381
475
|
const resolvedDir = path.resolve(outputDir);
|
|
@@ -391,10 +485,8 @@ function writeBatchOutput(outputDir, records) {
|
|
|
391
485
|
const filePath = path.join(resolvedDir, fileName);
|
|
392
486
|
fs.writeFileSync(filePath, JSON.stringify(record.schema, null, 2), 'utf-8');
|
|
393
487
|
|
|
394
|
-
const { schema, ...summary } = record;
|
|
395
|
-
void schema;
|
|
396
488
|
return {
|
|
397
|
-
...
|
|
489
|
+
...summarizeRecord(record),
|
|
398
490
|
schemaFile: filePath,
|
|
399
491
|
};
|
|
400
492
|
});
|
|
@@ -452,6 +544,11 @@ async function runSingle(parsed, authRef) {
|
|
|
452
544
|
return;
|
|
453
545
|
}
|
|
454
546
|
|
|
547
|
+
if (parsed.summaryJson) {
|
|
548
|
+
console.log(JSON.stringify(buildSchemaSummary(parsed.appType, parsed.formUuid, result), null, 2));
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
|
|
455
552
|
chalkSuccess(t('get_schema.success'));
|
|
456
553
|
printFieldSummary(result);
|
|
457
554
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -494,7 +591,7 @@ async function runBatch(parsed, authRef) {
|
|
|
494
591
|
return record;
|
|
495
592
|
});
|
|
496
593
|
|
|
497
|
-
const outputRecords = writeBatchOutput(parsed.outputDir, records);
|
|
594
|
+
const outputRecords = writeBatchOutput(parsed.outputDir, records, { compact: parsed.summaryJson });
|
|
498
595
|
const successCount = records.filter(record => record.success).length;
|
|
499
596
|
const failedCount = records.length - successCount;
|
|
500
597
|
|
|
@@ -509,6 +606,7 @@ async function runBatch(parsed, authRef) {
|
|
|
509
606
|
total: records.length,
|
|
510
607
|
successCount,
|
|
511
608
|
failedCount,
|
|
609
|
+
summaryOnly: parsed.summaryJson || undefined,
|
|
512
610
|
outputDir: parsed.outputDir ? path.resolve(parsed.outputDir) : undefined,
|
|
513
611
|
forms: outputRecords,
|
|
514
612
|
}, null, 2));
|
|
@@ -527,6 +625,8 @@ async function run(args) {
|
|
|
527
625
|
|
|
528
626
|
module.exports = {
|
|
529
627
|
extractFieldSummary,
|
|
628
|
+
extractOptionSummary,
|
|
629
|
+
buildSchemaSummary,
|
|
530
630
|
buildComponentAliasMaps,
|
|
531
631
|
parseArgs,
|
|
532
632
|
filterForms,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const crypto = require('crypto');
|
|
3
4
|
const path = require('path');
|
|
4
5
|
const { version } = require('../../package.json');
|
|
5
6
|
const { t } = require('./i18n');
|
|
@@ -14,6 +15,79 @@ function redactLogin(login) {
|
|
|
14
15
|
return redacted;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
function compactLogin(login) {
|
|
19
|
+
return {
|
|
20
|
+
status: login.status,
|
|
21
|
+
can_auto_use: login.can_auto_use === true,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function canonicalize(value) {
|
|
26
|
+
if (Array.isArray(value)) {
|
|
27
|
+
return value.map(canonicalize);
|
|
28
|
+
}
|
|
29
|
+
if (!value || typeof value !== 'object') {
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return Object.keys(value)
|
|
34
|
+
.sort()
|
|
35
|
+
.reduce((result, key) => {
|
|
36
|
+
result[key] = canonicalize(value[key]);
|
|
37
|
+
return result;
|
|
38
|
+
}, {});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function buildCommandManifestDigest(manifest) {
|
|
42
|
+
const digestPayload = {
|
|
43
|
+
schema_version: manifest.schema_version,
|
|
44
|
+
command_prefix: manifest.command_prefix,
|
|
45
|
+
summary: {
|
|
46
|
+
command_count: manifest.summary.command_count,
|
|
47
|
+
group_count: manifest.summary.group_count,
|
|
48
|
+
side_effect_counts: manifest.summary.side_effect_counts,
|
|
49
|
+
permission_mode_counts: manifest.summary.permission_mode_counts,
|
|
50
|
+
core_workflows: manifest.summary.core_workflows,
|
|
51
|
+
},
|
|
52
|
+
commands: manifest.commands.map(entry => ({
|
|
53
|
+
id: entry.id,
|
|
54
|
+
usage: entry.usage,
|
|
55
|
+
requires_login: entry.requires_login,
|
|
56
|
+
output: entry.output,
|
|
57
|
+
side_effect_kind: entry.side_effect && entry.side_effect.kind,
|
|
58
|
+
permission_mode: entry.permission && entry.permission.mode,
|
|
59
|
+
permission_effect: entry.permission && entry.permission.effect,
|
|
60
|
+
})),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return crypto
|
|
64
|
+
.createHash('sha256')
|
|
65
|
+
.update(JSON.stringify(canonicalize(digestPayload)))
|
|
66
|
+
.digest('hex');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function buildAgentCapabilitiesSummary() {
|
|
70
|
+
const envSnapshot = buildEnvironmentSnapshot();
|
|
71
|
+
const loginStatus = checkLoginOnly({ includeSecrets: false });
|
|
72
|
+
const manifest = buildCommandManifest({ t, version });
|
|
73
|
+
const projectRoot = envSnapshot.active.projectRoot;
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
schema_version: 1,
|
|
77
|
+
name: 'openyida-agent-capabilities-summary',
|
|
78
|
+
version,
|
|
79
|
+
login: compactLogin(loginStatus),
|
|
80
|
+
workdir: projectRoot,
|
|
81
|
+
workdir_exists: !!envSnapshot.active.projectRootExists,
|
|
82
|
+
cache_dir: path.join(projectRoot, '.cache'),
|
|
83
|
+
openyida_task_cache_dir: path.join(projectRoot, '.cache', 'openyida'),
|
|
84
|
+
command_manifest_digest: buildCommandManifestDigest(manifest),
|
|
85
|
+
command_manifest_digest_algorithm: 'sha256',
|
|
86
|
+
command_count: manifest.summary.command_count,
|
|
87
|
+
full_capabilities_command: 'openyida agent-capabilities --json',
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
17
91
|
function buildAgentCapabilities() {
|
|
18
92
|
const envSnapshot = buildEnvironmentSnapshot();
|
|
19
93
|
const loginStatus = redactLogin(checkLoginOnly({ includeSecrets: false }));
|
|
@@ -32,43 +106,69 @@ function buildAgentCapabilities() {
|
|
|
32
106
|
active: envSnapshot.active,
|
|
33
107
|
login: loginStatus,
|
|
34
108
|
recommended: {
|
|
35
|
-
preflight_command: 'openyida agent-capabilities --json',
|
|
109
|
+
preflight_command: 'openyida agent-capabilities --summary-json',
|
|
110
|
+
full_capabilities_command: 'openyida agent-capabilities --json',
|
|
36
111
|
mutation_guard: 'Run mutating commands only when login.status is ok or after a successful openyida login.',
|
|
37
112
|
workdir: projectRoot,
|
|
38
113
|
cache_dir: path.join(projectRoot, '.cache'),
|
|
39
114
|
openyida_task_cache_dir: path.join(projectRoot, '.cache', 'openyida'),
|
|
115
|
+
default_full_app_workflow: manifest.summary.core_workflows.full_app_fast_build,
|
|
40
116
|
},
|
|
41
117
|
skills: {
|
|
42
118
|
index_file: 'skills-index.json',
|
|
43
119
|
entry: 'openyida',
|
|
44
120
|
note: 'Use host use_skill/search_skills when available; otherwise load only the current-stage SKILL.md selected by the root routing table.',
|
|
45
121
|
},
|
|
122
|
+
commands: {
|
|
123
|
+
count: manifest.summary.command_count,
|
|
124
|
+
group_count: manifest.summary.group_count,
|
|
125
|
+
side_effect_counts: manifest.summary.side_effect_counts,
|
|
126
|
+
permission_mode_counts: manifest.summary.permission_mode_counts,
|
|
127
|
+
read_only_command_ids: manifest.summary.read_only_command_ids,
|
|
128
|
+
mutating_command_ids: manifest.summary.mutating_command_ids,
|
|
129
|
+
allow_command_ids: manifest.summary.allow_command_ids,
|
|
130
|
+
ask_command_ids: manifest.summary.ask_command_ids,
|
|
131
|
+
deny_command_ids: manifest.summary.deny_command_ids,
|
|
132
|
+
core_workflows: manifest.summary.core_workflows,
|
|
133
|
+
},
|
|
46
134
|
sideEffects: {
|
|
47
135
|
read_only_preflight: [
|
|
48
|
-
'openyida agent-capabilities --json',
|
|
136
|
+
'openyida agent-capabilities --summary-json',
|
|
49
137
|
'openyida env --json',
|
|
50
138
|
'openyida login --check-only --json',
|
|
51
139
|
'openyida commands --json',
|
|
52
140
|
],
|
|
53
141
|
retry_policy: 'Do not repeat the same failed command without changing login state, organization, parameters, files, or field IDs.',
|
|
54
142
|
completion_contracts: {
|
|
55
|
-
full_app: '
|
|
143
|
+
full_app: 'Default fast_build is complete after creating the app, core forms, primary page, publishing it, and returning an access URL.',
|
|
56
144
|
},
|
|
145
|
+
fast_build_data_contract: 'Default fast_build page code must not call this.dataSourceMap.* unless the same run created and bound a designer data source; use this.utils.yida.* or an entry-only page by default.',
|
|
57
146
|
},
|
|
58
147
|
command_manifest: {
|
|
59
148
|
schema_version: manifest.schema_version,
|
|
60
149
|
groups: manifest.groups,
|
|
61
150
|
side_effect_schema: manifest.side_effect_schema,
|
|
151
|
+
permission_schema: manifest.permission_schema,
|
|
152
|
+
summary: manifest.summary,
|
|
62
153
|
commands: manifest.commands,
|
|
63
154
|
},
|
|
64
155
|
};
|
|
65
156
|
}
|
|
66
157
|
|
|
67
|
-
|
|
68
|
-
|
|
158
|
+
function shouldUseSummary(args = []) {
|
|
159
|
+
return args.includes('--summary-json') || args.includes('--compact');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
async function run(args = []) {
|
|
163
|
+
const payload = shouldUseSummary(args)
|
|
164
|
+
? buildAgentCapabilitiesSummary()
|
|
165
|
+
: buildAgentCapabilities();
|
|
166
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
69
167
|
}
|
|
70
168
|
|
|
71
169
|
module.exports = {
|
|
72
170
|
buildAgentCapabilities,
|
|
171
|
+
buildAgentCapabilitiesSummary,
|
|
172
|
+
buildCommandManifestDigest,
|
|
73
173
|
run,
|
|
74
174
|
};
|