@hearsay-tools/squawk 0.18.0-dev.7489 → 0.18.0-dev.7491

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 (106) hide show
  1. package/dist/ci-wait/tools.d.ts +4 -4
  2. package/dist/config.d.ts +3 -7
  3. package/dist/config.js +9 -9
  4. package/dist/config.js.map +1 -1
  5. package/dist/core/agent-env.d.ts +4 -0
  6. package/dist/core/agent-env.js +7 -25
  7. package/dist/core/agent-env.js.map +1 -1
  8. package/dist/core/agent-profiles.d.ts +14 -28
  9. package/dist/core/agent-profiles.js +27 -30
  10. package/dist/core/agent-profiles.js.map +1 -1
  11. package/dist/core/provider-auth.js +27 -182
  12. package/dist/core/provider-auth.js.map +1 -1
  13. package/dist/core/runner-definition.d.ts +72 -0
  14. package/dist/core/runner-definition.js.map +1 -1
  15. package/dist/delegation/execution-identity.js +6 -6
  16. package/dist/delegation/execution-identity.js.map +1 -1
  17. package/dist/paths.d.ts +5 -3
  18. package/dist/paths.js +9 -6
  19. package/dist/paths.js.map +1 -1
  20. package/dist/runners/claude/accounts.d.ts +11 -0
  21. package/dist/runners/claude/accounts.js +10 -0
  22. package/dist/runners/claude/accounts.js.map +1 -0
  23. package/dist/runners/claude/definition.js +8 -0
  24. package/dist/runners/claude/definition.js.map +1 -1
  25. package/dist/runners/claude/env.d.ts +4 -0
  26. package/dist/runners/claude/env.js +3 -0
  27. package/dist/runners/claude/env.js.map +1 -0
  28. package/dist/runners/claude/login-probe.d.ts +4 -0
  29. package/dist/runners/claude/login-probe.js +16 -0
  30. package/dist/runners/claude/login-probe.js.map +1 -0
  31. package/dist/runners/claude/login.d.ts +7 -0
  32. package/dist/runners/claude/login.js +8 -0
  33. package/dist/runners/claude/login.js.map +1 -0
  34. package/dist/runners/codex/accounts.d.ts +11 -0
  35. package/dist/runners/codex/accounts.js +8 -0
  36. package/dist/runners/codex/accounts.js.map +1 -0
  37. package/dist/runners/codex/definition.js +8 -0
  38. package/dist/runners/codex/definition.js.map +1 -1
  39. package/dist/runners/codex/env.d.ts +4 -0
  40. package/dist/runners/codex/env.js +3 -0
  41. package/dist/runners/codex/env.js.map +1 -0
  42. package/dist/runners/codex/login-probe.d.ts +4 -0
  43. package/dist/runners/codex/login-probe.js +30 -0
  44. package/dist/runners/codex/login-probe.js.map +1 -0
  45. package/dist/runners/codex/login.d.ts +7 -0
  46. package/dist/runners/codex/login.js +8 -0
  47. package/dist/runners/codex/login.js.map +1 -0
  48. package/dist/runners/login-output.d.ts +5 -0
  49. package/dist/runners/login-output.js +14 -0
  50. package/dist/runners/login-output.js.map +1 -0
  51. package/dist/runners/omp/accounts.d.ts +11 -0
  52. package/dist/runners/omp/accounts.js +11 -0
  53. package/dist/runners/omp/accounts.js.map +1 -0
  54. package/dist/runners/omp/definition.js +8 -0
  55. package/dist/runners/omp/definition.js.map +1 -1
  56. package/dist/runners/omp/env.d.ts +4 -0
  57. package/dist/runners/omp/env.js +17 -0
  58. package/dist/runners/omp/env.js.map +1 -0
  59. package/dist/runners/omp/login-probe.d.ts +13 -0
  60. package/dist/runners/omp/login-probe.js +25 -0
  61. package/dist/runners/omp/login-probe.js.map +1 -0
  62. package/dist/runners/omp/login.d.ts +8 -0
  63. package/dist/runners/omp/login.js +12 -0
  64. package/dist/runners/omp/login.js.map +1 -0
  65. package/dist/runners/opencode/accounts.d.ts +11 -0
  66. package/dist/runners/opencode/accounts.js +10 -0
  67. package/dist/runners/opencode/accounts.js.map +1 -0
  68. package/dist/runners/opencode/definition.js +8 -0
  69. package/dist/runners/opencode/definition.js.map +1 -1
  70. package/dist/runners/opencode/env.d.ts +4 -0
  71. package/dist/runners/opencode/env.js +4 -0
  72. package/dist/runners/opencode/env.js.map +1 -0
  73. package/dist/runners/opencode/login-probe.d.ts +4 -0
  74. package/dist/runners/opencode/login-probe.js +31 -0
  75. package/dist/runners/opencode/login-probe.js.map +1 -0
  76. package/dist/runners/opencode/login.d.ts +7 -0
  77. package/dist/runners/opencode/login.js +8 -0
  78. package/dist/runners/opencode/login.js.map +1 -0
  79. package/dist/runners/pi/accounts.d.ts +11 -0
  80. package/dist/runners/pi/accounts.js +8 -0
  81. package/dist/runners/pi/accounts.js.map +1 -0
  82. package/dist/runners/pi/definition.js +8 -0
  83. package/dist/runners/pi/definition.js.map +1 -1
  84. package/dist/runners/pi/env.d.ts +4 -0
  85. package/dist/runners/pi/env.js +15 -0
  86. package/dist/runners/pi/env.js.map +1 -0
  87. package/dist/runners/pi/login-probe.d.ts +4 -0
  88. package/dist/runners/pi/login-probe.js +17 -0
  89. package/dist/runners/pi/login-probe.js.map +1 -0
  90. package/dist/runners/pi/login.d.ts +7 -0
  91. package/dist/runners/pi/login.js +8 -0
  92. package/dist/runners/pi/login.js.map +1 -0
  93. package/dist/server/reports-api.d.ts +2 -2
  94. package/dist/server/server.d.ts +64 -74
  95. package/dist/server/server.js +2 -2
  96. package/dist/server/server.js.map +1 -1
  97. package/dist/workspace/agent-accounts.d.ts +6 -17
  98. package/dist/workspace/agent-accounts.js +10 -14
  99. package/dist/workspace/agent-accounts.js.map +1 -1
  100. package/dist/workspace/agent-profiles.js +2 -2
  101. package/dist/workspace/agent-profiles.js.map +1 -1
  102. package/dist/workspace/config.d.ts +8 -7
  103. package/dist/workspace/config.js +18 -9
  104. package/dist/workspace/config.js.map +1 -1
  105. package/package.json +4 -4
  106. package/scripts/measure-transcript-facts-health.mjs +3 -0
