hinacode 0.3.0-alpha.13 → 0.3.0-alpha.14

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.
@@ -15986,7 +15986,7 @@ function defaultShouldQuit(input) {
15986
15986
  }
15987
15987
  const layer$1 = layer$2;
15988
15988
  const layer = /* @__PURE__ */ provideMerge(layer$b, /* @__PURE__ */ mergeAll$1(layer$7, layer$9, layer$5, layer$3, layer$1));
15989
- const version = "0.3.0-alpha.13";
15989
+ const version = "0.3.0-alpha.14";
15990
15990
  const packageJson = {
15991
15991
  version
15992
15992
  };
@@ -21609,7 +21609,7 @@ const RpcMethods = {
21609
21609
  "subagents.list": rpc(Struct({ threadId: String$1 }), ArraySchema(Subagent)),
21610
21610
  "subagents.stop": rpc(Struct({ threadId: String$1, subagentId: String$1 }), Void2),
21611
21611
  "subagents.transcript": rpc(
21612
- Struct({ threadId: String$1, callId: String$1 }),
21612
+ Struct({ threadId: String$1, callId: String$1, compact: optional(Boolean$1) }),
21613
21613
  Struct({
21614
21614
  spawn: NullOr(MessagePart),
21615
21615
  calls: ArraySchema(MessagePart),
@@ -22898,13 +22898,13 @@ export {
22898
22898
  PullRequestWatch as im,
22899
22899
  PullRequestLink as io,
22900
22900
  allWatchEventKinds as ip,
22901
- enabledProviders as iq,
22902
- transcriptThreadId$1 as ir,
22903
- resumeGraceMs as is,
22904
- fail$2 as it,
22905
- isDoneUnsafe as iu,
22906
- filter$2 as iv,
22907
- WAIT_AGENT_TOOL as iw,
22901
+ WAIT_AGENT_TOOL as iq,
22902
+ enabledProviders as ir,
22903
+ transcriptThreadId$1 as is,
22904
+ resumeGraceMs as it,
22905
+ fail$2 as iu,
22906
+ isDoneUnsafe as iv,
22907
+ filter$2 as iw,
22908
22908
  startingProvider as ix,
22909
22909
  kilobytes as iy,
22910
22910
  monotonicTimeNanos as iz,
package/out/server/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __createRequire } from "node:module";
2
2
  globalThis.require ??= __createRequire(import.meta.url);
3
- import { d as dual, r as runFork, t as tapCause, h as hasInterruptsOnly, v as void_, s as squash, l as logError, c as constVoid, i as isEffect, a as isSuccess, w as withFiber, C as ConsoleRef, b as sync, T as TaggedError, A as ArraySchema, S as String$6, U as Union, e as hasProperty, o as optional$3, L as Literal, f as optionalKey, D as Defect, g as format, j as toCodecStringTree, k as decodeUnknownEffect, m as identity, n as succeed$2, p as fail, q as is, u as TrueLiterals, F as FalseLiterals, x as mapError, B as BooleanLiterals, I as Int$4, R as Reference, y as fnUntraced, z as scoped, Q as QuitError, E as Terminal, G as cached, H as suspend, P as Prototype, J as getOrElse, K as some, M as match, N as none, O as make$2, V as map$2, W as taggedEnum, X as match$1, Y as map$3, Z as isSome, _ as flatMap$1, $ as sync$1, a0 as empty, a1 as reduce, a2 as pipe, a3 as match$2, a4 as findFirstIndex, a5 as findFirst, a6 as findLast, a7 as isReadonlyArrayNonEmpty, a8 as ensuring, a9 as orDie, aa as take, ab as raceFirst, ac as round, ad as pipeArguments, ae as catchTags, af as fromUndefinedOr, ag as isNotUndefined, ah as getOrUndefined, ai as assignProperty, aj as Service, ak as empty$1, al as exists, am as gen, an as isNone, ao as succeed$3, ap as value, aq as provideService, ar as Stdio, as as catchFilter, at as isQuitError, au as succeed$4, av as fail$1, aw as interrupt, ax as andThen, ay as catchTag, az as result, aA as make$3, aB as provideContext, aC as MinimumLogLevel, aD as Struct, aE as ApprovalRequest, aF as QuestionRequest, aG as SecretRequest, aH as Thread, aI as TaggedError$1, aJ as seconds, aK as decodeUnknownExit, aL as fromJsonString, aM as ServerFrame, aN as acquireRelease, aO as unbounded, aP as endUnsafe, aQ as encodeUnknownEffect, aR as RpcMethods, aS as timeoutOrElse, aT as callback, aU as methodKind, aV as offerUnsafe, aW as WebSocket, aX as REMOTE_PATH, aY as REMOTE_MAX_FRAME_BYTES, aZ as succeedNone, a_ as cliSocketPath, a$ as all, b0 as fromResult, b1 as Number$2, b2 as forEach, b3 as NullOr, b4 as Routine, b5 as AccessMode, b6 as ProviderId, b7 as promise, b8 as isFailure, b9 as toCheckoutTarget, ba as noticeEvents, bb as PushEvent, bc as ThreadStatus, bd as try_, be as as, bf as isThreadBusy, bg as tryPromise, bh as map$4, bi as packageJson, bj as tapError, bk as provide, bl as layer$1 } from "./chunks/remote-CbR5LZB6.js";
3
+ import { d as dual, r as runFork, t as tapCause, h as hasInterruptsOnly, v as void_, s as squash, l as logError, c as constVoid, i as isEffect, a as isSuccess, w as withFiber, C as ConsoleRef, b as sync, T as TaggedError, A as ArraySchema, S as String$6, U as Union, e as hasProperty, o as optional$3, L as Literal, f as optionalKey, D as Defect, g as format, j as toCodecStringTree, k as decodeUnknownEffect, m as identity, n as succeed$2, p as fail, q as is, u as TrueLiterals, F as FalseLiterals, x as mapError, B as BooleanLiterals, I as Int$4, R as Reference, y as fnUntraced, z as scoped, Q as QuitError, E as Terminal, G as cached, H as suspend, P as Prototype, J as getOrElse, K as some, M as match, N as none, O as make$2, V as map$2, W as taggedEnum, X as match$1, Y as map$3, Z as isSome, _ as flatMap$1, $ as sync$1, a0 as empty, a1 as reduce, a2 as pipe, a3 as match$2, a4 as findFirstIndex, a5 as findFirst, a6 as findLast, a7 as isReadonlyArrayNonEmpty, a8 as ensuring, a9 as orDie, aa as take, ab as raceFirst, ac as round, ad as pipeArguments, ae as catchTags, af as fromUndefinedOr, ag as isNotUndefined, ah as getOrUndefined, ai as assignProperty, aj as Service, ak as empty$1, al as exists, am as gen, an as isNone, ao as succeed$3, ap as value, aq as provideService, ar as Stdio, as as catchFilter, at as isQuitError, au as succeed$4, av as fail$1, aw as interrupt, ax as andThen, ay as catchTag, az as result, aA as make$3, aB as provideContext, aC as MinimumLogLevel, aD as Struct, aE as ApprovalRequest, aF as QuestionRequest, aG as SecretRequest, aH as Thread, aI as TaggedError$1, aJ as seconds, aK as decodeUnknownExit, aL as fromJsonString, aM as ServerFrame, aN as acquireRelease, aO as unbounded, aP as endUnsafe, aQ as encodeUnknownEffect, aR as RpcMethods, aS as timeoutOrElse, aT as callback, aU as methodKind, aV as offerUnsafe, aW as WebSocket, aX as REMOTE_PATH, aY as REMOTE_MAX_FRAME_BYTES, aZ as succeedNone, a_ as cliSocketPath, a$ as all, b0 as fromResult, b1 as Number$2, b2 as forEach, b3 as NullOr, b4 as Routine, b5 as AccessMode, b6 as ProviderId, b7 as promise, b8 as isFailure, b9 as toCheckoutTarget, ba as noticeEvents, bb as PushEvent, bc as ThreadStatus, bd as try_, be as as, bf as isThreadBusy, bg as tryPromise, bh as map$4, bi as packageJson, bj as tapError, bk as provide, bl as layer$1 } from "./chunks/remote-CuntvZqY.js";
4
4
  import { homedir } from "node:os";
5
5
  import { resolve, sep, join } from "node:path";
6
6
  import { randomUUID } from "node:crypto";
@@ -7,7 +7,7 @@ import { homedir, tmpdir, networkInterfaces, hostname, userInfo, loadavg, cpus,
7
7
  import path__default, { join as join$1, sep, resolve as resolve$1, basename, relative, dirname, isAbsolute, extname, delimiter } from "node:path";
8
8
  import { isSea } from "node:sea";
9
9
  import NodeUrl__default, { fileURLToPath } from "node:url";
10
- import { d as dual, ai as assignProperty, b8 as isFailure, au as succeed, av as fail$1, K as some, N as none, bm as hash, bn as equals, ad as pipeArguments, bo as NodeInspectSymbol, bp as toJson, g as format$2, Z as isSome, bq as withFiber, br as uninterruptibleMask, bs as get$7, bt as Scope, bu as flow$1, bv as fromInputUnsafe, bw as constant, bx as zero, be as as, by as addFinalizerExit, v as void_, b2 as forEach, bz as exit, bA as tap$1, $ as sync, aw as interrupt, p as fail$2, bB as ExceededCapacityError, bC as makeUnsafe$5, bD as makeUnsafe$6, bE as makeUnsafe$7, H as suspend, bF as runForkWith, bG as runIn, bH as hasInterrupts, bI as doneUnsafe, bJ as getUnsafe$1, bK as addFinalizer, ax as andThen, bL as _await, bM as getCurrent, bN as interrupt$1, bO as close, bP as isZero, bQ as isFinite$1, bR as Clock, bS as toMillis, _ as flatMap, bT as millis, a8 as ensuring, bU as void_$1, bV as getOrThrow, e as hasProperty, bW as BaseProto, aI as TaggedError, bX as Error$1, bY as toSeconds, bZ as symbol$2, b_ as structure, b$ as symbol$3, c0 as redact$1, c1 as symbolRedactable, O as make$1p, R as Reference, c2 as strictEqual, c3 as map$1, c4 as try_, c5 as flatMap$1, c6 as combine, c7 as string$2, c8 as number$4, c9 as optimize, ca as contextWith, w as withFiber$1, b as sync$1, cb as infinity, cc as PipeInspectableProto, cd as updateContext, ce as merge$4, cf as succeed$1, cg as exitHasInterrupts, ch as ClockRef, ci as forkUnsafe, cj as onExitUnsafe, ck as void_$2, cl as fiberInterrupt, cm as fiberJoin, cn as filterMap, co as failVoid, cp as isGreaterThanOrEqualTo$1, cq as LogLevelOrder, aN as acquireRelease, i as isEffect, cr as interruptAs, n as succeed$2, r as runFork, cs as isFailure$1, h as hasInterruptsOnly, ct as into, cu as asVoid, cv as done, cw as filterInterruptors, cx as interruptAllAs, cy as interruptAll, cz as empty$5, cA as forkUnsafe$1, cB as runPromise, cC as runPromiseWith, cD as runPromiseExit, cE as runPromiseExitWith, cF as runSync, cG as runSyncWith, cH as runSyncExit, cI as runSyncExitWith, cJ as runCallback, cK as runCallbackWith, cL as makeMemoMapUnsafe, aB as provideContext, cM as buildWithMemoMap, cN as flatten, cO as await_, cP as scopeRemoveFinalizerUnsafe, cQ as die, cR as isResult, cS as isSuccess$1, m as identity, cT as set$5, cU as make$1q, cV as effect, aj as Service$1, cW as contextWith$1, cX as getOrUndefined, am as gen, cY as context, cZ as make$1r, V as map$2, c_ as fromQueue, c$ as unwrap, aq as provideService, d0 as onExit, d1 as failCauseUnsafe, aV as offerUnsafe, T as TaggedError$1, U as Union, S as String$1, o as optional$7, D as Defect, P as Prototype, d2 as makeSpanUnsafe, d3 as TracerTimingEnabled, d4 as endSpan, d5 as makeSpanScoped, d6 as useSpan, d7 as constUndefined, d8 as provideService$1, d9 as ParentSpan, z as scoped, t as tapCause, y as fnUntraced, da as serviceOption, a3 as match, db as make$1s, dc as provide$1, dd as onError, de as catchIf, df as scope$1, dg as getOption, dh as onExitPrimitive, a as isSuccess$2, di as catchCause, dj as matchCauseEffect, dk as failCause, dl as combine$1, a9 as orDie, dm as add$1, dn as makeUnsafe$8, dp as fromReasons, dq as isFailReason, dr as makeDieReason, ds as reasonAnnotations, dt as failCause$1, du as yieldNow, dv as constTrue, dw as normalizeNonEmpty, dx as unbounded, dy as publishUnsafe, dz as fromPubSub, dA as getDefaultExportFromCjs, a$ as all$1, M as match$1, b7 as promise$1, b6 as ProviderId, dB as now, dC as formatIso, a2 as pipe$2, dD as sort, Y as map$3, dE as flatMapNullishOr, dF as catch_, bh as map$4, dG as fromNullishOr, x as mapError, dH as logDebug, dI as annotateLogs, dJ as withSpan, ay as catchTag, dK as logInfo, dL as catchDefect, dM as filterOrFail, dN as make$1t, dO as Number$1, dP as encodeEffect, k as decodeUnknownEffect, aZ as succeedNone, a7 as isReadonlyArrayNonEmpty, dQ as asSome, dR as mutable, A as ArraySchema, dS as NoSuchElementError, dT as Literals, b1 as Number$2, b3 as NullOr, aD as Struct, dU as FileSystem, dV as orElseSucceed, dW as chatFolder, dX as Boolean$1, dY as ProjectKind, dZ as ignore$1, d_ as logWarning, aT as callback, d$ as sleep$3, e0 as forkDetach, e1 as signedOutFailure, e2 as succeed$3, e3 as decodeUnknownOption, an as isNone, aL as fromJsonString, L as Literal, e4 as Unknown, e5 as toArray, aJ as seconds, f as optionalKey, e6 as cachedWithTTL, e7 as minutes, aO as unbounded$1, e8 as toAsyncIterable, bg as tryPromise, e9 as timeout, ea as addFinalizer$1, eb as callback$1, ec as offer, ed as withPermit, ee as acquireUseRelease, aP as endUnsafe, ef as shutdownUnsafe, eg as make$1u, bd as try_$1, bj as tapError, eh as forkIn, ei as fromAsyncIterable, ej as runForEach, s as squash, ek as CLAUDE_EFFORT_LEVELS, el as ensuring$1, em as currentTimeMillis, en as sum, eo as race, ep as publishedArtifactId, eq as PUBLISH_DOCUMENT_TOOL, er as PUBLISH_ARTIFACT_TOOL, es as PUBLISH_WHITEBOARD_TOOL, et as isDone, eu as empty$6, ev as succeed$4, ew as fromIterable$2, ex as flatMap$2, ey as interruptWhen, ez as concat, eA as fromEffectDrain, eB as fromEffect, eC as fromIterableEffect, eD as suspend$1, eE as unlistedModel, eF as make$1v, eG as tap$2, eH as tick, eI as map$5, eJ as drop, eK as merge$5, eL as onInterrupt, aS as timeoutOrElse, eM as format$3, eN as getOrNull, eO as Record, eP as make$1w, aa as take, eQ as join$2, ab as raceFirst, eR as end, eS as takeUnsafe, eT as forkScoped, eU as isObject$2, J as getOrElse, eV as repeat, ao as succeed$5, eW as subscribe, eX as fromSubscription, eY as applySettingsPatch, eZ as publish, e_ as defaultSettings, e$ as Settings$2, f0 as vmProviderBeforeTheChoice, f1 as flatMapNullishOr$1, f2 as option, f3 as delay, f4 as isTailscaleHost, f5 as PRIVATE_NETWORKS, f6 as RelayHostList, f7 as RelayMachineList, f8 as encodeSync, f9 as mergeAll, bb as PushEvent, fa as makeUnsafe$9, fb as effectDiscard, fc as changes$1, fd as Void, fe as AppConnection, ff as decodeEffect, fg as toCodecJson, fh as RecordFromUrlParams, fi as decodeTo, fj as externalSpan, fk as isOption, fl as isExit, af as fromUndefinedOr, fm as zero$1, fn as fromInput$1, fo as badArgument, fp as isSchemaError, fq as isNoSuchElementError, fr as StackTrace, fs as mapEager, ft as updateContext$1, fu as makeUnsafe$a, fv as tag$2, fw as Error$2, I as Int, fx as fromInputUnsafe$1, fy as Path, fz as run$5, fA as mebibytes, fB as Class, fC as constFalse, fD as withLogSpan, fE as log, ah as getOrUndefined$1, fF as Tracer, fG as nativeTracer, fH as hasInterrupts$1, fI as succeed$6, fJ as setStackTraceLimit, fK as fail$3, fL as getStackTraceLimit, fM as fiberEnterUninterruptibleUnsafe, fN as contA, fO as effectIsExit, fP as closeUnsafe, fQ as contE, fR as reportCauseUnsafe, fS as matchCauseEffectEager, fT as flatMapEager, fU as provideMerge, fV as fromInput$2, fW as fromReadable, fX as toArrayBuffer, G as cached$1, fY as provide$2, fZ as layer$X, f_ as pipeThroughDuplex, f$ as toUint8Array, bl as layer$Y, b0 as fromResult, g0 as WebSocketServer, g1 as orDie$1, g2 as runForEachArray, g3 as interruptible, g4 as die$1, g5 as Duration, g6 as DateTimeUtc, g7 as withConstructorDefault, g8 as withDecodingDefault, g9 as Redacted, ga as Tuple, gb as isRedacted, gc as MutableJson, ag as isNotUndefined, gd as Never, ak as empty$7, ge as toJsonSchemaDocument, gf as effectContext, gg as annotateCurrentSpan, gh as isUndefined, az as result$1, gi as failCause$2, gj as forkChild, gk as catch_$1, gl as isSchemaError$1, gm as failCause$3, gn as mapEffect, go as onEnd, gp as isSchema, aQ as encodeUnknownEffect, gq as annotate, gr as fail$4, aA as make$1x, gs as make$1y, gt as declare, gu as isStream, gv as Class$1, gw as Exit, gx as getOrUndefinedUnsafe, bk as provide$3, gy as provideContext$1, gz as Opaque, gA as StructWithRest, gB as JsonObject$3, gC as transformOptional, gD as flatMap$3, gE as toType, gF as Any, gG as UndefinedOr, gH as Finite, gI as passthrough, gJ as Uint8ArrayFromBase64, gK as Json, gL as TemplateLiteral, gM as decode$3, gN as withDefault, gO as isBetween, W as taggedEnum, gP as take$1, gQ as isNullish, gR as isString, gS as never$1, gT as bounded, gU as withParentSpan, gV as die$2, gW as offerAll, gX as decodeSync, l as logError, gY as NonEmptyArray, gZ as interrupt$2, g_ as interruptors, g$ as catchCauseIf, h0 as decode$4, h1 as decodeUnknownResult, h2 as fn, h3 as isTagged, h4 as isReadonlyObject, h5 as IllegalArgumentError, h6 as encode$1, h7 as omit$1, h8 as merge$6, h9 as succeedContext, ha as unwrap$1, hb as CurrentMemoMap, hc as fromIterable$3, hd as reverse, a0 as empty$8, he as withFiberSucceed, hf as fiberEnterInterruptibleUnsafe, hg as compose$1, hh as collect, hi as catchDone, hj as takeAll, hk as fromArray, hl as whileLoop, hm as matchEffect, hn as defaultFormatter, ho as logFatal, hp as isDeferred, hq as hasDies, c as constVoid, hr as shutdown, hs as Scheduler$1, ae as catchTags, ht as CurrentLogLevel, q as is$2, hu as UnknownFromJsonString, hv as ignoreCause, hw as forever, hx as Class$2, hy as TaggedStruct, hz as toEncoded, hA as isMaxLength, hB as makeFilter, hC as isPattern, hD as runLast, hE as fromOption, hF as decodeUnknownSync, hG as spawnsSubagent, hH as isPublishArtifactTool, hI as outputText, hJ as publishedArtifact, hK as toolArgument, hL as isPublishDocumentTool, hM as commonjsGlobal, hN as isRunAgentTool, hO as presetModels, hP as filter$1, hQ as take$2, hR as runDrain, hS as min, hT as ChildProcessSpawner, hU as make$1z, hV as mkString, hW as decodeText$1, hX as ForkPoint, hY as TokenUsage, hZ as MessagePart, h_ as Message, h$ as parseGitHubPullRequestUrl, i0 as PullRequestReviewer, i1 as PullRequestLabel, i2 as PullRequestComment, i3 as DiffSide, i4 as subtract, i5 as PULL_REQUEST_REFRESH, i6 as parseGitHubIssueUrl, i7 as parseGitHubRepository, i8 as request$2, i9 as Class$3, ia as AgentProfile, ib as AccountProviderId, ic as ProjectAction, id as Project, ie as BooleanFromBit, ig as Worktree, ih as timeoutOption, bf as isThreadBusy, bc as ThreadStatus, ii as ScheduledMessage, ij as QueuedMessage, ik as UsageLimit, aH as Thread, il as getOrThrow$1, im as PullRequestWatch, io as PullRequestLink, ip as allWatchEventKinds, iq as enabledProviders, ir as transcriptThreadId, is as resumeGraceMs, it as fail$5, iu as isDoneUnsafe, iv as filter$2, iw as WAIT_AGENT_TOOL, ix as startingProvider, iy as kilobytes, iz as monotonicTimeNanos, iA as retry$3, iB as spaced, iC as die$3, iD as snakeToCamel, iE as camelToSnake, iF as UpdatableProviderId, iG as filter$3, iH as AgentAccount, iI as schedule, aR as RpcMethods, iJ as BrowserFrame, iK as PagePick, iL as defaultClientSettings, iM as ClientSettings$1, iN as parsePairingUrl, iO as pairingUrl, aM as ServerFrame, iP as Environment, iQ as relayWebSocketUrl, iR as remoteWebSocketUrl, aW as WebSocket$1, iS as CHALLENGE_WAIT_MS, aU as methodKind, iT as dialPlan, iU as REMOTE_PROTOCOL_VERSION, iV as DIRECT_CHECK_INTERVAL_MS, iW as DIRECT_CHECK_TIMEOUT_MS, iX as next, iY as bytes, iZ as Timestamp, i_ as RoutineSchedule, i$ as RoutineRun, j0 as launch, j1 as uninterruptible, j2 as parseUnsafe, j3 as RoutineWorkspace, j4 as LinearIssue, j5 as when$2, j6 as threadDeviceId, j7 as shownScreen, j8 as devicePlatformOf, ap as value$2, j9 as BoatVmSize, ja as RUN_AGENT_TOOL, jb as ARTIFACT_THEME_GUIDE, jc as DeviceUrl, jd as DeviceApp, je as DeviceButton, jf as WatchEventKind, jg as GuideGroup, jh as PullRequestGuide, ji as flatten$1, jj as diskFullness, jk as pretty, jl as min$1, jm as exponential, jn as desktopOnlyPushes, jo as reachesPhone, jp as mutations, jq as desktopOnlyMethods, jr as isAddressNotUpYet, js as ClientFrame, aY as REMOTE_MAX_FRAME_BYTES, aX as REMOTE_PATH, jt as empty$9, a_ as cliSocketPath, ju as RemoteFeature, jv as BindHost, jw as getAugmentedNamespace, jx as make$1A, jy as NativeSpan, jz as currentTimeNanos, aC as MinimumLogLevel, bi as packageJson, jA as isPortInUse } from "./chunks/remote-CbR5LZB6.js";
10
+ import { d as dual, ai as assignProperty, b8 as isFailure, au as succeed, av as fail$1, K as some, N as none, bm as hash, bn as equals, ad as pipeArguments, bo as NodeInspectSymbol, bp as toJson, g as format$2, Z as isSome, bq as withFiber, br as uninterruptibleMask, bs as get$7, bt as Scope, bu as flow$1, bv as fromInputUnsafe, bw as constant, bx as zero, be as as, by as addFinalizerExit, v as void_, b2 as forEach, bz as exit, bA as tap$1, $ as sync, aw as interrupt, p as fail$2, bB as ExceededCapacityError, bC as makeUnsafe$5, bD as makeUnsafe$6, bE as makeUnsafe$7, H as suspend, bF as runForkWith, bG as runIn, bH as hasInterrupts, bI as doneUnsafe, bJ as getUnsafe$1, bK as addFinalizer, ax as andThen, bL as _await, bM as getCurrent, bN as interrupt$1, bO as close, bP as isZero, bQ as isFinite$1, bR as Clock, bS as toMillis, _ as flatMap, bT as millis, a8 as ensuring, bU as void_$1, bV as getOrThrow, e as hasProperty, bW as BaseProto, aI as TaggedError, bX as Error$1, bY as toSeconds, bZ as symbol$2, b_ as structure, b$ as symbol$3, c0 as redact$1, c1 as symbolRedactable, O as make$1p, R as Reference, c2 as strictEqual, c3 as map$1, c4 as try_, c5 as flatMap$1, c6 as combine, c7 as string$2, c8 as number$4, c9 as optimize, ca as contextWith, w as withFiber$1, b as sync$1, cb as infinity, cc as PipeInspectableProto, cd as updateContext, ce as merge$4, cf as succeed$1, cg as exitHasInterrupts, ch as ClockRef, ci as forkUnsafe, cj as onExitUnsafe, ck as void_$2, cl as fiberInterrupt, cm as fiberJoin, cn as filterMap, co as failVoid, cp as isGreaterThanOrEqualTo$1, cq as LogLevelOrder, aN as acquireRelease, i as isEffect, cr as interruptAs, n as succeed$2, r as runFork, cs as isFailure$1, h as hasInterruptsOnly, ct as into, cu as asVoid, cv as done, cw as filterInterruptors, cx as interruptAllAs, cy as interruptAll, cz as empty$5, cA as forkUnsafe$1, cB as runPromise, cC as runPromiseWith, cD as runPromiseExit, cE as runPromiseExitWith, cF as runSync, cG as runSyncWith, cH as runSyncExit, cI as runSyncExitWith, cJ as runCallback, cK as runCallbackWith, cL as makeMemoMapUnsafe, aB as provideContext, cM as buildWithMemoMap, cN as flatten, cO as await_, cP as scopeRemoveFinalizerUnsafe, cQ as die, cR as isResult, cS as isSuccess$1, m as identity, cT as set$5, cU as make$1q, cV as effect, aj as Service$1, cW as contextWith$1, cX as getOrUndefined, am as gen, cY as context, cZ as make$1r, V as map$2, c_ as fromQueue, c$ as unwrap, aq as provideService, d0 as onExit, d1 as failCauseUnsafe, aV as offerUnsafe, T as TaggedError$1, U as Union, S as String$1, o as optional$7, D as Defect, P as Prototype, d2 as makeSpanUnsafe, d3 as TracerTimingEnabled, d4 as endSpan, d5 as makeSpanScoped, d6 as useSpan, d7 as constUndefined, d8 as provideService$1, d9 as ParentSpan, z as scoped, t as tapCause, y as fnUntraced, da as serviceOption, a3 as match, db as make$1s, dc as provide$1, dd as onError, de as catchIf, df as scope$1, dg as getOption, dh as onExitPrimitive, a as isSuccess$2, di as catchCause, dj as matchCauseEffect, dk as failCause, dl as combine$1, a9 as orDie, dm as add$1, dn as makeUnsafe$8, dp as fromReasons, dq as isFailReason, dr as makeDieReason, ds as reasonAnnotations, dt as failCause$1, du as yieldNow, dv as constTrue, dw as normalizeNonEmpty, dx as unbounded, dy as publishUnsafe, dz as fromPubSub, dA as getDefaultExportFromCjs, a$ as all$1, M as match$1, b7 as promise$1, b6 as ProviderId, dB as now, dC as formatIso, a2 as pipe$2, dD as sort, Y as map$3, dE as flatMapNullishOr, dF as catch_, bh as map$4, dG as fromNullishOr, x as mapError, dH as logDebug, dI as annotateLogs, dJ as withSpan, ay as catchTag, dK as logInfo, dL as catchDefect, dM as filterOrFail, dN as make$1t, dO as Number$1, dP as encodeEffect, k as decodeUnknownEffect, aZ as succeedNone, a7 as isReadonlyArrayNonEmpty, dQ as asSome, dR as mutable, A as ArraySchema, dS as NoSuchElementError, dT as Literals, b1 as Number$2, b3 as NullOr, aD as Struct, dU as FileSystem, dV as orElseSucceed, dW as chatFolder, dX as Boolean$1, dY as ProjectKind, dZ as ignore$1, d_ as logWarning, aT as callback, d$ as sleep$3, e0 as forkDetach, e1 as signedOutFailure, e2 as succeed$3, e3 as decodeUnknownOption, an as isNone, aL as fromJsonString, L as Literal, e4 as Unknown, e5 as toArray, aJ as seconds, f as optionalKey, e6 as cachedWithTTL, e7 as minutes, aO as unbounded$1, e8 as toAsyncIterable, bg as tryPromise, e9 as timeout, ea as addFinalizer$1, eb as callback$1, ec as offer, ed as withPermit, ee as acquireUseRelease, aP as endUnsafe, ef as shutdownUnsafe, eg as make$1u, bd as try_$1, bj as tapError, eh as forkIn, ei as fromAsyncIterable, ej as runForEach, s as squash, ek as CLAUDE_EFFORT_LEVELS, el as ensuring$1, em as currentTimeMillis, en as sum, eo as race, ep as publishedArtifactId, eq as PUBLISH_DOCUMENT_TOOL, er as PUBLISH_ARTIFACT_TOOL, es as PUBLISH_WHITEBOARD_TOOL, et as isDone, eu as empty$6, ev as succeed$4, ew as fromIterable$2, ex as flatMap$2, ey as interruptWhen, ez as concat, eA as fromEffectDrain, eB as fromEffect, eC as fromIterableEffect, eD as suspend$1, eE as unlistedModel, eF as make$1v, eG as tap$2, eH as tick, eI as map$5, eJ as drop, eK as merge$5, eL as onInterrupt, aS as timeoutOrElse, eM as format$3, eN as getOrNull, eO as Record, eP as make$1w, aa as take, eQ as join$2, ab as raceFirst, eR as end, eS as takeUnsafe, eT as forkScoped, eU as isObject$2, J as getOrElse, eV as repeat, ao as succeed$5, eW as subscribe, eX as fromSubscription, eY as applySettingsPatch, eZ as publish, e_ as defaultSettings, e$ as Settings$2, f0 as vmProviderBeforeTheChoice, f1 as flatMapNullishOr$1, f2 as option, f3 as delay, f4 as isTailscaleHost, f5 as PRIVATE_NETWORKS, f6 as RelayHostList, f7 as RelayMachineList, f8 as encodeSync, f9 as mergeAll, bb as PushEvent, fa as makeUnsafe$9, fb as effectDiscard, fc as changes$1, fd as Void, fe as AppConnection, ff as decodeEffect, fg as toCodecJson, fh as RecordFromUrlParams, fi as decodeTo, fj as externalSpan, fk as isOption, fl as isExit, af as fromUndefinedOr, fm as zero$1, fn as fromInput$1, fo as badArgument, fp as isSchemaError, fq as isNoSuchElementError, fr as StackTrace, fs as mapEager, ft as updateContext$1, fu as makeUnsafe$a, fv as tag$2, fw as Error$2, I as Int, fx as fromInputUnsafe$1, fy as Path, fz as run$5, fA as mebibytes, fB as Class, fC as constFalse, fD as withLogSpan, fE as log, ah as getOrUndefined$1, fF as Tracer, fG as nativeTracer, fH as hasInterrupts$1, fI as succeed$6, fJ as setStackTraceLimit, fK as fail$3, fL as getStackTraceLimit, fM as fiberEnterUninterruptibleUnsafe, fN as contA, fO as effectIsExit, fP as closeUnsafe, fQ as contE, fR as reportCauseUnsafe, fS as matchCauseEffectEager, fT as flatMapEager, fU as provideMerge, fV as fromInput$2, fW as fromReadable, fX as toArrayBuffer, G as cached$1, fY as provide$2, fZ as layer$X, f_ as pipeThroughDuplex, f$ as toUint8Array, bl as layer$Y, b0 as fromResult, g0 as WebSocketServer, g1 as orDie$1, g2 as runForEachArray, g3 as interruptible, g4 as die$1, g5 as Duration, g6 as DateTimeUtc, g7 as withConstructorDefault, g8 as withDecodingDefault, g9 as Redacted, ga as Tuple, gb as isRedacted, gc as MutableJson, ag as isNotUndefined, gd as Never, ak as empty$7, ge as toJsonSchemaDocument, gf as effectContext, gg as annotateCurrentSpan, gh as isUndefined, az as result$1, gi as failCause$2, gj as forkChild, gk as catch_$1, gl as isSchemaError$1, gm as failCause$3, gn as mapEffect, go as onEnd, gp as isSchema, aQ as encodeUnknownEffect, gq as annotate, gr as fail$4, aA as make$1x, gs as make$1y, gt as declare, gu as isStream, gv as Class$1, gw as Exit, gx as getOrUndefinedUnsafe, bk as provide$3, gy as provideContext$1, gz as Opaque, gA as StructWithRest, gB as JsonObject$3, gC as transformOptional, gD as flatMap$3, gE as toType, gF as Any, gG as UndefinedOr, gH as Finite, gI as passthrough, gJ as Uint8ArrayFromBase64, gK as Json, gL as TemplateLiteral, gM as decode$3, gN as withDefault, gO as isBetween, W as taggedEnum, gP as take$1, gQ as isNullish, gR as isString, gS as never$1, gT as bounded, gU as withParentSpan, gV as die$2, gW as offerAll, gX as decodeSync, l as logError, gY as NonEmptyArray, gZ as interrupt$2, g_ as interruptors, g$ as catchCauseIf, h0 as decode$4, h1 as decodeUnknownResult, h2 as fn, h3 as isTagged, h4 as isReadonlyObject, h5 as IllegalArgumentError, h6 as encode$1, h7 as omit$1, h8 as merge$6, h9 as succeedContext, ha as unwrap$1, hb as CurrentMemoMap, hc as fromIterable$3, hd as reverse, a0 as empty$8, he as withFiberSucceed, hf as fiberEnterInterruptibleUnsafe, hg as compose$1, hh as collect, hi as catchDone, hj as takeAll, hk as fromArray, hl as whileLoop, hm as matchEffect, hn as defaultFormatter, ho as logFatal, hp as isDeferred, hq as hasDies, c as constVoid, hr as shutdown, hs as Scheduler$1, ae as catchTags, ht as CurrentLogLevel, q as is$2, hu as UnknownFromJsonString, hv as ignoreCause, hw as forever, hx as Class$2, hy as TaggedStruct, hz as toEncoded, hA as isMaxLength, hB as makeFilter, hC as isPattern, hD as runLast, hE as fromOption, hF as decodeUnknownSync, hG as spawnsSubagent, hH as isPublishArtifactTool, hI as outputText, hJ as publishedArtifact, hK as toolArgument, hL as isPublishDocumentTool, hM as commonjsGlobal, hN as isRunAgentTool, hO as presetModels, hP as filter$1, hQ as take$2, hR as runDrain, hS as min, hT as ChildProcessSpawner, hU as make$1z, hV as mkString, hW as decodeText$1, hX as ForkPoint, hY as TokenUsage, hZ as MessagePart, h_ as Message, h$ as parseGitHubPullRequestUrl, i0 as PullRequestReviewer, i1 as PullRequestLabel, i2 as PullRequestComment, i3 as DiffSide, i4 as subtract, i5 as PULL_REQUEST_REFRESH, i6 as parseGitHubIssueUrl, i7 as parseGitHubRepository, i8 as request$2, i9 as Class$3, ia as AgentProfile, ib as AccountProviderId, ic as ProjectAction, id as Project, ie as BooleanFromBit, ig as Worktree, ih as timeoutOption, bf as isThreadBusy, bc as ThreadStatus, ii as ScheduledMessage, ij as QueuedMessage, ik as UsageLimit, aH as Thread, il as getOrThrow$1, im as PullRequestWatch, io as PullRequestLink, ip as allWatchEventKinds, iq as WAIT_AGENT_TOOL, ir as enabledProviders, is as transcriptThreadId, it as resumeGraceMs, iu as fail$5, iv as isDoneUnsafe, iw as filter$2, ix as startingProvider, iy as kilobytes, iz as monotonicTimeNanos, iA as retry$3, iB as spaced, iC as die$3, iD as snakeToCamel, iE as camelToSnake, iF as UpdatableProviderId, iG as filter$3, iH as AgentAccount, iI as schedule, aR as RpcMethods, iJ as BrowserFrame, iK as PagePick, iL as defaultClientSettings, iM as ClientSettings$1, iN as parsePairingUrl, iO as pairingUrl, aM as ServerFrame, iP as Environment, iQ as relayWebSocketUrl, iR as remoteWebSocketUrl, aW as WebSocket$1, iS as CHALLENGE_WAIT_MS, aU as methodKind, iT as dialPlan, iU as REMOTE_PROTOCOL_VERSION, iV as DIRECT_CHECK_INTERVAL_MS, iW as DIRECT_CHECK_TIMEOUT_MS, iX as next, iY as bytes, iZ as Timestamp, i_ as RoutineSchedule, i$ as RoutineRun, j0 as launch, j1 as uninterruptible, j2 as parseUnsafe, j3 as RoutineWorkspace, j4 as LinearIssue, j5 as when$2, j6 as threadDeviceId, j7 as shownScreen, j8 as devicePlatformOf, ap as value$2, j9 as BoatVmSize, ja as RUN_AGENT_TOOL, jb as ARTIFACT_THEME_GUIDE, jc as DeviceUrl, jd as DeviceApp, je as DeviceButton, jf as WatchEventKind, jg as GuideGroup, jh as PullRequestGuide, ji as flatten$1, jj as diskFullness, jk as pretty, jl as min$1, jm as exponential, jn as desktopOnlyPushes, jo as reachesPhone, jp as mutations, jq as desktopOnlyMethods, jr as isAddressNotUpYet, js as ClientFrame, aY as REMOTE_MAX_FRAME_BYTES, aX as REMOTE_PATH, jt as empty$9, a_ as cliSocketPath, ju as RemoteFeature, jv as BindHost, jw as getAugmentedNamespace, jx as make$1A, jy as NativeSpan, jz as currentTimeNanos, aC as MinimumLogLevel, bi as packageJson, jA as isPortInUse } from "./chunks/remote-CuntvZqY.js";
11
11
  import Ee__default from "fs";
12
12
  import require$$0 from "util";
13
13
  import require$$1$1 from "stream";
@@ -2083,11 +2083,11 @@ const make$1f = (acquirer, compiler, spanAttributes2, transformRows, borrower) =
2083
2083
  if (cache2.has(acquirer)) {
2084
2084
  return cache2.get(acquirer);
2085
2085
  }
2086
- const self2 = Object.assign(function sql(strings, ...args) {
2087
- if (typeof strings === "string") {
2088
- return identifier(strings);
2089
- } else if (Array.isArray(strings) && "raw" in strings) {
2090
- return statement(acquirer, compiler, strings, args, spanAttributes2, transformRows, borrower);
2086
+ const self2 = Object.assign(function sql(strings2, ...args) {
2087
+ if (typeof strings2 === "string") {
2088
+ return identifier(strings2);
2089
+ } else if (Array.isArray(strings2) && "raw" in strings2) {
2090
+ return statement(acquirer, compiler, strings2, args, spanAttributes2, transformRows, borrower);
2091
2091
  }
2092
2092
  throw "absurd";
2093
2093
  }, {
@@ -2125,8 +2125,8 @@ const constructorCache = {
2125
2125
  transforms: /* @__PURE__ */ new WeakMap(),
2126
2126
  noTransforms: /* @__PURE__ */ new WeakMap()
2127
2127
  };
2128
- const statement = (acquirer, compiler, strings, args, spanAttributes2, transformRows, borrower) => {
2129
- const segments2 = strings[0].length > 0 ? [literal$1(strings[0])] : [];
2128
+ const statement = (acquirer, compiler, strings2, args, spanAttributes2, transformRows, borrower) => {
2129
+ const segments2 = strings2[0].length > 0 ? [literal$1(strings2[0])] : [];
2130
2130
  for (let i = 0; i < args.length; i++) {
2131
2131
  const arg = args[i];
2132
2132
  if (isFragment(arg)) {
@@ -2136,8 +2136,8 @@ const statement = (acquirer, compiler, strings, args, spanAttributes2, transform
2136
2136
  } else {
2137
2137
  segments2.push(parameter(arg));
2138
2138
  }
2139
- if (strings[i + 1].length > 0) {
2140
- segments2.push(literal$1(strings[i + 1]));
2139
+ if (strings2[i + 1].length > 0) {
2140
+ segments2.push(literal$1(strings2[i + 1]));
2141
2141
  }
2142
2142
  }
2143
2143
  return makeUnsafe(segments2, acquirer, compiler, spanAttributes2, transformRows, borrower);
@@ -9093,8 +9093,8 @@ function cleanRegex(source) {
9093
9093
  const end2 = source.endsWith("$") ? source.length - 1 : source.length;
9094
9094
  return source.slice(start, end2);
9095
9095
  }
9096
- function floatSafeRemainder(val, step) {
9097
- const ratio = val / step;
9096
+ function floatSafeRemainder(val, step2) {
9097
+ const ratio = val / step2;
9098
9098
  const roundedRatio = Math.round(ratio);
9099
9099
  const tolerance = 4 * Number.EPSILON * Math.max(Math.abs(ratio), 1);
9100
9100
  if (Math.abs(ratio - roundedRatio) < tolerance)
@@ -55617,11 +55617,11 @@ const scripts = [
55617
55617
  ];
55618
55618
  const secondsAgo = (now2, seconds2) => new Date(now2 - seconds2 * 1e3).toISOString();
55619
55619
  const callIdOf = (script) => `${script.id}-call`;
55620
- const stepEvents = (script, step, index) => {
55620
+ const stepEvents = (script, step2, index) => {
55621
55621
  const callId = `${script.id}-step-${index}`;
55622
55622
  return [
55623
- { type: "tool_call_started", callId, name: step.name, input: step.input, parentCallId: callIdOf(script) },
55624
- { type: "tool_call_finished", callId, output: step.output, isError: false }
55623
+ { type: "tool_call_started", callId, name: step2.name, input: step2.input, parentCallId: callIdOf(script) },
55624
+ { type: "tool_call_finished", callId, output: step2.output, isError: false }
55625
55625
  ];
55626
55626
  };
55627
55627
  function mockSubagents(now2) {
@@ -55654,7 +55654,7 @@ function mockSubagents(now2) {
55654
55654
  name: "Agent",
55655
55655
  input: { description: script.label, prompt: script.prompt, subagent_type: "general-purpose" }
55656
55656
  },
55657
- ...script.steps.flatMap((step, index) => stepEvents(script, step, index)),
55657
+ ...script.steps.flatMap((step2, index) => stepEvents(script, step2, index)),
55658
55658
  update2({
55659
55659
  id: script.id,
55660
55660
  ...script.provider && { provider: script.provider },
@@ -55679,14 +55679,14 @@ function mockSubagents(now2) {
55679
55679
  const current = agents.get(script.id);
55680
55680
  if (current?.status !== "running") return [];
55681
55681
  const done2 = progress.get(script.id) ?? 0;
55682
- const step = script.upcoming?.[done2];
55683
- if (step === void 0) return script.report ? finish(script, "completed", at, script.report) : [];
55682
+ const step2 = script.upcoming?.[done2];
55683
+ if (step2 === void 0) return script.report ? finish(script, "completed", at, script.report) : [];
55684
55684
  progress.set(script.id, done2 + 1);
55685
55685
  return [
55686
- ...stepEvents(script, step, script.steps.length + done2),
55686
+ ...stepEvents(script, step2, script.steps.length + done2),
55687
55687
  update2({
55688
55688
  ...current,
55689
- lastTool: step.name,
55689
+ lastTool: step2.name,
55690
55690
  toolUses: (current.toolUses ?? 0) + 1,
55691
55691
  tokens: (current.tokens ?? 0) + 2400
55692
55692
  })
@@ -55714,15 +55714,15 @@ function play(steps, controls) {
55714
55714
  };
55715
55715
  const map2 = (message2) => mapMessage(message2, state, (/* @__PURE__ */ new Date()).toISOString());
55716
55716
  let requests = 0;
55717
- const run2 = (step) => {
55718
- switch (step.type) {
55717
+ const run2 = (step2) => {
55718
+ switch (step2.type) {
55719
55719
  case "sdk":
55720
- return fromIterable$2(map2(step.message));
55720
+ return fromIterable$2(map2(step2.message));
55721
55721
  case "pause":
55722
- return fromEffectDrain(controls.sleep(step.ms));
55722
+ return fromEffectDrain(controls.sleep(step2.ms));
55723
55723
  case "approval": {
55724
55724
  const request2 = {
55725
- ...step.request,
55725
+ ...step2.request,
55726
55726
  id: `mock-approval-${controls.threadId}-${++requests}`,
55727
55727
  threadId: controls.threadId,
55728
55728
  provider: "claude"
@@ -55730,7 +55730,7 @@ function play(steps, controls) {
55730
55730
  const resolved = controls.approve(request2).pipe(
55731
55731
  map$2((reply2) => {
55732
55732
  const denied = reply2.decision === "deny";
55733
- const result2 = toolResult$3(step.callId, denied ? deniedOutput(reply2) : step.output, { isError: denied });
55733
+ const result2 = toolResult$3(step2.callId, denied ? deniedOutput(reply2) : step2.output, { isError: denied });
55734
55734
  return [{ type: "approval_resolved", requestId: request2.id }, ...map2(result2)];
55735
55735
  })
55736
55736
  );
@@ -55744,7 +55744,7 @@ function play(steps, controls) {
55744
55744
  id: `mock-question-${controls.threadId}-${++requests}`,
55745
55745
  threadId: controls.threadId,
55746
55746
  provider: "claude",
55747
- questions: step.questions
55747
+ questions: step2.questions
55748
55748
  };
55749
55749
  return concat(
55750
55750
  succeed$4({ type: "question_requested", request: request2 }),
@@ -55755,16 +55755,16 @@ function play(steps, controls) {
55755
55755
  }
55756
55756
  case "mcp": {
55757
55757
  const callId = nextCallId();
55758
- const called = controls.callTool(step.name, step.input).pipe(
55758
+ const called = controls.callTool(step2.name, step2.input).pipe(
55759
55759
  map$2(
55760
55760
  (result2) => concat(
55761
55761
  fromIterable$2(map2(toolResult$3(callId, result2.output, { isError: result2.isError }))),
55762
- fromIterable$2(step.next?.(result2) ?? []).pipe(flatMap$2(run2))
55762
+ fromIterable$2(step2.next?.(result2) ?? []).pipe(flatMap$2(run2))
55763
55763
  )
55764
55764
  )
55765
55765
  );
55766
55766
  return concat(
55767
- fromIterable$2(map2(toolUse(callId, `mcp__hinacode__${step.name}`, step.input))),
55767
+ fromIterable$2(map2(toolUse(callId, `mcp__hinacode__${step2.name}`, step2.input))),
55768
55768
  unwrap(called)
55769
55769
  );
55770
55770
  }
@@ -62745,7 +62745,7 @@ const addHeaderAttributes = (span, phase, headers2, filter2, redactedNames) => {
62745
62745
  };
62746
62746
  const Proto$4 = /* @__PURE__ */ Object.getPrototypeOf(empty$2);
62747
62747
  const emptyMutableUnsafe = () => Object.create(Proto$4);
62748
- function make$13(strings, ...args) {
62748
+ function make$13(strings2, ...args) {
62749
62749
  const argsLength = args.length;
62750
62750
  const values2 = new Array(argsLength);
62751
62751
  const effects = [];
@@ -62762,14 +62762,14 @@ function make$13(strings, ...args) {
62762
62762
  }
62763
62763
  }
62764
62764
  if (effects.length === 0) {
62765
- return succeed$2(consolidate(strings, values2));
62765
+ return succeed$2(consolidate(strings2, values2));
62766
62766
  }
62767
62767
  return map$2(forEach(effects, ([index, effect2]) => tap$1(effect2, (value2) => sync(() => {
62768
62768
  values2[index] = primitiveToString(value2);
62769
62769
  })), {
62770
62770
  concurrency: "unbounded",
62771
62771
  discard: true
62772
- }), (_) => consolidate(strings, values2));
62772
+ }), (_) => consolidate(strings2, values2));
62773
62773
  }
62774
62774
  function primitiveToString(value2) {
62775
62775
  if (Array.isArray(value2)) {
@@ -62791,13 +62791,13 @@ function primitiveToString(value2) {
62791
62791
  }
62792
62792
  }
62793
62793
  }
62794
- function consolidate(strings, values2) {
62794
+ function consolidate(strings2, values2) {
62795
62795
  let out = "";
62796
62796
  for (let i = 0, len = values2.length; i < len; i++) {
62797
- out += strings[i];
62797
+ out += strings2[i];
62798
62798
  out += values2[i];
62799
62799
  }
62800
- return out + strings[strings.length - 1];
62800
+ return out + strings2[strings2.length - 1];
62801
62801
  }
62802
62802
  function isSuccess(u) {
62803
62803
  return isExit(u) && u._tag === "Success";
@@ -62848,13 +62848,13 @@ const text$2 = (body2, options) => {
62848
62848
  body: text$3(body2, getContentType(options, headers2))
62849
62849
  });
62850
62850
  };
62851
- const html = (strings, ...args) => {
62852
- if (typeof strings === "string") {
62853
- return text$2(strings, {
62851
+ const html = (strings2, ...args) => {
62852
+ if (typeof strings2 === "string") {
62853
+ return text$2(strings2, {
62854
62854
  contentType: "text/html"
62855
62855
  });
62856
62856
  }
62857
- return map$2(make$13(strings, ...args), (_) => text$2(_, {
62857
+ return map$2(make$13(strings2, ...args), (_) => text$2(_, {
62858
62858
  contentType: "text/html"
62859
62859
  }));
62860
62860
  };
@@ -74936,8 +74936,8 @@ class Markup {
74936
74936
  }
74937
74937
  }
74938
74938
  const escapeHtml = (value2) => value2.replace(/[&<>"']/g, (character) => `&#${character.charCodeAt(0)};`);
74939
- const markup = (strings, ...values2) => new Markup(
74940
- strings.reduce((html2, part, index) => {
74939
+ const markup = (strings2, ...values2) => new Markup(
74940
+ strings2.reduce((html2, part, index) => {
74941
74941
  const value2 = values2[index - 1];
74942
74942
  const rendered = typeof value2 === "string" ? escapeHtml(value2) : value2 instanceof Markup ? value2.html : value2.map((item) => item.html).join("");
74943
74943
  return html2 + rendered + part;
@@ -75602,7 +75602,8 @@ const compactMessage = (message2) => ({
75602
75602
  ...message2,
75603
75603
  parts: compactParts(message2.parts)
75604
75604
  });
75605
- const compactParts = (parts) => parts.filter((part) => part.type !== "tool_call" || part.parentCallId === void 0).map(compactPart);
75605
+ const isOwnPart = (part) => part.type !== "tool_call" || part.parentCallId === void 0;
75606
+ const compactParts = (parts) => parts.filter(isOwnPart).map(compactPart);
75606
75607
  function compactPushes() {
75607
75608
  const subagentCallIdsByThread = /* @__PURE__ */ new Map();
75608
75609
  return (push) => {
@@ -75654,6 +75655,8 @@ const previewPart = (part) => {
75654
75655
  return preview2 === void 0 ? part : { ...part, ...preview2 };
75655
75656
  };
75656
75657
  const previewMessage = (message2) => ({ ...message2, parts: message2.parts.map(previewPart) });
75658
+ const settledSubagentCall = (part) => !isOwnPart(part) && part.type === "tool_call" && part.status !== "running";
75659
+ const previewTranscriptMessage = (message2) => message2.completedAt === null ? previewMessage(message2) : { ...message2, parts: message2.parts.filter((part) => !settledSubagentCall(part)).map(previewPart) };
75657
75660
  function previewPush(push) {
75658
75661
  if (push.type !== "thread.event") return { ...push, message: previewMessage(push.message) };
75659
75662
  if (push.event.type !== "tool_call_finished") return push;
@@ -79154,6 +79157,13 @@ const make$A = gen(function* () {
79154
79157
  });
79155
79158
  });
79156
79159
  const layer$H = effect(Messages, make$A);
79160
+ const PULL_REQUEST_COMMAND = /\bgh\b[^\n;&|]*\bpr\s+(merge|close|reopen|ready)\b|\bgh\s+api\b[^\n;&|]*\bpulls\b|\bglab\b[^\n;&|]*\bmr\s+(merge|close|reopen)\b|\bgit\b[^\n;&|]*\bpush\b/;
79161
+ const strings = (value2) => {
79162
+ if (typeof value2 === "string") return [value2];
79163
+ if (typeof value2 === "object" && value2 !== null) return Object.values(value2).flatMap(strings);
79164
+ return [];
79165
+ };
79166
+ const touchesPullRequest = (input) => strings(input).some((text2) => PULL_REQUEST_COMMAND.test(text2));
79157
79167
  const SEGMENT = /^[\w.-]+$/;
79158
79168
  const isProjectPath = (path2) => {
79159
79169
  const segments2 = path2.split("/");
@@ -80305,6 +80315,11 @@ const make$z = gen(function* () {
80305
80315
  return url2 === void 0 ? fail$2(new IssueUrlInvalidError({ url: raw2 })) : get$4(issueReads, url2);
80306
80316
  },
80307
80317
  pullRequestDetail: (raw2, options) => map$2(read2(raw2, options?.fresh), toPullRequestDetail$1),
80318
+ refresh: (url2) => {
80319
+ const state = lastRead.get(url2)?.state;
80320
+ if (state === void 0) return events2.publish({ type: "github.pullRequest", url: url2 });
80321
+ return state === "MERGED" ? void_ : ignore$1(reread(url2));
80322
+ },
80308
80323
  pullRequestDiff: (raw2) => ghByUrl(raw2, (url2) => ["pr", "diff", url2, "--color=never"]).pipe(
80309
80324
  catchIf(
80310
80325
  (error2) => error2._tag === "CommandError" && error2.stderr.includes("too_large"),
@@ -80656,6 +80671,7 @@ const make$y = gen(function* () {
80656
80671
  isGitLabHost,
80657
80672
  pullRequest: (url2) => flatMap(requireMergeRequest(url2), pullRequestOf),
80658
80673
  pullRequestDetail,
80674
+ refresh: (url2) => events2.publish({ type: "github.pullRequest", url: url2 }),
80659
80675
  merge: (url2, method2) => method2 === "rebase" ? fail$2(new GitLabMergeMethodError()) : mutate2(url2, (mergeRequest) => [
80660
80676
  "-X",
80661
80677
  "PUT",
@@ -80735,6 +80751,13 @@ const make$x = gen(function* () {
80735
80751
  () => github.pullRequestDetail(url2, options),
80736
80752
  () => gitlab.pullRequestDetail(url2)
80737
80753
  ),
80754
+ refresh: (url2) => ignore$1(
80755
+ byUrl(
80756
+ url2,
80757
+ () => github.refresh(url2),
80758
+ () => gitlab.refresh(url2)
80759
+ )
80760
+ ),
80738
80761
  merge: (url2, method2) => byUrl(
80739
80762
  url2,
80740
80763
  () => github.merge(url2, method2),
@@ -82879,23 +82902,12 @@ const make$q = gen(function* () {
82879
82902
  return ThreadNaming.of({ nameFromPrompt, regenerateTitle });
82880
82903
  });
82881
82904
  const layer$v = effect(ThreadNaming, make$q);
82882
- const PERSIST_INTERVAL_MS = 500;
82883
- const RUN_AGENT_WAIT = minutes(4);
82884
- const PERSIST_BYTES_PER_SECOND = 256 * 1024;
82885
- const interruptedSend = () => new AgentError({ provider: "hinacode", message: "Message send interrupted" });
82886
- const resumeAt = (thread2) => {
82887
- const reset = thread2.usageLimit?.reset;
82888
- if (thread2.status !== "limited" || reset?.autoResume !== true) return void 0;
82889
- return Date.parse(reset.at) + resumeGraceMs;
82890
- };
82891
- const resumeIsDue = (thread2, now2) => (resumeAt(thread2) ?? Infinity) <= Date.parse(now2);
82892
- const deliveryAt = (message2) => message2.failure === void 0 ? Date.parse(message2.sendAt) : void 0;
82893
- const isDue = (message2, now2) => (deliveryAt(message2) ?? Infinity) <= Date.parse(now2);
82894
- const nextDeadline = (thread2) => earliest([resumeAt(thread2), ...thread2.scheduled.map(deliveryAt)]);
82895
- const bySendAt = (messages) => messages.toSorted((a, b) => Date.parse(a.sendAt) - Date.parse(b.sendAt));
82896
- class AgentRunner extends Service$1()("hinacode/AgentRunner") {
82897
- }
82898
- const statusAfter = (event) => {
82905
+ const initialTurnState = (resumedSessionId) => ({
82906
+ status: "running",
82907
+ outcome: null,
82908
+ resumedSessionId
82909
+ });
82910
+ const statusAfter = (event, { waitsOnUser }) => {
82899
82911
  switch (event.type) {
82900
82912
  case "approval_requested":
82901
82913
  case "question_requested":
@@ -82904,7 +82916,7 @@ const statusAfter = (event) => {
82904
82916
  case "approval_resolved":
82905
82917
  case "question_resolved":
82906
82918
  case "secret_resolved":
82907
- return "running";
82919
+ return waitsOnUser ? "awaiting_approval" : "running";
82908
82920
  case "turn_completed":
82909
82921
  case "turn_failed":
82910
82922
  return "idle";
@@ -82914,6 +82926,48 @@ const statusAfter = (event) => {
82914
82926
  return void 0;
82915
82927
  }
82916
82928
  };
82929
+ const outcomeAfter = (event, outcome) => {
82930
+ if (event.type === "turn_completed") return "completed";
82931
+ if (event.type === "turn_failed") return "failed";
82932
+ return outcome;
82933
+ };
82934
+ const sessionEffects = (state, event) => {
82935
+ if (event.type === "session_bound" && event.providerSessionId !== state.resumedSessionId) {
82936
+ return [{ type: "bind_session", providerSessionId: event.providerSessionId }];
82937
+ }
82938
+ if (event.type === "turn_failed" && event.sessionLost) return [{ type: "drop_session" }];
82939
+ return [];
82940
+ };
82941
+ const releasesUser = (event) => event.type === "approval_resolved" || event.type === "question_resolved" || event.type === "secret_resolved";
82942
+ const step = (state, event, inputs) => {
82943
+ const next2 = statusAfter(event, inputs);
82944
+ const status = next2 ?? state.status;
82945
+ const statusEffects = next2 === void 0 || next2 === state.status ? [] : [{ type: "set_status", status, ...event.type === "turn_limited" && { usageLimit: event.limit } }];
82946
+ return [
82947
+ { ...state, status, outcome: outcomeAfter(event, state.outcome) },
82948
+ [
82949
+ ...sessionEffects(state, event),
82950
+ ...statusEffects,
82951
+ ...releasesUser(event) ? [{ type: "steer_held" }] : []
82952
+ ]
82953
+ ];
82954
+ };
82955
+ const PERSIST_INTERVAL_MS = 500;
82956
+ const RUN_AGENT_WAIT = minutes(4);
82957
+ const PERSIST_BYTES_PER_SECOND = 256 * 1024;
82958
+ const interruptedSend = () => new AgentError({ provider: "hinacode", message: "Message send interrupted" });
82959
+ const resumeAt = (thread2) => {
82960
+ const reset = thread2.usageLimit?.reset;
82961
+ if (thread2.status !== "limited" || reset?.autoResume !== true) return void 0;
82962
+ return Date.parse(reset.at) + resumeGraceMs;
82963
+ };
82964
+ const resumeIsDue = (thread2, now2) => (resumeAt(thread2) ?? Infinity) <= Date.parse(now2);
82965
+ const deliveryAt = (message2) => message2.failure === void 0 ? Date.parse(message2.sendAt) : void 0;
82966
+ const isDue = (message2, now2) => (deliveryAt(message2) ?? Infinity) <= Date.parse(now2);
82967
+ const nextDeadline = (thread2) => earliest([resumeAt(thread2), ...thread2.scheduled.map(deliveryAt)]);
82968
+ const bySendAt = (messages) => messages.toSorted((a, b) => Date.parse(a.sendAt) - Date.parse(b.sendAt));
82969
+ class AgentRunner extends Service$1()("hinacode/AgentRunner") {
82970
+ }
82917
82971
  const userMessage = (threadId, text2, attachments, now2, id2 = randomUUID()) => ({
82918
82972
  id: id2,
82919
82973
  threadId,
@@ -82967,6 +83021,7 @@ const make$p = gen(function* () {
82967
83021
  const attachments = yield* Attachments;
82968
83022
  const git2 = yield* Git;
82969
83023
  const pullRequests = yield* PullRequests;
83024
+ const sourceControl = yield* SourceControl;
82970
83025
  const messages = yield* Messages;
82971
83026
  const sql = yield* SqlClient;
82972
83027
  const push = yield* Events;
@@ -83162,15 +83217,22 @@ const make$p = gen(function* () {
83162
83217
  };
83163
83218
  return input;
83164
83219
  });
83220
+ const refreshPullRequests = (thread2, { branch }) => gen(function* () {
83221
+ const linked = (yield* pullRequests.list(thread2.id)).map((link) => link.url);
83222
+ yield* forEach(linked, sourceControl.refresh, { concurrency: "unbounded", discard: true });
83223
+ if (!branch || thread2.worktreeId === null) return;
83224
+ const pullRequest = yield* worktrees.pullRequest(thread2.worktreeId);
83225
+ if (pullRequest !== null && !linked.includes(pullRequest.url)) yield* sourceControl.refresh(pullRequest.url);
83226
+ }).pipe(ignore$1, forkIn(scope2), asVoid);
83165
83227
  const insertMessage = (message2) => messages.insert(message2).pipe(andThen(publishTranscript({ type: "message.created", message: message2 })));
83166
83228
  const makeTurn = (thread2, provider, cwd, home, initial, stop) => {
83167
83229
  let turnMessages = [initial];
83168
- let status = "running";
83169
- let completed = false;
83230
+ let state = initialTurnState(thread2.providerSessionId);
83170
83231
  let persistedAt = Date.now();
83171
83232
  let persistedBytes = 0;
83172
83233
  const dirty = /* @__PURE__ */ new Map();
83173
83234
  const subagentCalls = /* @__PURE__ */ new Set();
83235
+ const pullRequestCalls = /* @__PURE__ */ new Set();
83174
83236
  const persist = suspend(() => {
83175
83237
  const changed = turnMessages.flatMap((message2) => {
83176
83238
  const previous = dirty.get(message2.id);
@@ -83198,6 +83260,10 @@ const make$p = gen(function* () {
83198
83260
  };
83199
83261
  const apply2 = (event) => gen(function* () {
83200
83262
  if (event.type === "tool_call_started" && spawnsSubagent(event)) subagentCalls.add(event.callId);
83263
+ if (event.type === "tool_call_started" && touchesPullRequest(event.input)) pullRequestCalls.add(event.callId);
83264
+ if (event.type === "tool_call_finished" && pullRequestCalls.delete(event.callId)) {
83265
+ yield* refreshPullRequests(thread2, { branch: true });
83266
+ }
83201
83267
  const whole = event.type === "tool_call_finished" && subagentCalls.has(event.callId);
83202
83268
  yield* publishTranscript({ type: "thread.event", threadId: thread2.id, event }, { whole });
83203
83269
  setTurnMessages(foldTranscript(turnMessages, event, yield* nowIso));
@@ -83205,28 +83271,31 @@ const make$p = gen(function* () {
83205
83271
  if (event.type === "approval_resolved") approvals2.delete(event.requestId);
83206
83272
  if (event.type === "question_requested") questions.set(event.request.id, event.request);
83207
83273
  if (event.type === "question_resolved") questions.delete(event.requestId);
83208
- if (event.type === "session_bound" && event.providerSessionId !== thread2.providerSessionId) {
83209
- yield* updateThread({ id: thread2.id, providerSessionId: event.providerSessionId });
83210
- }
83211
- if (event.type === "turn_failed" && event.sessionLost)
83212
- yield* updateThread({ id: thread2.id, providerSessionId: null });
83213
- if (event.type === "turn_completed" || event.type === "turn_failed") completed = event.type === "turn_completed";
83214
- const resolvedStatus = statusAfter(event);
83215
- const nextStatus = resolvedStatus === "running" && waitsOnUser(thread2.id) ? "awaiting_approval" : resolvedStatus;
83216
- if (nextStatus !== void 0 && nextStatus !== status) {
83217
- status = nextStatus;
83218
- yield* updateThread({
83219
- id: thread2.id,
83220
- status,
83221
- ...event.type === "turn_limited" ? { usageLimit: event.limit } : {}
83222
- });
83223
- }
83224
- if (event.type === "approval_resolved" || event.type === "question_resolved" || event.type === "secret_resolved") {
83225
- yield* steerHeld;
83274
+ const [after, effects] = step(state, event, { waitsOnUser: waitsOnUser(thread2.id) });
83275
+ yield* forEach(effects, perform, { discard: true });
83276
+ state = after;
83277
+ if (event.type === "turn_completed" || event.type === "turn_failed") {
83278
+ yield* refreshPullRequests(thread2, { branch: false });
83226
83279
  }
83227
83280
  const interval = Math.max(PERSIST_INTERVAL_MS, persistedBytes / PERSIST_BYTES_PER_SECOND * 1e3);
83228
83281
  if (dirty.size > 0 && Date.now() - persistedAt >= interval) yield* persist;
83229
83282
  });
83283
+ const perform = (effect2) => {
83284
+ switch (effect2.type) {
83285
+ case "bind_session":
83286
+ return updateThread({ id: thread2.id, providerSessionId: effect2.providerSessionId });
83287
+ case "drop_session":
83288
+ return updateThread({ id: thread2.id, providerSessionId: null });
83289
+ case "set_status":
83290
+ return updateThread({
83291
+ id: thread2.id,
83292
+ status: effect2.status,
83293
+ ...effect2.usageLimit !== void 0 && { usageLimit: effect2.usageLimit }
83294
+ });
83295
+ case "steer_held":
83296
+ return steerHeld;
83297
+ }
83298
+ };
83230
83299
  const deltas = makeDeltaCoalescer({ apply: apply2, exclusive: exclusive(thread2.id), scope: scope2 });
83231
83300
  const handle = (received) => gen(function* () {
83232
83301
  const event = received.type === "tool_call_finished" ? { ...received, output: yield* withImagesSaved(thread2.id, attachments, received.output) } : received.type === "turn_completed" && received.forkPoint !== void 0 ? {
@@ -83272,7 +83341,7 @@ const make$p = gen(function* () {
83272
83341
  }
83273
83342
  });
83274
83343
  const afterRefusedTurn = (text2, attachments2, when2, messageId) => suspend(
83275
- () => completed && !isDoneUnsafe(stop) ? succeed$2("finished") : gen(function* () {
83344
+ () => state.outcome === "completed" && !isDoneUnsafe(stop) ? succeed$2("finished") : gen(function* () {
83276
83345
  if (!(yield* when2)) return false;
83277
83346
  const { queue: queue2 } = yield* threads.get(thread2.id);
83278
83347
  yield* updateThread({ id: thread2.id, queue: [...queue2, { id: messageId, text: text2, attachments: attachments2 }] });
@@ -83337,8 +83406,8 @@ const make$p = gen(function* () {
83337
83406
  setTurnMessages(replaceLast(turnMessages, closed));
83338
83407
  yield* persist;
83339
83408
  if (closed !== last) yield* publishTranscript({ type: "message.updated", message: closed });
83340
- if (isThreadBusy(status)) yield* updateThread({ id: thread2.id, status: "idle" });
83341
- if (!completed || (yield* isDone(stop))) return;
83409
+ if (isThreadBusy(state.status)) yield* updateThread({ id: thread2.id, status: "idle" });
83410
+ if (state.outcome !== "completed" || (yield* isDone(stop))) return;
83342
83411
  next2 = yield* nextQueued(thread2.id);
83343
83412
  }).pipe(
83344
83413
  catch_((error2) => logError("failed to finish turn", error2)),
@@ -83554,6 +83623,9 @@ const make$p = gen(function* () {
83554
83623
  flatMap(exit(execution), (exit2) => done(finalReply, exit2)),
83555
83624
  scope2
83556
83625
  );
83626
+ if (request2.background === true) {
83627
+ return `The agent runs in the background. Call ${WAIT_AGENT_TOOL} with agentId "${id2}" for its reply before you end your turn, because it stops when the turn ends.`;
83628
+ }
83557
83629
  return yield* waitForAgent(threadId, id2);
83558
83630
  });
83559
83631
  const liveMessages = (threadId) => messages.list(threadId).pipe(
@@ -86172,6 +86244,10 @@ function compactSubagentWork(messages, callId) {
86172
86244
  const { spawn: spawn2, calls, startedAt: startedAt2 } = findSubagentWork(messages, callId);
86173
86245
  return { spawn: spawn2 ?? null, calls: calls.map(compactPart), startedAt: startedAt2 ?? null };
86174
86246
  }
86247
+ function previewSubagentWork(messages, callId) {
86248
+ const { spawn: spawn2, calls, startedAt: startedAt2 } = findSubagentWork(messages, callId);
86249
+ return { spawn: spawn2 ?? null, calls: calls.map(previewPart), startedAt: startedAt2 ?? null };
86250
+ }
86175
86251
  class AgentLogins extends Service$1()("hinacode/AgentLogins") {
86176
86252
  }
86177
86253
  const CachedAccount = fromJsonString(
@@ -86737,7 +86813,7 @@ function pickElement() {
86737
86813
  const target = document.elementFromPoint(event.clientX, event.clientY);
86738
86814
  if (target) finish(target);
86739
86815
  };
86740
- const step = (key2, element) => {
86816
+ const step2 = (key2, element) => {
86741
86817
  if (key2 === "ArrowUp") return element.parentElement === document.documentElement ? null : element.parentElement;
86742
86818
  if (key2 === "ArrowDown") return element.firstElementChild;
86743
86819
  if (key2 === "ArrowLeft") return element.previousElementSibling;
@@ -86753,7 +86829,7 @@ function pickElement() {
86753
86829
  finish(current);
86754
86830
  } else if (event.key.startsWith("Arrow")) {
86755
86831
  swallow(event);
86756
- const next2 = current ? step(event.key, current) : document.elementFromPoint(innerWidth / 2, innerHeight / 2);
86832
+ const next2 = current ? step2(event.key, current) : document.elementFromPoint(innerWidth / 2, innerHeight / 2);
86757
86833
  if (!next2) return;
86758
86834
  next2.scrollIntoView({ block: "nearest", inline: "nearest" });
86759
86835
  show(next2);
@@ -89564,7 +89640,7 @@ const make$c = (options) => gen(function* () {
89564
89640
  }
89565
89641
  return state;
89566
89642
  };
89567
- const onStep = (step) => place({ phase: "preparing", deviceId, name, owned, step });
89643
+ const onStep = (step2) => place({ phase: "preparing", deviceId, name, owned, step: step2 });
89568
89644
  const pending = Promise.resolve().then(async () => {
89569
89645
  try {
89570
89646
  deviceId = await start(onStep);
@@ -91055,7 +91131,7 @@ const handshake = (socket, head2) => tryPromise({
91055
91131
  });
91056
91132
  const writeSteps = (socket, steps) => forEach(
91057
91133
  steps,
91058
- (step) => step instanceof Uint8Array ? sync(() => void socket.write(step)) : sleep$3(step.pauseMs),
91134
+ (step2) => step2 instanceof Uint8Array ? sync(() => void socket.write(step2)) : sleep$3(step2.pauseMs),
91059
91135
  { discard: true }
91060
91136
  );
91061
91137
  class TarError extends TaggedError$1()("TarError", { message: String$1 }) {
@@ -92244,7 +92320,7 @@ ${output}` : ""}`
92244
92320
  const layer$c = (source, dataDir, options) => effect(TinyVm, make$a(source, dataDir, options?.desktopRedirect ?? true));
92245
92321
  const AgentTools = make$Q(
92246
92322
  make$C(RUN_AGENT_TOOL, {
92247
- description: "Run a sub-agent on any provider HinaCode supports, such as Codex from a Claude thread, through its SDK in this thread's workspace. Use it instead of running the `codex` or `claude` CLI in a shell. It shows in this thread's Agents tab, where the user can watch and stop it. The call returns the agent's final reply, or, if the agent is still working after a few minutes, its id: then call `wait_agent` with that id, as often as needed, to keep waiting. The agent stops when this thread's turn ends. The `<agents>` block in your instructions lists each provider with its model ids and efforts; pass them exactly. Defaults to that provider's first model, or this thread's model on the same provider. opencode runs only the models the user picked for it in Settings.",
92323
+ description: "Run a sub-agent on any provider HinaCode supports, such as Codex from a Claude thread, through its SDK in this thread's workspace. Use it instead of running the `codex` or `claude` CLI in a shell. It shows in this thread's Agents tab, where the user can watch and stop it. The call returns the agent's final reply, or, if the agent is still working after a few minutes, its id: then call `wait_agent` with that id, as often as needed, to keep waiting. Pass `background` to get the id at once and keep working while it runs. The agent stops when this thread's turn ends. The `<agents>` block in your instructions lists each provider with its model ids and efforts; pass them exactly. Defaults to that provider's first model, or this thread's model on the same provider. opencode runs only the models the user picked for it in Settings.",
92248
92324
  parameters: Struct({
92249
92325
  provider: ProviderId,
92250
92326
  description: String$1.annotate({ description: "A few words shown as the sub-agent's label." }),
@@ -92254,6 +92330,11 @@ const AgentTools = make$Q(
92254
92330
  ),
92255
92331
  effort: optionalKey(
92256
92332
  String$1.annotate({ description: "Reasoning effort, one the model lists in `<agents>`." })
92333
+ ),
92334
+ background: optionalKey(
92335
+ Boolean$1.annotate({
92336
+ description: "Return the agent's id at once instead of waiting, so you can keep working and call `wait_agent` for its reply later in this turn."
92337
+ })
92257
92338
  )
92258
92339
  })
92259
92340
  }).annotate(Readonly, true),
@@ -97423,7 +97504,7 @@ const handlers = {
97423
97504
  "updates.install": () => Updates.use((updates) => updates.install),
97424
97505
  "threads.transcript": ({ threadId, compact = false, page: page2 }) => AgentRunner.use((runner) => runner.transcript(threadId)).pipe(
97425
97506
  map$2((transcript) => {
97426
- const messages = transcript.messages.map(compact ? compactMessage : previewMessage);
97507
+ const messages = transcript.messages.map(compact ? compactMessage : previewTranscriptMessage);
97427
97508
  return page2 === void 0 ? { ...transcript, messages } : { ...transcript, ...transcriptPage(messages, page2.before) };
97428
97509
  })
97429
97510
  ),
@@ -97454,8 +97535,8 @@ const handlers = {
97454
97535
  "secrets.clear": ({ name }) => Secrets.use((secrets) => secrets.clear(name)),
97455
97536
  "subagents.list": ({ threadId }) => AgentRunner.use((runner) => runner.subagents(threadId)),
97456
97537
  "subagents.stop": ({ threadId, subagentId }) => AgentRunner.use((runner) => runner.stopSubagent(threadId, subagentId)),
97457
- "subagents.transcript": ({ threadId, callId }) => AgentRunner.use((runner) => runner.transcript(threadId)).pipe(
97458
- map$2(({ messages }) => compactSubagentWork(messages, callId))
97538
+ "subagents.transcript": ({ threadId, callId, compact = true }) => AgentRunner.use((runner) => runner.transcript(threadId)).pipe(
97539
+ map$2(({ messages }) => (compact ? compactSubagentWork : previewSubagentWork)(messages, callId))
97459
97540
  ),
97460
97541
  "backgroundTasks.list": ({ threadId }) => AgentRunner.use((runner) => runner.backgroundTasks(threadId)),
97461
97542
  "backgroundTasks.stop": ({ threadId, taskId }) => AgentRunner.use((runner) => runner.stopBackgroundTask(threadId, taskId)),
@@ -100799,10 +100880,10 @@ function __generator(e, r) {
100799
100880
  }), h;
100800
100881
  function verb(e2) {
100801
100882
  return function(r2) {
100802
- return step([e2, r2]);
100883
+ return step2([e2, r2]);
100803
100884
  };
100804
100885
  }
100805
- function step(a) {
100886
+ function step2(a) {
100806
100887
  if (i) throw new TypeError("Generator is already executing.");
100807
100888
  while (h && (h = 0, a[0] && (t = 0)), t) try {
100808
100889
  if (i = 1, n && (s = a[0] & 2 ? n["return"] : a[0] ? n["throw"] || ((s = n["return"]) && s.call(n), 0) : n.next) && !(s = s.call(n, a[1])).done) return s;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hinacode",
3
- "version": "0.3.0-alpha.13",
3
+ "version": "0.3.0-alpha.14",
4
4
  "description": "Run coding agents on this machine and drive them from the HinaCode desktop or phone app",
5
5
  "license": "MIT",
6
6
  "repository": {