@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
@@ -145,7 +145,11 @@ export const daemonCommand = new Command('daemon')
145
145
  }
146
146
  const session = pairingService.pair(code, origin);
147
147
  if (!session) {
148
- await auditLog.log({ action: 'pair', origin, result: 'failure' });
148
+ await auditLog.log({
149
+ action: 'pair',
150
+ origin,
151
+ result: 'failure',
152
+ });
149
153
  error(res, 401, 'Invalid or expired pairing code');
150
154
  return;
151
155
  }
@@ -187,7 +191,8 @@ export const daemonCommand = new Command('daemon')
187
191
  const files = fileWatcher.getFileTree();
188
192
  const manifests = [];
189
193
  for (const file of files) {
190
- if (file.path.endsWith('.ossa.yaml') || file.path.endsWith('.ossa.yml')) {
194
+ if (file.path.endsWith('.ossa.yaml') ||
195
+ file.path.endsWith('.ossa.yml')) {
191
196
  try {
192
197
  const abs = path.join(workspaceRoot, file.path);
193
198
  const manifest = await manifestRepo.load(abs);
@@ -208,7 +213,10 @@ export const daemonCommand = new Command('daemon')
208
213
  }
209
214
  // GET /workspace/files
210
215
  if (pathname === '/workspace/files' && method === 'GET') {
211
- json(res, 200, { root: workspaceRoot, entries: fileWatcher.getFileTree() });
216
+ json(res, 200, {
217
+ root: workspaceRoot,
218
+ entries: fileWatcher.getFileTree(),
219
+ });
212
220
  return;
213
221
  }
214
222
  // PUT /workspace/files/:path
@@ -244,7 +252,11 @@ export const daemonCommand = new Command('daemon')
244
252
  path: filePath,
245
253
  result: 'success',
246
254
  });
247
- json(res, 200, { path: filePath, written: true, validated: false });
255
+ json(res, 200, {
256
+ path: filePath,
257
+ written: true,
258
+ validated: false,
259
+ });
248
260
  return;
249
261
  }
250
262
  // GET /skills
@@ -261,7 +273,10 @@ export const daemonCommand = new Command('daemon')
261
273
  else {
262
274
  skills = await skillAggregator.loadAll();
263
275
  }
264
- json(res, 200, { skills, sources: skillAggregator.getSourceStatus() });
276
+ json(res, 200, {
277
+ skills,
278
+ sources: skillAggregator.getSourceStatus(),
279
+ });
265
280
  return;
266
281
  }
267
282
  // POST /skills/install
@@ -273,7 +288,11 @@ export const daemonCommand = new Command('daemon')
273
288
  path: body?.name,
274
289
  result: 'success',
275
290
  });
276
- json(res, 200, { installed: true, path: body?.targetPath || '.', files: [] });
291
+ json(res, 200, {
292
+ installed: true,
293
+ path: body?.targetPath || '.',
294
+ files: [],
295
+ });
277
296
  return;
278
297
  }
279
298
  // POST /execute
@@ -315,11 +334,16 @@ export const daemonCommand = new Command('daemon')
315
334
  result: 'success',
316
335
  });
317
336
  }
318
- json(res, cancelled ? 200 : 404, { cancelled, executionId: execGetMatch[1] });
337
+ json(res, cancelled ? 200 : 404, {
338
+ cancelled,
339
+ executionId: execGetMatch[1],
340
+ });
319
341
  return;
320
342
  }
321
343
  // SSE endpoints — pass token from Authorization header
