@kitman-sh/cli 0.31.0 → 0.32.0

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 (29) hide show
  1. package/dist/{chunk-nndgeync.js → chunk-1an3xh3b.js} +6 -6
  2. package/dist/{chunk-pd3azxev.js → chunk-1hgsf81a.js} +1 -1
  3. package/dist/{chunk-qbrkeg49.js → chunk-3cneth9k.js} +4 -4
  4. package/dist/{chunk-9a6wbk11.js → chunk-4qrb09w4.js} +3 -3
  5. package/dist/{chunk-qb11yda6.js → chunk-4tzzmrz2.js} +9 -9
  6. package/dist/chunk-56gs4z53.js +399 -0
  7. package/dist/{chunk-emw9ragp.js → chunk-5hp8ams4.js} +20 -20
  8. package/dist/{chunk-y64ssczv.js → chunk-61dmxexa.js} +13 -157
  9. package/dist/{chunk-9vqkjkya.js → chunk-6e6t0f8y.js} +1 -1
  10. package/dist/{chunk-fjdp3rd6.js → chunk-a0bjjbhg.js} +20 -20
  11. package/dist/{chunk-9yvknsnj.js → chunk-abyssa8p.js} +3 -3
  12. package/dist/{chunk-njgay1ed.js → chunk-acmyagwp.js} +6 -6
  13. package/dist/{chunk-yjc2w86k.js → chunk-af8kftyw.js} +7 -7
  14. package/dist/{chunk-vwynec02.js → chunk-ah59jrtr.js} +1 -1
  15. package/dist/{chunk-s4r49vbj.js → chunk-awx0zevr.js} +4 -4
  16. package/dist/{chunk-2sazk478.js → chunk-c8eg05nh.js} +8 -4
  17. package/dist/{chunk-vh2a72d1.js → chunk-er0e8d8v.js} +2 -2
  18. package/dist/{chunk-xxcxramy.js → chunk-nb6h112w.js} +18 -13
  19. package/dist/{chunk-zy21drtv.js → chunk-q8e58p57.js} +2 -2
  20. package/dist/{chunk-qjxgew0k.js → chunk-qqb6djs7.js} +2 -2
  21. package/dist/{chunk-5qrjf4xq.js → chunk-r3mjxsmn.js} +4 -4
  22. package/dist/{chunk-r2kzvdrg.js → chunk-rbpn35g5.js} +1 -1
  23. package/dist/{chunk-38drrdzp.js → chunk-rnm5ybw4.js} +4 -4
  24. package/dist/{chunk-nk0ew12p.js → chunk-x4d4t28n.js} +108 -19
  25. package/dist/{chunk-z59pvcbk.js → chunk-z0gqrc8c.js} +169 -21
  26. package/dist/{chunk-m1qp6swh.js → chunk-znhjs0t6.js} +1 -1
  27. package/dist/index.js +4 -4
  28. package/package.json +1 -1
  29. package/dist/chunk-kx8rpa62.js +0 -230
