mcoda 0.1.85 → 0.1.87

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/CHANGELOG.md CHANGED
@@ -3,6 +3,8 @@
3
3
  ## Unreleased
4
4
  - Initial npm packaging scaffold for the mcoda CLI.
5
5
  - Added bundled mswarm consent terms plus guided `mcoda setup`/postinstall consent bootstrap for installed CLI packages.
6
+ - Add `mcoda self-hosted` client identity flags and show node allowlist
7
+ metadata returned by mswarm.
6
8
 
7
9
  ## 0.1.78
8
10
  - Added owner-local GPU job commands: `mcoda gpu list`, `mcoda gpu ops`, and GPU-aware `mcoda job artifact upload|run|status|logs|events|artifacts|cancel|retry`.
@@ -45,7 +45,7 @@ const TOP_LEVEL_USAGE = 'Usage: mcoda <agent|cloud|cloud-agent|self-hosted|self-
45
45
  'Self-hosted agents: use `mcoda self-hosted agent list|details|sync` to discover and materialize owner-hosted mswarm agents.\n' +
46
46
  'Workers: use `mcoda workers list|details|sync|run` to discover, materialize, and invoke mswarm Workers.\n' +
47
47
  'GPU jobs: use `mcoda gpu list` and `mcoda job artifact upload|run|status|logs|events|artifacts|cancel` for owner-local generic GPU jobs.\n' +
48
- 'Expose this machine: install `@mcoda/mswarm`, then run `mswarm install <KEY>`.\n' +
48
+ 'Expose this machine: install `@mcoda/mswarm`, then run `mswarm node install <CLIENTS>`.\n' +
49
49
  'Aliases: `tasks order-by-deps` forwards to `order-tasks` (dependency-aware ordering), `task`/`task-detail` show a single task.\n' +
50
50
  'Help: use `mcoda help`, `mcoda --help`, `mcoda -h`, or `mcoda -H` for this overview.\n' +
51
51
  'Job commands (mcoda job --help for details): list|status|watch|logs|inspect|resume|cancel|tokens plus GPU job artifact|run|events|artifacts with node options\n' +
@@ -1 +1 @@
1
- {"version":3,"file":"SelfHostedCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/self-hosted/SelfHostedCommands.ts"],"names":[],"mappings":"AAyOA,qBAAa,kBAAkB;WAChB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAkGhD"}
1
+ {"version":3,"file":"SelfHostedCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/self-hosted/SelfHostedCommands.ts"],"names":[],"mappings":"AAsPA,qBAAa,kBAAkB;WAChB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAyGhD"}
@@ -8,6 +8,7 @@ Subcommands:
8
8
  --limit <N> Limit returned agents
9
9
  --include-unreachable Include unreachable agents in the catalog result
10
10
  --include-load-balanced Include auto-routed load-balanced self-hosted aliases
11
+ --client-identity <ID> Request agents allowed for this tenant/client identity
11
12
  --max-cost-per-1m-token <N>
12
13
  Exclude agents above the given cost_per_million
13
14
  --sorted-by-catalog-rating
@@ -16,10 +17,12 @@ Subcommands:
16
17
  --min-reasoning <N> Require at least this reasoning rating
17
18
  agent details <SLUG> Show a single mswarm self-hosted agent (supports --json)
18
19
  --include-load-balanced Allow details for auto-routed aliases
20
+ --client-identity <ID> Request details through this tenant/client identity
19
21
  agent sync Sync self-hosted agents into the local mcoda registry
20
22
  --provider <NAME> Filter by provider before syncing
21
23
  --include-unreachable Sync unreachable agents too
22
24
  --include-load-balanced Sync auto-routed load-balanced aliases too
25
+ --client-identity <ID> Sync agents allowed for this tenant/client identity
23
26
  --limit <N> Limit synced agents
24
27
  --prune Remove previously synced self-hosted agents missing from the current catalog result
25
28
  --agent-slug-prefix <P> Override the local managed-agent slug prefix
@@ -35,12 +38,13 @@ Environment:
35
38
  MCODA_MSWARM_OPENAI_BASE_URL
36
39
  MCODA_MSWARM_API_KEY
37
40
  MCODA_MSWARM_TIMEOUT_MS
41
+ MCODA_MSWARM_CLIENT_IDENTITY
38
42
  MCODA_MSWARM_SELF_HOSTED_AGENT_SLUG_PREFIX
39
43
  Or persist the API key with: mcoda config set mswarm-api-key <KEY>
40
44
 
41
45
  To expose this machine's local agents:
42
46
  npm install -g @mcoda/mswarm
43
- mswarm install <KEY>
47
+ mswarm node install <CLIENTS>
44
48
 
45
49
  Flags:
46
50
  --json Emit JSON for supported commands
