@hearsay-tools/squawk 0.18.0-dev.7671 → 0.18.0-dev.7675

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 (141) hide show
  1. package/dist/ci-wait/controller.d.ts +42 -42
  2. package/dist/contract/agent-profiles.d.ts +4 -0
  3. package/dist/contract/discovery.d.ts +3 -0
  4. package/dist/contract/index.js +16 -1
  5. package/dist/contract/provider-requests.d.ts +6 -0
  6. package/dist/contract/query-requests.d.ts +1 -0
  7. package/dist/contract/runners.d.ts +2 -0
  8. package/dist/contract/workspace.d.ts +19 -0
  9. package/dist/core/agent-profiles.js +5 -1
  10. package/dist/core/agent-profiles.js.map +1 -1
  11. package/dist/core/host-model-catalog.js +2 -1
  12. package/dist/core/host-model-catalog.js.map +1 -1
  13. package/dist/core/provider-auth.d.ts +1 -0
  14. package/dist/core/provider-auth.js +5 -2
  15. package/dist/core/provider-auth.js.map +1 -1
  16. package/dist/core/runner-definition.d.ts +19 -2
  17. package/dist/core/runner-definition.js.map +1 -1
  18. package/dist/core/runner-model-catalog.d.ts +7 -2
  19. package/dist/core/runner-model-catalog.js +45 -19
  20. package/dist/core/runner-model-catalog.js.map +1 -1
  21. package/dist/delegation/routes.d.ts +66 -65
  22. package/dist/delegation/transport.d.ts +66 -65
  23. package/dist/discovery/choices.js +4 -2
  24. package/dist/discovery/choices.js.map +1 -1
  25. package/dist/runners/antigravity/account-home.d.ts +2 -0
  26. package/dist/runners/antigravity/account-home.js +31 -0
  27. package/dist/runners/antigravity/account-home.js.map +1 -0
  28. package/dist/runners/antigravity/accounts.d.ts +6 -1
  29. package/dist/runners/antigravity/accounts.js +2 -2
  30. package/dist/runners/antigravity/accounts.js.map +1 -1
  31. package/dist/runners/antigravity/antigravity-model-catalog.d.ts +7 -2
  32. package/dist/runners/antigravity/antigravity-model-catalog.js +63 -3
  33. package/dist/runners/antigravity/antigravity-model-catalog.js.map +1 -1
  34. package/dist/runners/antigravity/antigravity-skill-catalog.js +2 -0
  35. package/dist/runners/antigravity/antigravity-skill-catalog.js.map +1 -1
  36. package/dist/runners/antigravity/browser-sign-in.d.ts +4 -0
  37. package/dist/runners/antigravity/browser-sign-in.js +133 -0
  38. package/dist/runners/antigravity/browser-sign-in.js.map +1 -0
  39. package/dist/runners/antigravity/build-label.d.ts +2 -0
  40. package/dist/runners/antigravity/build-label.js +32 -0
  41. package/dist/runners/antigravity/build-label.js.map +1 -0
  42. package/dist/runners/antigravity/definition.js +2 -0
  43. package/dist/runners/antigravity/definition.js.map +1 -1
  44. package/dist/runners/antigravity/login-probe.d.ts +1 -0
  45. package/dist/runners/antigravity/login-probe.js +13 -6
  46. package/dist/runners/antigravity/login-probe.js.map +1 -1
  47. package/dist/runners/antigravity/models.js +1 -0
  48. package/dist/runners/antigravity/models.js.map +1 -1
  49. package/dist/runners/antigravity/probe-process.d.ts +16 -0
  50. package/dist/runners/antigravity/probe-process.js +58 -0
  51. package/dist/runners/antigravity/probe-process.js.map +1 -0
  52. package/dist/runners/antigravity/runtime-env.d.ts +1 -0
  53. package/dist/runners/antigravity/runtime-env.js +11 -3
  54. package/dist/runners/antigravity/runtime-env.js.map +1 -1
  55. package/dist/server/models-routes.d.ts +78 -0
  56. package/dist/server/models-routes.js +26 -0
  57. package/dist/server/models-routes.js.map +1 -0
  58. package/dist/server/provider-sign-in-routes.d.ts +231 -0
  59. package/dist/server/provider-sign-in-routes.js +59 -0
  60. package/dist/server/provider-sign-in-routes.js.map +1 -0
  61. package/dist/server/provider-sign-ins.d.ts +12 -0
  62. package/dist/server/provider-sign-ins.js +61 -0
  63. package/dist/server/provider-sign-ins.js.map +1 -0
  64. package/dist/server/runners-routes.d.ts +1 -0
  65. package/dist/server/runners-routes.js +2 -1
  66. package/dist/server/runners-routes.js.map +1 -1
  67. package/dist/server/server.d.ts +581 -330
  68. package/dist/server/server.js +5 -12
  69. package/dist/server/server.js.map +1 -1
  70. package/package.json +4 -4
  71. package/scripts/mock-acp.mjs +4 -0
  72. package/scripts/mock-antigravity-auth.mjs +50 -0
  73. package/web/dist/assets/activity-motion-D9kDOQdA.js +2 -0
  74. package/web/dist/assets/{activity-route-C09Kigqg.js → activity-route-CZsGE2kr.js} +1 -1
  75. package/web/dist/assets/attention-zJ-ho5os.js +1 -0
  76. package/web/dist/assets/{button-RJMdCnZw.js → button-C1fD-ZFr.js} +1 -1
  77. package/web/dist/assets/{centered-state-dmABwupF.js → centered-state-CiiA8Vgw.js} +1 -1
  78. package/web/dist/assets/commit-diff-panel-BuON_M0j.js +1 -0
  79. package/web/dist/assets/{dialog-7Mg2IZCP.js → dialog-DSwzMeY3.js} +1 -1
  80. package/web/dist/assets/{diff-BRJ4rY5b.js → diff-Db5bcfH_.js} +2 -2
  81. package/web/dist/assets/diff-controls-C8aqhty4.js +1 -0
  82. package/web/dist/assets/{diff-view-MBeWLbGp.js → diff-view-DqlLiU5V.js} +1 -1
  83. package/web/dist/assets/{dist-FHKv_Ysh.js → dist-Du8mGhoH.js} +1 -1
  84. package/web/dist/assets/{dropdown-menu-Cr9RsmWG.js → dropdown-menu-DRFDwG2X.js} +1 -1
  85. package/web/dist/assets/{es2015-VrVcR1vD.js → es2015-Ch36azR0.js} +1 -1
  86. package/web/dist/assets/{file-preview-DGUs6xBL.js → file-preview-DSnLzP2A.js} +1 -1
  87. package/web/dist/assets/{git-toolbar-DZAI5UIs.js → git-toolbar-WHsIb3zj.js} +1 -1
  88. package/web/dist/assets/github-BZSy7bl0.js +1 -0
  89. package/web/dist/assets/{global-activity-route-Itwjh59Y.js → global-activity-route-BPvST6Do.js} +1 -1
  90. package/web/dist/assets/{image-preview-BmcpjY75.js → image-preview-2AnVvt0e.js} +1 -1
  91. package/web/dist/assets/{index-D6Jjh8b7.css → index-CSsMeh0Q.css} +1 -1
  92. package/web/dist/assets/index-DmUnZuj2.js +14 -0
  93. package/web/dist/assets/{markdown-CJcWCBe3.js → markdown-EqokmdNx.js} +1 -1
  94. package/web/dist/assets/{nav-row-styles-D4xk5Osn.js → nav-row-styles-CFjnD-9J.js} +1 -1
  95. package/web/dist/assets/picker-pill-DP8YY8yK.js +15 -0
  96. package/web/dist/assets/{preview-pane-connected-BRgt99wC.js → preview-pane-connected-DePVzNAm.js} +3 -3
  97. package/web/dist/assets/{project-router-DjS-QbSn.js → project-router-LT30LjzY.js} +1 -1
  98. package/web/dist/assets/project-scope-context-DMCS5p-N.js +4 -0
  99. package/web/dist/assets/{prompt-template-menu-Dc5UGoNy.js → prompt-template-menu-DhXONhoB.js} +1 -1
  100. package/web/dist/assets/queries-DHY6U3e_.js +1 -0
  101. package/web/dist/assets/reference-chip-BKeVxG_E.js +1 -0
  102. package/web/dist/assets/{repo-git-p0Ao3sNl.js → repo-git-CWn2Z4Un.js} +1 -1
  103. package/web/dist/assets/{report-reader-D4lQqrHu.js → report-reader-RkXaRhiv.js} +1 -1
  104. package/web/dist/assets/reports-CiU1cLpn.js +1 -0
  105. package/web/dist/assets/run-header-z48y-i75.js +2 -0
  106. package/web/dist/assets/runners-C-sPUQye.js +1 -0
  107. package/web/dist/assets/{skills-BDdDqO_5.js → skills-BeZ9naR_.js} +1 -1
  108. package/web/dist/assets/{tab-link-BBENZNt4.js → tab-link-C_0J92TF.js} +1 -1
  109. package/web/dist/assets/{task-changes-ZHEaIUYD.js → task-changes-R9UrXbyp.js} +1 -1
  110. package/web/dist/assets/task-commits-BgwKBJPa.js +1 -0
  111. package/web/dist/assets/{task-files-BNU0-6wZ.js → task-files-BuoYB5UQ.js} +1 -1
  112. package/web/dist/assets/{task-github-item-rhXaU_WN.js → task-github-item-DQ_suCNz.js} +1 -1
  113. package/web/dist/assets/task-thread-B7GO7yjQ.js +9 -0
  114. package/web/dist/assets/thread-state-DSb5VKd8.js +4 -0
  115. package/web/dist/assets/{toaster-BWMQArHJ.js → toaster-Cxgzn9ip.js} +1 -1
  116. package/web/dist/assets/{use-desktop-B7mmljQs.js → use-desktop-EnHXg46f.js} +1 -1
  117. package/web/dist/assets/use-hand-to-agent-state-C6FNQ2e0.js +1 -0
  118. package/web/dist/assets/{useInfiniteQuery-rVJeQWbw.js → useInfiniteQuery-CvdGA_PU.js} +1 -1
  119. package/web/dist/assets/useQuery-BJFZunTR.js +1 -0
  120. package/web/dist/assets/{workflows-Chj-NzXv.js → workflows-b6WsU1qg.js} +3 -3
  121. package/web/dist/assets/{ws-DfZahD6A.js → ws-BxsIvFCG.js} +1 -1
  122. package/web/dist/assets/{zoomable-image-DefjK4q5.js → zoomable-image-DrDnCL4V.js} +1 -1
  123. package/web/dist/index.html +22 -22
  124. package/web/dist/assets/activity-motion-1juRKhxE.js +0 -2
  125. package/web/dist/assets/attention-D8FpUd-j.js +0 -1
  126. package/web/dist/assets/commit-diff-panel-D3LsPb4F.js +0 -1
  127. package/web/dist/assets/diff-controls-BpQyN23g.js +0 -1
  128. package/web/dist/assets/github-CqzXvarK.js +0 -1
  129. package/web/dist/assets/index-DpdNh-zz.js +0 -14
  130. package/web/dist/assets/picker-pill-Cepev3cP.js +0 -15
  131. package/web/dist/assets/project-scope-context-DiW4iTxy.js +0 -4
  132. package/web/dist/assets/queries-CQwllVYy.js +0 -1
  133. package/web/dist/assets/reference-chip-8cCk87Nn.js +0 -1
  134. package/web/dist/assets/reports-DGIyky_8.js +0 -1
  135. package/web/dist/assets/run-header-CvQbLIsr.js +0 -2
  136. package/web/dist/assets/runners-sgn4gxWr.js +0 -1
  137. package/web/dist/assets/task-commits-BaPEsRht.js +0 -1
  138. package/web/dist/assets/task-thread-p6CxXiaW.js +0 -9
  139. package/web/dist/assets/thread-state-D6nbjkBx.js +0 -4
  140. package/web/dist/assets/use-hand-to-agent-state-kSX9JjM_.js +0 -1
  141. package/web/dist/assets/useQuery-BwAOxkhy.js +0 -1