@@ -84,8 +84,6 @@ import {
84
84
  DisablePropagation,
85
85
  sync,
86
86
  map7,
87
- ClockRef,
88
- currentTimeMillis2,
89
87
  ConsoleRef,
90
88
  succeed3,
91
89
  fail4,
@@ -193,8 +191,6 @@ import {
193
191
  clockWith,
194
192
  logError,
195
193
  effectify,
196
- toNumber,
197
- bytes,
198
194
  decode,
199
195
  isRedacted,
200
196
  make16,
@@ -269,10 +265,13 @@ import {
269
265
  decodeJsonStringOption,
270
266
  encodeJsonStringSync,
271
267
  encodePrettyJsonString
272
- } from "./chunk-y64ssczv.js";
268
+ } from "./chunk-61dmxexa.js";
273
269
  import {
274
270
  map,
275
271
  makeEquivalence,
272
+ Clock,
273
+ currentTimeMillis,
274
+ bytes,
276
275
  BadArgument,
277
276
  systemError,
278
277
  badArgument,
@@ -336,7 +335,7 @@ import {
336
335
  optionalEnv,
337
336
  harnessesUnsupportedInSrt2,
338
337
  harnessesUnsupportedInDocker2
339
- } from "./chunk-z59pvcbk.js";
338
+ } from "./chunk-z0gqrc8c.js";
340
339
  import {
341
340
  ExitCode,
342
341
  ProcessId,
@@ -347,7 +346,7 @@ import {
347
346
  make2,
348
347
  parseFdName,
349
348
  fdName
350
- } from "./chunk-vh2a72d1.js";
349
+ } from "./chunk-er0e8d8v.js";
351
350
  import {
352
351
  isDateTime,
353
352
  Numeric,
@@ -360,14 +359,11 @@ import {
360
359
  SecretScope,
361
360
  SecretHosts,
362
361
  isSecretReference
363
- } from "./chunk-r2kzvdrg.js";
362
+ } from "./chunk-rbpn35g5.js";
363
+
364
364
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
365
365
  var makeEquivalence3 = Tuple;
366
366
 
367
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
368
- var Clock = ClockRef;
369
- var currentTimeMillis = currentTimeMillis2;
370
-
371
367
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/dateTime.js
372
368
  var TypeId = "~effect/DateTime";
373
369
  var TimeZoneTypeId = "~effect/DateTime/TimeZone";
@@ -901,6 +897,15 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
901
897
  // node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
902
898
  var runMain = runMain2;
903
899
 
900
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
901
+ var BigInt2 = globalThis.BigInt;
902
+ var toNumber = (b) => {
903
+ if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
904
+ return none();
905
+ }
906
+ return some(Number(b));
907
+ };
908
+
904
909
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
905
910
  var makeUnsafe = makeUnsafe6;
906
911
  var make18 = make3;
@@ -17850,4 +17855,4 @@ function serviceChecks(declaration) {
17850
17855
  return decoded === undefined || decoded.services.length === 0 ? [] : [...new Set(decoded.checks ?? [])];
17851
17856
  }
17852
17857
 
17853
- export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, RepoBindingProvider, findForbiddenRepoBindingSecretPath, releaseVersion, ReleaseScope, isBranchName, baseBranchLayerWords, repositoryKey, loopInputFields, InputSourceLayers, InputSource, inputSourceWords, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, tokensSpent, tokenCountWords, endsFailing, outlineText, anyFailure, goesOn, outlineMermaid, runOutlineText, isTestReportName, testDigest, failedTestOfLine, printedNotReported, failedTestsOf, testOutcomes, checkTests, loopSafeTextMaxLength, recommendedDefault, reportedModelName, RunDisplayStates, RunWaitUntils, calverNumbers, compareCalver, DeliveryMode, defaultDeployCommand, ProgramWorkUnit, MeasureSample, MeasureEvidence, TagVersions, compareCommitMax, commitMessageMax, commandTimeoutMillisDefault, commandTextLimit, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, DeployTargetName, DeployRef, DeployStatus, runsDeployedTag, Deploy, DeployTargetRunning, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, ClaimResult, mergeTurnResource, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make4, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, stepFallbackWords, runTicketsPayload, runTicketResult, ticketOutcomeLabels, runGraphLayout, KitDigest, defaultKitName, LoopCapabilities, LoopManifest, CallableLoop, AgentDeclaration, StepManifest, KitDeclarations, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make5, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make6, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, antigravityPlugins, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices, serviceChecks };
17858
+ export { WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, RepoBindingProvider, findForbiddenRepoBindingSecretPath, releaseVersion, ReleaseScope, isBranchName, baseBranchLayerWords, repositoryKey, loopInputFields, InputSourceLayers, InputSource, inputSourceWords, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, tokensSpent, tokenCountWords, endsFailing, outlineText, anyFailure, goesOn, outlineMermaid, runOutlineText, isTestReportName, testDigest, failedTestOfLine, printedNotReported, failedTestsOf, testOutcomes, checkTests, loopSafeTextMaxLength, recommendedDefault, reportedModelName, RunDisplayStates, RunWaitUntils, calverNumbers, compareCalver, DeliveryMode, defaultDeployCommand, ProgramWorkUnit, MeasureSample, MeasureEvidence, TagVersions, compareCommitMax, commitMessageMax, commandTimeoutMillisDefault, commandTextLimit, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, DeployTargetName, DeployRef, DeployStatus, runsDeployedTag, Deploy, DeployTargetRunning, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, ClaimResult, mergeTurnResource, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make4, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, stepFallbackWords, runTicketsPayload, runTicketResult, ticketOutcomeLabels, runGraphLayout, KitDigest, defaultKitName, LoopCapabilities, LoopManifest, CallableLoop, AgentDeclaration, StepManifest, KitDeclarations, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make5, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make6, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, antigravityPlugins, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices, serviceChecks };
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-y64ssczv.js";
16
+ } from "./chunk-61dmxexa.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-r2kzvdrg.js";
20
+ } from "./chunk-rbpn35g5.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -15,8 +15,8 @@ import {
15
15
  writeSrtSettings2,
