@hearsay-tools/squawk 0.18.0-dev.8597 → 0.18.0-dev.8613

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 (38) hide show
  1. package/dist/automations/tools.d.ts +8 -8
  2. package/dist/features/mcp/cli.d.ts +14 -0
  3. package/dist/features/mcp/cli.js +87 -0
  4. package/dist/features/mcp/cli.js.map +1 -0
  5. package/dist/features/mcp/index.d.ts +9 -0
  6. package/dist/features/mcp/index.js +13 -0
  7. package/dist/features/mcp/index.js.map +1 -0
  8. package/dist/features/mcp/stdio.d.ts +10 -0
  9. package/dist/features/mcp/stdio.js +41 -0
  10. package/dist/features/mcp/stdio.js.map +1 -0
  11. package/dist/features/mcp/tools.d.ts +19 -0
  12. package/dist/features/mcp/tools.js +476 -0
  13. package/dist/features/mcp/tools.js.map +1 -0
  14. package/dist/server/activity-routes.d.ts +23 -23
  15. package/dist/server/live-routes.d.ts +6 -6
  16. package/dist/server/models-routes.d.ts +12 -12
  17. package/dist/server/providers-routes.d.ts +57 -57
  18. package/dist/server/repo-routes.d.ts +34 -34
  19. package/dist/server/reports-api.d.ts +2 -2
  20. package/dist/server/runs-routes.d.ts +31 -31
  21. package/dist/server/server.d.ts +1596 -1596
  22. package/dist/server/workspace-live-routes.d.ts +6 -6
  23. package/dist/server/workspace-routes.d.ts +84 -84
  24. package/dist/task-cli/cli.js +54 -221
  25. package/dist/task-cli/cli.js.map +1 -1
  26. package/dist/task-cli/discovery.d.ts +22 -1
  27. package/dist/task-cli/discovery.js +69 -17
  28. package/dist/task-cli/discovery.js.map +1 -1
  29. package/dist/task-cli/http.d.ts +15 -13
  30. package/dist/task-cli/http.js +16 -6
  31. package/dist/task-cli/http.js.map +1 -1
  32. package/dist/task-cli/operations.d.ts +156 -0
  33. package/dist/task-cli/operations.js +388 -0
  34. package/dist/task-cli/operations.js.map +1 -0
  35. package/dist/task-cli/watch.d.ts +31 -8
  36. package/dist/task-cli/watch.js +159 -91
  37. package/dist/task-cli/watch.js.map +1 -1
  38. package/package.json +4 -4
@@ -7,10 +7,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
7
7
  }[];
8
8
  isError: boolean;
9
9
  details: {
10
- ok: false;
11
- code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
12
- message: string;
13
- } | {
14
10
  ok: true;
15
11
  task: {
16
12
  id: string;
@@ -22,6 +18,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
22
18
  url?: string | undefined;
23
19
  };
24
20
  note: string;
21
+ } | {
22
+ ok: false;
23
+ code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
24
+ message: string;
25
25
  };
26
26
  }>;
