@webinson/peer-core 0.1.978 → 0.1.981
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.
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./rolldown-runtime-1CwlsFOK.mjs";
|
|
4
4
|
import { $r as isEmpty, A as NullOr, Ar as fromInput$1, B as String$6, C as Literals$2, Cn as inetAddressFromIpString, Cr as Forbidden$1, Ct as decodeUnknownSync, Di as toEpochMillis, E as Never, Ei as toDate, En as unixPathAddress, Et as encodeSync, Fi as Class, Gt as isNonEmpty, H as Struct, Hr as merge, I as Record, Ir as CurrentRedactedNames, J as TrueLiterals, Jr as value, Jt as isSchemaError, Li as TaggedClass, Nr as toRecord, Nt as is, On as assign, Ot as encodeUnknownEffect, Ri as TaggedError$1, Rr as fromInput, S as Literal, Tt as encodeEffect, W as TaggedError, Xr as empty, Y as Tuple, Yn as isNull, Z as URLFromString, Zr as expireCookie, _ as Finite, _i as makeUnsafe, a as BooleanLiterals, ai as decodeString, bt as decodeUnknownExit, c as DateTimeUtc, d as Duration, di as formatIso, dn as toCodecStringTree, dr as transformEffect, fi as isGreaterThan, ft as declare, g as FalseLiterals, gi as make$65, gn as toType, ht as decodeExit, ii as decode, ir as toEncoded, j as Number$2, jr as redactUrl, jt as fromJsonString, k as Null, ki as toUtc, l as DateTimeUtcFromString, li as add, ln as toCodecArrayFromSingle, mi as isLessThan, mt as decodeEffect, n as ArraySchema, ni as set, nn as optional$3, nt as Union, o as Cause, oi as encode, pi as isGreaterThanOrEqualTo, pn as toEquivalence, qr as make$64, qt as isSchema, r as Boolean$4, ri as toSetCookieHeaders, rn as optionalKey, rt as Unknown, si as Equivalence, ti as parseHeader, u as Defect, un as toCodecJson, v as FiniteFromString, vt as decodeTo, wr as InvalidValue$1, xt as decodeUnknownOption, y as Int$5, yi as now, yt as decodeUnknownEffect, z as SchemaError, zi as taggedEnum, zr as fromRecordUnsafe } from "./Schema-Eq619wkO.mjs";
|
|
5
|
-
import { $ as forEach, $i as hasInterrupts, $t as runPromise, Ai as isSuccess, Ar as empty$3, As as findFirst, At as matchEffect, B as filter, Bc as Number$3, Bn as withTracerEnabled, Bo as fromInput$2, Br as tap$1, Bt as promise, C as catchTag, Cc as getOrElse, Cn as tryPromise, Cu as dual, D as context, Dc as isNone, Dl as assignProperty, Dr as effect, Ds as ensure, Dt as match$2, Ec as getOrUndefined, Es as empty$1, Et as mapErrorEager, Eu as memoize, F as exit, Fc as orElse, Fl as equals, Fn as withErrorReporting, Fr as provideMerge, G as findFirst$1, Gi as fail$4, Gr as close, Gs as match$1, Hi as combine$1, Hn as zip, Ho as hours, Hr as Scope, Ht as provideContext, I as fail$2, Ic as some, In as withFiber$1, Ir as succeed$3, It as option, Ji as findErrorOption, Jl as compose, Jr as forkUnsafe, Kt as raceFirst, L as failCause, Lc as toArray, Lt as orDie, M as die, Mc as map$4, Mn as void_, Mo as encode$1, Mr as merge$1, Ms as findLast, Mt as onError, Nc as match, Ni as void_$1, Nr as mergeAll, Ns as flatMapNullishOr, Nt as onExit, On as uninterruptible, Oo as Tracer, Or as effectContext, Os as filter$2, Ot as matchCauseEffect, Ou as pipe, P as ensuring, Pc as none$1, Pr as provide$1, Qa as fnUntraced, Qo as minutes$1, Qr as CurrentLogAnnotations, Qt as runForkWith, Rn as withParentSpan, Ro as days, Rt as orElseSucceed, S as catchReason, Sc as fromUndefinedOr, Sn as timeoutOrElse, Ss as Prototype, St as map$3, T as catch_, Tc as getOrThrow$1, To as MinimumTraceLevel, Tt as mapError, Tu as identity, Ui as die$1, Un as zipWith, Uo as infinity, Ur as addFinalizer, Ut as provideService, Vn as yieldNow, Vo as fromInputUnsafe, Vr as unwrap, Vt as provide, W as filterOrFail, Wr as addFinalizerExit, Ws as map$5, X as fn, Xi as fromReasons, Xo as millis, Xt as retry, Yl as hasProperty, Yr as make$69, Ys as sort, Yt as result, Z as fnUntraced$1, Zo as min, Zr as provide$2, Zt as runFork, _ as catchCauseIf, _c as firstSomeOf, _i as make$68, _o as sync, _s as getUnsafe, a as all, ac as getOrUndefined$1, ai as UnhandledLogLevel, an as scoped, as as toMinutes, b as catchFilter, ba as ConsoleRef, bi as succeed$4, bn as timeout, bs as merge$2, bt as logWithLevel, c as annotateLogs, cc as isSuccess$1, ci as done, cl as isEffect, cn as serviceOption, cr as jittered, cs as Reference, ct as ignore, d as asSome, di as failCause$1, dl as withFiber, dn as succeedNone, ds as empty$2, dt as interruptible, du as isTagged, ea as hasInterruptsOnly, ei as CurrentLogSpans, en as runPromiseWith, et as forever, f as asVoid, fc as succeed$2, fn as succeedSome, fr as spaced, ft as isEffect$1, g as catchCause, ga as prettyErrors, gc as filter$1, gn as tapCause, gt as logError, gu as cast, h as callback, ha as pretty, hc as exists$1, hi as isDone, hl as Class$1, hn as tap, hr as upTo, ht as logDebug, i as addFinalizer$1, ic as getOrThrow, ii as TracerTimingEnabled, in as scope, is as toMillis, it as forkScoped, j as delay, ji as match$3, jr as launch, js as findFirstIndex, jt as never, ju as pipeArguments, k as currentParentSpan, ka as consolePretty$1, kc as isSome, ki as isFailure, kr as effectDiscard, ks as filterMap, l as annotateLogsScoped, ln as sleep$1, lr as modifyDelay, ls as Service, lt as ignoreCause, mc as contains, mn as sync$
|
|
6
|
-
import { $ as SecretRequests, $a as workspaceNameForRef, $c as projectDomainEventForWire, $d as FILL_PREVIEW_VIEWPORT, $f as DesktopBrowserEvent, $g as isWithHeaders, $h as setHeader$1, $i as layer$151, $l as ProcessRunner, $m as limitsServices, $n as codexAuthorizationRequest, $o as layer$103, $p as DEFAULT_PROVIDER_INTERACTION_MODE, $r as firstNonEmptyLine, $s as decodeConfirmedOrigin, $t as layer$122, $u as UsageReadError, A as layer$184, A_ as RunId, Aa as EventSinkV2, Ac as load, Ad as environmentThemeFileHasColors, Af as String$7, Ag as AuthOrchestrationOperateScope, Ah as redirect, Ai as restartContinuationNote, Al as PersistenceSqlError, Am as withScope, An as layer$132, Ao as PeerBrokerKind, Ap as toRouterPath, Ar as NoOpProviderEventLoggers, As as layer$156, At as RELAY_HOOK_DELIVERY_TYP, Au as resolveCommandPath, B as coreLayer, B_ as bytes, Ba as ServerActivation, Bc as THREAD_HISTORY_SNAPSHOT_ROW_LIMIT, Bd as AntigravitySettings, Bf as invalidate, Bg as AuthTerminalReadScope, Bh as MaxBodySize, Bi as historyCost, Bl as SERVICE_STATE_FILE, Bm as TracerDisabledWhen, Bn as layer$162, Bo as withLocalTracing, Bp as OrchestrationV2ThreadShell, Br as PtyAdapter, Bs as pipeThroughDuplex, Bt as ThreadTranscriptTooLargeError, Bu as cliReleaseIndexPageUrl, C as stateStream, C_ as PortSchema, Ca as ThreadCommandExecutor, Cc as version, Cd as FilesystemBrowseError, Cf as Boolean$5, Cg as AuthFilesystemReadScope, Ch as empty$4, Ci as isRestartContinuationSource, Cl as sourceControlRepositorySelector, Cm as serve, Cn as layer$171, Co as parseOriginUrlFromGitConfig, Cp as RelayEnvironmentLinkResponse, Cr as hostPreviewMimeTypeFromExtension, Cs as layer$182, Ct as idFromName, Cu as modelSelectionsEqual, D as PreviewAutomationBroker, D_ as ProviderThreadId, Da as IdAllocatorV2, Dc as fromJsonStringPretty, Dd as EnvironmentThemeFile, Df as NonEmptyString, Dg as AuthMcpClientAccess, Dh as jsonUnsafe, Di as neverStarted, Dl as OrchestrationEventStore, Dm as HttpClient, Dn as ProviderRegistry, Do as resolveCodexHomeLayout, Dp as RelayOkResponse, Dr as endOrphanedNativeSubagent, Ds as ServiceLauncherClient, Dt as RELAY_HEALTH_REQUEST_TYP, Du as mergePathEntries, E as layer$197, E_ as ProviderSessionId, Ea as layer$113, Ec as decodeJsonResult, Ed as GitCommandError, Ef as LogLevel$1, Eg as AuthMcpApprovalError, Eh as isHttpServerResponse, Ei as mergeRestartCancelledBackgroundWork, El as layerFromOrchestrationEventStore, Em as make$75, En as layer$168, Eo as withoutCredentials, Ep as RelayManagedEndpointRecoveryResponse, Er as makeUnavailableUsageLimits, Es as layer$199, Et as getOrCreateEnvironmentKeyPairFromSecretStore, Eu as listLoginShellCandidates, F as issueAttachmentUploadUrl, F_ as decodeString$1, Fa as EffectOutboxV2, Fc as ProjectionStoreThreadNotFoundError, Fd as ExternalLauncherUnknownEditorError, Ff as option$1, Fg as AuthRelayWriteScope, Fh as stream$2, Fi as attachmentTokenAllowance, Fl as void_$2, Fm as set$2, Fn as layer$153, Fo as waitForSocketGone, Fp as OrchestrationV2GetShellSnapshotError, Fr as layerJson, Fs as ServerSettingsService, Ft as normalizeRelayIssuer, Fu as make$72, G as peerPlugins, Ga as PeerState, Gc as chatAttachmentStableKey, Gd as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Gf as BUILT_IN_BROWSER_PROFILES, Gg as getResponseEncoding, Gh as bodyJson, Gi as layer$129, Gl as parseServiceState, Gm as TypeId$6, Gn as layer$191, Go as NO_SANDBOX_SIGNATURE, Gp as OrchestrationProjectShell, Gr as layer$137, Gs as CLOUD_LINKED_USER_ID, Gt as layer$128, Gu as clientRpcRequiredScopes, H as rpcLayer, Ha as forkParkedFiber, Hc as decodeThreadHistoryCursor, Hd as CodexSettings, Hf as makeWith, Hg as ServerAuthSessionMethod, Hh as inspect$1, Hi as renderHistory, Hl as compareExactServiceVersions, Hm as fromHeaders, Hn as layer$157, Ho as APPARMOR_PROFILE, Hp as latestProviderTurnForAttempt, Hr as layer$190, Hs as toUint8Array, Ht as layerWithLegacyImporter, Hu as RequestInit, I as storeAttachmentUpload, I_ as encode$2, Ia as PROCESS_BOUND_EFFECT_TYPES, Ic as ProjectionStoreV2, Id as ExternalLauncherUnsupportedEditorError, If as schema, Ig as AuthSettingsWriteScope, Ih as text$1, Ii as contextUsageForHandoff, Il as layer$94, Im as update, In as PortDiscovery, Io as EXIT_STATUS, Ip as OrchestrationV2GetThreadProjectionError, Ir as AcpRegistryCatalog, Is as layer$144, It as signRelayJwt, Iu as ChildProcessSpawner, J as WEBHOOK_ROUTE_PREFIX, Ja as remoteOf, Jc as resolveAttachmentPathById, Jd as ServerSettingsError, Jf as findBrowserProfile, Jg as getStatusSuccessSchema, Jh as bodyUrlParams, Ji as layer$119, Jl as PinnedRuntimeInstallError, Jm as schemaSearchParams, Jn as layer$160, Jo as SETUP_SUBCOMMAND, Jp as ProjectMutationError, Jr as BUILT_IN_SOURCE_CONTROL_DRIVERS, Js as HOLD_WEBHOOKS_WHILE_OFFLINE_SECRET, Jt as layerFromProjectStore, Ju as WsRpcGroup, K as ScheduledTaskService, Ka as layer$106, Kc as createDeterministicAttachmentId, Kd as DEFAULT_SERVER_SETTINGS, Kg as getResponseEncodingSchema, Kh as bodyJsonUnsafe, Ki as CheckpointServiceV2, Kl as serviceStateActiveVersion, Km as schemaCookies, Kn as layer$192, Ko as PreviewBrowserLibrariesError, Kp as ProjectListEntriesError, Kr as SourceControlProviderRegistry, Ks as CLOUD_LINK_REVOKED, Kt as layer$131, Ku as RpcScopeAuthorization, L as validateAttachmentUploadToken, L_ as snapshotUnsafe, La as REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS, Lc as layer$96, Ld as ExternalLauncherUnsupportedTargetError, Lf as withDefault$2, Lg as AuthSourceControlWriteScope, Lh as uint8Array$1, Li as handoffBudget, Ll as readOnly, Lm as updateAndGet, Ln as layer$176, Lo as make$76, Lp as OrchestrationV2ProviderSessionJson, Lr as layerFromHost, Ls as redactServerSettingsForClient, Lt as verifyRelayJwt, Lu as CLI_RELEASE_BASE_URL_ENV, M as launchThread, M_ as ThreadId, Ma as layer$112, Mc as resolveSignalEndpoint, Md as ExternalLauncherBrowserSpawnError, Mf as all$1, Mg as AuthPreviewOperateScope, Mh as setBody, Mi as ContextHandoffServiceV2, Ml as makeLiveStreamBudget, Mm as getAndSet, Mn as layer$177, Mo as coreLaunchCommand, Mp as OrchestrationGetWorkflowScriptError, Mr as Protocol, Ms as layer$154, Mt as RELAY_MANAGED_TUNNEL_RECOVERY_TYP, Mu as resolveWindowsEnvironment, N as ATTACHMENT_UPLOAD_ROUTE_PREFIX, N_ as TurnItemId, Na as ProjectStoreV2, Nc as NetService, Nd as ExternalLauncherCommandNotFoundError, Nf as map$6, Ng as AuthProvidersManageScope, Nh as setHeader, Ni as layer$120, Nl as findAll, Nm as make$71, Nn as NativeTelemetryClient, No as readOwner, Np as OrchestrationV2AppThreadJson, Nr as make$81, Ns as writeAllToFileDescriptor, Nt as RELAY_MINT_REQUEST_TYP, Nu as setWindowsPath, O as layer$198, O_ as ProviderTurnId, Oa as deriveThreadFromProviderThread, Oc as fromLenientJson, Od as EnvironmentThemeId, Of as Port, Og as AuthMcpRegistrationError, Oh as mergeCookies, Oi as pendingRestartCancelledBackgroundWork, Ol as layer$108, Om as filterStatusOk$1, On as layer$185, Oo as mergeProviderInstanceEnvironment, Op as RelayProtectedError, Or as endRunlessRootTurns, Os as layer$200, Ot as RELAY_HEALTH_RESPONSE_TYP, Ou as readEnvironmentFromLoginShell, P as deletePendingAttachment, P_ as decode$1, Pa as layer$110, Pc as layer$180, Pd as ExternalLauncherEditorSpawnError, Pf as mapEffect$1, Pg as AuthRelayReadScope, Ph as setHeaders, Pi as DEFAULT_HANDOFF_TOKEN_CAP, Pl as findOneOption, Pm as modify, Pn as layer$152, Po as requestHandover, Pp as OrchestrationV2DispatchCommandError, Pr as makeProtocolWithHttpEffectWebsocket, Ps as subscribeBeforeSnapshot, Pt as RELAY_MINT_RESPONSE_TYP, Pu as withPathDirectoryListings, Q as layer$138, Qa as resolveWorkspaceRefName, Qc as normalizeProjectPathForComparison, Qd as resolveProviderInstanceEnabled, Qf as DesktopBrowserCommand, Qg as isStreamUint8Array, Qh as post, Qi as layer$150, Ql as pinnedRuntimeVersionsDir, Qm as isPersistedFile, Qn as makeCodexChatGptAuth, Qo as sandboxDisabled, Qp as ProjectWriteFileError, Qr as detailFromCause, Qs as RELAY_URL_SECRET, Qt as CommandOutputHub, Qu as Service$1, R as PreviewManager, R_ as update$1, Ra as layer$111, Rc as InvalidThreadHistoryCursorError, Rd as ProviderSetupError, Rf as SourceError, Rg as AuthStandardClientScopes, Rh as urlParams, Ri as handoffTokenCapConfig, Rl as SERVICE_LAUNCHER_CONTEXT_ENV, Rm as appendPreResponseHandler, Rn as deriveProviderInstanceConfigMap, Ro as RelayClientTracer, Rp as OrchestrationV2SearchThreadError, Rr as toAcpRegistryOperationError, Rs as decode$2, Rt as makeDrainableWorker, Ru as CLI_RELEASE_CHANNELS, S as layer$179, S_ as NonNegativeInt, Sa as layer$142, Sc as resolveStaticDir, Sd as AgentSessionSource, Sf as Crypto, Sg as AuthEnvironmentScopes, Sh as getType, Si as isAwaitedWork, Sl as canonicalRepositoryKey, Sm as route, Sn as GitWorkflowService, So as parseGitHubRepositoryNameWithOwnerFromRemoteUrl, Sp as RelayEnvironmentLinkChallengeResponse, Sr as audioMimeTypeFromExtension, Ss as ServerEnvironmentIdentity, St as PeerWorkspaces, Su as make$70, T as PreviewBrowser, T_ as ProjectId, Ta as LegacyV1ThreadImporter, Tc as resolveServerBackgroundActivitySettings, Td as OrchestrationDispatchCommandError, Tf as Int$6, Tg as AuthGrantScope, Th as html, Ti as isRestartNoteSource, Tl as layer$95, Tm as HttpServer, Tn as GitManager, To as matchRepositories, Tp as RelayManagedEndpointRecoveryRegistrationResponse, Tr as isWorkspacePreviewEntryPath, Ts as ServerSelfUpdate, Tt as layer$183, Tu as isCommandAvailable, U as PeerAdapters, Ua as layerFromApplicationReceipts, Uc as PENDING_ATTACHMENT_THREAD_SEGMENT, Ud as DATABASE_COMPACTION_RECOMMENDED_BYTES, Uf as set$3, Ug as authScopeRequiredResponse, Uh as schemaBodyJson, Ui as selectHistory, Ul as decodeServiceLauncherChildMessage, Um as HttpServerRequest, Un as layer$155, Uo as APPARMOR_PROFILE_PATH, Up as ToolActivityNativeAppReference, Ur as withWorkspaceLease, Us as CLOUD_ENDPOINT_CONFIRMED_ORIGIN, Ut as withCreationProvenance, Uu as layer$99, V as layer$105, Va as forkParked, Vc as buildBoundedThreadProjection, Vd as ClaudeSettings, Vf as make$80, Vg as EnvironmentAuthorizationError, Vh as TypeId$4, Vi as latestNativeContextUsage, Vl as SERVICE_STOP_MARKER_FILE, Vm as compression$1, Vn as BackgroundPolicy, Vo as withRelayClientTracing, Vp as isOrchestrationV2WorkActive, Vr as PtySpawnError, Vs as toArrayBuffer, Vt as isTerminalRunStatus, Vu as newestCliReleaseVersion, W as PeerPluginRegistry, Wa as layer$109, Wc as attachmentRelativePath, Wd as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, Wf as nextIntBetween, Wg as authScopeResponse, Wh as bearerToken, Wi as isNativeMaintenanceCommand, Wl as isExactServiceVersion, Wm as ParsedSearchParams, Wn as BUILT_IN_USAGE_DRIVERS, Wo as DEBIAN_PACKAGES, Wp as UsageLimitSourceError, Wr as TextGeneration, Ws as CLOUD_ENDPOINT_RUNTIME_CONFIG, Wt as OrchestratorV2, Wu as CLIENT_GUARDED_RPC_SCOPES, X as relayHookBaseUrl, Xa as resolveJjRepoPaths, Xc as runRanAfter, Xd as requiredScopesForProjectMutation, Xf as DesktopAppActivationErrorCode, Xg as isNoContent, Xh as get$2, Xi as layer$175, Xl as pinnedRuntimeCommand, Xm as MultipartError, Xn as sameUsageLimitCommandCoverage, Xo as missingLibraries, Xp as ProjectSearchContentsError, Xr as GitHubCredentials, Xs as RELAY_ENVIRONMENT_CREDENTIAL_SECRET, Xt as ProviderSessionManagerV2, Xu as PEER_RPC_SCOPES, Y as layer$136, Ya as checkoutKind, Yc as parseBase64DataUrl, Yd as ServerSettingsPatch, Yf as resolveBrowserProfiles, Yg as getWithHeadersAnnotation, Yh as del, Yi as CheckpointStore, Yl as ensurePinnedRuntimeInstalled, Ym as toURL, Yn as layer$161, Yo as diagnoseLaunchFailure, Yp as ProjectReadFileError, Yr as layer$149, Ys as PUBLISH_AGENT_ACTIVITY_SECRET, Yt as layer$121, Yu as WsT3RpcGroup, Z as Scheduler, Za as invalidateJjAvailability, Zc as projectComposerContextForProvider, Zd as requiredScopesForServerSettingsPatch, Zf as DesktopAppActivationResponse, Zg as isStreamSchema, Zh as make$82, Zi as VcsDriverRegistry, Zl as pinnedRuntimePaths, Zm as TypeId$5, Zn as withUsageLimitsCommands, Zo as sandboxBlocked, Zp as ProjectSearchEntriesError, Zr as layer$167, Zs as RELAY_ISSUER_SECRET, Zt as layer$123, Zu as PEER_LOCAL_WORKSPACE, _ as layer$195, __ as CommandId, _a as make$84, _c as deriveServerPaths, _d as AssetWorkspaceRootNormalizationError, _f as Stdio, _g as AuthAccessTokenType, _h as causeResponse, _i as isUndeliveredMailboxSteer, _l as threadPullRequestKeyOf, _m as normalize, _n as layer$164, _o as webhookDeliveriesTotal, _p as EnvironmentResourceNotFoundError, _r as layer$158, _s as resolveLegacySessionCookieName, _t as listClients, _u as entriesToAttributes, a_ as DEFAULT_MODEL_BY_PROVIDER, aa as isCheckpointRestoreIsolated, ac as readRelayConnection, ad as AssetGitHubMediaUrlValidationError, af as KeybindingRule, ag as layer$147, ah as CloseEvent, al as injectMcpAppCookieBootstrap, am as VcsRepositoryDetectionError, an as layer$127, ao as makeIsManagedWorktreePath, ap as EnvironmentAuthenticatedPrincipal, ar as codexPlanLabel, as as abytes$1, at as userFacingDispatchErrorMessage, au as layer$189, b as DEVICE_HUB_ROUTE_PREFIX, b_ as IsoDateTime, ba as layer$143, bc as make$77, bd as AgentSessionImportSource, bf as SpanPropagationEnabled, bg as AuthDiagnosticsReadScope, bh as HttpPlatform, bi as cancelledRosterTaskWork, bl as parseChangeRequestUrl, bm as cors, bn as layer$116, bo as resolveWorktreeCleanup, bp as RelayCloudEnvironmentHealthProofPayload, br as WORKSPACE_BROWSER_PREVIEW_EXTENSIONS, bs as timingSafeEqualBase64Url, bt as mcpClient, bu as unknownToAttributeValue, c_ as ProviderInstanceMutation, ca as pluginMcpServers, cc as resolveRootCliCommand, cd as AssetProjectFaviconNotFoundError, cf as ResolvedKeybindingRule, cg as raw, ch as WebSocket$1, ci as layer$201, cl as DEFAULT_KEYBINDINGS, cm as OrchestrationGetTurnDiffError, cn as WorkspaceEntries, co as layer$118, cp as EnvironmentHttpBadRequestError, cr as EMPTY_TOTALS, cs as anumber, ct as ProjectCloneTracker, cu as OtlpProtocol, d_ as CheckpointId, da as ProjectService, dc as isSecretStoreError, dd as AssetWorkspaceAssetInspectionError, df as Terminal, dg as FileSystem, dh as makeWebSocket$1, di as ProviderContinuationRequests, dl as mergeWithDefaultKeybindings, dm as PROVIDER_SEND_TURN_MAX_FILE_BYTES, dn as isProjectFaviconPath, do as increment, dp as EnvironmentHttpForbiddenError, dr as readContainedWorkflowFile, ds as randomBytes, dt as layer$172, du as layerOtlpSerialization, e_ as isWithHeadersValue, ea as JjVcsDriver, ec as decodeRuntimeConfig, ed as PREVIEW_AUTOMATION_SERVER_OPERATIONS, ef as PREVIEW_STREAM_HOST_SETUP_CLOSE_CODE, eg as setHeaders$1, eh as makeConfig, ei as PullRequestProviderError, el as projectThreadProjectionForWire, en as RunExecutionServiceV2, eo as make$79, ep as DESKTOP_UPDATE_RESTART_MARKER_FILE, er as codexCallbackUrl, es as layer$101, et as layer$135, eu as layer$98, f_ as ClientConnectionMethod, fa as layer$114, fc as layer$97, fd as AssetWorkspaceAssetNotFoundError, ff as isQuitError, fg as ExecutionEnvironmentDescriptor, fh as ClientAbort, fi as layer$130, fl as parseKeybindingShortcut, fm as PersistChatAttachmentsError, fn as VcsStatusBroadcaster, fo as metricAttributes, fp as EnvironmentHttpInternalServerError, fr as BUNDLED_MODEL_MANIFEST, fs as toBytes, ft as WorktreeSetupTracker, fu as makeLocalFileTracer, g as PullRequestReviewGuideService, g_ as ClientWebDeployment, ga as layer$140, gc as ServerConfig, gd as AssetWorkspaceResolutionError, gf as set$1, gg as AuthAccessStreamError, gh as ServeError, gi as isBufferedProviderNotification, gl as normalizeThreadPullRequestKey, gm as getSuccessSchemas, gn as layer$163, go as rpcRequestsTotal, gp as EnvironmentRequestInvalidError, gr as resolveProviderCompatibility, gs as isRemoteReachableHost, gt as layer$107, gu as OtlpSerialization, h_ as ClientSurface, ha as RepositoryIdentityResolver, hc as RuntimeMode$1, hd as AssetWorkspacePathValidationError, hf as make$78, hg as AuthAccessReadScope, hh as ResponseError, hi as ProviderInstanceRegistry, hl as legacyThreadPullRequestKey, hm as getErrorSchemas, hn as PullRequestService, ho as rpcRequestDuration, hp as EnvironmentOperationForbiddenError, hr as layerModelCatalog, hs as deriveAuthClientMetadata, ht as ensureShim, hu as make$83, i as layer$194, i_ as DEFAULT_MODEL, ia as SHARED_WORKSPACE_RESTORE_MESSAGE, ic as readHoldWebhooksWhileOffline, id as AssetCreateUrlInput, if as PreviewViewportSetting, ig as isIgnored, ih as Path, ii as agentScopeCommand, il as MCP_APP_MAX_HTML_BYTES, im as pullRequestHostOf, in as RunFinalizationService, io as isFilesystemRoot, ip as EnvironmentAuthenticatedAuth, ir as CodexInstallation, is as Hash, it as layer$134, iu as ProviderLatestVersions, j as dispatchCommand, j_ as RuntimeRequestId, ja as layerFromStores, jc as none$2, jd as EDITORS$1, jf as URL$1, jg as AuthOrchestrationReadScope, jh as removeHeader, ji as reportLabel, jl as bufferLiveStream, jm as get, jn as TerminalManager, jo as coordSocketPath, jp as ORCHESTRATION_V2_WS_METHODS, jr as ProviderEventLoggers, js as DesktopTelemetryReceiver, jt as RELAY_LINK_PROOF_TYP, ju as resolveSpawnCommand, k as ThreadSearch, k_ as RpcClientId, ka as layer$115, kc as layerResourceAttributes, kd as ServerProviderUpdateError, kf as Redacted, kg as AuthMcpTokenError, kh as raw$1, ki as restartCancelledBackgroundWorkNote, kl as PersistenceDecodeError, km as mapRequest, kn as ProjectSetupScriptRunner, ko as expandHomePath$1, kp as fromApi, kr as PluginMcpServers, ks as runServicePreflight, kt as RELAY_HOOK_DELIVERY_HEADER, ku as readPathFromLaunchctl, l_ as defaultInstanceIdForDriver, la as ProjectConflictError, lc as ServerSecretStore, ld as AssetProjectFaviconResolutionError, lf as getCurrentVersion, lg as stream$1, lh as WebSocketConstructor, li as ContextHandoffBudgetError, ll as compileResolvedKeybindingRule, lm as OrchestrationGetTurnDiffResult, ln as layer$181, lo as VcsProcess, lp as EnvironmentHttpCommonError, lr as claudeUsageResponseToLimits, ls as clean, lt as layer$173, lu as causeErrorTag, m_ as ClientOs, ma as layer$139, mc as DEFAULT_PORT, md as AssetWorkspaceContextResolutionError, mf as get$3, mg as ORCHESTRATION_PROTOCOL_QUERY_PARAM, mh as RequestParseError, mi as ProviderAdapterTurnStartError, ml as UNPUBLISHABLE_THEME_IDS, mm as getSlotParseOptions, mn as layerAutoPullPolicy, mo as orchestrationEffectQueueWait, mp as EnvironmentInternalError, mr as layer$187, ms as base64UrlEncode, mt as McpClients, mu as RotatingFileSink, n as McpClientAuthenticator, n_ as encoder, na as isGitImport, nc as encodeEndpointRuntimeConfigJson, nd as McpAppRequestError, nf as PreviewClearProfileError, ng as TypeId$7, nh as decodeField, ni as layer$193, nl as mcpAppFromToolItem, nm as PullRequestLinkedThreadsResult, nn as layer$124, no as colocatedGitCommand, np as RelayClientInstallFailedError, nr as isLoopbackHost$1, ns as sha384, nt as threadHasQueuedTurnStart, nu as makeTargetedProviderUpdateAction, o_ as ProviderDriverKind, oa as PeerWork, oc as resolveCliCommand, od as AssetPreviewTypeValidationError, of as KeybindingsConfig, og as layer$102, oh as SocketError, oi as McpAppModelContext, ol as injectMcpAppThemeBootstrap, om as VcsUnsupportedOperationError, on as layerObserver, oo as managedWorktreesDirectories, op as EnvironmentCloudEndpointUnavailableError, or as codexRateLimitsToLimits, os as aexists, ot as ManagedProjectFolders, ou as DEFAULT_SIGNAL_EXPORT, p_ as ClientDeviceType, pa as ProjectEnrichmentService, pc as writeFileStringAtomically, pd as AssetWorkspaceContextNotFoundError, pf as changes, pg as ORCHESTRATION_PROTOCOL_HEADER, ph as HttpServerError, pi as layerFromProviderInstanceRegistry, pl as BUILT_IN_THEME_IDS, pm as isSecurity, pn as layer$174, po as orchestrationEffectClaimsTotal, pp as EnvironmentHttpUnauthorizedError, pr as ModelManifest, ps as base64UrlDecodeUtf8, pt as layer$169, pu as makeTraceSink, q as ScheduledTaskWebhookOrigin, qa as realpathOrSelf$2, qc as parseAttachmentFileExtension, qd as ServerSettings, qg as getStatusErrorSchema, qh as bodyStream, qi as checkpointRefForScopeOrdinal, ql as serviceStateHasPendingUpdate, qm as schemaHeaders, qn as layer$159, qo as PreviewBrowserSandboxError, qp as ProjectMutation, qr as layer$148, qs as CLOUD_MINT_PUBLIC_KEY, qt as RuntimePolicyV2, qu as WS_METHODS, r_ as AcpRegistryOperationError, ra as parseTurnDiffFilesFromNumstat, rc as isAgentActivityPublishingEnabledValue, rd as AssetAttachmentNotFoundError, rf as PreviewStreamHostSetup, rg as ignore$1, rh as make$74, ri as AgentScope, rl as toolOutputImages, rm as PullRequestOperationError, rn as selectInheritedBackgroundTurnItems, ro as jjCommand, rp as EnvironmentAuthInvalidError, rr as normalizePreviewUrl, rs as sha512, rt as ThreadLaunchService, ru as resolveLatestProviderVersion, s_ as ProviderInstanceId, sa as PeerHubClient, sc as resolveHostCliCommand, sd as AssetProjectFaviconInspectionError, sf as KeybindingsConfigError, sg as layerWeak, sh as SocketOpenError, si as layer$125, sl as mcpAppToolCallableByApp, sm as OrchestrationGetFullThreadDiffError, sn as layer$126, so as GitVcsDriver, sp as EnvironmentHttpApi, sr as layer$188, ss as ahash, st as layer$133, su as OtlpHeadersFromString, t_ as hasBody, ta as layer$145, tc as encodeConfirmedOriginJson, td as SERVER_BROWSER_AUTOMATION_CLIENT_ID, tf as PREVIEW_VIEWPORT_PRESET_IDS, tg as isHttpClientError, th as toPersisted, ti as AnalyticsService, tl as MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH, tm as RuntimeMode, tn as canRouteRelatedSubagent, to as exactStringPattern, tp as DesktopBackendBootstrap, tr as providerAuthReturnUrl, ts as sha256, tt as make$85, tu as enrichProviderSnapshotWithVersionAdvisory, u_ as AuthSessionId, ua as ProjectOperationError, uc as isSecretAlreadyExistsError, ud as AssetSigningKeyLoadError, uf as QuitError, ug as uint8Array, uh as fromWebSocket, ui as makeProviderFailure, ul as compileResolvedKeybindingsConfig, um as ChatAttachmentId, un as PROJECT_FAVICON_FALLBACK_MARKER, uo as layer$146, up as EnvironmentHttpConflictError, ur as makeEventNdjsonLogStore, us as concatBytes$1, ut as SourceControlRepositoryService, uu as decodeOtlpTraceRecords, v as pullRequestSyncKey, v_ as DpopFailureReason, va as ProjectFaviconResolver, vc as ensureServerDirectories, vd as AgentSessionImportProjectChangedError, vf as map$7, vg as AuthAccessWriteScope, vh as symbol, vi as awaitingProviderThreadId, vl as threadPullRequestKeysEqual, vm as RouteContext, vn as layer$166, vo as withMetrics, vp as EnvironmentScopeRequiredError, vr as AntigravityInstallation, vs as resolveSessionCookieName, vt as userBases, vu as fromConfig, w as remoteSshDeviceHosts, w_ as PositiveInt, wa as layer$117, wc as parsePersistedServerObservabilitySettings, wd as OrchestrationSearchThreadsError, wf as ConfigError, wg as AuthFilesystemWriteScope, wh as file, wi as isRestartNoteContinuation, wl as EventStoreV2, wm as use, wn as layer$170, wo as run$4, wp as RelayHookDeliveryProofPayload, wr as isWorkspaceImagePreviewPath, ws as layerIdentity, wt as AgentAwarenessRelay, wu as collectUint8StreamText, x as DeviceService, x_ as MessageId, xa as WorkspacePaths, xc as otlpResource, xd as AgentSessionScanError, xf as isSqlError, xg as AuthEnvironmentMaintainScope, xh as make$73, xi as cancelledTurnItemWork, xl as siblingPullRequestUrl, xm as middleware, xn as layerAnalytics, xo as normalizeGitRemoteUrl, xp as RelayCloudMintCredentialProofPayload, xr as WORKSPACE_IMAGE_PREVIEW_EXTENSIONS, xs as ServerEnvironment, xt as PeerCoordination, xu as layerFlusher, y as layer$196, y_ as EventId, ya as layer$141, yc as layer$100, yd as AgentSessionImportProjectNotFoundError, yf as SqlClient, yg as AuthClientMetadataDeviceType, yh as toResponse, yi as cancelledBeforeStart, yl as visibleThreadPullRequests, ym as add$2, yn as layer$165, yo as resolveProjectSettings, yp as RelayApi, yr as formatThreadTitleContext, ys as signPayload, yt as MCP_CLIENTS, yu as serviceNameUnsafe, z as layer$178, z_ as withAttributes, za as layerPruneWorker, zc as THREAD_HISTORY_PAGE_POLICY, zd as ProviderUploadFeedbackError, zf as get$1, zg as AuthTerminalOperateScope, zh as filterStatusOk, zi as historicalMessage, zl as SERVICE_RESTART_PENDING_FILE, zm as toHandled, zn as layer$186, zo as layer$104, zp as OrchestrationV2ThreadLaunchError, zr as AcpRegistryRuntimeCoordinator, zs as fromReadable, zt as ThreadManagementService, zu as cliReleaseChannelOf } from "./McpHttpServer-FYeLgJUA.mjs";
|
|
5
|
+
import { $ as forEach, $i as hasInterrupts, $t as runPromise, Ai as isSuccess, Ar as empty$3, As as findFirst, At as matchEffect, B as filter, Bc as Number$3, Bn as withTracerEnabled, Bo as fromInput$2, Br as tap$1, Bt as promise, C as catchTag, Cc as getOrElse, Cn as tryPromise, Cu as dual, D as context, Dc as isNone, Dl as assignProperty, Dr as effect, Ds as ensure, Dt as match$2, Ec as getOrUndefined, Es as empty$1, Et as mapErrorEager, Eu as memoize, F as exit, Fc as orElse, Fl as equals, Fn as withErrorReporting, Fr as provideMerge, G as findFirst$1, Gi as fail$4, Gr as close, Gs as match$1, Hi as combine$1, Hn as zip, Ho as hours, Hr as Scope, Ht as provideContext, I as fail$2, Ic as some, In as withFiber$1, Ir as succeed$3, It as option, Ji as findErrorOption, Jl as compose, Jr as forkUnsafe, Kt as raceFirst, L as failCause, Lc as toArray, Lt as orDie, M as die, Mc as map$4, Mn as void_, Mo as encode$1, Mr as merge$1, Ms as findLast, Mt as onError, Nc as match, Ni as void_$1, Nr as mergeAll, Ns as flatMapNullishOr, Nt as onExit, On as uninterruptible, Oo as Tracer, Or as effectContext, Os as filter$2, Ot as matchCauseEffect, Ou as pipe, P as ensuring, Pc as none$1, Pr as provide$1, Qa as fnUntraced, Qo as minutes$1, Qr as CurrentLogAnnotations, Qt as runForkWith, Rn as withParentSpan, Ro as days, Rt as orElseSucceed, S as catchReason, Sc as fromUndefinedOr, Sn as timeoutOrElse, Ss as Prototype, St as map$3, T as catch_, Tc as getOrThrow$1, To as MinimumTraceLevel, Tt as mapError, Tu as identity, Ui as die$1, Un as zipWith, Uo as infinity, Ur as addFinalizer, Ut as provideService, Vn as yieldNow, Vo as fromInputUnsafe, Vr as unwrap, Vt as provide, W as filterOrFail, Wr as addFinalizerExit, Ws as map$5, X as fn, Xi as fromReasons, Xo as millis, Xt as retry, Yl as hasProperty, Yr as make$69, Ys as sort, Yt as result, Z as fnUntraced$1, Zo as min, Zr as provide$2, Zt as runFork, _ as catchCauseIf, _c as firstSomeOf, _i as make$68, _o as sync$1, _s as getUnsafe, a as all, ac as getOrUndefined$1, ai as UnhandledLogLevel, an as scoped, as as toMinutes, b as catchFilter, ba as ConsoleRef, bi as succeed$4, bn as timeout, bs as merge$2, bt as logWithLevel, c as annotateLogs, cc as isSuccess$1, ci as done, cl as isEffect, cn as serviceOption, cr as jittered, cs as Reference, ct as ignore, d as asSome, di as failCause$1, dl as withFiber, dn as succeedNone, ds as empty$2, dt as interruptible, du as isTagged, ea as hasInterruptsOnly, ei as CurrentLogSpans, en as runPromiseWith, et as forever, f as asVoid, fc as succeed$2, fn as succeedSome, fr as spaced, ft as isEffect$1, g as catchCause, ga as prettyErrors, gc as filter$1, gn as tapCause, gt as logError, gu as cast, h as callback, ha as pretty, hc as exists$1, hi as isDone, hl as Class$1, hn as tap, hr as upTo, ht as logDebug, i as addFinalizer$1, ic as getOrThrow, ii as TracerTimingEnabled, in as scope, is as toMillis, it as forkScoped, j as delay, ji as match$3, jr as launch, js as findFirstIndex, jt as never, ju as pipeArguments, k as currentParentSpan, ka as consolePretty$1, kc as isSome, ki as isFailure, kr as effectDiscard, ks as filterMap, l as annotateLogsScoped, ln as sleep$1, lr as modifyDelay, ls as Service, lt as ignoreCause, mc as contains, mn as sync$2, mt as log$1, n as acquireRelease, nc as failVoid, ni as MinimumLogLevel, nn as runSyncExit, ns as sum, nt as forkDetach, o as andThen, oc as isFailure$1, oi as _await, ot as fromResult, ou as isObject, p as cached, pn as suspend, q as flatMap$1, qc as make$67, qs as reduce, qt as repeat, r as acquireUseRelease, ri as TracerEnabled, rn as runSyncWith, ro as loggerMake, rr as exponential, rt as forkIn, ru as isNotUndefined, s as annotateCurrentSpan, si as die$2, ss as zero, st as gen$1, tc as fail$3, tn as runSync, ts as seconds, tu as isNotNull, u as as, ui as fail$5, un as succeed$1, us as add$1, ut as interrupt, v as catchDefect, va as squash, vc as flatMap$2, vi as makeUnsafe$1, vl as format, vn as tapError, vo as tracerLogger$1, vs as make$66, vt as logInfo, w as catchTags, wc as getOrNull, wn as try_, wr as build, wu as flow, x as catchIf, xa as CurrentLoggers$1, xc as fromNullishOr, xn as timeoutOption, xs as omit, xu as constVoid, yc as flatten, ys as makeUnsafe$2, yt as logWarning, zn as withSpan, zo as format$1, zr as sync$3, zs as isReadonlyArrayNonEmpty, zt as partition } from "./Effect-DXlc4A9S.mjs";
|
|
6
|
+
import { $ as SecretRequests, $a as workspaceNameForRef, $c as projectDomainEventForWire, $d as FILL_PREVIEW_VIEWPORT, $f as DesktopBrowserEvent, $g as isWithHeaders, $h as setHeader$1, $i as layer$151, $l as ProcessRunner, $m as limitsServices, $n as codexAuthorizationRequest, $o as layer$103, $p as DEFAULT_PROVIDER_INTERACTION_MODE, $r as firstNonEmptyLine, $s as decodeConfirmedOrigin, $t as layer$122, $u as UsageReadError, A as layer$184, A_ as RunId, Aa as EventSinkV2, Ac as load, Ad as environmentThemeFileHasColors, Af as String$7, Ag as AuthOrchestrationOperateScope, Ah as redirect, Ai as restartContinuationNote, Al as PersistenceSqlError, Am as withScope, An as layer$132, Ao as PeerBrokerKind, Ap as toRouterPath, Ar as NoOpProviderEventLoggers, As as layer$156, At as RELAY_HOOK_DELIVERY_TYP, Au as resolveCommandPath, B as coreLayer, B_ as bytes, Ba as ServerActivation, Bc as THREAD_HISTORY_SNAPSHOT_ROW_LIMIT, Bd as AntigravitySettings, Bf as invalidate, Bg as AuthTerminalReadScope, Bh as MaxBodySize, Bi as historyCost, Bl as SERVICE_STATE_FILE, Bm as TracerDisabledWhen, Bn as layer$162, Bo as withLocalTracing, Bp as OrchestrationV2ThreadShell, Br as PtyAdapter, Bs as pipeThroughDuplex, Bt as ThreadTranscriptTooLargeError, Bu as cliReleaseIndexPageUrl, C as stateStream, C_ as PortSchema, Ca as ThreadCommandExecutor, Cc as version, Cd as FilesystemBrowseError, Cf as Boolean$5, Cg as AuthFilesystemReadScope, Ch as empty$4, Ci as isRestartContinuationSource, Cl as sourceControlRepositorySelector, Cm as serve, Cn as layer$171, Co as parseOriginUrlFromGitConfig, Cp as RelayEnvironmentLinkResponse, Cr as hostPreviewMimeTypeFromExtension, Cs as layer$182, Ct as idFromName, Cu as modelSelectionsEqual, D as PreviewAutomationBroker, D_ as ProviderThreadId, Da as IdAllocatorV2, Dc as fromJsonStringPretty, Dd as EnvironmentThemeFile, Df as NonEmptyString, Dg as AuthMcpClientAccess, Dh as jsonUnsafe, Di as neverStarted, Dl as OrchestrationEventStore, Dm as HttpClient, Dn as ProviderRegistry, Do as resolveCodexHomeLayout, Dp as RelayOkResponse, Dr as endOrphanedNativeSubagent, Ds as ServiceLauncherClient, Dt as RELAY_HEALTH_REQUEST_TYP, Du as mergePathEntries, E as layer$197, E_ as ProviderSessionId, Ea as layer$113, Ec as decodeJsonResult, Ed as GitCommandError, Ef as LogLevel$1, Eg as AuthMcpApprovalError, Eh as isHttpServerResponse, Ei as mergeRestartCancelledBackgroundWork, El as layerFromOrchestrationEventStore, Em as make$75, En as layer$168, Eo as withoutCredentials, Ep as RelayManagedEndpointRecoveryResponse, Er as makeUnavailableUsageLimits, Es as layer$199, Et as getOrCreateEnvironmentKeyPairFromSecretStore, Eu as listLoginShellCandidates, F as issueAttachmentUploadUrl, F_ as decodeString$1, Fa as EffectOutboxV2, Fc as ProjectionStoreThreadNotFoundError, Fd as ExternalLauncherUnknownEditorError, Ff as option$1, Fg as AuthRelayWriteScope, Fh as stream$2, Fi as attachmentTokenAllowance, Fl as void_$2, Fm as set$2, Fn as layer$153, Fo as waitForSocketGone, Fp as OrchestrationV2GetShellSnapshotError, Fr as layerJson, Fs as ServerSettingsService, Ft as normalizeRelayIssuer, Fu as make$72, G as peerPlugins, Ga as PeerState, Gc as chatAttachmentStableKey, Gd as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Gf as BUILT_IN_BROWSER_PROFILES, Gg as getResponseEncoding, Gh as bodyJson, Gi as layer$129, Gl as parseServiceState, Gm as TypeId$6, Gn as layer$191, Go as NO_SANDBOX_SIGNATURE, Gp as OrchestrationProjectShell, Gr as layer$137, Gs as CLOUD_LINKED_USER_ID, Gt as layer$128, Gu as clientRpcRequiredScopes, H as rpcLayer, Ha as forkParkedFiber, Hc as decodeThreadHistoryCursor, Hd as CodexSettings, Hf as makeWith, Hg as ServerAuthSessionMethod, Hh as inspect$1, Hi as renderHistory, Hl as compareExactServiceVersions, Hm as fromHeaders, Hn as layer$157, Ho as APPARMOR_PROFILE, Hp as latestProviderTurnForAttempt, Hr as layer$190, Hs as toUint8Array, Ht as layerWithLegacyImporter, Hu as RequestInit, I as storeAttachmentUpload, I_ as encode$2, Ia as PROCESS_BOUND_EFFECT_TYPES, Ic as ProjectionStoreV2, Id as ExternalLauncherUnsupportedEditorError, If as schema, Ig as AuthSettingsWriteScope, Ih as text$1, Ii as contextUsageForHandoff, Il as layer$94, Im as update, In as PortDiscovery, Io as EXIT_STATUS, Ip as OrchestrationV2GetThreadProjectionError, Ir as AcpRegistryCatalog, Is as layer$144, It as signRelayJwt, Iu as ChildProcessSpawner, J as WEBHOOK_ROUTE_PREFIX, Ja as remoteOf, Jc as resolveAttachmentPathById, Jd as ServerSettingsError, Jf as findBrowserProfile, Jg as getStatusSuccessSchema, Jh as bodyUrlParams, Ji as layer$119, Jl as PinnedRuntimeInstallError, Jm as schemaSearchParams, Jn as layer$160, Jo as SETUP_SUBCOMMAND, Jp as ProjectMutationError, Jr as BUILT_IN_SOURCE_CONTROL_DRIVERS, Js as HOLD_WEBHOOKS_WHILE_OFFLINE_SECRET, Jt as layerFromProjectStore, Ju as WsRpcGroup, K as ScheduledTaskService, Ka as layer$106, Kc as createDeterministicAttachmentId, Kd as DEFAULT_SERVER_SETTINGS, Kg as getResponseEncodingSchema, Kh as bodyJsonUnsafe, Ki as CheckpointServiceV2, Kl as serviceStateActiveVersion, Km as schemaCookies, Kn as layer$192, Ko as PreviewBrowserLibrariesError, Kp as ProjectListEntriesError, Kr as SourceControlProviderRegistry, Ks as CLOUD_LINK_REVOKED, Kt as layer$131, Ku as RpcScopeAuthorization, L as validateAttachmentUploadToken, L_ as snapshotUnsafe, La as REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS, Lc as layer$96, Ld as ExternalLauncherUnsupportedTargetError, Lf as withDefault$2, Lg as AuthSourceControlWriteScope, Lh as uint8Array$1, Li as handoffBudget, Ll as readOnly, Lm as updateAndGet, Ln as layer$176, Lo as make$76, Lp as OrchestrationV2ProviderSessionJson, Lr as layerFromHost, Ls as redactServerSettingsForClient, Lt as verifyRelayJwt, Lu as CLI_RELEASE_BASE_URL_ENV, M as launchThread, M_ as ThreadId, Ma as layer$112, Mc as resolveSignalEndpoint, Md as ExternalLauncherBrowserSpawnError, Mf as all$1, Mg as AuthPreviewOperateScope, Mh as setBody, Mi as ContextHandoffServiceV2, Ml as makeLiveStreamBudget, Mm as getAndSet, Mn as layer$177, Mo as coreLaunchCommand, Mp as OrchestrationGetWorkflowScriptError, Mr as Protocol, Ms as layer$154, Mt as RELAY_MANAGED_TUNNEL_RECOVERY_TYP, Mu as resolveWindowsEnvironment, N as ATTACHMENT_UPLOAD_ROUTE_PREFIX, N_ as TurnItemId, Na as ProjectStoreV2, Nc as NetService, Nd as ExternalLauncherCommandNotFoundError, Nf as map$6, Ng as AuthProvidersManageScope, Nh as setHeader, Ni as layer$120, Nl as findAll, Nm as make$71, Nn as NativeTelemetryClient, No as readOwner, Np as OrchestrationV2AppThreadJson, Nr as make$81, Ns as writeAllToFileDescriptor, Nt as RELAY_MINT_REQUEST_TYP, Nu as setWindowsPath, O as layer$198, O_ as ProviderTurnId, Oa as deriveThreadFromProviderThread, Oc as fromLenientJson, Od as EnvironmentThemeId, Of as Port, Og as AuthMcpRegistrationError, Oh as mergeCookies, Oi as pendingRestartCancelledBackgroundWork, Ol as layer$108, Om as filterStatusOk$1, On as layer$185, Oo as mergeProviderInstanceEnvironment, Op as RelayProtectedError, Or as endRunlessRootTurns, Os as layer$200, Ot as RELAY_HEALTH_RESPONSE_TYP, Ou as readEnvironmentFromLoginShell, P as deletePendingAttachment, P_ as decode$1, Pa as layer$110, Pc as layer$180, Pd as ExternalLauncherEditorSpawnError, Pf as mapEffect$1, Pg as AuthRelayReadScope, Ph as setHeaders, Pi as DEFAULT_HANDOFF_TOKEN_CAP, Pl as findOneOption, Pm as modify, Pn as layer$152, Po as requestHandover, Pp as OrchestrationV2DispatchCommandError, Pr as makeProtocolWithHttpEffectWebsocket, Ps as subscribeBeforeSnapshot, Pt as RELAY_MINT_RESPONSE_TYP, Pu as withPathDirectoryListings, Q as layer$138, Qa as resolveWorkspaceRefName, Qc as normalizeProjectPathForComparison, Qd as resolveProviderInstanceEnabled, Qf as DesktopBrowserCommand, Qg as isStreamUint8Array, Qh as post, Qi as layer$150, Ql as pinnedRuntimeVersionsDir, Qm as isPersistedFile, Qn as makeCodexChatGptAuth, Qo as sandboxDisabled, Qp as ProjectWriteFileError, Qr as detailFromCause, Qs as RELAY_URL_SECRET, Qt as CommandOutputHub, Qu as Service$1, R as PreviewManager, R_ as update$1, Ra as layer$111, Rc as InvalidThreadHistoryCursorError, Rd as ProviderSetupError, Rf as SourceError, Rg as AuthStandardClientScopes, Rh as urlParams, Ri as handoffTokenCapConfig, Rl as SERVICE_LAUNCHER_CONTEXT_ENV, Rm as appendPreResponseHandler, Rn as deriveProviderInstanceConfigMap, Ro as RelayClientTracer, Rp as OrchestrationV2SearchThreadError, Rr as toAcpRegistryOperationError, Rs as decode$2, Rt as makeDrainableWorker, Ru as CLI_RELEASE_CHANNELS, S as layer$179, S_ as NonNegativeInt, Sa as layer$142, Sc as resolveStaticDir, Sd as AgentSessionSource, Sf as Crypto, Sg as AuthEnvironmentScopes, Sh as getType, Si as isAwaitedWork, Sl as canonicalRepositoryKey, Sm as route, Sn as GitWorkflowService, So as parseGitHubRepositoryNameWithOwnerFromRemoteUrl, Sp as RelayEnvironmentLinkChallengeResponse, Sr as audioMimeTypeFromExtension, Ss as ServerEnvironmentIdentity, St as PeerWorkspaces, Su as make$70, T as PreviewBrowser, T_ as ProjectId, Ta as LegacyV1ThreadImporter, Tc as resolveServerBackgroundActivitySettings, Td as OrchestrationDispatchCommandError, Tf as Int$6, Tg as AuthGrantScope, Th as html, Ti as isRestartNoteSource, Tl as layer$95, Tm as HttpServer, Tn as GitManager, To as matchRepositories, Tp as RelayManagedEndpointRecoveryRegistrationResponse, Tr as isWorkspacePreviewEntryPath, Ts as ServerSelfUpdate, Tt as layer$183, Tu as isCommandAvailable, U as PeerAdapters, Ua as layerFromApplicationReceipts, Uc as PENDING_ATTACHMENT_THREAD_SEGMENT, Ud as DATABASE_COMPACTION_RECOMMENDED_BYTES, Uf as set$3, Ug as authScopeRequiredResponse, Uh as schemaBodyJson, Ui as selectHistory, Ul as decodeServiceLauncherChildMessage, Um as HttpServerRequest, Un as layer$155, Uo as APPARMOR_PROFILE_PATH, Up as ToolActivityNativeAppReference, Ur as withWorkspaceLease, Us as CLOUD_ENDPOINT_CONFIRMED_ORIGIN, Ut as withCreationProvenance, Uu as layer$99, V as layer$105, Va as forkParked, Vc as buildBoundedThreadProjection, Vd as ClaudeSettings, Vf as make$80, Vg as EnvironmentAuthorizationError, Vh as TypeId$4, Vi as latestNativeContextUsage, Vl as SERVICE_STOP_MARKER_FILE, Vm as compression$1, Vn as BackgroundPolicy, Vo as withRelayClientTracing, Vp as isOrchestrationV2WorkActive, Vr as PtySpawnError, Vs as toArrayBuffer, Vt as isTerminalRunStatus, Vu as newestCliReleaseVersion, W as PeerPluginRegistry, Wa as layer$109, Wc as attachmentRelativePath, Wd as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, Wf as nextIntBetween, Wg as authScopeResponse, Wh as bearerToken, Wi as isNativeMaintenanceCommand, Wl as isExactServiceVersion, Wm as ParsedSearchParams, Wn as BUILT_IN_USAGE_DRIVERS, Wo as DEBIAN_PACKAGES, Wp as UsageLimitSourceError, Wr as TextGeneration, Ws as CLOUD_ENDPOINT_RUNTIME_CONFIG, Wt as OrchestratorV2, Wu as CLIENT_GUARDED_RPC_SCOPES, X as relayHookBaseUrl, Xa as resolveJjRepoPaths, Xc as runRanAfter, Xd as requiredScopesForProjectMutation, Xf as DesktopAppActivationErrorCode, Xg as isNoContent, Xh as get$2, Xi as layer$175, Xl as pinnedRuntimeCommand, Xm as MultipartError, Xn as sameUsageLimitCommandCoverage, Xo as missingLibraries, Xp as ProjectSearchContentsError, Xr as GitHubCredentials, Xs as RELAY_ENVIRONMENT_CREDENTIAL_SECRET, Xt as ProviderSessionManagerV2, Xu as PEER_RPC_SCOPES, Y as layer$136, Ya as checkoutKind, Yc as parseBase64DataUrl, Yd as ServerSettingsPatch, Yf as resolveBrowserProfiles, Yg as getWithHeadersAnnotation, Yh as del, Yi as CheckpointStore, Yl as ensurePinnedRuntimeInstalled, Ym as toURL, Yn as layer$161, Yo as diagnoseLaunchFailure, Yp as ProjectReadFileError, Yr as layer$149, Ys as PUBLISH_AGENT_ACTIVITY_SECRET, Yt as layer$121, Yu as WsT3RpcGroup, Z as Scheduler, Za as invalidateJjAvailability, Zc as projectComposerContextForProvider, Zd as requiredScopesForServerSettingsPatch, Zf as DesktopAppActivationResponse, Zg as isStreamSchema, Zh as make$82, Zi as VcsDriverRegistry, Zl as pinnedRuntimePaths, Zm as TypeId$5, Zn as withUsageLimitsCommands, Zo as sandboxBlocked, Zp as ProjectSearchEntriesError, Zr as layer$167, Zs as RELAY_ISSUER_SECRET, Zt as layer$123, Zu as PEER_LOCAL_WORKSPACE, _ as layer$195, __ as CommandId, _a as make$84, _c as deriveServerPaths, _d as AssetWorkspaceRootNormalizationError, _f as Stdio, _g as AuthAccessTokenType, _h as causeResponse, _i as isUndeliveredMailboxSteer, _l as threadPullRequestKeyOf, _m as normalize, _n as layer$164, _o as webhookDeliveriesTotal, _p as EnvironmentResourceNotFoundError, _r as layer$158, _s as resolveLegacySessionCookieName, _t as listClients, _u as entriesToAttributes, a_ as DEFAULT_MODEL_BY_PROVIDER, aa as isCheckpointRestoreIsolated, ac as readRelayConnection, ad as AssetGitHubMediaUrlValidationError, af as KeybindingRule, ag as layer$147, ah as CloseEvent, al as injectMcpAppCookieBootstrap, am as VcsRepositoryDetectionError, an as layer$127, ao as makeIsManagedWorktreePath, ap as EnvironmentAuthenticatedPrincipal, ar as codexPlanLabel, as as abytes$1, at as userFacingDispatchErrorMessage, au as layer$189, b as DEVICE_HUB_ROUTE_PREFIX, b_ as IsoDateTime, ba as layer$143, bc as make$77, bd as AgentSessionImportSource, bf as SpanPropagationEnabled, bg as AuthDiagnosticsReadScope, bh as HttpPlatform, bi as cancelledRosterTaskWork, bl as parseChangeRequestUrl, bm as cors, bn as layer$116, bo as resolveWorktreeCleanup, bp as RelayCloudEnvironmentHealthProofPayload, br as WORKSPACE_BROWSER_PREVIEW_EXTENSIONS, bs as timingSafeEqualBase64Url, bt as mcpClient, bu as unknownToAttributeValue, c_ as ProviderInstanceMutation, ca as pluginMcpServers, cc as resolveRootCliCommand, cd as AssetProjectFaviconNotFoundError, cf as ResolvedKeybindingRule, cg as raw, ch as WebSocket$1, ci as layer$201, cl as DEFAULT_KEYBINDINGS, cm as OrchestrationGetTurnDiffError, cn as WorkspaceEntries, co as layer$118, cp as EnvironmentHttpBadRequestError, cr as EMPTY_TOTALS, cs as anumber, ct as ProjectCloneTracker, cu as OtlpProtocol, d_ as CheckpointId, da as ProjectService, dc as isSecretStoreError, dd as AssetWorkspaceAssetInspectionError, df as Terminal, dg as FileSystem, dh as makeWebSocket$1, di as ProviderContinuationRequests, dl as mergeWithDefaultKeybindings, dm as PROVIDER_SEND_TURN_MAX_FILE_BYTES, dn as isProjectFaviconPath, do as increment, dp as EnvironmentHttpForbiddenError, dr as readContainedWorkflowFile, ds as randomBytes, dt as layer$172, du as layerOtlpSerialization, e_ as isWithHeadersValue, ea as JjVcsDriver, ec as decodeRuntimeConfig, ed as PREVIEW_AUTOMATION_SERVER_OPERATIONS, ef as PREVIEW_STREAM_HOST_SETUP_CLOSE_CODE, eg as setHeaders$1, eh as makeConfig, ei as PullRequestProviderError, el as projectThreadProjectionForWire, en as RunExecutionServiceV2, eo as make$79, ep as DESKTOP_UPDATE_RESTART_MARKER_FILE, er as codexCallbackUrl, es as layer$101, et as layer$135, eu as layer$98, f_ as ClientConnectionMethod, fa as layer$114, fc as layer$97, fd as AssetWorkspaceAssetNotFoundError, ff as isQuitError, fg as ExecutionEnvironmentDescriptor, fh as ClientAbort, fi as layer$130, fl as parseKeybindingShortcut, fm as PersistChatAttachmentsError, fn as VcsStatusBroadcaster, fo as metricAttributes, fp as EnvironmentHttpInternalServerError, fr as BUNDLED_MODEL_MANIFEST, fs as toBytes, ft as WorktreeSetupTracker, fu as makeLocalFileTracer, g as PullRequestReviewGuideService, g_ as ClientWebDeployment, ga as layer$140, gc as ServerConfig, gd as AssetWorkspaceResolutionError, gf as set$1, gg as AuthAccessStreamError, gh as ServeError, gi as isBufferedProviderNotification, gl as normalizeThreadPullRequestKey, gm as getSuccessSchemas, gn as layer$163, go as rpcRequestsTotal, gp as EnvironmentRequestInvalidError, gr as resolveProviderCompatibility, gs as isRemoteReachableHost, gt as layer$107, gu as OtlpSerialization, h_ as ClientSurface, ha as RepositoryIdentityResolver, hc as RuntimeMode$1, hd as AssetWorkspacePathValidationError, hf as make$78, hg as AuthAccessReadScope, hh as ResponseError, hi as ProviderInstanceRegistry, hl as legacyThreadPullRequestKey, hm as getErrorSchemas, hn as PullRequestService, ho as rpcRequestDuration, hp as EnvironmentOperationForbiddenError, hr as layerModelCatalog, hs as deriveAuthClientMetadata, ht as ensureShim, hu as make$83, i as layer$194, i_ as DEFAULT_MODEL, ia as SHARED_WORKSPACE_RESTORE_MESSAGE, ic as readHoldWebhooksWhileOffline, id as AssetCreateUrlInput, if as PreviewViewportSetting, ig as isIgnored, ih as Path, ii as agentScopeCommand, il as MCP_APP_MAX_HTML_BYTES, im as pullRequestHostOf, in as RunFinalizationService, io as isFilesystemRoot, ip as EnvironmentAuthenticatedAuth, ir as CodexInstallation, is as Hash, it as layer$134, iu as ProviderLatestVersions, j as dispatchCommand, j_ as RuntimeRequestId, ja as layerFromStores, jc as none$2, jd as EDITORS$1, jf as URL$1, jg as AuthOrchestrationReadScope, jh as removeHeader, ji as reportLabel, jl as bufferLiveStream, jm as get, jn as TerminalManager, jo as coordSocketPath, jp as ORCHESTRATION_V2_WS_METHODS, jr as ProviderEventLoggers, js as DesktopTelemetryReceiver, jt as RELAY_LINK_PROOF_TYP, ju as resolveSpawnCommand, k as ThreadSearch, k_ as RpcClientId, ka as layer$115, kc as layerResourceAttributes, kd as ServerProviderUpdateError, kf as Redacted, kg as AuthMcpTokenError, kh as raw$1, ki as restartCancelledBackgroundWorkNote, kl as PersistenceDecodeError, km as mapRequest, kn as ProjectSetupScriptRunner, ko as expandHomePath$1, kp as fromApi, kr as PluginMcpServers, ks as runServicePreflight, kt as RELAY_HOOK_DELIVERY_HEADER, ku as readPathFromLaunchctl, l_ as defaultInstanceIdForDriver, la as ProjectConflictError, lc as ServerSecretStore, ld as AssetProjectFaviconResolutionError, lf as getCurrentVersion, lg as stream$1, lh as WebSocketConstructor, li as ContextHandoffBudgetError, ll as compileResolvedKeybindingRule, lm as OrchestrationGetTurnDiffResult, ln as layer$181, lo as VcsProcess, lp as EnvironmentHttpCommonError, lr as claudeUsageResponseToLimits, ls as clean, lt as layer$173, lu as causeErrorTag, m_ as ClientOs, ma as layer$139, mc as DEFAULT_PORT, md as AssetWorkspaceContextResolutionError, mf as get$3, mg as ORCHESTRATION_PROTOCOL_QUERY_PARAM, mh as RequestParseError, mi as ProviderAdapterTurnStartError, ml as UNPUBLISHABLE_THEME_IDS, mm as getSlotParseOptions, mn as layerAutoPullPolicy, mo as orchestrationEffectQueueWait, mp as EnvironmentInternalError, mr as layer$187, ms as base64UrlEncode, mt as McpClients, mu as RotatingFileSink, n as McpClientAuthenticator, n_ as encoder, na as isGitImport, nc as encodeEndpointRuntimeConfigJson, nd as McpAppRequestError, nf as PreviewClearProfileError, ng as TypeId$7, nh as decodeField, ni as layer$193, nl as mcpAppFromToolItem, nm as PullRequestLinkedThreadsResult, nn as layer$124, no as colocatedGitCommand, np as RelayClientInstallFailedError, nr as isLoopbackHost$1, ns as sha384, nt as threadHasQueuedTurnStart, nu as makeTargetedProviderUpdateAction, o_ as ProviderDriverKind, oa as PeerWork, oc as resolveCliCommand, od as AssetPreviewTypeValidationError, of as KeybindingsConfig, og as layer$102, oh as SocketError, oi as McpAppModelContext, ol as injectMcpAppThemeBootstrap, om as VcsUnsupportedOperationError, on as layerObserver, oo as managedWorktreesDirectories, op as EnvironmentCloudEndpointUnavailableError, or as codexRateLimitsToLimits, os as aexists, ot as ManagedProjectFolders, ou as DEFAULT_SIGNAL_EXPORT, p_ as ClientDeviceType, pa as ProjectEnrichmentService, pc as writeFileStringAtomically, pd as AssetWorkspaceContextNotFoundError, pf as changes, pg as ORCHESTRATION_PROTOCOL_HEADER, ph as HttpServerError, pi as layerFromProviderInstanceRegistry, pl as BUILT_IN_THEME_IDS, pm as isSecurity, pn as layer$174, po as orchestrationEffectClaimsTotal, pp as EnvironmentHttpUnauthorizedError, pr as ModelManifest, ps as base64UrlDecodeUtf8, pt as layer$169, pu as makeTraceSink, q as ScheduledTaskWebhookOrigin, qa as realpathOrSelf$2, qc as parseAttachmentFileExtension, qd as ServerSettings, qg as getStatusErrorSchema, qh as bodyStream, qi as checkpointRefForScopeOrdinal, ql as serviceStateHasPendingUpdate, qm as schemaHeaders, qn as layer$159, qo as PreviewBrowserSandboxError, qp as ProjectMutation, qr as layer$148, qs as CLOUD_MINT_PUBLIC_KEY, qt as RuntimePolicyV2, qu as WS_METHODS, r_ as AcpRegistryOperationError, ra as parseTurnDiffFilesFromNumstat, rc as isAgentActivityPublishingEnabledValue, rd as AssetAttachmentNotFoundError, rf as PreviewStreamHostSetup, rg as ignore$1, rh as make$74, ri as AgentScope, rl as toolOutputImages, rm as PullRequestOperationError, rn as selectInheritedBackgroundTurnItems, ro as jjCommand, rp as EnvironmentAuthInvalidError, rr as normalizePreviewUrl, rs as sha512, rt as ThreadLaunchService, ru as resolveLatestProviderVersion, s_ as ProviderInstanceId, sa as PeerHubClient, sc as resolveHostCliCommand, sd as AssetProjectFaviconInspectionError, sf as KeybindingsConfigError, sg as layerWeak, sh as SocketOpenError, si as layer$125, sl as mcpAppToolCallableByApp, sm as OrchestrationGetFullThreadDiffError, sn as layer$126, so as GitVcsDriver, sp as EnvironmentHttpApi, sr as layer$188, ss as ahash, st as layer$133, su as OtlpHeadersFromString, t_ as hasBody, ta as layer$145, tc as encodeConfirmedOriginJson, td as SERVER_BROWSER_AUTOMATION_CLIENT_ID, tf as PREVIEW_VIEWPORT_PRESET_IDS, tg as isHttpClientError, th as toPersisted, ti as AnalyticsService, tl as MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH, tm as RuntimeMode, tn as canRouteRelatedSubagent, to as exactStringPattern, tp as DesktopBackendBootstrap, tr as providerAuthReturnUrl, ts as sha256, tt as make$85, tu as enrichProviderSnapshotWithVersionAdvisory, u_ as AuthSessionId, ua as ProjectOperationError, uc as isSecretAlreadyExistsError, ud as AssetSigningKeyLoadError, uf as QuitError, ug as uint8Array, uh as fromWebSocket, ui as makeProviderFailure, ul as compileResolvedKeybindingsConfig, um as ChatAttachmentId, un as PROJECT_FAVICON_FALLBACK_MARKER, uo as layer$146, up as EnvironmentHttpConflictError, ur as makeEventNdjsonLogStore, us as concatBytes$1, ut as SourceControlRepositoryService, uu as decodeOtlpTraceRecords, v as pullRequestSyncKey, v_ as DpopFailureReason, va as ProjectFaviconResolver, vc as ensureServerDirectories, vd as AgentSessionImportProjectChangedError, vf as map$7, vg as AuthAccessWriteScope, vh as symbol, vi as awaitingProviderThreadId, vl as threadPullRequestKeysEqual, vm as RouteContext, vn as layer$166, vo as withMetrics, vp as EnvironmentScopeRequiredError, vr as AntigravityInstallation, vs as resolveSessionCookieName, vt as userBases, vu as fromConfig, w as remoteSshDeviceHosts, w_ as PositiveInt, wa as layer$117, wc as parsePersistedServerObservabilitySettings, wd as OrchestrationSearchThreadsError, wf as ConfigError, wg as AuthFilesystemWriteScope, wh as file, wi as isRestartNoteContinuation, wl as EventStoreV2, wm as use, wn as layer$170, wo as run$4, wp as RelayHookDeliveryProofPayload, wr as isWorkspaceImagePreviewPath, ws as layerIdentity, wt as AgentAwarenessRelay, wu as collectUint8StreamText, x as DeviceService, x_ as MessageId, xa as WorkspacePaths, xc as otlpResource, xd as AgentSessionScanError, xf as isSqlError, xg as AuthEnvironmentMaintainScope, xh as make$73, xi as cancelledTurnItemWork, xl as siblingPullRequestUrl, xm as middleware, xn as layerAnalytics, xo as normalizeGitRemoteUrl, xp as RelayCloudMintCredentialProofPayload, xr as WORKSPACE_IMAGE_PREVIEW_EXTENSIONS, xs as ServerEnvironment, xt as PeerCoordination, xu as layerFlusher, y as layer$196, y_ as EventId, ya as layer$141, yc as layer$100, yd as AgentSessionImportProjectNotFoundError, yf as SqlClient, yg as AuthClientMetadataDeviceType, yh as toResponse, yi as cancelledBeforeStart, yl as visibleThreadPullRequests, ym as add$2, yn as layer$165, yo as resolveProjectSettings, yp as RelayApi, yr as formatThreadTitleContext, ys as signPayload, yt as MCP_CLIENTS, yu as serviceNameUnsafe, z as layer$178, z_ as withAttributes, za as layerPruneWorker, zc as THREAD_HISTORY_PAGE_POLICY, zd as ProviderUploadFeedbackError, zf as get$1, zg as AuthTerminalOperateScope, zh as filterStatusOk, zi as historicalMessage, zl as SERVICE_RESTART_PENDING_FILE, zm as toHandled, zn as layer$186, zo as layer$104, zp as OrchestrationV2ThreadLaunchError, zr as AcpRegistryRuntimeCoordinator, zs as fromReadable, zt as ThreadManagementService, zu as cliReleaseChannelOf } from "./McpHttpServer-B3S4zR3w.mjs";
|
|
7
7
|
import { a as monotonicTimeNanos, i as currentTimeNanos, r as currentTimeMillis, t as Clock } from "./Clock-B88OfuDl.mjs";
|
|
8
8
|
import { A as fromEffect, Bt as zipLatestWith, Dn as unbounded$1, Dt as tap$2, F as fromPull, Fn as unbounded, G as mapAccum, H as isStream, Hn as interrupt$1, I as fromQueue, J as mapError$1, Jn as runIn, K as mapArrayEffect, Kn as join$1, M as fromIterable, Mn as sliding, Mt as toPull, N as fromIteratorSucceed, Nn as subscribe, On as publish, P as fromPubSub, R as fromSubscription, Rn as makeUnsafe$3, Rt as unfold, S as filterMap$1, Sn as shutdown, St as switchMap, T as flattenIterable, Tn as take, U as make$87, Vn as getCurrent, W as map$8, Y as merge$3, Yn as Order, Z as mkString, Zn as round, _n as offer, b as filter$3, bt as succeed$5, c as changesWith, d as decodeText, dt as runFold, et as orDie$1, fn as fail$7, g as encodeText, gn as make$88, gt as runHead, h as empty$5, i as catchCause$1, in as make$86, it as provideContext$1, jn as shutdown$1, l as concat, lt as runCollect, m as drop, mt as runForEachArray, nt as pipeThroughChannel, pn as failCause$2, pt as runForEach, q as mapEffect$2, r as callback$1, s as changes$1, sn as clear, u as debounce, un as end, v as fail$6, vn as offerAll, w as flatMap$3, wn as sliding$1, wt as takeUntil, x as filterEffect, xt as suspend$1, yn as offerUnsafe, yt as splitLines, z as groupedWithin, zn as awaitAll, zt as unwrap$1 } from "./mcpResponsePayloads-Be_jYC4_.mjs";
|
|
9
9
|
import { t as runClaudeHistoryWorker } from "./claudeHistoryWorker-qaiupgMM.mjs";
|
|
@@ -185,7 +185,7 @@ const consoleWith = (f) => withFiber((fiber) => f(fiber.getRef(Console)));
|
|
|
185
185
|
* @category accessors
|
|
186
186
|
* @since 2.0.0
|
|
187
187
|
*/
|
|
188
|
-
const error = (...args) => consoleWith((console) => sync(() => {
|
|
188
|
+
const error = (...args) => consoleWith((console) => sync$1(() => {
|
|
189
189
|
console.error(...args);
|
|
190
190
|
}));
|
|
191
191
|
/**
|
|
@@ -219,7 +219,7 @@ const error = (...args) => consoleWith((console) => sync(() => {
|
|
|
219
219
|
* @category accessors
|
|
220
220
|
* @since 2.0.0
|
|
221
221
|
*/
|
|
222
|
-
const log = (...args) => consoleWith((console) => sync(() => {
|
|
222
|
+
const log = (...args) => consoleWith((console) => sync$1(() => {
|
|
223
223
|
console.log(...args);
|
|
224
224
|
}));
|
|
225
225
|
/**
|
|
@@ -254,7 +254,7 @@ const log = (...args) => consoleWith((console) => sync(() => {
|
|
|
254
254
|
* @category accessors
|
|
255
255
|
* @since 2.0.0
|
|
256
256
|
*/
|
|
257
|
-
const warn = (...args) => consoleWith((console) => sync(() => {
|
|
257
|
+
const warn = (...args) => consoleWith((console) => sync$1(() => {
|
|
258
258
|
console.warn(...args);
|
|
259
259
|
}));
|
|
260
260
|
//#endregion
|
|
@@ -2205,7 +2205,7 @@ const runWithInput = (prompt, terminal, input) => suspend(() => {
|
|
|
2205
2205
|
});
|
|
2206
2206
|
const runLoop = /*#__PURE__*/ fnUntraced$1(function* (loop, terminal, input) {
|
|
2207
2207
|
let state = isEffect$1(loop.initialState) ? yield* loop.initialState : loop.initialState;
|
|
2208
|
-
let action = Action$
|
|
2208
|
+
let action = Action$2.NextFrame({ state });
|
|
2209
2209
|
let clear = "";
|
|
2210
2210
|
while (true) {
|
|
2211
2211
|
const msg = yield* loop.render(state, action);
|
|
@@ -2240,7 +2240,7 @@ const runLoop = /*#__PURE__*/ fnUntraced$1(function* (loop, terminal, input) {
|
|
|
2240
2240
|
}
|
|
2241
2241
|
}
|
|
2242
2242
|
}, (effect, _, terminal) => ensuring(effect, orDie(terminal.display(cursorShow))));
|
|
2243
|
-
const Action$
|
|
2243
|
+
const Action$2 = /*#__PURE__*/ taggedEnum();
|
|
2244
2244
|
/**
|
|
2245
2245
|
* Clears all lines taken up by the specified `text`.
|
|
2246
2246
|
*/
|
|
@@ -2288,7 +2288,7 @@ const renderConfirmSubmission = /*#__PURE__*/ fnUntraced$1(function* (value, opt
|
|
|
2288
2288
|
});
|
|
2289
2289
|
const handleConfirmRender = (options) => {
|
|
2290
2290
|
return (_, action) => {
|
|
2291
|
-
return Action$
|
|
2291
|
+
return Action$2.$match(action, {
|
|
2292
2292
|
Beep: () => succeed$1(renderBeep),
|
|
2293
2293
|
NextFrame: ({ state }) => renderConfirmNextFrame(state, options),
|
|
2294
2294
|
Submit: ({ value }) => renderConfirmSubmission(value, options)
|
|
@@ -2299,10 +2299,10 @@ const TRUE_VALUE_REGEXP = /^y|t$/;
|
|
|
2299
2299
|
const FALSE_VALUE_REGEXP = /^n|f$/;
|
|
2300
2300
|
const handleConfirmProcess = (input, defaultValue) => {
|
|
2301
2301
|
const value = getOrElse(input.input, () => "");
|
|
2302
|
-
if (input.key.name === "enter" || input.key.name === "return") return succeed$1(Action$
|
|
2303
|
-
if (TRUE_VALUE_REGEXP.test(value.toLowerCase())) return succeed$1(Action$
|
|
2304
|
-
if (FALSE_VALUE_REGEXP.test(value.toLowerCase())) return succeed$1(Action$
|
|
2305
|
-
return succeed$1(Action$
|
|
2302
|
+
if (input.key.name === "enter" || input.key.name === "return") return succeed$1(Action$2.Submit({ value: defaultValue }));
|
|
2303
|
+
if (TRUE_VALUE_REGEXP.test(value.toLowerCase())) return succeed$1(Action$2.Submit({ value: true }));
|
|
2304
|
+
if (FALSE_VALUE_REGEXP.test(value.toLowerCase())) return succeed$1(Action$2.Submit({ value: false }));
|
|
2305
|
+
return succeed$1(Action$2.Beep());
|
|
2306
2306
|
};
|
|
2307
2307
|
const handleDateClear = (options) => {
|
|
2308
2308
|
return fnUntraced$1(function* (state, _) {
|
|
@@ -2357,35 +2357,35 @@ const renderDateSubmission = /*#__PURE__*/ fnUntraced$1(function* (state, option
|
|
|
2357
2357
|
});
|
|
2358
2358
|
const processUp = (state) => {
|
|
2359
2359
|
state.dateParts[state.cursor].increment();
|
|
2360
|
-
return Action$
|
|
2360
|
+
return Action$2.NextFrame({ state: {
|
|
2361
2361
|
...state,
|
|
2362
2362
|
typed: ""
|
|
2363
2363
|
} });
|
|
2364
2364
|
};
|
|
2365
2365
|
const processDown = (state) => {
|
|
2366
2366
|
state.dateParts[state.cursor].decrement();
|
|
2367
|
-
return Action$
|
|
2367
|
+
return Action$2.NextFrame({ state: {
|
|
2368
2368
|
...state,
|
|
2369
2369
|
typed: ""
|
|
2370
2370
|
} });
|
|
2371
2371
|
};
|
|
2372
2372
|
const processDateCursorLeft = (state) => {
|
|
2373
2373
|
const previous = state.dateParts[state.cursor].previousPart();
|
|
2374
|
-
if (isSome(previous)) return Action$
|
|
2374
|
+
if (isSome(previous)) return Action$2.NextFrame({ state: {
|
|
2375
2375
|
...state,
|
|
2376
2376
|
typed: "",
|
|
2377
2377
|
cursor: state.dateParts.indexOf(previous.value)
|
|
2378
2378
|
} });
|
|
2379
|
-
return Action$
|
|
2379
|
+
return Action$2.Beep();
|
|
2380
2380
|
};
|
|
2381
2381
|
const processDateCursorRight = (state) => {
|
|
2382
2382
|
const next = state.dateParts[state.cursor].nextPart();
|
|
2383
|
-
if (isSome(next)) return Action$
|
|
2383
|
+
if (isSome(next)) return Action$2.NextFrame({ state: {
|
|
2384
2384
|
...state,
|
|
2385
2385
|
typed: "",
|
|
2386
2386
|
cursor: state.dateParts.indexOf(next.value)
|
|
2387
2387
|
} });
|
|
2388
|
-
return Action$
|
|
2388
|
+
return Action$2.Beep();
|
|
2389
2389
|
};
|
|
2390
2390
|
const processDateNext = (state) => {
|
|
2391
2391
|
const next = state.dateParts[state.cursor].nextPart();
|
|
@@ -2393,7 +2393,7 @@ const processDateNext = (state) => {
|
|
|
2393
2393
|
onNone: () => state.dateParts.findIndex((part) => !part.isToken()),
|
|
2394
2394
|
onSome: (next) => state.dateParts.indexOf(next)
|
|
2395
2395
|
});
|
|
2396
|
-
return Action$
|
|
2396
|
+
return Action$2.NextFrame({ state: {
|
|
2397
2397
|
...state,
|
|
2398
2398
|
typed: "",
|
|
2399
2399
|
cursor
|
|
@@ -2403,12 +2403,12 @@ const defaultDateProcessor = (value, state) => {
|
|
|
2403
2403
|
if (/\d/.test(value)) {
|
|
2404
2404
|
const typed = state.typed + value;
|
|
2405
2405
|
state.dateParts[state.cursor].setValue(typed);
|
|
2406
|
-
return Action$
|
|
2406
|
+
return Action$2.NextFrame({ state: {
|
|
2407
2407
|
...state,
|
|
2408
2408
|
typed
|
|
2409
2409
|
} });
|
|
2410
2410
|
}
|
|
2411
|
-
return Action$
|
|
2411
|
+
return Action$2.Beep();
|
|
2412
2412
|
};
|
|
2413
2413
|
const defaultLocales = {
|
|
2414
2414
|
months: [
|
|
@@ -2460,7 +2460,7 @@ const defaultLocales = {
|
|
|
2460
2460
|
};
|
|
2461
2461
|
const handleDateRender = (options) => {
|
|
2462
2462
|
return (state, action) => {
|
|
2463
|
-
return Action$
|
|
2463
|
+
return Action$2.$match(action, {
|
|
2464
2464
|
Beep: () => succeed$1(renderBeep),
|
|
2465
2465
|
NextFrame: ({ state }) => renderDateNextFrame(state, options),
|
|
2466
2466
|
Submit: () => renderDateSubmission(state, options)
|
|
@@ -2479,11 +2479,11 @@ const handleDateProcess = (options) => {
|
|
|
2479
2479
|
case "tab": return succeed$1(processDateNext(state));
|
|
2480
2480
|
case "enter":
|
|
2481
2481
|
case "return": return match$2(options.validate(state.value), {
|
|
2482
|
-
onFailure: (error) => Action$
|
|
2482
|
+
onFailure: (error) => Action$2.NextFrame({ state: {
|
|
2483
2483
|
...state,
|
|
2484
2484
|
error: some(error)
|
|
2485
2485
|
} }),
|
|
2486
|
-
onSuccess: (value) => Action$
|
|
2486
|
+
onSuccess: (value) => Action$2.Submit({ value })
|
|
2487
2487
|
});
|
|
2488
2488
|
default: return succeed$1(defaultDateProcessor(getOrElse(input.input, () => ""), state));
|
|
2489
2489
|
}
|
|
@@ -2735,7 +2735,7 @@ const resolveCurrentPath = (path, options) => {
|
|
|
2735
2735
|
const startingPath = options.startingPath.value;
|
|
2736
2736
|
return flatMap$1(FileSystem, (fs) => orDie(fs.exists(startingPath)).pipe(flatMap$1((exists) => exists ? void_ : die(`The provided starting path '${startingPath}' does not exist`)), as(startingPath)));
|
|
2737
2737
|
}
|
|
2738
|
-
return sync$
|
|
2738
|
+
return sync$2(() => process.cwd());
|
|
2739
2739
|
};
|
|
2740
2740
|
const getFileList = /*#__PURE__*/ fnUntraced$1(function* (directory, options) {
|
|
2741
2741
|
const fs = yield* FileSystem;
|
|
@@ -2861,7 +2861,7 @@ const renderFileSubmission = /*#__PURE__*/ fnUntraced$1(function* (state, value,
|
|
|
2861
2861
|
});
|
|
2862
2862
|
const handleFileRender = (options) => {
|
|
2863
2863
|
return (state, action) => {
|
|
2864
|
-
return Action$
|
|
2864
|
+
return Action$2.$match(action, {
|
|
2865
2865
|
Beep: () => succeed$1(renderBeep),
|
|
2866
2866
|
NextFrame: ({ state }) => renderFileNextFrame(state, options),
|
|
2867
2867
|
Submit: ({ value }) => renderFileSubmission(state, value, options)
|
|
@@ -2869,33 +2869,33 @@ const handleFileRender = (options) => {
|
|
|
2869
2869
|
};
|
|
2870
2870
|
};
|
|
2871
2871
|
const processFileCursorUp = (state) => {
|
|
2872
|
-
if (state.files.length === 0) return succeed$1(Action$
|
|
2872
|
+
if (state.files.length === 0) return succeed$1(Action$2.Beep());
|
|
2873
2873
|
const cursor = state.cursor - 1;
|
|
2874
|
-
return succeed$1(Action$
|
|
2874
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
2875
2875
|
...state,
|
|
2876
2876
|
cursor: cursor < 0 ? state.files.length - 1 : cursor
|
|
2877
2877
|
} }));
|
|
2878
2878
|
};
|
|
2879
2879
|
const processFileCursorDown = (state) => {
|
|
2880
|
-
if (state.files.length === 0) return succeed$1(Action$
|
|
2881
|
-
return succeed$1(Action$
|
|
2880
|
+
if (state.files.length === 0) return succeed$1(Action$2.Beep());
|
|
2881
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
2882
2882
|
...state,
|
|
2883
2883
|
cursor: (state.cursor + 1) % state.files.length
|
|
2884
2884
|
} }));
|
|
2885
2885
|
};
|
|
2886
2886
|
const processFileBackspace = (state) => {
|
|
2887
|
-
if (state.query.length === 0) return succeed$1(Action$
|
|
2887
|
+
if (state.query.length === 0) return succeed$1(Action$2.Beep());
|
|
2888
2888
|
const query = state.query.slice(0, state.query.length - 1);
|
|
2889
|
-
return succeed$1(Action$
|
|
2889
|
+
return succeed$1(Action$2.NextFrame({ state: updateFileState(state, query) }));
|
|
2890
2890
|
};
|
|
2891
|
-
const processFileClear = (state) => succeed$1(Action$
|
|
2891
|
+
const processFileClear = (state) => succeed$1(Action$2.NextFrame({ state: updateFileState(state, "") }));
|
|
2892
2892
|
const processFileInput = (input, state) => {
|
|
2893
|
-
if (input.length === 0) return succeed$1(Action$
|
|
2893
|
+
if (input.length === 0) return succeed$1(Action$2.Beep());
|
|
2894
2894
|
const query = state.query + input;
|
|
2895
|
-
return succeed$1(Action$
|
|
2895
|
+
return succeed$1(Action$2.NextFrame({ state: updateFileState(state, query) }));
|
|
2896
2896
|
};
|
|
2897
2897
|
const processSelection = /*#__PURE__*/ fnUntraced$1(function* (state, options) {
|
|
2898
|
-
if (state.files.length === 0) return Action$
|
|
2898
|
+
if (state.files.length === 0) return Action$2.Beep();
|
|
2899
2899
|
const fs = yield* FileSystem;
|
|
2900
2900
|
const path = yield* Path;
|
|
2901
2901
|
const currentPath = yield* resolveCurrentPath(state.path, options);
|
|
@@ -2904,11 +2904,11 @@ const processSelection = /*#__PURE__*/ fnUntraced$1(function* (state, options) {
|
|
|
2904
2904
|
if ((yield* orDie(fs.stat(resolvedPath))).type === "Directory") {
|
|
2905
2905
|
const files = yield* getFileList(resolvedPath, options);
|
|
2906
2906
|
const filesWithoutParent = files.filter((file) => file !== "..");
|
|
2907
|
-
if (options.type === "directory" || options.type === "either") return filesWithoutParent.length === 0 ? Action$
|
|
2907
|
+
if (options.type === "directory" || options.type === "either") return filesWithoutParent.length === 0 ? Action$2.Submit({ value: resolvedPath }) : Action$2.NextFrame({ state: {
|
|
2908
2908
|
...state,
|
|
2909
2909
|
confirm: FileConfirm.Show()
|
|
2910
2910
|
} });
|
|
2911
|
-
return Action$
|
|
2911
|
+
return Action$2.NextFrame({ state: {
|
|
2912
2912
|
cursor: 0,
|
|
2913
2913
|
files,
|
|
2914
2914
|
allFiles: files,
|
|
@@ -2917,25 +2917,25 @@ const processSelection = /*#__PURE__*/ fnUntraced$1(function* (state, options) {
|
|
|
2917
2917
|
confirm: FileConfirm.Hide()
|
|
2918
2918
|
} });
|
|
2919
2919
|
}
|
|
2920
|
-
return Action$
|
|
2920
|
+
return Action$2.Submit({ value: resolvedPath });
|
|
2921
2921
|
});
|
|
2922
2922
|
const handleFileProcess = (options) => {
|
|
2923
2923
|
return fnUntraced$1(function* (input, state) {
|
|
2924
2924
|
if (input.key.ctrl) switch (input.key.name) {
|
|
2925
2925
|
case "u":
|
|
2926
|
-
if (showConfirmation(state.confirm)) return Action$
|
|
2926
|
+
if (showConfirmation(state.confirm)) return Action$2.Beep();
|
|
2927
2927
|
return yield* processFileClear(state);
|
|
2928
2928
|
case "p":
|
|
2929
2929
|
case "k": return yield* processFileCursorUp(state);
|
|
2930
2930
|
case "n": return yield* processFileCursorDown(state);
|
|
2931
|
-
default: return Action$
|
|
2931
|
+
default: return Action$2.Beep();
|
|
2932
2932
|
}
|
|
2933
2933
|
switch (input.key.name) {
|
|
2934
2934
|
case "up": return yield* processFileCursorUp(state);
|
|
2935
2935
|
case "down":
|
|
2936
2936
|
case "tab": return yield* processFileCursorDown(state);
|
|
2937
2937
|
case "backspace":
|
|
2938
|
-
if (showConfirmation(state.confirm)) return Action$
|
|
2938
|
+
if (showConfirmation(state.confirm)) return Action$2.Beep();
|
|
2939
2939
|
return yield* processFileBackspace(state);
|
|
2940
2940
|
case "enter":
|
|
2941
2941
|
case "return": return yield* processSelection(state, options);
|
|
@@ -2947,7 +2947,7 @@ const handleFileProcess = (options) => {
|
|
|
2947
2947
|
const selectedPath = state.files[state.cursor];
|
|
2948
2948
|
const resolvedPath = path.resolve(currentPath, selectedPath);
|
|
2949
2949
|
const files = yield* getFileList(resolvedPath, options);
|
|
2950
|
-
return Action$
|
|
2950
|
+
return Action$2.NextFrame({ state: {
|
|
2951
2951
|
cursor: 0,
|
|
2952
2952
|
files,
|
|
2953
2953
|
allFiles: files,
|
|
@@ -2964,11 +2964,11 @@ const handleFileProcess = (options) => {
|
|
|
2964
2964
|
const currentPath = yield* resolveCurrentPath(state.path, options);
|
|
2965
2965
|
const selectedPath = state.files[state.cursor];
|
|
2966
2966
|
const resolvedPath = path.resolve(currentPath, selectedPath);
|
|
2967
|
-
return Action$
|
|
2967
|
+
return Action$2.Submit({ value: resolvedPath });
|
|
2968
2968
|
}
|
|
2969
2969
|
return yield* processFileInput(getOrElse(input.input, () => ""), state);
|
|
2970
2970
|
default:
|
|
2971
|
-
if (showConfirmation(state.confirm)) return Action$
|
|
2971
|
+
if (showConfirmation(state.confirm)) return Action$2.Beep();
|
|
2972
2972
|
return yield* processFileInput(getOrElse(input.input, () => ""), state);
|
|
2973
2973
|
}
|
|
2974
2974
|
});
|
|
@@ -3045,14 +3045,14 @@ const renderMultiSelectSubmission = /*#__PURE__*/ fnUntraced$1(function* (state,
|
|
|
3045
3045
|
});
|
|
3046
3046
|
const processMultiSelectCursorUp = (state, totalChoices) => {
|
|
3047
3047
|
const newIndex = state.index === 0 ? totalChoices - 1 : state.index - 1;
|
|
3048
|
-
return succeed$1(Action$
|
|
3048
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3049
3049
|
...state,
|
|
3050
3050
|
index: newIndex
|
|
3051
3051
|
} }));
|
|
3052
3052
|
};
|
|
3053
3053
|
const processMultiSelectCursorDown = (state, totalChoices) => {
|
|
3054
3054
|
const newIndex = (state.index + 1) % totalChoices;
|
|
3055
|
-
return succeed$1(Action$
|
|
3055
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3056
3056
|
...state,
|
|
3057
3057
|
index: newIndex
|
|
3058
3058
|
} }));
|
|
@@ -3067,11 +3067,11 @@ const processSpace = (state, options) => {
|
|
|
3067
3067
|
else selectedIndices.add(i);
|
|
3068
3068
|
else {
|
|
3069
3069
|
const choiceIndex = state.index - metaOptionsCount;
|
|
3070
|
-
if (options.choices[choiceIndex].disabled) return succeed$1(Action$
|
|
3070
|
+
if (options.choices[choiceIndex].disabled) return succeed$1(Action$2.Beep());
|
|
3071
3071
|
else if (selectedIndices.has(choiceIndex)) selectedIndices.delete(choiceIndex);
|
|
3072
3072
|
else selectedIndices.add(choiceIndex);
|
|
3073
3073
|
}
|
|
3074
|
-
return succeed$1(Action$
|
|
3074
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3075
3075
|
...state,
|
|
3076
3076
|
selectedIndices
|
|
3077
3077
|
} }));
|
|
@@ -3105,24 +3105,24 @@ const handleMultiSelectProcess = (options) => {
|
|
|
3105
3105
|
case "return": {
|
|
3106
3106
|
const selectedIndices = Array.from(state.selectedIndices).filter((index) => !options.choices[index].disabled);
|
|
3107
3107
|
const selectedCount = selectedIndices.length;
|
|
3108
|
-
if (options.min !== void 0 && selectedCount < options.min) return succeed$1(Action$
|
|
3108
|
+
if (options.min !== void 0 && selectedCount < options.min) return succeed$1(Action$2.NextFrame({ state: {
|
|
3109
3109
|
...state,
|
|
3110
3110
|
error: some(`At least ${options.min} are required`)
|
|
3111
3111
|
} }));
|
|
3112
|
-
if (options.max !== void 0 && selectedCount > options.max) return succeed$1(Action$
|
|
3112
|
+
if (options.max !== void 0 && selectedCount > options.max) return succeed$1(Action$2.NextFrame({ state: {
|
|
3113
3113
|
...state,
|
|
3114
3114
|
error: some(`At most ${options.max} choices are allowed`)
|
|
3115
3115
|
} }));
|
|
3116
3116
|
const selectedValues = selectedIndices.sort(Order).map((index) => options.choices[index].value);
|
|
3117
|
-
return succeed$1(Action$
|
|
3117
|
+
return succeed$1(Action$2.Submit({ value: selectedValues }));
|
|
3118
3118
|
}
|
|
3119
|
-
default: return succeed$1(Action$
|
|
3119
|
+
default: return succeed$1(Action$2.Beep());
|
|
3120
3120
|
}
|
|
3121
3121
|
};
|
|
3122
3122
|
};
|
|
3123
3123
|
const handleMultiSelectRender = (options) => {
|
|
3124
3124
|
return (state, action) => {
|
|
3125
|
-
return Action$
|
|
3125
|
+
return Action$2.$match(action, {
|
|
3126
3126
|
Beep: () => succeed$1(renderBeep),
|
|
3127
3127
|
NextFrame: ({ state }) => renderMultiSelectNextFrame(state, options),
|
|
3128
3128
|
Submit: () => renderMultiSelectSubmission(state, options)
|
|
@@ -3175,44 +3175,44 @@ const renderNumberSubmission = /*#__PURE__*/ fnUntraced$1(function* (nextState,
|
|
|
3175
3175
|
return renderNumberOutput(nextState, leadingSymbol, trailingSymbol, options, figures, void 0, true) + "\n";
|
|
3176
3176
|
});
|
|
3177
3177
|
const processNumberBackspace = (state) => {
|
|
3178
|
-
if (state.value.length <= 0) return succeed$1(Action$
|
|
3178
|
+
if (state.value.length <= 0) return succeed$1(Action$2.Beep());
|
|
3179
3179
|
const value = state.value.slice(0, state.value.length - 1);
|
|
3180
|
-
return succeed$1(Action$
|
|
3180
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3181
3181
|
...state,
|
|
3182
3182
|
value,
|
|
3183
3183
|
error: none$1()
|
|
3184
3184
|
} }));
|
|
3185
3185
|
};
|
|
3186
|
-
const processNumberClear = (state) => succeed$1(Action$
|
|
3186
|
+
const processNumberClear = (state) => succeed$1(Action$2.NextFrame({ state: {
|
|
3187
3187
|
...state,
|
|
3188
3188
|
cursor: 0,
|
|
3189
3189
|
value: "",
|
|
3190
3190
|
error: none$1()
|
|
3191
3191
|
} }));
|
|
3192
3192
|
const defaultIntProcessor = (input, state) => {
|
|
3193
|
-
if (state.value.length === 0 && input === "-") return succeed$1(Action$
|
|
3193
|
+
if (state.value.length === 0 && input === "-") return succeed$1(Action$2.NextFrame({ state: {
|
|
3194
3194
|
...state,
|
|
3195
3195
|
value: "-",
|
|
3196
3196
|
error: none$1()
|
|
3197
3197
|
} }));
|
|
3198
3198
|
const parsed = globalThis.Number.parseInt(state.value + input);
|
|
3199
|
-
if (globalThis.Number.isNaN(parsed)) return succeed$1(Action$
|
|
3200
|
-
else return succeed$1(Action$
|
|
3199
|
+
if (globalThis.Number.isNaN(parsed)) return succeed$1(Action$2.Beep());
|
|
3200
|
+
else return succeed$1(Action$2.NextFrame({ state: {
|
|
3201
3201
|
...state,
|
|
3202
3202
|
value: `${parsed}`,
|
|
3203
3203
|
error: none$1()
|
|
3204
3204
|
} }));
|
|
3205
3205
|
};
|
|
3206
3206
|
const defaultFloatProcessor = (input, state) => {
|
|
3207
|
-
if (input === "." && state.value.includes(".")) return succeed$1(Action$
|
|
3208
|
-
if (state.value.length === 0 && input === "-") return succeed$1(Action$
|
|
3207
|
+
if (input === "." && state.value.includes(".")) return succeed$1(Action$2.Beep());
|
|
3208
|
+
if (state.value.length === 0 && input === "-") return succeed$1(Action$2.NextFrame({ state: {
|
|
3209
3209
|
...state,
|
|
3210
3210
|
value: "-",
|
|
3211
3211
|
error: none$1()
|
|
3212
3212
|
} }));
|
|
3213
3213
|
const parsed = globalThis.Number.parseFloat(state.value + input);
|
|
3214
|
-
if (globalThis.Number.isNaN(parsed)) return succeed$1(Action$
|
|
3215
|
-
else return succeed$1(Action$
|
|
3214
|
+
if (globalThis.Number.isNaN(parsed)) return succeed$1(Action$2.Beep());
|
|
3215
|
+
else return succeed$1(Action$2.NextFrame({ state: {
|
|
3216
3216
|
...state,
|
|
3217
3217
|
value: input === "." ? `${parsed}.` : state.value.includes(".") && /^\d$/.test(input) ? state.value + input : `${parsed}`,
|
|
3218
3218
|
error: none$1()
|
|
@@ -3220,7 +3220,7 @@ const defaultFloatProcessor = (input, state) => {
|
|
|
3220
3220
|
};
|
|
3221
3221
|
const handleRenderInteger = (options) => {
|
|
3222
3222
|
return (state, action) => {
|
|
3223
|
-
return Action$
|
|
3223
|
+
return Action$2.$match(action, {
|
|
3224
3224
|
Beep: () => succeed$1(renderBeep),
|
|
3225
3225
|
NextFrame: ({ state }) => renderNumberNextFrame(state, options),
|
|
3226
3226
|
Submit: () => renderNumberSubmission(state, options)
|
|
@@ -3233,13 +3233,13 @@ const handleProcessInteger = (options) => {
|
|
|
3233
3233
|
switch (input.key.name) {
|
|
3234
3234
|
case "backspace": return processNumberBackspace(state);
|
|
3235
3235
|
case "k":
|
|
3236
|
-
case "up": return succeed$1(Action$
|
|
3236
|
+
case "up": return succeed$1(Action$2.NextFrame({ state: {
|
|
3237
3237
|
...state,
|
|
3238
3238
|
value: state.value === "" || state.value === "-" ? `${options.incrementBy}` : `${globalThis.Number.parseInt(state.value) + options.incrementBy}`,
|
|
3239
3239
|
error: none$1()
|
|
3240
3240
|
} }));
|
|
3241
3241
|
case "j":
|
|
3242
|
-
case "down": return succeed$1(Action$
|
|
3242
|
+
case "down": return succeed$1(Action$2.NextFrame({ state: {
|
|
3243
3243
|
...state,
|
|
3244
3244
|
value: state.value === "" || state.value === "-" ? `-${options.decrementBy}` : `${globalThis.Number.parseInt(state.value) - options.decrementBy}`,
|
|
3245
3245
|
error: none$1()
|
|
@@ -3247,16 +3247,16 @@ const handleProcessInteger = (options) => {
|
|
|
3247
3247
|
case "enter":
|
|
3248
3248
|
case "return": {
|
|
3249
3249
|
const parsed = globalThis.Number.parseInt(state.value);
|
|
3250
|
-
if (globalThis.Number.isNaN(parsed)) return succeed$1(Action$
|
|
3250
|
+
if (globalThis.Number.isNaN(parsed)) return succeed$1(Action$2.NextFrame({ state: {
|
|
3251
3251
|
...state,
|
|
3252
3252
|
error: some("Must provide an integer value")
|
|
3253
3253
|
} }));
|
|
3254
3254
|
else return match$2(options.validate(parsed), {
|
|
3255
|
-
onFailure: (error) => Action$
|
|
3255
|
+
onFailure: (error) => Action$2.NextFrame({ state: {
|
|
3256
3256
|
...state,
|
|
3257
3257
|
error: some(error)
|
|
3258
3258
|
} }),
|
|
3259
|
-
onSuccess: (value) => Action$
|
|
3259
|
+
onSuccess: (value) => Action$2.Submit({ value })
|
|
3260
3260
|
});
|
|
3261
3261
|
}
|
|
3262
3262
|
default: return defaultIntProcessor(getOrElse(input.input, () => ""), state);
|
|
@@ -3265,7 +3265,7 @@ const handleProcessInteger = (options) => {
|
|
|
3265
3265
|
};
|
|
3266
3266
|
const handleRenderFloat = (options) => {
|
|
3267
3267
|
return (state, action) => {
|
|
3268
|
-
return Action$
|
|
3268
|
+
return Action$2.$match(action, {
|
|
3269
3269
|
Beep: () => succeed$1(renderBeep),
|
|
3270
3270
|
NextFrame: ({ state }) => renderNumberNextFrame(state, options),
|
|
3271
3271
|
Submit: () => renderNumberSubmission(state, options)
|
|
@@ -3278,13 +3278,13 @@ const handleProcessFloat = (options) => {
|
|
|
3278
3278
|
switch (input.key.name) {
|
|
3279
3279
|
case "backspace": return processNumberBackspace(state);
|
|
3280
3280
|
case "k":
|
|
3281
|
-
case "up": return succeed$1(Action$
|
|
3281
|
+
case "up": return succeed$1(Action$2.NextFrame({ state: {
|
|
3282
3282
|
...state,
|
|
3283
3283
|
value: state.value === "" || state.value === "-" ? `${options.incrementBy}` : `${globalThis.Number.parseFloat(state.value) + options.incrementBy}`,
|
|
3284
3284
|
error: none$1()
|
|
3285
3285
|
} }));
|
|
3286
3286
|
case "j":
|
|
3287
|
-
case "down": return succeed$1(Action$
|
|
3287
|
+
case "down": return succeed$1(Action$2.NextFrame({ state: {
|
|
3288
3288
|
...state,
|
|
3289
3289
|
value: state.value === "" || state.value === "-" ? `-${options.decrementBy}` : `${globalThis.Number.parseFloat(state.value) - options.decrementBy}`,
|
|
3290
3290
|
error: none$1()
|
|
@@ -3292,16 +3292,16 @@ const handleProcessFloat = (options) => {
|
|
|
3292
3292
|
case "enter":
|
|
3293
3293
|
case "return": {
|
|
3294
3294
|
const parsed = globalThis.Number.parseFloat(state.value);
|
|
3295
|
-
if (globalThis.Number.isNaN(parsed)) return succeed$1(Action$
|
|
3295
|
+
if (globalThis.Number.isNaN(parsed)) return succeed$1(Action$2.NextFrame({ state: {
|
|
3296
3296
|
...state,
|
|
3297
3297
|
error: some("Must provide a floating point value")
|
|
3298
3298
|
} }));
|
|
3299
|
-
else return flatMap$1(sync$
|
|
3300
|
-
onFailure: (error) => Action$
|
|
3299
|
+
else return flatMap$1(sync$2(() => round(parsed, options.precision)), (rounded) => match$2(options.validate(rounded), {
|
|
3300
|
+
onFailure: (error) => Action$2.NextFrame({ state: {
|
|
3301
3301
|
...state,
|
|
3302
3302
|
error: some(error)
|
|
3303
3303
|
} }),
|
|
3304
|
-
onSuccess: (value) => Action$
|
|
3304
|
+
onSuccess: (value) => Action$2.Submit({ value })
|
|
3305
3305
|
}));
|
|
3306
3306
|
}
|
|
3307
3307
|
default: return defaultFloatProcessor(getOrElse(input.input, () => ""), state);
|
|
@@ -3355,19 +3355,19 @@ const renderSelectSubmission = /*#__PURE__*/ fnUntraced$1(function* (state, opti
|
|
|
3355
3355
|
return (renderSelectOutput(leadingSymbol, trailingSymbol, options, figures) ?? leadingSymbol) + " " + annotate(figures.colors, selected, figures.submittedColor) + "\n";
|
|
3356
3356
|
});
|
|
3357
3357
|
const processSelectCursorUp = (state, choices) => {
|
|
3358
|
-
if (state === 0) return succeed$1(Action$
|
|
3359
|
-
return succeed$1(Action$
|
|
3358
|
+
if (state === 0) return succeed$1(Action$2.NextFrame({ state: choices.length - 1 }));
|
|
3359
|
+
return succeed$1(Action$2.NextFrame({ state: state - 1 }));
|
|
3360
3360
|
};
|
|
3361
3361
|
const processSelectCursorDown = (state, choices) => {
|
|
3362
|
-
if (state === choices.length - 1) return succeed$1(Action$
|
|
3363
|
-
return succeed$1(Action$
|
|
3362
|
+
if (state === choices.length - 1) return succeed$1(Action$2.NextFrame({ state: 0 }));
|
|
3363
|
+
return succeed$1(Action$2.NextFrame({ state: state + 1 }));
|
|
3364
3364
|
};
|
|
3365
3365
|
const processSelectNext = (state, choices) => {
|
|
3366
|
-
return succeed$1(Action$
|
|
3366
|
+
return succeed$1(Action$2.NextFrame({ state: (state + 1) % choices.length }));
|
|
3367
3367
|
};
|
|
3368
3368
|
const handleSelectRender = (options) => {
|
|
3369
3369
|
return (state, action) => {
|
|
3370
|
-
return Action$
|
|
3370
|
+
return Action$2.$match(action, {
|
|
3371
3371
|
Beep: () => succeed$1(renderBeep),
|
|
3372
3372
|
NextFrame: ({ state }) => renderSelectNextFrame(state, options),
|
|
3373
3373
|
Submit: () => renderSelectSubmission(state, options)
|
|
@@ -3393,10 +3393,10 @@ const handleSelectProcess = (options) => {
|
|
|
3393
3393
|
case "enter":
|
|
3394
3394
|
case "return": {
|
|
3395
3395
|
const selected = options.choices[state];
|
|
3396
|
-
if (selected.disabled) return succeed$1(Action$
|
|
3397
|
-
return succeed$1(Action$
|
|
3396
|
+
if (selected.disabled) return succeed$1(Action$2.Beep());
|
|
3397
|
+
return succeed$1(Action$2.Submit({ value: selected.value }));
|
|
3398
3398
|
}
|
|
3399
|
-
default: return succeed$1(Action$
|
|
3399
|
+
default: return succeed$1(Action$2.Beep());
|
|
3400
3400
|
}
|
|
3401
3401
|
};
|
|
3402
3402
|
};
|
|
@@ -3455,56 +3455,56 @@ const renderTextSubmission = /*#__PURE__*/ fnUntraced$1(function* (state, option
|
|
|
3455
3455
|
return renderTextOutput(state, leadingSymbol, trailingSymbol, options, figures, void 0, true) + "\n";
|
|
3456
3456
|
});
|
|
3457
3457
|
const processTextBackspace = (state) => {
|
|
3458
|
-
if (state.cursor <= 0) return succeed$1(Action$
|
|
3458
|
+
if (state.cursor <= 0) return succeed$1(Action$2.Beep());
|
|
3459
3459
|
const beforeCursor = state.value.slice(0, state.cursor - 1);
|
|
3460
3460
|
const afterCursor = state.value.slice(state.cursor);
|
|
3461
3461
|
const cursor = state.cursor - 1;
|
|
3462
3462
|
const value = `${beforeCursor}${afterCursor}`;
|
|
3463
|
-
return succeed$1(Action$
|
|
3463
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3464
3464
|
...state,
|
|
3465
3465
|
cursor,
|
|
3466
3466
|
value,
|
|
3467
3467
|
error: none$1()
|
|
3468
3468
|
} }));
|
|
3469
3469
|
};
|
|
3470
|
-
const processTextClear = (state) => succeed$1(Action$
|
|
3470
|
+
const processTextClear = (state) => succeed$1(Action$2.NextFrame({ state: {
|
|
3471
3471
|
...state,
|
|
3472
3472
|
cursor: 0,
|
|
3473
3473
|
value: "",
|
|
3474
3474
|
error: none$1()
|
|
3475
3475
|
} }));
|
|
3476
3476
|
const processTextCursorLeft = (state) => {
|
|
3477
|
-
if (state.cursor <= 0) return succeed$1(Action$
|
|
3477
|
+
if (state.cursor <= 0) return succeed$1(Action$2.Beep());
|
|
3478
3478
|
const cursor = state.cursor - 1;
|
|
3479
|
-
return succeed$1(Action$
|
|
3479
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3480
3480
|
...state,
|
|
3481
3481
|
cursor,
|
|
3482
3482
|
error: none$1()
|
|
3483
3483
|
} }));
|
|
3484
3484
|
};
|
|
3485
3485
|
const processTextCursorRight = (state) => {
|
|
3486
|
-
if (state.cursor >= state.value.length) return succeed$1(Action$
|
|
3486
|
+
if (state.cursor >= state.value.length) return succeed$1(Action$2.Beep());
|
|
3487
3487
|
const cursor = Math.min(state.cursor + 1, state.value.length);
|
|
3488
|
-
return succeed$1(Action$
|
|
3488
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3489
3489
|
...state,
|
|
3490
3490
|
cursor,
|
|
3491
3491
|
error: none$1()
|
|
3492
3492
|
} }));
|
|
3493
3493
|
};
|
|
3494
|
-
const processTextCursorStart = (state) => succeed$1(Action$
|
|
3494
|
+
const processTextCursorStart = (state) => succeed$1(Action$2.NextFrame({ state: {
|
|
3495
3495
|
...state,
|
|
3496
3496
|
cursor: 0,
|
|
3497
3497
|
error: none$1()
|
|
3498
3498
|
} }));
|
|
3499
|
-
const processTextCursorEnd = (state) => succeed$1(Action$
|
|
3499
|
+
const processTextCursorEnd = (state) => succeed$1(Action$2.NextFrame({ state: {
|
|
3500
3500
|
...state,
|
|
3501
3501
|
cursor: state.value.length,
|
|
3502
3502
|
error: none$1()
|
|
3503
3503
|
} }));
|
|
3504
3504
|
const processTab = (state, options) => {
|
|
3505
|
-
if (state.value === options.default) return succeed$1(Action$
|
|
3505
|
+
if (state.value === options.default) return succeed$1(Action$2.Beep());
|
|
3506
3506
|
const value = state.value.length === 0 ? options.default : state.value;
|
|
3507
|
-
return succeed$1(Action$
|
|
3507
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3508
3508
|
...state,
|
|
3509
3509
|
value,
|
|
3510
3510
|
cursor: value.length,
|
|
@@ -3514,7 +3514,7 @@ const processTab = (state, options) => {
|
|
|
3514
3514
|
const defaultTextProcessor = (input, state) => {
|
|
3515
3515
|
const value = `${state.value.slice(0, state.cursor)}${input}${state.value.slice(state.cursor)}`;
|
|
3516
3516
|
const cursor = state.cursor + input.length;
|
|
3517
|
-
return succeed$1(Action$
|
|
3517
|
+
return succeed$1(Action$2.NextFrame({ state: {
|
|
3518
3518
|
...state,
|
|
3519
3519
|
cursor,
|
|
3520
3520
|
value,
|
|
@@ -3523,7 +3523,7 @@ const defaultTextProcessor = (input, state) => {
|
|
|
3523
3523
|
};
|
|
3524
3524
|
const handleTextRender = (options) => {
|
|
3525
3525
|
return (state, action) => {
|
|
3526
|
-
return Action$
|
|
3526
|
+
return Action$2.$match(action, {
|
|
3527
3527
|
Beep: () => succeed$1(renderBeep),
|
|
3528
3528
|
NextFrame: ({ state }) => renderTextNextFrame(state, options),
|
|
3529
3529
|
Submit: () => renderTextSubmission(state, options)
|
|
@@ -3536,7 +3536,7 @@ const handleTextProcess = (options) => {
|
|
|
3536
3536
|
case "u": return processTextClear(state);
|
|
3537
3537
|
case "a": return processTextCursorStart(state);
|
|
3538
3538
|
case "e": return processTextCursorEnd(state);
|
|
3539
|
-
default: return succeed$1(Action$
|
|
3539
|
+
default: return succeed$1(Action$2.Beep());
|
|
3540
3540
|
}
|
|
3541
3541
|
switch (input.key.name) {
|
|
3542
3542
|
case "backspace": return processTextBackspace(state);
|
|
@@ -3548,12 +3548,12 @@ const handleTextProcess = (options) => {
|
|
|
3548
3548
|
case "return": {
|
|
3549
3549
|
const value = state.value;
|
|
3550
3550
|
return match$2(options.validate(value), {
|
|
3551
|
-
onFailure: (error) => Action$
|
|
3551
|
+
onFailure: (error) => Action$2.NextFrame({ state: {
|
|
3552
3552
|
...state,
|
|
3553
3553
|
value,
|
|
3554
3554
|
error: some(error)
|
|
3555
3555
|
} }),
|
|
3556
|
-
onSuccess: (value) => Action$
|
|
3556
|
+
onSuccess: (value) => Action$2.Submit({ value })
|
|
3557
3557
|
});
|
|
3558
3558
|
}
|
|
3559
3559
|
case "tab": return processTab(state, options);
|
|
@@ -3613,8 +3613,8 @@ const renderToggleSubmission = /*#__PURE__*/ fnUntraced$1(function* (value, opti
|
|
|
3613
3613
|
const toggle = renderToggle(value, options, figures, true);
|
|
3614
3614
|
return renderPrompt(toggle, options.message, leadingSymbol, trailingSymbol, figures) + "\n";
|
|
3615
3615
|
});
|
|
3616
|
-
const activate = /*#__PURE__*/ succeed$1(/*#__PURE__*/ Action$
|
|
3617
|
-
const deactivate = /*#__PURE__*/ succeed$1(/*#__PURE__*/ Action$
|
|
3616
|
+
const activate = /*#__PURE__*/ succeed$1(/*#__PURE__*/ Action$2.NextFrame({ state: true }));
|
|
3617
|
+
const deactivate = /*#__PURE__*/ succeed$1(/*#__PURE__*/ Action$2.NextFrame({ state: false }));
|
|
3618
3618
|
const handleToggleRender = (options) => {
|
|
3619
3619
|
return (state, action) => {
|
|
3620
3620
|
switch (action._tag) {
|
|
@@ -3638,8 +3638,8 @@ const handleToggleProcess = (input, state) => {
|
|
|
3638
3638
|
case " ":
|
|
3639
3639
|
case "tab": return state ? deactivate : activate;
|
|
3640
3640
|
case "enter":
|
|
3641
|
-
case "return": return succeed$1(Action$
|
|
3642
|
-
default: return succeed$1(Action$
|
|
3641
|
+
case "return": return succeed$1(Action$2.Submit({ value: state }));
|
|
3642
|
+
default: return succeed$1(Action$2.Beep());
|
|
3643
3643
|
}
|
|
3644
3644
|
};
|
|
3645
3645
|
const entriesToDisplay = (cursor, total, maxVisible) => {
|
|
@@ -6618,7 +6618,7 @@ const getHelpForCommandPath = (command, commandPath, builtIns) => gen$1(function
|
|
|
6618
6618
|
* @category constructors
|
|
6619
6619
|
* @since 4.0.0
|
|
6620
6620
|
*/
|
|
6621
|
-
const Action = (options) => ({
|
|
6621
|
+
const Action$1 = (options) => ({
|
|
6622
6622
|
_tag: "Action",
|
|
6623
6623
|
flag: options.flag,
|
|
6624
6624
|
run: options.run
|
|
@@ -6651,7 +6651,7 @@ let settingIdCounter = 0;
|
|
|
6651
6651
|
* @category references
|
|
6652
6652
|
* @since 4.0.0
|
|
6653
6653
|
*/
|
|
6654
|
-
const Help = /*#__PURE__*/ Action({
|
|
6654
|
+
const Help = /*#__PURE__*/ Action$1({
|
|
6655
6655
|
flag: /*#__PURE__*/ Boolean$1("help").pipe(/*#__PURE__*/ withAlias("h"), /*#__PURE__*/ withDescription$1("Show help information"), /*#__PURE__*/ withDefault(false)),
|
|
6656
6656
|
run: /*#__PURE__*/ fnUntraced$1(function* (_, { builtIns, command, commandPath }) {
|
|
6657
6657
|
const formatter = yield* Formatter;
|
|
@@ -6670,7 +6670,7 @@ const Help = /*#__PURE__*/ Action({
|
|
|
6670
6670
|
* @category references
|
|
6671
6671
|
* @since 4.0.0
|
|
6672
6672
|
*/
|
|
6673
|
-
const Version = /*#__PURE__*/ Action({
|
|
6673
|
+
const Version = /*#__PURE__*/ Action$1({
|
|
6674
6674
|
flag: /*#__PURE__*/ Boolean$1("version").pipe(/*#__PURE__*/ withAlias("v"), /*#__PURE__*/ withDescription$1("Show version information"), /*#__PURE__*/ withDefault(false)),
|
|
6675
6675
|
run: /*#__PURE__*/ fnUntraced$1(function* (_, { command, version }) {
|
|
6676
6676
|
const formatter = yield* Formatter;
|
|
@@ -6689,7 +6689,7 @@ const Version = /*#__PURE__*/ Action({
|
|
|
6689
6689
|
* @category references
|
|
6690
6690
|
* @since 4.0.0
|
|
6691
6691
|
*/
|
|
6692
|
-
const Wizard = /*#__PURE__*/ Action({
|
|
6692
|
+
const Wizard = /*#__PURE__*/ Action$1({
|
|
6693
6693
|
flag: /*#__PURE__*/ Boolean$1("wizard").pipe(/*#__PURE__*/ withDescription$1("Start wizard mode for a command"), /*#__PURE__*/ withDefault(false)),
|
|
6694
6694
|
run: () => void_
|
|
6695
6695
|
});
|
|
@@ -6706,7 +6706,7 @@ const Wizard = /*#__PURE__*/ Action({
|
|
|
6706
6706
|
* @category references
|
|
6707
6707
|
* @since 4.0.0
|
|
6708
6708
|
*/
|
|
6709
|
-
const Completions = /*#__PURE__*/ Action({
|
|
6709
|
+
const Completions = /*#__PURE__*/ Action$1({
|
|
6710
6710
|
flag: /*#__PURE__*/ ChoiceWithValue("completions", [
|
|
6711
6711
|
["bash", "bash"],
|
|
6712
6712
|
["zsh", "zsh"],
|
|
@@ -8649,7 +8649,7 @@ const make$60 = /*#__PURE__*/ fnUntraced$1(function* (options) {
|
|
|
8649
8649
|
scope: metricsScope,
|
|
8650
8650
|
metrics: metricData
|
|
8651
8651
|
}]
|
|
8652
|
-
}] }), isDelta ? sync$
|
|
8652
|
+
}] }), isDelta ? sync$2(() => {
|
|
8653
8653
|
if (currentSnapshotSequence < committedSnapshotSequence) return;
|
|
8654
8654
|
previousCounterState = nextCounterState;
|
|
8655
8655
|
previousHistogramState = nextHistogramState;
|
|
@@ -9869,7 +9869,7 @@ const readBootstrapEnvelope = fn("readBootstrapEnvelope")(function* (schema, fd,
|
|
|
9869
9869
|
stream.once("error", handleError);
|
|
9870
9870
|
input.once("line", handleLine);
|
|
9871
9871
|
input.once("close", handleClose);
|
|
9872
|
-
return sync$
|
|
9872
|
+
return sync$2(cleanup);
|
|
9873
9873
|
}).pipe(timeoutOption(timeoutMs), map$3(flatten));
|
|
9874
9874
|
});
|
|
9875
9875
|
const isUnavailableBootstrapFdError = compose(hasProperty("code"), (_) => _.code === "EBADF" || _.code === "ENOENT");
|
|
@@ -9964,7 +9964,7 @@ const fixPath = fn("fixPath")(function* (options) {
|
|
|
9964
9964
|
const env = yield* Environment;
|
|
9965
9965
|
if (platform === "win32") {
|
|
9966
9966
|
if (options?.shellEnvironmentPrepared === true) return;
|
|
9967
|
-
const repairedEnvironment = yield* resolveWindowsEnvironment(env).pipe(catchDefect((defect) => sync$
|
|
9967
|
+
const repairedEnvironment = yield* resolveWindowsEnvironment(env).pipe(catchDefect((defect) => sync$2(() => {
|
|
9968
9968
|
logPathHydrationWarning("Failed to hydrate PATH from the user environment.", defect);
|
|
9969
9969
|
return {};
|
|
9970
9970
|
})));
|
|
@@ -9976,11 +9976,11 @@ const fixPath = fn("fixPath")(function* (options) {
|
|
|
9976
9976
|
return;
|
|
9977
9977
|
}
|
|
9978
9978
|
if (platform !== "darwin" && platform !== "linux") return;
|
|
9979
|
-
yield* sync$
|
|
9979
|
+
yield* sync$2(() => hydratePosixHome(env)).pipe(catchDefect((defect) => sync$2(() => {
|
|
9980
9980
|
logPathHydrationWarning("Failed to hydrate HOME from the user account.", defect);
|
|
9981
9981
|
})));
|
|
9982
9982
|
if (options?.shellEnvironmentPrepared === true) return;
|
|
9983
|
-
yield* sync$
|
|
9983
|
+
yield* sync$2(() => hydratePosixPath(env, platform)).pipe(catchDefect((defect) => sync$2(() => {
|
|
9984
9984
|
logPathHydrationWarning("Failed to hydrate PATH from the user environment.", defect);
|
|
9985
9985
|
})));
|
|
9986
9986
|
});
|
|
@@ -24193,7 +24193,7 @@ const makeWebSocketWS = (url, options) => {
|
|
|
24193
24193
|
* @category layers
|
|
24194
24194
|
* @since 4.0.0
|
|
24195
24195
|
*/
|
|
24196
|
-
const layerWebSocketConstructor = /*#__PURE__*/ sync$
|
|
24196
|
+
const layerWebSocketConstructor = /*#__PURE__*/ sync$3(WebSocketConstructor)(() => {
|
|
24197
24197
|
if ("WebSocket" in globalThis) return (url, options) => {
|
|
24198
24198
|
if (options === void 0 || typeof options === "string" || Array.isArray(options)) return new globalThis.WebSocket(url, options);
|
|
24199
24199
|
return makeWebSocketWS(url, options);
|
|
@@ -24253,7 +24253,7 @@ const make$47 = /*#__PURE__*/ fnUntraced$1(function* (evaluate, options) {
|
|
|
24253
24253
|
});
|
|
24254
24254
|
const address = server.address();
|
|
24255
24255
|
const boundAddress = yield* typeof address === "string" ? succeed$1(unixPathAddress(address)) : fromResult(inetAddressFromIpString(address.address, address.port)).pipe(mapError((cause) => new ServeError({ cause })));
|
|
24256
|
-
const wss = yield* acquireRelease(sync$
|
|
24256
|
+
const wss = yield* acquireRelease(sync$2(() => new import_websocket_server.default({
|
|
24257
24257
|
...options.websocket,
|
|
24258
24258
|
noServer: true
|
|
24259
24259
|
})), (wss) => callback((resume) => {
|
|
@@ -24272,7 +24272,7 @@ const make$47 = /*#__PURE__*/ fnUntraced$1(function* (evaluate, options) {
|
|
|
24272
24272
|
middleware,
|
|
24273
24273
|
scope: scope$1
|
|
24274
24274
|
});
|
|
24275
|
-
yield* addFinalizerExit(serveScope, () => ensuring(preemptiveShutdown, sync$
|
|
24275
|
+
yield* addFinalizerExit(serveScope, () => ensuring(preemptiveShutdown, sync$2(() => {
|
|
24276
24276
|
server.off("request", handler);
|
|
24277
24277
|
server.off("upgrade", upgradeHandler);
|
|
24278
24278
|
})));
|
|
@@ -24343,7 +24343,7 @@ const makeUpgradeHandler = (lazyWss, httpEffect, options) => {
|
|
|
24343
24343
|
request.upgraded = true;
|
|
24344
24344
|
resume(succeed$1(ws));
|
|
24345
24345
|
});
|
|
24346
|
-
}), (ws, exit) => sync$
|
|
24346
|
+
}), (ws, exit) => sync$2(() => ws.close(closeCode(exit)))))));
|
|
24347
24347
|
const context = add$1(services, HttpServerRequest, request);
|
|
24348
24348
|
const fiber = runIn(runForkWith(context)(handledApp), options.scope);
|
|
24349
24349
|
socket.on("error", () => {});
|
|
@@ -24534,7 +24534,7 @@ const handleResponse = (request, response) => {
|
|
|
24534
24534
|
drainLatch.closeUnsafe();
|
|
24535
24535
|
return drainLatch.await;
|
|
24536
24536
|
}), interruptible, matchCauseEffect({
|
|
24537
|
-
onSuccess: () => sync$
|
|
24537
|
+
onSuccess: () => sync$2(() => nodeResponse.end()),
|
|
24538
24538
|
onFailure: handleCause(nodeResponse, response)
|
|
24539
24539
|
}));
|
|
24540
24540
|
}
|
|
@@ -24542,7 +24542,7 @@ const handleResponse = (request, response) => {
|
|
|
24542
24542
|
};
|
|
24543
24543
|
const cancelResponseBody = (body) => {
|
|
24544
24544
|
const stream = body._tag === "Raw" ? body.body : void 0;
|
|
24545
|
-
if (stream instanceof Readable) return sync$
|
|
24545
|
+
if (stream instanceof Readable) return sync$2(() => stream.destroy());
|
|
24546
24546
|
return void_;
|
|
24547
24547
|
};
|
|
24548
24548
|
const handleCause = (nodeResponse, originalResponse) => (originalCause) => flatMap$1(causeResponse(originalCause), ([response, cause]) => {
|
|
@@ -26744,7 +26744,7 @@ const layer$77 = (api, options) => use(fnUntraced$1(function* (router) {
|
|
|
26744
26744
|
yield* router.addAll(routes);
|
|
26745
26745
|
if (options?.openapiPath) {
|
|
26746
26746
|
const makeResponse = memoize((api) => jsonUnsafe(fromApi(api)));
|
|
26747
|
-
yield* router.add("GET", options.openapiPath, sync$
|
|
26747
|
+
yield* router.add("GET", options.openapiPath, sync$2(() => makeResponse(api)));
|
|
26748
26748
|
}
|
|
26749
26749
|
}));
|
|
26750
26750
|
/**
|
|
@@ -27465,7 +27465,7 @@ const headlessPlugins = (entries = peerPlugins()) => entries.map((entry) => {
|
|
|
27465
27465
|
return {
|
|
27466
27466
|
...entry,
|
|
27467
27467
|
forcedOff: () => failed ? NEEDS_APP : entry.forcedOff?.(),
|
|
27468
|
-
contributions: entry.contributions.pipe(catchCause((cause) => sync$
|
|
27468
|
+
contributions: entry.contributions.pipe(catchCause((cause) => sync$2(() => {
|
|
27469
27469
|
failed = true;
|
|
27470
27470
|
}).pipe(andThen(logWarning(`Peer Core: plugin ${entry.id} ${NEEDS_APP}`, cause)), as({}))))
|
|
27471
27471
|
};
|
|
@@ -27919,6 +27919,223 @@ const editorChoices = (detected) => [
|
|
|
27919
27919
|
}
|
|
27920
27920
|
];
|
|
27921
27921
|
//#endregion
|
|
27922
|
+
//#region src/cli/peerCoreTree.ts
|
|
27923
|
+
/**
|
|
27924
|
+
* The terminal tree `Invite a teammate` picks a scope with: all areas and tasks, whole areas (which
|
|
27925
|
+
* cover their future tasks too), or single tasks, an area opening to show its tasks. Selecting is a
|
|
27926
|
+
* pure reducer over a small state, so the rules (an area's tasks are not assigned twice, a partly
|
|
27927
|
+
* chosen area shows `[-]`) are tested without a terminal; `treePrompt` draws it with Effect's
|
|
27928
|
+
* custom prompt.
|
|
27929
|
+
*
|
|
27930
|
+
* @module cli/peerCoreTree
|
|
27931
|
+
*/
|
|
27932
|
+
const initialTree = (areas) => ({
|
|
27933
|
+
areas: areas.filter((area) => area.name !== null || area.tasks.length > 0),
|
|
27934
|
+
cursor: 0,
|
|
27935
|
+
open: [],
|
|
27936
|
+
all: false,
|
|
27937
|
+
whole: [],
|
|
27938
|
+
tasks: []
|
|
27939
|
+
});
|
|
27940
|
+
const rows = (state) => [
|
|
27941
|
+
{ kind: "all" },
|
|
27942
|
+
...state.areas.flatMap((area) => state.open.includes(area.name) ? [
|
|
27943
|
+
{
|
|
27944
|
+
kind: "area",
|
|
27945
|
+
area
|
|
27946
|
+
},
|
|
27947
|
+
...area.name === null ? [] : [{
|
|
27948
|
+
kind: "areaAll",
|
|
27949
|
+
area
|
|
27950
|
+
}],
|
|
27951
|
+
...area.tasks.map((task) => ({
|
|
27952
|
+
kind: "task",
|
|
27953
|
+
area,
|
|
27954
|
+
task
|
|
27955
|
+
}))
|
|
27956
|
+
] : [{
|
|
27957
|
+
kind: "area",
|
|
27958
|
+
area
|
|
27959
|
+
}]),
|
|
27960
|
+
{ kind: "continue" }
|
|
27961
|
+
];
|
|
27962
|
+
const areaMark = (state, area) => {
|
|
27963
|
+
if (state.all || area.name !== null && state.whole.includes(area.name)) return "on";
|
|
27964
|
+
const chosen = area.tasks.filter((task) => state.tasks.includes(task.id)).length;
|
|
27965
|
+
if (chosen === 0) return "off";
|
|
27966
|
+
return area.name === null && chosen === area.tasks.length ? "on" : "some";
|
|
27967
|
+
};
|
|
27968
|
+
const mark = (state, row) => {
|
|
27969
|
+
switch (row.kind) {
|
|
27970
|
+
case "all": return state.all ? "on" : "off";
|
|
27971
|
+
case "area": return areaMark(state, row.area);
|
|
27972
|
+
case "areaAll": return state.all || state.whole.includes(row.area.name) ? "on" : "off";
|
|
27973
|
+
case "task": return state.all || row.area.name !== null && state.whole.includes(row.area.name) || state.tasks.includes(row.task.id) ? "on" : "off";
|
|
27974
|
+
case "continue": return "off";
|
|
27975
|
+
}
|
|
27976
|
+
};
|
|
27977
|
+
/** "All" as what it stands for, so one part of it can be taken away. */
|
|
27978
|
+
const spread = (state) => state.all ? {
|
|
27979
|
+
...state,
|
|
27980
|
+
all: false,
|
|
27981
|
+
whole: state.areas.flatMap((a) => a.name === null ? [] : [a.name]),
|
|
27982
|
+
tasks: state.areas.filter((a) => a.name === null).flatMap((a) => a.tasks.map((t) => t.id))
|
|
27983
|
+
} : state;
|
|
27984
|
+
const without = (list, drop) => list.filter((item) => !drop.includes(item));
|
|
27985
|
+
/** Space on a row: what it selects or clears, never one task twice. */
|
|
27986
|
+
const toggle = (state, row) => {
|
|
27987
|
+
if (row.kind === "continue") return state;
|
|
27988
|
+
if (row.kind === "all") return {
|
|
27989
|
+
...state,
|
|
27990
|
+
all: !state.all,
|
|
27991
|
+
whole: [],
|
|
27992
|
+
tasks: []
|
|
27993
|
+
};
|
|
27994
|
+
const next = spread(state);
|
|
27995
|
+
const ids = row.area.tasks.map((task) => task.id);
|
|
27996
|
+
if (row.kind === "area" || row.kind === "areaAll") {
|
|
27997
|
+
const on = areaMark(next, row.area) === "on";
|
|
27998
|
+
if (row.area.name === null) return {
|
|
27999
|
+
...next,
|
|
28000
|
+
tasks: on ? without(next.tasks, ids) : [...without(next.tasks, ids), ...ids]
|
|
28001
|
+
};
|
|
28002
|
+
const name = row.area.name;
|
|
28003
|
+
return on ? {
|
|
28004
|
+
...next,
|
|
28005
|
+
whole: without(next.whole, [name]),
|
|
28006
|
+
tasks: without(next.tasks, ids)
|
|
28007
|
+
} : {
|
|
28008
|
+
...next,
|
|
28009
|
+
whole: [...next.whole, name],
|
|
28010
|
+
tasks: without(next.tasks, ids)
|
|
28011
|
+
};
|
|
28012
|
+
}
|
|
28013
|
+
const name = row.area.name;
|
|
28014
|
+
if (name !== null && next.whole.includes(name)) return {
|
|
28015
|
+
...next,
|
|
28016
|
+
whole: without(next.whole, [name]),
|
|
28017
|
+
tasks: [...without(next.tasks, ids), ...without(ids, [row.task.id])]
|
|
28018
|
+
};
|
|
28019
|
+
return next.tasks.includes(row.task.id) ? {
|
|
28020
|
+
...next,
|
|
28021
|
+
tasks: without(next.tasks, [row.task.id])
|
|
28022
|
+
} : {
|
|
28023
|
+
...next,
|
|
28024
|
+
tasks: [...next.tasks, row.task.id]
|
|
28025
|
+
};
|
|
28026
|
+
};
|
|
28027
|
+
const selection = (state) => ({
|
|
28028
|
+
all: state.all,
|
|
28029
|
+
areas: state.all ? [] : state.whole,
|
|
28030
|
+
tasks: state.all ? [] : state.tasks
|
|
28031
|
+
});
|
|
28032
|
+
/** The chosen scope in lines, as the confirmation shows it. */
|
|
28033
|
+
const describe = (areas, chosen) => {
|
|
28034
|
+
if (chosen.all) return ["✓ All areas and tasks"];
|
|
28035
|
+
const lines = chosen.areas.map((name) => `✓ ${name} — all tasks, and new ones`);
|
|
28036
|
+
for (const area of areas) {
|
|
28037
|
+
const picked = area.tasks.filter((task) => chosen.tasks.includes(task.id));
|
|
28038
|
+
if (picked.length === 0) continue;
|
|
28039
|
+
lines.push(`✓ ${area.name ?? "No area"} — ${picked.length === 1 ? picked[0].title : `${picked.length} tasks`}`);
|
|
28040
|
+
}
|
|
28041
|
+
return lines;
|
|
28042
|
+
};
|
|
28043
|
+
const box = (state) => state === "on" ? "[x]" : state === "some" ? "[-]" : "[ ]";
|
|
28044
|
+
const clip = (text, width) => text.length <= width ? text : `${text.slice(0, Math.max(width - 1, 1))}…`;
|
|
28045
|
+
const label$1 = (state, row) => {
|
|
28046
|
+
switch (row.kind) {
|
|
28047
|
+
case "all": return `${box(mark(state, row))} All areas and tasks`;
|
|
28048
|
+
case "area": {
|
|
28049
|
+
const arrow = state.open.includes(row.area.name) ? "▾" : "▸";
|
|
28050
|
+
const owner = row.area.owner === void 0 ? "" : ` · ${row.area.owner}'s`;
|
|
28051
|
+
return `${arrow} ${box(mark(state, row))} ${row.area.name ?? "No area"} (${row.area.tasks.length})${owner}`;
|
|
28052
|
+
}
|
|
28053
|
+
case "areaAll": return ` ${box(mark(state, row))} All tasks in ${row.area.name}`;
|
|
28054
|
+
case "task": {
|
|
28055
|
+
const tags = [...row.task.openspec === true ? ["OpenSpec"] : [], ...row.task.owner === void 0 ? [] : [`${row.task.owner}'s`]];
|
|
28056
|
+
return ` ${box(mark(state, row))} ${row.task.title}${tags.length === 0 ? "" : ` · ${tags.join(" · ")}`}`;
|
|
28057
|
+
}
|
|
28058
|
+
case "continue": return "Continue";
|
|
28059
|
+
}
|
|
28060
|
+
};
|
|
28061
|
+
const VISIBLE = 16;
|
|
28062
|
+
const HINT = "↑↓ move · space select · → open · ← close · Enter on Continue";
|
|
28063
|
+
/** The frame: a window of rows around the cursor, each one line at most `width` wide. */
|
|
28064
|
+
const frame = (state, message, width = 80) => {
|
|
28065
|
+
const all = rows(state);
|
|
28066
|
+
const start = Math.max(0, Math.min(state.cursor - Math.floor(VISIBLE / 2), all.length - VISIBLE));
|
|
28067
|
+
const shown = all.slice(start, start + VISIBLE);
|
|
28068
|
+
return [
|
|
28069
|
+
`? ${message}`,
|
|
28070
|
+
...start > 0 ? [" ↑ more"] : [],
|
|
28071
|
+
...shown.map((row, index) => clip(`${start + index === state.cursor ? "❯ " : " "}${label$1(state, row)}`, width)),
|
|
28072
|
+
...start + VISIBLE < all.length ? [" ↓ more"] : [],
|
|
28073
|
+
clip(HINT, width)
|
|
28074
|
+
];
|
|
28075
|
+
};
|
|
28076
|
+
/** A key, as the prompt hands it: what becomes of the state, or the selection when done. */
|
|
28077
|
+
const press$1 = (state, key) => {
|
|
28078
|
+
const all = rows(state);
|
|
28079
|
+
const row = all[state.cursor];
|
|
28080
|
+
const move = (cursor) => ({ state: {
|
|
28081
|
+
...state,
|
|
28082
|
+
cursor
|
|
28083
|
+
} });
|
|
28084
|
+
const area = row.kind === "area" || row.kind === "areaAll" || row.kind === "task" ? row.area : null;
|
|
28085
|
+
switch (key) {
|
|
28086
|
+
case "up": return move((state.cursor - 1 + all.length) % all.length);
|
|
28087
|
+
case "down":
|
|
28088
|
+
case "tab": return move((state.cursor + 1) % all.length);
|
|
28089
|
+
case "space": return { state: toggle(state, row) };
|
|
28090
|
+
case "right": return area === null || state.open.includes(area.name) ? { state } : { state: {
|
|
28091
|
+
...state,
|
|
28092
|
+
open: [...state.open, area.name]
|
|
28093
|
+
} };
|
|
28094
|
+
case "left": {
|
|
28095
|
+
if (area === null || !state.open.includes(area.name)) return { state };
|
|
28096
|
+
const closed = {
|
|
28097
|
+
...state,
|
|
28098
|
+
open: state.open.filter((name) => name !== area.name)
|
|
28099
|
+
};
|
|
28100
|
+
return { state: {
|
|
28101
|
+
...closed,
|
|
28102
|
+
cursor: rows(closed).findIndex((r) => r.kind === "area" && r.area === area)
|
|
28103
|
+
} };
|
|
28104
|
+
}
|
|
28105
|
+
case "enter":
|
|
28106
|
+
case "return":
|
|
28107
|
+
if (row.kind === "continue") return { done: selection(state) };
|
|
28108
|
+
if (row.kind === "area") return press$1(state, state.open.includes(row.area.name) ? "left" : "right");
|
|
28109
|
+
return { state: toggle(state, row) };
|
|
28110
|
+
default: return { state };
|
|
28111
|
+
}
|
|
28112
|
+
};
|
|
28113
|
+
const Action = taggedEnum();
|
|
28114
|
+
/** The tree as a terminal prompt. */
|
|
28115
|
+
const treePrompt = (message, areas) => {
|
|
28116
|
+
let drawn = 0;
|
|
28117
|
+
const erase = () => {
|
|
28118
|
+
return drawn === 0 ? "" : `${"\x1B[2K\x1B[1A".repeat(drawn - 1)}\x1b[2K\x1b[G`;
|
|
28119
|
+
};
|
|
28120
|
+
return Custom(initialTree(areas), {
|
|
28121
|
+
render: (state, action) => sync$2(() => {
|
|
28122
|
+
if (action._tag === "Submit") {
|
|
28123
|
+
drawn = 1;
|
|
28124
|
+
return `✔ ${message}`;
|
|
28125
|
+
}
|
|
28126
|
+
const lines = frame(state, message, (process.stdout.columns ?? 0) > 20 ? process.stdout.columns - 1 : 80);
|
|
28127
|
+
drawn = lines.length;
|
|
28128
|
+
return `\x1b[?25l${lines.join("\n")}`;
|
|
28129
|
+
}),
|
|
28130
|
+
process: (input, state) => sync$2(() => {
|
|
28131
|
+
const name = input.key.name === "" ? getOrElse(input.input, () => "") : input.key.name;
|
|
28132
|
+
const next = press$1(state, name === " " ? "space" : name);
|
|
28133
|
+
return "done" in next ? Action.Submit({ value: next.done }) : Action.NextFrame({ state: next.state });
|
|
28134
|
+
}),
|
|
28135
|
+
clear: () => sync$2(erase)
|
|
28136
|
+
});
|
|
28137
|
+
};
|
|
28138
|
+
//#endregion
|
|
27922
28139
|
//#region src/cli/peerCoreMenu.ts
|
|
27923
28140
|
/**
|
|
27924
28141
|
* `peer core create`, `peer core invite`, and the menu `peer core login` opens on a terminal: what
|
|
@@ -27958,7 +28175,9 @@ const invite = (input, status, io) => gen$1(function* () {
|
|
|
27958
28175
|
workspace: slug,
|
|
27959
28176
|
email,
|
|
27960
28177
|
...input.admin === true ? { role: "admin" } : {},
|
|
27961
|
-
...projects.length > 0 ? { projects } : {}
|
|
28178
|
+
...projects.length > 0 ? { projects } : {},
|
|
28179
|
+
...input.areas === void 0 || input.areas.length === 0 ? {} : { areas: input.areas },
|
|
28180
|
+
...input.tasks === void 0 || input.tasks.length === 0 ? {} : { tasks: input.tasks }
|
|
27962
28181
|
});
|
|
27963
28182
|
const failed = result.delivery?.error;
|
|
27964
28183
|
yield* io.say(`Invited: ${email} to ${slug}${projects.length > 0 ? ` (projects ${projects.join(", ")})` : ""}${input.admin === true ? " as admin" : ""}.`);
|
|
@@ -28081,12 +28300,18 @@ const menuItems = (status, here, editors = []) => {
|
|
|
28081
28300
|
folder: here.root
|
|
28082
28301
|
}
|
|
28083
28302
|
})) : [];
|
|
28303
|
+
const openspec = here?.state === "connected" && here.openspec === true ? [{
|
|
28304
|
+
title: "Sync OpenSpec changes",
|
|
28305
|
+
description: "New changes become tasks; edits made in Peer stay.",
|
|
28306
|
+
value: { kind: "openspec" }
|
|
28307
|
+
}] : [];
|
|
28084
28308
|
const items = inWorkspace ? [
|
|
28085
28309
|
...offers,
|
|
28086
28310
|
...here?.state === "connected" ? [
|
|
28087
28311
|
...launch,
|
|
28088
28312
|
...invite,
|
|
28089
28313
|
...work,
|
|
28314
|
+
...openspec,
|
|
28090
28315
|
...connectHere
|
|
28091
28316
|
] : [
|
|
28092
28317
|
...connectHere,
|
|
@@ -28186,6 +28411,10 @@ const menu = (ask, steps, io) => gen$1(function* () {
|
|
|
28186
28411
|
"",
|
|
28187
28412
|
"Your project is ready for collaboration."
|
|
28188
28413
|
].join("\n"));
|
|
28414
|
+
yield* steps.openspec({
|
|
28415
|
+
...joined,
|
|
28416
|
+
root: folder
|
|
28417
|
+
});
|
|
28189
28418
|
shown = "";
|
|
28190
28419
|
});
|
|
28191
28420
|
yield* gen$1(function* () {
|
|
@@ -28244,6 +28473,13 @@ const menu = (ask, steps, io) => gen$1(function* () {
|
|
|
28244
28473
|
}
|
|
28245
28474
|
case "create": return yield* createStep;
|
|
28246
28475
|
case "join": return yield* joinStep;
|
|
28476
|
+
case "openspec":
|
|
28477
|
+
if (here?.state === "connected") yield* steps.openspec({
|
|
28478
|
+
workspace: here.workspace,
|
|
28479
|
+
project: here.project,
|
|
28480
|
+
root: here.root
|
|
28481
|
+
});
|
|
28482
|
+
return;
|
|
28247
28483
|
case "task": {
|
|
28248
28484
|
const projects = status.workspaces.flatMap((w) => w.projects.map((p) => ({
|
|
28249
28485
|
workspace: w.slug,
|
|
@@ -28268,20 +28504,62 @@ const menu = (ask, steps, io) => gen$1(function* () {
|
|
|
28268
28504
|
}
|
|
28269
28505
|
case "invite": {
|
|
28270
28506
|
const slugs = status.workspaces.filter((w) => inviter(w.role)).map((w) => w.slug);
|
|
28271
|
-
const slug = slugs.length === 1 ? slugs[0] : yield* ask.choose("Invite to which workspace?", slugs.map((s) => ({
|
|
28507
|
+
const slug = here?.state === "connected" && slugs.includes(here.workspace) ? here.workspace : slugs.length === 1 ? slugs[0] : yield* ask.choose("Invite to which workspace?", slugs.map((s) => ({
|
|
28272
28508
|
title: s,
|
|
28273
28509
|
value: s
|
|
28274
28510
|
})));
|
|
28275
28511
|
if (slug === null) return;
|
|
28276
|
-
const email = yield* ask.text(
|
|
28512
|
+
const email = yield* ask.text("Teammate email");
|
|
28277
28513
|
if (email === null || email.trim() === "") return;
|
|
28278
28514
|
const projects = status.workspaces.find((w) => w.slug === slug)?.projects.map((p) => p.project.id) ?? [];
|
|
28279
|
-
const
|
|
28515
|
+
const project = here?.state === "connected" && here.workspace === slug ? here.project : projects.length <= 1 ? projects[0] ?? null : yield* ask.choose("Which project?", projects.map((p) => ({
|
|
28516
|
+
title: p,
|
|
28517
|
+
value: p
|
|
28518
|
+
})));
|
|
28519
|
+
if (project === null) return yield* steps.invite({
|
|
28520
|
+
email,
|
|
28521
|
+
workspace: slug,
|
|
28522
|
+
projects: []
|
|
28523
|
+
});
|
|
28524
|
+
const areas = yield* steps.scope(slug, project);
|
|
28525
|
+
const how = yield* ask.choose("What would you like to assign?", [{
|
|
28526
|
+
title: "All areas and tasks",
|
|
28527
|
+
description: "Every area that has no owner yet, with its new tasks.",
|
|
28528
|
+
value: "all"
|
|
28529
|
+
}, {
|
|
28530
|
+
title: "Select areas or tasks",
|
|
28531
|
+
value: "pick"
|
|
28532
|
+
}]);
|
|
28533
|
+
if (how === null) return;
|
|
28534
|
+
const chosen = how === "all" ? {
|
|
28535
|
+
all: true,
|
|
28536
|
+
areas: [],
|
|
28537
|
+
tasks: []
|
|
28538
|
+
} : yield* ask.tree("Select areas or tasks", areas);
|
|
28280
28539
|
if (chosen === null) return;
|
|
28540
|
+
const named = areas.flatMap((a) => a.name === null ? [] : [a.name]);
|
|
28541
|
+
yield* io.say([
|
|
28542
|
+
"",
|
|
28543
|
+
`Invite ${email.trim()}?`,
|
|
28544
|
+
"",
|
|
28545
|
+
`Workspace: ${slug}`,
|
|
28546
|
+
`Project: ${project}`,
|
|
28547
|
+
"",
|
|
28548
|
+
"Assignments:",
|
|
28549
|
+
...chosen.all || chosen.areas.length > 0 || chosen.tasks.length > 0 ? describe(areas, chosen).map((line) => ` ${line}`) : [" none: they can take any task"],
|
|
28550
|
+
...areas.filter((a) => a.name !== null && a.owner !== void 0 && (chosen.all || chosen.areas.includes(a.name))).map((a) => ` · ${a.name} stays ${a.owner}'s`),
|
|
28551
|
+
""
|
|
28552
|
+
].join("\n"));
|
|
28553
|
+
if (!(yield* ask.confirm("Send invitation?", true))) {
|
|
28554
|
+
yield* io.say("Nothing sent.");
|
|
28555
|
+
return;
|
|
28556
|
+
}
|
|
28281
28557
|
return yield* steps.invite({
|
|
28282
28558
|
email,
|
|
28283
28559
|
workspace: slug,
|
|
28284
|
-
projects:
|
|
28560
|
+
projects: [project],
|
|
28561
|
+
areas: chosen.all ? named : chosen.areas,
|
|
28562
|
+
tasks: chosen.all ? [] : chosen.tasks
|
|
28285
28563
|
});
|
|
28286
28564
|
}
|
|
28287
28565
|
}
|
|
@@ -28289,6 +28567,214 @@ const menu = (ask, steps, io) => gen$1(function* () {
|
|
|
28289
28567
|
}
|
|
28290
28568
|
});
|
|
28291
28569
|
//#endregion
|
|
28570
|
+
//#region src/cli/peerCoreOpenSpec.ts
|
|
28571
|
+
/**
|
|
28572
|
+
* OpenSpec in a connected project: each active change (`openspec/changes/<id>/`, not `archive`)
|
|
28573
|
+
* becomes one Peer task whose key is the change's id, in the project area that one of its
|
|
28574
|
+
* capabilities (`specs/<capability>/`) names, when one does. Importing again creates only what is
|
|
28575
|
+
* new and updates a task only where the change moved and Peer did not: what the last import wrote
|
|
28576
|
+
* is kept in `<stateDir>/openspec-sync.json`, so an edit made in Peer is never written over, and an
|
|
28577
|
+
* edit on both sides is a conflict to show. Statuses, owners and everything else Peer holds are
|
|
28578
|
+
* never touched.
|
|
28579
|
+
*
|
|
28580
|
+
* @module cli/peerCoreOpenSpec
|
|
28581
|
+
*/
|
|
28582
|
+
const GENERIC_TITLE = /^(proposal|change proposal|change)$/i;
|
|
28583
|
+
/** `add-draft-surveys` → `Add draft surveys`. */
|
|
28584
|
+
const titleOfId = (id) => {
|
|
28585
|
+
const words = id.replace(/[-_]+/g, " ").trim();
|
|
28586
|
+
return words === "" ? id : `${words[0].toUpperCase()}${words.slice(1)}`;
|
|
28587
|
+
};
|
|
28588
|
+
/** The proposal's first heading when it names the change (`# Change: X` → `X`), else the id's words. */
|
|
28589
|
+
const changeTitle = (id, proposal) => {
|
|
28590
|
+
const heading = proposal?.split("\n").find((line) => /^#\s+\S/.test(line))?.replace(/^#\s+/, "").replace(/^(change|proposal)\s*:\s*/i, "").trim();
|
|
28591
|
+
return heading === void 0 || heading === "" || GENERIC_TITLE.test(heading) ? titleOfId(id) : heading.slice(0, 200);
|
|
28592
|
+
};
|
|
28593
|
+
const readText = (path) => NodeFSP.readFile(path, "utf8").catch(() => null);
|
|
28594
|
+
const folders = async (path) => (await NodeFSP.readdir(path, { withFileTypes: true }).catch(() => [])).filter((entry) => entry.isDirectory() && !entry.name.startsWith(".")).map((entry) => entry.name).sort();
|
|
28595
|
+
/** The active changes under `root/openspec/changes`; null when the project has no OpenSpec. */
|
|
28596
|
+
async function readChanges(root) {
|
|
28597
|
+
const dir = NodePath.join(root, "openspec", "changes");
|
|
28598
|
+
const stat = await NodeFSP.stat(dir).catch(() => null);
|
|
28599
|
+
if (stat === null || !stat.isDirectory()) return null;
|
|
28600
|
+
const changes = [];
|
|
28601
|
+
for (const id of await folders(dir)) {
|
|
28602
|
+
if (id === "archive") continue;
|
|
28603
|
+
const tasks = await readText(NodePath.join(dir, id, "tasks.md")) ?? "";
|
|
28604
|
+
changes.push({
|
|
28605
|
+
id,
|
|
28606
|
+
title: changeTitle(id, await readText(NodePath.join(dir, id, "proposal.md"))),
|
|
28607
|
+
capabilities: await folders(NodePath.join(dir, id, "specs")),
|
|
28608
|
+
done: (tasks.match(/^\s*[-*] \[[xX]\]/gm) ?? []).length,
|
|
28609
|
+
total: (tasks.match(/^\s*[-*] \[[ xX]\]/gm) ?? []).length
|
|
28610
|
+
});
|
|
28611
|
+
}
|
|
28612
|
+
return changes;
|
|
28613
|
+
}
|
|
28614
|
+
const comparable = (name) => name.toLowerCase().replace(/[^a-z0-9]+/g, "");
|
|
28615
|
+
/** The project area one of the change's capabilities names, when exactly one area matches. */
|
|
28616
|
+
const areaOf = (change, areas) => {
|
|
28617
|
+
const matched = new Set(areas.filter((area) => change.capabilities.some((capability) => comparable(capability) === comparable(area))));
|
|
28618
|
+
return matched.size === 1 ? [...matched][0] : null;
|
|
28619
|
+
};
|
|
28620
|
+
/**
|
|
28621
|
+
* What importing `changes` into a project would do, given its tasks and areas now and what the
|
|
28622
|
+
* last import wrote. A field is updated only when the change moved and Peer still holds what the
|
|
28623
|
+
* import wrote; a field both sides changed differently is a conflict; a task with the change's key
|
|
28624
|
+
* that no import wrote is adopted only where it already agrees.
|
|
28625
|
+
*/
|
|
28626
|
+
const plan = (changes, tasks, areas, record) => changes.map((change) => {
|
|
28627
|
+
const area = areaOf(change, areas);
|
|
28628
|
+
const last = record[change.id];
|
|
28629
|
+
const task = tasks.find((t) => last !== void 0 && t.id === last.task) ?? tasks.find((t) => t.key?.toLowerCase() === change.id.toLowerCase());
|
|
28630
|
+
if (task === void 0) return {
|
|
28631
|
+
kind: "create",
|
|
28632
|
+
change,
|
|
28633
|
+
area
|
|
28634
|
+
};
|
|
28635
|
+
const base = last ?? {
|
|
28636
|
+
task: task.id,
|
|
28637
|
+
title: task.title,
|
|
28638
|
+
area: task.area ?? null
|
|
28639
|
+
};
|
|
28640
|
+
const fields = [];
|
|
28641
|
+
let title;
|
|
28642
|
+
let nextArea;
|
|
28643
|
+
if (change.title !== task.title) {
|
|
28644
|
+
if (last !== void 0 && task.title === base.title) title = change.title;
|
|
28645
|
+
else if (last === void 0 || change.title !== base.title) fields.push("title");
|
|
28646
|
+
}
|
|
28647
|
+
const held = task.area ?? null;
|
|
28648
|
+
if (area !== held) {
|
|
28649
|
+
if (last !== void 0 && held === base.area) nextArea = area;
|
|
28650
|
+
else if (last === void 0 || area !== base.area) fields.push("area");
|
|
28651
|
+
}
|
|
28652
|
+
if (fields.length > 0) return {
|
|
28653
|
+
kind: "conflict",
|
|
28654
|
+
change,
|
|
28655
|
+
task,
|
|
28656
|
+
fields
|
|
28657
|
+
};
|
|
28658
|
+
if (title === void 0 && nextArea === void 0) return {
|
|
28659
|
+
kind: "same",
|
|
28660
|
+
change,
|
|
28661
|
+
task
|
|
28662
|
+
};
|
|
28663
|
+
return {
|
|
28664
|
+
kind: "update",
|
|
28665
|
+
change,
|
|
28666
|
+
task,
|
|
28667
|
+
...title === void 0 ? {} : { title },
|
|
28668
|
+
...nextArea === void 0 ? {} : { area: nextArea }
|
|
28669
|
+
};
|
|
28670
|
+
});
|
|
28671
|
+
/** The plan in a line: what is new, what moves, what conflicts. */
|
|
28672
|
+
const summary = (steps) => {
|
|
28673
|
+
const count = (kind) => steps.filter((s) => s.kind === kind).length;
|
|
28674
|
+
const parts = [
|
|
28675
|
+
`${count("create")} new`,
|
|
28676
|
+
`${count("update")} to update`,
|
|
28677
|
+
...count("conflict") > 0 ? [`${count("conflict")} in conflict`] : [],
|
|
28678
|
+
`${count("same")} up to date`
|
|
28679
|
+
];
|
|
28680
|
+
return `${steps.length} OpenSpec change${steps.length === 1 ? "" : "s"}: ${parts.join(", ")}`;
|
|
28681
|
+
};
|
|
28682
|
+
const recordPath = (stateDir) => NodePath.join(stateDir, "openspec-sync.json");
|
|
28683
|
+
const readRecord = (stateDir) => NodeFSP.readFile(recordPath(stateDir), "utf8").then((text) => JSON.parse(text)).catch(() => ({}));
|
|
28684
|
+
const writeRecord = async (stateDir, record) => {
|
|
28685
|
+
const path = recordPath(stateDir);
|
|
28686
|
+
await NodeFSP.writeFile(`${path}.tmp`, `${JSON.stringify(record, null, 2)}\n`, { mode: 384 });
|
|
28687
|
+
await NodeFSP.rename(`${path}.tmp`, path);
|
|
28688
|
+
};
|
|
28689
|
+
/** The project's tasks and areas as the Hub says now, the changes here, and the plan. */
|
|
28690
|
+
const prepare = (target) => gen$1(function* () {
|
|
28691
|
+
const changes = yield* promise(() => readChanges(target.root));
|
|
28692
|
+
if (changes === null) return null;
|
|
28693
|
+
const client = yield* PeerHubClient;
|
|
28694
|
+
const { hubUrl, session } = yield* client.session;
|
|
28695
|
+
const project = (yield* client.api.work(hubUrl, session, target.workspace)).projects[target.project];
|
|
28696
|
+
const areas = project?.areas ?? [];
|
|
28697
|
+
const record = yield* promise(() => readRecord(target.stateDir));
|
|
28698
|
+
const key = `${target.workspace}/${target.project}`;
|
|
28699
|
+
return {
|
|
28700
|
+
changes,
|
|
28701
|
+
areas,
|
|
28702
|
+
steps: plan(changes, project?.tasks ?? [], areas, record[key] ?? {})
|
|
28703
|
+
};
|
|
28704
|
+
});
|
|
28705
|
+
/**
|
|
28706
|
+
* Applies `steps`: creates and updates tasks through the Hub, and records what it wrote. A conflict
|
|
28707
|
+
* is said, never written; a failure stops with what was done recorded.
|
|
28708
|
+
*/
|
|
28709
|
+
const apply = (target, steps, io) => gen$1(function* () {
|
|
28710
|
+
const work = yield* PeerWork;
|
|
28711
|
+
const key = `${target.workspace}/${target.project}`;
|
|
28712
|
+
const record = { ...yield* promise(() => readRecord(target.stateDir)) };
|
|
28713
|
+
const mine = { ...record[key] };
|
|
28714
|
+
const save = promise(() => writeRecord(target.stateDir, {
|
|
28715
|
+
...record,
|
|
28716
|
+
[key]: mine
|
|
28717
|
+
}));
|
|
28718
|
+
for (const step of steps) if (step.kind === "create") {
|
|
28719
|
+
const { createdTask } = yield* work.createTask({
|
|
28720
|
+
workspace: target.workspace,
|
|
28721
|
+
projectId: target.project,
|
|
28722
|
+
title: step.change.title,
|
|
28723
|
+
key: step.change.id,
|
|
28724
|
+
...step.area === null ? {} : { area: step.area }
|
|
28725
|
+
}).pipe(tapError(() => save));
|
|
28726
|
+
mine[step.change.id] = {
|
|
28727
|
+
task: createdTask.id,
|
|
28728
|
+
title: step.change.title,
|
|
28729
|
+
area: step.area
|
|
28730
|
+
};
|
|
28731
|
+
yield* io.say(`+ ${step.change.title}${step.area === null ? "" : ` (${step.area})`} · ${step.change.id}`);
|
|
28732
|
+
} else if (step.kind === "update") {
|
|
28733
|
+
yield* work.updateTask({
|
|
28734
|
+
workspace: target.workspace,
|
|
28735
|
+
projectId: target.project,
|
|
28736
|
+
taskId: step.task.id,
|
|
28737
|
+
...step.title === void 0 ? {} : { title: step.title },
|
|
28738
|
+
...step.area === void 0 ? {} : { area: step.area ?? "" }
|
|
28739
|
+
}).pipe(tapError(() => save));
|
|
28740
|
+
mine[step.change.id] = {
|
|
28741
|
+
task: step.task.id,
|
|
28742
|
+
title: step.title ?? step.task.title,
|
|
28743
|
+
area: step.area === void 0 ? step.task.area ?? null : step.area
|
|
28744
|
+
};
|
|
28745
|
+
yield* io.say(`~ ${step.title ?? step.task.title} · ${step.change.id}`);
|
|
28746
|
+
} else if (step.kind === "conflict") yield* io.say(`! ${step.task.title} · ${step.change.id}: the ${step.fields.join(" and ")} changed in OpenSpec and in Peer; Peer's stays. Change one of them to match.`);
|
|
28747
|
+
else if (mine[step.change.id] === void 0) mine[step.change.id] = {
|
|
28748
|
+
task: step.task.id,
|
|
28749
|
+
title: step.task.title,
|
|
28750
|
+
area: step.task.area ?? null
|
|
28751
|
+
};
|
|
28752
|
+
yield* save;
|
|
28753
|
+
});
|
|
28754
|
+
/**
|
|
28755
|
+
* Shows what importing would do and, when something would change and `confirm` agrees, does it.
|
|
28756
|
+
* Nothing to import says so; a project without `openspec/` says nothing and returns false.
|
|
28757
|
+
*/
|
|
28758
|
+
const sync = (target, confirm, io) => gen$1(function* () {
|
|
28759
|
+
const prepared = yield* prepare(target);
|
|
28760
|
+
if (prepared === null) return false;
|
|
28761
|
+
const { steps } = prepared;
|
|
28762
|
+
yield* io.say(summary(steps));
|
|
28763
|
+
for (const step of steps) if (step.kind === "conflict") yield* io.say(`! ${step.change.id}: the ${step.fields.join(" and ")} differs in Peer (${step.task.title}); Peer's stays.`);
|
|
28764
|
+
const work = steps.filter((step) => step.kind === "create" || step.kind === "update");
|
|
28765
|
+
if (work.length === 0) {
|
|
28766
|
+
yield* apply(target, steps, io);
|
|
28767
|
+
return true;
|
|
28768
|
+
}
|
|
28769
|
+
if (!(yield* confirm(`Import ${work.length} as tasks of ${target.workspace}/${target.project}?`))) {
|
|
28770
|
+
yield* io.say("Nothing imported.");
|
|
28771
|
+
return true;
|
|
28772
|
+
}
|
|
28773
|
+
yield* apply(target, steps, io);
|
|
28774
|
+
yield* io.say("Imported. A task's key is its change's id, so a branch named after the change attaches to it.");
|
|
28775
|
+
return true;
|
|
28776
|
+
});
|
|
28777
|
+
//#endregion
|
|
28292
28778
|
//#region src/cli/peerCoreShare.ts
|
|
28293
28779
|
/**
|
|
28294
28780
|
* `peer core share [folder]`: a folder on this computer becomes a project of a workspace, either a
|
|
@@ -28769,6 +29255,7 @@ const menuAsk = {
|
|
|
28769
29255
|
}))
|
|
28770
29256
|
})).pipe(orElseSucceed(() => null)),
|
|
28771
29257
|
confirm: shareAsk.confirm,
|
|
29258
|
+
tree: (message, areas) => run$3(treePrompt(message, areas)).pipe(orElseSucceed(() => null)),
|
|
28772
29259
|
folder: (message) => run$3(File({
|
|
28773
29260
|
type: "directory",
|
|
28774
29261
|
message,
|
|
@@ -28793,7 +29280,8 @@ const runMenu = (stateDir) => gen$1(function* () {
|
|
|
28793
29280
|
root: checkout.root,
|
|
28794
29281
|
state: "connected",
|
|
28795
29282
|
workspace: place.workspace,
|
|
28796
|
-
project: place.project
|
|
29283
|
+
project: place.project,
|
|
29284
|
+
openspec: NodeFS.existsSync(NodePath.join(checkout.root, "openspec", "changes"))
|
|
28797
29285
|
};
|
|
28798
29286
|
const remote = yield* promise(() => remoteOf(checkout.remoteRoot));
|
|
28799
29287
|
const { persisted } = yield* state.read;
|
|
@@ -28854,11 +29342,45 @@ const runMenu = (stateDir) => gen$1(function* () {
|
|
|
28854
29342
|
}, terminalIo);
|
|
28855
29343
|
yield* log("Your agents in the project see it with peer tasks, and Peer tells them who works on what.");
|
|
28856
29344
|
}).pipe(hubFailure),
|
|
29345
|
+
scope: (workspace, project) => gen$1(function* () {
|
|
29346
|
+
const client = yield* PeerHubClient;
|
|
29347
|
+
const { hubUrl, session } = yield* client.session;
|
|
29348
|
+
const work = (yield* client.api.work(hubUrl, session, workspace)).projects[project];
|
|
29349
|
+
const view = yield* client.api.taskOwners(hubUrl, session, workspace).pipe(option);
|
|
29350
|
+
const owners = isSome(view) ? view.value.projects[project] : void 0;
|
|
29351
|
+
const imported = new Set(Object.values((yield* promise(() => readRecord(stateDir)))[`${workspace}/${project}`] ?? {}).map((entry) => entry.task));
|
|
29352
|
+
const tasks = (work?.tasks ?? []).filter((task) => task.status !== "done");
|
|
29353
|
+
const treeTask = (task) => {
|
|
29354
|
+
const owner = owners?.tasks[task.id]?.owner;
|
|
29355
|
+
return {
|
|
29356
|
+
id: task.id,
|
|
29357
|
+
title: task.title,
|
|
29358
|
+
...owner === void 0 ? {} : { owner },
|
|
29359
|
+
...imported.has(task.id) ? { openspec: true } : {}
|
|
29360
|
+
};
|
|
29361
|
+
};
|
|
29362
|
+
const named = [...work?.areas ?? [], ...tasks.flatMap((task) => task.area === void 0 ? [] : [task.area])];
|
|
29363
|
+
return [...[...new Set(named)].map((name) => {
|
|
29364
|
+
const owner = owners?.map.areas[name];
|
|
29365
|
+
return {
|
|
29366
|
+
name,
|
|
29367
|
+
...owner === void 0 ? {} : { owner },
|
|
29368
|
+
tasks: tasks.filter((task) => task.area === name).map(treeTask)
|
|
29369
|
+
};
|
|
29370
|
+
}), {
|
|
29371
|
+
name: null,
|
|
29372
|
+
tasks: tasks.filter((task) => task.area === void 0).map(treeTask)
|
|
29373
|
+
}];
|
|
29374
|
+
}).pipe(hubFailure),
|
|
29375
|
+
openspec: (target) => sync({
|
|
29376
|
+
...target,
|
|
29377
|
+
stateDir
|
|
29378
|
+
}, (message) => shareAsk.confirm(message, true), terminalIo).pipe(hubFailure),
|
|
28857
29379
|
openPeer: gen$1(function* () {
|
|
28858
29380
|
const app = ["/Applications/Peer.app", NodePath.join(NodeOS.homedir(), "Applications", "Peer.app")].find((path) => NodeFS.existsSync(path));
|
|
28859
29381
|
const platform = yield* Platform;
|
|
28860
29382
|
const opener = platform === "darwin" ? "open" : platform === "win32" ? void 0 : "xdg-open";
|
|
28861
|
-
const launch = (target) => sync$
|
|
29383
|
+
const launch = (target) => sync$2(() => NodeChildProcess.spawn(opener, [target], {
|
|
28862
29384
|
detached: true,
|
|
28863
29385
|
stdio: "ignore"
|
|
28864
29386
|
}).unref());
|
|
@@ -28954,7 +29476,9 @@ const inviteCommand = make$62("invite", {
|
|
|
28954
29476
|
email: String$2("email").pipe(withDescription$2("Whom to invite.")),
|
|
28955
29477
|
workspace: String$1("workspace").pipe(withDescription$1("The workspace (needed when you may invite to several)."), optional),
|
|
28956
29478
|
project: String$1("project").pipe(withDescription$1("A project they will be on, and no other (repeat it for more)."), atLeast(0)),
|
|
28957
|
-
admin: Boolean$1("admin").pipe(withDescription$1("Invite them as an admin."), withDefault(false))
|
|
29479
|
+
admin: Boolean$1("admin").pipe(withDescription$1("Invite them as an admin."), withDefault(false)),
|
|
29480
|
+
area: String$1("area").pipe(withDescription$1("With one --project: an area they will own when they join, its new tasks too (repeat it for more)."), atLeast(0)),
|
|
29481
|
+
task: String$1("task").pipe(withDescription$1("With one --project: a task they will own when they join (repeat it for more)."), atLeast(0))
|
|
28958
29482
|
}).pipe(withDescription("Mail an invitation to a workspace you own or administer."), withHandler((flags) => gen$1(function* () {
|
|
28959
29483
|
const config = yield* resolveConfig(flags);
|
|
28960
29484
|
yield* refuseWhileRunning(config.stateDir);
|
|
@@ -28964,6 +29488,8 @@ const inviteCommand = make$62("invite", {
|
|
|
28964
29488
|
email: flags.email,
|
|
28965
29489
|
admin: flags.admin,
|
|
28966
29490
|
projects: flags.project,
|
|
29491
|
+
areas: flags.area,
|
|
29492
|
+
tasks: flags.task,
|
|
28967
29493
|
...isSome(flags.workspace) ? { workspace: flags.workspace.value } : {}
|
|
28968
29494
|
}, yield* workspaces.sync, terminalIo);
|
|
28969
29495
|
}).pipe(hubFailure, provide(oneShotLayer(config)));
|
|
@@ -29050,6 +29576,25 @@ const logoutCommand = make$62("logout", { ...authLocationFlags }).pipe(withDescr
|
|
|
29050
29576
|
yield* log("Signed out.");
|
|
29051
29577
|
}).pipe(catchTags({ PeerHubError: (error) => fail$2(fail(`peer core: ${error.detail}`)) }), provide(oneShotLayer(config)));
|
|
29052
29578
|
})));
|
|
29579
|
+
const openspecCommand = make$62("openspec", {
|
|
29580
|
+
...authLocationFlags,
|
|
29581
|
+
yes: Boolean$1("yes").pipe(withAlias("y"), withDescription$1("Import without asking (without a terminal, nothing is imported without it)."), withDefault(false))
|
|
29582
|
+
}).pipe(withDescription("Import the OpenSpec changes of the connected project you are in as its tasks, or update them."), withHandler((flags) => gen$1(function* () {
|
|
29583
|
+
const config = yield* resolveConfig(flags);
|
|
29584
|
+
yield* refuseWhileRunning(config.stateDir);
|
|
29585
|
+
yield* gen$1(function* () {
|
|
29586
|
+
const state = yield* PeerState;
|
|
29587
|
+
const checkout = yield* repositoryRoot(process.cwd());
|
|
29588
|
+
const place = checkout === null ? null : yield* state.placeOf(checkout.root, { bindByRemote: false });
|
|
29589
|
+
if (checkout === null || place === null || place.workspace === "@local") return yield* outcome("refused", "this folder is no connected project", "connect it with peer core share, then repeat the command.");
|
|
29590
|
+
if (!(yield* sync({
|
|
29591
|
+
workspace: place.workspace,
|
|
29592
|
+
project: place.project,
|
|
29593
|
+
root: checkout.root,
|
|
29594
|
+
stateDir: config.stateDir
|
|
29595
|
+
}, (message) => flags.yes ? succeed$1(true) : isTerminal() ? shareAsk.confirm(message, true) : log(`${message} Add --yes to import.`).pipe(as(false)), terminalIo))) yield* log(`${checkout.root} has no openspec/changes folder.`);
|
|
29596
|
+
}).pipe(hubFailure, provide(oneShotLayer(config)));
|
|
29597
|
+
})));
|
|
29053
29598
|
const shareCommand = make$62("share", {
|
|
29054
29599
|
...authLocationFlags,
|
|
29055
29600
|
folder: String$2("folder").pipe(withDescription$2("The project's folder (default: the repository you are in, or this folder)."), optional$1),
|
|
@@ -29196,6 +29741,7 @@ const makePeerCommand = (name) => make$62(name).pipe(withDescription(name === "p
|
|
|
29196
29741
|
joinCommand,
|
|
29197
29742
|
createCommand,
|
|
29198
29743
|
inviteCommand,
|
|
29744
|
+
openspecCommand,
|
|
29199
29745
|
logoutCommand,
|
|
29200
29746
|
shareCommand,
|
|
29201
29747
|
bindCommand,
|
|
@@ -29290,7 +29836,7 @@ const acquireServerOwnership = fn("acquireServerOwnership")(function* (statePath
|
|
|
29290
29836
|
stateDir,
|
|
29291
29837
|
cause
|
|
29292
29838
|
})
|
|
29293
|
-
}), (db) => readPersistedServerRuntimeState(statePath).pipe(flatMap$1((state) => isSome(state) && state.value.ownerId === ownerId ? clearPersistedServerRuntimeState(statePath) : void_), ignore({ log: true }), ensuring(sync$
|
|
29839
|
+
}), (db) => readPersistedServerRuntimeState(statePath).pipe(flatMap$1((state) => isSome(state) && state.value.ownerId === ownerId ? clearPersistedServerRuntimeState(statePath) : void_), ignore({ log: true }), ensuring(sync$2(() => db.close()))));
|
|
29294
29840
|
const previous = yield* readPersistedServerRuntimeState(statePath).pipe(orElseSucceed(() => none$1()));
|
|
29295
29841
|
if (isSome(previous) && previous.value.ownerId === void 0 && (yield* legacyOwnerIsLive(previous.value))) return yield* new ServerAlreadyRunningError({ stateDir });
|
|
29296
29842
|
return { publish: (state) => persistServerRuntimeState({
|
|
@@ -29782,7 +30328,7 @@ const makeProviderAuthService = gen$1(function* () {
|
|
|
29782
30328
|
providerSessionId: session.id,
|
|
29783
30329
|
reason: "manual_shutdown",
|
|
29784
30330
|
detail: "Provider sign-in changed."
|
|
29785
|
-
}).pipe(tap(() => sync$
|
|
30331
|
+
}).pipe(tap(() => sync$2(() => released.add(session.id))));
|
|
29786
30332
|
}), { discard: true })), mapError(() => failure("Could not stop all sessions for this provider. Try again."))), { discard: true });
|
|
29787
30333
|
if (binding) yield* forEach((yield* registry.listInstances).filter((instance) => instance.instanceId !== instanceId && affectedIds.has(instance.instanceId) && instance.auth?.credentialBinding?.key === binding.key && instance.auth.credentialBinding.owner === binding.owner), (instance) => instance.auth?.invalidate ?? void_, { discard: true });
|
|
29788
30334
|
});
|
|
@@ -33054,7 +33600,7 @@ const layer$62 = effect(ProviderTurnStartServiceV2, gen$1(function* () {
|
|
|
33054
33600
|
const start = (input, compact = false) => suspend(() => {
|
|
33055
33601
|
if (deliver !== void 0) return deliver(input, compact);
|
|
33056
33602
|
return compact && session.compactThread !== void 0 ? session.compactThread(input) : session.startTurn(input);
|
|
33057
|
-
}).pipe(ensuring(sync$
|
|
33603
|
+
}).pipe(ensuring(sync$2(() => {
|
|
33058
33604
|
deliver = void 0;
|
|
33059
33605
|
})));
|
|
33060
33606
|
return {
|
|
@@ -36361,7 +36907,7 @@ const make$36 = gen$1(function* () {
|
|
|
36361
36907
|
return yield* _await(completion);
|
|
36362
36908
|
});
|
|
36363
36909
|
yield* fn("StorageCleanup.start")(function* () {
|
|
36364
|
-
const unsubscribe = yield* terminals.subscribeMetadata((event) => sync$
|
|
36910
|
+
const unsubscribe = yield* terminals.subscribeMetadata((event) => sync$2(() => {
|
|
36365
36911
|
if (event.type === "snapshot") {
|
|
36366
36912
|
liveTerminals.clear();
|
|
36367
36913
|
for (const terminal of event.terminals) noteTerminal(terminal);
|
|
@@ -36372,7 +36918,7 @@ const make$36 = gen$1(function* () {
|
|
|
36372
36918
|
if (threadTerminals?.size === 0) liveTerminals.delete(event.threadId);
|
|
36373
36919
|
}
|
|
36374
36920
|
}));
|
|
36375
|
-
yield* addFinalizer$1(() => sync$
|
|
36921
|
+
yield* addFinalizer$1(() => sync$2(unsubscribe));
|
|
36376
36922
|
const changes = yield* settingsService.subscribeChanges;
|
|
36377
36923
|
const events = engine.streamDomainEvents;
|
|
36378
36924
|
let lastSettings = yield* settingsService.getSettings.pipe(orDie);
|
|
@@ -36544,7 +37090,7 @@ const make$35 = gen$1(function* () {
|
|
|
36544
37090
|
const fetchedStack = !needsStack ? null : knownUnstacked ? { stack: null } : yield* pullRequests.stack(ref, { includeDetails: false }).pipe(map$3((stack) => ({ stack: stack === null ? null : {
|
|
36545
37091
|
kind: "native",
|
|
36546
37092
|
...stack
|
|
36547
|
-
} })), catchCauseIf((cause) => !hasInterruptsOnly(cause), (cause) => rateLimitRetryAt(cause) !== void 0 ? sync$
|
|
37093
|
+
} })), catchCauseIf((cause) => !hasInterruptsOnly(cause), (cause) => rateLimitRetryAt(cause) !== void 0 ? sync$2(() => retryStacks.add(key)).pipe(andThen(failCause(cause))) : logWarning("pull request stack lookup failed", { key }).pipe(as(null))));
|
|
36548
37094
|
if (needsStack) {
|
|
36549
37095
|
if (fetchedStack === null) {
|
|
36550
37096
|
retryStacks.add(key);
|
|
@@ -36838,7 +37384,7 @@ const make$34 = gen$1(function* () {
|
|
|
36838
37384
|
lives.set(lifeKey(target), life);
|
|
36839
37385
|
return life;
|
|
36840
37386
|
};
|
|
36841
|
-
const woke = (target) => sync$
|
|
37387
|
+
const woke = (target) => sync$2(() => {
|
|
36842
37388
|
const life = lifeOf(target);
|
|
36843
37389
|
lives.set(lifeKey(target), {
|
|
36844
37390
|
...life,
|
|
@@ -38297,7 +38843,7 @@ const githubMediaResponse = fn("GitHubMediaFetch.githubMediaResponse")(function*
|
|
|
38297
38843
|
//#region src/observability/BrowserTraceCollector.ts
|
|
38298
38844
|
var BrowserTraceCollector = class extends Service()("t3/observability/BrowserTraceCollector") {};
|
|
38299
38845
|
/** @public Service construction is part of the canonical Effect module API. */
|
|
38300
|
-
const make$31 = (sink) => BrowserTraceCollector.of({ record: (records) => sync$
|
|
38846
|
+
const make$31 = (sink) => BrowserTraceCollector.of({ record: (records) => sync$2(() => {
|
|
38301
38847
|
for (const record of records) sink.push(record);
|
|
38302
38848
|
}) });
|
|
38303
38849
|
const layer$48 = (sink) => succeed$3(BrowserTraceCollector, make$31(sink));
|
|
@@ -38900,7 +39446,7 @@ function guardHttpResponseWriteErrors(server, onError) {
|
|
|
38900
39446
|
//#region src/rpcInitialItems.ts
|
|
38901
39447
|
function rpcInitialItems(items) {
|
|
38902
39448
|
let pending = items;
|
|
38903
|
-
return unwrap$1(sync$
|
|
39449
|
+
return unwrap$1(sync$2(() => {
|
|
38904
39450
|
const initial = pending;
|
|
38905
39451
|
pending = void 0;
|
|
38906
39452
|
return initial === void 0 ? empty$5 : fromIterable(initial);
|
|
@@ -38911,13 +39457,13 @@ function rpcInitialItems(items) {
|
|
|
38911
39457
|
function subscribeChatGptHandoff(input, owner, endpoints = void 0) {
|
|
38912
39458
|
return unwrap$1(gen$1(function* () {
|
|
38913
39459
|
const bytes = /* @__PURE__ */ new Map();
|
|
38914
|
-
yield* addFinalizer$1(() => sync$
|
|
39460
|
+
yield* addFinalizer$1(() => sync$2(() => bytes.clear()));
|
|
38915
39461
|
const store = ServerSecretStore.of({
|
|
38916
|
-
get: (key) => sync$
|
|
38917
|
-
set: (key, value) => sync$
|
|
39462
|
+
get: (key) => sync$2(() => fromUndefinedOr(bytes.get(key))),
|
|
39463
|
+
set: (key, value) => sync$2(() => {
|
|
38918
39464
|
bytes.set(key, value);
|
|
38919
39465
|
}),
|
|
38920
|
-
remove: (key) => sync$
|
|
39466
|
+
remove: (key) => sync$2(() => {
|
|
38921
39467
|
bytes.delete(key);
|
|
38922
39468
|
}),
|
|
38923
39469
|
create: () => die("Handoff does not create persistent secrets."),
|
|
@@ -40032,13 +40578,13 @@ const makeThreadLiveEventCoalescer = (options) => gen$1(function* () {
|
|
|
40032
40578
|
pendingUpdates = [];
|
|
40033
40579
|
yield* offerAll(output, items);
|
|
40034
40580
|
}, uninterruptible);
|
|
40035
|
-
const flushWindow = (generation) => sleep$1(coalesceWindow).pipe(andThen(mutex.withPermits(1)(suspend(() => generation === windowGeneration ? flushPending() : void_))), ensuring(sync$
|
|
40581
|
+
const flushWindow = (generation) => sleep$1(coalesceWindow).pipe(andThen(mutex.withPermits(1)(suspend(() => generation === windowGeneration ? flushPending() : void_))), ensuring(sync$2(() => {
|
|
40036
40582
|
if (generation === windowGeneration) windowFiber = null;
|
|
40037
40583
|
})), catchTags({ LiveStreamBufferError: () => void_ }));
|
|
40038
40584
|
const offerAll$1 = fn("ThreadLiveEventCoalescer.offerAll")(function* (inputs) {
|
|
40039
40585
|
yield* mutex.withPermits(1)(forEach(inputs, (input) => gen$1(function* () {
|
|
40040
40586
|
yield* budget.check;
|
|
40041
|
-
if (input.kind === "event") yield* budget.retain(input).pipe(tap((item) => sync$
|
|
40587
|
+
if (input.kind === "event") yield* budget.retain(input).pipe(tap((item) => sync$2(() => pendingUpdates.push(item))), uninterruptible);
|
|
40042
40588
|
if (input.kind === "event" && isToolUpdated(input)) {
|
|
40043
40589
|
if (pendingUpdates.length === 1) {
|
|
40044
40590
|
const generation = ++windowGeneration;
|
|
@@ -41121,7 +41667,7 @@ var IncomingMessage = class extends (/*#__PURE__*/ Service()("@effect/platform-n
|
|
|
41121
41667
|
*/
|
|
41122
41668
|
const makeWebSocket = /*#__PURE__*/ fnUntraced$1(function* (options) {
|
|
41123
41669
|
const pendingConnections = /* @__PURE__ */ new Map();
|
|
41124
|
-
const server = yield* acquireRelease(sync$
|
|
41670
|
+
const server = yield* acquireRelease(sync$2(() => new import_websocket_server.default(options)), (server) => callback((resume) => {
|
|
41125
41671
|
pendingConnections.forEach(([, remove], conn) => {
|
|
41126
41672
|
remove();
|
|
41127
41673
|
conn.terminate();
|
|
@@ -41158,7 +41704,7 @@ const makeWebSocket = /*#__PURE__*/ fnUntraced$1(function* (options) {
|
|
|
41158
41704
|
let context = services;
|
|
41159
41705
|
context = add$1(context, IncomingMessage, req);
|
|
41160
41706
|
context = add$1(context, WebSocket$1, conn);
|
|
41161
|
-
pipe(fromWebSocket(acquireRelease(succeed$1(conn), (conn) => sync$
|
|
41707
|
+
pipe(fromWebSocket(acquireRelease(succeed$1(conn), (conn) => sync$2(() => {
|
|
41162
41708
|
conn.close();
|
|
41163
41709
|
}))), flatMap$1(handler), catchCause(reportUnhandledError), runForkWith(context), trackFiber);
|
|
41164
41710
|
};
|
|
@@ -41167,7 +41713,7 @@ const makeWebSocket = /*#__PURE__*/ fnUntraced$1(function* (options) {
|
|
|
41167
41713
|
onConnection(conn, req);
|
|
41168
41714
|
});
|
|
41169
41715
|
return yield* callback((_resume) => {
|
|
41170
|
-
return sync$
|
|
41716
|
+
return sync$2(() => {
|
|
41171
41717
|
onConnection = prevOnConnection;
|
|
41172
41718
|
});
|
|
41173
41719
|
}).pipe(ensuring(close(scope, void_$1)));
|
|
@@ -41213,11 +41759,11 @@ const make$24 = gen$1(function* () {
|
|
|
41213
41759
|
pointer: () => void_
|
|
41214
41760
|
});
|
|
41215
41761
|
const command = (message) => writeLock.withPermits(1)(encodeCommand$1(message).pipe(flatMap$1((line) => writeAllToFileDescriptor(controlFd, Buffer.from(`${line}\n`))), catchCause((cause) => logWarning("desktop browser command failed", { cause }))));
|
|
41216
|
-
const readable = yield* acquireRelease(sync$
|
|
41762
|
+
const readable = yield* acquireRelease(sync$2(() => new NodeNet.Socket({
|
|
41217
41763
|
fd: inputFd,
|
|
41218
41764
|
readable: true,
|
|
41219
41765
|
writable: false
|
|
41220
|
-
})), (stream) => sync$
|
|
41766
|
+
})), (stream) => sync$2(() => stream.destroy()));
|
|
41221
41767
|
yield* fromReadable({
|
|
41222
41768
|
evaluate: () => readable,
|
|
41223
41769
|
closeOnDone: true,
|
|
@@ -41300,7 +41846,7 @@ const make$24 = gen$1(function* () {
|
|
|
41300
41846
|
})),
|
|
41301
41847
|
detached: fromPubSub(changes).pipe(filter$3((change) => !change.attached), map$8((change) => change.key)),
|
|
41302
41848
|
attached: fromPubSub(changes).pipe(filter$3((change) => change.attached), map$8((change) => change.key)),
|
|
41303
|
-
isAttached: (key) => sync$
|
|
41849
|
+
isAttached: (key) => sync$2(() => attachedTabs.has(keyOf(key))),
|
|
41304
41850
|
endpoint,
|
|
41305
41851
|
pointer: (key, pointer) => command({
|
|
41306
41852
|
type: "pointer",
|
|
@@ -42925,7 +43471,7 @@ const make$23 = gen$1(function* () {
|
|
|
42925
43471
|
if (tab.fileChooser === open) closeFileChooser(tab);
|
|
42926
43472
|
};
|
|
42927
43473
|
const answerFileChooser = (input) => promise(() => setChooserFiles(input).catch(() => false));
|
|
42928
|
-
const openDownload = (input) => sync$
|
|
43474
|
+
const openDownload = (input) => sync$2(() => {
|
|
42929
43475
|
const download = tabs.get(tabKey(input.threadId, input.tabId))?.downloads.find((candidate) => candidate.id === input.downloadId);
|
|
42930
43476
|
return download === void 0 ? none$1() : some({
|
|
42931
43477
|
path: download.path,
|
|
@@ -43057,7 +43603,7 @@ const make$23 = gen$1(function* () {
|
|
|
43057
43603
|
};
|
|
43058
43604
|
const tabOwner = (tab) => tab.control.controller !== null ? "human" : tab.control.agentId !== null ? "agent" : "unclaimed";
|
|
43059
43605
|
let reportedProfiles = null;
|
|
43060
|
-
const reportProfiles = (input) => sync$
|
|
43606
|
+
const reportProfiles = (input) => sync$2(() => {
|
|
43061
43607
|
const profiles = resolveBrowserProfiles(input.profiles);
|
|
43062
43608
|
reportedProfiles = {
|
|
43063
43609
|
profiles,
|
|
@@ -43743,7 +44289,7 @@ const make$23 = gen$1(function* () {
|
|
|
43743
44289
|
scrolledAt: 0,
|
|
43744
44290
|
requestedSize: null
|
|
43745
44291
|
};
|
|
43746
|
-
yield* acquireRelease(sync$
|
|
44292
|
+
yield* acquireRelease(sync$2(() => {
|
|
43747
44293
|
tab.viewers.add(viewer);
|
|
43748
44294
|
reportLiveTabs();
|
|
43749
44295
|
}), () => promise(async () => {
|
|
@@ -43768,7 +44314,7 @@ const make$23 = gen$1(function* () {
|
|
|
43768
44314
|
});
|
|
43769
44315
|
};
|
|
43770
44316
|
let settleTimer = null;
|
|
43771
|
-
yield* addFinalizer$1(() => sync$
|
|
44317
|
+
yield* addFinalizer$1(() => sync$2(() => {
|
|
43772
44318
|
if (settleTimer !== null) clearTimeout(settleTimer);
|
|
43773
44319
|
}));
|
|
43774
44320
|
let screencastStarted = false;
|
|
@@ -43840,7 +44386,7 @@ const make$23 = gen$1(function* () {
|
|
|
43840
44386
|
});
|
|
43841
44387
|
yield* manager.events.pipe(runForEach(mirrorManagerEvent), forkScoped);
|
|
43842
44388
|
if (!sandboxDisabled(yield* Environment) && (yield* sandboxBlocked)) yield* logWarning(`This host blocks the sandbox T3's browser runs in, so browser tabs and HTML previews will not start. Run \`${setupCommand}\` once to allow it.`);
|
|
43843
|
-
yield* desktopChannel.detached.pipe(runForEach((key) => sync$
|
|
44389
|
+
yield* desktopChannel.detached.pipe(runForEach((key) => sync$2(() => {
|
|
43844
44390
|
const tab = tabs.get(tabKey(key.threadId, key.tabId));
|
|
43845
44391
|
if (tab?.desktop) dropTab(tab, false);
|
|
43846
44392
|
})), forkScoped);
|
|
@@ -43850,7 +44396,7 @@ const make$23 = gen$1(function* () {
|
|
|
43850
44396
|
const snapshot = sessions.find((session) => session.tabId === key.tabId && session.runtime === "server");
|
|
43851
44397
|
if (snapshot) yield* promise(() => ensureTab(snapshot).catch(constVoid));
|
|
43852
44398
|
}).pipe(ignore)), forkScoped);
|
|
43853
|
-
yield* sync$
|
|
44399
|
+
yield* sync$2(closeIdleAgentTabs).pipe(repeat(spaced(IDLE_SWEEP_INTERVAL)), forkScoped);
|
|
43854
44400
|
const environmentId = yield* environment.getEnvironmentId;
|
|
43855
44401
|
yield* broker.connect({
|
|
43856
44402
|
clientId: SERVER_HOST_CLIENT_ID,
|
|
@@ -43859,7 +44405,7 @@ const make$23 = gen$1(function* () {
|
|
|
43859
44405
|
}, { preferred: true }).pipe(flatMap$1((events) => events.pipe(runForEach((event) => {
|
|
43860
44406
|
if (event.type === "connected") {
|
|
43861
44407
|
hostConnectionId = event.connectionId;
|
|
43862
|
-
return sync$
|
|
44408
|
+
return sync$2(reportLiveTabs);
|
|
43863
44409
|
}
|
|
43864
44410
|
return handleRequest(event.connectionId, event.request).pipe(forkScoped, asVoid);
|
|
43865
44411
|
})))).pipe(exit, andThen(sleep$1(HOST_RECONNECT_DELAY)), forever, forkScoped);
|
|
@@ -47349,7 +47895,7 @@ const make$11 = gen$1(function* () {
|
|
|
47349
47895
|
const persistCaches = gen$1(function* () {
|
|
47350
47896
|
if (cacheDirty) {
|
|
47351
47897
|
cacheDirty = false;
|
|
47352
|
-
yield* sync$
|
|
47898
|
+
yield* sync$2(() => writeScanCache(fileCache, { sources: Object.fromEntries(sourceCache) })).pipe(flatMap$1((contents) => writeCacheFile(scanCachePath, contents)), catchCause(() => sync$2(() => {
|
|
47353
47899
|
cacheDirty = true;
|
|
47354
47900
|
})));
|
|
47355
47901
|
}
|
|
@@ -47595,7 +48141,7 @@ const make$11 = gen$1(function* () {
|
|
|
47595
48141
|
if (existing !== void 0) return existing;
|
|
47596
48142
|
const created = makeUnsafe$1();
|
|
47597
48143
|
inflightScans.set(key, created);
|
|
47598
|
-
yield* scanSummary(input, settings).pipe(onExit((exit) => sync$
|
|
48144
|
+
yield* scanSummary(input, settings).pipe(onExit((exit) => sync$2(() => inflightScans.delete(key)).pipe(andThen(isSuccess(exit) ? schedulePersist : void_), andThen(done(created, exit)))), forkDetach);
|
|
47599
48145
|
return created;
|
|
47600
48146
|
}));
|
|
47601
48147
|
return yield* _await(deferred);
|
|
@@ -47834,7 +48380,7 @@ function makeTraceDiagnosticsAggregator(slowSpanThresholdMs = DEFAULT_SLOW_SPAN_
|
|
|
47834
48380
|
* Succeeds with false when the file does not exist.
|
|
47835
48381
|
*/
|
|
47836
48382
|
function streamTraceFileLines(fileSystem, path, onLine) {
|
|
47837
|
-
return fileSystem.stream(path).pipe(decodeText, splitLines, runForEachArray((lines) => sync$
|
|
48383
|
+
return fileSystem.stream(path).pipe(decodeText, splitLines, runForEachArray((lines) => sync$2(() => lines.forEach(onLine))), as(true), catchTags({ PlatformError: (cause) => isNotFoundError(cause) ? succeed$1(false) : fail$2(new TraceFileReadError({
|
|
47838
48384
|
traceFilePath: path,
|
|
47839
48385
|
causeTag: cause.reason._tag,
|
|
47840
48386
|
cause
|
|
@@ -47993,7 +48539,7 @@ const make$9 = gen$1(function* () {
|
|
|
47993
48539
|
version: none$1(),
|
|
47994
48540
|
installHint: input.installHint,
|
|
47995
48541
|
detail: detailFromCause(cause)
|
|
47996
|
-
})), onExit(() => input.kind === "jj" ? sync$
|
|
48542
|
+
})), onExit(() => input.kind === "jj" ? sync$2(() => invalidateJjAvailability(process)) : void_));
|
|
47997
48543
|
};
|
|
47998
48544
|
return SourceControlDiscovery.of({ discover: all({
|
|
47999
48545
|
versionControlSystems: all(VCS_PROBES.map((entry) => probe(entry)), { concurrency: "unbounded" }),
|
|
@@ -49811,15 +50357,15 @@ const layerWsRpc = (currentSession, clientOrigin, clientAnalyticsProps, previewA
|
|
|
49811
50357
|
[WS_METHODS.reviewGetDiffPreview]: (input) => review.getDiffPreview(input),
|
|
49812
50358
|
[WS_METHODS.reviewGetDiffFileContents]: (input) => review.getDiffFileContents(input),
|
|
49813
50359
|
[WS_METHODS.terminalOpen]: (input) => terminalManager.open(input),
|
|
49814
|
-
[WS_METHODS.terminalAttach]: (input) => callback$1((queue) => acquireRelease(terminalManager.attachStream(input, (event) => offer(queue, event)), (unsubscribe) => sync$
|
|
50360
|
+
[WS_METHODS.terminalAttach]: (input) => callback$1((queue) => acquireRelease(terminalManager.attachStream(input, (event) => offer(queue, event)), (unsubscribe) => sync$2(unsubscribe)).pipe(catchCause((cause) => failCause$2(queue, cause)))),
|
|
49815
50361
|
[WS_METHODS.terminalWrite]: (input) => terminalManager.write(input),
|
|
49816
50362
|
[WS_METHODS.terminalResize]: (input) => terminalManager.resize(input),
|
|
49817
50363
|
[WS_METHODS.terminalClear]: (input) => terminalManager.clear(input),
|
|
49818
50364
|
[WS_METHODS.terminalRestart]: (input) => terminalManager.restart(input),
|
|
49819
50365
|
[WS_METHODS.terminalClose]: (input) => terminalManager.close(input),
|
|
49820
|
-
[WS_METHODS.terminalObserve]: (input) => callback$1((queue) => acquireRelease(terminalManager.observeStream(input, (event) => offer(queue, event)), (unsubscribe) => sync$
|
|
49821
|
-
[WS_METHODS.subscribeTerminalEvents]: (_input) => callback$1((queue) => acquireRelease(terminalManager.subscribe((event) => offer(queue, event)), (unsubscribe) => sync$
|
|
49822
|
-
[WS_METHODS.subscribeTerminalMetadata]: (_input) => callback$1((queue) => acquireRelease(terminalManager.subscribeMetadata((event) => offer(queue, event)), (unsubscribe) => sync$
|
|
50366
|
+
[WS_METHODS.terminalObserve]: (input) => callback$1((queue) => acquireRelease(terminalManager.observeStream(input, (event) => offer(queue, event)), (unsubscribe) => sync$2(unsubscribe)).pipe(catchCause((cause) => failCause$2(queue, cause)))),
|
|
50367
|
+
[WS_METHODS.subscribeTerminalEvents]: (_input) => callback$1((queue) => acquireRelease(terminalManager.subscribe((event) => offer(queue, event)), (unsubscribe) => sync$2(unsubscribe))),
|
|
50368
|
+
[WS_METHODS.subscribeTerminalMetadata]: (_input) => callback$1((queue) => acquireRelease(terminalManager.subscribeMetadata((event) => offer(queue, event)), (unsubscribe) => sync$2(unsubscribe))),
|
|
49823
50369
|
[WS_METHODS.previewOpen]: (input) => previewManager.open(input),
|
|
49824
50370
|
[WS_METHODS.previewNavigate]: (input) => previewManager.navigate(input),
|
|
49825
50371
|
[WS_METHODS.previewResize]: (input) => previewManager.resize(input),
|
|
@@ -50310,7 +50856,7 @@ const waitForWindowsPid = (process, trackedProcess, shell) => callback((resume)
|
|
|
50310
50856
|
socket.once("error", onError);
|
|
50311
50857
|
socket.once("close", onClose);
|
|
50312
50858
|
stopExit = trackedProcess.onExit(({ exitCode }) => onError(/* @__PURE__ */ new Error(`Windows PTY exited before its PID was available (exit code ${exitCode}).`)));
|
|
50313
|
-
return sync$
|
|
50859
|
+
return sync$2(cleanup);
|
|
50314
50860
|
});
|
|
50315
50861
|
/**
|
|
50316
50862
|
* Cancels Windows startup without waiting for the first output, unlike public kill().
|
|
@@ -50417,7 +50963,7 @@ const make$5 = fn("NodePtyAdapter.make")(function* () {
|
|
|
50417
50963
|
cause
|
|
50418
50964
|
})
|
|
50419
50965
|
});
|
|
50420
|
-
if (platform === "win32") yield* waitForWindowsPid(ptyProcess.nativeProcess, ptyProcess.process, input.shell).pipe(onError(() => sync$
|
|
50966
|
+
if (platform === "win32") yield* waitForWindowsPid(ptyProcess.nativeProcess, ptyProcess.process, input.shell).pipe(onError(() => sync$2(() => ptyProcess.process.disposeExitSubscription()).pipe(andThen(killStartingWindowsPty(ptyProcess.nativeProcess)))));
|
|
50421
50967
|
return ptyProcess.process;
|
|
50422
50968
|
}) });
|
|
50423
50969
|
});
|
|
@@ -50634,7 +51180,7 @@ const makeHandler = (browser) => gen$1(function* () {
|
|
|
50634
51180
|
}
|
|
50635
51181
|
const viewer = attached.viewer;
|
|
50636
51182
|
const unacknowledged = [];
|
|
50637
|
-
const disconnectSlowViewer = sync$
|
|
51183
|
+
const disconnectSlowViewer = sync$2(() => transport.destroy()).pipe(andThen(interrupt));
|
|
50638
51184
|
const write = (data) => suspend(() => {
|
|
50639
51185
|
const bytes = typeof data === "string" ? Buffer.byteLength(data) : data.byteLength;
|
|
50640
51186
|
if (transport.writableLength + bytes + 14 > MAX_SOCKET_BUFFER_BYTES) return disconnectSlowViewer;
|
|
@@ -50644,7 +51190,7 @@ const makeHandler = (browser) => gen$1(function* () {
|
|
|
50644
51190
|
switch (output._tag) {
|
|
50645
51191
|
case "frame":
|
|
50646
51192
|
if (unacknowledged.length >= MAX_UNACKNOWLEDGED_FRAMES) return disconnectSlowViewer;
|
|
50647
|
-
return write(output.data).pipe(andThen(sync$
|
|
51193
|
+
return write(output.data).pipe(andThen(sync$2(() => unacknowledged.push(output.ack))));
|
|
50648
51194
|
case "viewport":
|
|
50649
51195
|
case "control":
|
|
50650
51196
|
case "clipboard":
|
|
@@ -50812,7 +51358,7 @@ const layer$12 = effectDiscard(gen$1(function* () {
|
|
|
50812
51358
|
const { logsDir } = yield* ServerConfig;
|
|
50813
51359
|
const runFork = runForkWith(yield* context());
|
|
50814
51360
|
const onSignal = () => void runFork(writeHeapSnapshot(logsDir));
|
|
50815
|
-
yield* acquireRelease(sync$
|
|
51361
|
+
yield* acquireRelease(sync$2(() => process.on("SIGUSR2", onSignal)), () => sync$2(() => process.off("SIGUSR2", onSignal)));
|
|
50816
51362
|
}));
|
|
50817
51363
|
//#endregion
|
|
50818
51364
|
//#region src/observability/EventLoopMonitor.ts
|
|
@@ -50821,14 +51367,14 @@ const STALL_THRESHOLD_MS = 2e3;
|
|
|
50821
51367
|
const SAMPLE_INTERVAL = "30 seconds";
|
|
50822
51368
|
const STALL_LOG_MAX_BYTES = 262144;
|
|
50823
51369
|
const makeNodeSampler = gen$1(function* () {
|
|
50824
|
-
const histogram = yield* acquireRelease(sync$
|
|
51370
|
+
const histogram = yield* acquireRelease(sync$2(() => {
|
|
50825
51371
|
const histogram = NodePerfHooks.monitorEventLoopDelay({ resolution: RESOLUTION_MS });
|
|
50826
51372
|
histogram.enable();
|
|
50827
51373
|
return histogram;
|
|
50828
|
-
}), (histogram) => sync$
|
|
51374
|
+
}), (histogram) => sync$2(() => histogram.disable()));
|
|
50829
51375
|
let elu = NodePerfHooks.performance.eventLoopUtilization();
|
|
50830
51376
|
let usage = process.resourceUsage();
|
|
50831
|
-
return sync$
|
|
51377
|
+
return sync$2(() => {
|
|
50832
51378
|
const nextElu = NodePerfHooks.performance.eventLoopUtilization();
|
|
50833
51379
|
const nextUsage = process.resourceUsage();
|
|
50834
51380
|
const loop = NodePerfHooks.performance.eventLoopUtilization(nextElu, elu);
|
|
@@ -52947,7 +53493,7 @@ const make = gen$1(function* () {
|
|
|
52947
53493
|
}).pipe(catchCauseIf((cause) => !hasInterruptsOnly(cause), (cause) => logWarning("thread pull request discovery failed", {
|
|
52948
53494
|
threadId: thread.id,
|
|
52949
53495
|
cause: pretty(cause)
|
|
52950
|
-
}).pipe(tap(() => sync$
|
|
53496
|
+
}).pipe(tap(() => sync$2(() => failBackfill([thread]))), as(null)))))).filter((plan) => plan !== null);
|
|
52951
53497
|
if (updates.length === 0) return;
|
|
52952
53498
|
if (detected !== null && first.branch !== null) {
|
|
52953
53499
|
const current = yield* git.branchPullRequest({
|
|
@@ -52983,11 +53529,11 @@ const make = gen$1(function* () {
|
|
|
52983
53529
|
}).pipe(catchCause((cause) => hasInterruptsOnly(cause) ? failCause(cause) : logWarning("thread pull request update failed", {
|
|
52984
53530
|
threadId: thread.id,
|
|
52985
53531
|
cause: pretty(cause)
|
|
52986
|
-
}).pipe(tap(() => sync$
|
|
53532
|
+
}).pipe(tap(() => sync$2(() => failBackfill([thread])))))), { discard: true });
|
|
52987
53533
|
}).pipe(catchCauseIf((cause) => !hasInterruptsOnly(cause), (cause) => logWarning("thread branch pull request lookup failed", {
|
|
52988
53534
|
threadIds: group.map((thread) => thread.id),
|
|
52989
53535
|
cause: pretty(cause)
|
|
52990
|
-
}).pipe(tap(() => sync$
|
|
53536
|
+
}).pipe(tap(() => sync$2(() => failBackfill(group)))))), {
|
|
52991
53537
|
concurrency: 32,
|
|
52992
53538
|
discard: true
|
|
52993
53539
|
});
|
|
@@ -53661,7 +54207,7 @@ const runUpdate = fn("cli.update.run")(function* (input) {
|
|
|
53661
54207
|
if (input.requestedVersion !== void 0 && !isExactServiceVersion(input.requestedVersion)) return yield* new CliUpdateError({ reason: `'${input.requestedVersion}' is not an exact t3 version.` });
|
|
53662
54208
|
const progress = createUpdateProgress();
|
|
53663
54209
|
progress.status("Checking for updates...");
|
|
53664
|
-
const targetVersion = yield* (input.requestedVersion === void 0 ? resolveNewestVersion(channel) : succeed$1(input.requestedVersion)).pipe(ensuring(sync$
|
|
54210
|
+
const targetVersion = yield* (input.requestedVersion === void 0 ? resolveNewestVersion(channel) : succeed$1(input.requestedVersion)).pipe(ensuring(sync$2(progress.finish)));
|
|
53665
54211
|
const targetChannel = cliReleaseChannelOf(targetVersion);
|
|
53666
54212
|
const currentChannel = cliReleaseChannelOf(currentVersion);
|
|
53667
54213
|
if (targetChannel === "preview" && currentChannel !== "preview") {
|
|
@@ -53731,7 +54277,7 @@ const runUpdate = fn("cli.update.run")(function* (input) {
|
|
|
53731
54277
|
step: "verifying the downloaded t3",
|
|
53732
54278
|
exitCode: Number(result.code)
|
|
53733
54279
|
}))))
|
|
53734
|
-
}).pipe(ensuring(sync$
|
|
54280
|
+
}).pipe(ensuring(sync$2(progress.finish)), catchIf((error) => error._tag === "PinnedRuntimeInstallError" && error.step.startsWith("downloading the t3 release checksums") && String(error.cause).includes("404"), () => fail$2(new CliUpdateError({ reason: `No release archive was published for t3@${targetVersion}.` }))));
|
|
53735
54281
|
const launchedAs = (yield* IsExecutable) ? yield* resolveLauncherPath : void 0;
|
|
53736
54282
|
const repointed = yield* repointLauncher({
|
|
53737
54283
|
launchedAs,
|
|
@@ -54553,7 +55099,7 @@ async function main() {
|
|
|
54553
55099
|
* whose signal handler would interrupt the fiber and exit while the child is still being
|
|
54554
55100
|
* terminated.
|
|
54555
55101
|
*/
|
|
54556
|
-
const serviceLauncherCommand = make$62("__service-launcher").pipe(unlisted, withHandler(() => sync$
|
|
55102
|
+
const serviceLauncherCommand = make$62("__service-launcher").pipe(unlisted, withHandler(() => sync$2(() => {
|
|
54557
55103
|
main().catch((cause) => {
|
|
54558
55104
|
const error = cause instanceof Error ? cause : new Error(String(cause));
|
|
54559
55105
|
process.stderr.write(`[service-launcher] ${error.message}\n`);
|
|
@@ -54644,7 +55190,7 @@ const waitReady = make$62("wait-ready", {
|
|
|
54644
55190
|
process.exitCode = 1;
|
|
54645
55191
|
})));
|
|
54646
55192
|
/** Prints `<pid> <port>` for a live default-home server, or exits 1. */
|
|
54647
|
-
const runtimePort = make$62("runtime-port", { runtimeFile: String$2("runtime-file") }).pipe(withHandler(({ runtimeFile }) => sync$
|
|
55193
|
+
const runtimePort = make$62("runtime-port", { runtimeFile: String$2("runtime-file") }).pipe(withHandler(({ runtimeFile }) => sync$2(() => {
|
|
54648
55194
|
try {
|
|
54649
55195
|
const runtime = JSON.parse(NodeFS.readFileSync(runtimeFile, "utf8"));
|
|
54650
55196
|
const pid = Number(runtime.pid);
|
|
@@ -54922,7 +55468,7 @@ const publishThemeFile = fn(function* (input) {
|
|
|
54922
55468
|
},
|
|
54923
55469
|
catch: publishFailure
|
|
54924
55470
|
});
|
|
54925
|
-
const revert = sync$
|
|
55471
|
+
const revert = sync$2(() => {
|
|
54926
55472
|
try {
|
|
54927
55473
|
NodeFS.unlinkSync(stagingPath);
|
|
54928
55474
|
} catch {}
|
|
@@ -54940,7 +55486,7 @@ const publishThemeFile = fn(function* (input) {
|
|
|
54940
55486
|
} else if (destinationIno === stagedIno) NodeFS.unlinkSync(destinationPath);
|
|
54941
55487
|
} catch {}
|
|
54942
55488
|
});
|
|
54943
|
-
const cleanup = sync$
|
|
55489
|
+
const cleanup = sync$2(() => {
|
|
54944
55490
|
try {
|
|
54945
55491
|
if (hadPrevious) NodeFS.unlinkSync(backupPath);
|
|
54946
55492
|
} catch {}
|
|
@@ -55537,4 +56083,4 @@ function runCli(root = "t3") {
|
|
|
55537
56083
|
//#endregion
|
|
55538
56084
|
export { runCli };
|
|
55539
56085
|
|
|
55540
|
-
//# sourceMappingURL=binCli-
|
|
56086
|
+
//# sourceMappingURL=binCli-Cmx7kMPy.mjs.map
|