mcoda 0.1.74 → 0.1.76

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
@@ -4,6 +4,10 @@
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
6
 
7
+ ## 0.1.76
8
+ - Added top-level help aliases: `mcoda help`, `mcoda --help`, `mcoda -h`, and `mcoda -H`.
9
+ - Release v0.1.76.
10
+
7
11
  ## 0.1.9
8
12
  - Release v0.1.9.
9
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"McodaEntrypoint.d.ts","sourceRoot":"","sources":["../../src/bin/McodaEntrypoint.ts"],"names":[],"mappings":";AAsCA,qBAAa,eAAe;WACb,GAAG,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CA4PxE"}
1
+ {"version":3,"file":"McodaEntrypoint.d.ts","sourceRoot":"","sources":["../../src/bin/McodaEntrypoint.ts"],"names":[],"mappings":";AAuDA,qBAAa,eAAe;WACb,GAAG,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CAoPxE"}
@@ -35,6 +35,20 @@ import { AgentRunCommand } from '../commands/agents/AgentRunCommand.js';
35
35
  import { SetWorkspaceCommand } from '../commands/workspace/SetWorkspaceCommand.js';
36
36
  import { ProjectGuidanceCommand } from '../commands/workspace/ProjectGuidanceCommand.js';
37
37
  import { MswarmConfigStore } from '@mcoda/core';
38
+ const TOP_LEVEL_USAGE = 'Usage: mcoda <agent|cloud|cloud-agent|self-hosted|self-hosted-agent|workers|worker|config|consent|setup|gateway-agent|test-agent|agent-run|routing|docs|openapi|job|jobs|tokens|telemetry|create-tasks|migrate-tasks|refine-tasks|task-sufficiency-audit|sds-preflight|order-tasks|tasks|add-tests|work-on-tasks|gateway-trio|code-review|qa-tasks|backlog|task|task-detail|estimate|update|set-workspace|project-guidance|pdr|sds> [...args]\n' +
39
+ 'Setup: use `mcoda setup` after installation (or accept the postinstall prompt) to complete the mandatory mswarm telemetry consent flow.\n' +
40
+ 'Config: use `mcoda config set mswarm-api-key <KEY>` to persist an encrypted mswarm API key in the resolved global mcoda config file.\n' +
41
+ 'Consent: use `mcoda consent accept` before other commands if you need to complete consent outside the guided setup flow.\n' +
42
+ 'Routing: use `mcoda routing defaults` to view/update workspace/global defaults, `mcoda routing preview|explain` to inspect agent selection/provenance (override → workspace_default → global_default).\n' +
43
+ 'Cloud agents: use `mcoda cloud agent list|details|sync` to discover and materialize mswarm-managed remote agents.\n' +
44
+ 'Self-hosted agents: use `mcoda self-hosted agent list|details|sync` to discover and materialize owner-hosted mswarm agents.\n' +
45
+ 'Workers: use `mcoda workers list|details|sync|run` to discover, materialize, and invoke mswarm Workers.\n' +
46
+ 'Expose this machine: install `@mcoda/mswarm`, then run `mswarm install <KEY>`.\n' +
47
+ 'Aliases: `tasks order-by-deps` forwards to `order-tasks` (dependency-aware ordering), `task`/`task-detail` show a single task.\n' +
48
+ 'Help: use `mcoda help`, `mcoda --help`, `mcoda -h`, or `mcoda -H` for this overview.\n' +
49
+ 'Job commands (mcoda job --help for details): list|status|watch|logs|inspect|resume|cancel|tokens\n' +
50
+ 'Jobs API required for job commands (set MCODA_API_BASE_URL/MCODA_JOBS_API_URL or workspace api.baseUrl). status/watch/logs exit non-zero on failed/cancelled jobs per SDS.';
51
+ const TOP_LEVEL_HELP_COMMANDS = new Set(['--help', '-h', '-H', 'help']);
38
52
  export class McodaEntrypoint {
39
53
  static async run(argv = process.argv.slice(2)) {
40
54
  const applyCodexNoSandboxFlag = (value) => {
@@ -89,19 +103,13 @@ export class McodaEntrypoint {
89
103
  console.log(packageJson.version ?? 'dev');
90
104
  return;
91
105
  }
106
+ if (command && TOP_LEVEL_HELP_COMMANDS.has(command)) {
107
+ // eslint-disable-next-line no-console
108
+ console.log(TOP_LEVEL_USAGE);
109
+ return;
110
+ }
92
111
  if (!command) {
93
- throw new Error('Usage: mcoda <agent|cloud|cloud-agent|self-hosted|self-hosted-agent|workers|worker|config|consent|setup|gateway-agent|test-agent|agent-run|routing|docs|openapi|job|jobs|tokens|telemetry|create-tasks|migrate-tasks|refine-tasks|task-sufficiency-audit|sds-preflight|order-tasks|tasks|add-tests|work-on-tasks|gateway-trio|code-review|qa-tasks|backlog|task|task-detail|estimate|update|set-workspace|project-guidance|pdr|sds> [...args]\n' +
94
- 'Setup: use `mcoda setup` after installation (or accept the postinstall prompt) to complete the mandatory mswarm telemetry consent flow.\n' +
95
- 'Config: use `mcoda config set mswarm-api-key <KEY>` to persist an encrypted mswarm API key in the resolved global mcoda config file.\n' +
96
- 'Consent: use `mcoda consent accept` before other commands if you need to complete consent outside the guided setup flow.\n' +
97
- 'Routing: use `mcoda routing defaults` to view/update workspace/global defaults, `mcoda routing preview|explain` to inspect agent selection/provenance (override → workspace_default → global_default).\n' +
98
- 'Cloud agents: use `mcoda cloud agent list|details|sync` to discover and materialize mswarm-managed remote agents.\n' +
99
- 'Self-hosted agents: use `mcoda self-hosted agent list|details|sync` to discover and materialize owner-hosted mswarm agents.\n' +
100
- 'Workers: use `mcoda workers list|details|sync|run` to discover, materialize, and invoke mswarm Workers.\n' +
101
- 'Expose this machine: install `@mcoda/mswarm`, then run `mswarm install <KEY>`.\n' +
102
- 'Aliases: `tasks order-by-deps` forwards to `order-tasks` (dependency-aware ordering), `task`/`task-detail` show a single task.\n' +
103
- 'Job commands (mcoda job --help for details): list|status|watch|logs|inspect|resume|cancel|tokens\n' +
104
- 'Jobs API required for job commands (set MCODA_API_BASE_URL/MCODA_JOBS_API_URL or workspace api.baseUrl). status/watch/logs exit non-zero on failed/cancelled jobs per SDS.');
112
+ throw new Error(TOP_LEVEL_USAGE);
105
113
  }
106
114
  if (!['config', 'consent', 'setup'].includes(command)) {
107
115
  const consentState = await new MswarmConfigStore().readState();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcoda",
3
- "version": "0.1.74",
3
+ "version": "0.1.76",
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.74",
51
- "@mcoda/shared": "0.1.74"
50
+ "@mcoda/shared": "0.1.76",
51
+ "@mcoda/core": "0.1.76"
52
52
  },
53
53
  "devDependencies": {
54
- "@mcoda/db": "0.1.74",
55
- "@mcoda/integrations": "0.1.74"
54
+ "@mcoda/db": "0.1.76",
55
+ "@mcoda/integrations": "0.1.76"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsc -p tsconfig.json",