@hearsay-tools/squawk 0.18.0-pr4230.8172 → 0.18.0-pr4230.8174

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.
@@ -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,3 @@
1
+ /** Pure JSON value guards shared across runners without pulling Pi RPC wire helpers. */
2
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
3
+ export declare function number(value: unknown): number | undefined;
@@ -0,0 +1,8 @@
1
+ /** Pure JSON value guards shared across runners without pulling Pi RPC wire helpers. */
2
+ export function isRecord(value) {
3
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
4
+ }
5
+ export function number(value) {
6
+ return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
7
+ }
8
+ //# sourceMappingURL=json-guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-guards.js","sourceRoot":"","sources":["../../src/core/json-guards.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACjF,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { isRecord, number } from './json-guards.ts';
1
2
  import type { ChildProcessWithoutNullStreams } from 'node:child_process';
2
3
  import type { AgentEvent, ContentBlock } from './agent-runner.ts';
3
4
  /**
@@ -26,9 +27,8 @@ export declare function truncate(value: string, max?: number): string;
26
27
  export declare function piRpcError(value: Record<string, unknown>): string;
27
28
  /** OMP's failure response carries `error` as a string (rpc-mode.ts, v18.4.11), else as pi's. */
28
29
  export declare function ompRpcError(value: Record<string, unknown>): string;
29
- export declare function isRecord(value: unknown): value is Record<string, unknown>;
30
+ export { isRecord, number };
30
31
  export declare function string(value: unknown): string | undefined;
31
- export declare function number(value: unknown): number | undefined;
32
32
  /** OMP reports native expansion as a custom message rather than a user message. */
33
33
  export declare function ompSkillPrompt(message: Record<string, unknown>): string | undefined;
34
34
  /** Native expansions omit the request id. Bind once here, retaining the registered id.
@@ -1,3 +1,4 @@
1
+ import { isRecord, number } from './json-guards.js';
1
2
  import { skillOf, slashSkillPrompt } from './skill-trigger.js';
2
3
  /**
3
4
  * Wire helpers that the Pi-family RPC runners share: pi (`pi-runner.ts`) and its fork omp
@@ -79,15 +80,10 @@ function rpcErrorFor(value, cli) {
79
80
  const error = isRecord(value.error) ? value.error : undefined;
80
81
  return string(error?.message) ?? string(value.message) ?? `${cli} RPC command ${string(value.command) ?? 'unknown'} failed`;
81
82
  }
82
- export function isRecord(value) {
83
- return typeof value === 'object' && value !== null && !Array.isArray(value);
84
- }
83
+ export { isRecord, number };
85
84
  export function string(value) {
86
85
  return typeof value === 'string' ? value : undefined;
87
86
  }
88
- export function number(value) {
89
- return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
90
- }
91
87
  /** OMP reports native expansion as a custom message rather than a user message. */
