agent-transport-system 0.7.15 → 0.7.17
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/dist/ats-dev.js +2 -2
- package/dist/ats.js +87 -39
- package/dist/ats.js.map +1 -1
- package/dist/{daemon-runtime-lease-C1cET4lj.js → daemon-runtime-lease-b5ZWtWKt.js} +1 -1
- package/dist/{lock-BbSDV7cL.js → lock-_FpCKRtr.js} +36 -34
- package/dist/lock-_FpCKRtr.js.map +1 -0
- package/dist/{runtime-config-CudFeMaG.js → runtime-config-Bm9Cq3yW.js} +2 -2
- package/dist/{runtime-config-CudFeMaG.js.map → runtime-config-Bm9Cq3yW.js.map} +1 -1
- package/package.json +1 -1
- package/dist/lock-BbSDV7cL.js.map +0 -1
package/dist/ats-dev.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import "./lock-
|
|
4
|
-
import { v as DEV_LOCAL_GATEWAY_BASE_URL } from "./runtime-config-
|
|
3
|
+
import "./lock-_FpCKRtr.js";
|
|
4
|
+
import { v as DEV_LOCAL_GATEWAY_BASE_URL } from "./runtime-config-Bm9Cq3yW.js";
|
|
5
5
|
|
|
6
6
|
//#region src/ats-dev.ts
|
|
7
7
|
const LOCAL_GATEWAY_URL = DEV_LOCAL_GATEWAY_BASE_URL;
|
package/dist/ats.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { $ as gatewayErrorEnvelopeSchema, $n as daemonHubDeliverDispatchRequestSchema, $t as spaceDispatchTraceResponseSchema, A as createSpaceBodySchema, An as DISPATCH_ACTIVITY_FAILED_PURPOSE, Ar as sanitizeSignalTextPreview, At as patchSpaceContractResponseSchema, B as daemonRuntimeLeaseSchema, Bn as SPACE_UPDATES_MAX_LIMIT, Bt as projectObservabilityWakeCorrelation, C as atsRequestContextSchema, Cn as AGENT_REPLY_PREVIEW_END_PURPOSE, Cr as resolveBuiltinAgentControllerConversationKind, Ct as normalizeListSignalsReadQuerySemantics, D as claimExecutionDiagnosticsQuerySchema, Dn as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, Dt as observabilityWakeTraceSelectorSchema, E as catchupResponseSchema, En as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Er as resolveSpaceMentionLabels, Et as notifyAgentProfileRouteCatalogChangedResponseSchema, F as createSpaceThreadResponseSchema, Fn as MESSAGE_MENTION_TYPE_VALUES, Ft as postSpaceMembersResponseSchema, G as entryBriefSchema, Gn as atsdTaskResultPayloadSchema, Gt as resolveSpaceDispatchTraceRootCause, H as dispatchBriefSchema, Hn as atsSpaceEgressActionSchema, Ht as providerDispatchRuntimeContextSchema, I as createStartSessionBodySchema, In as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, It as postSpaceThreadSignalBodySchema, J as formatLocalComponentsSummaryDescription, Jn as canonicalizeAgentControllerRef, Jt as serverErrorFrameSchema, K as forgetComputerResponseSchema, Kn as buildAgentControllerConversationRef, Kt as resolveStartHandoffBodySchema, L as currentDeviceTargetResponseSchema, Ln as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, Lt as postSpaceThreadSignalResponseSchema, M as createSpaceDiagnosticReportResponseSchema, Mn as LEGACY_RUNTIME_DISPATCH_POLICY, Mt as postNormalMessageBodySchema, N as createSpaceResponseSchema, Nn as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, Nt as postNormalMessageResponseSchema, O as claimExecutionDiagnosticsResponseSchema, On as DAEMON_HUB_SCHEMA_VERSION, Ot as patchProfileSpaceHistoryStatusResponseSchema, P as createSpaceThreadBodySchema, Pn as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, Pt as postSpaceMembersBodySchema, Q as gatewayErrorCodeSchema, Qn as createDaemonRouteObservationSummary, Qt as spaceCreatorSchema, R as currentLocalRuntimeReplyReadinessResponseSchema, Rn as SPACE_MENTION_REJECT_NOTICE_PURPOSE, Rt as prepareSessionResponseSchema, S as atsProfileIdSchema, Sn as AGENT_REPLYING_PURPOSE, Sr as profileWorkspaceModeSchema, St as localRuntimesResponseSchema, T as atsdControlPlaneResponseSchema, Tn as ATSD_TASK_RESULT_SCHEMA_VERSION, Tr as resolveSingleSpaceMentionLabels, Tt as notifyAgentProfileRouteCatalogChangedBodySchema, U as ensureAgentProfilePrimaryBindingBodySchema, Un as atsdTaskResultEnvelopeWriteSchema, Ut as querySpaceDeletionTombstonesResponseSchema, V as deleteSpaceResponseSchema, Vn as atsRuntimeProfileIdSchema, Vt as projectSpaceDispatchTraceFinalVisibleOutcome, W as ensureAgentProfilePrimaryBindingResponseSchema, Wn as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, Wt as removeSpaceMembersResponseSchema, X as formatLocalSetupActionDescription, Xn as collectCanonicalMentionTextFragments, Xt as setLocalRuntimeDisplayNameBodySchema, Y as formatLocalComponentsSummaryLabel, Yn as canonicalizeBuiltinAgentControllerRef, Yt as setCurrentDeviceTargetBodySchema, Z as formatLocalSetupActionLabel, Zn as conversationExecutionStateSchema, Zt as signalEnvelopeSchema, _ as ATSD_CONTROL_PLANE_SCHEMA_VERSION, _n as writeCurrentDeviceObservedMetadataBodySchema, _r as normalizeMessageEnvelope, _t as listProfileSpaceHistoryResponseSchema, a as runWithHeldLock, an as startSessionProgressSchema, ar as daemonHubHeartbeatRequestSchema, at as getPrepareReadinessResponseSchema, b as agentExecutionReadinessRouteParamsSchema, bn as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, br as parseAgentControllerRef$1, bt as listSpaceThreadsResponseSchema, c as LEGACY_ATS_CLI_CONTEXT_ENV_KEY, cn as startSessionSpaceChoiceResponseSchema, cr as daemonHubRegisterSessionResponseSchema, ct as getSpaceDispatchResultResponseSchema, d as resolveCliContext, dn as submitRuntimeAgentControllerReportsBodySchema, dr as daemonServiceContractSchema, dt as getSpaceUpdatesResponseSchema, en as spaceMembersSnapshotSchema, er as daemonHubDeliveryExecutionIdentitySchema, et as getAgentExecutionReadinessBatchBodySchema, f as resolveCliContextId, fn as submitRuntimeAgentControllerReportsResponseSchema, fr as daemonStreamFrameSchema, ft as getSpaceWakeProgressResponseSchema, g as resolveMappedPublicAgentFailureReason, gn as upsertSpaceDeletionTombstoneResponseSchema, gr as normalizeKnownBuiltinAgentControllerId, gt as leaveSpaceResponseSchema, h as resolveBuiltinAgentControllerBrand, hn as upsertProfileSpaceHistoryResponseSchema, hr as normalizeBuiltinAgentControllerId, ht as installedLocalComponentsSnapshotSchema, i as releaseLock, in as startProfileReadinessSummarySchema, ir as daemonHubDispatchRuntimeEvidenceRequestSchema, it as getPrepareReadinessQuerySchema, j as createSpaceDiagnosticReportBodySchema, jn as DISPATCH_ACTIVITY_RETRYING_PURPOSE, jt as patchStartSessionBodySchema, k as continuitySchema, kn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, kr as runtimeCoordinatorExecutionTokenEnvelopeSchema, kt as patchSpaceContractBodySchema, l as listCliContextStates, ln as startSessionWithTokenResponseSchema, lr as daemonHubRouteCatalogChangedFramePayloadSchema, lt as getSpaceStatusResponseSchema, m as CODEX_UPGRADE_REQUIRED_REASON, mn as submitRuntimeRegistrationResponseSchema, mr as getSpaceMessageAddressingRelationSupportForTargetKind, mt as incomingServerMessageSchema, n as isAtsLockError, nn as spaceViewerMembershipResponseSchema, nr as daemonHubDispatchPreviewEndRequestSchema, nt as getAgentExecutionReadinessResponseSchema, o as tryCleanupStaleLock, on as startSessionResponseSchema, or as daemonHubHeartbeatResponseSchema, ot as getSpaceContractResponseSchema, p as writeCliContextState, pn as submitRuntimeRegistrationBodySchema, pr as formatCanonicalMentionLiteral, pt as getSpaceWakeTraceWaterfallResponseSchema, q as forgetCurrentComputerResponseSchema, qn as buildAgentControllerRoutingKey, qt as resolveStartHandoffResponseSchema, r as readLockMeta, rn as startDeviceProjectionSchema, rr as daemonHubDispatchPreviewRequestSchema, rt as getAgentProfilePrimaryBindingResponseSchema, s as ATS_CLI_CONTEXT_ENV_KEY, sn as startSessionSpaceChoiceBodySchema, sr as daemonHubRegisterSessionRequestSchema, st as getSpaceDispatchLookupResponseSchema, t as acquireLock, tn as spaceMetaSchema, tr as daemonHubDispatchLifecycleRequestSchema, tt as getAgentExecutionReadinessBatchResponseSchema, u as readCliContextState, un as structuredGuidePayloadFromInputSchema, ur as daemonHubSubmitTaskResultRequestSchema, ut as getSpaceThreadResponseSchema, v as LOCAL_COMPONENTS_SCHEMA_VERSION, vn as writeCurrentDeviceObservedMetadataResponseSchema, vr as normalizeOptionalWorkingDirectory, vt as listSpaceThreadEventsResponseSchema, w as atsdControlPlaneRequestSchema, wn as AGENT_REPLY_PREVIEW_PURPOSE, wr as resolveMessageEnvelopeTargetField, wt as normalizeSpaceCursorPatch, x as agentProfileBindingRouteParamsSchema, xn as AGENT_REPLYING_END_PURPOSE, xr as parseOptionalClientMessageId, xt as localRuntimesQuerySchema, y as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, yn as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, yr as normalizeSpacePasswordText, yt as listSpaceThreadSignalsResponseSchema, z as daemonRouteObservationResponseSchema, zn as SPACE_PASSWORD_MIN_LENGTH, zt as prepareSessionStreamServerFrameSchema } from "./lock-
|
|
3
|
+
import { $ as gatewayErrorEnvelopeSchema, $n as daemonHubDeliverDispatchRequestSchema, $t as spaceDispatchTraceResponseSchema, A as createSpaceBodySchema, An as DISPATCH_ACTIVITY_FAILED_PURPOSE, Ar as sanitizeSignalTextPreview, At as patchSpaceContractResponseSchema, B as daemonRuntimeLeaseSchema, Bn as SPACE_UPDATES_MAX_LIMIT, Bt as projectObservabilityWakeCorrelation, C as atsRequestContextSchema, Cn as AGENT_REPLY_PREVIEW_END_PURPOSE, Cr as resolveBuiltinAgentControllerConversationKind, Ct as normalizeListSignalsReadQuerySemantics, D as claimExecutionDiagnosticsQuerySchema, Dn as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, Dt as observabilityWakeTraceSelectorSchema, E as catchupResponseSchema, En as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Er as resolveSpaceMentionLabels, Et as notifyAgentProfileRouteCatalogChangedResponseSchema, F as createSpaceThreadResponseSchema, Fn as MESSAGE_MENTION_TYPE_VALUES, Ft as postSpaceMembersResponseSchema, G as entryBriefSchema, Gn as atsdTaskResultPayloadSchema, Gt as resolveSpaceDispatchTraceRootCause, H as dispatchBriefSchema, Hn as atsSpaceEgressActionSchema, Ht as providerDispatchRuntimeContextSchema, I as createStartSessionBodySchema, In as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, It as postSpaceThreadSignalBodySchema, J as formatLocalComponentsSummaryDescription, Jn as canonicalizeAgentControllerRef, Jt as serverErrorFrameSchema, K as forgetComputerResponseSchema, Kn as buildAgentControllerConversationRef, Kt as resolveStartHandoffBodySchema, L as currentDeviceTargetResponseSchema, Ln as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, Lt as postSpaceThreadSignalResponseSchema, M as createSpaceDiagnosticReportResponseSchema, Mn as LEGACY_RUNTIME_DISPATCH_POLICY, Mt as postNormalMessageBodySchema, N as createSpaceResponseSchema, Nn as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, Nt as postNormalMessageResponseSchema, O as claimExecutionDiagnosticsResponseSchema, On as DAEMON_HUB_SCHEMA_VERSION, Ot as patchProfileSpaceHistoryStatusResponseSchema, P as createSpaceThreadBodySchema, Pn as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, Pt as postSpaceMembersBodySchema, Q as gatewayErrorCodeSchema, Qn as createDaemonRouteObservationSummary, Qt as spaceCreatorSchema, R as currentLocalRuntimeReplyReadinessResponseSchema, Rn as SPACE_MENTION_REJECT_NOTICE_PURPOSE, Rt as prepareSessionResponseSchema, S as atsProfileIdSchema, Sn as AGENT_REPLYING_PURPOSE, Sr as profileWorkspaceModeSchema, St as localRuntimesResponseSchema, T as atsdControlPlaneResponseSchema, Tn as ATSD_TASK_RESULT_SCHEMA_VERSION, Tr as resolveSingleSpaceMentionLabels, Tt as notifyAgentProfileRouteCatalogChangedBodySchema, U as ensureAgentProfilePrimaryBindingBodySchema, Un as atsdTaskResultEnvelopeWriteSchema, Ut as querySpaceDeletionTombstonesResponseSchema, V as deleteSpaceResponseSchema, Vn as atsRuntimeProfileIdSchema, Vt as projectSpaceDispatchTraceFinalVisibleOutcome, W as ensureAgentProfilePrimaryBindingResponseSchema, Wn as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, Wt as removeSpaceMembersResponseSchema, X as formatLocalSetupActionDescription, Xn as collectCanonicalMentionTextFragments, Xt as setLocalRuntimeDisplayNameBodySchema, Y as formatLocalComponentsSummaryLabel, Yn as canonicalizeBuiltinAgentControllerRef, Yt as setCurrentDeviceTargetBodySchema, Z as formatLocalSetupActionLabel, Zn as conversationExecutionStateSchema, Zt as signalEnvelopeSchema, _ as ATSD_CONTROL_PLANE_SCHEMA_VERSION, _n as writeCurrentDeviceObservedMetadataBodySchema, _r as normalizeMessageEnvelope, _t as listProfileSpaceHistoryResponseSchema, a as runWithHeldLock, an as startSessionProgressSchema, ar as daemonHubHeartbeatRequestSchema, at as getPrepareReadinessResponseSchema, b as agentExecutionReadinessRouteParamsSchema, bn as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, br as parseAgentControllerRef$1, bt as listSpaceThreadsResponseSchema, c as LEGACY_ATS_CLI_CONTEXT_ENV_KEY, cn as startSessionSpaceChoiceResponseSchema, cr as daemonHubRegisterSessionResponseSchema, ct as getSpaceDispatchResultResponseSchema, d as resolveCliContext, dn as submitRuntimeAgentControllerReportsBodySchema, dr as daemonServiceContractSchema, dt as getSpaceUpdatesResponseSchema, en as spaceMembersSnapshotSchema, er as daemonHubDeliveryExecutionIdentitySchema, et as getAgentExecutionReadinessBatchBodySchema, f as resolveCliContextId, fn as submitRuntimeAgentControllerReportsResponseSchema, fr as daemonStreamFrameSchema, ft as getSpaceWakeProgressResponseSchema, g as resolveMappedPublicAgentFailureReason, gn as upsertSpaceDeletionTombstoneResponseSchema, gr as normalizeKnownBuiltinAgentControllerId, gt as leaveSpaceResponseSchema, h as resolveBuiltinAgentControllerBrand, hn as upsertProfileSpaceHistoryResponseSchema, hr as normalizeBuiltinAgentControllerId, ht as installedLocalComponentsSnapshotSchema, i as releaseLock, in as startProfileReadinessSummarySchema, ir as daemonHubDispatchRuntimeEvidenceRequestSchema, it as getPrepareReadinessQuerySchema, j as createSpaceDiagnosticReportBodySchema, jn as DISPATCH_ACTIVITY_RETRYING_PURPOSE, jt as patchStartSessionBodySchema, k as continuitySchema, kn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, kr as runtimeCoordinatorExecutionTokenEnvelopeSchema, kt as patchSpaceContractBodySchema, l as listCliContextStates, ln as startSessionWithTokenResponseSchema, lr as daemonHubRouteCatalogChangedFramePayloadSchema, lt as getSpaceStatusResponseSchema, m as CODEX_UPGRADE_REQUIRED_REASON, mn as submitRuntimeRegistrationResponseSchema, mr as getSpaceMessageAddressingRelationSupportForTargetKind, mt as incomingServerMessageSchema, n as isAtsLockError, nn as spaceViewerMembershipResponseSchema, nr as daemonHubDispatchPreviewEndRequestSchema, nt as getAgentExecutionReadinessResponseSchema, o as tryCleanupStaleLock, on as startSessionResponseSchema, or as daemonHubHeartbeatResponseSchema, ot as getSpaceContractResponseSchema, p as writeCliContextState, pn as submitRuntimeRegistrationBodySchema, pr as formatCanonicalMentionLiteral, pt as getSpaceWakeTraceWaterfallResponseSchema, q as forgetCurrentComputerResponseSchema, qn as buildAgentControllerRoutingKey, qt as resolveStartHandoffResponseSchema, r as readLockMeta, rn as startDeviceProjectionSchema, rr as daemonHubDispatchPreviewRequestSchema, rt as getAgentProfilePrimaryBindingResponseSchema, s as ATS_CLI_CONTEXT_ENV_KEY, sn as startSessionSpaceChoiceBodySchema, sr as daemonHubRegisterSessionRequestSchema, st as getSpaceDispatchLookupResponseSchema, t as acquireLock, tn as spaceMetaSchema, tr as daemonHubDispatchLifecycleRequestSchema, tt as getAgentExecutionReadinessBatchResponseSchema, u as readCliContextState, un as structuredGuidePayloadFromInputSchema, ur as daemonHubSubmitTaskResultRequestSchema, ut as getSpaceThreadResponseSchema, v as LOCAL_COMPONENTS_SCHEMA_VERSION, vn as writeCurrentDeviceObservedMetadataResponseSchema, vr as normalizeOptionalWorkingDirectory, vt as listSpaceThreadEventsResponseSchema, w as atsdControlPlaneRequestSchema, wn as AGENT_REPLY_PREVIEW_PURPOSE, wr as resolveMessageEnvelopeTargetField, wt as normalizeSpaceCursorPatch, x as agentProfileBindingRouteParamsSchema, xn as AGENT_REPLYING_END_PURPOSE, xr as parseOptionalClientMessageId, xt as localRuntimesQuerySchema, y as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, yn as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, yr as normalizeSpacePasswordText, yt as listSpaceThreadSignalsResponseSchema, z as daemonRouteObservationResponseSchema, zn as SPACE_PASSWORD_MIN_LENGTH, zt as prepareSessionStreamServerFrameSchema } from "./lock-_FpCKRtr.js";
|
|
4
4
|
import { A as runtimeDir, C as normalizeAtsProfileId, D as resolveAtsEnvPreset, E as resolveAtsCliEntryNameFromArgv, F as systemDir, N as skillsDir, O as resolveAtsRootDir, P as spacesDir, S as normalizeAccountKey, T as profileViewPath, a as accountProfileWorkspacePath, c as atsRootDir, d as deviceOpenClawProfileBootstrapPath, f as deviceOpenClawProfileDir, i as accountProfileViewPath, j as runtimeLogsDir, k as resolveDefaultAtsHomeDirname, n as accountProfileLocalMetaPath, o as accountsDir, p as deviceOpenClawProfileWorkspaceDir, r as accountProfileSpaceCacheDir, s as atsBackupsDir, t as ATS_HOME_ENV_KEY, w as profileDir, y as legacyAccountProfileSpacesDir } from "./paths-DFiopT5Y.js";
|
|
5
|
-
import { A as toSpaceCursorUrl, B as toSpaceSignalsUrl, C as resolveDefaultGatewayBaseUrl, D as toDaemonRouteObservationUrl, E as toClaimExecutionDiagnosticsUrl, F as toSpaceMembersUrl, H as toSpaceWsUrl, I as toSpaceMetaUrl, L as toSpacePasswordUrl, M as toSpaceDispatchLookupUrl, N as toSpaceDispatchTraceUrl, O as toSpaceContractUrl, P as toSpaceLeaveUrl, R as toSpaceRemoveMembersUrl, S as resolveBaseUrlOrNull, T as normalizeBaseUrl, V as toSpaceUpdatesUrl, _ as updateConfiguredStartV1OnboardingState, a as getConfiguredDeviceRuntimeState, b as normalizeGatewayBaseUrlOrNull, c as getConfiguredStartV1OnboardingState, d as resolveRuntimeSkillsCustomTargetId, f as setConfiguredBaseUrl, g as updateConfiguredSkillsConfig, h as updateConfiguredOnboardingConfig, i as getConfiguredDaemonDispatchLimits, j as toSpaceDeleteUrl, k as toSpaceCreateUrl, l as getConfiguredViewCustomization, m as updateConfiguredDeviceRuntimeState, n as alignRuntimeConfigStorage, o as getConfiguredOnboardingDisclaimerAcceptedAt, p as setConfiguredSkillsConfig, r as createDefaultRuntimeAgentControllerSettings, s as getConfiguredSkillsConfig, t as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, u as getRuntimeConfigReadHealth, w as resolveExplicitGatewayUrlOrThrow, x as resolveBaseUrl, y as normalizeGatewayBaseUrl, z as toSpaceResultUrl } from "./runtime-config-
|
|
5
|
+
import { A as toSpaceCursorUrl, B as toSpaceSignalsUrl, C as resolveDefaultGatewayBaseUrl, D as toDaemonRouteObservationUrl, E as toClaimExecutionDiagnosticsUrl, F as toSpaceMembersUrl, H as toSpaceWsUrl, I as toSpaceMetaUrl, L as toSpacePasswordUrl, M as toSpaceDispatchLookupUrl, N as toSpaceDispatchTraceUrl, O as toSpaceContractUrl, P as toSpaceLeaveUrl, R as toSpaceRemoveMembersUrl, S as resolveBaseUrlOrNull, T as normalizeBaseUrl, V as toSpaceUpdatesUrl, _ as updateConfiguredStartV1OnboardingState, a as getConfiguredDeviceRuntimeState, b as normalizeGatewayBaseUrlOrNull, c as getConfiguredStartV1OnboardingState, d as resolveRuntimeSkillsCustomTargetId, f as setConfiguredBaseUrl, g as updateConfiguredSkillsConfig, h as updateConfiguredOnboardingConfig, i as getConfiguredDaemonDispatchLimits, j as toSpaceDeleteUrl, k as toSpaceCreateUrl, l as getConfiguredViewCustomization, m as updateConfiguredDeviceRuntimeState, n as alignRuntimeConfigStorage, o as getConfiguredOnboardingDisclaimerAcceptedAt, p as setConfiguredSkillsConfig, r as createDefaultRuntimeAgentControllerSettings, s as getConfiguredSkillsConfig, t as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, u as getRuntimeConfigReadHealth, w as resolveExplicitGatewayUrlOrThrow, x as resolveBaseUrl, y as normalizeGatewayBaseUrl, z as toSpaceResultUrl } from "./runtime-config-Bm9Cq3yW.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { Command, Option } from "commander";
|
|
8
8
|
import { accessSync, appendFileSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -27,7 +27,7 @@ import wrapAnsi from "wrap-ansi";
|
|
|
27
27
|
import { Box, Container, Editor, Key, ProcessTerminal, TUI, Text, getEditorKeybindings, matchesKey } from "@mariozechner/pi-tui";
|
|
28
28
|
|
|
29
29
|
//#region package.json
|
|
30
|
-
var version = "0.7.
|
|
30
|
+
var version = "0.7.17";
|
|
31
31
|
var package_default = {
|
|
32
32
|
$schema: "https://www.schemastore.org/package.json",
|
|
33
33
|
name: "agent-transport-system",
|
|
@@ -4338,7 +4338,7 @@ async function setDaemonServiceRuntimeState(state, pathInput = {}) {
|
|
|
4338
4338
|
await writeDaemonServiceRuntimeState(state, pathInput);
|
|
4339
4339
|
}
|
|
4340
4340
|
async function clearDaemonServiceRuntimeState(pathInput = {}) {
|
|
4341
|
-
const { clearDaemonRuntimeLease } = await import("./daemon-runtime-lease-
|
|
4341
|
+
const { clearDaemonRuntimeLease } = await import("./daemon-runtime-lease-b5ZWtWKt.js");
|
|
4342
4342
|
await Promise.all([rm(daemonServiceRuntimeStatePath(pathInput), { force: true }), clearDaemonRuntimeLease(pathInput)]);
|
|
4343
4343
|
}
|
|
4344
4344
|
async function withDaemonServiceRunLock(callback, meta = {
|
|
@@ -18344,10 +18344,12 @@ function normalizeApiBaseUrl(baseUrl) {
|
|
|
18344
18344
|
}
|
|
18345
18345
|
const readClaimExecutionDiagnosticsInputSchema = claimExecutionDiagnosticsQuerySchema.extend({ requestContext: atsRequestContextSchema.optional() });
|
|
18346
18346
|
const FALLBACK_GATEWAY_HTTP_ERROR_CODE$1 = "gateway.http_error";
|
|
18347
|
+
const INVALID_RESPONSE_ERROR_CODE = "gateway.invalid_response";
|
|
18347
18348
|
const GENERIC_NETWORK_ERROR_CODES = ["network.timeout", "network.request_failed"];
|
|
18348
18349
|
const KNOWN_API_CLIENT_ERROR_CODES = new Set([
|
|
18349
18350
|
...gatewayErrorCodeSchema.options,
|
|
18350
18351
|
FALLBACK_GATEWAY_HTTP_ERROR_CODE$1,
|
|
18352
|
+
INVALID_RESPONSE_ERROR_CODE,
|
|
18351
18353
|
...GENERIC_NETWORK_ERROR_CODES
|
|
18352
18354
|
]);
|
|
18353
18355
|
var AtsApiClientHttpError = class extends Error {
|
|
@@ -18366,6 +18368,26 @@ var AtsApiClientHttpError = class extends Error {
|
|
|
18366
18368
|
this.upstreamCode = normalizeOptionalText$32(input.upstreamCode);
|
|
18367
18369
|
}
|
|
18368
18370
|
};
|
|
18371
|
+
var AtsApiClientInvalidResponseError = class extends Error {
|
|
18372
|
+
code = INVALID_RESPONSE_ERROR_CODE;
|
|
18373
|
+
operation;
|
|
18374
|
+
requestId;
|
|
18375
|
+
status;
|
|
18376
|
+
rawBody;
|
|
18377
|
+
schemaIssueMessage;
|
|
18378
|
+
schemaIssuePath;
|
|
18379
|
+
upstreamCode = null;
|
|
18380
|
+
constructor(input) {
|
|
18381
|
+
super(input.message);
|
|
18382
|
+
this.name = "AtsApiClientInvalidResponseError";
|
|
18383
|
+
this.operation = input.operation;
|
|
18384
|
+
this.requestId = normalizeOptionalText$32(input.requestId);
|
|
18385
|
+
this.status = input.status;
|
|
18386
|
+
this.rawBody = input.rawBody;
|
|
18387
|
+
this.schemaIssueMessage = normalizeOptionalText$32(input.schemaIssue?.message);
|
|
18388
|
+
this.schemaIssuePath = formatSchemaIssuePath(input.schemaIssue);
|
|
18389
|
+
}
|
|
18390
|
+
};
|
|
18369
18391
|
function toStructuredApiClientFailure(error) {
|
|
18370
18392
|
if (error instanceof AtsApiClientHttpError) return {
|
|
18371
18393
|
code: error.code,
|
|
@@ -18374,13 +18396,26 @@ function toStructuredApiClientFailure(error) {
|
|
|
18374
18396
|
status: error.status,
|
|
18375
18397
|
upstreamCode: error.upstreamCode
|
|
18376
18398
|
};
|
|
18377
|
-
return {
|
|
18399
|
+
if (error instanceof AtsApiClientInvalidResponseError) return withInvalidResponseDiagnostics({
|
|
18400
|
+
code: error.code,
|
|
18401
|
+
message: normalizeFailureMessage$1(error.message),
|
|
18402
|
+
requestId: error.requestId,
|
|
18403
|
+
status: error.status,
|
|
18404
|
+
upstreamCode: null
|
|
18405
|
+
}, {
|
|
18406
|
+
schemaIssueMessage: error.schemaIssueMessage,
|
|
18407
|
+
schemaIssuePath: error.schemaIssuePath
|
|
18408
|
+
});
|
|
18409
|
+
return withInvalidResponseDiagnostics({
|
|
18378
18410
|
code: readGenericErrorCode$1(error),
|
|
18379
18411
|
message: normalizeFailureMessage$1(readFailureMessage(error)),
|
|
18380
18412
|
requestId: readOptionalObjectTextField(error, "requestId"),
|
|
18381
18413
|
status: readOptionalObjectStatus(error),
|
|
18382
18414
|
upstreamCode: readOptionalObjectTextField(error, "upstreamCode")
|
|
18383
|
-
}
|
|
18415
|
+
}, {
|
|
18416
|
+
schemaIssueMessage: readOptionalObjectTextField(error, "schemaIssueMessage"),
|
|
18417
|
+
schemaIssuePath: readOptionalObjectTextField(error, "schemaIssuePath")
|
|
18418
|
+
});
|
|
18384
18419
|
}
|
|
18385
18420
|
function readApiClientTextResponse(input) {
|
|
18386
18421
|
return input.response.text().then((raw) => {
|
|
@@ -18398,7 +18433,14 @@ async function readApiClientJsonResponse(input) {
|
|
|
18398
18433
|
raw
|
|
18399
18434
|
});
|
|
18400
18435
|
const parsed = input.schema.safeParse(parseJsonResponse$2(raw));
|
|
18401
|
-
if (!parsed.success) throw new
|
|
18436
|
+
if (!parsed.success) throw new AtsApiClientInvalidResponseError({
|
|
18437
|
+
message: input.invalidMessage,
|
|
18438
|
+
operation: input.operation,
|
|
18439
|
+
requestId: input.response.headers.get(ATS_HEADER_REQUEST_ID),
|
|
18440
|
+
status: input.response.status,
|
|
18441
|
+
rawBody: raw,
|
|
18442
|
+
schemaIssue: parsed.error?.issues?.[0] ?? null
|
|
18443
|
+
});
|
|
18402
18444
|
return parsed.data;
|
|
18403
18445
|
}
|
|
18404
18446
|
function assertApiClientResponseOk(input) {
|
|
@@ -18437,6 +18479,19 @@ function normalizeOptionalText$32(value) {
|
|
|
18437
18479
|
const normalized = String(value ?? "").trim();
|
|
18438
18480
|
return normalized.length > 0 ? normalized : null;
|
|
18439
18481
|
}
|
|
18482
|
+
function formatSchemaIssuePath(issue) {
|
|
18483
|
+
const path = issue?.path;
|
|
18484
|
+
if (!path || path.length === 0) return null;
|
|
18485
|
+
return path.map((part) => String(part)).join(".");
|
|
18486
|
+
}
|
|
18487
|
+
function withInvalidResponseDiagnostics(failure, diagnostics) {
|
|
18488
|
+
if (!(diagnostics.schemaIssueMessage || diagnostics.schemaIssuePath)) return failure;
|
|
18489
|
+
return {
|
|
18490
|
+
...failure,
|
|
18491
|
+
schemaIssueMessage: diagnostics.schemaIssueMessage,
|
|
18492
|
+
schemaIssuePath: diagnostics.schemaIssuePath
|
|
18493
|
+
};
|
|
18494
|
+
}
|
|
18440
18495
|
function normalizeFailureMessage$1(value) {
|
|
18441
18496
|
return normalizeOptionalText$32(value) ?? "Unknown error.";
|
|
18442
18497
|
}
|
|
@@ -18501,7 +18556,8 @@ function createAtsApiClient(config) {
|
|
|
18501
18556
|
input
|
|
18502
18557
|
}),
|
|
18503
18558
|
schema: input.schema,
|
|
18504
|
-
invalidMessage: input.invalidMessage
|
|
18559
|
+
invalidMessage: input.invalidMessage,
|
|
18560
|
+
operation: input.operation
|
|
18505
18561
|
});
|
|
18506
18562
|
},
|
|
18507
18563
|
requestText: async (input) => {
|
|
@@ -24480,8 +24536,7 @@ async function resolveCurrentReplyReadinessSnapshot(input = {}) {
|
|
|
24480
24536
|
daemonStatus,
|
|
24481
24537
|
runtimeStatus: displayRuntimeStatus ?? runtimeStatus
|
|
24482
24538
|
}));
|
|
24483
|
-
const
|
|
24484
|
-
const gatewayChainReadiness = shouldProbeGatewayChain ? await resolveGatewayChainReadiness({
|
|
24539
|
+
const gatewayChainReadiness = input.checkGatewayChain === true && !isWakeableLocalReplyReady(localDeviceReplyReadiness) && !localDeviceReplyReadiness.reasonCodes.some((reasonCode) => reasonCode === "service.drifted" || reasonCode === "service.not_installed" || reasonCode === "service.not_running" || reasonCode === "workspace.invalid" || reasonCode === "workspace.missing") ? await resolveGatewayChainReadiness({
|
|
24485
24540
|
baseUrl: input.baseUrl,
|
|
24486
24541
|
profile: input.gatewayChainProfile ?? (input.profile ? {
|
|
24487
24542
|
atsProfileId: input.profile.atsProfileId,
|
|
@@ -24489,22 +24544,7 @@ async function resolveCurrentReplyReadinessSnapshot(input = {}) {
|
|
|
24489
24544
|
} : null),
|
|
24490
24545
|
timeoutMs: input.gatewayChainTimeoutMs
|
|
24491
24546
|
}).catch(() => null) : null;
|
|
24492
|
-
const deviceReplyReadiness =
|
|
24493
|
-
baseUrl: input.baseUrl,
|
|
24494
|
-
checkGatewayChain: true,
|
|
24495
|
-
gatewayChainProfile: input.gatewayChainProfile,
|
|
24496
|
-
gatewayChainReadiness,
|
|
24497
|
-
gatewayChainTimeoutMs: input.gatewayChainTimeoutMs,
|
|
24498
|
-
inventory,
|
|
24499
|
-
localDemand,
|
|
24500
|
-
ownerUserId: input.ownerUserId ?? input.profile?.ownerUserId ?? null,
|
|
24501
|
-
profile: input.profile ?? null,
|
|
24502
|
-
profileWorkspaceRuntimeResolution,
|
|
24503
|
-
runtimeProjection,
|
|
24504
|
-
runtimeStatus: displayRuntimeStatus ?? runtimeStatus,
|
|
24505
|
-
runtimeWorkdir: input.runtimeWorkdir,
|
|
24506
|
-
status: daemonStatus
|
|
24507
|
-
}).catch(() => localDeviceReplyReadiness) : localDeviceReplyReadiness;
|
|
24547
|
+
const deviceReplyReadiness = localDeviceReplyReadiness;
|
|
24508
24548
|
const openClawLocalDiagnostics = await resolveOpenClawLocalDiagnosticsForSnapshot({
|
|
24509
24549
|
baseUrl: input.baseUrl,
|
|
24510
24550
|
mode: input.openClawDiagnosticsMode ?? null,
|
|
@@ -24537,6 +24577,9 @@ async function resolveCurrentReplyReadinessSnapshot(input = {}) {
|
|
|
24537
24577
|
profileWorkspaceRuntimeResolution
|
|
24538
24578
|
};
|
|
24539
24579
|
}
|
|
24580
|
+
function isWakeableLocalReplyReady(localDeviceReplyReadiness) {
|
|
24581
|
+
return localDeviceReplyReadiness.replyReadiness === "ready" && localDeviceReplyReadiness.wakeableRouteCount > 0;
|
|
24582
|
+
}
|
|
24540
24583
|
function resolveRuntimeProjectionForSnapshot(input) {
|
|
24541
24584
|
if (!input.daemonStatus.installed) return Promise.resolve(null);
|
|
24542
24585
|
if (input.runtimeProjection !== void 0) return Promise.resolve(input.runtimeProjection);
|
|
@@ -36924,14 +36967,14 @@ async function runProviderResumeProbe(input) {
|
|
|
36924
36967
|
});
|
|
36925
36968
|
try {
|
|
36926
36969
|
if (providerId === "codex") await invokeCodexCliTransport({
|
|
36927
|
-
codexTimeoutMs: resolveCodexTimeoutMs(),
|
|
36970
|
+
codexTimeoutMs: resolveLiveResumeProbeTimeoutMs(resolveCodexTimeoutMs()),
|
|
36928
36971
|
codexWorkdir: input.runtimeWorkingDirectory,
|
|
36929
36972
|
launchContract: input.launchContract,
|
|
36930
36973
|
prompt: LIVE_RESUME_PROBE_PROMPT,
|
|
36931
36974
|
threadId: agentControllerConversation.agentControllerConversationId
|
|
36932
36975
|
});
|
|
36933
36976
|
else if (providerId === "claude-code") await invokeClaudeCliTransport({
|
|
36934
|
-
claudeTimeoutMs: resolveClaudeCodeTimeoutMs(),
|
|
36977
|
+
claudeTimeoutMs: resolveLiveResumeProbeTimeoutMs(resolveClaudeCodeTimeoutMs()),
|
|
36935
36978
|
claudeWorkdir: input.runtimeWorkingDirectory,
|
|
36936
36979
|
launchContract: input.launchContract,
|
|
36937
36980
|
prompt: LIVE_RESUME_PROBE_PROMPT,
|
|
@@ -37027,6 +37070,11 @@ function readErrorType(error) {
|
|
|
37027
37070
|
return null;
|
|
37028
37071
|
}
|
|
37029
37072
|
const LIVE_RESUME_PROBE_PROMPT = "ATS resume probe. Reply with one short confirmation sentence.";
|
|
37073
|
+
const LIVE_RESUME_PROBE_TIMEOUT_MS = 3e4;
|
|
37074
|
+
function resolveLiveResumeProbeTimeoutMs(runtimeTimeoutMs) {
|
|
37075
|
+
if (runtimeTimeoutMs === null) return LIVE_RESUME_PROBE_TIMEOUT_MS;
|
|
37076
|
+
return Math.min(runtimeTimeoutMs, LIVE_RESUME_PROBE_TIMEOUT_MS);
|
|
37077
|
+
}
|
|
37030
37078
|
|
|
37031
37079
|
//#endregion
|
|
37032
37080
|
//#region src/daemon/control-plane/inflight-task-control-registry.ts
|
|
@@ -43512,15 +43560,21 @@ async function runDaemonSocketSession(input) {
|
|
|
43512
43560
|
if (Date.now() < nextRuntimeAgentControllerReportSyncAtMs) return;
|
|
43513
43561
|
try {
|
|
43514
43562
|
const result = await syncDaemonRuntimeAgentControllerReports({ localAdapterContainer: input.localAdapterContainer });
|
|
43515
|
-
|
|
43563
|
+
const retryInMs = result.failedCount > 0 ? RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS : RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS;
|
|
43564
|
+
nextRuntimeAgentControllerReportSyncAtMs = Date.now() + retryInMs;
|
|
43565
|
+
let reportSyncLineText;
|
|
43566
|
+
if (result.status === "skipped") reportSyncLineText = `runtime agent controller report sync skipped; ${result.reasonCodes[0] ?? "no reports"}`;
|
|
43567
|
+
else if (result.failedCount > 0) reportSyncLineText = `runtime agent controller report sync incomplete; accepted=${result.submittedCount}, failed=${result.failedCount}, total=${result.reportCount}; retrying in ${String(retryInMs)}ms`;
|
|
43568
|
+
else reportSyncLineText = `runtime agent controller report sync submitted; accepted=${result.submittedCount}, failed=${result.failedCount}, total=${result.reportCount}`;
|
|
43516
43569
|
emitRunLine({
|
|
43517
43570
|
presenter: input.presenter,
|
|
43518
|
-
code: "daemon.run.runtime_agent_controller_report_sync",
|
|
43519
|
-
text:
|
|
43571
|
+
code: result.failedCount > 0 ? "daemon.run.runtime_agent_controller_report_sync_failed" : "daemon.run.runtime_agent_controller_report_sync",
|
|
43572
|
+
text: reportSyncLineText,
|
|
43520
43573
|
payload: {
|
|
43521
43574
|
failedCount: result.failedCount,
|
|
43522
43575
|
reasonCodes: result.reasonCodes,
|
|
43523
43576
|
reportCount: result.reportCount,
|
|
43577
|
+
retryInMs,
|
|
43524
43578
|
status: result.status,
|
|
43525
43579
|
submittedCount: result.submittedCount
|
|
43526
43580
|
}
|
|
@@ -95700,7 +95754,7 @@ function emitSpaceStatusAgentOutput(input) {
|
|
|
95700
95754
|
const spaceLabel = input.status.name?.trim() || input.status.spaceId;
|
|
95701
95755
|
input.presenter.line({
|
|
95702
95756
|
code: "space.status",
|
|
95703
|
-
text: `space status: ${spaceLabel}, members=${input.status.members.totalCount}, agents=${input.status.members.agentCount}
|
|
95757
|
+
text: `space status: ${spaceLabel}, members=${input.status.members.totalCount}, agents=${input.status.members.agentCount}`,
|
|
95704
95758
|
data: {
|
|
95705
95759
|
spaceId: input.status.spaceId,
|
|
95706
95760
|
spaceName: input.status.name ?? null,
|
|
@@ -95709,9 +95763,7 @@ function emitSpaceStatusAgentOutput(input) {
|
|
|
95709
95763
|
humanCount: input.status.members.humanCount,
|
|
95710
95764
|
agentCount: input.status.members.agentCount,
|
|
95711
95765
|
liveHumanCount: input.status.members.liveHumanCount,
|
|
95712
|
-
liveAgentCount: input.status.members.liveAgentCount
|
|
95713
|
-
wakeableAgentCount: input.status.members.wakeableAgentCount,
|
|
95714
|
-
offlineAgentCount: input.status.members.offlineAgentCount
|
|
95766
|
+
liveAgentCount: input.status.members.liveAgentCount
|
|
95715
95767
|
},
|
|
95716
95768
|
latestVisibleUpdate: input.status.latestVisibleUpdate ? {
|
|
95717
95769
|
signalId: input.status.latestVisibleUpdate.signalId,
|
|
@@ -95784,10 +95836,6 @@ function buildSpaceStatusMembersRows(status) {
|
|
|
95784
95836
|
{
|
|
95785
95837
|
label: pc.dim("Connected agents"),
|
|
95786
95838
|
value: pc.bold(String(status.members.liveAgentCount))
|
|
95787
|
-
},
|
|
95788
|
-
{
|
|
95789
|
-
label: pc.dim("Wakeable agents"),
|
|
95790
|
-
value: pc.bold(String(status.members.wakeableAgentCount))
|
|
95791
95839
|
}
|
|
95792
95840
|
];
|
|
95793
95841
|
}
|