hinacode 0.3.0-alpha.1 → 0.3.0-alpha.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.
|
@@ -20452,6 +20452,7 @@ const RpcMethods = {
|
|
|
20452
20452
|
),
|
|
20453
20453
|
"backgroundTasks.list": rpc(Struct({ threadId: String$1 }), ArraySchema(BackgroundTask)),
|
|
20454
20454
|
"backgroundTasks.stop": rpc(Struct({ threadId: String$1, taskId: String$1 }), Void2),
|
|
20455
|
+
"backgroundTasks.moveCommand": rpc(Struct({ threadId: String$1, callId: String$1 }), Boolean$1),
|
|
20455
20456
|
"threads.usage": rpc(Struct({ threadId: String$1 }), NullOr(ThreadUsage)),
|
|
20456
20457
|
"threads.contextBreakdown": rpc(Struct({ threadId: String$1 }), NullOr(ContextBreakdown)),
|
|
20457
20458
|
"secrets.respond": rpc(Struct({ requestId: String$1, value: NullOr(String$1) }), Void2),
|
|
@@ -20747,6 +20748,7 @@ const methodKind = {
|
|
|
20747
20748
|
"subagents.transcript": "read",
|
|
20748
20749
|
"backgroundTasks.list": "read",
|
|
20749
20750
|
"backgroundTasks.stop": "mutation",
|
|
20751
|
+
"backgroundTasks.moveCommand": "mutation",
|
|
20750
20752
|
"threads.usage": "read",
|
|
20751
20753
|
"threads.contextBreakdown": "read",
|
|
20752
20754
|
"secrets.respond": "mutation",
|
package/out/server/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module";
|
|
2
2
|
globalThis.require ??= __createRequire(import.meta.url);
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
|
-
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 pipeArguments, ad as catchTags, ae as fromUndefinedOr, af as isNotUndefined, ag as getOrUndefined, ah as assignProperty, ai as Service, aj as empty$1, ak as exists, al as gen, am as isNone, an as succeed$3, ao as value, ap as provideService, aq as Stdio, ar as catchFilter, as as isQuitError, at as succeed$4, au as fail$1, av as interrupt, aw as andThen, ax as catchTag, ay as result, az as make$3, aA as provideContext, aB as MinimumLogLevel, aC as Struct, aD as ApprovalRequest, aE as QuestionRequest, aF as SecretRequest, aG as Thread, aH as TaggedError$1, aI as seconds, aJ as decodeUnknownExit, aK as fromJsonString, aL as ServerFrame, aM as acquireRelease, aN as unbounded, aO as endUnsafe, aP as encodeUnknownEffect, aQ as RpcMethods, aR as timeoutOrElse, aS as callback, aT as methodKind, aU as offerUnsafe, aV as WebSocket, aW as REMOTE_PATH, aX as REMOTE_MAX_FRAME_BYTES, aY as succeedNone, aZ as cliSocketPath, a_ as all, a$ as fromResult, b0 as Number$2, b1 as forEach, b2 as AccessMode, b3 as ProviderId, b4 as promise, b5 as isFailure, b6 as toCheckoutTarget, b7 as noticeEvents, b8 as PushEvent, b9 as NullOr, ba as ThreadStatus, bb as try_, bc as as, bd as isThreadBusy, be as tryPromise, bf as tapError, bg as provide, bh as layer$1 } from "./chunks/remote-
|
|
4
|
+
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 pipeArguments, ad as catchTags, ae as fromUndefinedOr, af as isNotUndefined, ag as getOrUndefined, ah as assignProperty, ai as Service, aj as empty$1, ak as exists, al as gen, am as isNone, an as succeed$3, ao as value, ap as provideService, aq as Stdio, ar as catchFilter, as as isQuitError, at as succeed$4, au as fail$1, av as interrupt, aw as andThen, ax as catchTag, ay as result, az as make$3, aA as provideContext, aB as MinimumLogLevel, aC as Struct, aD as ApprovalRequest, aE as QuestionRequest, aF as SecretRequest, aG as Thread, aH as TaggedError$1, aI as seconds, aJ as decodeUnknownExit, aK as fromJsonString, aL as ServerFrame, aM as acquireRelease, aN as unbounded, aO as endUnsafe, aP as encodeUnknownEffect, aQ as RpcMethods, aR as timeoutOrElse, aS as callback, aT as methodKind, aU as offerUnsafe, aV as WebSocket, aW as REMOTE_PATH, aX as REMOTE_MAX_FRAME_BYTES, aY as succeedNone, aZ as cliSocketPath, a_ as all, a$ as fromResult, b0 as Number$2, b1 as forEach, b2 as AccessMode, b3 as ProviderId, b4 as promise, b5 as isFailure, b6 as toCheckoutTarget, b7 as noticeEvents, b8 as PushEvent, b9 as NullOr, ba as ThreadStatus, bb as try_, bc as as, bd as isThreadBusy, be as tryPromise, bf as tapError, bg as provide, bh as layer$1 } from "./chunks/remote-hGWSrZQV.js";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { resolve, sep, join } from "node:path";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
package/out/server/daemon.js
CHANGED
|
@@ -6,7 +6,7 @@ import { createRequire } from "node:module";
|
|
|
6
6
|
import { homedir, networkInterfaces, tmpdir, userInfo, hostname, loadavg, cpus, totalmem } from "node:os";
|
|
7
7
|
import path__default, { sep, join as join$1, resolve as resolve$1, basename, relative, dirname, isAbsolute, extname, delimiter } from "node:path";
|
|
8
8
|
import NodeUrl__default, { fileURLToPath } from "node:url";
|
|
9
|
-
import { bi as Tuple, d as dual, ah as assignProperty, b5 as isFailure, at as succeed, au as fail$1, K as some, N as none, bj as hash, bk as equals, ac as pipeArguments, bl as NodeInspectSymbol, bm as toJson, g as format$2, Z as isSome, bn as withFiber, bo as uninterruptibleMask, bp as get$6, bq as Scope, br as flow, bs as fromInputUnsafe, bt as constant, bu as zero, bc as as, bv as addFinalizerExit, v as void_, b1 as forEach, bw as exit, bx as tap$1, $ as sync, av as interrupt, p as fail$2, by as ExceededCapacityError, bz as makeUnsafe$4, bA as makeUnsafe$5, bB as makeUnsafe$6, H as suspend, bC as runForkWith, bD as runIn, bE as hasInterrupts, bF as doneUnsafe, bG as getUnsafe$1, bH as addFinalizer, aw as andThen, bI as _await, bJ as getCurrent, bK as interrupt$1, bL as close, bM as isZero, bN as isFinite$1, bO as Clock, bP as toMillis, _ as flatMap, bQ as millis, a8 as ensuring, bR as void_$1, bS as BaseProto, bT as toSeconds, aH as TaggedError, bU as Error$1, bV as symbol$2, bW as structure, bX as symbol$3, bY as redact$1, bZ as symbolRedactable, O as make$1j, R as Reference, b_ as strictEqual, e as hasProperty, b$ as fromIterable$2, c0 as PipeInspectableProto, c1 as array$2, c2 as make$1k, c3 as makeEquivalence$2, c4 as getOrThrow, c5 as map$1, c6 as try_, c7 as flatMap$1, c8 as combine, c9 as string$2, ca as number$4, cb as optimize, n as succeed$1, cc as Random$1, cd as contextWith, ce as infinity, w as withFiber$1, b as sync$1, cf as updateContext, cg as merge$3, ch as succeed$2, ci as exitHasInterrupts, cj as ClockRef, ck as forkUnsafe, cl as onExitUnsafe, cm as void_$2, cn as fiberInterrupt, co as fiberJoin, cp as filterMap, cq as failVoid, cr as isGreaterThanOrEqualTo$1, cs as LogLevelOrder, aM as acquireRelease, i as isEffect, ct as interruptAs, r as runFork, cu as isFailure$1, h as hasInterruptsOnly, cv as into, cw as asVoid, cx as done, cy as filterInterruptors, cz as interruptAllAs, cA as interruptAll, cB as empty$5, cC as forkUnsafe$1, cD as runPromise, cE as runPromiseWith, cF as runPromiseExit, cG as runPromiseExitWith, cH as runSync, cI as runSyncWith, cJ as runSyncExit, cK as runSyncExitWith, cL as runCallback, cM as runCallbackWith, cN as makeMemoMapUnsafe, aA as provideContext, cO as buildWithMemoMap, cP as flatten, cQ as await_, cR as scopeRemoveFinalizerUnsafe, cS as die, cT as isResult, cU as isSuccess, m as identity, cV as effect, ai as Service$1, cW as contextWith$1, cX as getOrUndefined, al as gen, cY as context, cZ as make$1l, V as map$2, c_ as fromQueue, c$ as unwrap, ap as provideService, d0 as onExit, d1 as failCauseUnsafe, aU 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$1m, dc as provide$1, dd as onError, de as catchIf, df as scope$1, dg as getOption, dh as onExitPrimitive, a as isSuccess$1, di as catchCause, dj as matchCauseEffect, dk as failCause, dl as combine$1, a9 as orDie, dm as add$1, dn as makeUnsafe$7, 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, dB as now, dC as formatIso, a2 as pipe$2, dD as sort, Y as map$3, dE as flatMapNullishOr, dF as catch_, dG as map$4, dH as fromNullishOr, a_ as all$1, x as mapError, dI as logDebug, dJ as annotateLogs, dK as withSpan, ax as catchTag, dL as logInfo, dM as catchDefect, dN as filterOrFail, dO as make$1n, dP as Number$1, dQ as encodeEffect, k as decodeUnknownEffect, aY as succeedNone, a7 as isReadonlyArrayNonEmpty, dR as asSome, dS as mutable, A as ArraySchema, dT as NoSuchElementError, dU as Literals, b0 as Number$2, aC as Struct, b9 as NullOr, dV as FileSystem, dW as orElseSucceed, dX as chatFolder, dY as ProjectKind, b4 as promise$1, aS as callback, dZ as sleep$3, d_ as forkDetach, d$ as succeed$3, e0 as loginCommand, e1 as decodeUnknownOption, am as isNone, e2 as Boolean$1, aK as fromJsonString, L as Literal, e3 as Unknown, e4 as toArray, aI as seconds, f as optionalKey, aN as unbounded$1, e5 as minutes, e6 as cachedWithTTL, e7 as addFinalizer$1, e8 as acquireUseRelease, e9 as callback$1, ea as offer, be as tryPromise, eb as withPermit, ec as toAsyncIterable, ed as timeout, aO as endUnsafe, ee as ignore$1, ef as shutdownUnsafe, bb as try_$1, eg as forkIn, eh as fromAsyncIterable, ei as runForEach, ej as pretty, ek as ensuring$1, el as currentTimeMillis, em as sum, en as CLAUDE_EFFORT_LEVELS, eo as publishedArtifactId, ep as PUBLISH_DOCUMENT_TOOL, eq as PUBLISH_ARTIFACT_TOOL, er as isDone, es as empty$6, et as succeed$4, eu as fromIterable$3, ev as flatMap$2, ew as interruptWhen, ex as concat, ey as fromEffectDrain, ez as fromIterableEffect, eA as fromEffect, eB as suspend$1, eC as unlistedModel, eD as tap$2, eE as make$1o, eF as tick, eG as map$5, eH as drop, eI as merge$4, eJ as onInterrupt, aR as timeoutOrElse, eK as format$3, eL as getOrNull, eM as Record, eN as make$1p, eO as make$1q, aa as take, eP as join$2, ab as raceFirst, eQ as end, eR as forkScoped, eS as isObject$2, J as getOrElse, eT as logWarning, eU as repeat, eV as option, eW as delay, eX as effectContext, az as make$1r, eY as provide$2, eZ as monotonicTimeNanos, e_ as retry$3, e$ as spaced, f0 as die$1, f1 as PRIVATE_NETWORKS, f2 as effectDiscard, f3 as provideMerge, f4 as UpdatableProviderId, f5 as decodeUnknownSync, f6 as spawnsSubagent, f7 as isPublishArtifactTool, f8 as outputText, f9 as publishedArtifact, fa as toolArgument, fb as isPublishDocumentTool, fc as subscribe, fd as fromSubscription, fe as publish, ff as defaultSettings, fg as Settings$1, fh as AgentProfile, fi as Void, fj as AccountProviderId, fk as filter$1, fl as AgentAccount, fm as isRunAgentTool, b3 as ProviderId, fn as presetModels, fo as encodeSync, an as succeed$5, fp as mergeAll, b8 as PushEvent, fq as filter$2, fr as take$1, fs as runDrain, ft as forever, fu as never$1, fv as min, l as logError, fw as ChildProcessSpawner, fx as make$1s, fy as mkString, fz as decodeText$1, fA as ForkPoint, fB as TokenUsage, fC as MessagePart, fD as Message, fE as PullRequestComment, fF as DiffSide, fG as omit$1, fH as subtract, fI as PULL_REQUEST_REFRESH, ad as catchTags, fJ as parseGitHubRepository, fK as parseGitHubPullRequestUrl, I as Int, fL as request$2, fM as Class, fN as ProjectAction, fO as Project, fP as BooleanFromBit, fQ as Worktree, fR as timeoutOption, bd as isThreadBusy, ba as ThreadStatus, fS as ScheduledMessage, fT as QueuedMessage, fU as UsageLimit, aG as Thread, fV as PullRequestWatch, fW as PullRequestLink, fX as allWatchEventKinds, fY as transcriptThreadId, fZ as resumeGraceMs, f_ as fail$3, f$ as WAIT_AGENT_TOOL, bf as tapError, g0 as commonjsGlobal, g1 as isMaxLength, g2 as schedule, aQ as RpcMethods, g3 as BrowserFrame, g4 as PagePick, g5 as defaultClientSettings, g6 as ClientSettings$1, g7 as parsePairingUrl, g8 as pairingUrl, g9 as Environment, ag as getOrUndefined$1, ay as result$1, ga as relayWebSocketUrl, gb as remoteWebSocketUrl, aV as WebSocket, aL as ServerFrame, gc as CHALLENGE_WAIT_MS, aT as methodKind, gd as race, ge as dialPlan, gf as REMOTE_PROTOCOL_VERSION, gg as DIRECT_CHECK_INTERVAL_MS, gh as DIRECT_CHECK_TIMEOUT_MS, gi as LinearIssue, gj as externalSpan, ae as fromUndefinedOr, gk as zero$1, gl as fromInput$2, gm as badArgument, gn as isSchemaError, go as isNoSuchElementError, gp as StackTrace, gq as mapEager, gr as updateContext$1, gs as makeUnsafe$8, gt as tag$2, gu as Error$2, gv as fromInputUnsafe$1, gw as Path, gx as run$5, gy as mebibytes, gz as Class$1, gA as constFalse, gB as withLogSpan, gC as log, gD as Tracer, gE as nativeTracer, gF as hasInterrupts$1, gG as succeed$6, gH as setStackTraceLimit, gI as fail$4, gJ as getStackTraceLimit, gK as fiberEnterUninterruptibleUnsafe, gL as contA, gM as effectIsExit, gN as closeUnsafe, gO as contE, gP as reportCauseUnsafe, gQ as matchCauseEffectEager, gR as flatMapEager, gS as fromReadable, gT as toArrayBuffer, G as cached$1, gU as layer$Q, gV as pipeThroughDuplex, gW as toUint8Array, bh as layer$R, a$ as fromResult, gX as WebSocketServer, gY as orDie$1, gZ as runForEachArray, g_ as interruptible, g$ as die$2, h0 as merge$5, h1 as succeedContext, h2 as unwrap$1, h3 as withFiberSucceed, h4 as reverse, h5 as getOrUndefinedUnsafe, h6 as CurrentMemoMap, a0 as empty$7, h7 as fiberEnterInterruptibleUnsafe, h8 as compose$1, h9 as Timestamp, ha as AutomationTrigger, hb as AutomationRun, hc as launch, s as squash, hd as Duration, he as DateTimeUtc, hf as withConstructorDefault, hg as withDecodingDefault, hh as Redacted, hi as Tuple$1, hj as isRedacted, hk as MutableJson, af as isNotUndefined, hl as Never, aj as empty$8, hm as toJsonSchemaDocument, hn as annotateCurrentSpan, ho as isUndefined, hp as failCause$2, hq as forkChild, hr as catch_$1, hs as isSchemaError$1, ht as failCause$3, hu as mapEffect, hv as onEnd, hw as isSchema, aP as encodeUnknownEffect, hx as annotate, hy as fail$5, hz as make$1t, hA as declare, hB as isStream, hC as Class$2, hD as Exit, bg as provide$3, hE as provideContext$1, hF as StructWithRest, hG as Opaque, hH as decodeTo, hI as transformOptional, hJ as flatMap$3, hK as toType, hL as Any, hM as UndefinedOr, hN as Finite, hO as passthrough, hP as JsonObject$3, hQ as Uint8ArrayFromBase64, hR as Json, hS as TemplateLiteral, hT as decode$3, hU as withDefault, hV as isBetween, W as taggedEnum, hW as take$2, hX as toCodecJson, hY as isNullish, hZ as isString, h_ as bounded, h$ as withParentSpan, i0 as die$3, i1 as offerAll, i2 as interrupt$2, i3 as interruptors, i4 as decodeSync, i5 as catchCauseIf, i6 as NonEmptyArray, i7 as decode$4, i8 as decodeUnknownResult, i9 as fn, ia as isTagged, ib as isReadonlyObject, ic as IllegalArgumentError, id as encode$1, ie as collect, ig as catchDone, ih as takeAll, ii as fromArray, ij as whileLoop, ik as isExit, il as matchEffect, im as defaultFormatter, io as logFatal, ip as isDeferred, iq as hasDies, c as constVoid, ir as shutdown, is as Scheduler, it as CurrentLogLevel, q as is$2, iu as decodeEffect, iv as UnknownFromJsonString, iw as ignoreCause, ix as Class$3, iy as TaggedStruct, iz as toEncoded, iA as when$2, iB as threadDeviceId, iC as devicePlatformOf, ao as value$2, M as match$1, iD as runLast, iE as fromOption, iF as RUN_AGENT_TOOL, iG as ARTIFACT_THEME_GUIDE, iH as DeviceUrl, iI as DeviceApp, iJ as DeviceButton, iK as WatchEventKind, iL as isPattern, iM as PendingLink, iN as RelayHostList, iO as RelayMachineList, iP as GuideGroup, iQ as PullRequestGuide, iR as diskFullness, iS as min$1, iT as exponential, iU as desktopOnlyPushes, iV as reachesPhone, iW as mutations, iX as desktopOnlyMethods, iY as isAddressNotUpYet, iZ as ClientFrame, aX as REMOTE_MAX_FRAME_BYTES, aW as REMOTE_PATH, i_ as empty$9, aZ as cliSocketPath, i$ as BindHost, j0 as getAugmentedNamespace, j1 as make$1u, j2 as NativeSpan, j3 as currentTimeNanos, aB as MinimumLogLevel, j4 as isPortInUse } from "./chunks/remote-CwGJoiQN.js";
|
|
9
|
+
import { bi as Tuple, d as dual, ah as assignProperty, b5 as isFailure, at as succeed, au as fail$1, K as some, N as none, bj as hash, bk as equals, ac as pipeArguments, bl as NodeInspectSymbol, bm as toJson, g as format$2, Z as isSome, bn as withFiber, bo as uninterruptibleMask, bp as get$6, bq as Scope, br as flow, bs as fromInputUnsafe, bt as constant, bu as zero, bc as as, bv as addFinalizerExit, v as void_, b1 as forEach, bw as exit, bx as tap$1, $ as sync, av as interrupt, p as fail$2, by as ExceededCapacityError, bz as makeUnsafe$4, bA as makeUnsafe$5, bB as makeUnsafe$6, H as suspend, bC as runForkWith, bD as runIn, bE as hasInterrupts, bF as doneUnsafe, bG as getUnsafe$1, bH as addFinalizer, aw as andThen, bI as _await, bJ as getCurrent, bK as interrupt$1, bL as close, bM as isZero, bN as isFinite$1, bO as Clock, bP as toMillis, _ as flatMap, bQ as millis, a8 as ensuring, bR as void_$1, bS as BaseProto, bT as toSeconds, aH as TaggedError, bU as Error$1, bV as symbol$2, bW as structure, bX as symbol$3, bY as redact$1, bZ as symbolRedactable, O as make$1j, R as Reference, b_ as strictEqual, e as hasProperty, b$ as fromIterable$2, c0 as PipeInspectableProto, c1 as array$2, c2 as make$1k, c3 as makeEquivalence$2, c4 as getOrThrow, c5 as map$1, c6 as try_, c7 as flatMap$1, c8 as combine, c9 as string$2, ca as number$4, cb as optimize, n as succeed$1, cc as Random$1, cd as contextWith, ce as infinity, w as withFiber$1, b as sync$1, cf as updateContext, cg as merge$3, ch as succeed$2, ci as exitHasInterrupts, cj as ClockRef, ck as forkUnsafe, cl as onExitUnsafe, cm as void_$2, cn as fiberInterrupt, co as fiberJoin, cp as filterMap, cq as failVoid, cr as isGreaterThanOrEqualTo$1, cs as LogLevelOrder, aM as acquireRelease, i as isEffect, ct as interruptAs, r as runFork, cu as isFailure$1, h as hasInterruptsOnly, cv as into, cw as asVoid, cx as done, cy as filterInterruptors, cz as interruptAllAs, cA as interruptAll, cB as empty$5, cC as forkUnsafe$1, cD as runPromise, cE as runPromiseWith, cF as runPromiseExit, cG as runPromiseExitWith, cH as runSync, cI as runSyncWith, cJ as runSyncExit, cK as runSyncExitWith, cL as runCallback, cM as runCallbackWith, cN as makeMemoMapUnsafe, aA as provideContext, cO as buildWithMemoMap, cP as flatten, cQ as await_, cR as scopeRemoveFinalizerUnsafe, cS as die, cT as isResult, cU as isSuccess, m as identity, cV as effect, ai as Service$1, cW as contextWith$1, cX as getOrUndefined, al as gen, cY as context, cZ as make$1l, V as map$2, c_ as fromQueue, c$ as unwrap, ap as provideService, d0 as onExit, d1 as failCauseUnsafe, aU 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$1m, dc as provide$1, dd as onError, de as catchIf, df as scope$1, dg as getOption, dh as onExitPrimitive, a as isSuccess$1, di as catchCause, dj as matchCauseEffect, dk as failCause, dl as combine$1, a9 as orDie, dm as add$1, dn as makeUnsafe$7, 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, dB as now, dC as formatIso, a2 as pipe$2, dD as sort, Y as map$3, dE as flatMapNullishOr, dF as catch_, dG as map$4, dH as fromNullishOr, a_ as all$1, x as mapError, dI as logDebug, dJ as annotateLogs, dK as withSpan, ax as catchTag, dL as logInfo, dM as catchDefect, dN as filterOrFail, dO as make$1n, dP as Number$1, dQ as encodeEffect, k as decodeUnknownEffect, aY as succeedNone, a7 as isReadonlyArrayNonEmpty, dR as asSome, dS as mutable, A as ArraySchema, dT as NoSuchElementError, dU as Literals, b0 as Number$2, aC as Struct, b9 as NullOr, dV as FileSystem, dW as orElseSucceed, dX as chatFolder, dY as ProjectKind, b4 as promise$1, aS as callback, dZ as sleep$3, d_ as forkDetach, d$ as succeed$3, e0 as loginCommand, e1 as decodeUnknownOption, am as isNone, e2 as Boolean$1, aK as fromJsonString, L as Literal, e3 as Unknown, e4 as toArray, aI as seconds, f as optionalKey, aN as unbounded$1, e5 as minutes, e6 as cachedWithTTL, e7 as addFinalizer$1, e8 as acquireUseRelease, e9 as callback$1, ea as offer, be as tryPromise, eb as withPermit, ec as toAsyncIterable, ed as timeout, aO as endUnsafe, ee as ignore$1, ef as shutdownUnsafe, bb as try_$1, eg as forkIn, eh as fromAsyncIterable, ei as runForEach, ej as pretty, ek as ensuring$1, el as currentTimeMillis, em as sum, en as CLAUDE_EFFORT_LEVELS, eo as publishedArtifactId, ep as PUBLISH_DOCUMENT_TOOL, eq as PUBLISH_ARTIFACT_TOOL, er as isDone, es as empty$6, et as succeed$4, eu as fromIterable$3, ev as flatMap$2, ew as interruptWhen, ex as concat, ey as fromEffectDrain, ez as fromIterableEffect, eA as fromEffect, eB as suspend$1, eC as unlistedModel, eD as tap$2, eE as make$1o, eF as tick, eG as map$5, eH as drop, eI as merge$4, eJ as onInterrupt, aR as timeoutOrElse, eK as format$3, eL as getOrNull, eM as Record, eN as make$1p, eO as make$1q, aa as take, eP as join$2, ab as raceFirst, eQ as end, eR as forkScoped, eS as isObject$2, J as getOrElse, eT as logWarning, eU as repeat, eV as option, eW as delay, eX as effectContext, az as make$1r, eY as provide$2, eZ as monotonicTimeNanos, e_ as retry$3, e$ as spaced, f0 as die$1, f1 as PRIVATE_NETWORKS, f2 as effectDiscard, f3 as provideMerge, f4 as UpdatableProviderId, f5 as decodeUnknownSync, f6 as spawnsSubagent, f7 as isPublishArtifactTool, f8 as outputText, f9 as publishedArtifact, fa as toolArgument, fb as isPublishDocumentTool, fc as subscribe, fd as fromSubscription, fe as publish, ff as defaultSettings, fg as Settings$1, fh as AgentProfile, fi as Void, fj as AccountProviderId, fk as filter$1, fl as AgentAccount, fm as isRunAgentTool, b3 as ProviderId, fn as presetModels, fo as encodeSync, an as succeed$5, fp as mergeAll, b8 as PushEvent, fq as filter$2, fr as take$1, fs as runDrain, ft as forever, fu as never$1, fv as min, l as logError, fw as ChildProcessSpawner, fx as make$1s, fy as mkString, fz as decodeText$1, fA as ForkPoint, fB as TokenUsage, fC as MessagePart, fD as Message, fE as PullRequestComment, fF as DiffSide, fG as omit$1, fH as subtract, fI as PULL_REQUEST_REFRESH, ad as catchTags, fJ as parseGitHubRepository, fK as parseGitHubPullRequestUrl, I as Int, fL as request$2, fM as Class, fN as ProjectAction, fO as Project, fP as BooleanFromBit, fQ as Worktree, fR as timeoutOption, bd as isThreadBusy, ba as ThreadStatus, fS as ScheduledMessage, fT as QueuedMessage, fU as UsageLimit, aG as Thread, fV as PullRequestWatch, fW as PullRequestLink, fX as allWatchEventKinds, fY as transcriptThreadId, fZ as resumeGraceMs, f_ as fail$3, f$ as WAIT_AGENT_TOOL, bf as tapError, g0 as commonjsGlobal, g1 as isMaxLength, g2 as schedule, aQ as RpcMethods, g3 as BrowserFrame, g4 as PagePick, g5 as defaultClientSettings, g6 as ClientSettings$1, g7 as parsePairingUrl, g8 as pairingUrl, g9 as Environment, ag as getOrUndefined$1, ay as result$1, ga as relayWebSocketUrl, gb as remoteWebSocketUrl, aV as WebSocket, aL as ServerFrame, gc as CHALLENGE_WAIT_MS, aT as methodKind, gd as race, ge as dialPlan, gf as REMOTE_PROTOCOL_VERSION, gg as DIRECT_CHECK_INTERVAL_MS, gh as DIRECT_CHECK_TIMEOUT_MS, gi as LinearIssue, gj as externalSpan, ae as fromUndefinedOr, gk as zero$1, gl as fromInput$2, gm as badArgument, gn as isSchemaError, go as isNoSuchElementError, gp as StackTrace, gq as mapEager, gr as updateContext$1, gs as makeUnsafe$8, gt as tag$2, gu as Error$2, gv as fromInputUnsafe$1, gw as Path, gx as run$5, gy as mebibytes, gz as Class$1, gA as constFalse, gB as withLogSpan, gC as log, gD as Tracer, gE as nativeTracer, gF as hasInterrupts$1, gG as succeed$6, gH as setStackTraceLimit, gI as fail$4, gJ as getStackTraceLimit, gK as fiberEnterUninterruptibleUnsafe, gL as contA, gM as effectIsExit, gN as closeUnsafe, gO as contE, gP as reportCauseUnsafe, gQ as matchCauseEffectEager, gR as flatMapEager, gS as fromReadable, gT as toArrayBuffer, G as cached$1, gU as layer$Q, gV as pipeThroughDuplex, gW as toUint8Array, bh as layer$R, a$ as fromResult, gX as WebSocketServer, gY as orDie$1, gZ as runForEachArray, g_ as interruptible, g$ as die$2, h0 as merge$5, h1 as succeedContext, h2 as unwrap$1, h3 as withFiberSucceed, h4 as reverse, h5 as getOrUndefinedUnsafe, h6 as CurrentMemoMap, a0 as empty$7, h7 as fiberEnterInterruptibleUnsafe, h8 as compose$1, h9 as Timestamp, ha as AutomationTrigger, hb as AutomationRun, hc as launch, s as squash, hd as Duration, he as DateTimeUtc, hf as withConstructorDefault, hg as withDecodingDefault, hh as Redacted, hi as Tuple$1, hj as isRedacted, hk as MutableJson, af as isNotUndefined, hl as Never, aj as empty$8, hm as toJsonSchemaDocument, hn as annotateCurrentSpan, ho as isUndefined, hp as failCause$2, hq as forkChild, hr as catch_$1, hs as isSchemaError$1, ht as failCause$3, hu as mapEffect, hv as onEnd, hw as isSchema, aP as encodeUnknownEffect, hx as annotate, hy as fail$5, hz as make$1t, hA as declare, hB as isStream, hC as Class$2, hD as Exit, bg as provide$3, hE as provideContext$1, hF as StructWithRest, hG as Opaque, hH as decodeTo, hI as transformOptional, hJ as flatMap$3, hK as toType, hL as Any, hM as UndefinedOr, hN as Finite, hO as passthrough, hP as JsonObject$3, hQ as Uint8ArrayFromBase64, hR as Json, hS as TemplateLiteral, hT as decode$3, hU as withDefault, hV as isBetween, W as taggedEnum, hW as take$2, hX as toCodecJson, hY as isNullish, hZ as isString, h_ as bounded, h$ as withParentSpan, i0 as die$3, i1 as offerAll, i2 as interrupt$2, i3 as interruptors, i4 as decodeSync, i5 as catchCauseIf, i6 as NonEmptyArray, i7 as decode$4, i8 as decodeUnknownResult, i9 as fn, ia as isTagged, ib as isReadonlyObject, ic as IllegalArgumentError, id as encode$1, ie as collect, ig as catchDone, ih as takeAll, ii as fromArray, ij as whileLoop, ik as isExit, il as matchEffect, im as defaultFormatter, io as logFatal, ip as isDeferred, iq as hasDies, c as constVoid, ir as shutdown, is as Scheduler, it as CurrentLogLevel, q as is$2, iu as decodeEffect, iv as UnknownFromJsonString, iw as ignoreCause, ix as Class$3, iy as TaggedStruct, iz as toEncoded, iA as when$2, iB as threadDeviceId, iC as devicePlatformOf, ao as value$2, M as match$1, iD as runLast, iE as fromOption, iF as RUN_AGENT_TOOL, iG as ARTIFACT_THEME_GUIDE, iH as DeviceUrl, iI as DeviceApp, iJ as DeviceButton, iK as WatchEventKind, iL as isPattern, iM as PendingLink, iN as RelayHostList, iO as RelayMachineList, iP as GuideGroup, iQ as PullRequestGuide, iR as diskFullness, iS as min$1, iT as exponential, iU as desktopOnlyPushes, iV as reachesPhone, iW as mutations, iX as desktopOnlyMethods, iY as isAddressNotUpYet, iZ as ClientFrame, aX as REMOTE_MAX_FRAME_BYTES, aW as REMOTE_PATH, i_ as empty$9, aZ as cliSocketPath, i$ as BindHost, j0 as getAugmentedNamespace, j1 as make$1u, j2 as NativeSpan, j3 as currentTimeNanos, aB as MinimumLogLevel, j4 as isPortInUse } from "./chunks/remote-hGWSrZQV.js";
|
|
10
10
|
import Se__default from "fs";
|
|
11
11
|
import require$$0 from "util";
|
|
12
12
|
import require$$1$1 from "stream";
|
|
@@ -7805,6 +7805,7 @@ const exec = (file, args) => callback((resume) => {
|
|
|
7805
7805
|
execFile(
|
|
7806
7806
|
file,
|
|
7807
7807
|
args,
|
|
7808
|
+
{ timeout: 1e4, killSignal: "SIGKILL" },
|
|
7808
7809
|
(error2, stdout) => resume(
|
|
7809
7810
|
error2 && typeof error2.code !== "number" ? fail$2(new PortsError({ message: `Could not run ${file}: ${error2.message}` })) : succeed$1(stdout)
|
|
7810
7811
|
)
|
|
@@ -8197,6 +8198,7 @@ const providerInfo = {
|
|
|
8197
8198
|
installUrl: "https://code.claude.com/docs/en/setup",
|
|
8198
8199
|
steersRunningTurn: true,
|
|
8199
8200
|
autoCompacts: true,
|
|
8201
|
+
movesCommandsToBackground: true,
|
|
8200
8202
|
subagentModels: "listed"
|
|
8201
8203
|
},
|
|
8202
8204
|
codex: {
|
|
@@ -8205,6 +8207,7 @@ const providerInfo = {
|
|
|
8205
8207
|
installUrl: "https://learn.chatgpt.com/docs/codex/cli",
|
|
8206
8208
|
steersRunningTurn: true,
|
|
8207
8209
|
autoCompacts: true,
|
|
8210
|
+
movesCommandsToBackground: false,
|
|
8208
8211
|
subagentModels: "listed"
|
|
8209
8212
|
},
|
|
8210
8213
|
muse: {
|
|
@@ -8213,6 +8216,7 @@ const providerInfo = {
|
|
|
8213
8216
|
installUrl: "https://dev.meta.ai/docs/muse-code",
|
|
8214
8217
|
steersRunningTurn: true,
|
|
8215
8218
|
autoCompacts: true,
|
|
8219
|
+
movesCommandsToBackground: false,
|
|
8216
8220
|
subagentModels: "listed"
|
|
8217
8221
|
},
|
|
8218
8222
|
opencode: {
|
|
@@ -8221,6 +8225,7 @@ const providerInfo = {
|
|
|
8221
8225
|
installUrl: "https://opencode.ai/docs",
|
|
8222
8226
|
steersRunningTurn: false,
|
|
8223
8227
|
autoCompacts: false,
|
|
8228
|
+
movesCommandsToBackground: false,
|
|
8224
8229
|
subagentModels: "picked"
|
|
8225
8230
|
}
|
|
8226
8231
|
};
|
|
@@ -45283,6 +45288,17 @@ const layer$N = effect(
|
|
|
45283
45288
|
catch: agentError("Failed to stop the background task")
|
|
45284
45289
|
})
|
|
45285
45290
|
);
|
|
45291
|
+
}),
|
|
45292
|
+
moveCommand: (threadId, callId) => suspend(() => {
|
|
45293
|
+
const session = sessions.get(threadId);
|
|
45294
|
+
if (session === void 0) return succeed$1(false);
|
|
45295
|
+
return lease(
|
|
45296
|
+
session,
|
|
45297
|
+
(leased) => tryPromise({
|
|
45298
|
+
try: () => leased.query.backgroundTasks(callId),
|
|
45299
|
+
catch: agentError("Failed to move the command to the background")
|
|
45300
|
+
})
|
|
45301
|
+
);
|
|
45286
45302
|
})
|
|
45287
45303
|
},
|
|
45288
45304
|
steer,
|
|
@@ -60800,6 +60816,7 @@ const routes = {
|
|
|
60800
60816
|
"subagents.transcript": thread,
|
|
60801
60817
|
"backgroundTasks.list": thread,
|
|
60802
60818
|
"backgroundTasks.stop": thread,
|
|
60819
|
+
"backgroundTasks.moveCommand": thread,
|
|
60803
60820
|
"pullRequests.list": thread,
|
|
60804
60821
|
"pullRequests.unlink": thread,
|
|
60805
60822
|
"pullRequests.create": thread,
|
|
@@ -60871,7 +60888,7 @@ const isNewer = (latest, current) => {
|
|
|
60871
60888
|
const installedVersion = (provider) => gen(function* () {
|
|
60872
60889
|
const path2 = yield* installedBinary(provider, provider);
|
|
60873
60890
|
const { stdout } = yield* tryPromise({
|
|
60874
|
-
try: () => execFileAsync$4(path2, ["--version"], { encoding: "utf8", timeout: 1e4 }),
|
|
60891
|
+
try: () => execFileAsync$4(path2, ["--version"], { encoding: "utf8", timeout: 1e4, killSignal: "SIGKILL" }),
|
|
60875
60892
|
catch: () => new AgentError({ provider, message: `Could not read the version of ${path2}` })
|
|
60876
60893
|
});
|
|
60877
60894
|
const version2 = parseVersion(stdout);
|
|
@@ -60901,7 +60918,7 @@ const availableUpdates = map$2(
|
|
|
60901
60918
|
const installUpdate = (provider) => gen(function* () {
|
|
60902
60919
|
const path2 = yield* installedBinary(provider, provider);
|
|
60903
60920
|
yield* tryPromise({
|
|
60904
|
-
try: () => execFileAsync$4(path2, ["update"], { encoding: "utf8", timeout: UPDATE_TIMEOUT_MS }),
|
|
60921
|
+
try: () => execFileAsync$4(path2, ["update"], { encoding: "utf8", timeout: UPDATE_TIMEOUT_MS, killSignal: "SIGKILL" }),
|
|
60905
60922
|
catch: (cause) => new AgentError({
|
|
60906
60923
|
provider,
|
|
60907
60924
|
message: `\`${provider} update\` failed: ${cause.stderr?.trim() || String(cause)}`
|
|
@@ -62244,12 +62261,32 @@ class CommandError extends TaggedError$1()("CommandError", {
|
|
|
62244
62261
|
return `${this.command} ${this.args.join(" ")} failed: ${detail}`;
|
|
62245
62262
|
}
|
|
62246
62263
|
}
|
|
62264
|
+
const TIMED_OUT_EXIT_CODE = 124;
|
|
62265
|
+
const DEFAULT_TIMEOUT = "5 minutes";
|
|
62266
|
+
const LONG_TIMEOUT = "1 hour";
|
|
62247
62267
|
const REMOTE_GIT_ARGS = ["-c", "credential.helper=", "-c", "credential.helper=!gh auth git-credential"];
|
|
62248
62268
|
const REMOTE_GIT_ENV = { GIT_TERMINAL_PROMPT: "0" };
|
|
62249
62269
|
const NO_OPTIONAL_LOCKS_ENV = { GIT_OPTIONAL_LOCKS: "0" };
|
|
62270
|
+
const failAfter = (timeout2, command, args) => timeoutOrElse({
|
|
62271
|
+
duration: timeout2,
|
|
62272
|
+
orElse: () => fail$2(
|
|
62273
|
+
new CommandError({
|
|
62274
|
+
command,
|
|
62275
|
+
args,
|
|
62276
|
+
exitCode: TIMED_OUT_EXIT_CODE,
|
|
62277
|
+
stderr: `timed out after ${format$3(fromInputUnsafe(timeout2))}`
|
|
62278
|
+
})
|
|
62279
|
+
)
|
|
62280
|
+
});
|
|
62250
62281
|
const makeExec = (spawner) => (command, args, cwd, options) => gen(function* () {
|
|
62251
62282
|
const handle = yield* spawner.spawn(
|
|
62252
|
-
make$1s(command, args, {
|
|
62283
|
+
make$1s(command, args, {
|
|
62284
|
+
cwd,
|
|
62285
|
+
stdin: "ignore",
|
|
62286
|
+
env: options?.env,
|
|
62287
|
+
extendEnv: true,
|
|
62288
|
+
forceKillAfter: "3 seconds"
|
|
62289
|
+
})
|
|
62253
62290
|
);
|
|
62254
62291
|
const [stdout, stderr, exitCode] = yield* all$1(
|
|
62255
62292
|
[
|
|
@@ -62265,6 +62302,7 @@ const makeExec = (spawner) => (command, args, cwd, options) => gen(function* ()
|
|
|
62265
62302
|
return stdout;
|
|
62266
62303
|
}).pipe(
|
|
62267
62304
|
scoped,
|
|
62305
|
+
failAfter(options?.timeout ?? DEFAULT_TIMEOUT, command, args),
|
|
62268
62306
|
catchTag(
|
|
62269
62307
|
"PlatformError",
|
|
62270
62308
|
(cause) => fail$2(new CommandError({ command, args, exitCode: -1, stderr: cause.message }))
|
|
@@ -62324,7 +62362,7 @@ class Git extends Service$1()("hinacode/Git") {
|
|
|
62324
62362
|
const make$Z = gen(function* () {
|
|
62325
62363
|
const exec2 = makeExec(yield* ChildProcessSpawner);
|
|
62326
62364
|
const run2 = (cwd, args, options) => exec2("git", ["-C", cwd, ...args], cwd, { ...options, env: { ...NO_OPTIONAL_LOCKS_ENV, ...options?.env } });
|
|
62327
|
-
const remote = (cwd, args) => run2(cwd, [...REMOTE_GIT_ARGS, ...args], { env: REMOTE_GIT_ENV });
|
|
62365
|
+
const remote = (cwd, args) => run2(cwd, [...REMOTE_GIT_ARGS, ...args], { env: REMOTE_GIT_ENV, timeout: LONG_TIMEOUT });
|
|
62328
62366
|
const log2 = (cwd, limit2) => run2(cwd, [
|
|
62329
62367
|
"log",
|
|
62330
62368
|
"--branches",
|
|
@@ -63165,6 +63203,7 @@ const decodePullRequestMatches = decodeUnknownEffect(
|
|
|
63165
63203
|
class GitHub extends Service$1()("hinacode/GitHub") {
|
|
63166
63204
|
}
|
|
63167
63205
|
const SIGNED_OUT_EXIT_CODE = 4;
|
|
63206
|
+
const GH_TIMEOUT = "1 minute";
|
|
63168
63207
|
const RATE_LIMITED = /rate limit/i;
|
|
63169
63208
|
const SECONDARY_PAUSE_MS = 6e4;
|
|
63170
63209
|
const MAX_SECONDARY_PAUSE_MS = 15 * 6e4;
|
|
@@ -63178,7 +63217,7 @@ const make$X = gen(function* () {
|
|
|
63178
63217
|
const exec2 = makeExec(yield* ChildProcessSpawner);
|
|
63179
63218
|
const events2 = yield* Events;
|
|
63180
63219
|
const layerScope = yield* scope$1;
|
|
63181
|
-
const ghUnpaused = (cwd, args, options) => exec2("gh", args, cwd, { ...options, env: { GH_PROMPT_DISABLED: "1", NO_COLOR: "1" } }).pipe(
|
|
63220
|
+
const ghUnpaused = (cwd, args, options) => exec2("gh", args, cwd, { timeout: GH_TIMEOUT, ...options, env: { GH_PROMPT_DISABLED: "1", NO_COLOR: "1" } }).pipe(
|
|
63182
63221
|
mapError((error2) => {
|
|
63183
63222
|
if (error2.exitCode === -1) return new GitHubCliMissingError();
|
|
63184
63223
|
if (error2.exitCode === SIGNED_OUT_EXIT_CODE) return new GitHubSignedOutError();
|
|
@@ -63233,9 +63272,9 @@ const make$X = gen(function* () {
|
|
|
63233
63272
|
currentTimeMillis,
|
|
63234
63273
|
(now2) => now2 < pausedUntil ? fail$2(new GitHubRateLimitedError({ resetsAt: pausedUntil })) : void_
|
|
63235
63274
|
);
|
|
63236
|
-
const gh = (cwd, args) => gen(function* () {
|
|
63275
|
+
const gh = (cwd, args, options) => gen(function* () {
|
|
63237
63276
|
yield* failIfPaused;
|
|
63238
|
-
const stdout = yield* ghUnpaused(cwd, args).pipe(
|
|
63277
|
+
const stdout = yield* ghUnpaused(cwd, args, options).pipe(
|
|
63239
63278
|
catchIf(
|
|
63240
63279
|
(error2) => error2._tag === "CommandError" && RATE_LIMITED.test(error2.stderr),
|
|
63241
63280
|
() => flatMap(pause2, (resetsAt) => fail$2(new GitHubRateLimitedError({ resetsAt })))
|
|
@@ -63290,11 +63329,16 @@ const make$X = gen(function* () {
|
|
|
63290
63329
|
const createPullRequest = (cwd, { head: head2, base }) => gh(cwd, ["pr", "create", "--head", head2, "--base", base, "--fill"]).pipe(
|
|
63291
63330
|
map$2((stdout) => stdout.trim().split("\n").at(-1) ?? "")
|
|
63292
63331
|
);
|
|
63293
|
-
const createRepository = (cwd, visibility) => gh(cwd, ["repo", "create", "--source", cwd, "--remote", "origin", `--${visibility}`, "--push"]
|
|
63332
|
+
const createRepository = (cwd, visibility) => gh(cwd, ["repo", "create", "--source", cwd, "--remote", "origin", `--${visibility}`, "--push"], {
|
|
63333
|
+
timeout: LONG_TIMEOUT
|
|
63334
|
+
}).pipe(asVoid);
|
|
63294
63335
|
const clone2 = ({ owner: owner2, name }, dest) => {
|
|
63295
63336
|
const url2 = `https://github.com/${owner2}/${name}.git`;
|
|
63296
|
-
const gitClone = () => exec2("git", [...REMOTE_GIT_ARGS, "clone", url2, dest], dirname(dest), {
|
|
63297
|
-
|
|
63337
|
+
const gitClone = () => exec2("git", [...REMOTE_GIT_ARGS, "clone", url2, dest], dirname(dest), {
|
|
63338
|
+
env: REMOTE_GIT_ENV,
|
|
63339
|
+
timeout: LONG_TIMEOUT
|
|
63340
|
+
});
|
|
63341
|
+
return gh(dirname(dest), ["repo", "clone", url2, dest], { timeout: LONG_TIMEOUT }).pipe(
|
|
63298
63342
|
catchTags({
|
|
63299
63343
|
GitHubCliMissingError: gitClone,
|
|
63300
63344
|
GitHubSignedOutError: gitClone,
|
|
@@ -63588,7 +63632,9 @@ const make$W = gen(function* () {
|
|
|
63588
63632
|
return yield* new ProjectOriginTakenError({ rootPath });
|
|
63589
63633
|
}
|
|
63590
63634
|
if (!(yield* succeeds(git2.run(rootPath, ["rev-parse", "--verify", "HEAD"])))) {
|
|
63591
|
-
yield* git2.run(rootPath, ["commit", "--only", "--allow-empty", "-m", "Initial commit"]
|
|
63635
|
+
yield* git2.run(rootPath, ["commit", "--only", "--allow-empty", "-m", "Initial commit"], {
|
|
63636
|
+
timeout: LONG_TIMEOUT
|
|
63637
|
+
});
|
|
63592
63638
|
}
|
|
63593
63639
|
yield* github.createRepository(rootPath, visibility);
|
|
63594
63640
|
});
|
|
@@ -64218,9 +64264,11 @@ Setup script exited with code ${exitCode}
|
|
|
64218
64264
|
const path2 = checkout2._tag === "orphan" ? checkout2.path : checkoutPath(checkouts2, branch, id2);
|
|
64219
64265
|
if (checkout2._tag !== "orphan") {
|
|
64220
64266
|
const startPoint = checkout2._tag === "taken" ? input.branch : input.startPoint;
|
|
64221
|
-
yield* git2.run(rootPath, yield* worktreeAddArgs(rootPath, path2, { ...input, branch, startPoint })
|
|
64267
|
+
yield* git2.run(rootPath, yield* worktreeAddArgs(rootPath, path2, { ...input, branch, startPoint }), {
|
|
64268
|
+
timeout: LONG_TIMEOUT
|
|
64269
|
+
});
|
|
64222
64270
|
if (input.workingTree !== void 0) {
|
|
64223
|
-
yield* git2.run(path2, ["read-tree", "-m", "-u", "HEAD", input.workingTree]);
|
|
64271
|
+
yield* git2.run(path2, ["read-tree", "-m", "-u", "HEAD", input.workingTree], { timeout: LONG_TIMEOUT });
|
|
64224
64272
|
yield* git2.run(path2, ["reset", "--quiet"]);
|
|
64225
64273
|
}
|
|
64226
64274
|
}
|
|
@@ -64254,7 +64302,7 @@ Setup script exited with code ${exitCode}
|
|
|
64254
64302
|
if (users.some((thread2) => thread2.id !== owner2 && isThreadBusy(thread2.status))) {
|
|
64255
64303
|
return yield* new RootBusyError({ path: rootPath });
|
|
64256
64304
|
}
|
|
64257
|
-
yield* git2.run(rootPath, ["switch", ...args]);
|
|
64305
|
+
yield* git2.run(rootPath, ["switch", ...args], { timeout: LONG_TIMEOUT });
|
|
64258
64306
|
}).pipe(exclusive);
|
|
64259
64307
|
const checkout = (projectId, ref2, owner2) => gen(function* () {
|
|
64260
64308
|
const { rootPath } = yield* projects.get(projectId);
|
|
@@ -64313,7 +64361,7 @@ Setup script exited with code ${exitCode}
|
|
|
64313
64361
|
});
|
|
64314
64362
|
const deleteFiles = (rootPath, worktree, deleteBranch) => gen(function* () {
|
|
64315
64363
|
if ((yield* registeredCheckouts(rootPath)).some((registered) => registered.path === worktree.path)) {
|
|
64316
|
-
yield* git2.run(rootPath, ["worktree", "remove", "--force", "--force", worktree.path]);
|
|
64364
|
+
yield* git2.run(rootPath, ["worktree", "remove", "--force", "--force", worktree.path], { timeout: LONG_TIMEOUT });
|
|
64317
64365
|
}
|
|
64318
64366
|
yield* git2.run(rootPath, ["worktree", "prune"]);
|
|
64319
64367
|
if (deleteBranch === "force" && (yield* branchExists(rootPath, worktree.branch))) {
|
|
@@ -65044,7 +65092,7 @@ const make$S = gen(function* () {
|
|
|
65044
65092
|
if (worktreeId === null) return yield* new NoBranchError({ threadId });
|
|
65045
65093
|
const worktree = yield* worktrees.get(worktreeId);
|
|
65046
65094
|
if (worktree.status !== "ready") return yield* new NoBranchError({ threadId });
|
|
65047
|
-
yield* git2.run(worktree.path, ["push", "--set-upstream", "origin", worktree.branch]);
|
|
65095
|
+
yield* git2.run(worktree.path, ["push", "--set-upstream", "origin", worktree.branch], { timeout: LONG_TIMEOUT });
|
|
65048
65096
|
const url2 = yield* github.createPullRequest(worktree.path, {
|
|
65049
65097
|
head: worktree.branch,
|
|
65050
65098
|
base: worktree.baseRef.replace(/^origin\//, "")
|
|
@@ -66212,6 +66260,14 @@ const make$Q = gen(function* () {
|
|
|
66212
66260
|
}
|
|
66213
66261
|
yield* tasks.stop(threadId, taskId);
|
|
66214
66262
|
});
|
|
66263
|
+
const moveCommandToBackground = (threadId, callId) => gen(function* () {
|
|
66264
|
+
const { provider: id2 } = yield* threads.get(threadId);
|
|
66265
|
+
const moveCommand = providers[id2].backgroundTasks?.moveCommand;
|
|
66266
|
+
if (moveCommand === void 0) {
|
|
66267
|
+
return yield* new AgentError({ provider: id2, message: "This agent cannot move a command to the background" });
|
|
66268
|
+
}
|
|
66269
|
+
return yield* moveCommand(threadId, callId);
|
|
66270
|
+
});
|
|
66215
66271
|
const hasPendingWakeup = (threadId) => (backgroundTasks.get(threadId) ?? []).some((task) => task.kind === "wakeup");
|
|
66216
66272
|
const closeSessionAfterTurn = (threadId) => gen(function* () {
|
|
66217
66273
|
const turn = yield* get$2(turns, threadId);
|
|
@@ -66361,6 +66417,7 @@ const make$Q = gen(function* () {
|
|
|
66361
66417
|
stopSubagent,
|
|
66362
66418
|
backgroundTasks: (threadId) => sync(() => backgroundTasks.get(threadId) ?? []),
|
|
66363
66419
|
stopBackgroundTask,
|
|
66420
|
+
moveCommandToBackground,
|
|
66364
66421
|
listCommands: (threadId) => gen(function* () {
|
|
66365
66422
|
const thread2 = yield* threads.get(threadId);
|
|
66366
66423
|
const { cwd } = yield* activeWorkspace(threadId);
|
|
@@ -87550,7 +87607,9 @@ const git = (cwd, args) => tryPromise({
|
|
|
87550
87607
|
try: async () => (await execFileAsync$3("git", args, {
|
|
87551
87608
|
cwd,
|
|
87552
87609
|
env: { ...process.env, ...NO_OPTIONAL_LOCKS_ENV },
|
|
87553
|
-
maxBuffer: 64 * 1024 * 1024
|
|
87610
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
87611
|
+
timeout: 5 * 6e4,
|
|
87612
|
+
killSignal: "SIGKILL"
|
|
87554
87613
|
})).stdout,
|
|
87555
87614
|
catch: (cause) => new GitCommandError({
|
|
87556
87615
|
args,
|
|
@@ -88717,7 +88776,11 @@ const installCloudflared = (dir, asset, fetch2) => tryPromise({
|
|
|
88717
88776
|
try {
|
|
88718
88777
|
if (asset.archive === "tgz") {
|
|
88719
88778
|
await writeFile(join$1(staging, "release.tgz"), bytes);
|
|
88720
|
-
await promisify(execFile)("tar", ["-xzf", "release.tgz", executable], {
|
|
88779
|
+
await promisify(execFile)("tar", ["-xzf", "release.tgz", executable], {
|
|
88780
|
+
cwd: staging,
|
|
88781
|
+
timeout: 6e4,
|
|
88782
|
+
killSignal: "SIGKILL"
|
|
88783
|
+
});
|
|
88721
88784
|
await rm(join$1(staging, "release.tgz"));
|
|
88722
88785
|
} else {
|
|
88723
88786
|
await writeFile(join$1(staging, executable), bytes);
|
|
@@ -92724,6 +92787,7 @@ const handlers = {
|
|
|
92724
92787
|
),
|
|
92725
92788
|
"backgroundTasks.list": ({ threadId }) => AgentRunner.use((runner) => runner.backgroundTasks(threadId)),
|
|
92726
92789
|
"backgroundTasks.stop": ({ threadId, taskId }) => AgentRunner.use((runner) => runner.stopBackgroundTask(threadId, taskId)),
|
|
92790
|
+
"backgroundTasks.moveCommand": ({ threadId, callId }) => AgentRunner.use((runner) => runner.moveCommandToBackground(threadId, callId)),
|
|
92727
92791
|
"threads.usage": ({ threadId }) => AgentRunner.use((runner) => runner.usage(threadId)),
|
|
92728
92792
|
"threads.contextBreakdown": ({ threadId }) => AgentRunner.use((runner) => runner.contextBreakdown(threadId)),
|
|
92729
92793
|
"pullRequests.list": ({ threadId }) => PullRequests.use((pullRequests) => pullRequests.list(threadId)),
|
|
@@ -116474,7 +116538,7 @@ const STOP_TIMEOUT_MS = 15e3;
|
|
|
116474
116538
|
const CALL_TIMEOUT_MS = 1e4;
|
|
116475
116539
|
const NO_GRPC = "This emulator was started without its gRPC endpoint. Close it and attach it again from HinaCode.";
|
|
116476
116540
|
const execFileAsync$2 = promisify(execFile);
|
|
116477
|
-
const run$1 = async (file, args, timeout2 = 3e4) => (await execFileAsync$2(file, args, { timeout: timeout2, maxBuffer: 32 * 1024 * 1024, encoding: "utf8" })).stdout;
|
|
116541
|
+
const run$1 = async (file, args, timeout2 = 3e4) => (await execFileAsync$2(file, args, { timeout: timeout2, killSignal: "SIGKILL", maxBuffer: 32 * 1024 * 1024, encoding: "utf8" })).stdout;
|
|
116478
116542
|
const sleep$1 = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
116479
116543
|
const exists = (path2) => access(path2).then(
|
|
116480
116544
|
() => true,
|
|
@@ -117037,7 +117101,8 @@ const LEFT_SHIFT = 225;
|
|
|
117037
117101
|
const run = (command, args, timeout2 = 6e4) => new Promise((resolve2, reject) => {
|
|
117038
117102
|
const child = spawn(command, args, {
|
|
117039
117103
|
stdio: ["ignore", "pipe", "pipe"],
|
|
117040
|
-
timeout: timeout2
|
|
117104
|
+
timeout: timeout2,
|
|
117105
|
+
killSignal: "SIGKILL"
|
|
117041
117106
|
});
|
|
117042
117107
|
const stdout = [];
|
|
117043
117108
|
let stderr = "";
|
|
@@ -117786,7 +117851,7 @@ const make = ({ current, packageRoot: packageRoot2, registry: registry2, restart
|
|
|
117786
117851
|
"--allow-scripts=node-pty",
|
|
117787
117852
|
`hinacode@${version2}`
|
|
117788
117853
|
],
|
|
117789
|
-
{ env: npmEnv, encoding: "utf8", timeout: INSTALL_TIMEOUT_MS }
|
|
117854
|
+
{ env: npmEnv, encoding: "utf8", timeout: INSTALL_TIMEOUT_MS, killSignal: "SIGKILL" }
|
|
117790
117855
|
),
|
|
117791
117856
|
catch: (cause) => new Error(cause.stderr?.trim().split("\n").slice(-3).join("\n") || String(cause))
|
|
117792
117857
|
});
|
|
@@ -117851,7 +117916,8 @@ const loginShellPath = async (shell) => {
|
|
|
117851
117916
|
try {
|
|
117852
117917
|
const run2 = execFileAsync(shell, ["-ilc", `printf '%s' ${START}; printenv PATH; printf '%s' ${END}`], {
|
|
117853
117918
|
encoding: "utf8",
|
|
117854
|
-
timeout: 5e3
|
|
117919
|
+
timeout: 5e3,
|
|
117920
|
+
killSignal: "SIGKILL"
|
|
117855
117921
|
});
|
|
117856
117922
|
run2.child.stdin?.end();
|
|
117857
117923
|
const { stdout: output } = await run2;
|