@evalops/maestro 0.10.42 → 0.10.43

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 (46) hide show
  1. package/dist/cli/commands/operating-plane.d.ts.map +1 -1
  2. package/dist/cli/commands/operating-plane.js +3 -2
  3. package/dist/cli/commands/operating-plane.js.map +1 -1
  4. package/dist/cli/help.js +8 -6
  5. package/dist/cli/help.js.map +1 -1
  6. package/dist/cli.js +201 -96
  7. package/dist/codex/subagent-dispatch-table.d.ts +1 -1
  8. package/dist/codex/subagent-dispatch-table.js +1 -1
  9. package/dist/codex/subagent-dispatch-table.js.map +1 -1
  10. package/dist/node_modules/@evalops/contracts/package.json +1 -1
  11. package/dist/node_modules/@evalops/tui/package.json +1 -1
  12. package/dist/platform/a2a-completion-audit.d.ts +12 -6
  13. package/dist/platform/a2a-completion-audit.d.ts.map +1 -1
  14. package/dist/platform/a2a-completion-audit.js +28 -20
  15. package/dist/platform/a2a-completion-audit.js.map +1 -1
  16. package/dist/platform/a2a-maestro-peer.js +8 -7
  17. package/dist/platform/a2a-maestro-peer.js.map +1 -1
  18. package/dist/platform/a2a-telemetry-inspect.d.ts +2 -2
  19. package/dist/platform/a2a-telemetry-inspect.d.ts.map +1 -1
  20. package/dist/platform/a2a-telemetry-inspect.js +3 -3
  21. package/dist/platform/a2a-telemetry-inspect.js.map +1 -1
  22. package/dist/platform/operating-plane-client.d.ts +2 -2
  23. package/dist/platform/operating-plane-client.d.ts.map +1 -1
  24. package/dist/platform/operating-plane-client.js.map +1 -1
  25. package/dist/platform/operating-plane-summary.d.ts +4 -4
  26. package/dist/platform/operating-plane-summary.d.ts.map +1 -1
  27. package/dist/platform/operating-plane-summary.js +39 -27
  28. package/dist/platform/operating-plane-summary.js.map +1 -1
  29. package/dist/server/session-timeline.d.ts.map +1 -1
  30. package/dist/server/session-timeline.js +112 -2
  31. package/dist/server/session-timeline.js.map +1 -1
  32. package/dist/tools/background/resource-monitor.d.ts.map +1 -1
  33. package/dist/tools/background/resource-monitor.js +8 -6
  34. package/dist/tools/background/resource-monitor.js.map +1 -1
  35. package/dist/tools/parallel-ripgrep.d.ts.map +1 -1
  36. package/dist/tools/parallel-ripgrep.js +2 -2
  37. package/dist/tools/parallel-ripgrep.js.map +1 -1
  38. package/dist/tools/ripgrep-utils.d.ts +1 -0
  39. package/dist/tools/ripgrep-utils.d.ts.map +1 -1
  40. package/dist/tools/ripgrep-utils.js +4 -0
  41. package/dist/tools/ripgrep-utils.js.map +1 -1
  42. package/dist/tools/search.d.ts.map +1 -1
  43. package/dist/tools/search.js +2 -2
  44. package/dist/tools/search.js.map +1 -1
  45. package/dist/version.json +2 -2
  46. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"operating-plane.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/operating-plane.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAE3B,MAAM,0CAA0C,CAAC;AAMlD,MAAM,WAAW,wBAAwB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,sBAAsB,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,kCAAkC;IAClD,OAAO,CAAC,EAAE,CACT,KAAK,EAAE,sBAAsB,KACzB,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAqBD,wBAAsB,2BAA2B,CAChD,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,kCAAuC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,MAAM,EAAE,GACZ,wBAAwB,CA8C1B"}
1
+ {"version":3,"file":"operating-plane.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/operating-plane.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAE3B,MAAM,0CAA0C,CAAC;AAMlD,MAAM,WAAW,wBAAwB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,sBAAsB,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,kCAAkC;IAClD,OAAO,CAAC,EAAE,CACT,KAAK,EAAE,sBAAsB,KACzB,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAsBD,wBAAsB,2BAA2B,CAChD,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,kCAAuC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,MAAM,EAAE,GACZ,wBAAwB,CA8C1B"}
@@ -2,6 +2,7 @@ import { inspectOperatingPlaneRuns, } from "../../platform/operating-plane-clien
2
2
  import { formatOperatingPlaneStatusReport, summarizeOperatingPlaneInspection, } from "../../platform/operating-plane-summary.js";
