@bluefly/openstandardagents 0.5.0 → 0.5.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 (170) hide show
  1. package/.version.json +3 -3
  2. package/CHANGELOG.md +43 -12
  3. package/README.md +31 -26
  4. package/bin/postinstall +0 -0
  5. package/dist/.version.json +3 -3
  6. package/dist/adapters/a2a/a2a-protocol.js +4 -2
  7. package/dist/adapters/a2a/a2a-tool.js +4 -2
  8. package/dist/adapters/a2a/mcp-integration.d.ts +2 -1
  9. package/dist/adapters/a2a/mcp-integration.js +6 -3
  10. package/dist/adapters/browser/browser-exporter.d.ts +26 -0
  11. package/dist/adapters/browser/browser-exporter.js +73 -0
  12. package/dist/adapters/browser/browser-runner.d.ts +23 -0
  13. package/dist/adapters/browser/browser-runner.js +46 -0
  14. package/dist/adapters/browser/index.d.ts +9 -0
  15. package/dist/adapters/browser/index.js +9 -0
  16. package/dist/adapters/docker/index.d.ts +2 -0
  17. package/dist/adapters/docker/index.js +2 -0
  18. package/dist/adapters/docker/openclaw-bridge.d.ts +57 -0
  19. package/dist/adapters/docker/openclaw-bridge.js +173 -0
  20. package/dist/adapters/drupal/index.d.ts +1 -0
  21. package/dist/adapters/drupal/index.js +2 -0
  22. package/dist/adapters/drupal/twig-renderer.d.ts +23 -0
  23. package/dist/adapters/drupal/twig-renderer.js +99 -0
  24. package/dist/adapters/gitlab/agent-generator.js +2 -1
  25. package/dist/api/index.js +2 -1
  26. package/dist/api/routes/mcp.router.js +3 -1
  27. package/dist/api/routes/wizard.router.js +3 -1
  28. package/dist/cli/commands/agent/discover-type.command.js +1 -1
  29. package/dist/cli/commands/agent-card.command.js +37 -10
  30. package/dist/cli/commands/agents-sync.command.d.ts +2 -2
  31. package/dist/cli/commands/agents-sync.command.js +27 -17
  32. package/dist/cli/commands/catalog/config.js +1 -1
  33. package/dist/cli/commands/catalog/validate.command.js +2 -2
  34. package/dist/cli/commands/config.command.js +2 -2
  35. package/dist/cli/commands/daemon.command.js +32 -8
  36. package/dist/cli/commands/discover.d.ts +1 -1
  37. package/dist/cli/commands/discover.js +16 -8
  38. package/dist/cli/commands/economics.command.d.ts +9 -0
  39. package/dist/cli/commands/economics.command.js +113 -0
  40. package/dist/cli/commands/export.command.js +6 -3
  41. package/dist/cli/commands/mcp.command.js +3 -1
  42. package/dist/cli/commands/memory.command.d.ts +18 -0
  43. package/dist/cli/commands/memory.command.js +168 -0
  44. package/dist/cli/commands/publish.command.js +7 -4
  45. package/dist/cli/commands/serve-builder-routes.js +1 -1
  46. package/dist/cli/commands/usie-skills.command.d.ts +24 -0
  47. package/dist/cli/commands/usie-skills.command.js +297 -0
  48. package/dist/cli/commands/validate.command.js +8 -1
  49. package/dist/cli/commands/verify.d.ts +3 -3
  50. package/dist/cli/commands/verify.js +12 -6
  51. package/dist/cli/commands/workspace.command.d.ts +1 -0
  52. package/dist/cli/commands/workspace.command.js +28 -4
  53. package/dist/cli/index.js +12 -0
  54. package/dist/cli/workspace-validate.d.ts +23 -0
  55. package/dist/cli/workspace-validate.js +117 -0
  56. package/dist/data/platform-matrix.js +1 -4
  57. package/dist/generated/types.d.ts +97 -97
  58. package/dist/index.d.ts +2 -0
  59. package/dist/index.js +2 -0
  60. package/dist/mcp-server/index.js +658 -982
  61. package/dist/mesh/discovery-gkg.d.ts +26 -0
  62. package/dist/mesh/discovery-gkg.js +92 -0
  63. package/dist/messenger/Handler/AgentBatchHandler.js +3 -2
  64. package/dist/messenger/Handler/AgentExecutionHandler.js +6 -1
  65. package/dist/package.json +20 -4
  66. package/dist/sdks/shared/types.d.ts +1 -1
  67. package/dist/services/agent-card-generator.js +6 -2
  68. package/dist/services/daemon/audit-log.service.js +3 -1
  69. package/dist/services/daemon/execution.service.js +8 -4
  70. package/dist/services/daemon/fs-watcher.service.js +6 -7
  71. package/dist/services/daemon/pairing.service.js +2 -1
  72. package/dist/services/daemon/skill-aggregator.service.js +105 -21
  73. package/dist/services/daemon/sse-endpoints.js +1 -1
  74. package/dist/services/daemon/ws-server.js +10 -3
  75. package/dist/services/governance/cedar-provider.js +12 -8
  76. package/dist/services/governance/cedar-validator.service.js +1 -1
  77. package/dist/services/mcp/bridge.service.js +40 -9
  78. package/dist/services/openapi-extensions-validation.d.ts +20 -0
  79. package/dist/services/openapi-extensions-validation.js +193 -0
  80. package/dist/services/release-automation/merge-request.service.d.ts +4 -4
  81. package/dist/services/release-automation/release-buttons.js +3 -3
  82. package/dist/services/release-automation/schemas/release.schema.d.ts +3 -3
  83. package/dist/services/runtime/openai.adapter.d.ts +46 -13
  84. package/dist/services/runtime/openai.adapter.js +169 -131
  85. package/dist/services/skill-registry.service.d.ts +1 -1
  86. package/dist/services/skills-pipeline/skills-research.service.js +47 -7
  87. package/dist/services/trust/trust.service.js +6 -4
  88. package/dist/services/validation-zod.service.js +3 -22
  89. package/dist/services/validators/index.d.ts +1 -0
  90. package/dist/services/validators/index.js +1 -0
  91. package/dist/services/validators/registry.d.ts +21 -0
  92. package/dist/services/validators/registry.js +42 -0
  93. package/dist/skills/test-skill/package.json +1 -1
  94. package/dist/spec/extensions/cognition.schema.json +87 -0
  95. package/dist/spec/layer4-economics/duadp-examples.json +44 -0
  96. package/dist/spec/v0.4/agent.schema.json +14 -0
  97. package/dist/spec/v0.5/agent-builder-openapi.yaml +230 -0
  98. package/dist/spec/v0.5/agent.schema.json +32 -1
  99. package/dist/spec/v0.5/extensions/cognition/cognition.schema.json +78 -1
  100. package/dist/spec/v0.5/extensions/economics/context-pack.schema.json +91 -0
  101. package/dist/spec/v0.5/extensions/economics/execution-profile.schema.json +148 -0
  102. package/dist/spec/v0.5/extensions/economics/failure-semantics.schema.json +32 -0
  103. package/dist/spec/v0.5/extensions/economics/replay-packet.schema.json +120 -0
  104. package/dist/spec/v0.5/extensions/mcp/README.md +1 -1
  105. package/dist/spec/v0.5/memory-hierarchy.yaml +120 -0
  106. package/dist/spec/v1/agent-card.schema.json +254 -0
  107. package/dist/types/cognition.zod.d.ts +312 -0
  108. package/dist/types/cognition.zod.js +223 -0
  109. package/dist/types/identity.zod.d.ts +5 -5
  110. package/dist/types/index.d.ts +53 -7
  111. package/dist/types/index.js +4 -2
  112. package/dist/types/personality.zod.d.ts +3 -3
  113. package/dist/utils/http-client.d.ts +22 -0
  114. package/dist/utils/http-client.js +51 -0
  115. package/dist/utils/index.d.ts +3 -0
  116. package/dist/utils/index.js +3 -0
  117. package/dist/utils/proxy-resolver.d.ts +36 -0
  118. package/dist/utils/proxy-resolver.js +59 -0
  119. package/dist/utils/user-agent.d.ts +11 -0
  120. package/dist/utils/user-agent.js +17 -0
  121. package/dist/validation/version-compliance.js +1 -1
  122. package/examples/agentscope/react-assistant/README.md +1 -1
  123. package/examples/agentscope/react-assistant/agent.ossa.yaml +1 -1
  124. package/examples/drupal/drupal-contributor-agent/.eslintrc.json +58 -0
  125. package/examples/drupal/drupal-contributor-agent/.prettierrc.json +10 -0
  126. package/examples/drupal/drupal-contributor-agent/package.json +55 -0
  127. package/examples/drupal/drupal-contributor-agent/src/core/index.ts +10 -0
  128. package/examples/drupal/drupal-contributor-agent/src/index.ts +17 -0
  129. package/examples/drupal/drupal-contributor-agent/src/types/index.ts +180 -0
  130. package/examples/drupal/drupal-contributor-agent/tsconfig.json +36 -0
  131. package/examples/getting-started/01-minimal-agent.ossa.yaml +1 -1
  132. package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
  133. package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
  134. package/examples/getting-started/04-agent-with-messaging.ossa.yaml +1 -1
  135. package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
  136. package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
  137. package/examples/reference-implementations/python-client/examples/basic_usage.py +0 -0
  138. package/examples/reference-implementations/python-client/examples/publish_agent.py +0 -0
  139. package/openapi/agent-cognition-sessions.yaml +580 -0
  140. package/openapi/agent-crud.yaml +20 -20
  141. package/openapi/core/ossa-registry-api.openapi.yaml +1 -1
  142. package/openapi/ossa-cli-enhancements.openapi.yaml +1 -1
  143. package/openapi/release-automation.openapi.yaml +1 -1
  144. package/openapi/schemas/common/economics.yaml +98 -0
  145. package/openapi/uadp-asyncapi.yaml +1 -1
  146. package/openapi/uadp-openapi.yaml +2 -2
  147. package/package.json +114 -96
  148. package/spec/extensions/cognition.schema.json +87 -0
  149. package/spec/layer4-economics/duadp-examples.json +44 -0
  150. package/spec/v0.4/agent.schema.json +14 -0
  151. package/spec/v0.5/agent-builder-openapi.yaml +230 -0
  152. package/spec/v0.5/agent.schema.json +32 -1
  153. package/spec/v0.5/extensions/cognition/cognition.schema.json +78 -1
  154. package/spec/v0.5/extensions/economics/context-pack.schema.json +91 -0
  155. package/spec/v0.5/extensions/economics/execution-profile.schema.json +148 -0
  156. package/spec/v0.5/extensions/economics/failure-semantics.schema.json +32 -0
  157. package/spec/v0.5/extensions/economics/replay-packet.schema.json +120 -0
  158. package/spec/v0.5/extensions/mcp/README.md +1 -1
  159. package/spec/v0.5/memory-hierarchy.yaml +120 -0
  160. package/spec/v1/agent-card.schema.json +254 -0
  161. package/dist/adapters/a2a/__tests__/mcp-integration.spec.d.ts +0 -5
  162. package/dist/adapters/a2a/__tests__/mcp-integration.spec.js +0 -268
  163. package/dist/adapters/a2a/__tests__/mcp-transport.spec.d.ts +0 -5
  164. package/dist/adapters/a2a/__tests__/mcp-transport.spec.js +0 -203
  165. package/dist/mcp-server/__tests__/mcp-server.spec.d.ts +0 -8
  166. package/dist/mcp-server/__tests__/mcp-server.spec.js +0 -566
  167. package/dist/validation/__tests__/error-codes.test.d.ts +0 -5
  168. package/dist/validation/__tests__/error-codes.test.js +0 -252
  169. package/dist/version-management/core/version-manager.test.d.ts +0 -2
  170. package/dist/version-management/core/version-manager.test.js +0 -210