@@ -0,0 +1,31 @@
1
+ import { normalizedLines } from '../login-output.js';
2
+ /** OpenCode's auth-status parser, moved verbatim from `core/provider-auth.ts`. Loads only through
3
+ * the definition's `loadLogin()`. */
4
+ export function parseOpenCodeStatus(result) {
5
+ if (result.exitCode !== 0)
6
+ return null;
7
+ const lines = normalizedLines(result.stdout);
8
+ const storedSummaries = lines
9
+ .map((line) => line.match(/^[^a-z0-9]*(\d+)\s+credentials?$/)?.[1])
10
+ .filter((count) => count !== undefined);
11
+ if (storedSummaries.length !== 1)
12
+ return null;
13
+ const storedCount = Number(storedSummaries[0]);
14
+ if (!Number.isSafeInteger(storedCount))
15
+ return null;
16
+ const environmentSummaries = lines
17
+ .map((line) => line.match(/^[^a-z0-9]*(\d+)\s+environment\s+variables?$/)?.[1])
18
+ .filter((count) => count !== undefined);
19
+ const hasEnvironmentBlock = lines.some((line) => /^[^a-z0-9]*environment$/.test(line));
20
+ if (environmentSummaries.length > 1)
21
+ return null;
22
+ if (hasEnvironmentBlock !== (environmentSummaries.length === 1))
23
+ return null;
24
+ const environmentCount = environmentSummaries.length === 1
25
+ ? Number(environmentSummaries[0])
26
+ : 0;
27
+ if (!Number.isSafeInteger(environmentCount))
28
+ return null;
29
+ return storedCount > 0 || environmentCount > 0 ? 'connected' : 'disconnected';
30
+ }
31
+ //# sourceMappingURL=login-probe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-probe.js","sourceRoot":"","sources":["../../../src/runners/opencode/login-probe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;sCACsC;AACtC,MAAM,UAAU,mBAAmB,CAAC,MAA6B;IAC/D,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,eAAe,GAAG,KAAK;SAC1B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,kCAAkC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAClE,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;IAC3D,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9C,MAAM,WAAW,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC;QAAE,OAAO,IAAI,CAAC;IAEpD,MAAM,oBAAoB,GAAG,KAAK;SAC/B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,8CAA8C,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC9E,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;IAC3D,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACvF,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACjD,IAAI,mBAAmB,KAAK,CAAC,oBAAoB,CAAC,MAAM,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7E,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,MAAM,KAAK,CAAC;QACxD,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC;IACN,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC;QAAE,OAAO,IAAI,CAAC;IAEzD,OAAO,WAAW,GAAG,CAAC,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC;AAChF,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** OpenCode's login and auth-status data (the `login` part). Data only: the definition and
2
+ * `ProviderAuthService` read this value, so importing it loads no code. */
3
+ export declare const OPENCODE_LOGIN: {
4
+ readonly statusArgs: readonly ["auth", "list"];
5
+ readonly loginArgs: readonly ["auth", "login"];
6
+ readonly installHint: 'Install OpenCode, then run `opencode auth login`.';
7
+ };
@@ -0,0 +1,8 @@
1
+ /** OpenCode's login and auth-status data (the `login` part). Data only: the definition and
2
+ * `ProviderAuthService` read this value, so importing it loads no code. */
3
+ export const OPENCODE_LOGIN = {
4
+ statusArgs: ['auth', 'list'],
5
+ loginArgs: ['auth', 'login'],
6
+ installHint: 'Install OpenCode, then run `opencode auth login`.',
7
+ };
8
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/runners/opencode/login.ts"],"names":[],"mappings":"AAEA;4EAC4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,mDAAmD;CAC9B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** Pi's account data (the `accounts` part). Data only: the definition and the account
2
+ * readers consume it, so importing it loads no code. */
3
+ export declare const PI_ACCOUNTS: {
4
+ readonly layout: {
5
+ readonly envVar: 'PI_CODING_AGENT_DIR';
6
+ readonly defaultBindsHome: false;
7
+ readonly stateFile: 'in-home';
8
+ };
9
+ readonly dirMarkers: readonly ["auth.json", "settings.json", "models.json", "sessions"];
10
+ readonly homeSlot: 'pi';
11
+ };
@@ -0,0 +1,8 @@
1
+ /** Pi's account data (the `accounts` part). Data only: the definition and the account
2
+ * readers consume it, so importing it loads no code. */
3
+ export const PI_ACCOUNTS = {
4
+ layout: { envVar: 'PI_CODING_AGENT_DIR', defaultBindsHome: false, stateFile: 'in-home' },
5
+ dirMarkers: ['auth.json', 'settings.json', 'models.json', 'sessions'],
6
+ homeSlot: 'pi',
7
+ };
8
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/runners/pi/accounts.ts"],"names":[],"mappings":"AAGA;yDACyD;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE;IACxF,UAAU,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,CAAC;IACrE,QAAQ,EAAE,IAAI;CACwD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { defineRunner } from '../../core/runner-definition.js';
2
+ import { productEnv } from '../../core/product-env.js';
2
3
  import { PI_FACTS } from './facts.js';