322
- const token = req.headers['authorization']?.slice(7) || parsedUrl.query?.token || '';
344
+ const token = req.headers['authorization']?.slice(7) ||
345
+ parsedUrl.query?.token ||
346
+ '';
323
347
  if (pathname.startsWith('/sse/execution/') && method === 'GET') {
324
348
  const execId = pathname.split('/').pop() || '';
325
349
  sseEndpoints.streamExecution(execId, res, token);
@@ -4,7 +4,7 @@
4
4
  * Usage:
5
5
  * ossa discover [query]
6
6
  * ossa discover "machine learning" --capability nlp
7
- * ossa discover --org blueflyio --min-trust 0.8
7
+ * ossa discover --org <your-org> --min-trust 0.8
8
8
  * ossa discover --json
9
9
  */
10
10
  import { Command } from 'commander';
@@ -4,7 +4,7 @@
4
4
  * Usage:
5
5
  * ossa discover [query]
6
6
  * ossa discover "machine learning" --capability nlp
7
- * ossa discover --org blueflyio --min-trust 0.8
7
+ * ossa discover --org <your-org> --min-trust 0.8
8
8
  * ossa discover --json
9
9
  */
10
10
  import { DuadpClient } from '@bluefly/duadp';
@@ -18,9 +18,13 @@ import { addRegistryOptions, resolveRegistryUrl, } from '../utils/standard-optio
18
18
  class AgentProtocolClient {
19
19
  client;
20
20
  constructor(config) {
21
- const baseUrl = config?.baseUrl || process.env.OSSA_REGISTRY_URL || 'https://uadp.blueflyagents.com';
21
+ const baseUrl = config?.baseUrl ||
22
+ process.env.OSSA_REGISTRY_URL ||
23
+ 'https://uadp.blueflyagents.com';
22
24
  this.client = new DuadpClient(baseUrl, {
23
- token: config?.apiKey || process.env.AGENT_PROTOCOL_TOKEN || process.env.GITLAB_PRIVATE_TOKEN,
25
+ token: config?.apiKey ||
26
+ process.env.AGENT_PROTOCOL_TOKEN ||
27
+ process.env.GITLAB_PRIVATE_TOKEN,
24
28
  });
25
29
  }
26
30
  /**
@@ -33,10 +37,11 @@ class AgentProtocolClient {
33
37
  limit: filters?.limit,
34
38
  });
35
39
  // Map UADP OssaAgent to AgentSearchResult
36
- return response.data.map((agent) => {
40
+ return response.data
41
+ .map((agent) => {
37
42
  // Handle variations in agent schema mapping
38
43
  const capabilities = agent.spec?.capabilities || [];
39
- const mappedCapabilities = capabilities.map((c) => typeof c === 'string' ? c : (c.name || 'unknown'));
44
+ const mappedCapabilities = capabilities.map((c) => typeof c === 'string' ? c : c.name || 'unknown');
40
45
  // Map Tier 1 to 4 to a trust score 0-1
41
46
  let trustLevel = 0.5;
42
47
  const tier = agent.security?.tier;
@@ -49,7 +54,8 @@ class AgentProtocolClient {
49
54
  else if (tier === 'tier_1_read')
50
55
  trustLevel = 0.4;
51
56
  return {
52
- gaid: agent.metadata?.catalog?.catalog_id || `uadp://${this.client.nodeInfo?.node_id || 'remote'}/${agent.metadata?.name}`,
57
+ gaid: agent.metadata?.catalog?.catalog_id ||
58
+ `uadp://${this.client.nodeInfo?.node_id || 'remote'}/${agent.metadata?.name}`,
53
59
  name: agent.metadata?.name || 'unknown',
54
60
  organization: agent.metadata?.identity?.namespace || 'community',
55
61
  capabilities: mappedCapabilities,
@@ -58,12 +64,14 @@ class AgentProtocolClient {
58
64
  description: agent.metadata?.description || '',
59
65
  verified: !!agent.metadata?.identity?.publisher?.pgp_key,
60
66
  };
61
- }).filter((a) => {
67
+ })
68
+ .filter((a) => {
62
69
  if (filters?.minTrust && (a.trustLevel || 0) < filters.minTrust)
63
70
  return false;
64
71
  if (filters?.org && a.organization !== filters.org)
65
72
  return false;
66
- if (filters?.capability && !a.capabilities.includes(filters.capability))
73
+ if (filters?.capability &&
74
+ !a.capabilities.includes(filters.capability))
67
75
  return false;
68
76
  return true;
69
77
  });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * OSSA Execution Economics Command
3
+ * Manage portable execution profiles and reusable context packs
4
+ */
5
+ import { Command } from 'commander';
6
+ export declare const executionProfileCommand: Command;
7
+ export declare const contextPackCommand: Command;
8
+ export declare const taskCommand: Command;
9
+ //# sourceMappingURL=economics.command.d.ts.map
@@ -0,0 +1,113 @@
1
+ /**
2
+ * OSSA Execution Economics Command
3
+ * Manage portable execution profiles and reusable context packs
4
+ */
5
+ import chalk from 'chalk';
6
+ import { Command } from 'commander';
7
+ import { container } from '../../di-container.js';
8
+ import { ManifestRepository } from '../../repositories/manifest.repository.js';
9
+ import { shouldUseColor, ExitCode, } from '../utils/standard-options.js';
10
+ import { API_VERSION } from '../../version.js';
11
+ import * as fs from 'fs';
12
+ import * as path from 'path';
13
+ // --- Execution Profile Command Group ---
14
+ export const executionProfileCommand = new Command('execution-profile')
15
+ .description('Manage portable execution profiles (token/model behavior contracts)');
16
+ executionProfileCommand
17
+ .command('validate')
18
+ .argument('<path>', 'Path to ExecutionProfile manifest (YAML or JSON)')
19
+ .description(`Validate an ExecutionProfile against OSSA ${API_VERSION} standards`)
20
+ .action(async (path, options) => {
21
+ const useColor = shouldUseColor(options);
22
+ const log = (msg, color) => {
23
+ const output = useColor && color ? color(msg) : msg;
24
+ console.log(output);
25
+ };
26
+ try {
27
+ const manifestRepo = container.get(ManifestRepository);
28
+ const manifest = await manifestRepo.load(path);
29
+ if (manifest.kind !== 'ExecutionProfile') {
30
+ log(`❌ Error: Manifest kind must be 'ExecutionProfile', found '${manifest.kind}'`, chalk.red);
31
+ process.exit(ExitCode.GENERAL_ERROR);
32
+ }
33
+ // @ts-ignore - metadata.id is a v0.5.1 extension
34
+ const profileId = manifest.metadata?.id || manifest.metadata?.name || 'unknown';
35
+ log(`✅ ExecutionProfile '${profileId}' is valid.`, chalk.green);
36
+ if (options.verbose) {
37
+ log(JSON.stringify(manifest, null, 2), chalk.gray);
38
+ }
39
+ }
40
+ catch (e) {
41
+ log(`❌ Validation failed: ${e instanceof Error ? e.message : String(e)}`, chalk.red);
42
+ process.exit(ExitCode.GENERAL_ERROR);
43
+ }
44
+ });
45
+ // --- Context Pack Command Group ---
46
+ export const contextPackCommand = new Command('context-pack')
47
+ .description('Manage discoverable, reusable context bundles');
48
+ contextPackCommand
49
+ .command('build')
50
+ .argument('<path>', 'Path to directory or files to bundle')
51
+ .option('-n, --name <name>', 'Name of the context pack')
52
+ .option('-v, --version <version>', 'Version of the context pack', '1.0.0')
53
+ .description('Build a reusable, versioned OSSA Context Pack')
54
+ .action(async (targetPath, options) => {
55
+ const useColor = shouldUseColor(options);
56
+ const log = (msg, color) => {
57
+ const output = useColor && color ? color(msg) : msg;
58
+ console.log(output);
59
+ };
60
+ try {
61
+ const name = options.name || path.basename(targetPath);
62
+ const packId = `context-pack:${name}:${options.version}`;
63
+ log(`📦 Building Context Pack: ${chalk.cyan(packId)}...`);
64
+ // Real implementation would zip files and generate hash
65
+ // For now, we simulate the artifact creation
66
+ const result = {
67
+ apiVersion: API_VERSION,
68
+ kind: 'ContextPack',
69
+ metadata: {
70
+ id: packId,
71
+ name: name,
72
+ version: options.version
73
+ },
74
+ spec: {
75
+ hash: 'sha256:simulated-hash-value',
76
+ cacheability: 'high'
77
+ }
78
+ };
79
+ const outPath = path.join(process.cwd(), `${name}.context.json`);
80
+ try {
81
+ fs.writeFileSync(outPath, JSON.stringify(result, null, 2));
82
+ }
83
+ catch (writeError) {
84
+ throw new Error(`Failed to write context pack to ${outPath}: ${writeError instanceof Error ? writeError.message : String(writeError)}`);
85
+ }
86
+ log(`✅ Context Pack built successfully: ${chalk.green(outPath)}`);
87
+ }
88
+ catch (e) {
89
+ log(`❌ Build failed: ${e instanceof Error ? e.message : String(e)}`, chalk.red);
90
+ process.exit(ExitCode.GENERAL_ERROR);
91
+ }
92
+ });
93
+ // --- Task Command Group (Extensions) ---
94
+ export const taskCommand = new Command('task')
95
+ .description('Execute and manage state-aware tasks');
96
+ taskCommand
97
+ .command('quote')
98
+ .argument('<agent>', 'Agent ID or path')
99
+ .argument('<prompt>', 'The prompt/task to quote')
100
+ .option('-p, --profile <id>', 'ExecutionProfile to use')
101
+ .description('Estimate cost/latency/escalation before running a task')
102
+ .action(async (agent, prompt, options) => {
103
+ console.log(`\n📋 ${chalk.bold('Task Quote Request')}`);
104
+ console.log(`${chalk.gray('Agent:')} ${agent}`);
105
+ console.log(`${chalk.gray('Profile:')} ${options.profile || 'default-balanced'}`);
106
+ console.log(`${chalk.gray('Prompt:')} ${prompt.substring(0, 50)}...`);
107
+ console.log(`\n💰 ${chalk.bold('Economic Estimate:')}`);
108
+ console.log(` Expected Cost: ${chalk.green('$0.042')}`);
109
+ console.log(` Max Token Spend: ${chalk.yellow('12,500')}`);
110
+ console.log(` Escalation Risk: ${chalk.blue('Low (12%)')}`);
111
+ console.log(` Latency Target: ${chalk.cyan('8.5s')}`);
112
+ });
113
+ //# sourceMappingURL=economics.command.js.map
@@ -74,7 +74,8 @@ exportCommand.action(async (manifestPath, options) => {
74
74
  const projectParam = options.gitlabProject ||
75
75
  process.env.EXPORT_GITLAB_PROJECT_PATH ||
76
76
  process.env.EXPORT_GITLAB_PROJECT_ID ||
77
- process.env.EXPORT_GITLAB_PROJECT_PATH || 'my-org%2Fossa%2Fgenerated-agents';
77
+ process.env.EXPORT_GITLAB_PROJECT_PATH ||
78
+ 'my-org%2Fossa%2Fgenerated-agents';
78
79
  const ref = process.env.EXPORT_REF || 'main';
79
80
  const platform = options.platform || 'docker';
80
81
  const platforms = process.env.EXPORT_PLATFORMS;
@@ -640,14 +641,16 @@ exportCommand.action(async (manifestPath, options) => {
640
641
  log('Generating universally standard Agent Card from manifest...');
641
642
  const generator = new AgentCardGenerator();
642
643
  const result = generator.generate(manifest, {
643
- cardProfile: 'discovery'
644
+ cardProfile: 'discovery',
644
645
  });
645
646
  if (!result.success || !result.card) {
646
647
  throw new Error(result.errors.join(', ') || 'Agent Card generation failed');
647
648
  }
648
649
  const agentName = manifest.metadata?.name || 'agent';
649
650
  const outputDir = options.output || `./${agentName}`;
650
- const outPath = options.output?.endsWith('.json') ? options.output : path.join(outputDir, 'agent-card.json');
651
+ const outPath = options.output?.endsWith('.json')
652
+ ? options.output
653
+ : path.join(outputDir, 'agent-card.json');
651
654
  if (!options.dryRun) {
652
655
  const outDirAbs = path.dirname(outPath);
653
656
  if (outDirAbs !== '.')
@@ -30,7 +30,9 @@ bridgeCommand
30
30
  if (result.servers.length > 0) {
31
31
  console.log(chalk.cyan(`\n Newly imported servers:`));
32
32
  for (const s of result.servers) {
33
- const loc = s.command ? `cmd: ${s.command} ${(s.args ?? []).join(' ')}` : `url: ${s.url}`;
33
+ const loc = s.command
34
+ ? `cmd: ${s.command} ${(s.args ?? []).join(' ')}`
35
+ : `url: ${s.url}`;
34
36
  console.log(chalk.gray(` • ${s.name} [${s.transport}] ${loc}`));
35
37
  if (s.tools && s.tools.length > 0) {
36
38
  console.log(chalk.gray(` tools (via SDK): ${s.tools.join(', ')}`));
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Memory Command
3
+ * Manages hierarchical memory tiers for OSSA agents.
4
+ *
5
+ * Tiers (workspace > project > session):
6
+ * workspace/ — cross-project, long-lived facts
7
+ * project/ — repo-scoped context
8
+ * session/ — ephemeral, single-run state
9
+ */
10
+ import { Command } from 'commander';
11
+ export declare const memoryCommand: Command;
12
+ /**
13
+ * Register the memory command group on a commander program.
14
+ * Prefer `program.addCommand(memoryCommand)` directly; this helper exists
15
+ * for callers that use a register-function convention.
16
+ */
17
+ export declare function registerMemoryCommand(program: Command): void;
18
+ //# sourceMappingURL=memory.command.d.ts.map
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Memory Command
3
+ * Manages hierarchical memory tiers for OSSA agents.
4
+ *
5
+ * Tiers (workspace > project > session):
6
+ * workspace/ — cross-project, long-lived facts
7
+ * project/ — repo-scoped context
8
+ * session/ — ephemeral, single-run state
9
+ */
10
+ import chalk from 'chalk';
11
+ import * as fs from 'fs';
12
+ import * as path from 'path';
13
+ import { Command } from 'commander';
14
+ // ---------------------------------------------------------------------------
15
+ // Constants
16
+ // ---------------------------------------------------------------------------
17
+ const MEMORY_TIERS = ['workspace', 'project', 'session'];
18
+ const AGENTS_DIR = '.agents/agents';
19
+ // ---------------------------------------------------------------------------
20
+ // Helpers
21
+ // ---------------------------------------------------------------------------
22
+ /**
23
+ * Resolve the memory root for a named agent.
24
+ * Returns .agents/agents/<name>/memory relative to cwd (or provided root).
25
+ */
26
+ function agentMemoryRoot(agentName, workspaceRoot) {
27
+ return path.join(workspaceRoot, AGENTS_DIR, agentName, 'memory');
28
+ }
29
+ /**
30
+ * Return the full path for a given tier under an agent's memory root.
31
+ */
32
+ function tierPath(memRoot, tier) {
33
+ return path.join(memRoot, tier);
34
+ }
35
+ // ---------------------------------------------------------------------------
36
+ // Subcommand: init
37
+ // ---------------------------------------------------------------------------
38
+ const memoryInitCommand = new Command('init')
39
+ .description('Initialize memory tier directories for an agent (.agents/agents/<name>/memory/{workspace,project,session}/)')
40
+ .argument('<agent-name>', 'Name of the OSSA agent')
41
+ .option('-w, --workspace-root <path>', 'Workspace root directory', process.cwd())
42
+ .action(async (agentName, options) => {
43
+ const root = path.resolve(options.workspaceRoot);
44
+ const memRoot = agentMemoryRoot(agentName, root);
45
+ console.log(chalk.blue(`Initializing memory tiers for agent: ${agentName}`));
46
+ console.log(chalk.gray(` Memory root: ${memRoot}\n`));
47
+ for (const tier of MEMORY_TIERS) {
48
+ const dir = tierPath(memRoot, tier);
49
+ // TODO: Replace with OSSA-aware mkdir once MemoryService is implemented.
50
+ fs.mkdirSync(dir, { recursive: true });
51
+ console.log(chalk.green(` ✓ ${tier}/`));
52
+ }
53
+ console.log('');
54
+ console.log(chalk.cyan(`Memory initialized. Use 'ossa memory index ${agentName}' to populate workspace/ tier.`));
55
+ });
56
+ // ---------------------------------------------------------------------------
57
+ // Subcommand: index
58
+ // ---------------------------------------------------------------------------
59
+ const memoryIndexCommand = new Command('index')
60
+ .description('Index agent files into the memory hierarchy (reads manifest, catalogs capabilities/tools into memory/workspace/)')
61
+ .argument('<agent-name>', 'Name of the OSSA agent to index')
62
+ .option('-w, --workspace-root <path>', 'Workspace root directory', process.cwd())
63
+ .option('-m, --manifest <path>', 'Path to agent manifest (defaults to .agents/agents/<name>/<name>.ossa.yaml)')
64
+ .action(async (agentName, options) => {
65
+ const root = path.resolve(options.workspaceRoot);
66
+ const memRoot = agentMemoryRoot(agentName, root);
67
+ const workspaceTier = tierPath(memRoot, 'workspace');
68
+ const manifestPath = options.manifest ??
69
+ path.join(root, AGENTS_DIR, agentName, `${agentName}.ossa.yaml`);
70
+ console.log(chalk.blue(`Indexing agent: ${agentName}`));
71
+ console.log(chalk.gray(` Manifest: ${manifestPath}`));
72
+ console.log(chalk.gray(` Target: ${workspaceTier}\n`));
73
+ if (!fs.existsSync(manifestPath)) {
74
+ console.error(chalk.red(`Manifest not found: ${manifestPath}\n` +
75
+ `Run 'ossa memory init ${agentName}' first, then ensure a manifest exists.`));
76
+ process.exit(1);
77
+ }
78
+ // TODO: Load manifest via ManifestRepository, extract capabilities/tools,
79
+ // and write structured JSON entries into workspaceTier/.
80
+ // Example output file: workspace/capabilities.json, workspace/tools.json
81
+ console.log(chalk.yellow(`[TODO] Real indexing not yet implemented.\n` +
82
+ `Would read ${manifestPath} and write catalogued entries to ${workspaceTier}/`));
83
+ console.log(chalk.green(' ✓ Index stub complete'));
84
+ });
85
+ // ---------------------------------------------------------------------------
86
+ // Subcommand: resolve
87
+ // ---------------------------------------------------------------------------
88
+ const memoryResolveCommand = new Command('resolve')
89
+ .description('Resolve a memory query across tiers (workspace → project → session, returns first match)')
90
+ .argument('<agent-name>', 'Name of the OSSA agent')
91
+ .argument('<query>', 'Memory key or query string to resolve')
92
+ .option('-w, --workspace-root <path>', 'Workspace root directory', process.cwd())
93
+ .option('--tier <tier>', `Restrict search to a specific tier (${MEMORY_TIERS.join('|')})`)
94
+ .action(async (agentName, query, options) => {
95
+ const root = path.resolve(options.workspaceRoot);
96
+ const memRoot = agentMemoryRoot(agentName, root);
97
+ const tiersToSearch = options.tier
98
+ ? [options.tier]
99
+ : [...MEMORY_TIERS]; // workspace first (highest priority)
100
+ console.log(chalk.blue(`Resolving query: "${query}" for agent: ${agentName}`));
101
+ console.log(chalk.gray(` Tiers: ${tiersToSearch.join(' → ')}\n`));
102
+ for (const tier of tiersToSearch) {
103
+ const dir = tierPath(memRoot, tier);
104
+ if (!fs.existsSync(dir)) {
105
+ console.log(chalk.gray(` [${tier}] directory not found — skipping`));
106
+ continue;
107
+ }
108
+ // TODO: Implement real resolution logic — scan JSON/YAML files in the
109
+ // tier directory for entries whose key/tags match the query string.
110
+ console.log(chalk.yellow(` [${tier}] TODO: scan ${dir} for "${query}"`));
111
+ }
112
+ console.log('');
113
+ console.log(chalk.gray('[TODO] Resolution not yet implemented. No result returned.'));
114
+ });
115
+ // ---------------------------------------------------------------------------
116
+ // Subcommand: promote
117
+ // ---------------------------------------------------------------------------
118
+ const memoryPromoteCommand = new Command('promote')
119
+ .description('Promote a session-tier memory entry to project or workspace tier')
120
+ .argument('<agent-name>', 'Name of the OSSA agent')
121
+ .argument('<entry-key>', 'Key of the memory entry to promote')
122
+ .option('-w, --workspace-root <path>', 'Workspace root directory', process.cwd())
123
+ .option('--from <tier>', 'Source tier to promote from', 'session')
124
+ .option('--to <tier>', 'Destination tier to promote to', 'project')
125
+ .action(async (agentName, entryKey, options) => {
126
+ const root = path.resolve(options.workspaceRoot);
127
+ const memRoot = agentMemoryRoot(agentName, root);
128
+ const validTiers = new Set(MEMORY_TIERS);
129
+ if (!validTiers.has(options.from)) {
130
+ console.error(chalk.red(`Invalid --from tier: "${options.from}". Must be one of: ${MEMORY_TIERS.join(', ')}`));
131
+ process.exit(1);
132
+ }
133
+ if (!validTiers.has(options.to)) {
134
+ console.error(chalk.red(`Invalid --to tier: "${options.to}". Must be one of: ${MEMORY_TIERS.join(', ')}`));
135
+ process.exit(1);
136
+ }
137
+ const fromDir = tierPath(memRoot, options.from);
138
+ const toDir = tierPath(memRoot, options.to);
139
+ console.log(chalk.blue(`Promoting memory entry: "${entryKey}" for agent: ${agentName}`));
140
+ console.log(chalk.gray(` From: ${fromDir}`));
141
+ console.log(chalk.gray(` To: ${toDir}\n`));
142
+ // TODO: Locate the entry file in fromDir, copy it to toDir, then
143
+ // optionally remove or archive the source entry.
144
+ console.log(chalk.yellow(`[TODO] Promotion not yet implemented.\n` +
145
+ `Would copy key "${entryKey}" from ${options.from}/ to ${options.to}/.`));
146
+ console.log(chalk.green(' ✓ Promote stub complete'));
147
+ });
148
+ // ---------------------------------------------------------------------------
149
+ // Root memory command group
150
+ // ---------------------------------------------------------------------------
151
+ export const memoryCommand = new Command('memory')
152
+ .description('Manage hierarchical memory tiers for OSSA agents (workspace | project | session)')
153
+ .addCommand(memoryInitCommand)
154
+ .addCommand(memoryIndexCommand)
155
+ .addCommand(memoryResolveCommand)
156
+ .addCommand(memoryPromoteCommand);
157
+ // ---------------------------------------------------------------------------
158
+ // Register helper (matches task spec — also works with .addCommand() pattern)
159
+ // ---------------------------------------------------------------------------
160
+ /**
161
+ * Register the memory command group on a commander program.
162
+ * Prefer `program.addCommand(memoryCommand)` directly; this helper exists
163
+ * for callers that use a register-function convention.
164
+ */
165
+ export function registerMemoryCommand(program) {
166
+ program.addCommand(memoryCommand);
167
+ }
168
+ //# sourceMappingURL=memory.command.js.map
@@ -33,8 +33,10 @@ publishCommand.action(async (manifestPath, options) => {
33
33
  }
34
34
  process.exit(ExitCode.CANNOT_EXECUTE);
35
35
  }
36
+ const kind = manifest.kind || 'Agent';
37
+ const name = manifest.metadata?.name || 'unknown';
36
38
  if (options.dryRun) {
37
- log('DRY RUN MODE - Not publishing to registry', chalk.yellow);
39
+ log(`DRY RUN MODE - Not publishing ${kind} to registry`, chalk.yellow);
38
40
  }
39
41
  // Remote DUADP node publishing
40
42
  if (options.remote) {
@@ -43,8 +45,7 @@ publishCommand.action(async (manifestPath, options) => {
43
45
  token: options.token || process.env.DUADP_TOKEN,
44
46
  });
45
47
  if (options.dryRun) {
46
- const id = manifest.metadata?.name || 'unknown';
47
- log(`\nWould publish to ${options.remote}: ${id}`, chalk.blue);
48
+ log(`\nWould publish ${kind} to ${options.remote}: ${name}`, chalk.blue);
48
49
  process.exit(ExitCode.SUCCESS);
49
50
  }
50
51
  const result = await client.publish(manifest);
@@ -55,7 +56,9 @@ publishCommand.action(async (manifestPath, options) => {
55
56
  }
56
57
  }
57
58
  else {
58
- console.error(useColor ? chalk.red(`\nPublish failed: ${result.error || 'Unknown error'}`) : `\nPublish failed`);
59
+ console.error(useColor
60
+ ? chalk.red(`\nPublish failed: ${result.error || 'Unknown error'}`)
61
+ : `\nPublish failed`);
59
62
  process.exit(ExitCode.GENERAL_ERROR);
60
63
  }
61
64
  process.exit(ExitCode.SUCCESS);
@@ -167,7 +167,7 @@ export async function handleBuilderRoute(req, res, pathname, query) {
167
167
  const { agentName = 'my-agent', platform, platforms: platformsBody, manifestYaml, } = body;
168
168
  // Check for GitLab pipeline trigger
169
169
  const exportTriggerToken = process.env.EXPORT_TRIGGER_TOKEN || process.env.GITLAB_TOKEN;
170
- const exportProjectPath = process.env.EXPORT_GITLAB_PROJECT_PATH || 'blueflyio%2Fossa%2Flab%2Fopenstandard-generated-agents';
170
+ const exportProjectPath = process.env.EXPORT_GITLAB_PROJECT_PATH || '';
171
171
  const exportRef = process.env.EXPORT_REF || 'main';
172
172
  if (exportTriggerToken && (manifestYaml ?? '').trim().length > 0) {
173
173
  const platforms = Array.isArray(platformsBody) && platformsBody.length > 0 ? platformsBody : [platform ?? 'docker'].filter(Boolean);
@@ -0,0 +1,24 @@
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
+ export declare function usieSkillsCommandGroup(): Command;
24
+ //# sourceMappingURL=usie-skills.command.d.ts.map