3
3
  const VALUE_FLAGS = new Set([
4
4
  "--agent-id",
5
+ "--artifact-id",
5
6
  "--audience",
6
7
  "--auth-subject",
7
8
  "--autonomy-session-id",
@@ -90,7 +91,7 @@ function queryFromFlags(flags) {
90
91
  channelThreadId: flagString(flags, "--channel-thread-id"),
91
92
  traceId: flagString(flags, "--trace-id"),
92
93
  sessionId: flagString(flags, "--session-id"),
93
- evidenceId: flagString(flags, "--evidence-id"),
94
+ evidenceId: flagString(flags, "--artifact-id") ?? flagString(flags, "--evidence-id"),
94
95
  gatewayAuthenticatedSubject: flagString(flags, "--gateway-authenticated-subject") ??
95
96
  flagString(flags, "--auth-subject"),
96
97
  audience: flagString(flags, "--audience"),
@@ -146,7 +147,7 @@ function operatingPlaneHelpText() {
146
147
 
147
148
  Filters:
148
149
  --thread-id <id> Slack/channel thread id
149
- --evidence-id <id> Evidence ref id
150
+ --artifact-id <id> Runtime artifact ref id
150
151
  --auth-subject <subject> Gateway-authenticated subject
151
152
  --trace-id <id> Trace id
152
153
  --session-id <id> Maestro/session id
@@ -1 +1 @@
1
- {"version":3,"file":"operating-plane.js","sourceRoot":"","sources":["../../../src/cli/commands/operating-plane.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,yBAAyB,GACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACN,gCAAgC,EAChC,iCAAiC,GACjC,MAAM,2CAA2C,CAAC;AAgBnD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC3B,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,uBAAuB;IACvB,qBAAqB;IACrB,eAAe;IACf,iCAAiC;IACjC,SAAS;IACT,UAAU;IACV,cAAc;IACd,aAAa;IACb,YAAY;IACZ,oBAAoB;IACpB,gBAAgB;CAChB,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAChD,IAAc,EACd,UAA8C,EAAE;IAEhD,MAAM,MAAM,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACrE,IAAI,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,UAAU,KAAK,MAAM,EAAE,CAAC;QACjD,KAAK,CAAC,sBAAsB,EAAE,CAAC,CAAC;QAChC,OAAO;IACR,CAAC;IACD,IAAI,MAAM,CAAC,UAAU,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;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SAAS,sBAAsB;IAC9B,OAAO;;;;;;;;;;;;;2DAamD,CAAC;AAC5D,CAAC","sourcesContent":["import {\n\ttype OperatingPlaneInspection,\n\ttype OperatingPlaneRunQuery,\n\tinspectOperatingPlaneRuns,\n} from \"../../platform/operating-plane-client.js\";\nimport {\n\tformatOperatingPlaneStatusReport,\n\tsummarizeOperatingPlaneInspection,\n} from \"../../platform/operating-plane-summary.js\";\n\nexport interface ParsedOperatingPlaneArgs {\n\tsubcommand: string;\n\tquery: OperatingPlaneRunQuery;\n\tjson: boolean;\n\thelp: boolean;\n}\n\nexport interface HandleOperatingPlaneCommandOptions {\n\tinspect?: (\n\t\tquery: OperatingPlaneRunQuery,\n\t) => Promise<OperatingPlaneInspection>;\n\twrite?: (line: string) => void;\n}\n\nconst VALUE_FLAGS = new Set([\n\t\"--agent-id\",\n\t\"--audience\",\n\t\"--auth-subject\",\n\t\"--autonomy-session-id\",\n\t\"--channel-thread-id\",\n\t\"--evidence-id\",\n\t\"--gateway-authenticated-subject\",\n\t\"--limit\",\n\t\"--run-id\",\n\t\"--session-id\",\n\t\"--thread-id\",\n\t\"--trace-id\",\n\t\"--work-envelope-id\",\n\t\"--workspace-id\",\n]);\n\nconst BOOLEAN_FLAGS = new Set([\"--help\", \"--include-gates\", \"--json\"]);\n\nexport async function handleOperatingPlaneCommand(\n\targs: string[],\n\toptions: HandleOperatingPlaneCommandOptions = {},\n): Promise<void> {\n\tconst parsed = parseOperatingPlaneArgs(args);\n\tconst write = options.write ?? ((line: string) => console.log(line));\n\tif (parsed.help || parsed.subcommand === \"help\") {\n\t\twrite(operatingPlaneHelpText());\n\t\treturn;\n\t}\n\tif (parsed.subcommand !== \"status\" && parsed.subcommand !== \"inspect\") {\n\t\tthrow new Error(`Unknown operating-plane command: ${parsed.subcommand}`);\n\t}\n\n\tconst inspect = options.inspect ?? inspectOperatingPlaneRuns;\n\tconst inspection = await inspect(parsed.query);\n\tconst report = summarizeOperatingPlaneInspection(inspection);\n\twrite(\n\t\tparsed.json\n\t\t\t? JSON.stringify(report, null, 2)\n\t\t\t: formatOperatingPlaneStatusReport(report),\n\t);\n}\n\nexport function parseOperatingPlaneArgs(\n\targs: string[],\n): ParsedOperatingPlaneArgs {\n\tconst positionals: string[] = [];\n\tconst flags = new Map<string, string | boolean>();\n\tfor (let index = 0; index < args.length; index++) {\n\t\tconst arg = args[index];\n\t\tif (!arg) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (arg === \"--\") {\n\t\t\tpositionals.push(...args.slice(index + 1));\n\t\t\tbreak;\n\t\t}\n\t\tif (!arg.startsWith(\"--\")) {\n\t\t\tpositionals.push(arg);\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [flag, inlineValue] = arg.split(\"=\", 2);\n\t\tif (!flag) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!VALUE_FLAGS.has(flag) && !BOOLEAN_FLAGS.has(flag)) {\n\t\t\tthrow new Error(`Unknown operating-plane option: ${flag}`);\n\t\t}\n\t\tif (inlineValue !== undefined) {\n\t\t\tflags.set(flag, inlineValue);\n\t\t\tcontinue;\n\t\t}\n\t\tif (BOOLEAN_FLAGS.has(flag)) {\n\t\t\tflags.set(flag, true);\n\t\t\tcontinue;\n\t\t}\n\t\tconst next = args[index + 1];\n\t\tif (!next || next === \"--\" || next.startsWith(\"--\")) {\n\t\t\tthrow new Error(`${flag} requires a value`);\n\t\t}\n\t\tflags.set(flag, next);\n\t\tindex++;\n\t}\n\n\treturn {\n\t\tsubcommand: positionals.shift()?.toLowerCase() ?? \"status\",\n\t\tquery: queryFromFlags(flags),\n\t\tjson: flagBoolean(flags, \"--json\") === true,\n\t\thelp: flagBoolean(flags, \"--help\") === true,\n\t};\n}\n\nfunction queryFromFlags(\n\tflags: Map<string, string | boolean>,\n): OperatingPlaneRunQuery {\n\treturn stripUndefined({\n\t\tworkspaceId: flagString(flags, \"--workspace-id\"),\n\t\trunId: flagString(flags, \"--run-id\"),\n\t\tworkEnvelopeId: flagString(flags, \"--work-envelope-id\"),\n\t\tautonomySessionId: flagString(flags, \"--autonomy-session-id\"),\n\t\tagentId: flagString(flags, \"--agent-id\"),\n\t\tthreadId: flagString(flags, \"--thread-id\"),\n\t\tchannelThreadId: flagString(flags, \"--channel-thread-id\"),\n\t\ttraceId: flagString(flags, \"--trace-id\"),\n\t\tsessionId: flagString(flags, \"--session-id\"),\n\t\tevidenceId: flagString(flags, \"--evidence-id\"),\n\t\tgatewayAuthenticatedSubject:\n\t\t\tflagString(flags, \"--gateway-authenticated-subject\") ??\n\t\t\tflagString(flags, \"--auth-subject\"),\n\t\taudience: flagString(flags, \"--audience\") as\n\t\t\t| OperatingPlaneRunQuery[\"audience\"]\n\t\t\t| undefined,\n\t\tincludeGates: flagBoolean(flags, \"--include-gates\"),\n\t\tlimit: flagNonNegativeInt(flags, \"--limit\"),\n\t});\n}\n\nfunction flagString(\n\tflags: Map<string, string | boolean>,\n\tname: string,\n): string | undefined {\n\tconst value = flags.get(name);\n\tif (typeof value !== \"string\") {\n\t\treturn undefined;\n\t}\n\tconst trimmed = value.trim();\n\treturn trimmed ? trimmed : undefined;\n}\n\nfunction flagBoolean(\n\tflags: Map<string, string | boolean>,\n\tname: string,\n): boolean | undefined {\n\tconst value = flags.get(name);\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\tif (typeof value === \"boolean\") {\n\t\treturn value;\n\t}\n\tswitch (value.trim().toLowerCase()) {\n\t\tcase \"1\":\n\t\tcase \"true\":\n\t\tcase \"yes\":\n\t\t\treturn true;\n\t\tcase \"0\":\n\t\tcase \"false\":\n\t\tcase \"no\":\n\t\t\treturn false;\n\t\tdefault:\n\t\t\tthrow new Error(`${name} must be true or false`);\n\t}\n}\n\nfunction flagNonNegativeInt(\n\tflags: Map<string, string | boolean>,\n\tname: string,\n): number | undefined {\n\tconst value = flagString(flags, name);\n\tif (!value) {\n\t\treturn undefined;\n\t}\n\tconst parsed = Number.parseInt(value, 10);\n\tif (!Number.isFinite(parsed) || parsed < 0 || String(parsed) !== value) {\n\t\tthrow new Error(`${name} must be a non-negative integer`);\n\t}\n\treturn parsed;\n}\n\nfunction stripUndefined<T extends Record<string, unknown>>(value: T): T {\n\treturn Object.fromEntries(\n\t\tObject.entries(value).filter(([, entry]) => entry !== undefined),\n\t) as T;\n}\n\nfunction operatingPlaneHelpText(): string {\n\treturn `Usage: maestro operating-plane status [filters]\n\nFilters:\n --thread-id <id> Slack/channel thread id\n --evidence-id <id> Evidence ref id\n --auth-subject <subject> Gateway-authenticated subject\n --trace-id <id> Trace id\n --session-id <id> Maestro/session id\n --run-id <id> Agent runtime run id\n --workspace-id <id> Workspace id\n --audience <audience> agent, channel, audit, system, ...\n --include-gates=<true|false> Include release/replay gates\n --limit <n> Maximum runs\n --json Emit safe summary JSON`;\n}\n"]}
1
+ {"version":3,"file":"operating-plane.js","sourceRoot":"","sources":["../../../src/cli/commands/operating-plane.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,yBAAyB,GACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACN,gCAAgC,EAChC,iCAAiC,GACjC,MAAM,2CAA2C,CAAC;AAgBnD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC3B,YAAY;IACZ,eAAe;IACf,YAAY;IACZ,gBAAgB;IAChB,uBAAuB;IACvB,qBAAqB;IACrB,eAAe;IACf,iCAAiC;IACjC,SAAS;IACT,UAAU;IACV,cAAc;IACd,aAAa;IACb,YAAY;IACZ,oBAAoB;IACpB,gBAAgB;CAChB,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAChD,IAAc,EACd,UAA8C,EAAE;IAEhD,MAAM,MAAM,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC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AAK,EAAE,CAAC;QACxE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,iCAAiC,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,cAAc,CAAoC,KAAQ;IAClE,OAAO,MAAM,CAAC,WAAW,CACxB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAC3D,CAAC;AACR,CAAC;AAED,SAAS,sBAAsB;IAC9B,OAAO;;;;;;;;;;;;;2DAamD,CAAC;AAC5D,CAAC","sourcesContent":["import {\n\ttype OperatingPlaneInspection,\n\ttype OperatingPlaneRunQuery,\n\tinspectOperatingPlaneRuns,\n} from \"../../platform/operating-plane-client.js\";\nimport {\n\tformatOperatingPlaneStatusReport,\n\tsummarizeOperatingPlaneInspection,\n} from \"../../platform/operating-plane-summary.js\";\n\nexport interface ParsedOperatingPlaneArgs {\n\tsubcommand: string;\n\tquery: OperatingPlaneRunQuery;\n\tjson: boolean;\n\thelp: boolean;\n}\n\nexport interface HandleOperatingPlaneCommandOptions {\n\tinspect?: (\n\t\tquery: OperatingPlaneRunQuery,\n\t) => Promise<OperatingPlaneInspection>;\n\twrite?: (line: string) => void;\n}\n\nconst VALUE_FLAGS = new Set([\n\t\"--agent-id\",\n\t\"--artifact-id\",\n\t\"--audience\",\n\t\"--auth-subject\",\n\t\"--autonomy-session-id\",\n\t\"--channel-thread-id\",\n\t\"--evidence-id\",\n\t\"--gateway-authenticated-subject\",\n\t\"--limit\",\n\t\"--run-id\",\n\t\"--session-id\",\n\t\"--thread-id\",\n\t\"--trace-id\",\n\t\"--work-envelope-id\",\n\t\"--workspace-id\",\n]);\n\nconst BOOLEAN_FLAGS = new Set([\"--help\", \"--include-gates\", \"--json\"]);\n\nexport async function handleOperatingPlaneCommand(\n\targs: string[],\n\toptions: HandleOperatingPlaneCommandOptions = {},\n): Promise<void> {\n\tconst parsed = parseOperatingPlaneArgs(args);\n\tconst write = options.write ?? ((line: string) => console.log(line));\n\tif (parsed.help || parsed.subcommand === \"help\") {\n\t\twrite(operatingPlaneHelpText());\n\t\treturn;\n\t}\n\tif (parsed.subcommand !== \"status\" && parsed.subcommand !== \"inspect\") {\n\t\tthrow new Error(`Unknown operating-plane command: ${parsed.subcommand}`);\n\t}\n\n\tconst inspect = options.inspect ?? inspectOperatingPlaneRuns;\n\tconst inspection = await inspect(parsed.query);\n\tconst report = summarizeOperatingPlaneInspection(inspection);\n\twrite(\n\t\tparsed.json\n\t\t\t? JSON.stringify(report, null, 2)\n\t\t\t: formatOperatingPlaneStatusReport(report),\n\t);\n}\n\nexport function parseOperatingPlaneArgs(\n\targs: string[],\n): ParsedOperatingPlaneArgs {\n\tconst positionals: string[] = [];\n\tconst flags = new Map<string, string | boolean>();\n\tfor (let index = 0; index < args.length; index++) {\n\t\tconst arg = args[index];\n\t\tif (!arg) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (arg === \"--\") {\n\t\t\tpositionals.push(...args.slice(index + 1));\n\t\t\tbreak;\n\t\t}\n\t\tif (!arg.startsWith(\"--\")) {\n\t\t\tpositionals.push(arg);\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst [flag, inlineValue] = arg.split(\"=\", 2);\n\t\tif (!flag) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!VALUE_FLAGS.has(flag) && !BOOLEAN_FLAGS.has(flag)) {\n\t\t\tthrow new Error(`Unknown operating-plane option: ${flag}`);\n\t\t}\n\t\tif (inlineValue !== undefined) {\n\t\t\tflags.set(flag, inlineValue);\n\t\t\tcontinue;\n\t\t}\n\t\tif (BOOLEAN_FLAGS.has(flag)) {\n\t\t\tflags.set(flag, true);\n\t\t\tcontinue;\n\t\t}\n\t\tconst next = args[index + 1];\n\t\tif (!next || next === \"--\" || next.startsWith(\"--\")) {\n\t\t\tthrow new Error(`${flag} requires a value`);\n\t\t}\n\t\tflags.set(flag, next);\n\t\tindex++;\n\t}\n\n\treturn {\n\t\tsubcommand: positionals.shift()?.toLowerCase() ?? \"status\",\n\t\tquery: queryFromFlags(flags),\n\t\tjson: flagBoolean(flags, \"--json\") === true,\n\t\thelp: flagBoolean(flags, \"--help\") === true,\n\t};\n}\n\nfunction queryFromFlags(\n\tflags: Map<string, string | boolean>,\n): OperatingPlaneRunQuery {\n\treturn stripUndefined({\n\t\tworkspaceId: flagString(flags, \"--workspace-id\"),\n\t\trunId: flagString(flags, \"--run-id\"),\n\t\tworkEnvelopeId: flagString(flags, \"--work-envelope-id\"),\n\t\tautonomySessionId: flagString(flags, \"--autonomy-session-id\"),\n\t\tagentId: flagString(flags, \"--agent-id\"),\n\t\tthreadId: flagString(flags, \"--thread-id\"),\n\t\tchannelThreadId: flagString(flags, \"--channel-thread-id\"),\n\t\ttraceId: flagString(flags, \"--trace-id\"),\n\t\tsessionId: flagString(flags, \"--session-id\"),\n\t\tevidenceId:\n\t\t\tflagString(flags, \"--artifact-id\") ?? flagString(flags, \"--evidence-id\"),\n\t\tgatewayAuthenticatedSubject:\n\t\t\tflagString(flags, \"--gateway-authenticated-subject\") ??\n\t\t\tflagString(flags, \"--auth-subject\"),\n\t\taudience: flagString(flags, \"--audience\") as\n\t\t\t| OperatingPlaneRunQuery[\"audience\"]\n\t\t\t| undefined,\n\t\tincludeGates: flagBoolean(flags, \"--include-gates\"),\n\t\tlimit: flagNonNegativeInt(flags, \"--limit\"),\n\t});\n}\n\nfunction flagString(\n\tflags: Map<string, string | boolean>,\n\tname: string,\n): string | undefined {\n\tconst value = flags.get(name);\n\tif (typeof value !== \"string\") {\n\t\treturn undefined;\n\t}\n\tconst trimmed = value.trim();\n\treturn trimmed ? trimmed : undefined;\n}\n\nfunction flagBoolean(\n\tflags: Map<string, string | boolean>,\n\tname: string,\n): boolean | undefined {\n\tconst value = flags.get(name);\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\tif (typeof value === \"boolean\") {\n\t\treturn value;\n\t}\n\tswitch (value.trim().toLowerCase()) {\n\t\tcase \"1\":\n\t\tcase \"true\":\n\t\tcase \"yes\":\n\t\t\treturn true;\n\t\tcase \"0\":\n\t\tcase \"false\":\n\t\tcase \"no\":\n\t\t\treturn false;\n\t\tdefault:\n\t\t\tthrow new Error(`${name} must be true or false`);\n\t}\n}\n\nfunction flagNonNegativeInt(\n\tflags: Map<string, string | boolean>,\n\tname: string,\n): number | undefined {\n\tconst value = flagString(flags, name);\n\tif (!value) {\n\t\treturn undefined;\n\t}\n\tconst parsed = Number.parseInt(value, 10);\n\tif (!Number.isFinite(parsed) || parsed < 0 || String(parsed) !== value) {\n\t\tthrow new Error(`${name} must be a non-negative integer`);\n\t}\n\treturn parsed;\n}\n\nfunction stripUndefined<T extends Record<string, unknown>>(value: T): T {\n\treturn Object.fromEntries(\n\t\tObject.entries(value).filter(([, entry]) => entry !== undefined),\n\t) as T;\n}\n\nfunction operatingPlaneHelpText(): string {\n\treturn `Usage: maestro operating-plane status [filters]\n\nFilters:\n --thread-id <id> Slack/channel thread id\n --artifact-id <id> Runtime artifact ref id\n --auth-subject <subject> Gateway-authenticated subject\n --trace-id <id> Trace id\n --session-id <id> Maestro/session id\n --run-id <id> Agent runtime run id\n --workspace-id <id> Workspace id\n --audience <audience> agent, channel, audit, system, ...\n --include-gates=<true|false> Include release/replay gates\n --limit <n> Maximum runs\n --json Emit safe summary JSON`;\n}\n"]}
package/dist/cli/help.js CHANGED
@@ -252,12 +252,14 @@ export function printHelp(version, options) {
252
252
  maestro remote attach <session-id> [--verify] [--print-env]
253
253
  maestro remote extend <session-id> --ttl 2h
254
254
  maestro remote stop <session-id> [--reason <text>]`)}`;
255
- const operatingPlaneSection = `${sectionHeading("maestro operating-plane")}${muted(` maestro operating-plane status --thread-id <slack-thread> [--evidence-id <id>] [--auth-subject <subject>]
256
- maestro operating-plane status --trace-id <id> --json
257
-
258
- Fetches the Platform operating-plane ledger and prints a content-free value
259
- proof report with identity, model/tool/approval/trace/evidence/cost status,
260
- allowed evidence ids/revisions, blockers, next actions, and withheld reasons.`)}`;
255
+ const operatingPlaneHelp = [
256
+ " maestro operating-plane status --thread-id <slack-thread> [--artifact-id <id>] [--auth-subject <subject>]",
257
+ " maestro operating-plane status --trace-id <id> --json",
258
+ " Fetches the Platform operating-plane ledger and prints content-free runtime",
259
+ " status with identity, model/tool/approval/trace/artifact/cost signals,",
260
+ " allowed artifact ids/revisions, blockers, next actions, and withheld reasons.",
261
+ ].join("\n");
262
+ const operatingPlaneSection = `${sectionHeading("maestro operating-plane")}${muted(operatingPlaneHelp)}`;
261
263
  const runSection = `${sectionHeading("maestro run")}${muted(` maestro run inspect <session-id> [--json]
262
264
  maestro run ledger <session-id>
263
265
  maestro run replay <session-id>
@@ -1 +1 @@
1
- {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAO1E,MAAM,WAAW,GAAoB;IACpC,EAAE,IAAI,EAAE,+DAA+D,EAAE;IACzE,EAAE,IAAI,EAAE,qDAAqD,EAAE;IAC/D,EAAE,IAAI,EAAE,iEAAiE,EAAE;IAC3E;QACC,IAAI,EAAE,2EAA2E;KACjF;IACD;QACC,IAAI,EAAE,4FAA4F;KAClG;IACD,EAAE,IAAI,EAAE,wDAAwD,EAAE;IAClE;QACC,IAAI,EAAE,0EAA0E;KAChF;IACD;QACC,IAAI,EAAE,yEAAyE;KAC/E;IACD,EAAE,IAAI,EAAE,mEAAmE,EAAE;IAC7E;QACC,IAAI,EAAE,kEAAkE;KACxE;IACD;QACC,IAAI,EAAE,+EAA+E;KACrF;IACD;QACC,IAAI,EAAE,mHAAmH;KACzH;IACD;QACC,IAAI,EAAE,+EAA+E;KACrF;IACD,EAAE,IAAI,EAAE,mDAAmD,EAA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KAAK,IAAI,CAAC;SACxD,IAAI,CAAC,MAAM,CAAC,CACd,CAAC;AACH,CAAC","sourcesContent":["/**\n * @fileoverview CLI Help Output Module\n *\n * This module generates and displays the `--help` output for the Maestro CLI.\n * It provides a comprehensive overview of:\n *\n * - **Usage syntax** and common invocation patterns\n * - **Command-line options** for provider, model, session management, etc.\n * - **Environment variables** for API keys and configuration\n * - **Available tools** and their capabilities\n * - **Subcommands** like `maestro exec` for headless execution\n * - **Session management** commands and workflows\n *\n * ## Styling\n *\n * The output uses the application's theme system for consistent terminal styling:\n * - `heading()` - Main title styling\n * - `sectionHeading()` - Section headers\n * - `muted()` - De-emphasized text for descriptions\n * - `badge()` - Highlighted tips and hints\n *\n * @module cli/help\n */\nimport { badge, heading, muted, sectionHeading } from \"../style/theme.js\";\n\ninterface CliHelpOption {\n\ttext: string;\n\thidden?: boolean;\n}\n\nconst CLI_OPTIONS: CliHelpOption[] = [\n\t{ text: \"--provider <name> Provider name (default: openai-codex)\" },\n\t{ text: \"-m, --model <id> Model ID (default: gpt-5.5)\" },\n\t{ text: \"--task-budget <tokens> API-side Anthropic task budget in tokens\" },\n\t{\n\t\ttext: \"--models <patterns> Comma-separated patterns for Ctrl+P model cycling\",\n\t},\n\t{\n\t\ttext: \"--tools <names> Comma-separated tool names to enable (e.g., read,search,list,find)\",\n\t},\n\t{ text: \"--api-key <key> API key (defaults to env vars)\" },\n\t{\n\t\ttext: \"--system-prompt <text> System prompt (default: coding assistant prompt)\",\n\t},\n\t{\n\t\ttext: \"--append-system-prompt <text> Append instructions to the system prompt\",\n\t},\n\t{ text: \"--mode <mode> Output mode: text (default), json, or rpc\" },\n\t{\n\t\ttext: \"--auth <mode> Credential mode: auto (default), api-key\",\n\t},\n\t{\n\t\ttext: \"--approval-mode <mode> Action approvals: prompt (default in TUI), auto, fail\",\n\t},\n\t{\n\t\ttext: \"--sandbox <mode> Sandbox mode: read-only, workspace-write, danger-full-access, native, docker, local, none\",\n\t},\n\t{\n\t\ttext: \"--port <n> Port for `maestro web` (defaults to PORT env or 8080)\",\n\t},\n\t{ text: \"--continue, -c Continue previous session\" },\n\t{ text: \"--resume, -r Select a session to resume\" },\n\t{ text: \"--session <path> Use specific session file\" },\n\t{ text: \"--no-session Don't save session (ephemeral)\" },\n\t{ text: \"--safe-mode Enable extra safety restrictions\" },\n\t{\n\t\ttext: \"--replay <path|uri> Open a scripted deterministic replay session\",\n\t},\n\t{\n\t\ttext: \"--record-scenario <path> Record assistant turns as a replay fixture\",\n\t},\n\t{ text: \"--help, -h Show this help\" },\n\t{\n\t\ttext: \"--help-hidden Show hidden support and staged-rollout flags\",\n\t\thidden: true,\n\t},\n\t{\n\t\ttext: \"--list-modes-all List visible and hidden agent modes\",\n\t\thidden: true,\n\t},\n];\n\nfunction renderHelpOptions(options: CliHelpOption[], includeHidden: boolean) {\n\treturn options\n\t\t.filter((option) => includeHidden || option.hidden !== true)\n\t\t.map((option) => ` ${muted(option.text)}`)\n\t\t.join(\"\\n\");\n}\n\n/**\n * Prints the complete CLI help message to stdout.\n *\n * This function is invoked when the user runs `maestro --help` or `maestro -h`.\n * It formats and displays all available options, commands, and usage examples\n * using the terminal theme for consistent styling.\n *\n * @param version - The current Maestro version string (e.g., \"1.2.3\")\n *\n * @example\n * ```typescript\n * import { printHelp } from \"./help.js\";\n * import { version } from \"../../package.json\";\n *\n * if (args.includes(\"--help\")) {\n * printHelp(version);\n * process.exit(0);\n * }\n * ```\n */\nexport function printHelp(\n\tversion: string,\n\toptions?: { includeHidden?: boolean },\n) {\n\tconst includeHidden = options?.includeHidden === true;\n\tconst header = `${heading(\"Maestro\")} ${muted(\n\t\t`v${version} by EvalOps — AI coding assistant with read, list, search, diff, bash, edit, write, todo tools`,\n\t)}`;\n\tconst usage = `${sectionHeading(\"Usage\")}${muted(\n\t\t\"maestro [options] [messages...]\",\n\t)}`;\n\tconst renderedOptions = `${sectionHeading(\"Options\")}${renderHelpOptions(\n\t\tCLI_OPTIONS,\n\t\tincludeHidden,\n\t)}`;\n\tconst hiddenSupportSection = includeHidden\n\t\t? `${sectionHeading(\"Hidden Support Flags\")}${muted(\n\t\t\t\t\" Hidden flags are external support surfaces. Keep them in docs/CONVENTIONS/staged-rollout-registry.json with an owner, telemetry event, and promotion/removal target.\",\n\t\t\t)}`\n\t\t: null;\n\tconst examples = `${sectionHeading(\"Examples\")}${muted(\n\t\t` # Interactive mode (defaults to openai-codex/gpt-5.5 after \\`maestro codex login\\`)\n maestro\n\n # Single message\n maestro \"List all .ts files in src/\"\n\n # Multiple messages\n maestro \"Read package.json\" \"What dependencies do we have?\"\n\n # Continue previous session\n maestro --continue \"What did we discuss?\"\n\n # Use different model\n maestro --provider openai --model gpt-4o-mini \"Help me refactor this code\"\n\n # Use Codex subscription models explicitly\n maestro --provider openai-codex --model gpt-5.5 \"Plan this migration\"\n maestro codex doctor\n\n # Bootstrap EvalOps login, API key, and agent registration in one flow\n maestro init\n\n # Use EvalOps managed gateway models after \\`maestro init\\`\n maestro --provider evalops --model gpt-4o-mini \"Say hello in one sentence\"\n\n # Confirm managed mode sinks and EvalOps org identity\n maestro status\n\n # Inspect mode-level subagent model dispatch before running a swarm\n maestro modes describe smart\n\n # Explain which instruction files and MCP context sources are visible\n maestro context explain\n\n # Compare context sources between two workspaces\n maestro context diff ./before ./after\n\n # Include live MCP resources and prompts in context diagnostics\n maestro context explain --live-mcp\n\n # Export a portable session log\n maestro export <session-id> ./session.jsonl --format jsonl\n\n # Export a portable JSON archive with secret redaction\n maestro export <session-id> ./session.json --format json --redact-secrets\n\n # Import a portable session log into this workspace\n maestro import ./session.json\n\n # Scaffold and validate progressive skill packages\n maestro skill new processing-incidents --description \"Process incident reports. Use when the user asks for incident triage.\"\n maestro skill lint .maestro/skills\n\n # Start a hosted EvalOps runner session and wait for attach readiness\n maestro remote start --workspace ws_123 --repo evalops/foo --branch main --ttl 90m --wait --verify\n\n # Run a single-session hosted runtime pod entrypoint\n maestro hosted-runner --runner-session-id mrs_abc --workspace-root /workspace --listen 0.0.0.0:8080\n\n # Show usage analytics for the last 7 days\n maestro stats\n\n # Show usage analytics for one session\n maestro stats --session <session-id>\n\n # Reconstruct the timeline, trajectory, and evidence coverage for a saved run\n maestro run inspect <session-id> --json\n maestro run promote <session-id>\n\n # Validate and run a deterministic scenario fixture\n maestro scenario validate ./test/fixtures/agent-trajectory-scenarios/local-diagnostic-success.json\n maestro scenario run ./test/fixtures/agent-trajectory-scenarios/local-diagnostic-success.json --junit ./tmp/scenario.xml\n\n # Open a real agent session backed by a scripted model fixture\n maestro --replay ./test/fixtures/scripted-replay/basic-tool-call.json\n maestro --replay gs://evalops-prod-maestro-scenario-fixtures/maestro/scenarios/example.json\n\n # Record a live run into a replayable scripted scenario\n maestro --record-scenario ./tmp/recorded-scenario.json \"inspect package.json\"`,\n\t)}`;\n\tconst env = `${sectionHeading(\"Environment Variables:\")}${muted(\n\t\t` GEMINI_API_KEY - Google Gemini API key\n OPENAI_API_KEY - OpenAI API key\n OPENAI_CODEX_TOKEN - OpenAI Codex ChatGPT access token\n OPENAI_CODEX_ACCOUNT_ID - ChatGPT account id when using a raw Codex token\n ANTHROPIC_API_KEY - Anthropic API key\n MAESTRO_AGENT_DIR - Session storage directory (default: ~/.maestro/agent)\n MAESTRO_SANDBOX_MODE - Sandbox mode: read-only, workspace-write, danger-full-access\n MAESTRO_CHANGELOG - Set to off/false/hide/hidden/skip/0 to hide startup changelog banner\n MAESTRO_TUI_MINIMAL - Set to 1/true to disable animations and reduce TUI effects (SSH-friendly)\n MAESTRO_TUI_TOOL_MAX_CHARS - Max chars shown per tool output panel (0 = unlimited)\n MAESTRO_TUI_TOOL_MAX_LINES - Max lines shown per tool output panel (0 = unlimited)\n MAESTRO_MEMORY_BASE - Durable memory service base URL\n MAESTRO_MEMORY_ACCESS_TOKEN - Override bearer token for durable memory service\n MAESTRO_MEMORY_TEAM_ID - Optional team scope for durable memory service\n MAESTRO_SHARED_MEMORY_BASE - Shared memory base URL (Cloudflare Durable Objects worker)\n MAESTRO_SHARED_MEMORY_API_KEY - API key for shared memory service\n MAESTRO_REMOTE_RUNNER_URL - Hosted runner control-plane URL (default: https://runner.evalops.dev)\n MAESTRO_REMOTE_RUNNER_TOKEN - Hosted runner bearer token override\n MAESTRO_REMOTE_RUNNER_ORG_ID - EvalOps organization id for hosted runner sessions\n MAESTRO_REMOTE_RUNNER_WORKSPACE_ID - EvalOps workspace id for hosted runner sessions\n CODING_AGENT_DIR - Legacy session directory override (fallback)`,\n\t)}`;\n\tconst execSection = `${sectionHeading(\"maestro exec\")}${muted(\n\t\t` maestro exec \"Summarize recent changes\" --json\n\n Flags:\n --json Stream JSONL thread/turn events\n --output-schema <file|json> Validate final assistant JSON against a schema\n --output-last-message <path> Write the final assistant message to disk\n --full-auto | --read-only Force approval policy (auto or fail)\n --sandbox <mode> Run in sandbox: read-only, workspace-write, danger-full-access, native, docker, local, none\n --resume <sessionId> Resume a prior exec session by id\n --last Resume the most recent exec session`,\n\t)}`;\n\tconst webSection = `${sectionHeading(\"maestro web\")}${muted(\n\t\t` # Start the bundled web UI + API server\n maestro web\n\n # Use a custom port\n maestro web --port 3000`,\n\t)}`;\n\tconst portabilitySection = `${sectionHeading(\"Session Portability\")}${muted(\n\t\t` maestro export <session-id> [output-path] --format json|jsonl [--redact-secrets]\n maestro import <file.json|file.jsonl>\n\n Notes:\n - json preserves the full session in a portable wrapper object\n - jsonl preserves the append-only session log verbatim unless redaction is requested\n - --redact-secrets scrubs detected credentials from exported payloads\n - import restores the session into the current workspace session directory`,\n\t)}`;\n\tconst modesSection = `${sectionHeading(\"maestro modes\")}${muted(\n\t\t` maestro modes list\n maestro modes describe <mode> [--provider <provider>] [--json]\n\n Prints the mode primary/fallback model policy and resolved subagent dispatch\n table, including cross-provider overrides such as smart-mode coder lanes\n routed to openai-codex/gpt-5.5.`,\n\t)}`;\n\tconst memorySection = `${sectionHeading(\"maestro memory\")}${muted(\n\t\t` maestro memory [status] Show shared memory service status\n maestro memory session <id> Show per-session metrics\n maestro memory audit <id> [n] Show recent sync audit entries\n maestro memory export <id> Export metrics log as JSONL\n maestro memory watch [id] [ms] Poll status/metrics continuously`,\n\t)}`;\n\tconst skillSection = `${sectionHeading(\"maestro skill\")}${muted(\n\t\t` maestro skill list List available progressive skills\n maestro skill inspect <name> Print one skill package manifest\n maestro skill install <source> Validate and install an OSS skill package\n maestro skill publish-check <src> Validate an OSS skill package for publishing\n maestro skill new <name> Scaffold SKILL.md, reference/, scripts/, toolbox/, and mcp.json.example\n maestro skill lint [path...] Validate frontmatter, budget, mcp.json includeTools, and toolbox shape`,\n\t)}`;\n\tconst remoteSection = `${sectionHeading(\"maestro remote\")}${muted(\n\t\t` maestro remote start --workspace <id> --repo <repo> --branch <branch> [--ttl 90m] [--wait] [--verify]\n maestro remote list --workspace <id> [--state running]\n maestro remote attach <session-id> [--verify] [--print-env]\n maestro remote extend <session-id> --ttl 2h\n maestro remote stop <session-id> [--reason <text>]`,\n\t)}`;\n\tconst operatingPlaneSection = `${sectionHeading(\"maestro operating-plane\")}${muted(\n\t\t` maestro operating-plane status --thread-id <slack-thread> [--evidence-id <id>] [--auth-subject <subject>]\n maestro operating-plane status --trace-id <id> --json\n\n Fetches the Platform operating-plane ledger and prints a content-free value\n proof report with identity, model/tool/approval/trace/evidence/cost status,\n allowed evidence ids/revisions, blockers, next actions, and withheld reasons.`,\n\t)}`;\n\tconst runSection = `${sectionHeading(\"maestro run\")}${muted(\n\t\t` maestro run inspect <session-id> [--json]\n maestro run ledger <session-id>\n maestro run replay <session-id>\n maestro run promote <session-id>\n\n Reconstructs a saved session into a timeline plus canonical agent trajectory\n with prompt, tool, file-change, artifact, policy, diagnostic, compaction,\n pending-wait, and MCP-context coverage. The ledger/replay/promote commands\n expose the local AgentRuntime projection and dry-run Platform promotion plan.`,\n\t)}`;\n\tconst initSection = `${sectionHeading(\"maestro init\")}${muted(\n\t\t` maestro init Login, create or reuse an API key, and register this agent\n maestro init --rotate-key Replace the stored agent MCP API key\n maestro init --mcp-url <url> Override the EvalOps agent MCP endpoint\n maestro init --capability code:write Declare an agent-registry capability\n maestro init --json Emit machine-readable bootstrap output`,\n\t)}`;\n\tconst hostedRunnerSection = `${sectionHeading(\"maestro hosted-runner\")}${muted(\n\t\t` maestro hosted-runner --runner-session-id <id> --workspace-root <path> [--listen 0.0.0.0:8080]\n\n Env mode:\n MAESTRO_RUNNER_SESSION_ID=mrs_abc MAESTRO_WORKSPACE_ROOT=/workspace maestro hosted-runner`,\n\t)}`;\n\tconst sessionsSection = `${sectionHeading(\"Session Metadata\")}${muted(\n\t\t` /session favorite|unfavorite Toggle favorite for current session\n /session summary \"<text>\" Save a manual summary for current session\n /sessions summarize <id> Auto-summarize a saved session`,\n\t)}`;\n\tconst sessionsDiscovery = `${sectionHeading(\"Session Commands\")}${muted(\n\t\t` /session [info|favorite|unfavorite|summary \"<text>\"]\n /sessions [list|load <id>|favorite <id>|unfavorite <id>|summarize <id>]\n (Also available via TUI command palette)`,\n\t)}`;\n\tconst tools = `${sectionHeading(\"Available Tools\")}${muted(\n\t\t` read - Read file contents\n list - List files in a directory\n find - Fast file search using fd (glob patterns)\n search - Search files with ripgrep-style filtering\n parallel_ripgrep - Run multiple ripgrep patterns in parallel and merge line ranges\n diff - Show git diffs (workspace, staged, or ranges)\n bash - Execute bash commands\n edit - Edit files with find/replace\n write - Write files (creates/overwrites)\n todo - Create TodoWrite-style checklists\n\n Read-only tools: read,list,find,search,parallel_ripgrep,diff,status\n Example: maestro --tools read,list,find,search,parallel_ripgrep,diff \"Analyze this code\"`,\n\t)}`;\n\n\tconst frameworkSection = `${sectionHeading(\"Framework Preference\")}${muted(\n\t\t` /framework <id> Set default stack (fastapi, express, node)\n /framework <id> --workspace Set workspace-scoped default\n /framework list Show available options\n Precedence: policy (locked) > policy > env override > env default > workspace > user file > none`,\n\t)}`;\n\n\tconsole.log(\n\t\t[\n\t\t\theader,\n\t\t\tusage,\n\t\t\trenderedOptions,\n\t\t\thiddenSupportSection,\n\t\t\texamples,\n\t\t\tenv,\n\t\t\texecSection,\n\t\t\twebSection,\n\t\t\tportabilitySection,\n\t\t\tmodesSection,\n\t\t\tmemorySection,\n\t\t\tskillSection,\n\t\t\tinitSection,\n\t\t\trunSection,\n\t\t\tremoteSection,\n\t\t\toperatingPlaneSection,\n\t\t\thostedRunnerSection,\n\t\t\tsessionsSection,\n\t\t\tsessionsDiscovery,\n\t\t\t`${sectionHeading(\"Tips\")}${badge(\n\t\t\t\t\"Need models?\",\n\t\t\t\t\"maestro models list\",\n\t\t\t\t\"info\",\n\t\t\t)}`,\n\t\t\tframeworkSection,\n\t\t\ttools,\n\t\t]\n\t\t\t.filter((section): section is string => section !== null)\n\t\t\t.join(\"\\n\\n\"),\n\t);\n}\n"]}
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAO1E,MAAM,WAAW,GAAoB;IACpC,EAAE,IAAI,EAAE,+DAA+D,EAAE;IACzE,EAAE,IAAI,EAAE,qDAAqD,EAAE;IAC/D,EAAE,IAAI,EAAE,iEAAiE,EAAE;IAC3E;QACC,IAAI,EAAE,2EAA2E;KACjF;IACD;QACC,IAAI,EAAE,4FAA4F;KAClG;IACD,EAAE,IAAI,EAAE,wDAAwD,EAAE;IAClE;QACC,IAAI,EAAE,0EAA0E;KAChF;IACD;QACC,IAAI,EAAE,yEAAyE;KAC/E;IACD,EAAE,IAAI,EAAE,mEAAmE,EAAE;IAC7E;QACC,IAAI,EAAE,kEAAkE;KACxE;IACD;QACC,IAAI,EAAE,+EAA+E;KACrF;IACD;QACC,IAAI,EAAE,mHAAmH;KACzH;IACD;QACC,IAAI,EAAE,+EAA+E;KACrF;IACD,EAAE,IAAI,EAAE,mDAAmD,EAAE;IAC7D,EAAE,IAAI,EAAE,oD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,EACrB,MAAM,CACN,EAAE;QACH,gBAAgB;QAChB,KAAK;KACL;SACC,MAAM,CAAC,CAAC,OAAO,EAAqB,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC;SACxD,IAAI,CAAC,MAAM,CAAC,CACd,CAAC;AACH,CAAC","sourcesContent":["/**\n * @fileoverview CLI Help Output Module\n *\n * This module generates and displays the `--help` output for the Maestro CLI.\n * It provides a comprehensive overview of:\n *\n * - **Usage syntax** and common invocation patterns\n * - **Command-line options** for provider, model, session management, etc.\n * - **Environment variables** for API keys and configuration\n * - **Available tools** and their capabilities\n * - **Subcommands** like `maestro exec` for headless execution\n * - **Session management** commands and workflows\n *\n * ## Styling\n *\n * The output uses the application's theme system for consistent terminal styling:\n * - `heading()` - Main title styling\n * - `sectionHeading()` - Section headers\n * - `muted()` - De-emphasized text for descriptions\n * - `badge()` - Highlighted tips and hints\n *\n * @module cli/help\n */\nimport { badge, heading, muted, sectionHeading } from \"../style/theme.js\";\n\ninterface CliHelpOption {\n\ttext: string;\n\thidden?: boolean;\n}\n\nconst CLI_OPTIONS: CliHelpOption[] = [\n\t{ text: \"--provider <name> Provider name (default: openai-codex)\" },\n\t{ text: \"-m, --model <id> Model ID (default: gpt-5.5)\" },\n\t{ text: \"--task-budget <tokens> API-side Anthropic task budget in tokens\" },\n\t{\n\t\ttext: \"--models <patterns> Comma-separated patterns for Ctrl+P model cycling\",\n\t},\n\t{\n\t\ttext: \"--tools <names> Comma-separated tool names to enable (e.g., read,search,list,find)\",\n\t},\n\t{ text: \"--api-key <key> API key (defaults to env vars)\" },\n\t{\n\t\ttext: \"--system-prompt <text> System prompt (default: coding assistant prompt)\",\n\t},\n\t{\n\t\ttext: \"--append-system-prompt <text> Append instructions to the system prompt\",\n\t},\n\t{ text: \"--mode <mode> Output mode: text (default), json, or rpc\" },\n\t{\n\t\ttext: \"--auth <mode> Credential mode: auto (default), api-key\",\n\t},\n\t{\n\t\ttext: \"--approval-mode <mode> Action approvals: prompt (default in TUI), auto, fail\",\n\t},\n\t{\n\t\ttext: \"--sandbox <mode> Sandbox mode: read-only, workspace-write, danger-full-access, native, docker, local, none\",\n\t},\n\t{\n\t\ttext: \"--port <n> Port for `maestro web` (defaults to PORT env or 8080)\",\n\t},\n\t{ text: \"--continue, -c Continue previous session\" },\n\t{ text: \"--resume, -r Select a session to resume\" },\n\t{ text: \"--session <path> Use specific session file\" },\n\t{ text: \"--no-session Don't save session (ephemeral)\" },\n\t{ text: \"--safe-mode Enable extra safety restrictions\" },\n\t{\n\t\ttext: \"--replay <path|uri> Open a scripted deterministic replay session\",\n\t},\n\t{\n\t\ttext: \"--record-scenario <path> Record assistant turns as a replay fixture\",\n\t},\n\t{ text: \"--help, -h Show this help\" },\n\t{\n\t\ttext: \"--help-hidden Show hidden support and staged-rollout flags\",\n\t\thidden: true,\n\t},\n\t{\n\t\ttext: \"--list-modes-all List visible and hidden agent modes\",\n\t\thidden: true,\n\t},\n];\n\nfunction renderHelpOptions(options: CliHelpOption[], includeHidden: boolean) {\n\treturn options\n\t\t.filter((option) => includeHidden || option.hidden !== true)\n\t\t.map((option) => ` ${muted(option.text)}`)\n\t\t.join(\"\\n\");\n}\n\n/**\n * Prints the complete CLI help message to stdout.\n *\n * This function is invoked when the user runs `maestro --help` or `maestro -h`.\n * It formats and displays all available options, commands, and usage examples\n * using the terminal theme for consistent styling.\n *\n * @param version - The current Maestro version string (e.g., \"1.2.3\")\n *\n * @example\n * ```typescript\n * import { printHelp } from \"./help.js\";\n * import { version } from \"../../package.json\";\n *\n * if (args.includes(\"--help\")) {\n * printHelp(version);\n * process.exit(0);\n * }\n * ```\n */\nexport function printHelp(\n\tversion: string,\n\toptions?: { includeHidden?: boolean },\n) {\n\tconst includeHidden = options?.includeHidden === true;\n\tconst header = `${heading(\"Maestro\")} ${muted(\n\t\t`v${version} by EvalOps — AI coding assistant with read, list, search, diff, bash, edit, write, todo tools`,\n\t)}`;\n\tconst usage = `${sectionHeading(\"Usage\")}${muted(\n\t\t\"maestro [options] [messages...]\",\n\t)}`;\n\tconst renderedOptions = `${sectionHeading(\"Options\")}${renderHelpOptions(\n\t\tCLI_OPTIONS,\n\t\tincludeHidden,\n\t)}`;\n\tconst hiddenSupportSection = includeHidden\n\t\t? `${sectionHeading(\"Hidden Support Flags\")}${muted(\n\t\t\t\t\" Hidden flags are external support surfaces. Keep them in docs/CONVENTIONS/staged-rollout-registry.json with an owner, telemetry event, and promotion/removal target.\",\n\t\t\t)}`\n\t\t: null;\n\tconst examples = `${sectionHeading(\"Examples\")}${muted(\n\t\t` # Interactive mode (defaults to openai-codex/gpt-5.5 after \\`maestro codex login\\`)\n maestro\n\n # Single message\n maestro \"List all .ts files in src/\"\n\n # Multiple messages\n maestro \"Read package.json\" \"What dependencies do we have?\"\n\n # Continue previous session\n maestro --continue \"What did we discuss?\"\n\n # Use different model\n maestro --provider openai --model gpt-4o-mini \"Help me refactor this code\"\n\n # Use Codex subscription models explicitly\n maestro --provider openai-codex --model gpt-5.5 \"Plan this migration\"\n maestro codex doctor\n\n # Bootstrap EvalOps login, API key, and agent registration in one flow\n maestro init\n\n # Use EvalOps managed gateway models after \\`maestro init\\`\n maestro --provider evalops --model gpt-4o-mini \"Say hello in one sentence\"\n\n # Confirm managed mode sinks and EvalOps org identity\n maestro status\n\n # Inspect mode-level subagent model dispatch before running a swarm\n maestro modes describe smart\n\n # Explain which instruction files and MCP context sources are visible\n maestro context explain\n\n # Compare context sources between two workspaces\n maestro context diff ./before ./after\n\n # Include live MCP resources and prompts in context diagnostics\n maestro context explain --live-mcp\n\n # Export a portable session log\n maestro export <session-id> ./session.jsonl --format jsonl\n\n # Export a portable JSON archive with secret redaction\n maestro export <session-id> ./session.json --format json --redact-secrets\n\n # Import a portable session log into this workspace\n maestro import ./session.json\n\n # Scaffold and validate progressive skill packages\n maestro skill new processing-incidents --description \"Process incident reports. Use when the user asks for incident triage.\"\n maestro skill lint .maestro/skills\n\n # Start a hosted EvalOps runner session and wait for attach readiness\n maestro remote start --workspace ws_123 --repo evalops/foo --branch main --ttl 90m --wait --verify\n\n # Run a single-session hosted runtime pod entrypoint\n maestro hosted-runner --runner-session-id mrs_abc --workspace-root /workspace --listen 0.0.0.0:8080\n\n # Show usage analytics for the last 7 days\n maestro stats\n\n # Show usage analytics for one session\n maestro stats --session <session-id>\n\n # Reconstruct the timeline, trajectory, and evidence coverage for a saved run\n maestro run inspect <session-id> --json\n maestro run promote <session-id>\n\n # Validate and run a deterministic scenario fixture\n maestro scenario validate ./test/fixtures/agent-trajectory-scenarios/local-diagnostic-success.json\n maestro scenario run ./test/fixtures/agent-trajectory-scenarios/local-diagnostic-success.json --junit ./tmp/scenario.xml\n\n # Open a real agent session backed by a scripted model fixture\n maestro --replay ./test/fixtures/scripted-replay/basic-tool-call.json\n maestro --replay gs://evalops-prod-maestro-scenario-fixtures/maestro/scenarios/example.json\n\n # Record a live run into a replayable scripted scenario\n maestro --record-scenario ./tmp/recorded-scenario.json \"inspect package.json\"`,\n\t)}`;\n\tconst env = `${sectionHeading(\"Environment Variables:\")}${muted(\n\t\t` GEMINI_API_KEY - Google Gemini API key\n OPENAI_API_KEY - OpenAI API key\n OPENAI_CODEX_TOKEN - OpenAI Codex ChatGPT access token\n OPENAI_CODEX_ACCOUNT_ID - ChatGPT account id when using a raw Codex token\n ANTHROPIC_API_KEY - Anthropic API key\n MAESTRO_AGENT_DIR - Session storage directory (default: ~/.maestro/agent)\n MAESTRO_SANDBOX_MODE - Sandbox mode: read-only, workspace-write, danger-full-access\n MAESTRO_CHANGELOG - Set to off/false/hide/hidden/skip/0 to hide startup changelog banner\n MAESTRO_TUI_MINIMAL - Set to 1/true to disable animations and reduce TUI effects (SSH-friendly)\n MAESTRO_TUI_TOOL_MAX_CHARS - Max chars shown per tool output panel (0 = unlimited)\n MAESTRO_TUI_TOOL_MAX_LINES - Max lines shown per tool output panel (0 = unlimited)\n MAESTRO_MEMORY_BASE - Durable memory service base URL\n MAESTRO_MEMORY_ACCESS_TOKEN - Override bearer token for durable memory service\n MAESTRO_MEMORY_TEAM_ID - Optional team scope for durable memory service\n MAESTRO_SHARED_MEMORY_BASE - Shared memory base URL (Cloudflare Durable Objects worker)\n MAESTRO_SHARED_MEMORY_API_KEY - API key for shared memory service\n MAESTRO_REMOTE_RUNNER_URL - Hosted runner control-plane URL (default: https://runner.evalops.dev)\n MAESTRO_REMOTE_RUNNER_TOKEN - Hosted runner bearer token override\n MAESTRO_REMOTE_RUNNER_ORG_ID - EvalOps organization id for hosted runner sessions\n MAESTRO_REMOTE_RUNNER_WORKSPACE_ID - EvalOps workspace id for hosted runner sessions\n CODING_AGENT_DIR - Legacy session directory override (fallback)`,\n\t)}`;\n\tconst execSection = `${sectionHeading(\"maestro exec\")}${muted(\n\t\t` maestro exec \"Summarize recent changes\" --json\n\n Flags:\n --json Stream JSONL thread/turn events\n --output-schema <file|json> Validate final assistant JSON against a schema\n --output-last-message <path> Write the final assistant message to disk\n --full-auto | --read-only Force approval policy (auto or fail)\n --sandbox <mode> Run in sandbox: read-only, workspace-write, danger-full-access, native, docker, local, none\n --resume <sessionId> Resume a prior exec session by id\n --last Resume the most recent exec session`,\n\t)}`;\n\tconst webSection = `${sectionHeading(\"maestro web\")}${muted(\n\t\t` # Start the bundled web UI + API server\n maestro web\n\n # Use a custom port\n maestro web --port 3000`,\n\t)}`;\n\tconst portabilitySection = `${sectionHeading(\"Session Portability\")}${muted(\n\t\t` maestro export <session-id> [output-path] --format json|jsonl [--redact-secrets]\n maestro import <file.json|file.jsonl>\n\n Notes:\n - json preserves the full session in a portable wrapper object\n - jsonl preserves the append-only session log verbatim unless redaction is requested\n - --redact-secrets scrubs detected credentials from exported payloads\n - import restores the session into the current workspace session directory`,\n\t)}`;\n\tconst modesSection = `${sectionHeading(\"maestro modes\")}${muted(\n\t\t` maestro modes list\n maestro modes describe <mode> [--provider <provider>] [--json]\n\n Prints the mode primary/fallback model policy and resolved subagent dispatch\n table, including cross-provider overrides such as smart-mode coder lanes\n routed to openai-codex/gpt-5.5.`,\n\t)}`;\n\tconst memorySection = `${sectionHeading(\"maestro memory\")}${muted(\n\t\t` maestro memory [status] Show shared memory service status\n maestro memory session <id> Show per-session metrics\n maestro memory audit <id> [n] Show recent sync audit entries\n maestro memory export <id> Export metrics log as JSONL\n maestro memory watch [id] [ms] Poll status/metrics continuously`,\n\t)}`;\n\tconst skillSection = `${sectionHeading(\"maestro skill\")}${muted(\n\t\t` maestro skill list List available progressive skills\n maestro skill inspect <name> Print one skill package manifest\n maestro skill install <source> Validate and install an OSS skill package\n maestro skill publish-check <src> Validate an OSS skill package for publishing\n maestro skill new <name> Scaffold SKILL.md, reference/, scripts/, toolbox/, and mcp.json.example\n maestro skill lint [path...] Validate frontmatter, budget, mcp.json includeTools, and toolbox shape`,\n\t)}`;\n\tconst remoteSection = `${sectionHeading(\"maestro remote\")}${muted(\n\t\t` maestro remote start --workspace <id> --repo <repo> --branch <branch> [--ttl 90m] [--wait] [--verify]\n maestro remote list --workspace <id> [--state running]\n maestro remote attach <session-id> [--verify] [--print-env]\n maestro remote extend <session-id> --ttl 2h\n maestro remote stop <session-id> [--reason <text>]`,\n\t)}`;\n\tconst operatingPlaneHelp = [\n\t\t\" maestro operating-plane status --thread-id <slack-thread> [--artifact-id <id>] [--auth-subject <subject>]\",\n\t\t\" maestro operating-plane status --trace-id <id> --json\",\n\t\t\" Fetches the Platform operating-plane ledger and prints content-free runtime\",\n\t\t\" status with identity, model/tool/approval/trace/artifact/cost signals,\",\n\t\t\" allowed artifact ids/revisions, blockers, next actions, and withheld reasons.\",\n\t].join(\"\\n\");\n\tconst operatingPlaneSection = `${sectionHeading(\"maestro operating-plane\")}${muted(operatingPlaneHelp)}`;\n\tconst runSection = `${sectionHeading(\"maestro run\")}${muted(\n\t\t` maestro run inspect <session-id> [--json]\n maestro run ledger <session-id>\n maestro run replay <session-id>\n maestro run promote <session-id>\n\n Reconstructs a saved session into a timeline plus canonical agent trajectory\n with prompt, tool, file-change, artifact, policy, diagnostic, compaction,\n pending-wait, and MCP-context coverage. The ledger/replay/promote commands\n expose the local AgentRuntime projection and dry-run Platform promotion plan.`,\n\t)}`;\n\tconst initSection = `${sectionHeading(\"maestro init\")}${muted(\n\t\t` maestro init Login, create or reuse an API key, and register this agent\n maestro init --rotate-key Replace the stored agent MCP API key\n maestro init --mcp-url <url> Override the EvalOps agent MCP endpoint\n maestro init --capability code:write Declare an agent-registry capability\n maestro init --json Emit machine-readable bootstrap output`,\n\t)}`;\n\tconst hostedRunnerSection = `${sectionHeading(\"maestro hosted-runner\")}${muted(\n\t\t` maestro hosted-runner --runner-session-id <id> --workspace-root <path> [--listen 0.0.0.0:8080]\n\n Env mode:\n MAESTRO_RUNNER_SESSION_ID=mrs_abc MAESTRO_WORKSPACE_ROOT=/workspace maestro hosted-runner`,\n\t)}`;\n\tconst sessionsSection = `${sectionHeading(\"Session Metadata\")}${muted(\n\t\t` /session favorite|unfavorite Toggle favorite for current session\n /session summary \"<text>\" Save a manual summary for current session\n /sessions summarize <id> Auto-summarize a saved session`,\n\t)}`;\n\tconst sessionsDiscovery = `${sectionHeading(\"Session Commands\")}${muted(\n\t\t` /session [info|favorite|unfavorite|summary \"<text>\"]\n /sessions [list|load <id>|favorite <id>|unfavorite <id>|summarize <id>]\n (Also available via TUI command palette)`,\n\t)}`;\n\tconst tools = `${sectionHeading(\"Available Tools\")}${muted(\n\t\t` read - Read file contents\n list - List files in a directory\n find - Fast file search using fd (glob patterns)\n search - Search files with ripgrep-style filtering\n parallel_ripgrep - Run multiple ripgrep patterns in parallel and merge line ranges\n diff - Show git diffs (workspace, staged, or ranges)\n bash - Execute bash commands\n edit - Edit files with find/replace\n write - Write files (creates/overwrites)\n todo - Create TodoWrite-style checklists\n\n Read-only tools: read,list,find,search,parallel_ripgrep,diff,status\n Example: maestro --tools read,list,find,search,parallel_ripgrep,diff \"Analyze this code\"`,\n\t)}`;\n\n\tconst frameworkSection = `${sectionHeading(\"Framework Preference\")}${muted(\n\t\t` /framework <id> Set default stack (fastapi, express, node)\n /framework <id> --workspace Set workspace-scoped default\n /framework list Show available options\n Precedence: policy (locked) > policy > env override > env default > workspace > user file > none`,\n\t)}`;\n\n\tconsole.log(\n\t\t[\n\t\t\theader,\n\t\t\tusage,\n\t\t\trenderedOptions,\n\t\t\thiddenSupportSection,\n\t\t\texamples,\n\t\t\tenv,\n\t\t\texecSection,\n\t\t\twebSection,\n\t\t\tportabilitySection,\n\t\t\tmodesSection,\n\t\t\tmemorySection,\n\t\t\tskillSection,\n\t\t\tinitSection,\n\t\t\trunSection,\n\t\t\tremoteSection,\n\t\t\toperatingPlaneSection,\n\t\t\thostedRunnerSection,\n\t\t\tsessionsSection,\n\t\t\tsessionsDiscovery,\n\t\t\t`${sectionHeading(\"Tips\")}${badge(\n\t\t\t\t\"Need models?\",\n\t\t\t\t\"maestro models list\",\n\t\t\t\t\"info\",\n\t\t\t)}`,\n\t\t\tframeworkSection,\n\t\t\ttools,\n\t\t]\n\t\t\t.filter((section): section is string => section !== null)\n\t\t\t.join(\"\\n\\n\"),\n\t);\n}\n"]}