cohorte 3.0.0-dev.2 → 3.0.0-dev.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifestVersion": 1,
3
- "cohorteVersion": "3.0.0-dev.2",
3
+ "cohorteVersion": "3.0.0-dev.4",
4
4
  "algorithm": "sha256",
5
5
  "treeSha256": "b0988b7a3040d59aa44b1e5637dec54344b144c7991deac7b8e1f055aad8f2aa",
6
6
  "files": [
@@ -7,8 +7,8 @@
7
7
  "chunks/approve-Cv135UqI.mjs.map": "591ec1c955d716ff701ffc80547b35501637fe9394eb5e7f890573256ba58671",
8
8
  "chunks/auth-BT5oVp76.mjs": "dc3e23b73b9315625cd6e6f29724b19cfbbc1a6e4f6ef8fb3bcb5043e4fa024d",
9
9
  "chunks/auth-BT5oVp76.mjs.map": "d2f9f55f7e62812dc5b51ed2c19e8868c2da10598f111b0e0efbdabdb1f2ff21",
10
- "chunks/auth-ybswxUPK.mjs": "d9c47f201762f3e0fd63e67718af83584e0ef7de0ac429ff48ca863481a716ea",
11
- "chunks/auth-ybswxUPK.mjs.map": "aae7c3264901e57ecd2b10ba7e56de1fff39e09074dba6184fd883af07b81990",
10
+ "chunks/auth-Dnlksuo5.mjs": "52a6f8492d257e2f2a0a616c83dbc45829340cc0bb49fa82229121f062b4c264",
11
+ "chunks/auth-Dnlksuo5.mjs.map": "546c1e45dd5999a4d6dc51fdb6ab95b7409083d7b27e1581a7de8096da9e2382",
12
12
  "chunks/brainstorm-BwKA6yZP.mjs": "d462fe4cc908205599a49af9870ee1cc945e6bfa13006b60b15af838fafa41bd",
13
13
  "chunks/brainstorm-BwKA6yZP.mjs.map": "6ae68c1ea9b8fc80f08a33c08a2a5dbb5b1940119143b81cff400a233e0137fc",
14
14
  "chunks/cancel-KV_cpsqS.mjs": "a58787b67ff0e4e36f301f01bf683e7a39340fcc7a9f8201887afc250a248155",
@@ -17,8 +17,8 @@
17
17
  "chunks/canonical-C8UxeEmB.mjs.map": "7f683738f91a995f0181c224be62d6b13889dab16e308839329762c87f2244c1",
18
18
  "chunks/catalogue-B5uFqfzJ.mjs": "58716aede8cc56b09305edee2d48fdf1f57420fc492c763ae4e75de1b64bf70c",
19
19
  "chunks/catalogue-B5uFqfzJ.mjs.map": "bb796e82d4c7d03d6d8eb88d13f5cb90484aa5e532fce8908563ccc8e8957903",
20
- "chunks/compose-C0rEh5wB.mjs": "4137497e8b58fa60914a7b55c3922d05b7b1343a8450c0bd3b0279e525b718fa",
21
- "chunks/compose-C0rEh5wB.mjs.map": "8c05ba88886784b1afbf05b0b6c94e01604633cc849b87cb5534cc49ce9d6705",
20
+ "chunks/compose-CC9_NMzm.mjs": "f970be9ca5110c73f29905a8e46b045ed9c9ea534d76948cf5deac2c5b53258d",
21
+ "chunks/compose-CC9_NMzm.mjs.map": "79dbd782fece7340178d41b451da8fec7e43e87400c495a6b4259a38ae6f6c78",
22
22
  "chunks/config-DefHA2Lw.mjs": "89695a150a5a9a9aa0c0091e3f6a3e2cb8c372ef5a10a51c7243a57ab5e20d4f",
23
23
  "chunks/config-DefHA2Lw.mjs.map": "a8d12fad50d509410461860ee41b92234a5021b43488a73fb510bd9cb2a79195",
24
24
  "chunks/contract-BkMjU1kR.mjs": "d9cea311263df193ec80357701d4a58cd5494954cf00b97d47440ce88fe3033e",
@@ -99,6 +99,6 @@
99
99
  "chunks/tail-BuhT-2PH.mjs.map": "5d44106e9044ca20a281f499d543c1f1955007a97f5427ee89550c3bbd129725",
100
100
  "chunks/update-BXIppsbi.mjs": "0207788cf68937696d41f94ed082c823ae0782e6afc624e741d35015879bd0d9",
101
101
  "chunks/update-BXIppsbi.mjs.map": "ef6972b3c42b9abd0e7dcc12b6e92ecfd980bfe5cf2a304138fd4afca6ec3adc",
102
- "cli.mjs": "8d2479a9ffedde37b4bae91b49d2281e46af29a7e239a1f648684158c451d969",
103
- "cli.mjs.map": "d6d61509e41294cbdbc553b2c621abf05fb883f6aa84d4334c06c40fc7298304"
102
+ "cli.mjs": "9fd5c5de465d06c62ecdfca14e96e47bef7c5752a210e4741b2eb3a2eb65bcbe",
103
+ "cli.mjs.map": "352d3359d715dc57ad0f92b014e749157d00841da59b404d48706c00e2a76673"
104
104
  }
