cohorte 3.0.0-dev.1 → 3.0.0-dev.2

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.
@@ -4,17 +4,17 @@ import { i as computeAnchorMac, n as createKeyStore, r as createTrustStore, t as
4
4
  import { a as compileSchema, c as AgentOutput, i as canonicalCommandBody, s as compareOrder } from "./src-s7YRvk0t.mjs";
5
5
  import { a as literalPrefixOf } from "./schema-C9QbUW4H.mjs";
6
6
  import { i as resolveConfig, n as loadConfig } from "./src-DcU4IXMe.mjs";
7
- import { a as RUNTIME_EVENT_TYPE_NAMES, c as toolGrantProblems, g as createRedactor, i as RUNTIME_EVENT_TYPES, l as AgentExit, n as ProviderAuthStatus, o as ToolContent, t as SpawnRequest, v as createExecutor, y as createNoneBackend } from "./src-CId6kMsY.mjs";
8
- import { _ as resolveTable, a as createToolHost, b as createApprovalService, c as createResumer, d as createPipelineGuards, f as createFactCollector, g as createEngine, h as createEventWriter, i as createRunSnapshotter, m as createGrantComputer, n as createAgentSupervisor, o as createTransitionEffectRunner, p as createPhaseContracts, r as createProvisioner, s as createWorktreeService, t as createPhaseExecutor, u as initialRunState, v as createLeaseManager, x as createToolHostReplay, y as createEffectJournal } from "./src-CfAOde7C.mjs";
7
+ import { a as RUNTIME_EVENT_TYPE_NAMES, c as toolGrantProblems, g as createRedactor, i as RUNTIME_EVENT_TYPES, l as AgentExit, n as ProviderAuthStatus, o as ToolContent, t as SpawnRequest, v as createExecutor, y as createNoneBackend } from "./src-r0ECB1UJ.mjs";
8
+ import { _ as resolveTable, a as createToolHost, b as createApprovalService, c as createResumer, d as createPipelineGuards, f as createFactCollector, g as createEngine, h as createEventWriter, i as createRunSnapshotter, m as createGrantComputer, n as createAgentSupervisor, o as createTransitionEffectRunner, p as createPhaseContracts, r as createProvisioner, s as createWorktreeService, t as createPhaseExecutor, u as initialRunState, v as createLeaseManager, x as createToolHostReplay, y as createEffectJournal } from "./src-DZazJCp1.mjs";
9
9
  import { t as createRenderer } from "./render-DyZr5Lgi.mjs";
10
- import { a as buildPolicySnapshot, c as createCommandPolicy, i as createGlobMatcher, l as createProgramResolver, n as toolIntrospection, o as createPolicyEngine, r as createPathResolver, t as TOOL_CATALOGUE } from "./catalogue-BvwSrM_j.mjs";
10
+ import { a as buildPolicySnapshot, c as createCommandPolicy, i as createGlobMatcher, l as createProgramResolver, n as toolIntrospection, o as createPolicyEngine, r as createPathResolver, t as TOOL_CATALOGUE } from "./catalogue-B5uFqfzJ.mjs";
11
11
  import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
12
12
  import { Type } from "typebox";
13
13
  import { Compile } from "typebox/compile";
14
+ import { execFile, spawn } from "node:child_process";
14
15
  import { copyFile, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, stat, utimes, writeFile } from "node:fs/promises";
15
16
  import { dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
16
17
  import { parse } from "yaml";
17
- import { execFile, spawn } from "node:child_process";
18
18
  import { appendFileSync, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
19
19
  import { StringDecoder } from "node:string_decoder";
20
20
  import { DatabaseSync } from "node:sqlite";
@@ -4655,18 +4655,25 @@ async function exchange(settings, init, onFrame, options = {}) {
4655
4655
  } finally {
4656
4656
  clearTimeout(timer);
4657
4657
  transport.send({ t: "shutdown" });
4658
- await new Promise((resolve) => {
4659
- if (child.exitCode !== null || child.signalCode !== null || child.pid === void 0) return resolve();
4660
- const kill = setTimeout(() => {
4661
- try {
4662
- process.kill(-(child.pid ?? 0), "SIGKILL");
4663
- } catch {}
4664
- }, timings.exitGraceMs);
4658
+ const pid = child.pid;
4659
+ const goneWithin = (ms) => new Promise((resolve) => {
4660
+ if (child.exitCode !== null || child.signalCode !== null || child.pid === void 0) return resolve(true);
4661
+ const timer = setTimeout(() => resolve(false), ms);
4665
4662
  child.once("exit", () => {
4666
- clearTimeout(kill);
4667
- resolve();
4663
+ clearTimeout(timer);
4664
+ resolve(true);
4668
4665
  });
4669
4666
  });
4667
+ const signalGroup = (signal) => {
4668
+ if (pid === void 0) return;
4669
+ try {
4670
+ process.kill(process.platform === "win32" ? pid : -pid, signal);
4671
+ } catch {}
4672
+ };
4673
+ if (!await goneWithin(timings.exitGraceMs)) {
4674
+ signalGroup("SIGTERM");
4675
+ if (!await goneWithin(timings.termGraceMs)) signalGroup("SIGKILL");
4676
+ }
4670
4677
  transport.close();
4671
4678
  }
4672
4679
  }
@@ -5178,7 +5185,7 @@ function createController(options) {
5178
5185
  title: `${startPayload.profile} run`,
5179
5186
  pinnedInstallDir: options.pinnedInstallDir ?? options.cwd,
5180
5187
  baseBranch: "main",
5181
- cohorteVersion: "3.0.0-dev.1",
5188
+ cohorteVersion: "3.0.0-dev.2",
5182
5189
  schemaVersion: 1,
5183
5190
  startedAt: options.clock.now()
5184
5191
  }).run);
@@ -6737,7 +6744,7 @@ async function createProductionEngine(options) {
6737
6744
  pinStore,
6738
6745
  metadata: {
6739
6746
  app: {
6740
- version: "3.0.0-dev.1",
6747
+ version: "3.0.0-dev.2",
6741
6748
  gitHash: null
6742
6749
  },
6743
6750
  packages: [],
@@ -7196,7 +7203,7 @@ async function createProductionHostRunner(options) {
7196
7203
  hostIdentity
7197
7204
  }),
7198
7205
  runId,
7199
- cohorteVersion: "3.0.0-dev.1",
7206
+ cohorteVersion: "3.0.0-dev.2",
7200
7207
  cwd: options.cwd,
7201
7208
  hostId: hostIdentity.hostId
7202
7209
  }).run();
@@ -7304,4 +7311,4 @@ async function composeCliContext(inputs) {
7304
7311
  //#endregion
7305
7312
  export { composeCliContext };
7306
7313
 
7307
- //# sourceMappingURL=compose-Dvxunpto.mjs.map
7314
+ //# sourceMappingURL=compose-C0rEh5wB.mjs.map