@hearsay-tools/squawk 0.18.0-dev.7893 → 0.18.0-dev.7899

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/core/secret-redaction.d.ts +2 -0
  2. package/dist/core/secret-redaction.js +11 -3
  3. package/dist/core/secret-redaction.js.map +1 -1
  4. package/dist/delegation/routes.d.ts +65 -65
  5. package/dist/runs/run-redaction.d.ts +2 -0
  6. package/dist/runs/run-redaction.js +18 -7
  7. package/dist/runs/run-redaction.js.map +1 -1
  8. package/dist/server/provider-sign-in-routes.d.ts +2 -2
  9. package/dist/server/runner-install-routes.d.ts +10 -10
  10. package/dist/server/server.d.ts +58 -58
  11. package/package.json +4 -4
  12. package/web/dist/assets/{activity-motion-BNen0Yj8.js → activity-motion-DKY_Cd-w.js} +1 -1
  13. package/web/dist/assets/{activity-route-BGQMI1Yu.js → activity-route-CFOKEc61.js} +1 -1
  14. package/web/dist/assets/{commit-diff-panel-Cr-XVbz_.js → commit-diff-panel-BiNUdbd8.js} +1 -1
  15. package/web/dist/assets/design-icons-CzEoMH9c.js +1 -0
  16. package/web/dist/assets/{dialog-DSwzMeY3.js → dialog-B3EUmMBQ.js} +1 -1
  17. package/web/dist/assets/{diff-DqLaONaB.js → diff-WtmvA0fu.js} +2 -2
  18. package/web/dist/assets/{diff-controls-C8aqhty4.js → diff-controls-CA6lS7Yp.js} +1 -1
  19. package/web/dist/assets/{diff-view-CHj5zMlT.js → diff-view-BG91xPpY.js} +1 -1
  20. package/web/dist/assets/{dropdown-menu-D4zMgwkC.js → dropdown-menu-Dso6iTId.js} +1 -1
  21. package/web/dist/assets/{file-preview-C9yv3267.js → file-preview-YCD-8e6S.js} +1 -1
  22. package/web/dist/assets/{git-toolbar-uHPKACQa.js → git-toolbar-B5YAUWQ7.js} +1 -1
  23. package/web/dist/assets/{github-Fy6-Zf4b.js → github-DHeSsbSc.js} +1 -1
  24. package/web/dist/assets/{global-activity-route-CpAGVfbb.js → global-activity-route-CMq49K4H.js} +1 -1
  25. package/web/dist/assets/{index-Dn02NPUV.js → index-C3pMUosD.js} +4 -4
  26. package/web/dist/assets/{markdown-9j2EqN9q.js → markdown-OTuqNLUj.js} +1 -1
  27. package/web/dist/assets/{picker-pill-D8SyrTxD.js → picker-pill-BhCKGHAn.js} +1 -1
  28. package/web/dist/assets/{preview-pane-connected-CBKK0crt.js → preview-pane-connected-BvOk8924.js} +1 -1
  29. package/web/dist/assets/{prompt-template-menu-DT_0Pyd5.js → prompt-template-menu-YN8kTo5-.js} +1 -1
  30. package/web/dist/assets/{reference-chip-DwiE3MIR.js → reference-chip-BuUCKkhB.js} +1 -1
  31. package/web/dist/assets/{repo-git-CjKFvYdb.js → repo-git-B2M2bD92.js} +1 -1
  32. package/web/dist/assets/{report-reader--BXJs1DJ.js → report-reader-DeyzG6gC.js} +1 -1
  33. package/web/dist/assets/{reports-CZw5ztdC.js → reports-Ca8vCNah.js} +1 -1
  34. package/web/dist/assets/{run-header-BOEjnB1z.js → run-header-DP7P0saA.js} +1 -1
  35. package/web/dist/assets/{skills-aBp_7vVU.js → skills-5ODbLwjd.js} +1 -1
  36. package/web/dist/assets/{task-changes-B0u392zf.js → task-changes-BkeLycTI.js} +1 -1
  37. package/web/dist/assets/{task-commits-DzWFfo43.js → task-commits-Db8B7L6o.js} +1 -1
  38. package/web/dist/assets/{task-files-DTWfdMRi.js → task-files-CFVAB4Bl.js} +1 -1
  39. package/web/dist/assets/{task-github-item-CFWE3MpX.js → task-github-item-z295iYNd.js} +1 -1
  40. package/web/dist/assets/{task-thread-vYwAvLtU.js → task-thread-UXl-CsYi.js} +1 -1
  41. package/web/dist/assets/{thread-state-zGEm4Ym4.js → thread-state-BsbjdGGk.js} +1 -1
  42. package/web/dist/assets/{use-desktop-DN7wbSS7.js → use-desktop-BqVEJ3dr.js} +1 -1
  43. package/web/dist/assets/{use-hand-to-agent-state-C9YTgLEG.js → use-hand-to-agent-state-DXfR9R5L.js} +1 -1
  44. package/web/dist/assets/{workflows-C8EnR0NU.js → workflows-BCuRK6_a.js} +1 -1
  45. package/web/dist/index.html +8 -8
  46. package/web/dist/assets/design-icons-B6-0w7Aw.js +0 -1