@@ -107,6 +111,9 @@ const resolveNonNegativeNumber = (value, label) => {
107
111
  const formatNumber = (value) => value === undefined || Number.isNaN(value) ? "-" : String(value);
108
112
  const formatCapabilities = (capabilities) => capabilities && capabilities.length > 0 ? capabilities.join(",") : "-";
109
113
  const formatBoolean = (value) => value === undefined ? "-" : value ? "yes" : "no";
114
+ const formatClientAllowlist = (allowlist) => allowlist && allowlist.length
115
+ ? allowlist.map((entry) => `${entry.kind}:${entry.value}`).join(",")
116
+ : "-";
110
117
  const agentRoutingMode = (agent) => agent.load_balanced ? "auto" : "direct";
111
118
  const pad = (value, width) => value.padEnd(width, " ");
112
119
  const renderTable = (headers, rows) => {
@@ -178,6 +185,8 @@ const printAgentDetails = (agent) => {
178
185
  ["Supports tools", formatBoolean(agent.supports_tools)],
179
186
  ["Supports reasoning", formatBoolean(agent.supports_reasoning)],
180
187
  ["Health", agent.health_status ?? "-"],
188
+ ["Client identity", agent.client_identity ?? "-"],
189
+ ["Client allowlist", formatClientAllowlist(agent.client_allowlist)],
181
190
  ["Members", formatNumber(agent.member_count)],
182
191
  ["Capabilities", formatCapabilities(agent.capabilities)],
183
192
  ];
@@ -223,12 +232,15 @@ export class SelfHostedCommands {
223
232
  return;
224
233
  }
225
234
  const parsed = parseArgs(rest);
235
+ const clientIdentity = resolveString(parsed.flags["client-identity"]) ??
236
+ resolveString(parsed.flags.client);
226
237
  const api = await MswarmApi.create({
227
238
  baseUrl: resolveString(parsed.flags["base-url"]),
228
239
  openAiBaseUrl: resolveString(parsed.flags["openai-base-url"]),
229
240
  apiKey: resolveString(parsed.flags["api-key"]),
230
241
  timeoutMs: resolvePositiveInt(parsed.flags["timeout-ms"], "--timeout-ms"),
231
242
  selfHostedAgentSlugPrefix: resolveString(parsed.flags["agent-slug-prefix"]),
243
+ clientIdentity,
232
244
  });
233
245
  try {
234
246
  switch (subcommand) {
@@ -238,6 +250,7 @@ export class SelfHostedCommands {
238
250
  limit: resolvePositiveInt(parsed.flags.limit, "--limit"),
239
251
  includeUnreachable: Boolean(parsed.flags["include-unreachable"]),
240
252
  includeLoadBalanced: Boolean(parsed.flags["include-load-balanced"]),
253
+ clientIdentity,
241
254
  maxCostPerMillion: resolveNonNegativeNumber(parsed.flags["max-cost-per-1m-token"], "--max-cost-per-1m-token"),
242
255
  minContextWindow: resolvePositiveInt(parsed.flags["min-context"], "--min-context"),
243
256
  minReasoningRating: resolveNonNegativeNumber(parsed.flags["min-reasoning"], "--min-reasoning"),
@@ -259,6 +272,7 @@ export class SelfHostedCommands {
259
272
  }
260
273
  const agent = await api.getSelfHostedAgent(slug, {
261
274
  includeLoadBalanced: Boolean(parsed.flags["include-load-balanced"]),
275
+ clientIdentity,
262
276
  });
263
277
  if (parsed.flags.json) {
264
278
  // eslint-disable-next-line no-console
@@ -275,6 +289,7 @@ export class SelfHostedCommands {
275
289
  limit: resolvePositiveInt(parsed.flags.limit, "--limit"),
276
290
  includeUnreachable: Boolean(parsed.flags["include-unreachable"]),
277
291
  includeLoadBalanced: Boolean(parsed.flags["include-load-balanced"]),
292
+ clientIdentity,
278
293
  pruneMissing: Boolean(parsed.flags.prune),
279
294
  });
280
295
  if (parsed.flags.json) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcoda",
3
- "version": "0.1.85",
3
+ "version": "0.1.87",
4
4
  "description": "Local-first CLI for planning, documentation, and execution workflows with agent assistance.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -47,12 +47,12 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "yaml": "^2.4.2",
50
- "@mcoda/core": "0.1.85",
51
- "@mcoda/shared": "0.1.85"
50
+ "@mcoda/shared": "0.1.87",
51
+ "@mcoda/core": "0.1.87"
52
52
  },
53
53
  "devDependencies": {
54
- "@mcoda/db": "0.1.85",
55
- "@mcoda/integrations": "0.1.85"
54
+ "@mcoda/db": "0.1.87",
55
+ "@mcoda/integrations": "0.1.87"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsc -p tsconfig.json",