3
4
  import { PI_MODELS } from './models.js';
4
5
  import { PI_CONFIG_FILES } from './config-files.js';
@@ -6,6 +7,9 @@ import { PI_EXTRA_TOOLS } from './extra-tools.js';
6
7
  import { PI_SPEC_SUPPORT } from './spec-support.js';
7
8
  import { PI_DETECTION } from './detection.js';
8
9
  import { PI_CLI } from './cli.js';
10
+ import { PI_LOGIN } from './login.js';
11
+ import { PI_ACCOUNTS } from './accounts.js';
12
+ import { PI_ENV } from './env.js';
9
13
  /** The Pi runner. */
10
14
  export const piRunner = defineRunner({
11
15
  id: 'pi',
@@ -22,5 +26,9 @@ export const piRunner = defineRunner({
22
26
  loadSkillCatalog: async () => (await import('../../core/pi-skill-catalog.js')).discoverPiSkills,
23
27
  configFiles: PI_CONFIG_FILES,
24
28
  extraTools: PI_EXTRA_TOOLS,
29
+ login: { ...PI_LOGIN, executable: () => productEnv('PI_BIN') ?? 'pi' },
30
+ accounts: PI_ACCOUNTS,
31
+ env: PI_ENV,
32
+ loadLogin: async () => ({ parse: (await import('./login-probe.js')).parsePiStatus }),
25
33
  });
26
34
  //# sourceMappingURL=definition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/runners/pi/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CA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S,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;CACrF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Pi's env allow-list (the `env` part). Data only. */
2
+ export declare const PI_ENV: {
3
+ readonly allowPrefixes: readonly ["PI_", ...string[]];
4
+ };
@@ -0,0 +1,15 @@
1
+ import { MULTI_PROVIDER_PREFIXES } from '../../core/agent-env.js';
2
+ /** Pi's env allow-list (the `env` part). Data only. */
3
+ export const PI_ENV = {
4
+ allowPrefixes: [
5
+ // pi selects models as `provider/model` (#387), so it needs both its own config and any
6
+ // provider a configured model id can name — the same set OpenCode gets, for the same reason.
7
+ // Deliberately NOT `CLAUDE_`: pi is not Claude Code and reads none of its variables, and the
8
+ // prefix is load-bearing below — it is what unlocks the Bedrock/Vertex cloud credentials, so
9
+ // granting it here handed pi the whole `AWS_*` / `GOOGLE_CLOUD_*` family on any host that had
10
+ // set `CLAUDE_CODE_USE_BEDROCK=1` for Claude Code, plus Claude's own config dir.
11
+ 'PI_',
12
+ ...MULTI_PROVIDER_PREFIXES,
13
+ ],
14
+ };
15
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../../src/runners/pi/env.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,uDAAuD;AACvD,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,aAAa,EAAE;QACb,wFAAwF;QACxF,6FAA6F;QAC7F,6FAA6F;QAC7F,6FAA6F;QAC7F,8FAA8F;QAC9F,iFAAiF;QACjF,KAAK;QACL,GAAG,uBAAuB;KAC3B;CAC2B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ProviderCommandResult, ProviderConnectionState } from '../../core/provider-auth.ts';
2
+ /** Pi's auth-status parser, moved verbatim from `core/provider-auth.ts`. Loads only through
3
+ * the definition's `loadLogin()`. */
4
+ export declare function parsePiStatus(result: ProviderCommandResult): ProviderConnectionState | null;
@@ -0,0 +1,17 @@
1
+ import { normalizedLines } from '../login-output.js';
2
+ /** Pi's auth-status parser, moved verbatim from `core/provider-auth.ts`. Loads only through
3
+ * the definition's `loadLogin()`. */
4
+ export function parsePiStatus(result) {
5
+ if (result.exitCode !== 0)
6
+ return null;
7
+ const lines = normalizedLines(result.stdout);
8
+ if (lines.some((line) => /^provider\s+model\s+context\s+max-out\s+thinking\s+images$/.test(line))) {
9
+ return 'connected';
10
+ }
11
+ if (lines.some((line) => line.includes('no models available'))
12
+ && lines.some((line) => line.includes('/login'))) {
13
+ return 'disconnected';
14
+ }
15
+ return null;
16
+ }
17
+ //# sourceMappingURL=login-probe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-probe.js","sourceRoot":"","sources":["../../../src/runners/pi/login-probe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;sCACsC;AACtC,MAAM,UAAU,aAAa,CAAC,MAA6B;IACzD,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,4DAA4D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAClG,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IACE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;WACvD,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAChD,CAAC;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Pi's login and auth-status data (the `login` part). Data only: the definition and
2
+ * `ProviderAuthService` read this value, so importing it loads no code. */
3
+ export declare const PI_LOGIN: {
4
+ readonly statusArgs: readonly ["--list-models"];
5
+ readonly loginArgs: readonly ["/login"];
6
+ readonly installHint: 'Install pi, then run `pi /login`.';
7
+ };
@@ -0,0 +1,8 @@
1
+ /** Pi's login and auth-status data (the `login` part). Data only: the definition and
2
+ * `ProviderAuthService` read this value, so importing it loads no code. */
3
+ export const PI_LOGIN = {
4
+ statusArgs: ['--list-models'],
5
+ loginArgs: ['/login'],
6
+ installHint: 'Install pi, then run `pi /login`.',
7
+ };
8
+ //# sourceMappingURL=login.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/runners/pi/login.ts"],"names":[],"mappings":"AAEA;4EAC4E;AAC5E,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,UAAU,EAAE,CAAC,eAAe,CAAC;IAC7B,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,WAAW,EAAE,mCAAmC;CACd,CAAC"}
@@ -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: 400;
43
+ status: 409;
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: 409;
56
+ status: 400;
57
57
  input: {
58
58
  query: {
59
59
  q?: string | undefined;
@@ -1520,12 +1520,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1520
1520
  profileCapableProviders: ("claude" | "codex" | "omp" | "opencode" | "pi")[];
1521
1521
  selections: {
1522
1522
  [x: string]: {
1523
- [x: string]: import("hono/utils/types").JSONValue;
1524
- claude?: string | undefined;
1525
- codex?: string | undefined;
1526
- opencode?: string | undefined;
1527
- pi?: string | undefined;
1528
- omp?: string | undefined;
1523
+ [x: string]: string | undefined;
1529
1524
  };
1530
1525
  };
1531
1526
  };
@@ -1873,12 +1868,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1873
1868
  output: {
1874
1869
  selections: {
1875
1870
  [x: string]: {
1876
- [x: string]: import("hono/utils/types").JSONValue;
1877
- claude?: string | undefined;
1878
- codex?: string | undefined;
1879
- opencode?: string | undefined;
1880
- pi?: string | undefined;
1881
- omp?: string | undefined;
1871
+ [x: string]: string | undefined;
1882
1872
  };
1883
1873
  };
1884
1874
  };
@@ -3371,9 +3361,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
3371
3361
  defaultModels: {
3372
3362
  claude?: string | undefined;
3373
3363
  codex?: string | undefined;
3364
+ omp?: string | undefined;
3374
3365
  opencode?: string | undefined;
3375
3366
  pi?: string | undefined;
3376
- omp?: string | undefined;
3377
3367
  };
3378
3368
  modelsLocked: boolean;
3379
3369
  maxParallel: number;
@@ -3410,9 +3400,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
3410
3400
  defaultModels: {
3411
3401
  claude?: string | undefined;
3412
3402
  codex?: string | undefined;
3403
+ omp?: string | undefined;
3413
3404
  opencode?: string | undefined;
3414
3405
  pi?: string | undefined;
3415
- omp?: string | undefined;
3416
3406
  };
3417
3407
  modelsLocked: boolean;
3418
3408
  maxParallel: number;
@@ -4328,6 +4318,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4328
4318
  } & {
4329
4319
  "/repo/commit/:sha": {
4330
4320
  $get: {
4321
+ output: string;
4322
+ outputFormat: "text";
4323
+ status: import("hono/utils/http-status").ContentfulStatusCode;
4324
+ input: {
4325
+ query: {
4326
+ structured?: string | undefined;
4327
+ };
4328
+ } & {
4329
+ param: {
4330
+ sha: string;
4331
+ };
4332
+ };
4333
+ } | {
4331
4334
  output: {
4332
4335
  error: string;
4333
4336
  code?: "invalid_input" | undefined;
@@ -4391,19 +4394,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4391
4394
  sha: string;
4392
4395
  };
4393
4396
  };
4394
- } | {
4395
- output: string;
4396
- outputFormat: "text";
4397
- status: import("hono/utils/http-status").ContentfulStatusCode;
4398
- input: {
4399
- query: {
4400
- structured?: string | undefined;
4401
- };
4402
- } & {
4403
- param: {
4404
- sha: string;
4405
- };
4406
- };
4407
4397
  };
4408
4398
  };
4409
4399
  } & {
@@ -18140,20 +18130,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18140
18130
  } & {
18141
18131
  "/runs/:id/handoff": {
18142
18132
  $get: {
18143
- output: {
18144
- error: string;
18145
- };
18146
- outputFormat: "json";
18147
- status: 404;
18133
+ output: string;
18134
+ outputFormat: "text";
18135
+ status: 200;
18148
18136
  input: {
18149
18137
  param: {
18150
18138
  id: string;
18151
18139
  };
18152
18140
  };
18153
18141
  } | {
18154
- output: string;
18155
- outputFormat: "text";
18156
- status: 200;
18142
+ output: {
18143
+ error: string;
18144
+ };
18145
+ outputFormat: "json";
18146
+ status: 404;
18157
18147
  input: {
18158
18148
  param: {
18159
18149
  id: string;
@@ -18191,20 +18181,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18191
18181
  } & {
18192
18182
  "/runs/:id/diff": {
18193
18183
  $get: {
18194
- output: {
18195
- error: string;
18196
- };
18197
- outputFormat: "json";
18198
- status: 404 | 409;
18184
+ output: string;
18185
+ outputFormat: "text";
18186
+ status: import("hono/utils/http-status").ContentfulStatusCode;
18199
18187
  input: {
18200
18188
  param: {
18201
18189
  id: string;
18202
18190
  };
18203
18191
  };
18204
18192
  } | {
18205
- output: string;
18206
- outputFormat: "text";
18207
- status: import("hono/utils/http-status").ContentfulStatusCode;
18193
+ output: {
18194
+ error: string;
18195
+ };
18196
+ outputFormat: "json";
18197
+ status: 404 | 409;
18208
18198
  input: {
18209
18199
  param: {
18210
18200
  id: string;
@@ -19291,9 +19281,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19291
19281
  defaultModels: {
19292
19282
  claude?: string | undefined;
19293
19283
  codex?: string | undefined;
19284
+ omp?: string | undefined;
19294
19285
  opencode?: string | undefined;
19295
19286
  pi?: string | undefined;
19296
- omp?: string | undefined;
19297
19287
  };
19298
19288
  modelsLocked: boolean;
19299
19289
  maxParallel: number;
@@ -19330,9 +19320,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19330
19320
  defaultModels: {
19331
19321
  claude?: string | undefined;
19332
19322
  codex?: string | undefined;
19323
+ omp?: string | undefined;
19333
19324
  opencode?: string | undefined;
19334
19325
  pi?: string | undefined;
19335
- omp?: string | undefined;
19336
19326
  };
19337
19327
  modelsLocked: boolean;
19338
19328
  maxParallel: number;
@@ -20248,6 +20238,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20248
20238
  } & {
20249
20239
  "/repo/commit/:sha": {
20250
20240
  $get: {
20241
+ output: string;
20242
+ outputFormat: "text";
20243
+ status: import("hono/utils/http-status").ContentfulStatusCode;
20244
+ input: {
20245
+ query: {
20246
+ structured?: string | undefined;
20247
+ };
20248
+ } & {
20249
+ param: {
20250
+ sha: string;
20251
+ };
20252
+ };
20253
+ } | {
20251
20254
  output: {
20252
20255
  error: string;
20253
20256
  code?: "invalid_input" | undefined;
@@ -20311,19 +20314,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20311
20314
  sha: string;
20312
20315
  };
20313
20316
  };
20314
- } | {
20315
- output: string;
20316
- outputFormat: "text";
20317
- status: import("hono/utils/http-status").ContentfulStatusCode;
20318
- input: {
20319
- query: {
20320
- structured?: string | undefined;
20321
- };
20322
- } & {
20323
- param: {
20324
- sha: string;
20325
- };
20326
- };
20327
20317
  };
20328
20318
  };
20329
20319
  } & {
@@ -34060,20 +34050,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
34060
34050
  } & {
34061
34051
  "/runs/:id/handoff": {
34062
34052
  $get: {
34063
- output: {
34064
- error: string;
34065
- };
34066
- outputFormat: "json";
34067
- status: 404;
34053
+ output: string;
34054
+ outputFormat: "text";
34055
+ status: 200;
34068
34056
  input: {
34069
34057
  param: {
34070
34058
  id: string;
34071
34059
  };
34072
34060
  };
34073
34061
  } | {
34074
- output: string;
34075
- outputFormat: "text";
34076
- status: 200;
34062
+ output: {
34063
+ error: string;
34064
+ };
34065
+ outputFormat: "json";
34066
+ status: 404;
34077
34067
  input: {
34078
34068
  param: {
34079
34069
  id: string;
@@ -34111,20 +34101,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
34111
34101
  } & {
34112
34102
  "/runs/:id/diff": {
34113
34103
  $get: {
34114
- output: {
34115
- error: string;
34116
- };
34117
- outputFormat: "json";
34118
- status: 404 | 409;
34104
+ output: string;
34105
+ outputFormat: "text";
34106
+ status: import("hono/utils/http-status").ContentfulStatusCode;
34119
34107
  input: {
34120
34108
  param: {
34121
34109
  id: string;
34122
34110
  };
34123
34111
  };
34124
34112
  } | {
34125
- output: string;
34126
- outputFormat: "text";
34127
- status: import("hono/utils/http-status").ContentfulStatusCode;
34113
+ output: {
34114
+ error: string;
34115
+ };
34116
+ outputFormat: "json";
34117
+ status: 404 | 409;
34128
34118
  input: {
34129
34119
  param: {
34130
34120
  id: string;
@@ -123,7 +123,7 @@ import { findConfigFile } from '../agent-config/catalog.js';
123
123
  import { defaultWorkspaceConfig, loadWorkspaceConfig, mergeWriteWorkspaceConfig, effectiveComposerDefault, } from '../workspace/config.js';
124
124
  import { CONTROL_CHARS_RE, DEFAULT_AGENT_ACCOUNT_ID, defaultAgentAccountStore, isAbsoluteConfigDir, loadAgentAccounts, mergeWriteAgentAccounts, } from '../workspace/agent-accounts.js';
125
125
  import { defaultAgentProfile, listAgentProfiles, profileDirState, resolveStoredProfile, sameProfileDir, } from '../workspace/agent-profiles.js';
126
- import { PROFILE_CAPABLE_PROVIDERS, profileEnv, supportsProfiles } from '../core/agent-profiles.js';
126
+ import { profileCapableProviders, profileEnv, supportsProfiles } from '../core/agent-profiles.js';
127
127
  import { shellQuote, withEnvPrefix } from '../core/shell-env.js';
128
128
  import { resumeCommand } from '../core/runner-cli.js';
129
129
  import { allocateProjectSlug, normalizeProjectTags, probeProjectStatus, toProjectListEntry, registerProject, removeProject, shouldRegisterProject, } from '../workspace/projects.js';
@@ -1133,7 +1133,7 @@ export function createApp(deps) {
1133
1133
  return c.json({
1134
1134
  editable,
1135
1135
  profiles,
1136
- profileCapableProviders: [...PROFILE_CAPABLE_PROVIDERS],
1136
+ profileCapableProviders: profileCapableProviders(),
1137
1137
  // Which account each project uses, keyed by repo root. Served here rather than on the
1138
1138
  // project registry because it lives in the same file as the accounts it names.
1139
1139
  selections: editable ? store.selections : {},