@webinson/peer-core 0.1.946 → 0.1.973
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.
- package/README.md +5 -3
- package/dist/{McpHttpServer-DAx8Xm-g.mjs → McpHttpServer-BdwjWM7Y.mjs} +47342 -45890
- package/dist/{McpHttpServer-By8cNqj6.mjs → McpHttpServer-DK8cBAwY.mjs} +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/{binCli-BXUdYHGg.mjs → binCli-CJdI8Zct.mjs} +407 -46
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
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
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$1, 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, 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$5, Mn as void_, Mo as encode$1, Mr as merge$1, Ms as findLast, Mt as onError, Nc as match$1, 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$4, 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, 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$1, 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$2, zs as isReadonlyArrayNonEmpty, zt as partition } from "./Effect-DXlc4A9S.mjs";
|
|
6
|
-
import { $ as Scheduler, $a as exactStringPattern, $c as MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH, $d as PREVIEW_VIEWPORT_PRESET_IDS, $f as DesktopBackendBootstrap, $g as hasBody, $h as isHttpClientError, $i as JjVcsDriver, $l as enrichProviderSnapshotWithVersionAdvisory, $m as toPersisted, $n as codexCallbackUrl, $o as sha256, $p as RuntimeMode, $r as PullRequestProviderError, $s as encodeConfirmedOriginJson, $t as RunExecutionServiceV2, $u as SERVER_BROWSER_AUTOMATION_CLIENT_ID, A as layer$184, A_ as ThreadId, Aa as layer$112, Ac as resolveSignalEndpoint, Ad as ExternalLauncherBrowserSpawnError, Af as all$1, Ag as AuthPreviewOperateScope, Ah as setBody, Ai as reportLabel, Al as makeLiveStreamBudget, Am as getAndSet, An as TerminalManager, Ao as coreLaunchCommand, Ap as OrchestrationGetWorkflowScriptError, Ar as ProviderEventLoggers, As as layer$154, At as RELAY_LINK_PROOF_TYP, Au as resolveWindowsEnvironment, B as coreLayer, Ba as forkParkedFiber, Bc as decodeThreadHistoryCursor, Bd as CodexSettings, Bf as makeWith, Bg as ServerAuthSessionMethod, Bh as inspect$1, Bi as latestNativeContextUsage, Bl as compareExactServiceVersions, Bm as fromHeaders, Bn as BackgroundPolicy, Bo as APPARMOR_PROFILE, Bp as latestProviderTurnForAttempt, Br as PtySpawnError, Bs as toUint8Array, Bt as isTerminalRunStatus, Bu as RequestInit, C as stateStream, C_ as ProjectId, Ca as LegacyV1ThreadImporter, Cc as resolveServerBackgroundActivitySettings, Cd as OrchestrationDispatchCommandError, Cf as Int$6, Cg as AuthGrantScope, Ch as html, Ci as isRestartNoteContinuation, Cl as layer$95, Cm as HttpServer, Cn as layer$170, Co as matchRepositories, Cp as RelayManagedEndpointRecoveryRegistrationResponse, Cr as isWorkspaceImagePreviewPath, Cs as ServerSelfUpdate, Ct as AgentAwarenessRelay, Cu as isCommandAvailable, D as PreviewAutomationBroker, D_ as RpcClientId, Da as layer$115, Dc as layerResourceAttributes, Dd as ServerProviderUpdateError, Df as Redacted, Dg as AuthMcpTokenError, Dh as raw$1, Di as pendingRestartCancelledBackgroundWork, Dl as PersistenceDecodeError, Dm as mapRequest, Dn as layer$185, Do as expandHomePath$1, Dp as fromApi, Dr as endRunlessRootTurns, Ds as runServicePreflight, Dt as RELAY_HEALTH_RESPONSE_TYP, Du as readPathFromLaunchctl, E as layer$197, E_ as ProviderTurnId, Ea as deriveThreadFromProviderThread, Ec as fromLenientJson, Ed as EnvironmentThemeId, Ef as Port, Eg as AuthMcpRegistrationError, Eh as mergeCookies, Ei as neverStarted, El as layer$108, Em as filterStatusOk$1, En as ProviderRegistry, Eo as mergeProviderInstanceEnvironment, Ep as RelayProtectedError, Er as endOrphanedNativeSubagent, Es as layer$200, Et as RELAY_HEALTH_REQUEST_TYP, Eu as readEnvironmentFromLoginShell, F as issueAttachmentUploadUrl, F_ as snapshotUnsafe, Fa as REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS, Fc as layer$96, Fd as ExternalLauncherUnsupportedTargetError, Ff as withDefault$2, Fg as AuthSourceControlWriteScope, Fh as uint8Array$1, Fi as contextUsageForHandoff, Fl as readOnly, Fm as updateAndGet, Fn as PortDiscovery, Fo as make$76, Fp as OrchestrationV2ProviderSessionJson, Fr as AcpRegistryCatalog, Fs as redactServerSettingsForClient, Ft as signRelayJwt, Fu as CLI_RELEASE_BASE_URL_ENV, G as PeerWorkspaces, Ga as realpathOrSelf$2, Gc as parseAttachmentFileExtension, Gd as ServerSettings, Gg as getStatusErrorSchema, Gh as bodyStream, Gi as CheckpointServiceV2, Gl as serviceStateHasPendingUpdate, Gm as schemaHeaders, Gn as layer$192, Go as PreviewBrowserSandboxError, Gp as ProjectMutation, Gr as SourceControlProviderRegistry, Gs as CLOUD_MINT_PUBLIC_KEY, Gt as layer$131, Gu as WS_METHODS, H as rpcLayer, Ha as layer$109, Hc as attachmentRelativePath, Hd as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, Hf as nextIntBetween, Hg as authScopeResponse, Hh as bearerToken, Hi as selectHistory, Hl as isExactServiceVersion, Hm as ParsedSearchParams, Hn as layer$155, Ho as DEBIAN_PACKAGES, Hp as UsageLimitSourceError, Hr as withWorkspaceLease, Hs as CLOUD_ENDPOINT_RUNTIME_CONFIG, Ht as withCreationProvenance, Hu as CLIENT_GUARDED_RPC_SCOPES, I as storeAttachmentUpload, I_ as update$1, Ia as layer$111, Ic as InvalidThreadHistoryCursorError, Id as ProviderSetupError, If as SourceError, Ig as AuthStandardClientScopes, Ih as urlParams, Ii as handoffBudget, Il as SERVICE_LAUNCHER_CONTEXT_ENV, Im as appendPreResponseHandler, In as layer$176, Io as RelayClientTracer, Ip as OrchestrationV2SearchThreadError, Ir as layerFromHost, Is as decode$2, It as verifyRelayJwt, Iu as CLI_RELEASE_CHANNELS, J as ScheduledTaskService, Ja as resolveJjRepoPaths, Jc as runRanAfter, Jd as requiredScopesForProjectMutation, Jf as DesktopAppActivationErrorCode, Jg as isNoContent, Jh as get$2, Ji as CheckpointStore, Jl as pinnedRuntimeCommand, Jm as MultipartError, Jn as layer$161, Jo as missingLibraries, Jp as ProjectSearchContentsError, Jr as layer$149, Js as RELAY_ENVIRONMENT_CREDENTIAL_SECRET, Jt as layer$121, Ju as PEER_RPC_SCOPES, K as PeerPluginRegistry, Ka as remoteOf, Kc as resolveAttachmentPathById, Kd as ServerSettingsError, Kf as findBrowserProfile, Kg as getStatusSuccessSchema, Kh as bodyUrlParams, Ki as checkpointRefForScopeOrdinal, Kl as PinnedRuntimeInstallError, Km as schemaSearchParams, Kn as layer$159, Ko as SETUP_SUBCOMMAND, Kp as ProjectMutationError, Kr as layer$148, Ks as HOLD_WEBHOOKS_WHILE_OFFLINE_SECRET, Kt as RuntimePolicyV2, Ku as WsRpcGroup, L as validateAttachmentUploadToken, L_ as withAttributes, La as layerPruneWorker, Lc as THREAD_HISTORY_PAGE_POLICY, Ld as ProviderUploadFeedbackError, Lf as get$1, Lg as AuthTerminalOperateScope, Lh as filterStatusOk, Li as handoffTokenCapConfig, Ll as SERVICE_RESTART_PENDING_FILE, Lm as toHandled, Ln as deriveProviderInstanceConfigMap, Lo as layer$104, Lp as OrchestrationV2ThreadLaunchError, Lr as toAcpRegistryOperationError, Ls as fromReadable, Lt as makeDrainableWorker, Lu as cliReleaseChannelOf, M as launchThread, M_ as decode$1, Ma as layer$110, Mc as layer$180, Md as ExternalLauncherEditorSpawnError, Mf as mapEffect$1, Mg as AuthRelayReadScope, Mh as setHeaders, Mi as layer$120, Ml as findOneOption, Mm as modify, Mn as NativeTelemetryClient, Mo as requestHandover, Mp as OrchestrationV2DispatchCommandError, Mr as make$81, Ms as subscribeBeforeSnapshot, Mt as RELAY_MINT_REQUEST_TYP, Mu as withPathDirectoryListings, N as ATTACHMENT_UPLOAD_ROUTE_PREFIX, N_ as decodeString$1, Na as EffectOutboxV2, Nc as ProjectionStoreThreadNotFoundError, Nd as ExternalLauncherUnknownEditorError, Nf as option$1, Ng as AuthRelayWriteScope, Nh as stream$2, Ni as DEFAULT_HANDOFF_TOKEN_CAP, Nl as void_$2, Nm as set$2, Nn as layer$152, No as waitForSocketGone, Np as OrchestrationV2GetShellSnapshotError, Nr as makeProtocolWithHttpEffectWebsocket, Ns as ServerSettingsService, Nt as RELAY_MINT_RESPONSE_TYP, Nu as make$72, O as layer$198, O_ as RunId, Oa as EventSinkV2, Oc as load, Od as environmentThemeFileHasColors, Of as String$7, Og as AuthOrchestrationOperateScope, Oh as redirect, Oi as restartCancelledBackgroundWorkNote, Ol as PersistenceSqlError, Om as withScope, On as ProjectSetupScriptRunner, Oo as PeerBrokerKind, Op as toRouterPath, Or as PluginMcpServers, Os as layer$156, Ot as RELAY_HOOK_DELIVERY_HEADER, Ou as resolveCommandPath, P as deletePendingAttachment, P_ as encode$2, Pa as PROCESS_BOUND_EFFECT_TYPES, Pc as ProjectionStoreV2, Pd as ExternalLauncherUnsupportedEditorError, Pf as schema, Pg as AuthSettingsWriteScope, Ph as text$1, Pi as attachmentTokenAllowance, Pl as layer$94, Pm as update, Pn as layer$153, Po as EXIT_STATUS, Pp as OrchestrationV2GetThreadProjectionError, Pr as layerJson, Ps as layer$144, Pt as normalizeRelayIssuer, Pu as ChildProcessSpawner, Q as relayHookBaseUrl, Qa as make$79, Qc as projectThreadProjectionForWire, Qd as PREVIEW_STREAM_HOST_SETUP_CLOSE_CODE, Qf as DESKTOP_UPDATE_RESTART_MARKER_FILE, Qg as isWithHeadersValue, Qh as setHeaders$1, Qi as layer$151, Ql as layer$98, Qm as makeConfig, Qn as codexAuthorizationRequest, Qo as layer$101, Qr as firstNonEmptyLine, Qs as decodeRuntimeConfig, Qt as layer$122, Qu as PREVIEW_AUTOMATION_SERVER_OPERATIONS, R as PreviewManager, R_ as bytes, Ra as ServerActivation, Rc as THREAD_HISTORY_SNAPSHOT_ROW_LIMIT, Rd as AntigravitySettings, Rf as invalidate, Rg as AuthTerminalReadScope, Rh as MaxBodySize, Ri as historicalMessage, Rl as SERVICE_STATE_FILE, Rm as TracerDisabledWhen, Rn as layer$186, Ro as withLocalTracing, Rp as OrchestrationV2ThreadShell, Rr as AcpRegistryRuntimeCoordinator, Rs as pipeThroughDuplex, Rt as ThreadManagementService, Ru as cliReleaseIndexPageUrl, S as layer$179, S_ as PositiveInt, Sa as layer$117, Sc as parsePersistedServerObservabilitySettings, Sd as OrchestrationSearchThreadsError, Sf as ConfigError, Sg as AuthFilesystemWriteScope, Sh as file, Si as isRestartContinuationSource, Sl as EventStoreV2, Sm as use, Sn as layer$171, So as run$4, Sp as RelayHookDeliveryProofPayload, Sr as hostPreviewMimeTypeFromExtension, Ss as layerIdentity, St as mcpClient, Su as collectUint8StreamText, T as PreviewBrowser, T_ as ProviderThreadId, Ta as IdAllocatorV2, Tc as fromJsonStringPretty, Td as EnvironmentThemeFile, Tf as NonEmptyString, Tg as AuthMcpClientAccess, Th as jsonUnsafe, Ti as mergeRestartCancelledBackgroundWork, Tl as OrchestrationEventStore, Tm as HttpClient, Tn as layer$168, To as resolveCodexHomeLayout, Tp as RelayOkResponse, Tr as makeUnavailableUsageLimits, Ts as ServiceLauncherClient, Tt as getOrCreateEnvironmentKeyPairFromSecretStore, Tu as mergePathEntries, U as PeerAdapters, Ua as PeerState, Uc as chatAttachmentStableKey, Ud as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Uf as BUILT_IN_BROWSER_PROFILES, Ug as getResponseEncoding, Uh as bodyJson, Ui as isNativeMaintenanceCommand, Ul as parseServiceState, Um as TypeId$6, Un as BUILT_IN_USAGE_DRIVERS, Uo as NO_SANDBOX_SIGNATURE, Up as OrchestrationProjectShell, Ur as TextGeneration, Us as CLOUD_LINKED_USER_ID, Ut as OrchestratorV2, Uu as clientRpcRequiredScopes, V as layer$105, Va as layerFromApplicationReceipts, Vc as PENDING_ATTACHMENT_THREAD_SEGMENT, Vd as DATABASE_COMPACTION_RECOMMENDED_BYTES, Vf as set$3, Vg as authScopeRequiredResponse, Vh as schemaBodyJson, Vi as renderHistory, Vl as decodeServiceLauncherChildMessage, Vm as HttpServerRequest, Vn as layer$157, Vo as APPARMOR_PROFILE_PATH, Vp as ToolActivityNativeAppReference, Vr as layer$190, Vs as CLOUD_ENDPOINT_CONFIRMED_ORIGIN, Vt as layerWithLegacyImporter, Vu as layer$99, W as PeerCoordination, Wa as layer$106, Wc as createDeterministicAttachmentId, Wd as DEFAULT_SERVER_SETTINGS, Wg as getResponseEncodingSchema, Wh as bodyJsonUnsafe, Wi as layer$129, Wl as serviceStateActiveVersion, Wm as schemaCookies, Wn as layer$191, Wo as PreviewBrowserLibrariesError, Wp as ProjectListEntriesError, Wr as layer$137, Ws as CLOUD_LINK_REVOKED, Wt as layer$128, Wu as RpcScopeAuthorization, X as WEBHOOK_ROUTE_PREFIX, Xa as resolveWorkspaceRefName, Xc as normalizeProjectPathForComparison, Xd as resolveProviderInstanceEnabled, Xf as DesktopBrowserCommand, Xg as isStreamUint8Array, Xh as post, Xi as VcsDriverRegistry, Xl as pinnedRuntimeVersionsDir, Xm as isPersistedFile, Xn as withUsageLimitsCommands, Xo as sandboxDisabled, Xp as ProjectWriteFileError, Xr as layer$167, Xs as RELAY_URL_SECRET, Xt as layer$123, Xu as Service$1, Y as ScheduledTaskWebhookOrigin, Ya as invalidateJjAvailability, Yc as projectComposerContextForProvider, Yd as requiredScopesForServerSettingsPatch, Yf as DesktopAppActivationResponse, Yg as isStreamSchema, Yh as make$82, Yi as layer$175, Yl as pinnedRuntimePaths, Ym as TypeId$5, Yn as sameUsageLimitCommandCoverage, Yo as sandboxBlocked, Yp as ProjectSearchEntriesError, Yr as GitHubCredentials, Ys as RELAY_ISSUER_SECRET, Yt as ProviderSessionManagerV2, Yu as PEER_LOCAL_WORKSPACE, Z as layer$136, Za as workspaceNameForRef, Zc as projectDomainEventForWire, Zd as FILL_PREVIEW_VIEWPORT, Zf as DesktopBrowserEvent, Zg as isWithHeaders, Zh as setHeader$1, Zi as layer$150, Zl as ProcessRunner, Zm as limitsServices, Zn as makeCodexChatGptAuth, Zo as layer$103, Zp as DEFAULT_PROVIDER_INTERACTION_MODE, Zr as detailFromCause, Zs as decodeConfirmedOrigin, Zt as CommandOutputHub, Zu as UsageReadError, _ as layer$195, __ as EventId, _a as layer$141, _c as layer$100, _d as AgentSessionImportProjectNotFoundError, _f as SqlClient, _g as AuthClientMetadataDeviceType, _h as toResponse, _i as awaitingProviderThreadId, _l as visibleThreadPullRequests, _m as add$2, _n as layer$166, _o as resolveProjectSettings, _p as RelayApi, _r as AntigravityInstallation, _s as signPayload, _t as ensureShim, _u as serviceNameUnsafe, a_ as ProviderInstanceId, aa as PeerHubClient, ac as resolveHostCliCommand, ad as AssetProjectFaviconInspectionError, af as KeybindingsConfigError, ag as layerWeak, ah as SocketOpenError, ai as McpAppModelContext, al as mcpAppToolCallableByApp, am as OrchestrationGetFullThreadDiffError, an as layerObserver, ao as GitVcsDriver, ap as EnvironmentHttpApi, ar as codexRateLimitsToLimits, as as ahash, at as ThreadLaunchService, au as OtlpHeadersFromString, b as DEVICE_HUB_ROUTE_PREFIX, b_ as NonNegativeInt, ba as layer$142, bc as resolveStaticDir, bd as AgentSessionSource, bf as Crypto, bg as AuthEnvironmentScopes, bh as getType, bi as cancelledTurnItemWork, bl as canonicalRepositoryKey, bm as route, bn as layerAnalytics, bo as parseGitHubRepositoryNameWithOwnerFromRemoteUrl, bp as RelayEnvironmentLinkChallengeResponse, br as WORKSPACE_IMAGE_PREVIEW_EXTENSIONS, bs as ServerEnvironmentIdentity, bt as userBases, bu as make$70, c_ as AuthSessionId, ca as ProjectOperationError, cc as isSecretAlreadyExistsError, cd as AssetSigningKeyLoadError, cf as QuitError, cg as uint8Array, ch as fromWebSocket, ci as ContextHandoffBudgetError, cl as compileResolvedKeybindingsConfig, cm as ChatAttachmentId, cn as layer$181, co as layer$146, cp as EnvironmentHttpConflictError, cr as claudeUsageResponseToLimits, cs as concatBytes$1, ct as ManagedProjectFolders, cu as decodeOtlpTraceRecords, d_ as ClientDeviceType, da as ProjectEnrichmentService, dc as writeFileStringAtomically, dd as AssetWorkspaceContextNotFoundError, df as changes, dg as ORCHESTRATION_PROTOCOL_HEADER, dh as HttpServerError, di as layer$130, dl as BUILT_IN_THEME_IDS, dm as isSecurity, dn as VcsStatusBroadcaster, do as orchestrationEffectClaimsTotal, dp as EnvironmentHttpUnauthorizedError, dr as BUNDLED_MODEL_MANIFEST, ds as base64UrlDecodeUtf8, dt as layer$173, du as makeTraceSink, e_ as encoder, ea as layer$145, ec as encodeEndpointRuntimeConfigJson, ed as McpAppRequestError, ef as PreviewClearProfileError, eg as TypeId$7, eh as decodeField, ei as AnalyticsService, el as mcpAppFromToolItem, em as PullRequestLinkedThreadsResult, en as canRouteRelatedSubagent, eo as colocatedGitCommand, ep as RelayClientInstallFailedError, er as providerAuthReturnUrl, es as sha384, et as layer$138, eu as makeTargetedProviderUpdateAction, f_ as ClientOs, fa as layer$139, fc as DEFAULT_PORT, fd as AssetWorkspaceContextResolutionError, ff as get$3, fg as ORCHESTRATION_PROTOCOL_QUERY_PARAM, fh as RequestParseError, fi as layerFromProviderInstanceRegistry, fl as UNPUBLISHABLE_THEME_IDS, fm as getSlotParseOptions, fn as layer$174, fo as orchestrationEffectQueueWait, fp as EnvironmentInternalError, fr as ModelManifest, fs as base64UrlEncode, ft as SourceControlRepositoryService, fu as RotatingFileSink, g as PullRequestReviewGuideService, g_ as DpopFailureReason, ga as ProjectFaviconResolver, gc as ensureServerDirectories, gd as AgentSessionImportProjectChangedError, gf as map$7, gg as AuthAccessWriteScope, gh as symbol, gi as isUndeliveredMailboxSteer, gl as threadPullRequestKeysEqual, gm as RouteContext, gn as layer$164, go as withMetrics, gp as EnvironmentScopeRequiredError, gr as layer$158, gs as resolveSessionCookieName, gt as McpClients, gu as fromConfig, h_ as CommandId, ha as make$84, hc as deriveServerPaths, hd as AssetWorkspaceRootNormalizationError, hf as Stdio, hg as AuthAccessTokenType, hh as causeResponse, hi as isBufferedProviderNotification, hl as threadPullRequestKeyOf, hm as normalize, hn as layer$163, ho as webhookDeliveriesTotal, hp as EnvironmentResourceNotFoundError, hr as resolveProviderCompatibility, hs as resolveLegacySessionCookieName, ht as layer$169, hu as entriesToAttributes, i as layer$194, i_ as ProviderDriverKind, ia as isCheckpointRestoreIsolated, ic as resolveCliCommand, id as AssetPreviewTypeValidationError, if as KeybindingsConfig, ig as layer$102, ih as SocketError, il as injectMcpAppThemeBootstrap, im as VcsUnsupportedOperationError, in as layer$127, io as managedWorktreesDirectories, ip as EnvironmentCloudEndpointUnavailableError, ir as codexPlanLabel, is as aexists, it as threadHasQueuedTurnStart, iu as DEFAULT_SIGNAL_EXPORT, j as dispatchCommand, j_ as TurnItemId, ja as ProjectStoreV2, jc as NetService, jd as ExternalLauncherCommandNotFoundError, jf as map$6, jg as AuthProvidersManageScope, jh as setHeader, ji as ContextHandoffServiceV2, jl as findAll, jm as make$71, jn as layer$177, jo as readOwner, jp as OrchestrationV2AppThreadJson, jr as Protocol, js as writeAllToFileDescriptor, jt as RELAY_MANAGED_TUNNEL_RECOVERY_TYP, ju as setWindowsPath, k as ThreadSearch, k_ as RuntimeRequestId, ka as layerFromStores, kc as none$2, kd as EDITORS$1, kf as URL$1, kg as AuthOrchestrationReadScope, kh as removeHeader, ki as restartContinuationNote, kl as bufferLiveStream, km as get, kn as layer$132, ko as coordSocketPath, kp as ORCHESTRATION_V2_WS_METHODS, kr as NoOpProviderEventLoggers, ks as DesktopTelemetryReceiver, kt as RELAY_HOOK_DELIVERY_TYP, ku as resolveSpawnCommand, l_ as CheckpointId, la as ProjectService, lc as isSecretStoreError, ld as AssetWorkspaceAssetInspectionError, lf as Terminal, lg as FileSystem, lh as makeWebSocket$1, li as makeProviderFailure, ll as mergeWithDefaultKeybindings, lm as PROVIDER_SEND_TURN_MAX_FILE_BYTES, ln as PROJECT_FAVICON_FALLBACK_MARKER, lo as increment, lp as EnvironmentHttpForbiddenError, lr as makeEventNdjsonLogStore, ls as randomBytes, lt as layer$133, lu as layerOtlpSerialization, m_ as ClientWebDeployment, ma as layer$140, mc as ServerConfig, md as AssetWorkspaceResolutionError, mf as set$1, mg as AuthAccessStreamError, mh as ServeError, mi as ProviderInstanceRegistry, ml as normalizeThreadPullRequestKey, mm as getSuccessSchemas, mn as PullRequestService, mo as rpcRequestsTotal, mp as EnvironmentRequestInvalidError, mr as layerModelCatalog, ms as isRemoteReachableHost, mt as WorktreeSetupTracker, mu as OtlpSerialization, n as McpClientAuthenticator, n_ as DEFAULT_MODEL, na as parseTurnDiffFilesFromNumstat, nc as readHoldWebhooksWhileOffline, nd as AssetCreateUrlInput, nf as PreviewViewportSetting, ng as isIgnored, nh as Path, ni as AgentScope, nl as MCP_APP_MAX_HTML_BYTES, nm as pullRequestHostOf, nn as selectInheritedBackgroundTurnItems, no as isFilesystemRoot, np as EnvironmentAuthenticatedAuth, nr as normalizePreviewUrl, ns as Hash, nt as layer$135, nu as ProviderLatestVersions, o_ as ProviderInstanceMutation, oa as pluginMcpServers, oc as resolveRootCliCommand, od as AssetProjectFaviconNotFoundError, of as ResolvedKeybindingRule, og as raw, oh as WebSocket$1, oi as layer$125, ol as DEFAULT_KEYBINDINGS, om as OrchestrationGetTurnDiffError, on as layer$126, oo as layer$118, op as EnvironmentHttpBadRequestError, or as layer$188, os as anumber, ot as layer$134, ou as OtlpProtocol, p_ as ClientSurface, pa as RepositoryIdentityResolver, pc as RuntimeMode$1, pd as AssetWorkspacePathValidationError, pf as make$78, pg as AuthAccessReadScope, ph as ResponseError, pi as ProviderAdapterTurnStartError, pl as legacyThreadPullRequestKey, pm as getErrorSchemas, pn as layerAutoPullPolicy, po as rpcRequestDuration, pp as EnvironmentOperationForbiddenError, pr as layer$187, ps as deriveAuthClientMetadata, pt as layer$172, pu as make$83, q as peerPlugins, qa as checkoutKind, qc as parseBase64DataUrl, qd as ServerSettingsPatch, qf as resolveBrowserProfiles, qg as getWithHeadersAnnotation, qh as del, qi as layer$119, ql as ensurePinnedRuntimeInstalled, qm as toURL, qn as layer$160, qo as diagnoseLaunchFailure, qp as ProjectReadFileError, qr as BUILT_IN_SOURCE_CONTROL_DRIVERS, qs as PUBLISH_AGENT_ACTIVITY_SECRET, qt as layerFromProjectStore, qu as WsT3RpcGroup, r_ as DEFAULT_MODEL_BY_PROVIDER, ra as SHARED_WORKSPACE_RESTORE_MESSAGE, rc as readRelayConnection, rd as AssetGitHubMediaUrlValidationError, rf as KeybindingRule, rg as layer$147, rh as CloseEvent, ri as agentScopeCommand, rl as injectMcpAppCookieBootstrap, rm as VcsRepositoryDetectionError, rn as RunFinalizationService, ro as makeIsManagedWorktreePath, rp as EnvironmentAuthenticatedPrincipal, rr as CodexInstallation, rs as abytes$1, rt as make$85, ru as layer$189, s_ as defaultInstanceIdForDriver, sa as ProjectConflictError, sc as ServerSecretStore, sd as AssetProjectFaviconResolutionError, sf as getCurrentVersion, sg as stream$1, sh as WebSocketConstructor, si as layer$201, sl as compileResolvedKeybindingRule, sm as OrchestrationGetTurnDiffResult, sn as WorkspaceEntries, so as VcsProcess, sp as EnvironmentHttpCommonError, sr as EMPTY_TOTALS, ss as clean, st as userFacingDispatchErrorMessage, su as causeErrorTag, t_ as AcpRegistryOperationError, ta as isGitImport, tc as isAgentActivityPublishingEnabledValue, td as AssetAttachmentNotFoundError, tf as PreviewStreamHostSetup, tg as ignore$1, th as make$74, ti as layer$193, tl as toolOutputImages, tm as PullRequestOperationError, tn as layer$124, to as jjCommand, tp as EnvironmentAuthInvalidError, tr as isLoopbackHost$1, ts as sha512, tt as SecretRequests, tu as resolveLatestProviderVersion, u_ as ClientConnectionMethod, ua as layer$114, uc as layer$97, ud as AssetWorkspaceAssetNotFoundError, uf as isQuitError, ug as ExecutionEnvironmentDescriptor, uh as ClientAbort, ui as ProviderContinuationRequests, ul as parseKeybindingShortcut, um as PersistChatAttachmentsError, un as isProjectFaviconPath, uo as metricAttributes, up as EnvironmentHttpInternalServerError, ur as readContainedWorkflowFile, us as toBytes, ut as ProjectCloneTracker, uu as makeLocalFileTracer, v as pullRequestSyncKey, v_ as IsoDateTime, va as layer$143, vc as make$77, vd as AgentSessionImportSource, vf as SpanPropagationEnabled, vg as AuthDiagnosticsReadScope, vh as HttpPlatform, vi as cancelledBeforeStart, vl as parseChangeRequestUrl, vm as cors, vn as layer$165, vo as resolveWorktreeCleanup, vp as RelayCloudEnvironmentHealthProofPayload, vr as formatThreadTitleContext, vs as timingSafeEqualBase64Url, vt as layer$107, vu as unknownToAttributeValue, w as remoteSshDeviceHosts, w_ as ProviderSessionId, wa as layer$113, wc as decodeJsonResult, wd as GitCommandError, wf as LogLevel$1, wg as AuthMcpApprovalError, wh as isHttpServerResponse, wi as isRestartNoteSource, wl as layerFromOrchestrationEventStore, wm as make$75, wn as GitManager, wo as withoutCredentials, wp as RelayManagedEndpointRecoveryResponse, wr as isWorkspacePreviewEntryPath, ws as layer$199, wt as layer$183, wu as listLoginShellCandidates, x as DeviceService, x_ as PortSchema, xa as ThreadCommandExecutor, xc as version, xd as FilesystemBrowseError, xf as Boolean$5, xg as AuthFilesystemReadScope, xh as empty$4, xi as isAwaitedWork, xl as sourceControlRepositorySelector, xm as serve, xn as GitWorkflowService, xo as parseOriginUrlFromGitConfig, xp as RelayEnvironmentLinkResponse, xr as audioMimeTypeFromExtension, xs as layer$182, xt as MCP_CLIENTS, xu as modelSelectionsEqual, y as layer$196, y_ as MessageId, ya as WorkspacePaths, yc as otlpResource, yd as AgentSessionScanError, yf as isSqlError, yg as AuthEnvironmentMaintainScope, yh as make$73, yi as cancelledRosterTaskWork, yl as siblingPullRequestUrl, ym as middleware, yn as layer$116, yo as normalizeGitRemoteUrl, yp as RelayCloudMintCredentialProofPayload, yr as WORKSPACE_BROWSER_PREVIEW_EXTENSIONS, ys as ServerEnvironment, yt as listClients, yu as layerFlusher, z as layer$178, za as forkParked, zc as buildBoundedThreadProjection, zd as ClaudeSettings, zf as make$80, zg as EnvironmentAuthorizationError, zh as TypeId$4, zi as historyCost, zl as SERVICE_STOP_MARKER_FILE, zm as compression$1, zn as layer$162, zo as withRelayClientTracing, zp as isOrchestrationV2WorkActive, zr as PtyAdapter, zs as toArrayBuffer, zt as ThreadTranscriptTooLargeError, zu as newestCliReleaseVersion } from "./McpHttpServer-DAx8Xm-g.mjs";
|
|
6
|
+
import { $ as SecretRequests, $a as make$79, $c as projectThreadProjectionForWire, $d as PREVIEW_STREAM_HOST_SETUP_CLOSE_CODE, $f as DESKTOP_UPDATE_RESTART_MARKER_FILE, $g as isWithHeadersValue, $h as setHeaders$1, $i as layer$151, $l as layer$98, $m as makeConfig, $n as codexAuthorizationRequest, $o as layer$101, $r as firstNonEmptyLine, $s as decodeRuntimeConfig, $t as layer$122, $u as PREVIEW_AUTOMATION_SERVER_OPERATIONS, A as layer$184, A_ as RuntimeRequestId, Aa as layerFromStores, Ac as none$2, Ad as EDITORS$1, Af as URL$1, Ag as AuthOrchestrationReadScope, Ah as removeHeader, Ai as restartContinuationNote, Al as bufferLiveStream, Am as get, An as layer$132, Ao as coordSocketPath, Ap as ORCHESTRATION_V2_WS_METHODS, Ar as NoOpProviderEventLoggers, As as DesktopTelemetryReceiver, At as RELAY_HOOK_DELIVERY_TYP, Au as resolveSpawnCommand, B as coreLayer, Ba as forkParked, Bc as buildBoundedThreadProjection, Bd as ClaudeSettings, Bf as make$80, Bg as EnvironmentAuthorizationError, Bh as TypeId$4, Bi as historyCost, Bl as SERVICE_STOP_MARKER_FILE, Bm as compression$1, Bn as layer$162, Bo as withRelayClientTracing, Bp as isOrchestrationV2WorkActive, Br as PtyAdapter, Bs as toArrayBuffer, Bt as ThreadTranscriptTooLargeError, Bu as newestCliReleaseVersion, C as stateStream, C_ as PositiveInt, Ca as layer$117, Cc as parsePersistedServerObservabilitySettings, Cd as OrchestrationSearchThreadsError, Cf as ConfigError, Cg as AuthFilesystemWriteScope, Ch as file, Ci as isRestartContinuationSource, Cl as EventStoreV2, Cm as use, Cn as layer$171, Co as run$4, Cp as RelayHookDeliveryProofPayload, Cr as hostPreviewMimeTypeFromExtension, Cs as layerIdentity, Ct as idFromName, Cu as collectUint8StreamText, D as PreviewAutomationBroker, D_ as ProviderTurnId, Da as deriveThreadFromProviderThread, Dc as fromLenientJson, Dd as EnvironmentThemeId, Df as Port, Dg as AuthMcpRegistrationError, Dh as mergeCookies, Di as neverStarted, Dl as layer$108, Dm as filterStatusOk$1, Dn as ProviderRegistry, Do as mergeProviderInstanceEnvironment, Dp as RelayProtectedError, Dr as endOrphanedNativeSubagent, Ds as layer$200, Dt as RELAY_HEALTH_REQUEST_TYP, Du as readEnvironmentFromLoginShell, E as layer$197, E_ as ProviderThreadId, Ea as IdAllocatorV2, Ec as fromJsonStringPretty, Ed as EnvironmentThemeFile, Ef as NonEmptyString, Eg as AuthMcpClientAccess, Eh as jsonUnsafe, Ei as mergeRestartCancelledBackgroundWork, El as OrchestrationEventStore, Em as HttpClient, En as layer$168, Eo as resolveCodexHomeLayout, Ep as RelayOkResponse, Er as makeUnavailableUsageLimits, Es as ServiceLauncherClient, Et as getOrCreateEnvironmentKeyPairFromSecretStore, Eu as mergePathEntries, F as issueAttachmentUploadUrl, F_ as encode$2, Fa as PROCESS_BOUND_EFFECT_TYPES, Fc as ProjectionStoreV2, Fd as ExternalLauncherUnsupportedEditorError, Ff as schema, Fg as AuthSettingsWriteScope, Fh as text$1, Fi as attachmentTokenAllowance, Fl as layer$94, Fm as update, Fn as layer$153, Fo as EXIT_STATUS, Fp as OrchestrationV2GetThreadProjectionError, Fr as layerJson, Fs as layer$144, Ft as normalizeRelayIssuer, Fu as ChildProcessSpawner, G as peerPlugins, Ga as layer$106, Gc as createDeterministicAttachmentId, Gd as DEFAULT_SERVER_SETTINGS, Gg as getResponseEncodingSchema, Gh as bodyJsonUnsafe, Gi as layer$129, Gl as serviceStateActiveVersion, Gm as schemaCookies, Gn as layer$191, Go as PreviewBrowserLibrariesError, Gp as ProjectListEntriesError, Gr as layer$137, Gs as CLOUD_LINK_REVOKED, Gt as layer$128, Gu as RpcScopeAuthorization, H as rpcLayer, Ha as layerFromApplicationReceipts, Hc as PENDING_ATTACHMENT_THREAD_SEGMENT, Hd as DATABASE_COMPACTION_RECOMMENDED_BYTES, Hf as set$3, Hg as authScopeRequiredResponse, Hh as schemaBodyJson, Hi as renderHistory, Hl as decodeServiceLauncherChildMessage, Hm as HttpServerRequest, Hn as layer$157, Ho as APPARMOR_PROFILE_PATH, Hp as ToolActivityNativeAppReference, Hr as layer$190, Hs as CLOUD_ENDPOINT_CONFIRMED_ORIGIN, Ht as layerWithLegacyImporter, Hu as layer$99, I as storeAttachmentUpload, I_ as snapshotUnsafe, Ia as REPLAY_SAFE_EFFECT_TYPES_AFTER_PROCESS_LOSS, Ic as layer$96, Id as ExternalLauncherUnsupportedTargetError, If as withDefault$2, Ig as AuthSourceControlWriteScope, Ih as uint8Array$1, Ii as contextUsageForHandoff, Il as readOnly, Im as updateAndGet, In as PortDiscovery, Io as make$76, Ip as OrchestrationV2ProviderSessionJson, Ir as AcpRegistryCatalog, Is as redactServerSettingsForClient, It as signRelayJwt, Iu as CLI_RELEASE_BASE_URL_ENV, J as WEBHOOK_ROUTE_PREFIX, Ja as checkoutKind, Jc as parseBase64DataUrl, Jd as ServerSettingsPatch, Jf as resolveBrowserProfiles, Jg as getWithHeadersAnnotation, Jh as del, Ji as layer$119, Jl as ensurePinnedRuntimeInstalled, Jm as toURL, Jn as layer$160, Jo as diagnoseLaunchFailure, Jp as ProjectReadFileError, Jr as BUILT_IN_SOURCE_CONTROL_DRIVERS, Js as PUBLISH_AGENT_ACTIVITY_SECRET, Jt as layerFromProjectStore, Ju as WsT3RpcGroup, K as ScheduledTaskService, Ka as realpathOrSelf$2, Kc as parseAttachmentFileExtension, Kd as ServerSettings, Kg as getStatusErrorSchema, Kh as bodyStream, Ki as CheckpointServiceV2, Kl as serviceStateHasPendingUpdate, Km as schemaHeaders, Kn as layer$192, Ko as PreviewBrowserSandboxError, Kp as ProjectMutation, Kr as SourceControlProviderRegistry, Ks as CLOUD_MINT_PUBLIC_KEY, Kt as layer$131, Ku as WS_METHODS, L as validateAttachmentUploadToken, L_ as update$1, La as layer$111, Lc as InvalidThreadHistoryCursorError, Ld as ProviderSetupError, Lf as SourceError, Lg as AuthStandardClientScopes, Lh as urlParams, Li as handoffBudget, Ll as SERVICE_LAUNCHER_CONTEXT_ENV, Lm as appendPreResponseHandler, Ln as layer$176, Lo as RelayClientTracer, Lp as OrchestrationV2SearchThreadError, Lr as layerFromHost, Ls as decode$2, Lt as verifyRelayJwt, Lu as CLI_RELEASE_CHANNELS, M as launchThread, M_ as TurnItemId, Ma as ProjectStoreV2, Mc as NetService, Md as ExternalLauncherCommandNotFoundError, Mf as map$6, Mg as AuthProvidersManageScope, Mh as setHeader, Mi as ContextHandoffServiceV2, Ml as findAll, Mm as make$71, Mn as layer$177, Mo as readOwner, Mp as OrchestrationV2AppThreadJson, Mr as Protocol, Ms as writeAllToFileDescriptor, Mt as RELAY_MANAGED_TUNNEL_RECOVERY_TYP, Mu as setWindowsPath, N as ATTACHMENT_UPLOAD_ROUTE_PREFIX, N_ as decode$1, Na as layer$110, Nc as layer$180, Nd as ExternalLauncherEditorSpawnError, Nf as mapEffect$1, Ng as AuthRelayReadScope, Nh as setHeaders, Ni as layer$120, Nl as findOneOption, Nm as modify, Nn as NativeTelemetryClient, No as requestHandover, Np as OrchestrationV2DispatchCommandError, Nr as make$81, Ns as subscribeBeforeSnapshot, Nt as RELAY_MINT_REQUEST_TYP, Nu as withPathDirectoryListings, O as layer$198, O_ as RpcClientId, Oa as layer$115, Oc as layerResourceAttributes, Od as ServerProviderUpdateError, Of as Redacted, Og as AuthMcpTokenError, Oh as raw$1, Oi as pendingRestartCancelledBackgroundWork, Ol as PersistenceDecodeError, Om as mapRequest, On as layer$185, Oo as expandHomePath$1, Op as fromApi, Or as endRunlessRootTurns, Os as runServicePreflight, Ot as RELAY_HEALTH_RESPONSE_TYP, Ou as readPathFromLaunchctl, P as deletePendingAttachment, P_ as decodeString$1, Pa as EffectOutboxV2, Pc as ProjectionStoreThreadNotFoundError, Pd as ExternalLauncherUnknownEditorError, Pf as option$1, Pg as AuthRelayWriteScope, Ph as stream$2, Pi as DEFAULT_HANDOFF_TOKEN_CAP, Pl as void_$2, Pm as set$2, Pn as layer$152, Po as waitForSocketGone, Pp as OrchestrationV2GetShellSnapshotError, Pr as makeProtocolWithHttpEffectWebsocket, Ps as ServerSettingsService, Pt as RELAY_MINT_RESPONSE_TYP, Pu as make$72, Q as layer$138, Qa as workspaceNameForRef, Qc as projectDomainEventForWire, Qd as FILL_PREVIEW_VIEWPORT, Qf as DesktopBrowserEvent, Qg as isWithHeaders, Qh as setHeader$1, Qi as layer$150, Ql as ProcessRunner, Qm as limitsServices, Qn as makeCodexChatGptAuth, Qo as layer$103, Qp as DEFAULT_PROVIDER_INTERACTION_MODE, Qr as detailFromCause, Qs as decodeConfirmedOrigin, Qt as CommandOutputHub, Qu as UsageReadError, R as PreviewManager, R_ as withAttributes, Ra as layerPruneWorker, Rc as THREAD_HISTORY_PAGE_POLICY, Rd as ProviderUploadFeedbackError, Rf as get$1, Rg as AuthTerminalOperateScope, Rh as filterStatusOk, Ri as handoffTokenCapConfig, Rl as SERVICE_RESTART_PENDING_FILE, Rm as toHandled, Rn as deriveProviderInstanceConfigMap, Ro as layer$104, Rp as OrchestrationV2ThreadLaunchError, Rr as toAcpRegistryOperationError, Rs as fromReadable, Rt as makeDrainableWorker, Ru as cliReleaseChannelOf, S as layer$179, S_ as PortSchema, Sa as ThreadCommandExecutor, Sc as version, Sd as FilesystemBrowseError, Sf as Boolean$5, Sg as AuthFilesystemReadScope, Sh as empty$4, Si as isAwaitedWork, Sl as sourceControlRepositorySelector, Sm as serve, Sn as GitWorkflowService, So as parseOriginUrlFromGitConfig, Sp as RelayEnvironmentLinkResponse, Sr as audioMimeTypeFromExtension, Ss as layer$182, St as PeerWorkspaces, Su as modelSelectionsEqual, T as PreviewBrowser, T_ as ProviderSessionId, Ta as layer$113, Tc as decodeJsonResult, Td as GitCommandError, Tf as LogLevel$1, Tg as AuthMcpApprovalError, Th as isHttpServerResponse, Ti as isRestartNoteSource, Tl as layerFromOrchestrationEventStore, Tm as make$75, Tn as GitManager, To as withoutCredentials, Tp as RelayManagedEndpointRecoveryResponse, Tr as isWorkspacePreviewEntryPath, Ts as layer$199, Tt as layer$183, Tu as listLoginShellCandidates, U as PeerAdapters, Ua as layer$109, Uc as attachmentRelativePath, Ud as DEFAULT_AUTOMATIC_GIT_FETCH_INTERVAL, Uf as nextIntBetween, Ug as authScopeResponse, Uh as bearerToken, Ui as selectHistory, Ul as isExactServiceVersion, Um as ParsedSearchParams, Un as layer$155, Uo as DEBIAN_PACKAGES, Up as UsageLimitSourceError, Ur as withWorkspaceLease, Us as CLOUD_ENDPOINT_RUNTIME_CONFIG, Ut as withCreationProvenance, Uu as CLIENT_GUARDED_RPC_SCOPES, V as layer$105, Va as forkParkedFiber, Vc as decodeThreadHistoryCursor, Vd as CodexSettings, Vf as makeWith, Vg as ServerAuthSessionMethod, Vh as inspect$1, Vi as latestNativeContextUsage, Vl as compareExactServiceVersions, Vm as fromHeaders, Vn as BackgroundPolicy, Vo as APPARMOR_PROFILE, Vp as latestProviderTurnForAttempt, Vr as PtySpawnError, Vs as toUint8Array, Vt as isTerminalRunStatus, Vu as RequestInit, W as PeerPluginRegistry, Wa as PeerState, Wc as chatAttachmentStableKey, Wd as DEFAULT_PROVIDER_HEALTH_REFRESH_INTERVAL, Wf as BUILT_IN_BROWSER_PROFILES, Wg as getResponseEncoding, Wh as bodyJson, Wi as isNativeMaintenanceCommand, Wl as parseServiceState, Wm as TypeId$6, Wn as BUILT_IN_USAGE_DRIVERS, Wo as NO_SANDBOX_SIGNATURE, Wp as OrchestrationProjectShell, Wr as TextGeneration, Ws as CLOUD_LINKED_USER_ID, Wt as OrchestratorV2, Wu as clientRpcRequiredScopes, X as relayHookBaseUrl, Xa as invalidateJjAvailability, Xc as projectComposerContextForProvider, Xd as requiredScopesForServerSettingsPatch, Xf as DesktopAppActivationResponse, Xg as isStreamSchema, Xh as make$82, Xi as layer$175, Xl as pinnedRuntimePaths, Xm as TypeId$5, Xn as sameUsageLimitCommandCoverage, Xo as sandboxBlocked, Xp as ProjectSearchEntriesError, Xr as GitHubCredentials, Xs as RELAY_ISSUER_SECRET, Xt as ProviderSessionManagerV2, Xu as PEER_LOCAL_WORKSPACE, Y as layer$136, Ya as resolveJjRepoPaths, Yc as runRanAfter, Yd as requiredScopesForProjectMutation, Yf as DesktopAppActivationErrorCode, Yg as isNoContent, Yh as get$2, Yi as CheckpointStore, Yl as pinnedRuntimeCommand, Ym as MultipartError, Yn as layer$161, Yo as missingLibraries, Yp as ProjectSearchContentsError, Yr as layer$149, Ys as RELAY_ENVIRONMENT_CREDENTIAL_SECRET, Yt as layer$121, Yu as PEER_RPC_SCOPES, Z as Scheduler, Za as resolveWorkspaceRefName, Zc as normalizeProjectPathForComparison, Zd as resolveProviderInstanceEnabled, Zf as DesktopBrowserCommand, Zg as isStreamUint8Array, Zh as post, Zi as VcsDriverRegistry, Zl as pinnedRuntimeVersionsDir, Zm as isPersistedFile, Zn as withUsageLimitsCommands, Zo as sandboxDisabled, Zp as ProjectWriteFileError, Zr as layer$167, Zs as RELAY_URL_SECRET, Zt as layer$123, Zu as Service$1, _ as layer$195, __ as DpopFailureReason, _a as ProjectFaviconResolver, _c as ensureServerDirectories, _d as AgentSessionImportProjectChangedError, _f as map$7, _g as AuthAccessWriteScope, _h as symbol, _i as isUndeliveredMailboxSteer, _l as threadPullRequestKeysEqual, _m as RouteContext, _n as layer$164, _o as withMetrics, _p as EnvironmentScopeRequiredError, _r as layer$158, _s as resolveSessionCookieName, _t as listClients, _u as fromConfig, a_ as ProviderDriverKind, aa as isCheckpointRestoreIsolated, ac as resolveCliCommand, ad as AssetPreviewTypeValidationError, af as KeybindingsConfig, ag as layer$102, ah as SocketError, al as injectMcpAppThemeBootstrap, am as VcsUnsupportedOperationError, an as layer$127, ao as managedWorktreesDirectories, ap as EnvironmentCloudEndpointUnavailableError, ar as codexPlanLabel, as as aexists, at as userFacingDispatchErrorMessage, au as DEFAULT_SIGNAL_EXPORT, b as DEVICE_HUB_ROUTE_PREFIX, b_ as MessageId, ba as WorkspacePaths, bc as otlpResource, bd as AgentSessionScanError, bf as isSqlError, bg as AuthEnvironmentMaintainScope, bh as make$73, bi as cancelledRosterTaskWork, bl as siblingPullRequestUrl, bm as middleware, bn as layer$116, bo as normalizeGitRemoteUrl, bp as RelayCloudMintCredentialProofPayload, br as WORKSPACE_BROWSER_PREVIEW_EXTENSIONS, bs as ServerEnvironment, bt as mcpClient, bu as layerFlusher, c_ as defaultInstanceIdForDriver, ca as ProjectConflictError, cc as ServerSecretStore, cd as AssetProjectFaviconResolutionError, cf as getCurrentVersion, cg as stream$1, ch as WebSocketConstructor, ci as layer$201, cl as compileResolvedKeybindingRule, cm as OrchestrationGetTurnDiffResult, cn as WorkspaceEntries, co as VcsProcess, cp as EnvironmentHttpCommonError, cr as EMPTY_TOTALS, cs as clean, ct as ProjectCloneTracker, cu as causeErrorTag, d_ as ClientConnectionMethod, da as layer$114, dc as layer$97, dd as AssetWorkspaceAssetNotFoundError, df as isQuitError, dg as ExecutionEnvironmentDescriptor, dh as ClientAbort, di as ProviderContinuationRequests, dl as parseKeybindingShortcut, dm as PersistChatAttachmentsError, dn as isProjectFaviconPath, do as metricAttributes, dp as EnvironmentHttpInternalServerError, dr as readContainedWorkflowFile, ds as toBytes, dt as layer$172, du as makeLocalFileTracer, e_ as hasBody, ea as JjVcsDriver, ec as encodeConfirmedOriginJson, ed as SERVER_BROWSER_AUTOMATION_CLIENT_ID, ef as PREVIEW_VIEWPORT_PRESET_IDS, eg as isHttpClientError, eh as toPersisted, ei as PullRequestProviderError, el as MAX_TOOL_OUTPUT_IMAGE_BASE64_LENGTH, em as RuntimeMode, en as RunExecutionServiceV2, eo as exactStringPattern, ep as DesktopBackendBootstrap, er as codexCallbackUrl, es as sha256, et as layer$135, eu as enrichProviderSnapshotWithVersionAdvisory, f_ as ClientDeviceType, fa as ProjectEnrichmentService, fc as writeFileStringAtomically, fd as AssetWorkspaceContextNotFoundError, ff as changes, fg as ORCHESTRATION_PROTOCOL_HEADER, fh as HttpServerError, fi as layer$130, fl as BUILT_IN_THEME_IDS, fm as isSecurity, fn as VcsStatusBroadcaster, fo as orchestrationEffectClaimsTotal, fp as EnvironmentHttpUnauthorizedError, fr as BUNDLED_MODEL_MANIFEST, fs as base64UrlDecodeUtf8, ft as WorktreeSetupTracker, fu as makeTraceSink, g as PullRequestReviewGuideService, g_ as CommandId, ga as make$84, gc as deriveServerPaths, gd as AssetWorkspaceRootNormalizationError, gf as Stdio, gg as AuthAccessTokenType, gh as causeResponse, gi as isBufferedProviderNotification, gl as threadPullRequestKeyOf, gm as normalize, gn as layer$163, go as webhookDeliveriesTotal, gp as EnvironmentResourceNotFoundError, gr as resolveProviderCompatibility, gs as resolveLegacySessionCookieName, gt as layer$107, gu as entriesToAttributes, h_ as ClientWebDeployment, ha as layer$140, hc as ServerConfig, hd as AssetWorkspaceResolutionError, hf as set$1, hg as AuthAccessStreamError, hh as ServeError, hi as ProviderInstanceRegistry, hl as normalizeThreadPullRequestKey, hm as getSuccessSchemas, hn as PullRequestService, ho as rpcRequestsTotal, hp as EnvironmentRequestInvalidError, hr as layerModelCatalog, hs as isRemoteReachableHost, ht as ensureShim, hu as OtlpSerialization, i as layer$194, i_ as DEFAULT_MODEL_BY_PROVIDER, ia as SHARED_WORKSPACE_RESTORE_MESSAGE, ic as readRelayConnection, id as AssetGitHubMediaUrlValidationError, if as KeybindingRule, ig as layer$147, ih as CloseEvent, ii as agentScopeCommand, il as injectMcpAppCookieBootstrap, im as VcsRepositoryDetectionError, in as RunFinalizationService, io as makeIsManagedWorktreePath, ip as EnvironmentAuthenticatedPrincipal, ir as CodexInstallation, is as abytes$1, it as layer$134, iu as layer$189, j as dispatchCommand, j_ as ThreadId, ja as layer$112, jc as resolveSignalEndpoint, jd as ExternalLauncherBrowserSpawnError, jf as all$1, jg as AuthPreviewOperateScope, jh as setBody, ji as reportLabel, jl as makeLiveStreamBudget, jm as getAndSet, jn as TerminalManager, jo as coreLaunchCommand, jp as OrchestrationGetWorkflowScriptError, jr as ProviderEventLoggers, js as layer$154, jt as RELAY_LINK_PROOF_TYP, ju as resolveWindowsEnvironment, k as ThreadSearch, k_ as RunId, ka as EventSinkV2, kc as load, kd as environmentThemeFileHasColors, kf as String$7, kg as AuthOrchestrationOperateScope, kh as redirect, ki as restartCancelledBackgroundWorkNote, kl as PersistenceSqlError, km as withScope, kn as ProjectSetupScriptRunner, ko as PeerBrokerKind, kp as toRouterPath, kr as PluginMcpServers, ks as layer$156, kt as RELAY_HOOK_DELIVERY_HEADER, ku as resolveCommandPath, l_ as AuthSessionId, la as ProjectOperationError, lc as isSecretAlreadyExistsError, ld as AssetSigningKeyLoadError, lf as QuitError, lg as uint8Array, lh as fromWebSocket, li as ContextHandoffBudgetError, ll as compileResolvedKeybindingsConfig, lm as ChatAttachmentId, ln as layer$181, lo as layer$146, lp as EnvironmentHttpConflictError, lr as claudeUsageResponseToLimits, ls as concatBytes$1, lt as layer$173, lu as decodeOtlpTraceRecords, m_ as ClientSurface, ma as RepositoryIdentityResolver, mc as RuntimeMode$1, md as AssetWorkspacePathValidationError, mf as make$78, mg as AuthAccessReadScope, mh as ResponseError, mi as ProviderAdapterTurnStartError, ml as legacyThreadPullRequestKey, mm as getErrorSchemas, mn as layerAutoPullPolicy, mo as rpcRequestDuration, mp as EnvironmentOperationForbiddenError, mr as layer$187, ms as deriveAuthClientMetadata, mt as McpClients, mu as make$83, n as McpClientAuthenticator, n_ as AcpRegistryOperationError, na as isGitImport, nc as isAgentActivityPublishingEnabledValue, nd as AssetAttachmentNotFoundError, nf as PreviewStreamHostSetup, ng as ignore$1, nh as make$74, ni as layer$193, nl as toolOutputImages, nm as PullRequestOperationError, nn as layer$124, no as jjCommand, np as EnvironmentAuthInvalidError, nr as isLoopbackHost$1, ns as sha512, nt as threadHasQueuedTurnStart, nu as resolveLatestProviderVersion, o_ as ProviderInstanceId, oa as PeerHubClient, oc as resolveHostCliCommand, od as AssetProjectFaviconInspectionError, of as KeybindingsConfigError, og as layerWeak, oh as SocketOpenError, oi as McpAppModelContext, ol as mcpAppToolCallableByApp, om as OrchestrationGetFullThreadDiffError, on as layerObserver, oo as GitVcsDriver, op as EnvironmentHttpApi, or as codexRateLimitsToLimits, os as ahash, ot as ManagedProjectFolders, ou as OtlpHeadersFromString, p_ as ClientOs, pa as layer$139, pc as DEFAULT_PORT, pd as AssetWorkspaceContextResolutionError, pf as get$3, pg as ORCHESTRATION_PROTOCOL_QUERY_PARAM, ph as RequestParseError, pi as layerFromProviderInstanceRegistry, pl as UNPUBLISHABLE_THEME_IDS, pm as getSlotParseOptions, pn as layer$174, po as orchestrationEffectQueueWait, pp as EnvironmentInternalError, pr as ModelManifest, ps as base64UrlEncode, pt as layer$169, pu as RotatingFileSink, q as ScheduledTaskWebhookOrigin, qa as remoteOf, qc as resolveAttachmentPathById, qd as ServerSettingsError, qf as findBrowserProfile, qg as getStatusSuccessSchema, qh as bodyUrlParams, qi as checkpointRefForScopeOrdinal, ql as PinnedRuntimeInstallError, qm as schemaSearchParams, qn as layer$159, qo as SETUP_SUBCOMMAND, qp as ProjectMutationError, qr as layer$148, qs as HOLD_WEBHOOKS_WHILE_OFFLINE_SECRET, qt as RuntimePolicyV2, qu as WsRpcGroup, r_ as DEFAULT_MODEL, ra as parseTurnDiffFilesFromNumstat, rc as readHoldWebhooksWhileOffline, rd as AssetCreateUrlInput, rf as PreviewViewportSetting, rg as isIgnored, rh as Path, ri as AgentScope, rl as MCP_APP_MAX_HTML_BYTES, rm as pullRequestHostOf, rn as selectInheritedBackgroundTurnItems, ro as isFilesystemRoot, rp as EnvironmentAuthenticatedAuth, rr as normalizePreviewUrl, rs as Hash, rt as ThreadLaunchService, ru as ProviderLatestVersions, s_ as ProviderInstanceMutation, sa as pluginMcpServers, sc as resolveRootCliCommand, sd as AssetProjectFaviconNotFoundError, sf as ResolvedKeybindingRule, sg as raw, sh as WebSocket$1, si as layer$125, sl as DEFAULT_KEYBINDINGS, sm as OrchestrationGetTurnDiffError, sn as layer$126, so as layer$118, sp as EnvironmentHttpBadRequestError, sr as layer$188, ss as anumber, st as layer$133, su as OtlpProtocol, t_ as encoder, ta as layer$145, tc as encodeEndpointRuntimeConfigJson, td as McpAppRequestError, tf as PreviewClearProfileError, tg as TypeId$7, th as decodeField, ti as AnalyticsService, tl as mcpAppFromToolItem, tm as PullRequestLinkedThreadsResult, tn as canRouteRelatedSubagent, to as colocatedGitCommand, tp as RelayClientInstallFailedError, tr as providerAuthReturnUrl, ts as sha384, tt as make$85, tu as makeTargetedProviderUpdateAction, u_ as CheckpointId, ua as ProjectService, uc as isSecretStoreError, ud as AssetWorkspaceAssetInspectionError, uf as Terminal, ug as FileSystem, uh as makeWebSocket$1, ui as makeProviderFailure, ul as mergeWithDefaultKeybindings, um as PROVIDER_SEND_TURN_MAX_FILE_BYTES, un as PROJECT_FAVICON_FALLBACK_MARKER, uo as increment, up as EnvironmentHttpForbiddenError, ur as makeEventNdjsonLogStore, us as randomBytes, ut as SourceControlRepositoryService, uu as layerOtlpSerialization, v as pullRequestSyncKey, v_ as EventId, va as layer$141, vc as layer$100, vd as AgentSessionImportProjectNotFoundError, vf as SqlClient, vg as AuthClientMetadataDeviceType, vh as toResponse, vi as awaitingProviderThreadId, vl as visibleThreadPullRequests, vm as add$2, vn as layer$166, vo as resolveProjectSettings, vp as RelayApi, vr as AntigravityInstallation, vs as signPayload, vt as userBases, vu as serviceNameUnsafe, w as remoteSshDeviceHosts, w_ as ProjectId, wa as LegacyV1ThreadImporter, wc as resolveServerBackgroundActivitySettings, wd as OrchestrationDispatchCommandError, wf as Int$6, wg as AuthGrantScope, wh as html, wi as isRestartNoteContinuation, wl as layer$95, wm as HttpServer, wn as layer$170, wo as matchRepositories, wp as RelayManagedEndpointRecoveryRegistrationResponse, wr as isWorkspaceImagePreviewPath, ws as ServerSelfUpdate, wt as AgentAwarenessRelay, wu as isCommandAvailable, x as DeviceService, x_ as NonNegativeInt, xa as layer$142, xc as resolveStaticDir, xd as AgentSessionSource, xf as Crypto, xg as AuthEnvironmentScopes, xh as getType, xi as cancelledTurnItemWork, xl as canonicalRepositoryKey, xm as route, xn as layerAnalytics, xo as parseGitHubRepositoryNameWithOwnerFromRemoteUrl, xp as RelayEnvironmentLinkChallengeResponse, xr as WORKSPACE_IMAGE_PREVIEW_EXTENSIONS, xs as ServerEnvironmentIdentity, xt as PeerCoordination, xu as make$70, y as layer$196, y_ as IsoDateTime, ya as layer$143, yc as make$77, yd as AgentSessionImportSource, yf as SpanPropagationEnabled, yg as AuthDiagnosticsReadScope, yh as HttpPlatform, yi as cancelledBeforeStart, yl as parseChangeRequestUrl, ym as cors, yn as layer$165, yo as resolveWorktreeCleanup, yp as RelayCloudEnvironmentHealthProofPayload, yr as formatThreadTitleContext, ys as timingSafeEqualBase64Url, yt as MCP_CLIENTS, yu as unknownToAttributeValue, z as layer$178, z_ as bytes, za as ServerActivation, zc as THREAD_HISTORY_SNAPSHOT_ROW_LIMIT, zd as AntigravitySettings, zf as invalidate, zg as AuthTerminalReadScope, zh as MaxBodySize, zi as historicalMessage, zl as SERVICE_STATE_FILE, zm as TracerDisabledWhen, zn as layer$186, zo as withLocalTracing, zp as OrchestrationV2ThreadShell, zr as AcpRegistryRuntimeCoordinator, zs as pipeThroughDuplex, zt as ThreadManagementService, zu as cliReleaseIndexPageUrl } from "./McpHttpServer-BdwjWM7Y.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";
|
|
@@ -27478,7 +27478,7 @@ const login = (input, io) => gen$1(function* () {
|
|
|
27478
27478
|
const sayWorkspaces = (status, io) => gen$1(function* () {
|
|
27479
27479
|
for (const workspace of status.workspaces) yield* io.say(`Workspace: ${workspace.slug} (${workspace.name})`);
|
|
27480
27480
|
for (const offer of status.joinable) yield* io.say(offer.reason === "invite" ? `Invited: ${offer.slug} (${offer.name}). Accept it with peer core join ${offer.slug}.` : `Joinable: ${offer.slug} (${offer.name}). Confirm it with peer core join ${offer.slug}.`);
|
|
27481
|
-
if (status.workspaces.length === 0 && status.joinable.length === 0) yield* io.say("Workspace: none yet (ask for an invitation, or create one
|
|
27481
|
+
if (status.workspaces.length === 0 && status.joinable.length === 0) yield* io.say("Workspace: none yet (ask for an invitation, or create one with peer core create \"<name>\").");
|
|
27482
27482
|
});
|
|
27483
27483
|
/**
|
|
27484
27484
|
* `peer core join <slug|link>`. A link signs its address in when nobody is signed in, at the Hub
|
|
@@ -27611,6 +27611,259 @@ const editorChoices = (detected) => [
|
|
|
27611
27611
|
}
|
|
27612
27612
|
];
|
|
27613
27613
|
//#endregion
|
|
27614
|
+
//#region src/cli/peerCoreMenu.ts
|
|
27615
|
+
/** Who may invite to a workspace: its owners and admins (a project's lead does it in the app). */
|
|
27616
|
+
const inviter = (role) => role === "owner" || role === "admin";
|
|
27617
|
+
/** `peer core create <name> [--slug <slug>]`: a workspace whose owner is the signed-in person. */
|
|
27618
|
+
const create = (input, io) => gen$1(function* () {
|
|
27619
|
+
const workspaces = yield* PeerWorkspaces;
|
|
27620
|
+
const name = input.name.trim();
|
|
27621
|
+
const slug = (input.slug?.trim() || idFromName(name, "")).toLowerCase();
|
|
27622
|
+
if (name === "" || slug === "") return yield* outcome("usage", "a workspace needs a name", "run peer core create \"<name>\" [--slug <slug>].");
|
|
27623
|
+
const status = yield* workspaces.createWorkspace({
|
|
27624
|
+
slug,
|
|
27625
|
+
name,
|
|
27626
|
+
allowedDomains: []
|
|
27627
|
+
});
|
|
27628
|
+
yield* io.say(`Created: ${slug} (${name}). You are its owner.`);
|
|
27629
|
+
yield* io.say(`Next: share a project with peer core share, then invite people with peer core invite <email> --workspace ${slug}.`);
|
|
27630
|
+
return status;
|
|
27631
|
+
});
|
|
27632
|
+
/** `peer core invite <email>`: mails an invitation to a workspace the person may invite to. */
|
|
27633
|
+
const invite = (input, status, io) => gen$1(function* () {
|
|
27634
|
+
const workspaces = yield* PeerWorkspaces;
|
|
27635
|
+
const mine = status.workspaces.filter((w) => inviter(w.role)).map((w) => w.slug);
|
|
27636
|
+
const slug = input.workspace ?? (mine.length === 1 ? mine[0] : void 0);
|
|
27637
|
+
if (slug === void 0) return yield* mine.length === 0 ? outcome("refused", "you own or administer no workspace", "create one with peer core create \"<name>\", or ask an admin of yours to invite.") : outcome("usage", `you may invite to ${mine.join(", ")}`, "choose one with --workspace <slug>.");
|
|
27638
|
+
const email = input.email.trim().toLowerCase();
|
|
27639
|
+
if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)) return yield* outcome("usage", `${input.email} is no email address`, "run peer core invite <email>.");
|
|
27640
|
+
const projects = (input.projects ?? []).map((p) => p.trim()).filter((p) => p !== "");
|
|
27641
|
+
const result = yield* workspaces.invite({
|
|
27642
|
+
workspace: slug,
|
|
27643
|
+
email,
|
|
27644
|
+
...input.admin === true ? { role: "admin" } : {},
|
|
27645
|
+
...projects.length > 0 ? { projects } : {}
|
|
27646
|
+
});
|
|
27647
|
+
const failed = result.delivery?.error;
|
|
27648
|
+
yield* io.say(`Invited: ${email} to ${slug}${projects.length > 0 ? ` (projects ${projects.join(", ")})` : ""}${input.admin === true ? " as admin" : ""}.`);
|
|
27649
|
+
yield* io.say(failed === void 0 || failed === null ? `The invitation is mailed; ${email} joins with its link, or with peer core join ${slug} once signed in.` : `The mail failed (${failed}); ${email} can still sign in and run peer core join ${slug}.`);
|
|
27650
|
+
return result;
|
|
27651
|
+
});
|
|
27652
|
+
/**
|
|
27653
|
+
* What the menu offers now: what waits for the person first (invitations, foundings, a domain
|
|
27654
|
+
* match), then sharing `folder` when it is a repository no workspace has, inviting where they may,
|
|
27655
|
+
* creating and joining, an editor, and done.
|
|
27656
|
+
*/
|
|
27657
|
+
const menuItems = (status, folder) => [
|
|
27658
|
+
...(status.foundings ?? []).filter((f) => f.expired !== true).map((f) => ({
|
|
27659
|
+
title: `Accept ${f.name} (${f.slug}), founded for you`,
|
|
27660
|
+
value: {
|
|
27661
|
+
kind: "founding",
|
|
27662
|
+
slug: f.slug,
|
|
27663
|
+
name: f.name
|
|
27664
|
+
}
|
|
27665
|
+
})),
|
|
27666
|
+
...status.joinable.map((offer) => ({
|
|
27667
|
+
title: offer.reason === "invite" ? `Accept the invitation to ${offer.name} (${offer.slug})` : `Join ${offer.name} (${offer.slug}), which your email domain admits`,
|
|
27668
|
+
value: {
|
|
27669
|
+
kind: offer.reason === "invite" ? "accept" : "domain",
|
|
27670
|
+
slug: offer.slug,
|
|
27671
|
+
name: offer.name
|
|
27672
|
+
}
|
|
27673
|
+
})),
|
|
27674
|
+
...folder === null || status.workspaces.length === 0 ? [] : [{
|
|
27675
|
+
title: `Share ${folder} with a workspace`,
|
|
27676
|
+
value: {
|
|
27677
|
+
kind: "share",
|
|
27678
|
+
folder
|
|
27679
|
+
}
|
|
27680
|
+
}],
|
|
27681
|
+
...status.workspaces.filter((w) => inviter(w.role)).map((w) => ({
|
|
27682
|
+
title: `Invite someone to ${w.name} (${w.slug})`,
|
|
27683
|
+
value: {
|
|
27684
|
+
kind: "invite",
|
|
27685
|
+
slug: w.slug
|
|
27686
|
+
}
|
|
27687
|
+
})),
|
|
27688
|
+
{
|
|
27689
|
+
title: "Create a workspace",
|
|
27690
|
+
value: { kind: "create" }
|
|
27691
|
+
},
|
|
27692
|
+
{
|
|
27693
|
+
title: "Join a workspace by its name",
|
|
27694
|
+
value: { kind: "join" }
|
|
27695
|
+
},
|
|
27696
|
+
{
|
|
27697
|
+
title: "Connect an editor",
|
|
27698
|
+
value: { kind: "editor" }
|
|
27699
|
+
},
|
|
27700
|
+
{
|
|
27701
|
+
title: "Done",
|
|
27702
|
+
value: { kind: "done" }
|
|
27703
|
+
}
|
|
27704
|
+
];
|
|
27705
|
+
/**
|
|
27706
|
+
* Asks what to do next until the person is done; a step that fails says why and the menu asks
|
|
27707
|
+
* again, so one refusal does not end it.
|
|
27708
|
+
*/
|
|
27709
|
+
const menu = (ask, steps, io) => gen$1(function* () {
|
|
27710
|
+
for (;;) {
|
|
27711
|
+
const status = yield* steps.status;
|
|
27712
|
+
const item = yield* ask.choose("What next?", menuItems(status, status.workspaces.length === 0 ? null : yield* steps.shareable));
|
|
27713
|
+
if (item === null || item.kind === "done") return;
|
|
27714
|
+
yield* gen$1(function* () {
|
|
27715
|
+
switch (item.kind) {
|
|
27716
|
+
case "accept":
|
|
27717
|
+
case "domain": return yield* steps.join(item.slug);
|
|
27718
|
+
case "founding": return yield* steps.founding(item.slug);
|
|
27719
|
+
case "share": return yield* steps.share(item.folder);
|
|
27720
|
+
case "editor": return yield* steps.editor;
|
|
27721
|
+
case "create": {
|
|
27722
|
+
const name = yield* ask.text("The workspace's name");
|
|
27723
|
+
if (name !== null && name.trim() !== "") yield* steps.create(name);
|
|
27724
|
+
return;
|
|
27725
|
+
}
|
|
27726
|
+
case "join": {
|
|
27727
|
+
const slug = yield* ask.text("The workspace's short name (as its invitation names it)");
|
|
27728
|
+
if (slug !== null && slug.trim() !== "") yield* steps.join(slug.trim());
|
|
27729
|
+
return;
|
|
27730
|
+
}
|
|
27731
|
+
case "invite": {
|
|
27732
|
+
const email = yield* ask.text(`Whom to invite to ${item.slug} (their email)`);
|
|
27733
|
+
if (email === null || email.trim() === "") return;
|
|
27734
|
+
const projects = status.workspaces.find((w) => w.slug === item.slug)?.projects.map((p) => p.project.id) ?? [];
|
|
27735
|
+
const chosen = projects.length === 0 ? [] : yield* ask.pick("Which projects (none chosen: all of them, now and later)", projects);
|
|
27736
|
+
if (chosen === null) return;
|
|
27737
|
+
return yield* steps.invite({
|
|
27738
|
+
email,
|
|
27739
|
+
workspace: item.slug,
|
|
27740
|
+
projects: chosen
|
|
27741
|
+
});
|
|
27742
|
+
}
|
|
27743
|
+
}
|
|
27744
|
+
}).pipe(catch_((error) => io.say(String(error.message).replace(/^peer core: /, ""))));
|
|
27745
|
+
}
|
|
27746
|
+
});
|
|
27747
|
+
//#endregion
|
|
27748
|
+
//#region src/cli/peerCoreShare.ts
|
|
27749
|
+
/**
|
|
27750
|
+
* `peer core share [folder]`: a folder on this computer becomes a project of a workspace, either a
|
|
27751
|
+
* new one or, when it is a clone of a project's repository, that project's checkout here. On a
|
|
27752
|
+
* terminal it asks which and confirms before writing; without one it acts only on what the command
|
|
27753
|
+
* line already says (`--workspace`, `--project`, `--yes`), as `vercel link` and `netlify link` do.
|
|
27754
|
+
*
|
|
27755
|
+
* @module cli/peerCoreShare
|
|
27756
|
+
*/
|
|
27757
|
+
/**
|
|
27758
|
+
* The folder to share: the one named, else the repository around where the command runs (as a
|
|
27759
|
+
* clone is shared whole), else that folder. Never the home directory, an ancestor of it or `/`:
|
|
27760
|
+
* a project that big is a mistake, not a choice.
|
|
27761
|
+
*/
|
|
27762
|
+
const shareFolder = (named, cwd) => gen$1(function* () {
|
|
27763
|
+
const folder = named !== void 0 ? realpathOrSelf$2(named) : (yield* repositoryRoot(cwd))?.root ?? realpathOrSelf$2(cwd);
|
|
27764
|
+
const home = realpathOrSelf$2(NodeOS.homedir());
|
|
27765
|
+
if (folder === NodePath.parse(folder).root || folder === home || home.startsWith(`${folder}${NodePath.sep}`)) return yield* outcome("refused", `${folder} is ${folder === home ? "your home directory" : "above your home directory"}, too much to share as one project`, "run peer core share inside the project's folder, or name it: peer core share <folder>.");
|
|
27766
|
+
return {
|
|
27767
|
+
folder,
|
|
27768
|
+
named: named !== void 0
|
|
27769
|
+
};
|
|
27770
|
+
});
|
|
27771
|
+
const projectOf$1 = (match) => `${match.workspace}/${match.project}`;
|
|
27772
|
+
const share = (input, ask, io, register) => gen$1(function* () {
|
|
27773
|
+
const state = yield* PeerState;
|
|
27774
|
+
const asking = ask.interactive && !input.yes;
|
|
27775
|
+
const { folder } = input;
|
|
27776
|
+
const bindTo = (project, repository) => bind({
|
|
27777
|
+
folder,
|
|
27778
|
+
project,
|
|
27779
|
+
...repository === void 0 ? {} : { repository }
|
|
27780
|
+
}, io);
|
|
27781
|
+
if (input.project !== void 0) {
|
|
27782
|
+
if (input.workspace !== void 0 || input.name !== void 0) return yield* outcome("usage", "--project uses an existing project; --workspace and --name are for a new one", "drop one of them.");
|
|
27783
|
+
return yield* bindTo(input.project, input.repository);
|
|
27784
|
+
}
|
|
27785
|
+
const place = yield* state.placeOf(folder, { bindByRemote: false });
|
|
27786
|
+
if (place !== null && place.workspace !== "@local") {
|
|
27787
|
+
yield* io.say(`Shared already: ${folder} is project ${place.project} of ${place.workspace}.`);
|
|
27788
|
+
return;
|
|
27789
|
+
}
|
|
27790
|
+
const { persisted } = yield* state.read;
|
|
27791
|
+
const slugs = persisted.workspaces.map((workspace) => workspace.slug).filter((slug) => slug !== PEER_LOCAL_WORKSPACE);
|
|
27792
|
+
if (slugs.length === 0) return yield* outcome("refused", "you are in no workspace", "sign in with peer core login <email> or join with your invitation link, then repeat the command.");
|
|
27793
|
+
const asked = input.workspace;
|
|
27794
|
+
if (asked !== void 0 && !slugs.includes(asked)) return yield* outcome("refused", `you are in no workspace ${asked}`, `choose one of ${slugs.join(", ")} with --workspace.`);
|
|
27795
|
+
const checkout = yield* repositoryRoot(folder);
|
|
27796
|
+
const remote = checkout === null ? null : yield* promise(() => remoteOf(checkout.remoteRoot));
|
|
27797
|
+
const matches = remote === null ? [] : matchRepositories(remote, persisted.workspaces.map((workspace) => workspace.manifest));
|
|
27798
|
+
const cloned = new Set(matches.map((match) => match.workspace));
|
|
27799
|
+
const fresh = slugs.filter((slug) => !cloned.has(slug));
|
|
27800
|
+
let choice;
|
|
27801
|
+
if (matches.length > 0 && (asked === void 0 || cloned.has(asked))) {
|
|
27802
|
+
const offered = asked === void 0 ? matches : matches.filter((m) => m.workspace === asked);
|
|
27803
|
+
const several = new Set(offered.map(projectOf$1)).size < offered.length;
|
|
27804
|
+
const title = (match) => several ? `${projectOf$1(match)} (repository ${match.repository})` : projectOf$1(match);
|
|
27805
|
+
const what = `${folder} is a clone of ${offered.map(title).join(", ")}`;
|
|
27806
|
+
if (asking) {
|
|
27807
|
+
yield* io.say(`${what}.`);
|
|
27808
|
+
choice = yield* ask.choose("Use it as", [...offered.map((match) => ({
|
|
27809
|
+
title: `the checkout of ${title(match)}`,
|
|
27810
|
+
value: {
|
|
27811
|
+
kind: "bind",
|
|
27812
|
+
match
|
|
27813
|
+
}
|
|
27814
|
+
})), ...(asked === void 0 ? fresh : []).map((workspace) => ({
|
|
27815
|
+
title: `a new project of ${workspace}`,
|
|
27816
|
+
value: {
|
|
27817
|
+
kind: "new",
|
|
27818
|
+
workspace
|
|
27819
|
+
}
|
|
27820
|
+
}))]);
|
|
27821
|
+
} else if (offered.length === 1 && input.yes) choice = {
|
|
27822
|
+
kind: "bind",
|
|
27823
|
+
match: offered[0]
|
|
27824
|
+
};
|
|
27825
|
+
else return yield* outcome("refused", `${what}, and sharing it again would make a second project of one repository`, offered.length === 1 ? `use it as that project's checkout with peer core share --yes${input.named ? ` ${folder}` : ""}.` : `choose one with peer core share --project <workspace/project>${several ? " --repository <id>" : ""}.`);
|
|
27826
|
+
} else {
|
|
27827
|
+
const workspace = asked ?? (slugs.length === 1 ? slugs[0] : asking ? yield* ask.choose("Share it with", slugs.map((slug) => ({
|
|
27828
|
+
title: slug,
|
|
27829
|
+
value: slug
|
|
27830
|
+
}))) : null);
|
|
27831
|
+
if (workspace === null && !asking) return yield* outcome("usage", `you are in ${slugs.length} workspaces: ${slugs.join(", ")}`, "choose one with --workspace <slug>.");
|
|
27832
|
+
choice = workspace === null ? null : {
|
|
27833
|
+
kind: "new",
|
|
27834
|
+
workspace
|
|
27835
|
+
};
|
|
27836
|
+
}
|
|
27837
|
+
if (choice === null) {
|
|
27838
|
+
yield* io.say("Nothing changed.");
|
|
27839
|
+
return;
|
|
27840
|
+
}
|
|
27841
|
+
if (choice.kind === "bind") {
|
|
27842
|
+
const { match } = choice;
|
|
27843
|
+
const recorded = persisted.localCheckouts?.[`${match.workspace}/${match.project}/${match.repository}`];
|
|
27844
|
+
if (asking && recorded !== void 0 && realpathOrSelf$2(recorded) !== folder && !(yield* ask.confirm(`${projectOf$1(match)}'s checkout here is ${recorded}. Use ${folder} instead?`, false))) {
|
|
27845
|
+
yield* io.say("Nothing changed.");
|
|
27846
|
+
return;
|
|
27847
|
+
}
|
|
27848
|
+
return yield* bindTo(projectOf$1(match), match.repository);
|
|
27849
|
+
}
|
|
27850
|
+
const name = input.name?.trim() || NodePath.basename(folder);
|
|
27851
|
+
if (asking) {
|
|
27852
|
+
if (!(yield* ask.confirm(`Share ${folder} with ${choice.workspace} as project "${name}"? Everyone in ${choice.workspace} sees it and can clone it.`, true))) {
|
|
27853
|
+
yield* io.say("Nothing changed.");
|
|
27854
|
+
return;
|
|
27855
|
+
}
|
|
27856
|
+
} else if (!input.yes && !input.named) return yield* outcome("refused", `nothing confirms sharing ${folder} without a terminal to ask on`, `name the folder (peer core share ${folder}) or add --yes.`);
|
|
27857
|
+
const projectId = yield* register(folder, input.name);
|
|
27858
|
+
yield* (yield* PeerWorkspaces).shareProject({
|
|
27859
|
+
workspace: choice.workspace,
|
|
27860
|
+
projectId: ProjectId.make(projectId),
|
|
27861
|
+
...input.name?.trim() ? { name: input.name.trim() } : {}
|
|
27862
|
+
});
|
|
27863
|
+
const shared = yield* state.placeOf(folder, { bindByRemote: false });
|
|
27864
|
+
yield* io.say(shared === null ? `Shared ${folder} with ${choice.workspace}.` : `Shared ${folder} with ${choice.workspace} as project ${shared.project}.`);
|
|
27865
|
+
});
|
|
27866
|
+
//#endregion
|
|
27614
27867
|
//#region src/cli/peerCoreTasks.ts
|
|
27615
27868
|
/**
|
|
27616
27869
|
* `peer core tasks` and `peer core take`: a person's tasks and taking one nobody owns, from a
|
|
@@ -27947,19 +28200,118 @@ const terminalIo = {
|
|
|
27947
28200
|
};
|
|
27948
28201
|
const hubFlag = String$1("hub").pipe(withDescription$1("Another Peer Hub than the current one."), optional);
|
|
27949
28202
|
const codeFlag = String$1("code").pipe(withDescription$1("The code the Hub mailed (else it is asked for)."), optional);
|
|
28203
|
+
const isTerminal = () => process.stdin.isTTY === true && process.stdout.isTTY === true;
|
|
28204
|
+
const shareAsk = {
|
|
28205
|
+
interactive: true,
|
|
28206
|
+
confirm: (message, initial) => run$3(Confirm({
|
|
28207
|
+
message,
|
|
28208
|
+
initial
|
|
28209
|
+
})).pipe(orElseSucceed(() => false)),
|
|
28210
|
+
choose: (message, choices) => run$3(Select({
|
|
28211
|
+
message,
|
|
28212
|
+
choices: [...choices]
|
|
28213
|
+
})).pipe(orElseSucceed(() => null))
|
|
28214
|
+
};
|
|
28215
|
+
const menuAsk = {
|
|
28216
|
+
choose: shareAsk.choose,
|
|
28217
|
+
text: (message) => run$3(String$4({ message })).pipe(orElseSucceed(() => null)),
|
|
28218
|
+
pick: (message, choices) => run$3(MultiSelect({
|
|
28219
|
+
message,
|
|
28220
|
+
choices: choices.map((title) => ({
|
|
28221
|
+
title,
|
|
28222
|
+
value: title
|
|
28223
|
+
}))
|
|
28224
|
+
})).pipe(orElseSucceed(() => null))
|
|
28225
|
+
};
|
|
28226
|
+
/** A Hub's refusal as the CLI prints it; other failures unchanged. */
|
|
28227
|
+
const hubFailure = (self) => mapError(self, (error) => typeof error === "object" && error !== null && error._tag === "PeerHubError" ? fail(`peer core: ${error.detail}`) : error);
|
|
28228
|
+
/** The menu after signing in, each step the command of the same name. */
|
|
28229
|
+
const runMenu = (stateDir) => gen$1(function* () {
|
|
28230
|
+
const workspaces = yield* PeerWorkspaces;
|
|
28231
|
+
const state = yield* PeerState;
|
|
28232
|
+
const status = workspaces.sync.pipe(hubFailure);
|
|
28233
|
+
yield* menu(menuAsk, {
|
|
28234
|
+
status,
|
|
28235
|
+
shareable: gen$1(function* () {
|
|
28236
|
+
const checkout = yield* repositoryRoot(process.cwd());
|
|
28237
|
+
if (checkout === null) return null;
|
|
28238
|
+
const place = yield* state.placeOf(checkout.root, { bindByRemote: false });
|
|
28239
|
+
return place === null || place.workspace === "@local" ? checkout.root : null;
|
|
28240
|
+
}),
|
|
28241
|
+
join: (slug) => join({ target: slug }, terminalIo).pipe(flatMap$1((joined) => sayNextStep(joined, terminalIo)), hubFailure),
|
|
28242
|
+
founding: (slug) => workspaces.acceptFounding({ slug }).pipe(andThen(log(`Accepted: ${slug}. You are its owner.`)), hubFailure),
|
|
28243
|
+
create: (name) => create({ name }, terminalIo).pipe(asVoid, hubFailure),
|
|
28244
|
+
share: (folder) => share({
|
|
28245
|
+
folder,
|
|
28246
|
+
named: true,
|
|
28247
|
+
yes: false
|
|
28248
|
+
}, shareAsk, terminalIo, registerIn(stateDir)).pipe(hubFailure),
|
|
28249
|
+
invite: (input) => status.pipe(flatMap$1((now) => invite(input, now, terminalIo)), asVoid, hubFailure),
|
|
28250
|
+
editor: gen$1(function* () {
|
|
28251
|
+
const editor = yield* shareAsk.choose("Connect which editor?", editorChoices(yield* detectedEditors));
|
|
28252
|
+
if (editor !== null) yield* connectEditor(editor, stateDir, terminalIo);
|
|
28253
|
+
}).pipe(hubFailure)
|
|
28254
|
+
}, terminalIo);
|
|
28255
|
+
});
|
|
28256
|
+
const registerIn = (stateDir) => (path, name) => tryPromise({
|
|
28257
|
+
try: () => registerFolder(stateDir, path, name),
|
|
28258
|
+
catch: (cause) => fail(`peer core: ${messageOf(cause)}`)
|
|
28259
|
+
}).pipe(map$3(({ project }) => project.id));
|
|
27950
28260
|
const loginCommand = make$62("login", {
|
|
27951
28261
|
...authLocationFlags,
|
|
27952
|
-
email: String$2("email").pipe(withDescription$2("Your work email address.")),
|
|
28262
|
+
email: String$2("email").pipe(withDescription$2("Your work email address (none: the menu, for whoever is signed in already)."), optional$1),
|
|
27953
28263
|
code: codeFlag,
|
|
27954
28264
|
hub: hubFlag
|
|
27955
|
-
}).pipe(withDescription("Sign this computer's Peer in to its Peer Hub."), withHandler((flags) => gen$1(function* () {
|
|
28265
|
+
}).pipe(withDescription("Sign this computer's Peer in to its Peer Hub; on a terminal, then a menu: create or join a workspace, share, invite."), withHandler((flags) => gen$1(function* () {
|
|
27956
28266
|
const config = yield* resolveConfig(flags);
|
|
27957
28267
|
yield* refuseWhileRunning(config.stateDir);
|
|
27958
|
-
yield*
|
|
27959
|
-
|
|
27960
|
-
|
|
27961
|
-
|
|
27962
|
-
|
|
28268
|
+
yield* gen$1(function* () {
|
|
28269
|
+
const signedIn = (yield* (yield* PeerState).read).persisted.email;
|
|
28270
|
+
const email = getOrUndefined(flags.email)?.trim();
|
|
28271
|
+
if (email === void 0 || signedIn !== null && signedIn === email) {
|
|
28272
|
+
if (signedIn === null) return yield* fail("peer core: nobody is signed in; run peer core login <email>.");
|
|
28273
|
+
if (!isTerminal()) return yield* log(`Signed in: ${signedIn}`);
|
|
28274
|
+
yield* log(`Signed in: ${signedIn}`);
|
|
28275
|
+
return yield* runMenu(config.stateDir);
|
|
28276
|
+
}
|
|
28277
|
+
yield* login({
|
|
28278
|
+
email,
|
|
28279
|
+
...isSome(flags.code) ? { code: flags.code.value } : {},
|
|
28280
|
+
...isSome(flags.hub) ? { hub: flags.hub.value } : {}
|
|
28281
|
+
}, terminalIo);
|
|
28282
|
+
if (isTerminal()) yield* runMenu(config.stateDir);
|
|
28283
|
+
}).pipe(hubFailure, provide(layer$107.pipe(provideMerge(oneShotLayer(config)))));
|
|
28284
|
+
})));
|
|
28285
|
+
const createCommand = make$62("create", {
|
|
28286
|
+
...authLocationFlags,
|
|
28287
|
+
name: String$2("name").pipe(withDescription$2("The workspace's name.")),
|
|
28288
|
+
slug: String$1("slug").pipe(withDescription$1("Its short name in links and commands (default: made of the name)."), optional)
|
|
28289
|
+
}).pipe(withDescription("Create a workspace whose owner you are."), withHandler((flags) => gen$1(function* () {
|
|
28290
|
+
const config = yield* resolveConfig(flags);
|
|
28291
|
+
yield* refuseWhileRunning(config.stateDir);
|
|
28292
|
+
yield* create({
|
|
28293
|
+
name: flags.name,
|
|
28294
|
+
...isSome(flags.slug) ? { slug: flags.slug.value } : {}
|
|
28295
|
+
}, terminalIo).pipe(hubFailure, provide(oneShotLayer(config)));
|
|
28296
|
+
})));
|
|
28297
|
+
const inviteCommand = make$62("invite", {
|
|
28298
|
+
...authLocationFlags,
|
|
28299
|
+
email: String$2("email").pipe(withDescription$2("Whom to invite.")),
|
|
28300
|
+
workspace: String$1("workspace").pipe(withDescription$1("The workspace (needed when you may invite to several)."), optional),
|
|
28301
|
+
project: String$1("project").pipe(withDescription$1("A project they will be on, and no other (repeat it for more)."), atLeast(0)),
|
|
28302
|
+
admin: Boolean$1("admin").pipe(withDescription$1("Invite them as an admin."), withDefault(false))
|
|
28303
|
+
}).pipe(withDescription("Mail an invitation to a workspace you own or administer."), withHandler((flags) => gen$1(function* () {
|
|
28304
|
+
const config = yield* resolveConfig(flags);
|
|
28305
|
+
yield* refuseWhileRunning(config.stateDir);
|
|
28306
|
+
yield* gen$1(function* () {
|
|
28307
|
+
const workspaces = yield* PeerWorkspaces;
|
|
28308
|
+
yield* invite({
|
|
28309
|
+
email: flags.email,
|
|
28310
|
+
admin: flags.admin,
|
|
28311
|
+
projects: flags.project,
|
|
28312
|
+
...isSome(flags.workspace) ? { workspace: flags.workspace.value } : {}
|
|
28313
|
+
}, yield* workspaces.sync, terminalIo);
|
|
28314
|
+
}).pipe(hubFailure, provide(oneShotLayer(config)));
|
|
27963
28315
|
})));
|
|
27964
28316
|
const joinCommand = make$62("join", {
|
|
27965
28317
|
...authLocationFlags,
|
|
@@ -28045,44 +28397,51 @@ const logoutCommand = make$62("logout", { ...authLocationFlags }).pipe(withDescr
|
|
|
28045
28397
|
})));
|
|
28046
28398
|
const shareCommand = make$62("share", {
|
|
28047
28399
|
...authLocationFlags,
|
|
28048
|
-
folder: String$2("folder").pipe(withDescription$2("The project's folder.")),
|
|
28049
|
-
workspace: String$1("workspace").pipe(withDescription$1("The workspace to share it with (
|
|
28050
|
-
name: String$1("name").pipe(withDescription$1("The project's name."), optional)
|
|
28051
|
-
|
|
28400
|
+
folder: String$2("folder").pipe(withDescription$2("The project's folder (default: the repository you are in, or this folder)."), optional$1),
|
|
28401
|
+
workspace: String$1("workspace").pipe(withDescription$1("The workspace to share it with (asked on a terminal when you are in several)."), optional),
|
|
28402
|
+
name: String$1("name").pipe(withDescription$1("The new project's name."), optional),
|
|
28403
|
+
project: String$1("project").pipe(withDescription$1("Use the folder as this existing project's checkout, as <workspace>/<project>."), optional),
|
|
28404
|
+
repository: String$1("repository").pipe(withDescription$1("With --project: the project's repository, when the clone's origin does not say which."), optional),
|
|
28405
|
+
yes: Boolean$1("yes").pipe(withAlias("y"), withDescription$1("Do it without asking (needed without a terminal unless the folder is named)."), withDefault(false))
|
|
28406
|
+
}).pipe(withDescription("Share a folder with your Peer workspace, or make a clone of a project's repository its checkout here."), withHandler((flags) => gen$1(function* () {
|
|
28052
28407
|
const config = yield* resolveConfig(flags);
|
|
28053
|
-
const folder =
|
|
28054
|
-
|
|
28055
|
-
|
|
28056
|
-
|
|
28057
|
-
|
|
28058
|
-
|
|
28059
|
-
|
|
28060
|
-
|
|
28061
|
-
if (
|
|
28062
|
-
if (
|
|
28063
|
-
|
|
28064
|
-
|
|
28065
|
-
|
|
28408
|
+
const { folder, named } = yield* shareFolder(getOrUndefined(flags.folder), process.cwd());
|
|
28409
|
+
const interactive = isTerminal();
|
|
28410
|
+
const ask = {
|
|
28411
|
+
...shareAsk,
|
|
28412
|
+
interactive
|
|
28413
|
+
};
|
|
28414
|
+
const owner = yield* ownerOf(config.stateDir);
|
|
28415
|
+
if (owner !== null) {
|
|
28416
|
+
if (isSome(flags.project)) return yield* fail(`peer core: Peer is running (${describeOwner(owner)}), and it keeps the checkouts in memory: ${owner.kind === "peer-core" ? "stop Peer Core with peer core stop first" : "choose the folder in the app's project settings"}.`);
|
|
28417
|
+
if (!interactive && !named && !flags.yes) return yield* outcome("refused", `nothing confirms sharing ${folder} without a terminal to ask on`, `name the folder (peer core share ${folder}) or add --yes.`);
|
|
28418
|
+
let workspace = getOrUndefined(flags.workspace);
|
|
28419
|
+
if (interactive && !flags.yes) {
|
|
28420
|
+
const slugs = yield* gen$1(function* () {
|
|
28421
|
+
return (yield* (yield* PeerState).workspaces).map((w) => w.slug).filter((slug) => slug !== PEER_LOCAL_WORKSPACE);
|
|
28422
|
+
}).pipe(provide(stateLayer(config)));
|
|
28423
|
+
if (workspace === void 0 && slugs.length > 1) {
|
|
28424
|
+
const chosen = yield* ask.choose("Share it with", slugs.map((slug) => ({
|
|
28425
|
+
title: slug,
|
|
28426
|
+
value: slug
|
|
28427
|
+
})));
|
|
28428
|
+
if (chosen === null) return yield* log("Nothing changed.");
|
|
28429
|
+
workspace = chosen;
|
|
28430
|
+
}
|
|
28431
|
+
const target = workspace ?? slugs[0];
|
|
28432
|
+
if (target !== void 0 && !(yield* ask.confirm(`Share ${folder} with ${target}? Everyone in ${target} sees it.`, true))) return yield* log("Nothing changed.");
|
|
28066
28433
|
}
|
|
28067
|
-
|
|
28068
|
-
|
|
28069
|
-
|
|
28070
|
-
|
|
28071
|
-
|
|
28072
|
-
|
|
28073
|
-
|
|
28074
|
-
|
|
28075
|
-
|
|
28076
|
-
}
|
|
28077
|
-
|
|
28078
|
-
yield* workspaces.shareProject({
|
|
28079
|
-
workspace,
|
|
28080
|
-
projectId: ProjectId.make(project.id),
|
|
28081
|
-
...name === void 0 || name === "" ? {} : { name }
|
|
28082
|
-
});
|
|
28083
|
-
const shared = yield* state.placeOf(folder);
|
|
28084
|
-
yield* log(shared === null ? `Shared ${folder} with ${workspace}.` : `Shared ${folder} with ${workspace} as project ${shared.project}.`);
|
|
28085
|
-
}).pipe(catchTags({ PeerHubError: (error) => fail$2(fail(`peer core: ${error.detail}`)) }), provide(oneShotLayer(config)));
|
|
28434
|
+
return yield* forward(config.stateDir, "share", [...workspace === void 0 ? [] : ["--workspace", workspace], ...isSome(flags.name) ? ["--name", flags.name.value] : []], folder);
|
|
28435
|
+
}
|
|
28436
|
+
yield* share({
|
|
28437
|
+
folder,
|
|
28438
|
+
named,
|
|
28439
|
+
yes: flags.yes,
|
|
28440
|
+
...isSome(flags.workspace) ? { workspace: flags.workspace.value } : {},
|
|
28441
|
+
...isSome(flags.name) ? { name: flags.name.value } : {},
|
|
28442
|
+
...isSome(flags.project) ? { project: flags.project.value } : {},
|
|
28443
|
+
...isSome(flags.repository) ? { repository: flags.repository.value } : {}
|
|
28444
|
+
}, ask, terminalIo, registerIn(config.stateDir)).pipe(catchTags({ PeerHubError: (error) => fail$2(fail(`peer core: ${error.detail}`)) }), provide(oneShotLayer(config)));
|
|
28086
28445
|
})));
|
|
28087
28446
|
const CLIENT_IDS = MCP_CLIENTS.map((client) => client.id).join(", ");
|
|
28088
28447
|
const editorCommand = (kind) => make$62(kind, {
|
|
@@ -28180,6 +28539,8 @@ const makePeerCommand = (name) => make$62(name).pipe(withDescription(name === "p
|
|
|
28180
28539
|
statusCommand,
|
|
28181
28540
|
loginCommand,
|
|
28182
28541
|
joinCommand,
|
|
28542
|
+
createCommand,
|
|
28543
|
+
inviteCommand,
|
|
28183
28544
|
logoutCommand,
|
|
28184
28545
|
shareCommand,
|
|
28185
28546
|
bindCommand,
|
|
@@ -54517,4 +54878,4 @@ function runCli() {
|
|
|
54517
54878
|
//#endregion
|
|
54518
54879
|
export { runCli };
|
|
54519
54880
|
|
|
54520
|
-
//# sourceMappingURL=binCli-
|
|
54881
|
+
//# sourceMappingURL=binCli-CJdI8Zct.mjs.map
|