@@ -5,6 +5,9 @@ export interface ModelOption {
5
5
  description: string;
6
6
  effortLevels?: EffortLevel[];
7
7
  }
8
+ export interface ModelDiscoveryContext {
9
+ accountHome?: string | undefined;
10
+ }
8
11
  export type ModelCatalogSource = 'live' | 'cache' | 'unavailable';
9
12
  export interface RunnerModelCatalogResult {
10
13
  /** The runner id as the wire sends it: a string. */
@@ -15,7 +18,9 @@ export interface RunnerModelCatalogResult {
15
18
  reason?: string;
16
19
  }
17
20
  export interface RunnerModelCatalogAdapter {
18
- discover(): Promise<ModelOption[]>;
21
+ discover(options?: ModelDiscoveryContext): Promise<ModelOption[]>;
22
+ /** Native auth/build identity, checked before consulting the TTL. */
23
+ cacheKey?(options: ModelDiscoveryContext): Promise<string>;
19
24
  }
20
25
  export interface RunnerModelCatalogOptions {
21
26
  adapters: Partial<Record<string, RunnerModelCatalogAdapter>>;
@@ -27,5 +32,5 @@ export declare class RunnerModelCatalog {
27
32
  #private;
28
33
  constructor(options: RunnerModelCatalogOptions);
29
34
  invalidate(runner: string): void;
30
- get(runner: string): Promise<RunnerModelCatalogResult>;
35
+ get(runner: string, options?: ModelDiscoveryContext): Promise<RunnerModelCatalogResult>;
31
36
  }
@@ -8,20 +8,46 @@ export class RunnerModelCatalog {
8
8
  #cache = new Map();
9
9
  #inFlight = new Map();
10
10
  #generation = new Map();
11
+ #identities = new Map();
12
+ #runnerGeneration = new Map();
11
13
  constructor(options) {
12
14
  this.#adapters = options.adapters;
13
15
  this.#now = options.now ?? Date.now;
14
16
  this.#ttlMs = options.ttlMs ?? DEFAULT_TTL_MS;
15
17
  }
16
18
  invalidate(runner) {
17
- const cached = this.#cache.get(runner);
18
- if (cached)
19
- cached.expiresAt = 0;
20
- this.#inFlight.delete(runner);
21
- this.#generation.set(runner, (this.#generation.get(runner) ?? 0) + 1);
19
+ this.#runnerGeneration.set(runner, (this.#runnerGeneration.get(runner) ?? 0) + 1);
20
+ for (const key of new Set([...this.#cache.keys(), ...this.#inFlight.keys()])) {
21
+ if (key !== runner && !key.startsWith(`${runner}\u0000`))
22
+ continue;
23
+ const cached = this.#cache.get(key);
24
+ if (cached)
25
+ cached.expiresAt = 0;
26
+ this.#inFlight.delete(key);
27
+ this.#generation.set(key, (this.#generation.get(key) ?? 0) + 1);
28
+ }
29
+ }
30
+ get(runner, options = {}) {
31
+ const adapter = this.#adapters[runner];
32
+ const key = options.accountHome ? `${runner}\u0000${options.accountHome}` : runner;
33
+ if (!adapter?.cacheKey)
34
+ return this.#get(runner, key, options);
35
+ const generation = this.#runnerGeneration.get(runner) ?? 0;
36
+ return adapter.cacheKey(options).then(value => {
37
+ // An auth refresh during the asynchronous identity probe invalidates its answer too.
38
+ if ((this.#runnerGeneration.get(runner) ?? 0) !== generation)
39
+ return this.get(runner, options);
40
+ if (this.#identities.get(key) !== value) {
41
+ this.#identities.set(key, value);
42
+ this.#cache.delete(key);
43
+ this.#inFlight.delete(key);
44
+ this.#generation.set(key, (this.#generation.get(key) ?? 0) + 1);
45
+ }
46
+ return this.#get(runner, key, options);
47
+ }, () => ({ runner, models: [], source: 'unavailable', stale: false, reason: unavailableReason(runner) }));
22
48
  }
23
- get(runner) {
24
- const cached = this.#cache.get(runner);
49
+ #get(runner, key, options) {
50
+ const cached = this.#cache.get(key);
25
51
  if (cached && this.#now() < cached.expiresAt) {
26
52
  if (cached.failureReason) {
27
53
  return Promise.resolve({
@@ -34,39 +60,39 @@ export class RunnerModelCatalog {
34
60
  }
35
61
  return Promise.resolve({ runner, models: cached.models, source: 'cache', stale: false });
36
62
  }
37
- const pending = this.#inFlight.get(runner);
63
+ const pending = this.#inFlight.get(key);
38
64
  if (pending)
39
65
  return pending;
40
- const generation = this.#generation.get(runner) ?? 0;
41
- const refresh = this.#refresh(runner, cached, generation).finally(() => {
42
- if ((this.#generation.get(runner) ?? 0) === generation)
43
- this.#inFlight.delete(runner);
66
+ const generation = this.#generation.get(key) ?? 0;
67
+ const refresh = this.#refresh(runner, key, options, cached, generation).finally(() => {
68
+ if ((this.#generation.get(key) ?? 0) === generation)
69
+ this.#inFlight.delete(key);
44
70
  });
45
- this.#inFlight.set(runner, refresh);
71
+ this.#inFlight.set(key, refresh);
46
72
  return refresh;
47
73
  }
48
- async #refresh(runner, cached, generation) {
49
- const current = () => (this.#generation.get(runner) ?? 0) === generation;
74
+ async #refresh(runner, key, options, cached, generation) {
75
+ const current = () => (this.#generation.get(key) ?? 0) === generation;
50
76
  try {
51
77
  const adapter = this.#adapters[runner];
52
78
  if (!adapter)
53
79
  throw new Error('adapter unavailable');
54
- const models = await adapter.discover();
80
+ const models = await (options.accountHome ? adapter.discover(options) : adapter.discover());
55
81
  const value = { models: [...models], expiresAt: this.#now() + this.#ttlMs };
56
82
  if (current())
57
- this.#cache.set(runner, value);
83
+ this.#cache.set(key, value);
58
84
  return { runner, models: value.models, source: 'live', stale: false };
59
85
  }
60
86
  catch {
61
87
  const reason = unavailableReason(runner);
62
88
  if (cached) {
63
89
  if (current()) {
64
- this.#cache.set(runner, { models: cached.models, expiresAt: this.#now() + this.#ttlMs, failureReason: reason });
90
+ this.#cache.set(key, { models: cached.models, expiresAt: this.#now() + this.#ttlMs, failureReason: reason });
65
91
  }
66
92
  return { runner, models: cached.models, source: 'cache', stale: true, reason };
67
93
  }
68
94
  if (current()) {
69
- this.#cache.set(runner, { models: [], expiresAt: this.#now() + this.#ttlMs, failureReason: reason });
95
+ this.#cache.set(key, { models: [], expiresAt: this.#now() + this.#ttlMs, failureReason: reason });
70
96
  }
71
97
  return { runner, models: [], source: 'unavailable', stale: false, reason };
72
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runner-model-catalog.js","sourceRoot":"","sources":["../../src/core/runner-model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAoCxD,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;AAEtC,6EAA6E;AAC7E,MAAM,OAAO,kBAAkB;IACpB,SAAS,CAAqD;IAC9D,IAAI,CAAe;IACnB,MAAM,CAAS;IACf,MAAM,GAAG,IAAI,GAAG,EAAyB,CAAC;IAC1C,SAAS,GAAG,IAAI,GAAG,EAA6C,CAAC;IACjE,WAAW,GAAG,IAAI,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M,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAC7E,CAAC;IACH,CAAC;CACF;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,aAAa,6CAA6C,CAAC;AACxG,CAAC"}
@@ -27,18 +27,6 @@ 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
- } | {
42
30
  output: {
43
31
  workers: {
44
32
  workerId: string;
@@ -85,6 +73,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
85
73
  offset?: string | undefined;
86
74
  };
87
75
  };
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
  } & {
@@ -93,6 +93,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
93
93
  output: {
94
94
  scope: "host-default-account";
95
95
  runners: {
96
+ requiresAccountHome?: boolean | undefined;
96
97
  status: "connected" | "disconnected" | "not-installed" | "unknown";
97
98
  enabled?: boolean | undefined;
98
99
  hint?: string | undefined;
@@ -628,18 +629,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
628
629
  } & {
629
630
  "/:workerId": {
630
631
  $get: {
631
- output: {
632
- error: string;
633
- code?: "invalid_input" | undefined;
634
- };
635
- outputFormat: "json";
636
- status: 400;
637
- input: {
638
- param: {
639
- workerId: string;
640
- };
641
- };
642
- } | {
643
632
  output: {
644
633
  workerId: string;
645
634
  settled: boolean;
@@ -757,11 +746,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
757
746
  workerId: string;
758
747
  };
759
748
  };
760
- };
761
- };
762
- } & {
763
- "/:workerId/collect": {
764
- $post: {
749
+ } | {
765
750
  output: {
766
751
  error: string;
767
752
  code?: "invalid_input" | undefined;
@@ -772,10 +757,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
772
757
  param: {
773
758
  workerId: string;
774
759
  };
775
- } & {
776
- json: Record<string, never>;
777
760
  };
778
- } | {
761
+ };
762
+ };
763
+ } & {
764
+ "/:workerId/collect": {
765
+ $post: {
779
766
  output: {
780
767
  workerId: string;
781
768
  parentRunId: string;
@@ -898,11 +885,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
898
885
  } & {
899
886
  json: Record<string, never>;
900
887
  };
901
- };
902
- };
903
- } & {
904
- "/:workerId/steer": {
905
- $post: {
888
+ } | {
906
889
  output: {
907
890
  error: string;
908
891
  code?: "invalid_input" | undefined;
@@ -914,11 +897,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
914
897
  workerId: string;
915
898
  };
916
899
  } & {
917
- json: {
918
- text: string;
919
- };
900
+ json: Record<string, never>;
920
901
  };
921
- } | {
902
+ };
903
+ };
904
+ } & {
905
+ "/:workerId/steer": {
906
+ $post: {
922
907
  output: {
923
908
  workerId: string;
924
909
  state: "delivered" | "queued";
@@ -934,11 +919,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
934
919
  text: string;
935
920
  };
936
921
  };
937
- };
938
- };
939
- } & {
940
- "/:workerId/stop": {
941
- $post: {
922
+ } | {
942
923
  output: {
943
924
  error: string;
944
925
  code?: "invalid_input" | undefined;
@@ -950,9 +931,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
950
931
  workerId: string;
951
932
  };
952
933
  } & {
953
- json: Record<string, never>;
934
+ json: {
935
+ text: string;
936
+ };
954
937
  };
955
- } | {
938
+ };
939
+ };
940
+ } & {
941
+ "/:workerId/stop": {
942
+ $post: {
956
943
  output: {
957
944
  workerId: string;
958
945
  state: "stopping" | "terminated";
@@ -966,11 +953,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
966
953
  } & {
967
954
  json: Record<string, never>;
968
955
  };
969
- };
970
- };
971
- } & {
972
- "/:workerId/destroy": {
973
- $post: {
956
+ } | {
974
957
  output: {
975
958
  error: string;
976
959
  code?: "invalid_input" | undefined;
@@ -982,11 +965,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
982
965
  workerId: string;
983
966
  };
984
967
  } & {
985
- json: {
986
- discardWork?: true | undefined;
987
- };
968
+ json: Record<string, never>;
988
969
  };
989
- } | {
970
+ };
971
+ };
972
+ } & {
973
+ "/:workerId/destroy": {
974
+ $post: {
990
975
  output: {
991
976
  workerId: string;
992
977
  state: "complete" | "incomplete";
@@ -1015,6 +1000,22 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1015
1000
  discardWork?: true | undefined;
1016
1001
  };
1017
1002
  };
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
+ };
1018
1019
  } | {
1019
1020
  output: {
1020
1021
  workerId: string;
@@ -1050,11 +1051,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1050
1051
  "/:workerId/diff": {
1051
1052
  $get: {
1052
1053
  output: {
1053
- error: string;
1054
- code?: "invalid_input" | undefined;
1054
+ workerId: string;
1055
+ baselineSha: string;
1056
+ diff: string;
1057
+ truncated: boolean;
1055
1058
  };
1056
1059
  outputFormat: "json";
1057
- status: 400;
1060
+ status: 200;
1058
1061
  input: {
1059
1062
  param: {
1060
1063
  workerId: string;
@@ -1062,13 +1065,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1062
1065
  };
1063
1066
  } | {
1064
1067
  output: {
1065
- workerId: string;
1066
- baselineSha: string;
1067
- diff: string;
1068
- truncated: boolean;
1068
+ error: string;
1069
+ code?: "invalid_input" | undefined;
1069
1070
  };
1070
1071
  outputFormat: "json";
1071
- status: 200;
1072
+ status: 400;
1072
1073
  input: {
1073
1074
  param: {
1074
1075
  workerId: string;
@@ -2,18 +2,6 @@ import type { DelegationRoutes } from './routes.ts';
2
2
  export declare function createDelegationApp(routes: DelegationRoutes): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
3
3
  "/list": {
4
4
  $get: {
5
- output: {
6
- error: string;
7
- code?: "invalid_input" | undefined;
8
- };
9
- outputFormat: "json";
10
- status: 400;
11
- input: {
12
- query: {
13
- offset?: string | undefined;
14
- };
15
- };
16
- } | {
17
5
  output: {
18
6
  workers: {
19
7
  workerId: string;
@@ -60,6 +48,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
60
48
  offset?: string | undefined;
61
49
  };
62
50
  };
51
+ } | {
52
+ output: {
53
+ error: string;
54
+ code?: "invalid_input" | undefined;
55
+ };
56
+ outputFormat: "json";
57
+ status: 400;
58
+ input: {
59
+ query: {
60
+ offset?: string | undefined;
61
+ };
62
+ };
63
63
  };
64
64
  };
65
65
  } & {
@@ -68,6 +68,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
68
68
  output: {
69
69
  scope: "host-default-account";
70
70
  runners: {
71
+ requiresAccountHome?: boolean | undefined;
71
72
  status: "connected" | "disconnected" | "not-installed" | "unknown";
72
73
  enabled?: boolean | undefined;
73
74
  hint?: string | undefined;
@@ -603,18 +604,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
603
604
  } & {
604
605
  "/:workerId": {
605
606
  $get: {
606
- output: {
607
- error: string;
608
- code?: "invalid_input" | undefined;
609
- };
610
- outputFormat: "json";
611
- status: 400;
612
- input: {
613
- param: {
614
- workerId: string;
615
- };
616
- };
617
- } | {
618
607
  output: {
619
608
  workerId: string;
620
609
  settled: boolean;
@@ -732,11 +721,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
732
721
  workerId: string;
733
722
  };
734
723
  };
735
- };
736
- };
737
- } & {
738
- "/:workerId/collect": {
739
- $post: {
724
+ } | {
740
725
  output: {
741
726
  error: string;
742
727
  code?: "invalid_input" | undefined;
@@ -747,10 +732,12 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
747
732
  param: {
748
733
  workerId: string;
749
734
  };
750
- } & {
751
- json: Record<string, never>;
752
735
  };
753
- } | {
736
+ };
737
+ };
738
+ } & {
739
+ "/:workerId/collect": {
740
+ $post: {
754
741
  output: {
755
742
  workerId: string;
756
743
  parentRunId: string;
@@ -873,11 +860,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
873
860
  } & {
874
861
  json: Record<string, never>;
875
862
  };
876
- };
877
- };
878
- } & {
879
- "/:workerId/steer": {
880
- $post: {
863
+ } | {
881
864
  output: {
882
865
  error: string;
883
866
  code?: "invalid_input" | undefined;
@@ -889,11 +872,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
889
872
  workerId: string;
890
873
  };
891
874
  } & {
892
- json: {
893
- text: string;
894
- };
875
+ json: Record<string, never>;
895
876
  };
896
- } | {
877
+ };
878
+ };
879
+ } & {
880
+ "/:workerId/steer": {
881
+ $post: {
897
882
  output: {
898
883
  workerId: string;
899
884
  state: "delivered" | "queued";
@@ -909,11 +894,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
909
894
  text: string;
910
895
  };
911
896
  };
912
- };
913
- };
914
- } & {
915
- "/:workerId/stop": {
916
- $post: {
897
+ } | {
917
898
  output: {
918
899
  error: string;
919
900
  code?: "invalid_input" | undefined;
@@ -925,9 +906,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
925
906
  workerId: string;
926
907
  };
927
908
  } & {
928
- json: Record<string, never>;
909
+ json: {
910
+ text: string;
911
+ };
929
912
  };
930
- } | {
913
+ };
914
+ };
915
+ } & {
916
+ "/:workerId/stop": {
917
+ $post: {
931
918
  output: {
932
919
  workerId: string;
933
920
  state: "stopping" | "terminated";
@@ -941,11 +928,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
941
928
  } & {
942
929
  json: Record<string, never>;
943
930
  };
944
- };
945
- };
946
- } & {
947
- "/:workerId/destroy": {
948
- $post: {
931
+ } | {
949
932
  output: {
950
933
  error: string;
951
934
  code?: "invalid_input" | undefined;
@@ -957,11 +940,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
957
940
  workerId: string;
958
941
  };
959
942
  } & {
960
- json: {
961
- discardWork?: true | undefined;
962
- };
943
+ json: Record<string, never>;
963
944
  };
964
- } | {
945
+ };
946
+ };
947
+ } & {
948
+ "/:workerId/destroy": {
949
+ $post: {
965
950
  output: {
966
951
  workerId: string;
967
952
  state: "complete" | "incomplete";
@@ -990,6 +975,22 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
990
975
  discardWork?: true | undefined;
991
976
  };
992
977
  };
978
+ } | {
979
+ output: {
980
+ error: string;
981
+ code?: "invalid_input" | undefined;
982
+ };
983
+ outputFormat: "json";
984
+ status: 400;
985
+ input: {
986
+ param: {
987
+ workerId: string;
988
+ };
989
+ } & {
990
+ json: {
991
+ discardWork?: true | undefined;
992
+ };
993
+ };
993
994
  } | {
994
995
  output: {
995
996
  workerId: string;
@@ -1025,11 +1026,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1025
1026
  "/:workerId/diff": {
1026
1027
  $get: {
1027
1028
  output: {
1028
- error: string;
1029
- code?: "invalid_input" | undefined;
1029
+ workerId: string;
1030
+ baselineSha: string;
1031
+ diff: string;
1032
+ truncated: boolean;
1030
1033
  };
1031
1034
  outputFormat: "json";
1032
- status: 400;
1035
+ status: 200;
1033
1036
  input: {
1034
1037
  param: {
1035
1038
  workerId: string;
@@ -1037,13 +1040,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1037
1040
  };
1038
1041
  } | {
1039
1042
  output: {
1040
- workerId: string;
1041
- baselineSha: string;
1042
- diff: string;
1043
- truncated: boolean;
1043
+ error: string;
1044
+ code?: "invalid_input" | undefined;
1044
1045
  };
1045
1046
  outputFormat: "json";
1046
- status: 200;
1047
+ status: 400;
1047
1048
  input: {
1048
1049
  param: {
1049
1050
  workerId: string;
@@ -1,16 +1,18 @@
1
- import { registeredRunners } from '../core/runner-registry.js';
1
+ import { registeredRunners, runnerDefinition } from '../core/runner-registry.js';
2
2
  export function discoveredRunners(status) {
3
3
  return { scope: 'host-default-account', runners: status.providers.map(({ provider, profileId: _profileId, ...row }) => ({ runner: provider, ...row })) };
4
4
  }
5
5
  /** A fresh nonempty host catalog can disprove an explicit selection; unavailable data cannot. */
6
6
  export async function missingModelChoices(source, runner, model, effectiveModel, modelIdentity) {
7
+ if (runnerDefinition(runner).models.catalogAtAdmission === false)
8
+ return;
7
9
  // Reuse account-aware normalization from execution selection, including custom providers.
8
10
  // Compare complete IDs only: never strip another runner's provider prefix speculatively.
9
11
  const ids = new Set([model, effectiveModel, modelIdentity].filter((id) => id !== undefined));
10
12
  const catalog = await source.models.get(runner);
11
13
  if (catalog.source === 'unavailable' || catalog.stale || !catalog.models.length || catalog.models.some(row => ids.has(row.id)))
12
14
  return;
13
- const alternatives = await Promise.all(registeredRunners().map(({ id }) => id).filter(id => id !== runner).map(async (id) => {
15
+ const alternatives = await Promise.all(registeredRunners().filter(definition => definition.models.catalogAtAdmission !== false).map(({ id }) => id).filter(id => id !== runner).map(async (id) => {
14
16
  const other = await source.models.get(id);
15
17
  return other.source !== 'unavailable' && !other.stale && other.models.some(row => ids.has(row.id)) ? id : undefined;
16
18
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"choices.js","sourceRoot":"","sources":["../../src/discovery/choices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAS/D,MAAM,UAAU,iB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AK,EAAE,eAAe,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,EAAgB,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC,EAAE,CAAC;AACvJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Native instructions and skills are shared; settings, conversations and OAuth secrets are not. */
2
+ export declare function prepareAntigravityAccount(accountHome: string | undefined, sourceHome?: string): void;