16
16
  srtStepArgv2,
17
17
  srtArgv2
18
- } from "./chunk-z59pvcbk.js";
19
- import"./chunk-y64ssczv.js";
18
+ } from "./chunk-z0gqrc8c.js";
19
+ import"./chunk-61dmxexa.js";
20
20
  export {
21
21
  compiled2 as compiled,
22
22
  harnessesUnsupportedInDocker2 as harnessesUnsupportedInDocker,
@@ -96,8 +96,9 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-y64ssczv.js";
99
+ } from "./chunk-61dmxexa.js";
100
100
  import {
101
+ Clock,
101
102
  interrupt,
102
103
  getCurrent,
103
104
  makeUnsafe2,
@@ -108,9 +109,8 @@ import {
108
109
  shutdownUnsafe,
109
110
  fromQueue,
110
111
  unwrap
111
- } from "./chunk-z59pvcbk.js";
112
+ } from "./chunk-z0gqrc8c.js";
112
113
  import {
113
- Clock,
114
114
  empty,
115
115
  fromInput,
116
116
  merge,
@@ -123,7 +123,7 @@ import {
123
123
  ParseOptions,
124
124
  RpcClientDefect,
125
125
  RpcClientError
126
- } from "./chunk-xxcxramy.js";
126
+ } from "./chunk-nb6h112w.js";
127
127
 
128
128
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
129
129
  class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
@@ -18,7 +18,7 @@ import {
18
18
  isMinLength,
19
19
  isMaxLength,
20
20
  FiniteFromString
21
- } from "./chunk-y64ssczv.js";
21
+ } from "./chunk-61dmxexa.js";
22
22
 
23
23
  // packages/core/src/schema.ts
24
24
  var Days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-vh2a72d1.js";
2
+ import"./chunk-er0e8d8v.js";
3
3
  import {
4
4
  HERDR_CORE_GENERATION2,
5
5
  HERDR_CORE_INSTALL_COMMAND2,
@@ -12,9 +12,9 @@ import {
12
12
  herdrCoreLayer2,
13
13
  herdrCoreTransportLayer2,
14
14
  updateHerdrCore2
15
- } from "./chunk-xxcxramy.js";
16
- import"./chunk-z59pvcbk.js";
17
- import"./chunk-y64ssczv.js";
15
+ } from "./chunk-nb6h112w.js";
16
+ import"./chunk-z0gqrc8c.js";
17
+ import"./chunk-61dmxexa.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
20
20
  HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