@@ -115,6 +115,9 @@ const auth = {
115
115
  if (args.subVerb === "login") {
116
116
  const controller = new AbortController();
117
117
  const timeout = setTimeout(() => controller.abort(), 6e5);
118
+ const abortLogin = () => controller.abort();
119
+ process.on("SIGINT", abortLogin);
120
+ process.on("SIGTERM", abortLogin);
118
121
  const ui = await loginUi(ctx, controller.signal);
119
122
  try {
120
123
  const status = await runtime.login(provider, ui, controller.signal);
@@ -124,6 +127,8 @@ const auth = {
124
127
  return 0;
125
128
  } finally {
126
129
  clearTimeout(timeout);
130
+ process.removeListener("SIGINT", abortLogin);
131
+ process.removeListener("SIGTERM", abortLogin);
127
132
  ui.close();
128
133
  }
129
134
  }
@@ -133,4 +138,4 @@ const auth = {
133
138
  //#endregion
134
139
  export { auth as default, openBrowser };
135
140
 
136
- //# sourceMappingURL=auth-ybswxUPK.mjs.map
141
+ //# sourceMappingURL=auth-Dnlksuo5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-ybswxUPK.mjs","names":[],"sources":["../../../../apps/cli/src/commands/auth/index.ts"],"sourcesContent":["// apps/cli/src/commands/auth/index.ts — DESIGN §9 verb `auth`; provider authentication is delegated to the\n// selected runtime child so credentials never cross the CLI/runtime boundary.\nimport { spawn } from 'node:child_process';\nimport { createInterface } from 'node:readline/promises';\nimport type { ProviderAuthStatus } from '@cohorte/runtime-contract';\nimport type { CommandModule } from '../../contract/index.ts';\n\ntype Spawn = typeof spawn;\n\n/** Open an OAuth URL without involving a shell. The URL is always printed by the caller as a fallback. */\nexport function openBrowser(rawUrl: string, spawnProcess: Spawn = spawn): boolean {\n let url: URL;\n try {\n url = new URL(rawUrl);\n } catch {\n return false;\n }\n if (url.protocol !== 'https:' && url.protocol !== 'http:') return false;\n\n const command = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'cmd.exe' : 'xdg-open';\n const args = process.platform === 'win32' ? ['/c', 'start', '', url.toString()] : [url.toString()];\n try {\n const child = spawnProcess(command, args, { detached: true, stdio: 'ignore' });\n child.unref();\n return true;\n } catch {\n return false;\n }\n}\n\nfunction document(ctx: Parameters<CommandModule['run']>[0], statuses: ProviderAuthStatus[]) {\n return {\n documentVersion: 1,\n generatedAt: ctx.clock.now(),\n runtime: (() => {\n const runtime = ctx.runtime.resolve();\n return { id: runtime.id, version: 'unknown' };\n })(),\n providers: statuses.map((status) => ({\n ...status,\n ...(status.accountLabel === undefined ? { accountLabelNote: 'account: not exposed by the engine' } : {}),\n })),\n };\n}\n\nfunction print(ctx: Parameters<CommandModule['run']>[0], value: ReturnType<typeof document>): void {\n if (ctx.stdio.stdout && value) ctx.stdio.stdout.write(`${JSON.stringify(value)}\\n`);\n}\n\nasync function loginUi(ctx: Parameters<CommandModule['run']>[0], signal: AbortSignal) {\n const readline = createInterface({ input: ctx.stdio.stdin, output: ctx.stdio.stdout, terminal: false });\n const abort = () => readline.close();\n signal.addEventListener('abort', abort, { once: true });\n return {\n show(event: {\n kind: string;\n url?: string;\n instructions?: string;\n message?: string;\n userCode?: string;\n verificationUri?: string;\n }) {\n if (event.kind === 'open-url') {\n const lines = [event.instructions, event.url ? `Open: ${event.url}` : undefined].filter(\n (value): value is string => Boolean(value),\n );\n if (lines.length) ctx.stdio.stdout.write(`${lines.join('\\n')}\\n`);\n if (event.url) openBrowser(event.url);\n return;\n }\n if (event.kind === 'device-code') {\n const lines = [\n event.verificationUri ? `Open: ${event.verificationUri}` : undefined,\n event.userCode ? `Code: ${event.userCode}` : undefined,\n event.instructions,\n event.message,\n ].filter((value): value is string => Boolean(value));\n if (lines.length) ctx.stdio.stdout.write(`${lines.join('\\n')}\\n`);\n return;\n }\n const text = event.message ?? event.instructions ?? event.url ?? event.verificationUri ?? event.userCode ?? '';\n if (text) ctx.stdio.stdout.write(`${text}\\n`);\n },\n async ask(prompt: { kind: string; message: string; options?: { id: string; label: string }[] }) {\n if (prompt.kind === 'select' && prompt.options?.length) {\n ctx.stdio.stdout.write(`${prompt.message}\\n`);\n prompt.options.forEach((option, index) => {\n ctx.stdio.stdout.write(` ${index + 1}. ${option.label}\\n`);\n });\n const answer = await readline.question('Choice: ');\n const index = Number.parseInt(answer, 10) - 1;\n return prompt.options[index]?.id ?? answer;\n }\n return readline.question(`${prompt.message} `);\n },\n close() {\n signal.removeEventListener('abort', abort);\n readline.close();\n },\n };\n}\n\nconst auth: CommandModule = {\n verb: 'auth',\n async run(ctx, args) {\n const runtime = ctx.runtime.resolve();\n const provider = args.positionals[0];\n if (args.subVerb === 'status' || args.subVerb === undefined) {\n const statuses = await runtime.authStatus(provider ? [provider] : ['openai-codex', 'anthropic']);\n const value = document(ctx, statuses);\n if (args.json) print(ctx, value);\n else\n for (const status of value.providers)\n ctx.stdio.stdout.write(`${status.provider}: ${status.state} (${status.billing})\\n`);\n return 0;\n }\n if (!provider) return 2;\n if (args.subVerb === 'logout') {\n await runtime.logout(provider);\n const value = document(ctx, await runtime.authStatus([provider]));\n if (args.json) print(ctx, value);\n else ctx.stdio.stdout.write(`${provider}: logged out\\n`);\n return 0;\n }\n if (args.subVerb === 'login') {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 10 * 60_000);\n const ui = await loginUi(ctx, controller.signal);\n try {\n const status = await runtime.login(provider, ui, controller.signal);\n const value = document(ctx, [status]);\n if (args.json) print(ctx, value);\n else ctx.stdio.stdout.write(`${status.provider}: ${status.state}\\n`);\n return 0;\n } finally {\n clearTimeout(timeout);\n ui.close();\n }\n }\n return 10;\n },\n};\n\nexport default auth;\n"],"mappings":";;;;AAUA,SAAgB,YAAY,QAAgB,eAAsB,OAAgB;CAChF,IAAI;CACJ,IAAI;EACF,MAAM,IAAI,IAAI,MAAM;CACtB,QAAQ;EACN,OAAO;CACT;CACA,IAAI,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src/commands/auth/index.ts — DESIGN §9 verb `auth`; provider authentication is delegated to the\n// selected runtime child so credentials never cross the CLI/runtime boundary.\nimport { spawn } from 'node:child_process';\nimport { createInterface } from 'node:readline/promises';\nimport type { ProviderAuthStatus } from '@cohorte/runtime-contract';\nimport type { CommandModule } from '../../contract/index.ts';\n\ntype Spawn = typeof spawn;\n\n/** Open an OAuth URL without involving a shell. The URL is always printed by the caller as a fallback. */\nexport function openBrowser(rawUrl: string, spawnProcess: Spawn = spawn): boolean {\n let url: URL;\n try {\n url = new URL(rawUrl);\n } catch {\n return false;\n }\n if (url.protocol !== 'https:' && url.protocol !== 'http:') return false;\n\n const command = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'cmd.exe' : 'xdg-open';\n const args = process.platform === 'win32' ? ['/c', 'start', '', url.toString()] : [url.toString()];\n try {\n const child = spawnProcess(command, args, { detached: true, stdio: 'ignore' });\n child.unref();\n return true;\n } catch {\n return false;\n }\n}\n\nfunction document(ctx: Parameters<CommandModule['run']>[0], statuses: ProviderAuthStatus[]) {\n return {\n documentVersion: 1,\n generatedAt: ctx.clock.now(),\n runtime: (() => {\n const runtime = ctx.runtime.resolve();\n return { id: runtime.id, version: 'unknown' };\n })(),\n providers: statuses.map((status) => ({\n ...status,\n ...(status.accountLabel === undefined ? { accountLabelNote: 'account: not exposed by the engine' } : {}),\n })),\n };\n}\n\nfunction print(ctx: Parameters<CommandModule['run']>[0], value: ReturnType<typeof document>): void {\n if (ctx.stdio.stdout && value) ctx.stdio.stdout.write(`${JSON.stringify(value)}\\n`);\n}\n\nasync function loginUi(ctx: Parameters<CommandModule['run']>[0], signal: AbortSignal) {\n const readline = createInterface({ input: ctx.stdio.stdin, output: ctx.stdio.stdout, terminal: false });\n const abort = () => readline.close();\n signal.addEventListener('abort', abort, { once: true });\n return {\n show(event: {\n kind: string;\n url?: string;\n instructions?: string;\n message?: string;\n userCode?: string;\n verificationUri?: string;\n }) {\n if (event.kind === 'open-url') {\n const lines = [event.instructions, event.url ? `Open: ${event.url}` : undefined].filter(\n (value): value is string => Boolean(value),\n );\n if (lines.length) ctx.stdio.stdout.write(`${lines.join('\\n')}\\n`);\n if (event.url) openBrowser(event.url);\n return;\n }\n if (event.kind === 'device-code') {\n const lines = [\n event.verificationUri ? `Open: ${event.verificationUri}` : undefined,\n event.userCode ? `Code: ${event.userCode}` : undefined,\n event.instructions,\n event.message,\n ].filter((value): value is string => Boolean(value));\n if (lines.length) ctx.stdio.stdout.write(`${lines.join('\\n')}\\n`);\n return;\n }\n const text = event.message ?? event.instructions ?? event.url ?? event.verificationUri ?? event.userCode ?? '';\n if (text) ctx.stdio.stdout.write(`${text}\\n`);\n },\n async ask(prompt: { kind: string; message: string; options?: { id: string; label: string }[] }) {\n if (prompt.kind === 'select' && prompt.options?.length) {\n ctx.stdio.stdout.write(`${prompt.message}\\n`);\n prompt.options.forEach((option, index) => {\n ctx.stdio.stdout.write(` ${index + 1}. ${option.label}\\n`);\n });\n const answer = await readline.question('Choice: ');\n const index = Number.parseInt(answer, 10) - 1;\n return prompt.options[index]?.id ?? answer;\n }\n return readline.question(`${prompt.message} `);\n },\n close() {\n signal.removeEventListener('abort', abort);\n readline.close();\n },\n };\n}\n\nconst auth: CommandModule = {\n verb: 'auth',\n async run(ctx, args) {\n const runtime = ctx.runtime.resolve();\n const provider = args.positionals[0];\n if (args.subVerb === 'status' || args.subVerb === undefined) {\n const statuses = await runtime.authStatus(provider ? [provider] : ['openai-codex', 'anthropic']);\n const value = document(ctx, statuses);\n if (args.json) print(ctx, value);\n else\n for (const status of value.providers)\n ctx.stdio.stdout.write(`${status.provider}: ${status.state} (${status.billing})\\n`);\n return 0;\n }\n if (!provider) return 2;\n if (args.subVerb === 'logout') {\n await runtime.logout(provider);\n const value = document(ctx, await runtime.authStatus([provider]));\n if (args.json) print(ctx, value);\n else ctx.stdio.stdout.write(`${provider}: logged out\\n`);\n return 0;\n }\n if (args.subVerb === 'login') {\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 10 * 60_000);\n // Keep the handlers installed while the first interrupt is cleaning up the detached auth child.\n // A second Ctrl+C must not terminate this process before `authLogin` can reap its callback server.\n const abortLogin = () => controller.abort();\n process.on('SIGINT', abortLogin);\n process.on('SIGTERM', abortLogin);\n const ui = await loginUi(ctx, controller.signal);\n try {\n const status = await runtime.login(provider, ui, controller.signal);\n const value = document(ctx, [status]);\n if (args.json) print(ctx, value);\n else ctx.stdio.stdout.write(`${status.provider}: ${status.state}\\n`);\n return 0;\n } finally {\n clearTimeout(timeout);\n process.removeListener('SIGINT', abortLogin);\n process.removeListener('SIGTERM', abortLogin);\n ui.close();\n }\n }\n return 10;\n },\n};\n\nexport default auth;\n"],"mappings":";;;;AAUA,SAAgB,YAAY,QAAgB,eAAsB,OAAgB;CAChF,IAAI;CACJ,IAAI;EACF,MAAM,IAAI,IAAI,MAAM;CACtB,QAAQ;EACN,OAAO;CACT;CACA,IAAI,IAAI,aAAa,YAAY,IAAI,aAAa,SAAS,OAAO;CAElE,MAAM,UAAU,QAAQ,aAAa,WAAW,SAAS,QAAQ,aAAa,UAAU,YAAY;CACpG,MAAM,OAAO,QAAQ,aAAa,UAAU;EAAC;EAAM;EAAS;EAAI,IAAI,SAAS;CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;CACjG,IAAI;EAEF,aAD2B,SAAS,MAAM;GAAE,UAAU;GAAM,OAAO;EAAS,CACxE,CAAC,CAAC,MAAM;EACZ,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,SAAS,KAA0C,UAAgC;CAC1F,OAAO;EACL,iBAAiB;EACjB,aAAa,IAAI,MAAM,IAAI;EAC3B,gBAAgB;GAEd,OAAO;IAAE,IADO,IAAI,QAAQ,QACT,CAAC,CAAC;IAAI,SAAS;GAAU;EAC9C,EAAA,CAAG;EACH,WAAW,SAAS,KAAK,YAAY;GACnC,GAAG;GACH,GAAI,OAAO,iBAAiB,KAAA,IAAY,EAAE,kBAAkB,qCAAqC,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AAI,KAAK,YAAY,SAAS;GAC5B,MAAM,aAAa,IAAI,gBAAgB;GACvC,MAAM,UAAU,iBAAiB,WAAW,MAAM,GAAG,GAAW;GAGhE,MAAM,mBAAmB,WAAW,MAAM;GAC1C,QAAQ,GAAG,UAAU,UAAU;GAC/B,QAAQ,GAAG,WAAW,UAAU;GAChC,MAAM,KAAK,MAAM,QAAQ,KAAK,WAAW,MAAM;GAC/C,IAAI;IACF,MAAM,SAAS,MAAM,QAAQ,MAAM,UAAU,IAAI,WAAW,MAAM;IAClE,MAAM,QAAQ,SAAS,KAAK,CAAC,MAAM,CAAC;IACpC,IAAI,KAAK,MAAM,MAAM,KAAK,KAAK;SAC1B,IAAI,MAAM,OAAO,MAAM,GAAG,OAAO,SAAS,IAAI,OAAO,MAAM,GAAG;IACnE,OAAO;GACT,UAAU;IACR,aAAa,OAAO;IACpB,QAAQ,eAAe,UAAU,UAAU;IAC3C,QAAQ,eAAe,WAAW,UAAU;IAC5C,GAAG,MAAM;GACX;EACF;EACA,OAAO;CACT;AACF"}
@@ -5185,7 +5185,7 @@ function createController(options) {
5185
5185
  title: `${startPayload.profile} run`,
5186
5186
  pinnedInstallDir: options.pinnedInstallDir ?? options.cwd,
5187
5187
  baseBranch: "main",
5188
- cohorteVersion: "3.0.0-dev.2",
5188
+ cohorteVersion: "3.0.0-dev.4",
5189
5189
  schemaVersion: 1,
5190
5190
  startedAt: options.clock.now()
5191
5191
  }).run);
@@ -6744,7 +6744,7 @@ async function createProductionEngine(options) {
6744
6744
  pinStore,
6745
6745
  metadata: {
6746
6746
  app: {
6747
- version: "3.0.0-dev.2",
6747
+ version: "3.0.0-dev.4",
6748
6748
  gitHash: null
6749
6749
  },
6750
6750
  packages: [],
@@ -7203,7 +7203,7 @@ async function createProductionHostRunner(options) {
7203
7203
  hostIdentity
7204
7204
  }),
7205
7205
  runId,
7206
- cohorteVersion: "3.0.0-dev.2",
7206
+ cohorteVersion: "3.0.0-dev.4",
7207
7207
  cwd: options.cwd,
7208
7208
  hostId: hostIdentity.hostId
7209
7209
  }).run();
@@ -7311,4 +7311,4 @@ async function composeCliContext(inputs) {
7311
7311
  //#endregion
7312
7312
  export { composeCliContext };
7313
7313
 
7314
- //# sourceMappingURL=compose-C0rEh5wB.mjs.map
7314
+ //# sourceMappingURL=compose-CC9_NMzm.mjs.map