27
27
  export declare function formatScheduleTaskTool(answer: Awaited<ReturnType<typeof callScheduleTask>>): {
@@ -31,10 +31,6 @@ export declare function formatScheduleTaskTool(answer: Awaited<ReturnType<typeof
31
31
  }[];
32
32
  isError: boolean;
33
33
  details: {
34
- ok: false;
35
- code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
36
- message: string;
37
- } | {
38
34
  ok: true;
39
35
  task: {
40
36
  id: string;
@@ -46,6 +42,10 @@ export declare function formatScheduleTaskTool(answer: Awaited<ReturnType<typeof
46
42
  url?: string | undefined;
47
43
  };
48
44
  note: string;
45
+ } | {
46
+ ok: false;
47
+ code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
48
+ message: string;
49
49
  };
50
50
  };
51
51
  export declare function invokeScheduledTasksTool(input: unknown): Promise<{
@@ -0,0 +1,14 @@
1
+ import { type DiscoverOriginOptions } from '../../task-cli/discovery.ts';
2
+ import { type ServeMcpStdioOptions } from './stdio.ts';
3
+ export declare const MCP_HELP: string;
4
+ export interface McpCliDeps {
5
+ cwd?: () => string;
6
+ stdout?: (line: string) => void;
7
+ stderr?: (line: string) => void;
8
+ discover?: (options: DiscoverOriginOptions) => Promise<{
9
+ origin: string;
10
+ }>;
11
+ serve?: (options: ServeMcpStdioOptions) => Promise<void>;
12
+ version?: string;
13
+ }
14
+ export declare function runMcpCommand(argv: string[], env: NodeJS.ProcessEnv, deps?: McpCliDeps): Promise<number>;
@@ -0,0 +1,87 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { dirname, join, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { parseArgs } from 'node:util';
5
+ import { productEnv } from '../../core/product-env.js';
6
+ import { commandText } from '../../home/command.js';
7
+ import { discoverCockpitOrigin } from '../../task-cli/discovery.js';
8
+ import { TaskCliError } from '../../task-cli/http.js';
9
+ import { serveMcpStdio } from './stdio.js';
10
+ export const MCP_HELP = commandText(`Squawk MCP — stdio MCP server over Squawk task operations for outside orchestrators
11
+
12
+ Usage:
13
+ cez mcp [--url <origin>] [--repo <dir>]
14
+
15
+ Options:
16
+ --url <origin> Connect to this cockpit origin instead of local discovery (also HSQ_URL / CEZ_URL).
17
+ --repo <dir> Match the cockpit serving this repository (default: cwd, falling back to a single local cockpit).
18
+ -h, --help Show this help.
19
+
20
+ Notes:
21
+ - Keeps stdout strictly for MCP JSON-RPC frames; diagnostics go to stderr.
22
+ - Refuses to start inside a Squawk task (when HSQ_TASK_ID or CEZ_TASK_ID is set).`);
23
+ function readPackageVersion() {
24
+ try {
25
+ const here = dirname(fileURLToPath(import.meta.url));
26
+ const pkg = JSON.parse(readFileSync(join(here, '..', '..', '..', 'package.json'), 'utf8'));
27
+ return pkg.version ?? '0.0.0';
28
+ }
29
+ catch {
30
+ return '0.0.0';
31
+ }
32
+ }
33
+ function parseMcpArgs(argv) {
34
+ try {
35
+ return parseArgs({
36
+ args: argv,
37
+ options: {
38
+ url: { type: 'string' },
39
+ repo: { type: 'string' },
40
+ help: { type: 'boolean', short: 'h', default: false },
41
+ },
42
+ allowPositionals: true,
43
+ strict: true,
44
+ });
45
+ }
46
+ catch (error) {
47
+ throw new TaskCliError(64, { code: 'invalid_input', error: error instanceof Error ? error.message : 'invalid arguments' });
48
+ }
49
+ }
50
+ function formatCliError(error) {
51
+ if (error instanceof TaskCliError) {
52
+ const msg = typeof error.body.error === 'string' ? error.body.error : error.message;
53
+ const hint = typeof error.body.hint === 'string' ? `\nHint: ${error.body.hint}` : '';
54
+ return { message: `${msg}${hint}`, exitCode: error.exitCode };
55
+ }
56
+ return { message: error instanceof Error ? error.message : String(error), exitCode: 1 };
57
+ }
58
+ export async function runMcpCommand(argv, env, deps = {}) {
59
+ const writeOut = deps.stdout ?? ((line) => console.log(line));
60
+ const writeErr = deps.stderr ?? ((line) => console.error(line));
61
+ try {
62
+ const parsed = parseMcpArgs(argv);
63
+ if (parsed.values.help) {
64
+ writeOut(MCP_HELP);
65
+ return 0;
66
+ }
67
+ if (parsed.positionals.length > 0) {
68
+ throw new TaskCliError(64, { code: 'invalid_input', error: `unexpected argument '${parsed.positionals[0]}'` });
69
+ }
70
+ if (productEnv('TASK_ID', env)?.trim()) {
71
+ writeErr(commandText('cez mcp is for outside orchestrators and refuses to start inside a Squawk task (HSQ_TASK_ID / CEZ_TASK_ID is set).'));
72
+ return 1;
73
+ }
74
+ const url = parsed.values.url ?? (productEnv('URL', env)?.trim() || undefined);
75
+ const explicitRepo = parsed.values.repo !== undefined;
76
+ const repoDir = resolve(parsed.values.repo ?? (deps.cwd ? deps.cwd() : process.cwd()));
77
+ const { origin } = await (deps.discover ?? discoverCockpitOrigin)({ url, repoDir, explicitRepo });
78
+ await (deps.serve ?? serveMcpStdio)({ origin, version: deps.version ?? readPackageVersion() });
79
+ return 0;
80
+ }
81
+ catch (error) {
82
+ const formatted = formatCliError(error);
83
+ writeErr(formatted.message);
84
+ return formatted.exitCode;
85
+ }
86
+ }
87
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/features/mcp/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,E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AE,YAAY,EAAE,CAAC,CAAC;QAClG,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,kBAAkB,EAAE,EAAE,CAAC,CAAC;QAC/F,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QACxC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,SAAS,CAAC,QAAQ,CAAC;IAC5B,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The bundled orchestrator MCP feature (spec 2026-11-27-orchestrator-mcp-server,
3
+ * hearsay-tools/squawk#4401): registers `hsq mcp` through the plugin API only.
4
+ * Nothing outside this folder imports it.
5
+ */
6
+ import type { CliCommandDefinition, SquawkPluginApi } from '../../plugin/index.ts';
7
+ /** `hsq mcp`: parses its own argv and talks to a running cockpit over loopback HTTP. */
8
+ export declare const mcpCliCommand: CliCommandDefinition;
9
+ export default function setup(api: SquawkPluginApi): void;
@@ -0,0 +1,13 @@
1
+ /** `hsq mcp`: parses its own argv and talks to a running cockpit over loopback HTTP. */
2
+ export const mcpCliCommand = {
3
+ name: 'mcp',
4
+ usage: [' cez mcp [--url <origin>] [--repo <dir>] serve Squawk task tools over MCP stdio (see: mcp --help)'],
5
+ parseMode: 'subcommand',
6
+ homeMode: 'none',
7
+ runtimeMode: 'none',
8
+ load: async () => (await import('./cli.js')).runMcpCommand,
9
+ };
10
+ export default function setup(api) {
11
+ api.registerCliCommand(mcpCliCommand);
12
+ }
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/mcp/index.ts"],"names":[],"mappings":"AAOA,wFAAwF;AACxF,MAAM,CAAC,MAAM,aAAa,GAAyB;IACjD,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,CAAC,qGAAqG,CAAC;IAC9G,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa;CAC3D,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,GAAoB;IAChD,GAAG,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;AACxC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type OrchestratorMcpOptions } from './tools.ts';
2
+ export interface ServeMcpStdioOptions extends OrchestratorMcpOptions {
3
+ stdin?: NodeJS.ReadableStream | undefined;
4
+ stdout?: NodeJS.WritableStream | undefined;
5
+ }
6
+ /**
7
+ * Run the orchestrator MCP server over stdio until the transport closes, stdin ends, or a
8
+ * termination signal arrives. Keeps stdout exclusively for MCP JSON-RPC frames.
9
+ */
10
+ export declare function serveMcpStdio(options: ServeMcpStdioOptions): Promise<void>;
@@ -0,0 +1,41 @@
1
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
2
+ import { createOrchestratorMcpServer } from './tools.js';
3
+ /**
4
+ * Run the orchestrator MCP server over stdio until the transport closes, stdin ends, or a
5
+ * termination signal arrives. Keeps stdout exclusively for MCP JSON-RPC frames.
6
+ */
7
+ export async function serveMcpStdio(options) {
8
+ const server = createOrchestratorMcpServer(options);
9
+ const stdin = options.stdin ?? process.stdin;
10
+ const stdout = options.stdout ?? process.stdout;
11
+ const transport = new StdioServerTransport(stdin, stdout);
12
+ let closing = false;
13
+ const closeOnce = () => {
14
+ if (closing)
15
+ return;
16
+ closing = true;
17
+ void server.close().catch(() => { });
18
+ };
19
+ await new Promise((resolve, reject) => {
20
+ const onSignal = () => closeOnce();
21
+ const cleanup = () => {
22
+ stdin.removeListener('end', closeOnce);
23
+ stdin.removeListener('close', closeOnce);
24
+ process.removeListener('SIGINT', onSignal);
25
+ process.removeListener('SIGTERM', onSignal);
26
+ };
27
+ server.onclose = () => {
28
+ cleanup();
29
+ resolve();
30
+ };
31
+ stdin.once('end', closeOnce);
32
+ stdin.once('close', closeOnce);
33
+ process.once('SIGINT', onSignal);
34
+ process.once('SIGTERM', onSignal);
35
+ void server.connect(transport).catch((error) => {
36
+ cleanup();
37
+ reject(error);
38
+ });
39
+ });
40
+ }
41
+ //# sourceMappingURL=stdio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../../src/features/mcp/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAA+B,MAAM,YAAY,CAAC;AAOtF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAA6B;IAC/D,MAAM,MAAM,GAAG,2BAA2B,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC;IAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAChD,MAAM,SAAS,GAAG,IAAI,oBAAoB,CAAC,KAA6B,EAAE,MAA+B,CAAC,CAAC;IAE3G,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,IAAI,OAAO;YAAE,OAAO;QACpB,OAAO,GAAG,IAAI,CAAC;QACf,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAA6C,CAAC,CAAC,CAAC;IACjF,CAAC,CAAC;IAEF,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1C,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;YACvC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YACzC,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAC3C,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9C,CAAC,CAAC;QACF,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE;YACpB,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACjC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAClC,KAAK,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YAC7C,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { type FetchFn } from '../../task-cli/http.ts';
3
+ export declare const MCP_SERVER_NAME = "squawk";
4
+ export declare const MCP_SERVER_INSTRUCTIONS: string;
5
+ export interface OrchestratorMcpOptions {
6
+ origin: string;
7
+ version?: string | undefined;
8
+ fetch?: FetchFn | undefined;
9
+ pollMs?: number | undefined;
10
+ heartbeatMs?: number | undefined;
11
+ }
12
+ export declare function formatMcpToolError(error: unknown): {
13
+ isError: true;
14
+ content: [{
15
+ type: 'text';
16
+ text: string;
17
+ }];
18
+ };
19
+ export declare function createOrchestratorMcpServer(options: OrchestratorMcpOptions): Server;