@@ -172,9 +172,8 @@ import {
172
172
  decodeJsonStringSync,
173
173
  encodeUnknownJsonStringSync,
174
174
  storable
175
- } from "./chunk-y64ssczv.js";
175
+ } from "./chunk-61dmxexa.js";
176
176
  import {
177
- currentTimeMillis,
178
177
  SecureRandom,
179
178
  layerWebCrypto,
180
179
  layer,
@@ -261,8 +260,9 @@ import {
261
260
  checkServicesFile,
262
261
  checkServices,
263
262
  serviceChecks
264
- } from "./chunk-xxcxramy.js";
263
+ } from "./chunk-nb6h112w.js";
265
264
  import {
265
+ currentTimeMillis,
266
266
  join,
267
267
  interrupt,
268
268
  unbounded,
@@ -307,7 +307,7 @@ import {
307
307
  writeSrtSettings2,
308
308
  srtStepArgv2,
309
309
  srtArgv2
310
- } from "./chunk-z59pvcbk.js";
310
+ } from "./chunk-z0gqrc8c.js";
311
311
  import {
312
312
  writeAgentEnvironmentConfigFile2,
313
313
  readManifestSkillPaths2,
@@ -323,12 +323,8 @@ import {
323
323
  applyAgentEnvironmentMaterialization2,
324
324
  isPathWithin2,
325
325
  skillIdentity2
326
- } from "./chunk-s4r49vbj.js";
327
- import"./chunk-9yvknsnj.js";
328
- import {
329
- ChildProcessSpawner,
330
- make2
331
- } from "./chunk-vh2a72d1.js";
326
+ } from "./chunk-awx0zevr.js";
327
+ import"./chunk-abyssa8p.js";
332
328
  import {
333
329
  egressAllowed,
334
330
  writeSecretRegistry,
@@ -338,33 +334,39 @@ import {
338
334
  secretFilter2,
339
335
  opaqueTunnelRefusal2,
340
336
  isOpaqueConnectReason2
341
- } from "./chunk-zy21drtv.js";
337
+ } from "./chunk-q8e58p57.js";
342
338
  import {
343
339
  sliceBytes2,
344
340
  maxLineBytes2,
345
341
  linesPerTurn2,
346
342
  decodedOption2,
347
343
  decoded2,
348
- readOpencode2
349
- } from "./chunk-kx8rpa62.js";
344
+ lookAtOpencode2,
345
+ readOpencode2,
346
+ databaseStamp2
347
+ } from "./chunk-56gs4z53.js";
350
348
  import {
351
349
  uploadRunFile,
352
350
  programLease,
353
351
  rpcRunFiles,
354
352
  programHostsEnv,
355
353
  undeclaredHostsEnv
356
- } from "./chunk-njgay1ed.js";
357
- import"./chunk-qbrkeg49.js";
354
+ } from "./chunk-acmyagwp.js";
355
+ import"./chunk-3cneth9k.js";
358
356
  import {
359
357
  nextInt
360
- } from "./chunk-m1qp6swh.js";
361
- import"./chunk-pd3azxev.js";
362
- import"./chunk-5qrjf4xq.js";
358
+ } from "./chunk-znhjs0t6.js";
359
+ import"./chunk-1hgsf81a.js";
360
+ import {
361
+ ChildProcessSpawner,
362
+ make2
363
+ } from "./chunk-er0e8d8v.js";
364
+ import"./chunk-r3mjxsmn.js";
363
365
  import {
364
366
  Id,
365
367
  secretReference,
366
368
  secretPlaceholder
367
- } from "./chunk-r2kzvdrg.js";
369
+ } from "./chunk-rbpn35g5.js";
368
370
 
369
371
  // packages/core/src/sync-kit.ts
370
372
  import { createHash } from "crypto";