@@ -18,3 +18,5 @@ export declare function redactSecrets(text: string, secretValues: readonly strin
18
18
  * event field names, never secrets) are scrubbed.
19
19
  */
20
20
  export declare function redactDeep<T>(value: T, secretValues: readonly string[]): T;
21
+ /** `redactDeep` with the string-leaf scrub given by the caller, so several scrubs share one copy. */
22
+ export declare function redactDeepWith<T>(value: T, redactString: (text: string) => string): T;
@@ -44,6 +44,8 @@ const TOKEN_PATTERNS = [
44
44
  /xox[baprs]-[0-9A-Za-z-]{10,}/g, // Slack
45
45
  /glpat-[0-9A-Za-z_-]{20,}/g, // GitLab PAT
46
46
  ];
47
+ /** Matches where any TOKEN_PATTERNS entry matches. With no match, the passes change nothing. */
48
+ const ANY_TOKEN_PATTERN = new RegExp(TOKEN_PATTERNS.map((re) => `(?:${re.source})`).join('|'));
47
49
  /** Collect the concrete secret values present in `env` (deduped, longest
48
50
  * first so a value that contains another is replaced whole). */
49
51
  export function collectSecretValues(env = process.env) {
@@ -66,6 +68,8 @@ export function redactSecrets(text, secretValues) {
66
68
  continue;
67
69
  out = out.split(value).join(REDACTED);
68
70
  }
71
+ if (!ANY_TOKEN_PATTERN.test(out))
72
+ return out;
69
73
  for (const re of TOKEN_PATTERNS) {
70
74
  out = out.replace(re, REDACTED);
71
75
  }
@@ -77,16 +81,20 @@ export function redactSecrets(text, secretValues) {
77
81
  * event field names, never secrets) are scrubbed.
78
82
  */
79
83
  export function redactDeep(value, secretValues) {
84
+ return redactDeepWith(value, (text) => redactSecrets(text, secretValues));
85
+ }
86
+ /** `redactDeep` with the string-leaf scrub given by the caller, so several scrubs share one copy. */
87
+ export function redactDeepWith(value, redactString) {
80
88
  if (typeof value === 'string') {
81
- return redactSecrets(value, secretValues);
89
+ return redactString(value);
82
90
  }
83
91
  if (Array.isArray(value)) {
84
- return value.map((v) => redactDeep(v, secretValues));
92
+ return value.map((v) => redactDeepWith(v, redactString));
85
93
  }
86
94
  if (value && typeof value === 'object') {
87
95
  const out = {};
88
96
  for (const [k, v] of Object.entries(value)) {
89
- out[k] = redactDeep(v, secretValues);
97
+ out[k] = redactDeepWith(v, redactString);
90
98
  }
91
99
  return out;
92
100
  }
@@ -1 +1 @@
1
- {"version":3,"file":"secret-redaction.js","sourceRoot":"","sources":["../../src/core/secret-redaction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GACzB,sIAAsI,CAAC;AAEzI;;iCAEiC;AACjC,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAAC;IAC3D,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,qBAAqB;CACtB,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,iEAAiE;AACjE,MAAM,cAAc,GAAsB;IACxC,6BAA6B,EAAE,+CAA+C;IAC9E,+BAA+B,EAAE,0BAA0B;IAC3D,4BAA4B,EAAE,YAAY;IAC1C,wBAAwB,EAAE,sBAAsB;IAChD,mBAAmB,EAAE,oBAAoB;IACzC,mBAAmB,EAAE,8BAA8B;IACnD,wBAAwB,EAAE,iBAAiB;IAC3C,uBAAuB,EAAE,4BAA4B;IACrD,+BAA+B,EAAE,QAAQ;IACzC,2BAA2B,EAAE,aAAa;CAC3C,CAAC;AAEF;iEACiE;AACjE,MAAM,UAAU,mBAAmB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACtE,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,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KAAK,MAAM,EAAE,IAAI,cAAc,EAAE,CAAC;QAChC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAI,KAAQ,EAAE,YAA+B;IACrE,OAAO,cAAc,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,cAAc,CAAI,KAAQ,EAAE,YAAsC;IAChF,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,YAAY,CAAC,KAAK,CAAiB,CAAC;IAC7C,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,YAAY,CAAC,CAAiB,CAAC;IAC3E,CAAC;IACD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;YACtE,GAAG,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,GAAQ,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -27,6 +27,18 @@ export declare function delegationFailure(error: unknown): {
27
27
  export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
28
28
  "/list": {
29
29
  $get: {
30
+ output: {
31
+ error: string;
32
+ code?: "invalid_input" | undefined;
33
+ };
34
+ outputFormat: "json";
35
+ status: 400;
36
+ input: {
37
+ query: {
38
+ offset?: string | undefined;
39
+ };
40
+ };
41
+ } | {
30
42
  output: {
31
43
  workers: {
32
44
  workerId: string;
@@ -73,18 +85,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
73
85
  offset?: string | undefined;
74
86
  };
75
87
  };
76
- } | {
77
- output: {
78
- error: string;
79
- code?: "invalid_input" | undefined;
80
- };
81
- outputFormat: "json";
82
- status: 400;
83
- input: {
84
- query: {
85
- offset?: string | undefined;
86
- };
87
- };
88
88
  };
89
89
  };
90
90
  } & {
@@ -629,6 +629,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
629
629
  } & {
630
630
  "/:workerId": {
631
631
  $get: {
632
+ output: {
633
+ error: string;
634
+ code?: "invalid_input" | undefined;
635
+ };
636
+ outputFormat: "json";
637
+ status: 400;
638
+ input: {
639
+ param: {
640
+ workerId: string;
641
+ };
642
+ };
643
+ } | {
632
644
  output: {
633
645
  workerId: string;
634
646
  settled: boolean;
@@ -746,7 +758,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
746
758
  workerId: string;
747
759
  };
748
760
  };
749
- } | {
761
+ };
762
+ };
763
+ } & {
764
+ "/:workerId/collect": {
765
+ $post: {
750
766
  output: {
751
767
  error: string;
752
768
  code?: "invalid_input" | undefined;
@@ -757,12 +773,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
757
773
  param: {
758
774
  workerId: string;
759
775
  };
776
+ } & {
777
+ json: Record<string, never>;
760
778
  };
761
- };
762
- };
763
- } & {
764
- "/:workerId/collect": {
765
- $post: {
779
+ } | {
766
780
  output: {
767
781
  workerId: string;
768
782
  parentRunId: string;
@@ -885,7 +899,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
885
899
  } & {
886
900
  json: Record<string, never>;
887
901
  };
888
- } | {
902
+ };
903
+ };
904
+ } & {
905
+ "/:workerId/steer": {
906
+ $post: {
889
907
  output: {
890
908
  error: string;
891
909
  code?: "invalid_input" | undefined;
@@ -897,13 +915,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
897
915
  workerId: string;
898
916
  };
899
917
  } & {
900
- json: Record<string, never>;
918
+ json: {
919
+ text: string;
920
+ };
901
921
  };
902
- };
903
- };
904
- } & {
905
- "/:workerId/steer": {
906
- $post: {
922
+ } | {
907
923
  output: {
908
924
  workerId: string;
909
925
  state: "delivered" | "queued";
@@ -919,7 +935,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
919
935
  text: string;
920
936
  };
921
937
  };
922
- } | {
938
+ };
939
+ };
940
+ } & {
941
+ "/:workerId/stop": {
942
+ $post: {
923
943
  output: {
924
944
  error: string;
925
945
  code?: "invalid_input" | undefined;
@@ -931,15 +951,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
931
951
  workerId: string;
932
952
  };
933
953
  } & {
934
- json: {
935
- text: string;
936
- };
954
+ json: Record<string, never>;
937
955
  };
938
- };
939
- };
940
- } & {
941
- "/:workerId/stop": {
942
- $post: {
956
+ } | {
943
957
  output: {
944
958
  workerId: string;
945
959
  state: "stopping" | "terminated";
@@ -953,7 +967,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
953
967
  } & {
954
968
  json: Record<string, never>;
955
969
  };
956
- } | {
970
+ };
971
+ };
972
+ } & {
973
+ "/:workerId/destroy": {
974
+ $post: {
957
975
  output: {
958
976
  error: string;
959
977
  code?: "invalid_input" | undefined;
@@ -965,13 +983,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
965
983
  workerId: string;
966
984
  };
967
985
  } & {
968
- json: Record<string, never>;
986
+ json: {
987
+ discardWork?: true | undefined;
988
+ };
969
989
  };
970
- };
971
- };
972
- } & {
973
- "/:workerId/destroy": {
974
- $post: {
990
+ } | {
975
991
  output: {
976
992
  workerId: string;
977
993
  state: "complete" | "incomplete";
@@ -1000,22 +1016,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1000
1016
  discardWork?: true | undefined;
1001
1017
  };
1002
1018
  };
1003
- } | {
1004
- output: {
1005
- error: string;
1006
- code?: "invalid_input" | undefined;
1007
- };
1008
- outputFormat: "json";
1009
- status: 400;
1010
- input: {
1011
- param: {
1012
- workerId: string;
1013
- };
1014
- } & {
1015
- json: {
1016
- discardWork?: true | undefined;
1017
- };
1018
- };
1019
1019
  } | {
1020
1020
  output: {
1021
1021
  workerId: string;
@@ -1051,13 +1051,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1051
1051
  "/:workerId/diff": {
1052
1052
  $get: {
1053
1053
  output: {
1054
- workerId: string;
1055
- baselineSha: string;
1056
- diff: string;
1057
- truncated: boolean;
1054
+ error: string;
1055
+ code?: "invalid_input" | undefined;
1058
1056
  };
1059
1057
  outputFormat: "json";
1060
- status: 200;
1058
+ status: 400;
1061
1059
  input: {
1062
1060
  param: {
1063
1061
  workerId: string;
@@ -1065,11 +1063,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1065
1063
  };
1066
1064
  } | {
1067
1065
  output: {
1068
- error: string;
1069
- code?: "invalid_input" | undefined;
1066
+ workerId: string;
1067
+ baselineSha: string;
1068
+ diff: string;
1069
+ truncated: boolean;
1070
1070
  };
1071
1071
  outputFormat: "json";
1072
- status: 400;
1072
+ status: 200;
1073
1073
  input: {
1074
1074
  param: {
1075
1075
  workerId: string;
@@ -5,6 +5,8 @@ export declare class RunRedaction implements RunRedactionPort {
5
5
  private secretValues;
6
6
  /** Controller-issued tokens never persist, including when host-secret redaction is disabled. */
7
7
  private readonly sessionSecrets;
8
+ /** `sessionSecrets` in insertion order; rebuilt only when a new secret is registered. */
9
+ private sessionList;
8
10
  registerSessionSecret(value: string): void;
9
11
  containsSessionSecret(value: string): boolean;
10
12
  /**
@@ -3,29 +3,40 @@
3
3
  * text before they reach disk or the live wire. `RunStore` keeps one of these as `store.redaction`.
4
4
  */
5
5
  import { productEnv } from '../core/product-env.js';
6
- import { collectSecretValues, redactDeep } from '../core/secret-redaction.js';
6
+ import { collectSecretValues, redactDeep, redactDeepWith, redactSecrets } from '../core/secret-redaction.js';
7
7
  import { redactText } from './record-write-rules.js';
8
8
  export class RunRedaction {
9
9
  /** Lazily-collected concrete secret values from the host env (#427). */
10
10
  secretValues = null;
11
11
  /** Controller-issued tokens never persist, including when host-secret redaction is disabled. */
12
12
  sessionSecrets = new Set();
13
- registerSessionSecret(value) { this.sessionSecrets.add(value); }
14
- containsSessionSecret(value) { return [...this.sessionSecrets].some(secret => value.includes(secret)); }
13
+ /** `sessionSecrets` in insertion order; rebuilt only when a new secret is registered. */
14
+ sessionList = [];
15
+ registerSessionSecret(value) {
16
+ if (this.sessionSecrets.has(value))
17
+ return;
18
+ this.sessionSecrets.add(value);
19
+ this.sessionList = [...this.sessionSecrets];
20
+ }
21
+ containsSessionSecret(value) { return this.sessionList.some(secret => value.includes(secret)); }
15
22
  /**
16
23
  * Scrub known credential values / token shapes from an event before it is
17
24
  * persisted or fanned out. On by default; `CEZ_REDACT_SECRETS=0` opts out.
18
25
  */
19
26
  redact(event) {
20
- const safe = this.sessionSecrets.size ? redactDeep(event, [...this.sessionSecrets]) : event;
27
+ const session = this.sessionList;
21
28
  if (productEnv('REDACT_SECRETS') === '0')
22
- return safe;
23
- return redactDeep(safe, this.hostSecrets());
29
+ return session.length ? redactDeep(event, session) : event;
30
+ const host = this.hostSecrets();
31
+ if (!session.length)
32
+ return redactDeep(event, host);
33
+ // One copy for both scrubs; each string leaf gets the same two passes in the same order.
34
+ return redactDeepWith(event, text => redactSecrets(redactSecrets(text, session), host));
24
35
  }
25
36
  /** Best-effort scrub of one free-text string bound for `runs.json`. Honors
26
37
  * the `CEZ_REDACT_SECRETS=0` opt-out itself so every caller inherits it. */
27
38
  redactText(text) {
28
- return redactText(text, [...this.sessionSecrets], () => this.hostSecrets());
39
+ return redactText(text, this.sessionList, () => this.hostSecrets());
29
40
  }
30
41
  hostSecrets() {
31
42
  if (this.secretValues === null)
@@ -1 +1 @@
1
- {"version":3,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,CAAC,KAAK,CAAC;QACrG,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,MAAM;YAAE,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACpD,yFAAyF;QACzF,OAAO,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1F,CAAC;IAED;iFAC6E;IAC7E,UAAU,CAAC,IAAY;QACrB,OAAO,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IACtE,CAAC;IAEO,WAAW;QACjB,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI;YAAE,IAAI,CAAC,YAAY,GAAG,mBAAmB,EAAE,CAAC;QAC1E,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;CACF"}
@@ -18,7 +18,7 @@ export declare function createProviderSignInRoutes(options: {
18
18
  error: string;
19
19
  };
20
20
  outputFormat: "json";
21
- status: 400;
21
+ status: 409;
22
22
  input: {
23
23
  json: {
24
24
  provider: string;
@@ -30,7 +30,7 @@ export declare function createProviderSignInRoutes(options: {
30
30
  error: string;
31
31
  };
32
32
  outputFormat: "json";
33
- status: 409;
33
+ status: 400;
34
34
  input: {
35
35
  json: {
36
36
  provider: string;
@@ -51,15 +51,11 @@ export declare function createRunnerInstallRoutes(options: {
51
51
  "/runner-install/:runner": {
52
52
  $post: {
53
53
  output: {
54
- supported: boolean;
55
- installedVersion: string | null;
56
- latestVersion: string | null;
57
- updateAvailable: boolean;
58
- phase: "activating" | "checking" | "downloading" | "extracting" | "failed" | "idle" | "removing" | "verifying";
59
- error: string | null;
54
+ error: string;
55
+ code?: "invalid_input" | undefined;
60
56
  };
61
57
  outputFormat: "json";
62
- status: 202;
58
+ status: 400;
63
59
  input: {
64
60
  param: {
65
61
  runner: string;
@@ -71,11 +67,15 @@ export declare function createRunnerInstallRoutes(options: {
71
67
  };
72
68
  } | {
73
69
  output: {
74
- error: string;
75
- code?: "invalid_input" | undefined;
70
+ supported: boolean;
71
+ installedVersion: string | null;
72
+ latestVersion: string | null;
73
+ updateAvailable: boolean;
74
+ phase: "activating" | "checking" | "downloading" | "extracting" | "failed" | "idle" | "removing" | "verifying";
75
+ error: string | null;
76
76
  };
77
77
  outputFormat: "json";
78
- status: 400;
78
+ status: 202;
79
79
  input: {
80
80
  param: {
81
81
  runner: string;
@@ -4608,6 +4608,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4608
4608
  } & {
4609
4609
  "/repo/commit/:sha": {
4610
4610
  $get: {
4611
+ output: string;
4612
+ outputFormat: "text";
4613
+ status: import("hono/utils/http-status").ContentfulStatusCode;
4614
+ input: {
4615
+ query: {
4616
+ structured?: string | undefined;
4617
+ };
4618
+ } & {
4619
+ param: {
4620
+ sha: string;
4621
+ };
4622
+ };
4623
+ } | {
4611
4624
  output: {
4612
4625
  error: string;
4613
4626
  code?: "invalid_input" | undefined;
@@ -4671,19 +4684,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4671
4684
  sha: string;
4672
4685
  };
4673
4686
  };
4674
- } | {
4675
- output: string;
4676
- outputFormat: "text";
4677
- status: import("hono/utils/http-status").ContentfulStatusCode;
4678
- input: {
4679
- query: {
4680
- structured?: string | undefined;
4681
- };
4682
- } & {
4683
- param: {
4684
- sha: string;
4685
- };
4686
- };
4687
4687
  };
4688
4688
  };
4689
4689
  } & {
@@ -18485,20 +18485,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18485
18485
  } & {
18486
18486
  "/runs/:id/handoff": {
18487
18487
  $get: {
18488
- output: {
18489
- error: string;
18490
- };
18491
- outputFormat: "json";
18492
- status: 404;
18488
+ output: string;
18489
+ outputFormat: "text";
18490
+ status: 200;
18493
18491
  input: {
18494
18492
  param: {
18495
18493
  id: string;
18496
18494
  };
18497
18495
  };
18498
18496
  } | {
18499
- output: string;
18500
- outputFormat: "text";
18501
- status: 200;
18497
+ output: {
18498
+ error: string;
18499
+ };
18500
+ outputFormat: "json";
18501
+ status: 404;
18502
18502
  input: {
18503
18503
  param: {
18504
18504
  id: string;
@@ -18536,20 +18536,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18536
18536
  } & {
18537
18537
  "/runs/:id/diff": {
18538
18538
  $get: {
18539
- output: {
18540
- error: string;
18541
- };
18542
- outputFormat: "json";
18543
- status: 404 | 409;
18539
+ output: string;
18540
+ outputFormat: "text";
18541
+ status: import("hono/utils/http-status").ContentfulStatusCode;
18544
18542
  input: {
18545
18543
  param: {
18546
18544
  id: string;
18547
18545
  };
18548
18546
  };
18549
18547
  } | {
18550
- output: string;
18551
- outputFormat: "text";
18552
- status: import("hono/utils/http-status").ContentfulStatusCode;
18548
+ output: {
18549
+ error: string;
18550
+ };
18551
+ outputFormat: "json";
18552
+ status: 404 | 409;
18553
18553
  input: {
18554
18554
  param: {
18555
18555
  id: string;
@@ -20567,6 +20567,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20567
20567
  } & {
20568
20568
  "/repo/commit/:sha": {
20569
20569
  $get: {
20570
+ output: string;
20571
+ outputFormat: "text";
20572
+ status: import("hono/utils/http-status").ContentfulStatusCode;
20573
+ input: {
20574
+ query: {
20575
+ structured?: string | undefined;
20576
+ };
20577
+ } & {
20578
+ param: {
20579
+ sha: string;
20580
+ };
20581
+ };
20582
+ } | {
20570
20583
  output: {
20571
20584
  error: string;
20572
20585
  code?: "invalid_input" | undefined;
@@ -20630,19 +20643,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20630
20643
  sha: string;
20631
20644
  };
20632
20645
  };
20633
- } | {
20634
- output: string;
20635
- outputFormat: "text";
20636
- status: import("hono/utils/http-status").ContentfulStatusCode;
20637
- input: {
20638
- query: {
20639
- structured?: string | undefined;
20640
- };
20641
- } & {
20642
- param: {
20643
- sha: string;
20644
- };
20645
- };
20646
20646
  };
20647
20647
  };
20648
20648
  } & {
@@ -34444,20 +34444,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
34444
34444
  } & {
34445
34445
  "/runs/:id/handoff": {
34446
34446
  $get: {
34447
- output: {
34448
- error: string;
34449
- };
34450
- outputFormat: "json";
34451
- status: 404;
34447
+ output: string;
34448
+ outputFormat: "text";
34449
+ status: 200;
34452
34450
  input: {
34453
34451
  param: {
34454
34452
  id: string;
34455
34453
  };
34456
34454
  };
34457
34455
  } | {
34458
- output: string;
34459
- outputFormat: "text";
34460
- status: 200;
34456
+ output: {
34457
+ error: string;
34458
+ };
34459
+ outputFormat: "json";
34460
+ status: 404;
34461
34461
  input: {
34462
34462
  param: {
34463
34463
  id: string;
@@ -34495,20 +34495,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
34495
34495
  } & {
34496
34496
  "/runs/:id/diff": {
34497
34497
  $get: {
34498
- output: {
34499
- error: string;
34500
- };
34501
- outputFormat: "json";
34502
- status: 404 | 409;
34498
+ output: string;
34499
+ outputFormat: "text";
34500
+ status: import("hono/utils/http-status").ContentfulStatusCode;
34503
34501
  input: {
34504
34502
  param: {
34505
34503
  id: string;
34506
34504
  };
34507
34505
  };
34508
34506
  } | {
34509
- output: string;
34510
- outputFormat: "text";
34511
- status: import("hono/utils/http-status").ContentfulStatusCode;
34507
+ output: {
34508
+ error: string;
34509
+ };
34510
+ outputFormat: "json";
34511
+ status: 404 | 409;
34512
34512
  input: {
34513
34513
  param: {
34514
34514
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hearsay-tools/squawk",
3
- "version": "0.18.0-dev.7893",
3
+ "version": "0.18.0-dev.7899",
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",
@@ -63,8 +63,8 @@
63
63
  "devDependencies": {
64
64
  "@babel/parser": "^8.0.8",
65
65
  "@babel/types": "^8.0.8",
66
- "@open-mercato/cezar-api-client": "0.18.0-dev.7893",
67
- "@open-mercato/cezar-contract": "0.18.0-dev.7893",
66
+ "@open-mercato/cezar-api-client": "0.18.0-dev.7899",
67
+ "@open-mercato/cezar-contract": "0.18.0-dev.7899",
68
68
  "@types/node": "^24.19.1",
69
69
  "@types/ws": "^8.18.1",
70
70
  "esbuild": "^0.28.1",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "ca6d93b08e88db3ccf9b0522c35b161a2e5b7f0a"
84
+ "gitHead": "7aadd36845d281374f63f824738502e3c408f33c"
85
85
  }