@@ -0,0 +1,297 @@
1
+ /**
2
+ * usie-skills.command.ts — `ossa skills ingest|sync|mesh` command group
3
+ *
4
+ * USIE (Universal Skills Ingestion Engine) CLI commands.
5
+ * Distinct from skills.command.ts (which handles Claude Skills export pipeline).
6
+ *
7
+ * Commands:
8
+ * ossa skills ingest <url> — POST /api/v1/ingest: ingest GitHub repo onto mesh
9
+ * ossa skills mesh sync — sync all adapters from ~/.ossa/adapters.yaml
10
+ * ossa skills mesh list — list skills on the connected DUADP node
11
+ * ossa skills mesh preview <url>— dry-run: detect adapter, show what would be generated
12
+ * ossa skills mesh push <gaid> — push skill bundle to another DUADP node
13
+ * ossa skills validate <path> — validate local SKILL.md against OSSA schema
14
+ * ossa skills config — show ~/.ossa/adapters.yaml and active adapters
15
+ *
16
+ * Config: ~/.ossa/adapters.yaml
17
+ * DUADP node: DUADP_NODE_URL env (default: https://discover.copaw.us)
18
+ *
19
+ * SOD: This CLI is a thin consumer of the DUADP /api/v1/ingest endpoint.
20
+ * No adapter logic here — that lives in @bluefly/duadp SDK.
21
+ */
22
+ import { Command } from 'commander';
23
+ import fs from 'node:fs';
24
+ import { readFile } from 'node:fs/promises';
25
+ import path from 'node:path';
26
+ import os from 'node:os';
27
+ // ── Config ────────────────────────────────────────────────────────────────────
28
+ const DUADP_NODE = process.env.DUADP_NODE_URL ?? 'https://discover.copaw.us';
29
+ const OSSA_CONFIG_DIR = path.join(os.homedir(), '.ossa');
30
+ const ADAPTERS_YAML = path.join(OSSA_CONFIG_DIR, 'adapters.yaml');
31
+ const DEFAULT_ADAPTERS_YAML = `# ~/.ossa/adapters.yaml — USIE adapter registry
32
+ # Skill sources that 'ossa skills mesh sync' will ingest.
33
+
34
+ adapters:
35
+ - id: kiro-powers
36
+ label: "Kiro Powers"
37
+ url: "https://github.com/kirodotdev/powers"
38
+ adapter: "kiro"
39
+ enabled: true
40
+
41
+ - id: skills-sh
42
+ label: "skills.sh Registry"
43
+ url: "https://github.com/skills-sh/skills"
44
+ adapter: "skills-sh"
45
+ enabled: true
46
+
47
+ # Add your own:
48
+ # - id: my-skills
49
+ # label: "My Custom Skills"
50
+ # url: "https://github.com/me/my-skills"
51
+ # adapter: "auto"
52
+ # enabled: true
53
+ `;
54
+ function ensureConfig() {
55
+ if (!fs.existsSync(OSSA_CONFIG_DIR))
56
+ fs.mkdirSync(OSSA_CONFIG_DIR, { recursive: true });
57
+ if (!fs.existsSync(ADAPTERS_YAML)) {
58
+ fs.writeFileSync(ADAPTERS_YAML, DEFAULT_ADAPTERS_YAML, 'utf8');
59
+ console.log(`✅ Created default adapters config: ${ADAPTERS_YAML}\n`);
60
+ }
61
+ }
62
+ function loadAdapters() {
63
+ ensureConfig();
64
+ const lines = fs.readFileSync(ADAPTERS_YAML, 'utf8').split('\n');
65
+ const adapters = [];
66
+ let cur = null;
67
+ for (const line of lines) {
68
+ const t = line.trim();
69
+ if (t.startsWith('- id:')) {
70
+ if (cur?.id)
71
+ adapters.push(cur);
72
+ cur = { id: t.replace(/- id:\s*["']?/, '').replace(/["']$/, ''), enabled: true };
73
+ }
74
+ else if (cur && t.startsWith('label:'))
75
+ cur.label = t.replace(/label:\s*["']?/, '').replace(/["']$/, '');
76
+ else if (cur && t.startsWith('url:'))
77
+ cur.url = t.replace(/url:\s*["']?/, '').replace(/["']$/, '');
78
+ else if (cur && t.startsWith('adapter:'))
79
+ cur.adapter = t.replace(/adapter:\s*["']?/, '').replace(/["']$/, '');
80
+ else if (cur && t.startsWith('enabled:'))
81
+ cur.enabled = t.includes('true');
82
+ }
83
+ if (cur?.id)
84
+ adapters.push(cur);
85
+ return adapters.filter(a => a.enabled !== false && a.url);
86
+ }
87
+ function getToken() {
88
+ return process.env.DUADP_TOKEN ?? process.env.OSSA_PUBLISH_TOKEN;
89
+ }
90
+ async function apiGet(path) {
91
+ const res = await fetch(`${DUADP_NODE}${path}`, {
92
+ headers: { Accept: 'application/json', 'User-Agent': 'ossa-cli/usie' },
93
+ });
94
+ if (!res.ok)
95
+ throw new Error(`${res.status} ${path}`);
96
+ return res.json();
97
+ }
98
+ async function apiPost(path, body, token) {
99
+ const headers = { 'Content-Type': 'application/json', 'User-Agent': 'ossa-cli/usie' };
100
+ if (token)
101
+ headers['Authorization'] = `Bearer ${token}`;
102
+ const res = await fetch(`${DUADP_NODE}${path}`, { method: 'POST', headers, body: JSON.stringify(body) });
103
+ const data = await res.json();
104
+ if (!res.ok)
105
+ throw new Error(JSON.stringify(data));
106
+ return data;
107
+ }
108
+ // ── Implementations ───────────────────────────────────────────────────────────
109
+ async function cmdIngest(url, opts) {
110
+ const token = getToken();
111
+ if (!token) {
112
+ console.error('❌ Set DUADP_TOKEN or OSSA_PUBLISH_TOKEN');
113
+ process.exit(1);
114
+ }
115
+ console.log(`🔍 Ingesting ${url} ...`);
116
+ try {
117
+ const r = await apiPost('/api/v1/ingest', { url, adapter: opts.adapter ?? 'auto' }, token);
118
+ if (opts.json) {
119
+ console.log(JSON.stringify(r, null, 2));
120
+ return;
121
+ }
122
+ console.log(`\n✅ Skill is live on the mesh!\n`);
123
+ console.log(` GAID: ${r.gaid}`);
124
+ console.log(` Name: ${r.name}`);
125
+ console.log(` Adapter: ${r.adapter_used}`);
126
+ console.log(` Trust tier: ${r.trust_tier}`);
127
+ console.log(` Marketplace: ${r.marketplace_url}\n`);
128
+ }
129
+ catch (e) {
130
+ console.error(`❌ ${e.message}`);
131
+ process.exit(1);
132
+ }
133
+ }
134
+ async function cmdList(opts) {
135
+ try {
136
+ const qs = opts.source ? `?source=${encodeURIComponent(opts.source)}` : '';
137
+ const d = await apiGet(`/api/v1/skills${qs}`);
138
+ if (opts.json) {
139
+ console.log(JSON.stringify(d, null, 2));
140
+ return;
141
+ }
142
+ const src = opts.source ? ` (source: ${opts.source})` : '';
143
+ console.log(`\n📋 Skills on ${DUADP_NODE}${src}\n`);
144
+ for (const s of d.data ?? []) {
145
+ const gaid = s?.identity?.gaid ?? s?.metadata?.name ?? '?';
146
+ const tier = s?.metadata?.trust_tier ?? 'community';
147
+ const source = s?.metadata?.annotations?.['usie.source'] ?? '';
148
+ const icon = source === 'kiro-powers' ? '⚡' : source === 'skills-sh' ? '🎯' : '🔧';
149
+ console.log(` ${icon} ${gaid} [${tier}]`);
150
+ }
151
+ console.log(`\n Total: ${d.meta?.total ?? 0}\n`);
152
+ }
153
+ catch (e) {
154
+ console.error(`❌ ${e.message}`);
155
+ process.exit(1);
156
+ }
157
+ }
158
+ async function cmdSync(opts) {
159
+ const adapters = loadAdapters();
160
+ const token = getToken();
161
+ if (!token && !opts.dry) {
162
+ console.error('❌ Set DUADP_TOKEN or OSSA_PUBLISH_TOKEN');
163
+ process.exit(1);
164
+ }
165
+ console.log(`\n🔄 Syncing ${adapters.length} adapter(s)${opts.dry ? ' [DRY RUN]' : ''}...\n`);
166
+ const results = [];
167
+ for (const a of adapters) {
168
+ process.stdout.write(` ${a.id}: `);
169
+ if (opts.dry) {
170
+ console.log(`${a.url} (skipped)`);
171
+ results.push({ adapter: a.id, status: 'dry' });
172
+ continue;
173
+ }
174
+ try {
175
+ const r = await apiPost('/api/v1/ingest', { url: a.url, adapter: a.adapter }, token);
176
+ console.log(`✅ ${r.gaid ?? r.name}`);
177
+ results.push({ adapter: a.id, status: 'ok', gaid: r.gaid });
178
+ }
179
+ catch (e) {
180
+ console.log(`❌ ${e.message.slice(0, 80)}`);
181
+ results.push({ adapter: a.id, status: 'error', error: e.message });
182
+ }
183
+ }
184
+ if (opts.json)
185
+ console.log(JSON.stringify(results, null, 2));
186
+ else
187
+ console.log(`\n Done. ${results.filter((r) => r['status'] === 'ok').length}/${adapters.length} synced.\n`);
188
+ }
189
+ async function cmdPreview(url) {
190
+ const slug = url.match(/github\.com\/([^/]+\/[^/]+)/)?.[1] ?? '';
191
+ const base = `https://raw.githubusercontent.com/${slug}/HEAD`;
192
+ const [p, s, r] = await Promise.allSettled([
193
+ fetch(`${base}/POWER.md`, { method: 'HEAD' }),
194
+ fetch(`${base}/SKILL.md`, { method: 'HEAD' }),
195
+ fetch(`${base}/README.md`, { method: 'HEAD' }),
196
+ ]);
197
+ const ok = (x) => x.status === 'fulfilled' && x.value.ok;
198
+ const adapter = ok(p) ? '⚡ kiro (POWER.md)' : ok(s) ? '🎯 skills-sh (SKILL.md)' : ok(r) ? '🔧 git-repo (README)' : '❌ no manifest';
199
+ console.log(`\n URL: ${url}`);
200
+ console.log(` Adapter: ${adapter}`);
201
+ console.log(` POWER.md: ${ok(p) ? '✅' : '—'} SKILL.md: ${ok(s) ? '✅' : '—'} README.md: ${ok(r) ? '✅' : '—'}`);
202
+ console.log(`\n Run: ossa skills ingest ${url}\n`);
203
+ }
204
+ async function cmdValidate(skillPath) {
205
+ const file = path.resolve(skillPath);
206
+ if (!fs.existsSync(file)) {
207
+ console.error(`❌ Not found: ${file}`);
208
+ process.exit(1);
209
+ }
210
+ const content = await readFile(file, 'utf8');
211
+ const errs = [];
212
+ if (!content.includes('name:') && !/^# .+/m.test(content))
213
+ errs.push('Missing name: or # Heading');
214
+ if (!content.includes('description:') && !/## description/i.test(content))
215
+ errs.push('Missing description');
216
+ if (errs.length === 0)
217
+ console.log(`✅ ${path.basename(file)} — valid OSSA skill manifest`);
218
+ else {
219
+ console.log(`❌ ${path.basename(file)} — ${errs.length} issue(s):\n${errs.map(e => ` - ${e}`).join('\n')}`);
220
+ process.exit(1);
221
+ }
222
+ }
223
+ async function cmdPush(gaid, opts) {
224
+ const token = getToken();
225
+ if (!token) {
226
+ console.error('❌ Set DUADP_TOKEN or OSSA_PUBLISH_TOKEN');
227
+ process.exit(1);
228
+ }
229
+ const target = opts.node ?? DUADP_NODE;
230
+ console.log(`📤 Pushing ${gaid} → ${target} ...`);
231
+ try {
232
+ const bundle = await apiGet(`/api/v1/skills/${encodeURIComponent(gaid)}/bundle`);
233
+ const res = await fetch(`${target}/api/v1/publish`, {
234
+ method: 'POST',
235
+ headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
236
+ body: JSON.stringify(bundle),
237
+ });
238
+ const r = await res.json();
239
+ if (!res.ok)
240
+ throw new Error(JSON.stringify(r));
241
+ console.log(`✅ Pushed: ${r.gaid ?? gaid}`);
242
+ }
243
+ catch (e) {
244
+ console.error(`❌ ${e.message}`);
245
+ process.exit(1);
246
+ }
247
+ }
248
+ // ── Commander export ──────────────────────────────────────────────────────────
249
+ export function usieSkillsCommandGroup() {
250
+ const skills = new Command('skills').description('USIE: ingest and manage skills on the agent mesh');
251
+ skills
252
+ .command('ingest <url>')
253
+ .description('Ingest a GitHub repo as a skill (30-second DrupalCon demo)')
254
+ .option('--adapter <type>', 'Force adapter: kiro|skills-sh|git-repo|auto', 'auto')
255
+ .option('--json', 'JSON output')
256
+ .action(cmdIngest);
257
+ const mesh = skills.command('mesh').description('Manage skills on the DUADP mesh');
258
+ mesh
259
+ .command('list')
260
+ .description('List skills on the connected DUADP node')
261
+ .option('--source <id>', 'Filter by adapter: kiro-powers|skills-sh|git-repo')
262
+ .option('--json', 'JSON output')
263
+ .action(cmdList);
264
+ mesh
265
+ .command('sync')
266
+ .description('Sync all adapters in ~/.ossa/adapters.yaml to the DUADP node')
267
+ .option('--dry', 'Dry run — show what would be ingested')
268
+ .option('--json', 'JSON output')
269
+ .action(cmdSync);
270
+ mesh
271
+ .command('preview <url>')
272
+ .description('Preview adapter detection for a GitHub URL (no publish)')
273
+ .action(cmdPreview);
274
+ mesh
275
+ .command('push <gaid>')
276
+ .description('Push a skill bundle to another DUADP node')
277
+ .option('--node <url>', 'Target DUADP node URL')
278
+ .action(cmdPush);
279
+ skills
280
+ .command('validate <path>')
281
+ .description('Validate a local SKILL.md or POWER.md')
282
+ .action(cmdValidate);
283
+ skills
284
+ .command('config')
285
+ .description('Show adapters.yaml config and active adapters')
286
+ .action(() => {
287
+ ensureConfig();
288
+ const adapters = loadAdapters();
289
+ console.log(`\n📁 ${ADAPTERS_YAML}`);
290
+ console.log(`🔌 Node: ${DUADP_NODE}\n`);
291
+ for (const a of adapters)
292
+ console.log(` ${a.id} ${a.url} (${a.adapter})`);
293
+ console.log();
294
+ });
295
+ return skills;
296
+ }
297
+ //# sourceMappingURL=usie-skills.command.js.map
@@ -251,7 +251,14 @@ validateCommand.action(async (path, options) => {
251
251
  }
252
252
  // Platform-specific validation
253
253
  const platforms = options.all
254
- ? ['kagent', 'langchain', 'crewai', 'agentscope', 'docker', 'kubernetes']
254
+ ? [
255
+ 'kagent',
256
+ 'langchain',
257
+ 'crewai',
258
+ 'agentscope',
259
+ 'docker',
260
+ 'kubernetes',
261
+ ]
255
262
  : options.platform
256
263
  ? [options.platform]
257
264
  : [];
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Usage:
5
5
  * ossa verify <gaid>
6
- * ossa verify did:ossa:blueflyio:agent-123
7
- * ossa verify did:ossa:blueflyio:agent-123 --card ./agent-card.yaml
8
- * ossa verify did:ossa:blueflyio:agent-123 --json
6
+ * ossa verify did:ossa:<your-namespace>:agent-123
7
+ * ossa verify did:ossa:<your-namespace>:agent-123 --card ./agent-card.yaml
8
+ * ossa verify did:ossa:<your-namespace>:agent-123 --json
9
9
  */
10
10
  import { Command } from 'commander';
11
11
  /**
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Usage:
5
5
  * ossa verify <gaid>
6
- * ossa verify did:ossa:blueflyio:agent-123
7
- * ossa verify did:ossa:blueflyio:agent-123 --card ./agent-card.yaml
8
- * ossa verify did:ossa:blueflyio:agent-123 --json
6
+ * ossa verify did:ossa:<your-namespace>:agent-123
7
+ * ossa verify did:ossa:<your-namespace>:agent-123 --card ./agent-card.yaml
8
+ * ossa verify did:ossa:<your-namespace>:agent-123 --json
9
9
  */
10
10
  import { DuadpClient, resolveGaid } from '@bluefly/duadp';
11
11
  import chalk from 'chalk';
@@ -19,9 +19,13 @@ import { addRegistryOptions, resolveRegistryUrl, } from '../utils/standard-optio
19
19
  class AgentProtocolClient {
20
20
  client;
21
21
  constructor(config) {
22
- const baseUrl = config?.baseUrl || process.env.OSSA_REGISTRY_URL || 'https://registry.openstandardagents.org';
22
+ const baseUrl = config?.baseUrl ||
23
+ process.env.OSSA_REGISTRY_URL ||
24
+ 'https://registry.openstandardagents.org';
23
25
  this.client = new DuadpClient(baseUrl, {
24
- token: config?.apiKey || process.env.AGENT_PROTOCOL_TOKEN || process.env.GITLAB_PRIVATE_TOKEN,
26
+ token: config?.apiKey ||
27
+ process.env.AGENT_PROTOCOL_TOKEN ||
28
+ process.env.GITLAB_PRIVATE_TOKEN,
25
29
  });
26
30
  }
27
31
  /**
@@ -31,7 +35,9 @@ class AgentProtocolClient {
31
35
  try {
32
36
  // 1. If it's a URI, resolve directly
33
37
  if (gaid.startsWith('uadp://') || gaid.startsWith('uadp://')) {
34
- const resolution = await resolveGaid(gaid, { token: this.client['token'] });
38
+ const resolution = await resolveGaid(gaid, {
39
+ token: this.client['token'],
40
+ });
35
41
  if (resolution.kind === 'agents') {
36
42
  const agent = await resolution.client.getAgent(resolution.name);
37
43
  return this.mapToDIDResult(agent, gaid);
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * Subcommands:
5
5
  * ossa workspace init - Initialize .agents-workspace/ structure
6
+ * ossa workspace validate - Run workspace health validators (from ai.json run_order or built-in)
6
7
  * ossa workspace list - List agents in workspace registry
7
8
  * ossa workspace policy check - Validate agent against workspace policies
8
9
  * ossa workspace policy list - List allowed/denied tools
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * Subcommands:
5
5
  * ossa workspace init - Initialize .agents-workspace/ structure
6
+ * ossa workspace validate - Run workspace health validators (from ai.json run_order or built-in)
6
7
  * ossa workspace list - List agents in workspace registry
7
8
  * ossa workspace policy check - Validate agent against workspace policies
8
9
  * ossa workspace policy list - List allowed/denied tools
@@ -14,6 +15,7 @@ import { DuadpClient } from '@bluefly/duadp';
14
15
  import chalk from 'chalk';
15
16
  import { Command } from 'commander';
16
17
  import * as fs from 'fs';
18
+ import { runWorkspaceValidate } from '../workspace-validate.js';
17
19
  import { glob } from 'glob';
18
20
  import * as path from 'path';
19
21
  import * as yaml from 'yaml';
@@ -150,6 +152,22 @@ Global conventions and standards that apply to all agents in this workspace.
150
152
  }
151
153
  });
152
154
  // ============================================================================
155
+ // Subcommand: workspace validate
156
+ // ============================================================================
157
+ workspaceCommand
158
+ .command('validate')
159
+ .description('Run workspace health validators. Uses ai.json control_primitives.run_order or control_primitives_run_order if present; otherwise runs built-in layout and registry checks.')
160
+ .option('--json', 'Pass --json to validators that support it')
161
+ .action(async (options) => {
162
+ try {
163
+ const result = runWorkspaceValidate({ cwd: process.cwd(), json: options.json });
164
+ process.exit(result.ok ? 0 : 1);
165
+ }
166
+ catch (error) {
167
+ handleCommandError(error);
168
+ }
169
+ });
170
+ // ============================================================================
153
171
  // Subcommand: workspace scaffold
154
172
  // ============================================================================
155
173
  workspaceCommand
@@ -520,7 +538,9 @@ workspaceCommand
520
538
  process.env.MESH_URL ||
521
539
  process.env.AGENT_REGISTRY_URL ||
522
540
  'https://registry.openstandardagents.org';
523
- const token = options.token || process.env.AGENT_PROTOCOL_TOKEN || process.env.GITLAB_PRIVATE_TOKEN;
541
+ const token = options.token ||
542
+ process.env.AGENT_PROTOCOL_TOKEN ||
543
+ process.env.GITLAB_PRIVATE_TOKEN;
524
544
  const cwd = process.cwd();
525
545
  const registryPath = path.resolve(cwd, getDefaultWorkspaceDir(), getWorkspaceRegistryPath());
526
546
  if (!fs.existsSync(registryPath)) {
@@ -564,7 +584,9 @@ workspaceCommand
564
584
  totalPublished++;
565
585
  }
566
586
  catch (e) {
567
- console.log(chalk.red(` ✗ Failed to publish `) + agentRef.name + `: ${e.message}`);
587
+ console.log(chalk.red(` ✗ Failed to publish `) +
588
+ agentRef.name +
589
+ `: ${e.message}`);
568
590
  totalFailed++;
569
591
  }
570
592
  }
@@ -596,7 +618,9 @@ workspaceCommand
596
618
  process.env.OSSA_REGISTRY_URL ||
597
619
  'https://registry.openstandardagents.org';
598
620
  const client = new DuadpClient(registryUrl);
599
- const res = await client.listAgents({ limit: parseInt(options.limit || '50', 10) });
621
+ const res = await client.listAgents({
622
+ limit: parseInt(options.limit || '50', 10),
623
+ });
600
624
  if (options.json) {
601
625
  console.log(JSON.stringify(res, null, 2));
602
626
  process.exit(0);
@@ -616,7 +640,7 @@ workspaceCommand
616
640
  }
617
641
  const caps = agent.spec?.capabilities || [];
618
642
  if (caps.length > 0) {
619
- console.log(chalk.gray(` Capabilities: ${caps.map((c) => typeof c === 'string' ? c : c.name).join(', ')}`));
643
+ console.log(chalk.gray(` Capabilities: ${caps.map((c) => (typeof c === 'string' ? c : c.name)).join(', ')}`));
620
644
  }
621
645
  }
622
646
  console.log('');
package/dist/cli/index.js CHANGED
@@ -15,7 +15,10 @@
15
15
  */
16
16
  import { program } from 'commander';
17
17
  import 'reflect-metadata';
18
+ import { installGlobalFetch } from '../utils/http-client.js';
18
19
  import { initializeAdapters } from '../adapters/index.js';
20
+ // Patch fetch globally — all HTTP calls get proxy support + OSSA user-agent
21
+ installGlobalFetch();
19
22
  // Core OSSA commands (platform-agnostic)
20
23
  import { agentsLocalCommandGroup } from './commands/agents-local.command.js';
21
24
  import { agentsMdCommand } from './commands/agents-md.command.js';
@@ -52,6 +55,7 @@ import { standardizeCommand } from './commands/standardize.command.js';
52
55
  import { testCommand } from './commands/test.command.js';
53
56
  import { updateCommand } from './commands/update.command.js';
54
57
  import { validateCommand } from './commands/validate.command.js';
58
+ import { executionProfileCommand, contextPackCommand, taskCommand, } from './commands/economics.command.js';
55
59
  import { wizardAPIFirstCommand } from './commands/wizard-api-first.command.js';
56
60
  import { wizardCommand } from './commands/wizard.command.js';
57
61
  // Agent Card (A2A discovery)
@@ -64,6 +68,7 @@ import { manifestCommandGroup } from './commands/manifest/index.js';
64
68
  import { mcpCommand } from './commands/mcp.command.js';
65
69
  import { registerCommand } from './commands/register.js';
66
70
  import { skillsCommandGroup } from './commands/skills.command.js';
71
+ import { usieSkillsCommandGroup } from './commands/usie-skills.command.js';
67
72
  import { taxonomyCommandGroup } from './commands/taxonomy.command.js';
68
73
  import { templateCommandGroup } from './commands/template.command.js';
69
74
  import { toolCommandGroup } from './commands/tool/index.js';
@@ -75,6 +80,8 @@ import { langchainCommand } from './commands/langchain.command.js';
75
80
  import { langflowCommand } from './commands/langflow.command.js';
76
81
  // Lifecycle & curation commands
77
82
  import { createLifecycleCommand } from './commands/lifecycle.command.js';
83
+ // Memory tier management
84
+ import { memoryCommand } from './commands/memory.command.js';
78
85
  // Additional commands (previously unregistered)
79
86
  import { agentWizardCommand } from './commands/agent-wizard.command.js';
80
87
  import { docsCommand } from './commands/docs.command.js';
@@ -202,6 +209,7 @@ program.addCommand(agentsCommandGroup);
202
209
  program.addCommand(agentsLocalCommandGroup);
203
210
  program.addCommand(agentCardCommand);
204
211
  program.addCommand(generateGaidCommand);
212
+ program.addCommand(memoryCommand);
205
213
  // --- Development ---
206
214
  program.addCommand(generateCommand);
207
215
  program.addCommand(daemonCommand);
@@ -227,6 +235,7 @@ program.addCommand(docsCommand);
227
235
  program.addCommand(platformsCommand);
228
236
  // --- Skills & Templates ---
229
237
  program.addCommand(skillsCommandGroup);
238
+ program.addCommand(usieSkillsCommandGroup()); // USIE: ingest/sync/list/preview on the mesh
230
239
  program.addCommand(templateCommandGroup);
231
240
  // --- Tool & Capability Management ---
232
241
  program.addCommand(toolCommandGroup);
@@ -239,6 +248,9 @@ program.addCommand(governanceCommand);
239
248
  program.addCommand(contractCommand);
240
249
  program.addCommand(signCommand);
241
250
  program.addCommand(policyCommand);
251
+ program.addCommand(executionProfileCommand);
252
+ program.addCommand(contextPackCommand);
253
+ program.addCommand(taskCommand);
242
254
  // --- Advanced (hidden from main --help, still fully accessible) ---
243
255
  for (const cmd of [
244
256
  quickstartCommand,
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Workspace validate – run ai.json control_primitives.run_order or built-in checks.
3
+ * No DI, no ValidationService. Safe to import from CLI or from package consumers.
4
+ */
5
+ export interface WorkspaceValidateResult {
6
+ ok: boolean;
7
+ results?: Array<{
8
+ script: string;
9
+ status: number;
10
+ duration_ms: number;
11
+ }>;
12
+ }
13
+ export interface WorkspaceValidateOptions {
14
+ cwd?: string;
15
+ json?: boolean;
16
+ runner?: string;
17
+ }
18
+ /**
19
+ * Run workspace validators from ai.json control_primitives.run_order, or built-in layout/registry checks.
20
+ * Returns result; caller should process.exit(result.ok ? 0 : 1) if used as CLI.
21
+ */
22
+ export declare function runWorkspaceValidate(options?: WorkspaceValidateOptions): WorkspaceValidateResult;
23
+ //# sourceMappingURL=workspace-validate.d.ts.map
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Workspace validate – run ai.json control_primitives.run_order or built-in checks.
3
+ * No DI, no ValidationService. Safe to import from CLI or from package consumers.
4
+ */
5
+ import { spawnSync } from 'node:child_process';
6
+ import * as fs from 'node:fs';
7
+ import * as path from 'node:path';
8
+ import * as yaml from 'yaml';
9
+ import chalk from 'chalk';
10
+ import { getDefaultWorkspaceDir, getRequiredWorkspaceDirs, getWorkspacePolicyPath, getWorkspaceRegistryPath, } from '../config/defaults.js';
11
+ const VALIDATE_TIMEOUT_MS = 30000;
12
+ /**
13
+ * Run workspace validators from ai.json control_primitives.run_order, or built-in layout/registry checks.
14
+ * Returns result; caller should process.exit(result.ok ? 0 : 1) if used as CLI.
15
+ */
16
+ export function runWorkspaceValidate(options = {}) {
17
+ const cwd = path.resolve(options.cwd ?? process.cwd());
18
+ const cwdResolved = cwd;
19
+ const workspaceDir = path.join(cwd, getDefaultWorkspaceDir());
20
+ if (!fs.existsSync(workspaceDir)) {
21
+ console.log(chalk.yellow('No .agents-workspace/ found'));
22
+ console.log(chalk.gray(' Run `ossa workspace init` first'));
23
+ return { ok: false };
24
+ }
25
+ const jsonArg = options.json ? ['--json'] : [];
26
+ const runner = options.runner ?? process.env.OSSA_VALIDATE_RUNNER ?? 'node';
27
+ let runOrder = [];
28
+ const aiPath = path.join(cwd, 'ai.json');
29
+ if (fs.existsSync(aiPath)) {
30
+ try {
31
+ const ai = JSON.parse(fs.readFileSync(aiPath, 'utf-8'));
32
+ runOrder =
33
+ ai.control_primitives?.run_order ??
34
+ ai.control_primitives_run_order ??
35
+ [];
36
+ }
37
+ catch {
38
+ // ignore
39
+ }
40
+ }
41
+ if (runOrder.length > 0) {
42
+ const results = [];
43
+ if (!options.json) {
44
+ console.log(chalk.blue('Running workspace validators from ai.json run_order...'));
45
+ }
46
+ for (const script of runOrder) {
47
+ const scriptPath = path.join(workspaceDir, script);
48
+ const atRoot = path.join(cwd, script);
49
+ const resolved = fs.existsSync(atRoot) ? atRoot : fs.existsSync(scriptPath) ? scriptPath : null;
50
+ if (!resolved) {
51
+ if (!options.json)
52
+ console.log(chalk.gray(` Skip ${script} (not found)`));
53
+ continue;
54
+ }
55
+ const resolvedAbs = path.resolve(resolved);
56
+ if (!resolvedAbs.startsWith(cwdResolved)) {
57
+ console.error(chalk.red('Invalid script path (must be under cwd)'));
58
+ return { ok: false, results };
59
+ }
60
+ const start = Date.now();
61
+ const result = spawnSync(runner, [resolvedAbs, ...jsonArg], {
62
+ cwd,
63
+ stdio: 'inherit',
64
+ encoding: 'utf-8',
65
+ env: process.env,
66
+ timeout: VALIDATE_TIMEOUT_MS,
67
+ });
68
+ const duration_ms = Date.now() - start;
69
+ const status = result.status ?? (result.signal ? 1 : 0);
70
+ results.push({ script, status, duration_ms });
71
+ if (status !== 0) {
72
+ if (options.json)
73
+ console.log(JSON.stringify({ results, ok: false }));
74
+ return { ok: false, results };
75
+ }
76
+ }
77
+ if (options.json)
78
+ console.log(JSON.stringify({ results, ok: true }));
79
+ else
80
+ console.log(chalk.green('Workspace validation passed'));
81
+ return { ok: true, results };
82
+ }
83
+ if (!options.json)
84
+ console.log(chalk.blue('Running built-in workspace checks...'));
85
+ const dirs = getRequiredWorkspaceDirs();
86
+ for (const d of dirs) {
87
+ const p = path.join(workspaceDir, d);
88
+ if (!fs.existsSync(p) || !fs.statSync(p).isDirectory()) {
89
+ console.error(chalk.red(`Missing or not a directory: .agents-workspace/${d}`));
90
+ return { ok: false };
91
+ }
92
+ }
93
+ const registryPath = path.join(workspaceDir, getWorkspaceRegistryPath());
94
+ const policyPath = path.join(workspaceDir, getWorkspacePolicyPath());
95
+ if (fs.existsSync(registryPath)) {
96
+ try {
97
+ yaml.parse(fs.readFileSync(registryPath, 'utf-8'));
98
+ }
99
+ catch (e) {
100
+ console.error(chalk.red('Invalid registry YAML:'), e.message);
101
+ return { ok: false };
102
+ }
103
+ }
104
+ if (fs.existsSync(policyPath)) {
105
+ try {
106
+ yaml.parse(fs.readFileSync(policyPath, 'utf-8'));
107
+ }
108
+ catch (e) {
109
+ console.error(chalk.red('Invalid policy YAML:'), e.message);
110
+ return { ok: false };
111
+ }
112
+ }
113
+ if (!options.json)
114
+ console.log(chalk.green('Workspace validation passed'));
115
+ return { ok: true };
116
+ }
117
+ //# sourceMappingURL=workspace-validate.js.map
@@ -439,10 +439,7 @@ export const PLATFORM_MATRIX = [
439
439
  '.agents/{name}/src/ (Python agent code)',
440
440
  'requirements.txt with agentscope',
441
441
  ],
442
- sdkNpm: [
443
- 'agentscope (PyPI)',
444
- 'agentscope[service] (with tool service)',
445
- ],
442
+ sdkNpm: ['agentscope (PyPI)', 'agentscope[service] (with tool service)'],
446
443
  exportHow: 'ossa export <manifest> --platform agentscope -o dist/',
447
444
  importHow: 'partial',
448
445
  specUsage: [