@@ -3901,6 +3903,13 @@ var transcriptSource = (adapter, place) => gen(function* () {
3901
3903
  const store = place.configDir !== undefined && sandboxed !== undefined && (yield* fs.exists(`${place.configDir}/${sandboxed}`)) ? { database: `${place.configDir}/${sandboxed}`, confinedTo: place.configDir } : place.confinedTo === undefined ? { database: `${place.home}/${adapter.sessionDatabase}` } : undefined;
3902
3904
  if (store === undefined || !(yield* fs.exists(store.database)))
3903
3905
  return;
3906
+ if (store.confinedTo !== undefined)
3907
+ return {
3908
+ kind: "opencode_database",
3909
+ ...store,
3910
+ worktree: place.worktree,
3911
+ startedAt: place.startedAt ?? 0
3912
+ };
3904
3913
  const session = yield* readOpencode2(store, "newestSession", {
3905
3914
  worktree: place.worktree,
3906
3915
  startedAt: place.startedAt ?? 0
@@ -5772,6 +5781,7 @@ var batchSize = 100;
5772
5781
  var maxEventsPerLine = 1024;
5773
5782
  var maxBatchChars = 2 * 1024 * 1024;
5774
5783
  var maxUnsentChars = 16 * 1024 * 1024;
5784
+ var maxFailedLooks = 3;
5775
5785
  var maxFailingMillis = 30000;
5776
5786
  var firstResendMillis = 1000;
5777
5787
  var longestResendMillis = 30000;
@@ -6318,6 +6328,7 @@ var opencodeV2Part = (part) => {
6318
6328
  }
6319
6329
  };
6320
6330
  };
6331
+ var sandboxed = (source) => source.kind !== "file" && source.confinedTo !== undefined;
6321
6332
  var transcriptRelay = (input) => {
6322
6333
  const normalize = sessionNormalizer(input.harness);
6323
6334
  const tokens = tokenCounter(input.harness);
@@ -6345,6 +6356,12 @@ var transcriptRelay = (input) => {
6345
6356
  let refusal;
6346
6357
  let harnessError;
6347
6358
  let codexLimits;
6359
+ let lookedAt;
6360
+ let stampSeen;
6361
+ let failedAt;
6362
+ let failedLooks = 0;
6363
+ let lookedAtExtent;
6364
+ let found;
6348
6365
  let errorReadAt;
6349
6366
  let opencodeModel;
6350
6367
  const namedModel = (named) => {
@@ -6561,6 +6578,76 @@ var transcriptRelay = (input) => {
6561
6578
  openMessage.clear();
6562
6579
  closedTo = seq;
6563
6580
  }).pipe(uninterruptible);
6581
+ const sawFrame = (frame) => gen(function* () {
6582
+ switch (frame.kind) {
6583
+ case "found":
6584
+ found = frame.session ?? undefined;
6585
+ return true;
6586
+ case "extent":
6587
+ lookedAtExtent = frame.extent;
6588
+ yield* sawSession(frame.extent);
6589
+ return true;
6590
+ case "error":
6591
+ heard(opencodeProviderRefusal(frame.error));
6592
+ return true;
6593
+ case "model":
6594
+ namedModel(frame.model);
6595
+ errorReadAt = lookedAtExtent;
6596
+ return true;
6597
+ case "unsaid":
6598
+ yield* logWarning("runner_transcript_unread", frame.reason);
6599
+ return true;
6600
+ case "messages":
6601
+ for (const message of frame.messages)
6602
+ yield* sawMessage(message);
6603
+ break;
6604
+ case "open":
6605
+ for (const part of frame.parts)
6606
+ yield* uninterruptible(sawPart(part));
6607
+ break;
6608
+ case "past":
6609
+ for (const part of frame.parts)
6610
+ yield* sawPart(part).pipe(andThen2(sync2(() => {
6611
+ recordedTo = part.position;
6612
+ })), uninterruptible);
6613
+ }
6614
+ yield* flush;
6615
+ yield* yieldNow;
6616
+ return !backedUp();
6617
+ });
6618
+ const lookAt = (source) => gen(function* () {
6619
+ const { stamp, settled } = yield* databaseStamp2(source.database);
6620
+ const changed = stamp !== stampSeen;
6621
+ stampSeen = stamp;
6622
+ if (backedUp())
6623
+ yield* flush;
6624
+ if (backedUp()) {
6625
+ if (changed)
6626
+ progressAt = yield* currentTimeMillis;
6627
+ return;
6628
+ }
6629
+ if (settled && stamp === lookedAt)
6630
+ return;
6631
+ const sessionId = source.kind === "opencode_database" ? found?.id : source.sessionId;
6632
+ const whole = yield* lookAtOpencode2({
6633
+ database: source.database,
6634
+ confinedTo: source.confinedTo,
6635
+ ...sessionId === undefined ? undefined : { sessionId }
6636
+ }, {
6637
+ ...source.kind !== "opencode_database" ? { kind: source.kind } : found === undefined ? { find: { worktree: source.worktree, startedAt: source.startedAt } } : { kind: found.kind },
6638
+ closedTo,
6639
+ saidAt: errorReadAt ?? null,
6640
+ open: [...stages.keys()],
6641
+ recordedTo
6642
+ }, sawFrame).pipe(tapError2(() => sync2(() => {
6643
+ failedLooks = failedAt === stamp ? failedLooks + 1 : 1;
6644
+ failedAt = stamp;
6645
+ if (failedLooks >= maxFailedLooks)
6646
+ lookedAt = stamp;
6647
+ })));
6648
+ if (whole && settled)
6649
+ lookedAt = stamp;
6650
+ });
6564
6651
  const takeMessages = (source) => gen(function* () {
6565
6652
  const start = closedTo;
6566
6653
  for (const message of yield* readOpencode2(source, "messagesPast", { seq: closedTo }))
@@ -6585,6 +6672,8 @@ var transcriptRelay = (input) => {
6585
6672
  return tokensSpent([own, ...spent]) ?? "none";
6586
6673
  }),
6587
6674
  read: (source) => gen(function* () {
6675
+ if (sandboxed(source))
6676
+ return yield* lookAt(source);
6588
6677
  if (source.kind === "opencode_v2") {
6589
6678
  const extent = yield* readOpencode2(source, "extent", {});
6590
6679
  yield* sawSession(extent);