mcoda 0.1.15 → 0.1.16
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/dist/bin/McodaEntrypoint.d.ts.map +1 -1
- package/dist/bin/McodaEntrypoint.js +6 -1
- package/dist/commands/backlog/BacklogCommands.d.ts.map +1 -1
- package/dist/commands/backlog/BacklogCommands.js +2 -1
- package/dist/commands/workspace/ProjectGuidanceCommand.d.ts +11 -0
- package/dist/commands/workspace/ProjectGuidanceCommand.d.ts.map +1 -0
- package/dist/commands/workspace/ProjectGuidanceCommand.js +107 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McodaEntrypoint.d.ts","sourceRoot":"","sources":["../../src/bin/McodaEntrypoint.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"McodaEntrypoint.d.ts","sourceRoot":"","sources":["../../src/bin/McodaEntrypoint.ts"],"names":[],"mappings":";AA4BA,qBAAa,eAAe;WACb,GAAG,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CAsLxE"}
|
|
@@ -24,6 +24,7 @@ import { RoutingCommands } from "../commands/routing/RoutingCommands.js";
|
|
|
24
24
|
import { TestAgentCommand } from "../commands/agents/TestAgentCommand.js";
|
|
25
25
|
import { AgentRunCommand } from "../commands/agents/AgentRunCommand.js";
|
|
26
26
|
import { SetWorkspaceCommand } from "../commands/workspace/SetWorkspaceCommand.js";
|
|
27
|
+
import { ProjectGuidanceCommand } from "../commands/workspace/ProjectGuidanceCommand.js";
|
|
27
28
|
export class McodaEntrypoint {
|
|
28
29
|
static async run(argv = process.argv.slice(2)) {
|
|
29
30
|
const applyCodexNoSandboxFlag = (value) => {
|
|
@@ -79,7 +80,7 @@ export class McodaEntrypoint {
|
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
if (!command) {
|
|
82
|
-
throw new Error("Usage: mcoda <agent|gateway-agent|test-agent|agent-run|routing|docs|openapi|job|jobs|tokens|telemetry|create-tasks|migrate-tasks|refine-tasks|order-tasks|tasks|work-on-tasks|gateway-trio|code-review|qa-tasks|backlog|task|task-detail|estimate|update|set-workspace|pdr|sds> [...args]\n" +
|
|
83
|
+
throw new Error("Usage: mcoda <agent|gateway-agent|test-agent|agent-run|routing|docs|openapi|job|jobs|tokens|telemetry|create-tasks|migrate-tasks|refine-tasks|order-tasks|tasks|work-on-tasks|gateway-trio|code-review|qa-tasks|backlog|task|task-detail|estimate|update|set-workspace|project-guidance|pdr|sds> [...args]\n" +
|
|
83
84
|
"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" +
|
|
84
85
|
"Aliases: `tasks order-by-deps` forwards to `order-tasks` (dependency-aware ordering), `task`/`task-detail` show a single task.\n" +
|
|
85
86
|
"Job commands (mcoda job --help for details): list|status|watch|logs|inspect|resume|cancel|tokens\n" +
|
|
@@ -197,6 +198,10 @@ export class McodaEntrypoint {
|
|
|
197
198
|
await SetWorkspaceCommand.run(rest);
|
|
198
199
|
return;
|
|
199
200
|
}
|
|
201
|
+
if (command === "project-guidance") {
|
|
202
|
+
await ProjectGuidanceCommand.run(rest);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
200
205
|
throw new Error(`Unknown command: ${command}`);
|
|
201
206
|
}
|
|
202
207
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BacklogCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/BacklogCommands.ts"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,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,CAAC;CA4DhD"}
|
|
@@ -12,7 +12,7 @@ const usage = `mcoda backlog \\
|
|
|
12
12
|
[--include-done] \\
|
|
13
13
|
[--include-cancelled] \\
|
|
14
14
|
[--order dependencies] # dependency-aware ordering (topological, most depended-on first) \\
|
|
15
|
-
[--view summary|epics|stories|tasks] \\
|
|
15
|
+
[--view summary|epics|stories|tasks] # default: tasks \\
|
|
16
16
|
[--limit <N> | --top <N>] \\
|
|
17
17
|
[--json] \\
|
|
18
18
|
[--verbose]`;
|
|
@@ -32,6 +32,7 @@ export const parseBacklogArgs = (argv) => {
|
|
|
32
32
|
includeDone: false,
|
|
33
33
|
includeCancelled: false,
|
|
34
34
|
orderDependencies: false,
|
|
35
|
+
view: "tasks",
|
|
35
36
|
json: false,
|
|
36
37
|
verbose: false,
|
|
37
38
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ParsedProjectGuidanceArgs {
|
|
2
|
+
workspaceRoot?: string;
|
|
3
|
+
force: boolean;
|
|
4
|
+
json: boolean;
|
|
5
|
+
help: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const parseProjectGuidanceArgs: (argv: string[]) => ParsedProjectGuidanceArgs;
|
|
8
|
+
export declare class ProjectGuidanceCommand {
|
|
9
|
+
static run(argv: string[]): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ProjectGuidanceCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectGuidanceCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/ProjectGuidanceCommand.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,yBAAyB;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;AAUD,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,EAAE,KAAG,yBAqDzD,CAAC;AAEF,qBAAa,sBAAsB;WACpB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA0ChD"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { WorkspaceResolver, ensureProjectGuidance } from "@mcoda/core";
|
|
3
|
+
const USAGE = "Usage: mcoda project-guidance [--workspace <path>|--workspace-root <path>] [--force] [--json]";
|
|
4
|
+
const parseBooleanFlag = (value, defaultValue) => {
|
|
5
|
+
if (value === undefined)
|
|
6
|
+
return defaultValue;
|
|
7
|
+
const normalized = value.trim().toLowerCase();
|
|
8
|
+
if (["0", "false", "off", "no"].includes(normalized))
|
|
9
|
+
return false;
|
|
10
|
+
if (["1", "true", "on", "yes"].includes(normalized))
|
|
11
|
+
return true;
|
|
12
|
+
return defaultValue;
|
|
13
|
+
};
|
|
14
|
+
export const parseProjectGuidanceArgs = (argv) => {
|
|
15
|
+
const parsed = {
|
|
16
|
+
force: false,
|
|
17
|
+
json: false,
|
|
18
|
+
help: false,
|
|
19
|
+
};
|
|
20
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
21
|
+
const arg = argv[i];
|
|
22
|
+
if (arg.startsWith("--workspace-root=") || arg.startsWith("--workspace=")) {
|
|
23
|
+
const [, raw] = arg.split("=", 2);
|
|
24
|
+
if (raw)
|
|
25
|
+
parsed.workspaceRoot = path.resolve(raw);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (arg.startsWith("--force=")) {
|
|
29
|
+
const [, raw] = arg.split("=", 2);
|
|
30
|
+
parsed.force = parseBooleanFlag(raw, true);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (arg.startsWith("--json=")) {
|
|
34
|
+
const [, raw] = arg.split("=", 2);
|
|
35
|
+
parsed.json = parseBooleanFlag(raw, true);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
switch (arg) {
|
|
39
|
+
case "--workspace":
|
|
40
|
+
case "--workspace-root":
|
|
41
|
+
if (argv[i + 1]) {
|
|
42
|
+
parsed.workspaceRoot = path.resolve(argv[i + 1]);
|
|
43
|
+
i += 1;
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
case "--force": {
|
|
47
|
+
const next = argv[i + 1];
|
|
48
|
+
if (next && !next.startsWith("--")) {
|
|
49
|
+
parsed.force = parseBooleanFlag(next, true);
|
|
50
|
+
i += 1;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
parsed.force = true;
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case "--json":
|
|
58
|
+
parsed.json = true;
|
|
59
|
+
break;
|
|
60
|
+
case "--help":
|
|
61
|
+
case "-h":
|
|
62
|
+
parsed.help = true;
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return parsed;
|
|
69
|
+
};
|
|
70
|
+
export class ProjectGuidanceCommand {
|
|
71
|
+
static async run(argv) {
|
|
72
|
+
const parsed = parseProjectGuidanceArgs(argv);
|
|
73
|
+
if (parsed.help) {
|
|
74
|
+
// eslint-disable-next-line no-console
|
|
75
|
+
console.log(USAGE);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
const workspace = await WorkspaceResolver.resolveWorkspace({
|
|
80
|
+
cwd: process.cwd(),
|
|
81
|
+
explicitWorkspace: parsed.workspaceRoot,
|
|
82
|
+
});
|
|
83
|
+
const result = await ensureProjectGuidance(workspace.workspaceRoot, {
|
|
84
|
+
mcodaDir: workspace.mcodaDir,
|
|
85
|
+
force: parsed.force,
|
|
86
|
+
});
|
|
87
|
+
if (parsed.json) {
|
|
88
|
+
// eslint-disable-next-line no-console
|
|
89
|
+
console.log(JSON.stringify({
|
|
90
|
+
workspaceRoot: workspace.workspaceRoot,
|
|
91
|
+
mcodaDir: workspace.mcodaDir,
|
|
92
|
+
path: result.path,
|
|
93
|
+
status: result.status,
|
|
94
|
+
}, null, 2));
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
// eslint-disable-next-line no-console
|
|
98
|
+
console.log(`project-guidance ${result.status}: ${result.path}`);
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
102
|
+
// eslint-disable-next-line no-console
|
|
103
|
+
console.error(`project-guidance failed: ${message}`);
|
|
104
|
+
process.exitCode = 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,4 +17,5 @@ export * from "./commands/planning/QaTasksCommand.js";
|
|
|
17
17
|
export * from "./commands/update/UpdateCommands.js";
|
|
18
18
|
export * from "./commands/routing/RoutingCommands.js";
|
|
19
19
|
export * from "./commands/agents/TestAgentCommand.js";
|
|
20
|
+
export * from "./commands/workspace/ProjectGuidanceCommand.js";
|
|
20
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,3 +17,4 @@ export * from "./commands/planning/QaTasksCommand.js";
|
|
|
17
17
|
export * from "./commands/update/UpdateCommands.js";
|
|
18
18
|
export * from "./commands/routing/RoutingCommands.js";
|
|
19
19
|
export * from "./commands/agents/TestAgentCommand.js";
|
|
20
|
+
export * from "./commands/workspace/ProjectGuidanceCommand.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcoda",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
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",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"yaml": "^2.4.2",
|
|
48
|
-
"@mcoda/core": "0.1.
|
|
49
|
-
"@mcoda/shared": "0.1.
|
|
48
|
+
"@mcoda/core": "0.1.16",
|
|
49
|
+
"@mcoda/shared": "0.1.16"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@mcoda/
|
|
53
|
-
"@mcoda/
|
|
52
|
+
"@mcoda/integrations": "0.1.16",
|
|
53
|
+
"@mcoda/db": "0.1.16"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsc -p tsconfig.json",
|