92
88
  export function ompSkillPrompt(message) {
93
89
  if (message.role !== 'custom' || message.customType !== 'skill-prompt' || !isRecord(message.details))
@@ -1 +1 @@
1
- {"version":3,"file":"pi-rpc-wire.js","sourceRoot":"","sources":["../../src/core/pi-rpc-wire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI/D;;;;GAIG;AAEH,qGAAqG;AACrG,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,UAAU,CAAC,OAAuB;IAIhD,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,MAAM,MAAM,GAA6D,EAAE,CAAC;IAC5E,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aAC5C,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;Y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AAK,SAAS;QAAE,OAAO,GAAG,CAAC,IAAI,EAAE,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC;IAC3D,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1C,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC5E,MAAM,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9D,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,MAAM,CAAC,IAAI,EAAE;QAClC,IAAI,CAAC,UAAU,CAAC,gBAAgB,IAAI,cAAc,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC;AAChG,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /** The primary public plugin entry (spec 2026-11-24-plugin-loader-and-runner-kit § 4). */
2
- export declare const PLUGIN_ENTRY_SPECIFIER = './index.js';
2
+ export declare const PLUGIN_ENTRY_SPECIFIER = "@hearsay-tools/squawk/plugin";
3
3
  /**
4
4
  * Allowed `@hearsay-tools/squawk/plugin*` specifiers and their module stem next to this file.
5
5
  * Narrow subpaths keep `bootRuntime()` and runner `definition.ts` modules off eager
@@ -19,7 +19,7 @@ export { readNdjson } from '../core/ndjson.ts';
19
19
  export { InputSubmissions } from '../core/input-submissions.ts';
20
20
  export { V1TextCoalescer } from '../core/v1-text-coalescer.ts';
21
21
  export { ownLookup } from '../core/own-lookup.ts';
22
- export { isRecord, number } from '../core/pi-rpc-wire.ts';
22
+ export { isRecord, number } from '../core/json-guards.ts';
23
23
  export { hookEventName, isVisibleHookItem } from '../core/hook-items.ts';
24
24
  export { parseAskRequest, uiAskQuestions } from '../core/ask.ts';
25
25
  export { editWriteKey } from '../core/edit-write-key.ts';
@@ -19,7 +19,7 @@ export { readNdjson } from '../core/ndjson.js';
19
19
  export { InputSubmissions } from '../core/input-submissions.js';
20
20
  export { V1TextCoalescer } from '../core/v1-text-coalescer.js';
21
21
  export { ownLookup } from '../core/own-lookup.js';
22
- export { isRecord, number } from '../core/pi-rpc-wire.js';
22
+ export { isRecord, number } from '../core/json-guards.js';
23
23
  export { hookEventName, isVisibleHookItem } from '../core/hook-items.js';
24
24
  export { parseAskRequest, uiAskQuestions } from '../core/ask.js';
25
25
  export { editWriteKey } from '../core/edit-write-key.js';
@@ -40,7 +40,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
40
40
  error: string;
41
41
  };
42
42
  outputFormat: "json";
43
- status: 409;
43
+ status: 400;
44
44
  input: {
45
45
  query: {
46
46
  q?: string | undefined;
@@ -53,7 +53,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
53
53
  error: string;
54
54
  };
55
55
  outputFormat: "json";
56
- status: 400;
56
+ status: 409;
57
57
  input: {
58
58
  query: {
59
59
  q?: string | undefined;
@@ -3118,12 +3118,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
3118
3118
  output: {
3119
3119
  generation: string;
3120
3120
  results: ({
3121
- projectId: string;
3122
- runId: string;
3123
- type: "error" | "reset";
3124
- status: 400 | 404 | 409 | 413 | 503;
3125
- error: string;
3126
- } | {
3127
3121
  projectId: string;
3128
3122
  runId: string;
3129
3123
  type: "batch";
@@ -3137,6 +3131,12 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
3137
3131
  cursor: string;
3138
3132
  afterSeq: number;
3139
3133
  hasMore: boolean;
3134
+ } | {
3135
+ projectId: string;
3136
+ runId: string;
3137
+ type: "error" | "reset";
3138
+ status: 400 | 404 | 409 | 413 | 503;
3139
+ error: string;
3140
3140
  })[];
3141
3141
  };
3142
3142
  outputFormat: "json";
@@ -8679,24 +8679,22 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8679
8679
  };
8680
8680
  } | {
8681
8681
  output: {
8682
- workerId: string;
8683
- state: "complete" | "incomplete";
8684
- work?: {
8685
- uncommittedFiles: number;
8686
- commits: number;
8682
+ readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
8683
+ readonly error: string;
8684
+ readonly modelChoices?: {
8685
+ runner: string;
8686
+ requestedModel: string;
8687
+ availableModels: {
8688
+ id: string;
8689
+ label: string;
8690
+ description: string;
8691
+ effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
8692
+ }[];
8693
+ otherRunners: string[];
8687
8694
  } | undefined;
8688
- deleted?: ({
8689
- kind: "worktree";
8690
- path: string;
8691
- } | {
8692
- kind: "branch";
8693
- ref: string;
8694
- })[] | undefined;
8695
- remaining: ("branch" | "process" | "worktree")[];
8696
- error?: string | undefined;
8697
8695
  };
8698
8696
  outputFormat: "json";
8699
- status: 200;
8697
+ status: 400 | 401 | 403 | 409 | 503;
8700
8698
  input: {
8701
8699
  query: {
8702
8700
  [x: string]: string | string[];
@@ -8729,7 +8727,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8729
8727
  error?: string | undefined;
8730
8728
  };
8731
8729
  outputFormat: "json";
8732
- status: 409;
8730
+ status: 200;
8733
8731
  input: {
8734
8732
  query: {
8735
8733
  [x: string]: string | string[];
@@ -8745,22 +8743,24 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8745
8743
  };
8746
8744
  } | {
8747
8745
  output: {
8748
- readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
8749
- readonly error: string;
8750
- readonly modelChoices?: {
8751
- runner: string;
8752
- requestedModel: string;
8753
- availableModels: {
8754
- id: string;
8755
- label: string;
8756
- description: string;
8757
- effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
8758
- }[];
8759
- otherRunners: string[];
8746
+ workerId: string;
8747
+ state: "complete" | "incomplete";
8748
+ work?: {
8749
+ uncommittedFiles: number;
8750
+ commits: number;
8760
8751
  } | undefined;
8752
+ deleted?: ({
8753
+ kind: "worktree";
8754
+ path: string;
8755
+ } | {
8756
+ kind: "branch";
8757
+ ref: string;
8758
+ })[] | undefined;
8759
+ remaining: ("branch" | "process" | "worktree")[];
8760
+ error?: string | undefined;
8761
8761
  };
8762
8762
  outputFormat: "json";
8763
- status: 400 | 401 | 403 | 409 | 503;
8763
+ status: 409;
8764
8764
  input: {
8765
8765
  query: {
8766
8766
  [x: string]: string | string[];
@@ -25333,24 +25333,22 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
25333
25333
  };
25334
25334
  } | {
25335
25335
  output: {
25336
- workerId: string;
25337
- state: "complete" | "incomplete";
25338
- work?: {
25339
- uncommittedFiles: number;
25340
- commits: number;
25336
+ readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
25337
+ readonly error: string;
25338
+ readonly modelChoices?: {
25339
+ runner: string;
25340
+ requestedModel: string;
25341
+ availableModels: {
25342
+ id: string;
25343
+ label: string;
25344
+ description: string;
25345
+ effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
25346
+ }[];
25347
+ otherRunners: string[];
25341
25348
  } | undefined;
25342
- deleted?: ({
25343
- kind: "worktree";
25344
- path: string;
25345
- } | {
25346
- kind: "branch";
25347
- ref: string;
25348
- })[] | undefined;
25349
- remaining: ("branch" | "process" | "worktree")[];
25350
- error?: string | undefined;
25351
25349
  };
25352
25350
  outputFormat: "json";
25353
- status: 200;
25351
+ status: 400 | 401 | 403 | 409 | 503;
25354
25352
  input: {
25355
25353
  query: {
25356
25354
  [x: string]: string | string[];
@@ -25383,7 +25381,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
25383
25381
  error?: string | undefined;
25384
25382
  };
25385
25383
  outputFormat: "json";
25386
- status: 409;
25384
+ status: 200;
25387
25385
  input: {
25388
25386
  query: {
25389
25387
  [x: string]: string | string[];
@@ -25399,22 +25397,24 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
25399
25397
  };
25400
25398
  } | {
25401
25399
  output: {
25402
- readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
25403
- readonly error: string;
25404
- readonly modelChoices?: {
25405
- runner: string;
25406
- requestedModel: string;
25407
- availableModels: {
25408
- id: string;
25409
- label: string;
25410
- description: string;
25411
- effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
25412
- }[];
25413
- otherRunners: string[];
25400
+ workerId: string;
25401
+ state: "complete" | "incomplete";
25402
+ work?: {
25403
+ uncommittedFiles: number;
25404
+ commits: number;
25414
25405
  } | undefined;
25406
+ deleted?: ({
25407
+ kind: "worktree";
25408
+ path: string;
25409
+ } | {
25410
+ kind: "branch";
25411
+ ref: string;
25412
+ })[] | undefined;
25413
+ remaining: ("branch" | "process" | "worktree")[];
25414
+ error?: string | undefined;
25415
25415
  };
25416
25416
  outputFormat: "json";
25417
- status: 400 | 401 | 403 | 409 | 503;
25417
+ status: 409;
25418
25418
  input: {
25419
25419
  query: {
25420
25420
  [x: string]: string | string[];
@@ -7,6 +7,12 @@ export declare function createWorkspaceLiveRoutes(live: Parameters<typeof create
7
7
  output: {
8
8
  generation: string;
9
9
  results: ({
10
+ projectId: string;
11
+ runId: string;
12
+ type: "error" | "reset";
13
+ status: 400 | 404 | 409 | 413 | 503;
14
+ error: string;
15
+ } | {
10
16
  projectId: string;
11
17
  runId: string;
12
18
  type: "batch";
@@ -20,12 +26,6 @@ export declare function createWorkspaceLiveRoutes(live: Parameters<typeof create
20
26
  cursor: string;
21
27
  afterSeq: number;
22
28
  hasMore: boolean;
23
- } | {
24
- projectId: string;
25
- runId: string;
26
- type: "error" | "reset";
27
- status: 400 | 404 | 409 | 413 | 503;
28
- error: string;
29
29
  })[];
30
30
  };
31
31
  outputFormat: "json";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hearsay-tools/squawk",
3
- "version": "0.18.0-pr4230.8172",
3
+ "version": "0.18.0-pr4230.8174",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -68,8 +68,8 @@
68
68
  "devDependencies": {
69
69
  "@babel/parser": "^8.0.8",
70
70
  "@babel/types": "^8.0.8",
71
- "@open-mercato/cezar-api-client": "0.18.0-pr4230.8172",
72
- "@open-mercato/cezar-contract": "0.18.0-pr4230.8172",
71
+ "@open-mercato/cezar-api-client": "0.18.0-pr4230.8174",
72
+ "@open-mercato/cezar-contract": "0.18.0-pr4230.8174",
73
73
  "@types/node": "^24.19.1",
74
74
  "@types/ws": "^8.18.1",
75
75
  "esbuild": "^0.28.1",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "4463f50b85bb93001ee26c220d1e062aa50967fd"
89
+ "gitHead": "7d9cdd040418db33f8286b3a5379a02de572bb59"
90
90
  }
@@ -40,10 +40,11 @@ const scan = (dir) => {
40
40
  scan(dist);
41
41
 
42
42
  // Emitted declarations under dist/ may reference `@hearsay-tools/squawk/plugin*`, which TypeScript
43
- // cannot resolve while the workspace package name is `@wjarka/cezarion`. Repoint `.d.ts` files
44
- // to the sibling `dist/plugin/<stem>.js` declaration; `.js` runtime imports stay on the package
45
- // specifier and resolve through `installPluginResolveHook()`.
46
- const PLUGIN_SPEC = /(['"])@hearsay-tools\/squawk\/plugin(?:\/(runtime|model-settings|managed-cli|pi-rpc))?\1/g;
43
+ // cannot resolve while the workspace package name is `@wjarka/cezarion`. Repoint `.d.ts` module
44
+ // specifiers (`from`, `import(...)`, side-effect `import`) to the sibling `dist/plugin/<stem>.js`
45
+ // declaration without touching string-literal type constants; `.js` runtime imports stay on the
46
+ // package specifier and resolve through `installPluginResolveHook()`.
47
+ const PLUGIN_SPEC = /(from\s+|import\s*\(\s*|import\s+)(['"])@hearsay-tools\/squawk\/plugin(?:\/(runtime|model-settings|managed-cli|pi-rpc))?\2/g;
47
48
  const pluginDir = join(dist, 'plugin');
48
49
  function repointPluginDecls() {
49
50
  if (!existsSync(join(pluginDir, 'index.d.ts'))) return 0;
@@ -57,10 +58,10 @@ function repointPluginDecls() {
57
58
  const text = readFileSync(p, 'utf8');
58
59
  PLUGIN_SPEC.lastIndex = 0;
59
60
  if (!PLUGIN_SPEC.test(text)) continue;
60
- const next = text.replace(PLUGIN_SPEC, (_match, _quote, sub) => {
61
+ const next = text.replace(PLUGIN_SPEC, (_match, prefix, _quote, sub) => {
61
62
  let rel = relative(dirname(p), join(pluginDir, `${sub ?? 'index'}.js`)).replaceAll('\\', '/');
62
63
  if (!rel.startsWith('.')) rel = `./${rel}`;
63
- return `'${rel}'`;
64
+ return `${prefix}'${rel}'`;
64
65
  });
65
66
  writeFileSync(p, next, 'utf8');
66
67
  count++;