agent-transport-system 0.7.47 → 0.7.49
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 +97 -160
- package/dist/ats.js.map +1 -1
- package/dist/{base-url-B7FKL8D9.js → base-url-CT4Hugox.js} +2 -2
- package/dist/{base-url-B7FKL8D9.js.map → base-url-CT4Hugox.js.map} +1 -1
- package/dist/{daemon-runtime-lease-CgRixlgO.js → daemon-runtime-lease-C-1gNOFL.js} +1 -1
- package/dist/{lock-BvgZX0qs.js → lock-CYlR3Czx.js} +113 -85
- package/dist/lock-CYlR3Czx.js.map +1 -0
- package/package.json +2 -2
- package/dist/lock-BvgZX0qs.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 { t as DEV_LOCAL_GATEWAY_BASE_URL } from "./base-url-
|
|
3
|
+
import "./lock-CYlR3Czx.js";
|
|
4
|
+
import { t as DEV_LOCAL_GATEWAY_BASE_URL } from "./base-url-CT4Hugox.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 formatLocalSetupActionLabel, $n as buildAgentControllerRoutingKey, $t as setLocalRuntimeDisplayNameBodySchema, A as continuitySchema, An as AGENT_REPLY_PREVIEW_PURPOSE, Ar as resolveBuiltinAgentControllerConversationKind, At as notifyAgentProfileRouteCatalogChangedResponseSchema, B as daemonRouteCatalogCacheSchema, Bn as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, Bt as postSpaceThreadSignalBodySchema, C as agentExecutionReadinessRouteParamsSchema, Cn as writeCurrentDeviceObservedMetadataBodySchema, Cr as normalizeKnownBuiltinAgentControllerId, Ct as listSpaceThreadSignalsResponseSchema, D as atsdControlPlaneRequestSchema, Dn as AGENT_REPLYING_END_PURPOSE, Dr as parseAgentControllerRef$1, Dt as normalizeListSignalsReadQuerySemantics, E as atsRequestContextSchema, En as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, Er as normalizeSpacePasswordText, Et as localRuntimesResponseSchema, F as createSpaceThreadBodySchema, Fn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, Ft as patchStartSessionBodySchema, G as ensureAgentProfilePrimaryBindingBodySchema, Gn as SPACE_PASSWORD_MIN_LENGTH, Gt as projectSpaceDispatchTraceFinalVisibleOutcome, H as daemonRuntimeLeaseSchema, Hn as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, Ht as prepareSessionResponseSchema, I as createSpaceThreadResponseSchema, In as DISPATCH_ACTIVITY_FAILED_PURPOSE, Ir as runtimeCoordinatorExecutionTokenEnvelopeSchema, It as postNormalMessageBodySchema, J as forgetComputerResponseSchema, Jn as atsSpaceEgressActionSchema, Jt as resolveSpaceDispatchTraceRootCause, K as ensureAgentProfilePrimaryBindingResponseSchema, Kn as SPACE_UPDATES_MAX_LIMIT, Kt as providerDispatchRuntimeContextSchema, L as createStartSessionBodySchema, Ln as DISPATCH_ACTIVITY_RETRYING_PURPOSE, Lr as sanitizeSignalTextPreview, Lt as postNormalMessageResponseSchema, M as createSpaceDiagnosticReportBodySchema, Mn as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Mr as resolveSingleSpaceMentionLabels, Mt as patchProfileSpaceHistoryStatusResponseSchema, N as createSpaceDiagnosticReportResponseSchema, Nn as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, Nr as resolveSpaceMentionLabels, Nt as patchSpaceContractBodySchema, O as atsdControlPlaneResponseSchema, On as AGENT_REPLYING_PURPOSE, Or as parseOptionalClientMessageId, Ot as normalizeSpaceCursorPatch, P as createSpaceResponseSchema, Pn as DAEMON_HUB_SCHEMA_VERSION, Pt as patchSpaceContractResponseSchema, Q as formatLocalSetupActionDescription, Qn as buildAgentControllerConversationRef, Qt as setCurrentDeviceTargetBodySchema, R as currentDeviceTargetResponseSchema, Rn as LEGACY_RUNTIME_DISPATCH_POLICY, Rt as postSpaceMembersBodySchema, S as accountSpaceIndexResponseSchema, Sn as upsertProfileSpaceHistoryResponseSchema, Sr as normalizeBuiltinAgentControllerId, St as listSpaceThreadEventsResponseSchema, T as atsProfileIdSchema, Tn as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, Tr as normalizeOptionalWorkingDirectory, Tt as localRuntimesQuerySchema, U as deleteSpaceResponseSchema, Un as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, Ut as prepareSessionStreamServerFrameSchema, V as daemonRouteObservationResponseSchema, Vn as MESSAGE_MENTION_TYPE_VALUES, Vt as postSpaceThreadSignalResponseSchema, W as dispatchBriefSchema, Wn as SPACE_MENTION_REJECT_NOTICE_PURPOSE, Wt as projectObservabilityWakeCorrelation, X as formatLocalComponentsSummaryDescription, Xn as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, Xt as resolveStartHandoffResponseSchema, Y as forgetCurrentComputerResponseSchema, Yn as atsdTaskResultEnvelopeWriteSchema, Yt as resolveStartHandoffBodySchema, Z as formatLocalComponentsSummaryLabel, Zn as atsdTaskResultPayloadSchema, Zt as serverErrorFrameSchema, _ as ATSD_CONTROL_PLANE_SCHEMA_VERSION, _n as submitRuntimeAgentControllerReportsResponseSchema, _r as daemonServiceContractSchema, _t as getSpaceWakeTraceWaterfallResponseSchema, a as runWithHeldLock, an as spaceMembersSnapshotSchema, ar as daemonHubDeliverDispatchRequestSchema, at as getAgentExecutionReadinessResponseSchema, b as LOCAL_COMPONENTS_SCHEMA_VERSION, bn as submitRuntimeRegistrationBodySchema, br as formatCanonicalMentionLiteral, bt as leaveSpaceResponseSchema, c as LEGACY_ATS_CLI_CONTEXT_ENV_KEY, cn as startDeviceProjectionSchema, cr as daemonHubDispatchPreviewEndRequestSchema, ct as getPrepareReadinessResponseSchema, d as resolveCliContext, dn as startSessionResponseSchema, dr as daemonHubHeartbeatRequestSchema, dt as getSpaceDispatchResultResponseSchema, en as signalEnvelopeSchema, er as canonicalizeAgentControllerRef, et as gatewayErrorCodeSchema, f as resolveCliContextId, fn as startSessionSpaceChoiceBodySchema, fr as daemonHubHeartbeatResponseSchema, ft as getSpaceMessageDetailsResponseSchema, g as resolveMappedPublicAgentFailureReason, gn as submitRuntimeAgentControllerReportsBodySchema, gr as daemonHubSubmitTaskResultRequestSchema, gt as getSpaceWakeProgressResponseSchema, h as resolveBuiltinAgentControllerBrand, hn as structuredGuidePayloadFromInputSchema, hr as daemonHubRouteCatalogChangedFramePayloadSchema, ht as getSpaceUpdatesResponseSchema, i as releaseLock, in as spaceIdentityDirectorySchema, ir as createDaemonRouteObservationSummary, it as getAgentExecutionReadinessBatchResponseSchema, j as createSpaceBodySchema, jn as ATSD_TASK_RESULT_SCHEMA_VERSION, jr as resolveMessageEnvelopeTargetField, jt as observabilityWakeTraceSelectorSchema, k as catchupResponseSchema, kn as AGENT_REPLY_PREVIEW_END_PURPOSE, kr as profileWorkspaceModeSchema, kt as notifyAgentProfileRouteCatalogChangedBodySchema, l as listCliContextStates, ln as startProfileReadinessSummarySchema, lr as daemonHubDispatchPreviewRequestSchema, lt as getSpaceContractResponseSchema, m as CODEX_UPGRADE_REQUIRED_REASON, mn as startSessionWithTokenResponseSchema, mr as daemonHubRegisterSessionResponseSchema, mt as getSpaceThreadResponseSchema, n as isAtsLockError, nn as spaceCreatorSchema, nr as collectCanonicalMentionTextFragments, nt as getActiveSpaceWakeProgressResponseSchema, o as tryCleanupStaleLock, on as spaceMetaSchema, or as daemonHubDeliveryExecutionIdentitySchema, ot as getAgentProfilePrimaryBindingResponseSchema, p as writeCliContextState, pn as startSessionSpaceChoiceResponseSchema, pr as daemonHubRegisterSessionRequestSchema, pt as getSpaceStatusResponseSchema, q as entryBriefSchema, qn as atsRuntimeProfileIdSchema, qt as removeSpaceMembersResponseSchema, r as readLockMeta, rn as spaceDispatchTraceResponseSchema, rr as conversationExecutionStateSchema, rt as getAgentExecutionReadinessBatchBodySchema, s as ATS_CLI_CONTEXT_ENV_KEY, sn as spaceViewerMembershipResponseSchema, sr as daemonHubDispatchLifecycleRequestSchema, st as getPrepareReadinessQuerySchema, t as acquireLock, tn as spaceBootstrapResponseSchema, tr as canonicalizeBuiltinAgentControllerRef, tt as gatewayErrorEnvelopeSchema, u as readCliContextState, un as startSessionProgressSchema, ur as daemonHubDispatchRuntimeEvidenceRequestSchema, ut as getSpaceDispatchLookupResponseSchema, v as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_NAME, vn as submitRuntimeProviderConversationProofsBodySchema, vr as daemonServiceLaneSchema, vt as incomingServerMessageSchema, w as agentProfileBindingRouteParamsSchema, wn as writeCurrentDeviceObservedMetadataResponseSchema, wr as normalizeMessageEnvelope, wt as listSpaceThreadsResponseSchema, x as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, xn as submitRuntimeRegistrationResponseSchema, xr as getSpaceMessageAddressingRelationSupportForTargetKind, xt as listProfileSpaceHistoryResponseSchema, y as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_VERSION, yn as submitRuntimeProviderConversationProofsResponseSchema, yr as daemonStreamFrameSchema, yt as installedLocalComponentsSnapshotSchema, z as currentLocalRuntimeReplyReadinessResponseSchema, zn as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, zt as postSpaceMembersResponseSchema } from "./lock-
|
|
3
|
+
import { $ as formatLocalSetupActionLabel, $n as buildAgentControllerRoutingKey, $t as setLocalRuntimeDisplayNameBodySchema, A as continuitySchema, An as AGENT_REPLY_PREVIEW_PURPOSE, Ar as resolveBuiltinAgentControllerConversationKind, At as notifyAgentProfileRouteCatalogChangedResponseSchema, B as daemonRouteCatalogCacheSchema, Bn as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, Bt as postSpaceThreadSignalBodySchema, C as agentExecutionReadinessRouteParamsSchema, Cn as writeCurrentDeviceObservedMetadataBodySchema, Cr as normalizeKnownBuiltinAgentControllerId, Ct as listSpaceThreadSignalsResponseSchema, D as atsdControlPlaneRequestSchema, Dn as AGENT_REPLYING_END_PURPOSE, Dr as parseAgentControllerRef$1, Dt as normalizeListSignalsReadQuerySemantics, E as atsRequestContextSchema, En as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, Er as normalizeSpacePasswordText, Et as localRuntimesResponseSchema, F as createSpaceThreadBodySchema, Fn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, Ft as patchStartSessionBodySchema, G as ensureAgentProfilePrimaryBindingBodySchema, Gn as SPACE_PASSWORD_MIN_LENGTH, Gt as projectSpaceDispatchTraceFinalVisibleOutcome, H as daemonRuntimeLeaseSchema, Hn as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, Ht as prepareSessionResponseSchema, I as createSpaceThreadResponseSchema, In as DISPATCH_ACTIVITY_FAILED_PURPOSE, Ir as runtimeCoordinatorExecutionTokenEnvelopeSchema, It as postNormalMessageBodySchema, J as forgetComputerResponseSchema, Jn as atsSpaceEgressActionSchema, Jt as resolveSpaceDispatchTraceRootCause, K as ensureAgentProfilePrimaryBindingResponseSchema, Kn as SPACE_UPDATES_MAX_LIMIT, Kt as providerDispatchRuntimeContextSchema, L as createStartSessionBodySchema, Ln as DISPATCH_ACTIVITY_RETRYING_PURPOSE, Lr as sanitizeSignalTextPreview, Lt as postNormalMessageResponseSchema, M as createSpaceDiagnosticReportBodySchema, Mn as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Mr as resolveSingleSpaceMentionLabels, Mt as patchProfileSpaceHistoryStatusResponseSchema, N as createSpaceDiagnosticReportResponseSchema, Nn as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, Nr as resolveSpaceMentionLabels, Nt as patchSpaceContractBodySchema, O as atsdControlPlaneResponseSchema, On as AGENT_REPLYING_PURPOSE, Or as parseOptionalClientMessageId, Ot as normalizeSpaceCursorPatch, P as createSpaceResponseSchema, Pn as DAEMON_HUB_SCHEMA_VERSION, Pt as patchSpaceContractResponseSchema, Q as formatLocalSetupActionDescription, Qn as buildAgentControllerConversationRef, Qt as setCurrentDeviceTargetBodySchema, R as currentDeviceTargetResponseSchema, Rn as LEGACY_RUNTIME_DISPATCH_POLICY, Rt as postSpaceMembersBodySchema, S as accountSpaceIndexResponseSchema, Sn as upsertProfileSpaceHistoryResponseSchema, Sr as normalizeBuiltinAgentControllerId, St as listSpaceThreadEventsResponseSchema, T as atsProfileIdSchema, Tn as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, Tr as normalizeOptionalWorkingDirectory, Tt as localRuntimesQuerySchema, U as deleteSpaceResponseSchema, Un as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, Ut as prepareSessionStreamServerFrameSchema, V as daemonRouteObservationResponseSchema, Vn as MESSAGE_MENTION_TYPE_VALUES, Vt as postSpaceThreadSignalResponseSchema, W as dispatchBriefSchema, Wn as SPACE_MENTION_REJECT_NOTICE_PURPOSE, Wt as projectObservabilityWakeCorrelation, X as formatLocalComponentsSummaryDescription, Xn as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, Xt as resolveStartHandoffResponseSchema, Y as forgetCurrentComputerResponseSchema, Yn as atsdTaskResultEnvelopeWriteSchema, Yt as resolveStartHandoffBodySchema, Z as formatLocalComponentsSummaryLabel, Zn as atsdTaskResultPayloadSchema, Zt as serverErrorFrameSchema, _ as ATSD_CONTROL_PLANE_SCHEMA_VERSION, _n as submitRuntimeAgentControllerReportsResponseSchema, _r as daemonServiceContractSchema, _t as getSpaceWakeTraceWaterfallResponseSchema, a as runWithHeldLock, an as spaceMembersSnapshotSchema, ar as daemonHubDeliverDispatchRequestSchema, at as getAgentExecutionReadinessResponseSchema, b as LOCAL_COMPONENTS_SCHEMA_VERSION, bn as submitRuntimeRegistrationBodySchema, br as formatCanonicalMentionLiteral, bt as leaveSpaceResponseSchema, c as LEGACY_ATS_CLI_CONTEXT_ENV_KEY, cn as startDeviceProjectionSchema, cr as daemonHubDispatchPreviewEndRequestSchema, ct as getPrepareReadinessResponseSchema, d as resolveCliContext, dn as startSessionResponseSchema, dr as daemonHubHeartbeatRequestSchema, dt as getSpaceDispatchResultResponseSchema, en as signalEnvelopeSchema, er as canonicalizeAgentControllerRef, et as gatewayErrorCodeSchema, f as resolveCliContextId, fn as startSessionSpaceChoiceBodySchema, fr as daemonHubHeartbeatResponseSchema, ft as getSpaceMessageDetailsResponseSchema, g as resolveMappedPublicAgentFailureReason, gn as submitRuntimeAgentControllerReportsBodySchema, gr as daemonHubSubmitTaskResultRequestSchema, gt as getSpaceWakeProgressResponseSchema, h as resolveBuiltinAgentControllerBrand, hn as structuredGuidePayloadFromInputSchema, hr as daemonHubRouteCatalogChangedFramePayloadSchema, ht as getSpaceUpdatesResponseSchema, i as releaseLock, in as spaceIdentityDirectorySchema, ir as createDaemonRouteObservationSummary, it as getAgentExecutionReadinessBatchResponseSchema, j as createSpaceBodySchema, jn as ATSD_TASK_RESULT_SCHEMA_VERSION, jr as resolveMessageEnvelopeTargetField, jt as observabilityWakeTraceSelectorSchema, k as catchupResponseSchema, kn as AGENT_REPLY_PREVIEW_END_PURPOSE, kr as profileWorkspaceModeSchema, kt as notifyAgentProfileRouteCatalogChangedBodySchema, l as listCliContextStates, ln as startProfileReadinessSummarySchema, lr as daemonHubDispatchPreviewRequestSchema, lt as getSpaceContractResponseSchema, m as CODEX_UPGRADE_REQUIRED_REASON, mn as startSessionWithTokenResponseSchema, mr as daemonHubRegisterSessionResponseSchema, mt as getSpaceThreadResponseSchema, n as isAtsLockError, nn as spaceCreatorSchema, nr as collectCanonicalMentionTextFragments, nt as getActiveSpaceWakeProgressResponseSchema, o as tryCleanupStaleLock, on as spaceMetaSchema, or as daemonHubDeliveryExecutionIdentitySchema, ot as getAgentProfilePrimaryBindingResponseSchema, p as writeCliContextState, pn as startSessionSpaceChoiceResponseSchema, pr as daemonHubRegisterSessionRequestSchema, pt as getSpaceStatusResponseSchema, q as entryBriefSchema, qn as atsRuntimeProfileIdSchema, qt as removeSpaceMembersResponseSchema, r as readLockMeta, rn as spaceDispatchTraceResponseSchema, rr as conversationExecutionStateSchema, rt as getAgentExecutionReadinessBatchBodySchema, s as ATS_CLI_CONTEXT_ENV_KEY, sn as spaceViewerMembershipResponseSchema, sr as daemonHubDispatchLifecycleRequestSchema, st as getPrepareReadinessQuerySchema, t as acquireLock, tn as spaceBootstrapResponseSchema, tr as canonicalizeBuiltinAgentControllerRef, tt as gatewayErrorEnvelopeSchema, u as readCliContextState, un as startSessionProgressSchema, ur as daemonHubDispatchRuntimeEvidenceRequestSchema, ut as getSpaceDispatchLookupResponseSchema, v as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_NAME, vn as submitRuntimeProviderConversationProofsBodySchema, vr as daemonServiceLaneSchema, vt as incomingServerMessageSchema, w as agentProfileBindingRouteParamsSchema, wn as writeCurrentDeviceObservedMetadataResponseSchema, wr as normalizeMessageEnvelope, wt as listSpaceThreadsResponseSchema, x as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, xn as submitRuntimeRegistrationResponseSchema, xr as getSpaceMessageAddressingRelationSupportForTargetKind, xt as listProfileSpaceHistoryResponseSchema, y as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_VERSION, yn as submitRuntimeProviderConversationProofsResponseSchema, yr as daemonStreamFrameSchema, yt as installedLocalComponentsSnapshotSchema, z as currentLocalRuntimeReplyReadinessResponseSchema, zn as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, zt as postSpaceMembersResponseSchema } from "./lock-CYlR3Czx.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 toSpaceDeleteUrl, B as toSpaceUpdatesUrl, C as updateConfiguredSkillsConfig, D as toSpaceContractUrl, E as toDaemonRouteObservationUrl, F as toSpaceMetaUrl, I as toSpacePasswordUrl, L as toSpaceRemoveMembersUrl, M as toSpaceDispatchTraceUrl, N as toSpaceLeaveUrl, O as toSpaceCreateUrl, P as toSpaceMembersUrl, R as toSpaceResultUrl, S as updateConfiguredOnboardingConfig, T as normalizeBaseUrl, V as toSpaceWsUrl, _ as getRuntimeConfigReadHealth, a as resolveBaseUrlOrNull, b as setConfiguredSkillsConfig, c as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, d as getConfiguredDaemonDispatchLimits, f as getConfiguredDeviceRuntimeState, g as getConfiguredViewCustomization, h as getConfiguredStartV1OnboardingState, i as resolveBaseUrl, j as toSpaceDispatchLookupUrl, k as toSpaceCursorUrl, l as alignRuntimeConfigStorage, m as getConfiguredSkillsConfig, n as normalizeGatewayBaseUrl, o as resolveDefaultGatewayBaseUrl, p as getConfiguredOnboardingDisclaimerAcceptedAt, r as normalizeGatewayBaseUrlOrNull, s as resolveExplicitGatewayUrlOrThrow, u as createDefaultRuntimeAgentControllerSettings, v as resolveRuntimeSkillsCustomTargetId, w as updateConfiguredStartV1OnboardingState, x as updateConfiguredDeviceRuntimeState, y as setConfiguredBaseUrl, z as toSpaceSignalsUrl } from "./base-url-
|
|
5
|
+
import { A as toSpaceDeleteUrl, B as toSpaceUpdatesUrl, C as updateConfiguredSkillsConfig, D as toSpaceContractUrl, E as toDaemonRouteObservationUrl, F as toSpaceMetaUrl, I as toSpacePasswordUrl, L as toSpaceRemoveMembersUrl, M as toSpaceDispatchTraceUrl, N as toSpaceLeaveUrl, O as toSpaceCreateUrl, P as toSpaceMembersUrl, R as toSpaceResultUrl, S as updateConfiguredOnboardingConfig, T as normalizeBaseUrl, V as toSpaceWsUrl, _ as getRuntimeConfigReadHealth, a as resolveBaseUrlOrNull, b as setConfiguredSkillsConfig, c as DEFAULT_RUNTIME_AGENT_TRANSPORT_MODE, d as getConfiguredDaemonDispatchLimits, f as getConfiguredDeviceRuntimeState, g as getConfiguredViewCustomization, h as getConfiguredStartV1OnboardingState, i as resolveBaseUrl, j as toSpaceDispatchLookupUrl, k as toSpaceCursorUrl, l as alignRuntimeConfigStorage, m as getConfiguredSkillsConfig, n as normalizeGatewayBaseUrl, o as resolveDefaultGatewayBaseUrl, p as getConfiguredOnboardingDisclaimerAcceptedAt, r as normalizeGatewayBaseUrlOrNull, s as resolveExplicitGatewayUrlOrThrow, u as createDefaultRuntimeAgentControllerSettings, v as resolveRuntimeSkillsCustomTargetId, w as updateConfiguredStartV1OnboardingState, x as updateConfiguredDeviceRuntimeState, y as setConfiguredBaseUrl, z as toSpaceSignalsUrl } from "./base-url-CT4Hugox.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,12 +27,12 @@ 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.49";
|
|
31
31
|
var package_default = {
|
|
32
32
|
$schema: "https://www.schemastore.org/package.json",
|
|
33
33
|
name: "agent-transport-system",
|
|
34
34
|
version,
|
|
35
|
-
atsReleaseDate: "2026-06-
|
|
35
|
+
atsReleaseDate: "2026-06-08",
|
|
36
36
|
description: "Agent Transport System CLI - https://ats.sh",
|
|
37
37
|
license: "MIT",
|
|
38
38
|
type: "module",
|
|
@@ -8641,9 +8641,7 @@ function hasRuntimeAgentControllerReportRefreshReason(reasonCodes) {
|
|
|
8641
8641
|
return reasonCodes.some((reasonCode) => reasonCode === "runtime.agent_controller_report_stale" || reasonCode === "runtime.agent_controller_report_missing" || reasonCode === "runtime.projection_missing" || reasonCode === "claim_eligibility.agent_controller_report_missing" || reasonCode === "claim_eligibility.agent_controller_report_stale");
|
|
8642
8642
|
}
|
|
8643
8643
|
function isAgentExecutionReadyOrConnecting(readiness) {
|
|
8644
|
-
|
|
8645
|
-
if (readiness.displayState === "ready") return true;
|
|
8646
|
-
return facts.profile.active && facts.binding.routable && facts.localService.reachable && facts.service.executionCompatible && facts.runtime.ready && !facts.providerAccount.blocked && !facts.readinessImpact.blocked && readiness.primaryAction === "check_status";
|
|
8644
|
+
return readiness.displayState === "ready";
|
|
8647
8645
|
}
|
|
8648
8646
|
function hasSetupRepairReason(reasonCodes) {
|
|
8649
8647
|
return reasonCodes.some((reasonCode) => {
|
|
@@ -12875,7 +12873,7 @@ async function setDaemonServiceRuntimeState(state, pathInput = {}) {
|
|
|
12875
12873
|
await writeDaemonServiceRuntimeState(state, pathInput);
|
|
12876
12874
|
}
|
|
12877
12875
|
async function clearDaemonServiceRuntimeState(pathInput = {}) {
|
|
12878
|
-
const { clearDaemonRuntimeLease } = await import("./daemon-runtime-lease-
|
|
12876
|
+
const { clearDaemonRuntimeLease } = await import("./daemon-runtime-lease-C-1gNOFL.js");
|
|
12879
12877
|
await Promise.all([rm(daemonServiceRuntimeStatePath(pathInput), { force: true }), clearDaemonRuntimeLease(pathInput)]);
|
|
12880
12878
|
}
|
|
12881
12879
|
async function withDaemonServiceRunLock(callback, meta = {
|
|
@@ -32752,24 +32750,27 @@ function assertNever$1$1(value) {
|
|
|
32752
32750
|
throw new Error(`Unhandled Space access variant: ${String(value)}`);
|
|
32753
32751
|
}
|
|
32754
32752
|
function resolveSpaceMemberAgentPublicCollaborationView(member) {
|
|
32755
|
-
return {
|
|
32753
|
+
return { agentWakeAvailability: member.agentWakeAvailability ?? null };
|
|
32756
32754
|
}
|
|
32757
|
-
function
|
|
32758
|
-
if (member.
|
|
32759
|
-
agentExecutionReadiness: member.
|
|
32760
|
-
|
|
32761
|
-
|
|
32762
|
-
|
|
32755
|
+
function resolveSpaceMemberAgentOwnerWakeDiagnosticsView(member) {
|
|
32756
|
+
if (member.ownerWakeDiagnostics) return {
|
|
32757
|
+
agentExecutionReadiness: member.ownerWakeDiagnostics.agentExecutionReadiness,
|
|
32758
|
+
wakeRouteEvidence: member.ownerWakeDiagnostics.wakeRouteEvidence,
|
|
32759
|
+
wakeRouteStatus: member.ownerWakeDiagnostics.wakeRouteStatus,
|
|
32760
|
+
state: member.ownerWakeDiagnostics.state,
|
|
32761
|
+
source: "owner_wake_diagnostics"
|
|
32763
32762
|
};
|
|
32764
|
-
if (member.
|
|
32763
|
+
if (member.ownerWakeDiagnostics === null) return {
|
|
32765
32764
|
agentExecutionReadiness: void 0,
|
|
32766
|
-
|
|
32765
|
+
wakeRouteEvidence: void 0,
|
|
32766
|
+
wakeRouteStatus: void 0,
|
|
32767
32767
|
state: null,
|
|
32768
32768
|
source: "none"
|
|
32769
32769
|
};
|
|
32770
32770
|
return {
|
|
32771
32771
|
agentExecutionReadiness: void 0,
|
|
32772
|
-
|
|
32772
|
+
wakeRouteEvidence: void 0,
|
|
32773
|
+
wakeRouteStatus: void 0,
|
|
32773
32774
|
state: null,
|
|
32774
32775
|
source: "none"
|
|
32775
32776
|
};
|
|
@@ -32884,67 +32885,41 @@ function buildAllowedRelations(profileKind) {
|
|
|
32884
32885
|
}
|
|
32885
32886
|
function resolveWakeAvailability(input) {
|
|
32886
32887
|
if (input.profileKind !== "agent") return {
|
|
32887
|
-
daemonRouteObservation: null,
|
|
32888
32888
|
status: "unsupported",
|
|
32889
32889
|
reasonCodes: [],
|
|
32890
32890
|
reasonText: null
|
|
32891
32891
|
};
|
|
32892
32892
|
if (!input.agentMember) throw new Error("Agent Space Message Addressing target is missing.");
|
|
32893
|
-
|
|
32894
|
-
if (publicWakeAvailability) return publicWakeAvailability;
|
|
32895
|
-
const viewerLocalRecovery = resolveSpaceMemberAgentViewerLocalRecoveryView(input.agentMember);
|
|
32896
|
-
const readiness = viewerLocalRecovery.agentExecutionReadiness ?? null;
|
|
32897
|
-
const daemonRouteObservation = viewerLocalRecovery.daemonRouteObservation ?? null;
|
|
32898
|
-
if (readiness) return {
|
|
32899
|
-
daemonRouteObservation,
|
|
32900
|
-
status: readiness.displayState === "ready" ? "ready" : "blocked",
|
|
32901
|
-
reasonCodes: [...readiness.reasonCodes],
|
|
32902
|
-
reasonText: formatAgentExecutionReadinessReason(readiness)
|
|
32903
|
-
};
|
|
32904
|
-
return {
|
|
32905
|
-
daemonRouteObservation,
|
|
32893
|
+
return resolvePublicWakeAvailability(input.agentMember) ?? {
|
|
32906
32894
|
status: "blocked",
|
|
32907
|
-
reasonCodes: ["
|
|
32895
|
+
reasonCodes: ["agent_wake_availability.missing"],
|
|
32908
32896
|
reasonText: "ATS is still checking whether this agent can reply from this computer."
|
|
32909
32897
|
};
|
|
32910
32898
|
}
|
|
32911
32899
|
function resolvePublicWakeAvailability(agentMember) {
|
|
32912
|
-
|
|
32913
|
-
|
|
32914
|
-
if (
|
|
32915
|
-
if (publicPresence.status === "available_for_wake") return {
|
|
32916
|
-
daemonRouteObservation: null,
|
|
32900
|
+
const { agentWakeAvailability } = resolveSpaceMemberAgentPublicCollaborationView(agentMember);
|
|
32901
|
+
if (!agentWakeAvailability) return null;
|
|
32902
|
+
if (agentWakeAvailability.status === "available_for_wake") return {
|
|
32917
32903
|
status: "ready",
|
|
32918
32904
|
reasonCodes: [],
|
|
32919
32905
|
reasonText: null
|
|
32920
32906
|
};
|
|
32921
|
-
if (
|
|
32922
|
-
daemonRouteObservation: null,
|
|
32907
|
+
if (agentWakeAvailability.status === "checking_connection") return {
|
|
32923
32908
|
status: "blocked",
|
|
32924
|
-
reasonCodes: ["
|
|
32909
|
+
reasonCodes: ["agent_wake_availability.checking_connection"],
|
|
32925
32910
|
reasonText: "ATS is checking this agent's local connection."
|
|
32926
32911
|
};
|
|
32927
|
-
if (
|
|
32928
|
-
daemonRouteObservation: null,
|
|
32912
|
+
if (agentWakeAvailability.status === "offline_for_wake") return {
|
|
32929
32913
|
status: "blocked",
|
|
32930
|
-
reasonCodes: ["
|
|
32914
|
+
reasonCodes: ["agent_wake_availability.offline"],
|
|
32931
32915
|
reasonText: "This agent is offline."
|
|
32932
32916
|
};
|
|
32933
32917
|
return {
|
|
32934
|
-
daemonRouteObservation: null,
|
|
32935
32918
|
status: "blocked",
|
|
32936
|
-
reasonCodes: ["
|
|
32919
|
+
reasonCodes: ["agent_wake_availability.unavailable"],
|
|
32937
32920
|
reasonText: "Ask the owner to check this agent."
|
|
32938
32921
|
};
|
|
32939
32922
|
}
|
|
32940
|
-
function formatAgentExecutionReadinessReason(readiness) {
|
|
32941
|
-
if (readiness.displayState === "ready") return "This agent can reply in this space.";
|
|
32942
|
-
if (readiness.facts.claim.executionBlocked) return "ATS cannot safely send work to this agent yet.";
|
|
32943
|
-
if (!readiness.facts.binding.routable) return "This agent is not connected to a local agent yet.";
|
|
32944
|
-
if (!readiness.facts.runtime.ready) return "ATS needs current local agent capability from this computer.";
|
|
32945
|
-
if (!readiness.facts.route.online) return "ATS cannot see this agent's local connection right now.";
|
|
32946
|
-
return "This agent cannot reply yet.";
|
|
32947
|
-
}
|
|
32948
32923
|
function buildActiveSpaceMemberInputs(snapshot) {
|
|
32949
32924
|
return [...snapshot.agents.map((member) => ({
|
|
32950
32925
|
expectedProfileKind: "agent",
|
|
@@ -33731,45 +33706,19 @@ function spaceTextHasOneShotMentionAttempts(text) {
|
|
|
33731
33706
|
return spaceTextHasCanonicalMentionAttempts(text);
|
|
33732
33707
|
}
|
|
33733
33708
|
function buildSpaceMemberAgentPresencePresentation(member) {
|
|
33734
|
-
|
|
33735
|
-
|
|
33736
|
-
|
|
33737
|
-
|
|
33738
|
-
|
|
33739
|
-
const viewerLocalRecovery = resolveSpaceMemberAgentViewerLocalRecoveryView(member);
|
|
33740
|
-
if (viewerLocalRecovery.agentExecutionReadiness) return buildReadinessPresencePresentation({
|
|
33709
|
+
return buildSpaceMemberAgentPublicCollaborationPresencePresentation(member);
|
|
33710
|
+
}
|
|
33711
|
+
function buildSpaceMemberAgentPublicCollaborationPresencePresentation(member) {
|
|
33712
|
+
const { agentWakeAvailability } = resolveSpaceMemberAgentPublicCollaborationView(member);
|
|
33713
|
+
if (agentWakeAvailability) return buildAgentWakeAvailabilityPresentation({
|
|
33741
33714
|
liveNow: member.liveNow,
|
|
33742
|
-
|
|
33715
|
+
agentWakeAvailability
|
|
33743
33716
|
});
|
|
33744
|
-
|
|
33745
|
-
...fallbackAvailabilityPresentation(),
|
|
33746
|
-
detailLabel: "Live agent",
|
|
33747
|
-
shortLabel: "live now",
|
|
33748
|
-
status: "live"
|
|
33749
|
-
} : {
|
|
33750
|
-
...fallbackCheckingAvailabilityPresentation(),
|
|
33751
|
-
detailLabel: "Checking connection",
|
|
33752
|
-
shortLabel: "checking connection",
|
|
33753
|
-
status: "checking_connection"
|
|
33754
|
-
};
|
|
33755
|
-
}
|
|
33756
|
-
function buildReadinessPresencePresentation(input) {
|
|
33757
|
-
if (input.readiness.displayState === "ready") return input.liveNow ? {
|
|
33717
|
+
if (member.liveNow) return {
|
|
33758
33718
|
...fallbackAvailabilityPresentation(),
|
|
33759
33719
|
detailLabel: "Live agent",
|
|
33760
33720
|
shortLabel: "live now",
|
|
33761
33721
|
status: "live"
|
|
33762
|
-
} : {
|
|
33763
|
-
...fallbackAvailabilityPresentation(),
|
|
33764
|
-
detailLabel: "Wakeable agent",
|
|
33765
|
-
shortLabel: "wakeable",
|
|
33766
|
-
status: "wakeable"
|
|
33767
|
-
};
|
|
33768
|
-
if (hasUnavailableRoute(input.readiness.facts.route.reasonCodes)) return {
|
|
33769
|
-
...fallbackUnavailableAvailabilityPresentation(),
|
|
33770
|
-
detailLabel: "Reply route unavailable",
|
|
33771
|
-
shortLabel: "reply route unavailable",
|
|
33772
|
-
status: "unavailable"
|
|
33773
33722
|
};
|
|
33774
33723
|
return {
|
|
33775
33724
|
...fallbackCheckingAvailabilityPresentation(),
|
|
@@ -33778,32 +33727,32 @@ function buildReadinessPresencePresentation(input) {
|
|
|
33778
33727
|
status: "checking_connection"
|
|
33779
33728
|
};
|
|
33780
33729
|
}
|
|
33781
|
-
function
|
|
33782
|
-
if (input.
|
|
33783
|
-
...
|
|
33730
|
+
function buildAgentWakeAvailabilityPresentation(input) {
|
|
33731
|
+
if (input.agentWakeAvailability.status === "available_for_wake") return input.liveNow ? {
|
|
33732
|
+
...projectAgentWakeAvailability(input.agentWakeAvailability),
|
|
33784
33733
|
detailLabel: "Live agent",
|
|
33785
33734
|
shortLabel: "live now",
|
|
33786
33735
|
status: "live"
|
|
33787
33736
|
} : {
|
|
33788
|
-
...
|
|
33737
|
+
...projectAgentWakeAvailability(input.agentWakeAvailability),
|
|
33789
33738
|
detailLabel: "Wakeable agent",
|
|
33790
33739
|
shortLabel: "wakeable",
|
|
33791
33740
|
status: "wakeable"
|
|
33792
33741
|
};
|
|
33793
|
-
if (input.
|
|
33794
|
-
...
|
|
33742
|
+
if (input.agentWakeAvailability.status === "unavailable_for_wake") return {
|
|
33743
|
+
...projectAgentWakeAvailability(input.agentWakeAvailability),
|
|
33795
33744
|
detailLabel: "Reply route unavailable",
|
|
33796
33745
|
shortLabel: "reply route unavailable",
|
|
33797
33746
|
status: "unavailable"
|
|
33798
33747
|
};
|
|
33799
|
-
if (input.
|
|
33800
|
-
...
|
|
33748
|
+
if (input.agentWakeAvailability.status === "checking_connection") return {
|
|
33749
|
+
...projectAgentWakeAvailability(input.agentWakeAvailability),
|
|
33801
33750
|
detailLabel: "Checking connection",
|
|
33802
33751
|
shortLabel: "checking connection",
|
|
33803
33752
|
status: "checking_connection"
|
|
33804
33753
|
};
|
|
33805
|
-
if (input.
|
|
33806
|
-
...
|
|
33754
|
+
if (input.agentWakeAvailability.status === "offline_for_wake") return {
|
|
33755
|
+
...projectAgentWakeAvailability(input.agentWakeAvailability),
|
|
33807
33756
|
detailLabel: "Offline agent",
|
|
33808
33757
|
shortLabel: "offline",
|
|
33809
33758
|
status: "offline"
|
|
@@ -33815,16 +33764,16 @@ function buildPublicPresencePresentation(input) {
|
|
|
33815
33764
|
status: "checking_connection"
|
|
33816
33765
|
};
|
|
33817
33766
|
}
|
|
33818
|
-
function
|
|
33767
|
+
function projectAgentWakeAvailability(agentWakeAvailability) {
|
|
33819
33768
|
return {
|
|
33820
|
-
availabilityAction:
|
|
33821
|
-
availabilityBadgeLabel:
|
|
33822
|
-
availabilityCategory:
|
|
33823
|
-
availabilityIsRefreshing:
|
|
33824
|
-
availabilityPhase:
|
|
33825
|
-
availabilityReasonCode:
|
|
33826
|
-
availabilitySummary:
|
|
33827
|
-
availabilityTooltip:
|
|
33769
|
+
availabilityAction: agentWakeAvailability.action,
|
|
33770
|
+
availabilityBadgeLabel: agentWakeAvailability.badgeLabel,
|
|
33771
|
+
availabilityCategory: agentWakeAvailability.category,
|
|
33772
|
+
availabilityIsRefreshing: agentWakeAvailability.isRefreshing,
|
|
33773
|
+
availabilityPhase: agentWakeAvailability.phase,
|
|
33774
|
+
availabilityReasonCode: agentWakeAvailability.reasonCode,
|
|
33775
|
+
availabilitySummary: agentWakeAvailability.summary,
|
|
33776
|
+
availabilityTooltip: agentWakeAvailability.tooltip
|
|
33828
33777
|
};
|
|
33829
33778
|
}
|
|
33830
33779
|
function fallbackAvailabilityPresentation() {
|
|
@@ -33851,21 +33800,6 @@ function fallbackCheckingAvailabilityPresentation() {
|
|
|
33851
33800
|
availabilityTooltip: "Checking Wake availability"
|
|
33852
33801
|
};
|
|
33853
33802
|
}
|
|
33854
|
-
function fallbackUnavailableAvailabilityPresentation() {
|
|
33855
|
-
return {
|
|
33856
|
-
availabilityAction: null,
|
|
33857
|
-
availabilityBadgeLabel: "Unavailable",
|
|
33858
|
-
availabilityCategory: "unavailable",
|
|
33859
|
-
availabilityIsRefreshing: false,
|
|
33860
|
-
availabilityPhase: "unavailable",
|
|
33861
|
-
availabilityReasonCode: null,
|
|
33862
|
-
availabilitySummary: "This agent cannot reply from this computer right now.",
|
|
33863
|
-
availabilityTooltip: "Unavailable for Wake"
|
|
33864
|
-
};
|
|
33865
|
-
}
|
|
33866
|
-
function hasUnavailableRoute(reasonCodes) {
|
|
33867
|
-
return reasonCodes.some((reasonCode) => reasonCode === "route.unavailable" || reasonCode === "agent_execution.route_unavailable");
|
|
33868
|
-
}
|
|
33869
33803
|
function createSpaceMemberIdentityIndex(input) {
|
|
33870
33804
|
const byProfileId = /* @__PURE__ */ new Map();
|
|
33871
33805
|
for (const signal of input.signals ?? []) registerSignalIdentity(byProfileId, signal);
|
|
@@ -41321,13 +41255,11 @@ function parseSendTargetProjectionEntry(value, index) {
|
|
|
41321
41255
|
function parseWakeAvailability(value, index) {
|
|
41322
41256
|
const record = toRecord$1(value, `ATS Space Action target projection entry ${index} wakeAvailability`);
|
|
41323
41257
|
if (record.status === "unsupported") return {
|
|
41324
|
-
daemonRouteObservation: null,
|
|
41325
41258
|
status: "unsupported",
|
|
41326
41259
|
reasonCodes: [],
|
|
41327
41260
|
reasonText: null
|
|
41328
41261
|
};
|
|
41329
41262
|
if (record.status === "ready" || record.status === "blocked") return {
|
|
41330
|
-
daemonRouteObservation: record.daemonRouteObservation && typeof record.daemonRouteObservation === "object" ? record.daemonRouteObservation : null,
|
|
41331
41263
|
status: record.status,
|
|
41332
41264
|
reasonCodes: parseStringArray(record.reasonCodes),
|
|
41333
41265
|
reasonText: optionalString(record.reasonText)
|
|
@@ -45443,6 +45375,8 @@ async function runDaemonSocketSession(input) {
|
|
|
45443
45375
|
let nextCatalogSyncAtMs = 0;
|
|
45444
45376
|
let nextProviderConversationProofSyncAtMs = 0;
|
|
45445
45377
|
let nextRuntimeAgentControllerReportSyncAtMs = 0;
|
|
45378
|
+
let providerConversationProofSyncInFlight = false;
|
|
45379
|
+
let runtimeAgentControllerReportSyncInFlight = false;
|
|
45446
45380
|
let latestCatalogSyncStatus = null;
|
|
45447
45381
|
let latestSkippedProfilesFingerprint = null;
|
|
45448
45382
|
let latestCatalogSyncSignalUpdatedAtMs = 0;
|
|
@@ -45682,8 +45616,6 @@ async function runDaemonSocketSession(input) {
|
|
|
45682
45616
|
heartbeatAt: nowIsoString(),
|
|
45683
45617
|
updatedAt: nowIsoString()
|
|
45684
45618
|
});
|
|
45685
|
-
await syncRuntimeAgentControllerReportsIfDue();
|
|
45686
|
-
await syncProviderConversationProofsIfDue();
|
|
45687
45619
|
flushDispatchResultOutbox({
|
|
45688
45620
|
currentSocketRef,
|
|
45689
45621
|
ledgerPaths: input.ledgerPaths,
|
|
@@ -45712,6 +45644,7 @@ async function runDaemonSocketSession(input) {
|
|
|
45712
45644
|
code: "daemon.run.heartbeat",
|
|
45713
45645
|
text: `heartbeat ok; active leases=${leasesByProfileId.size}, stale leases=${heartbeatResponse.staleLeases.length}, next=${String(currentHeartbeatIntervalMs)}ms`
|
|
45714
45646
|
});
|
|
45647
|
+
startSupplementalEvidenceSyncs();
|
|
45715
45648
|
} catch (error) {
|
|
45716
45649
|
consecutiveHeartbeatFailures += 1;
|
|
45717
45650
|
const shouldCloseSocket = consecutiveHeartbeatFailures >= HEARTBEAT_CONSECUTIVE_FAILURES_BEFORE_CLOSE;
|
|
@@ -46008,7 +45941,8 @@ async function runDaemonSocketSession(input) {
|
|
|
46008
45941
|
await runCatalogSync(forceReason ? { forceReason } : void 0);
|
|
46009
45942
|
};
|
|
46010
45943
|
const syncRuntimeAgentControllerReportsIfDue = async () => {
|
|
46011
|
-
if (Date.now() < nextRuntimeAgentControllerReportSyncAtMs) return;
|
|
45944
|
+
if (runtimeAgentControllerReportSyncInFlight || Date.now() < nextRuntimeAgentControllerReportSyncAtMs) return;
|
|
45945
|
+
runtimeAgentControllerReportSyncInFlight = true;
|
|
46012
45946
|
try {
|
|
46013
45947
|
const result = await syncLocalServiceRuntimeAgentControllerReports({ localAdapterContainer: input.localAdapterContainer });
|
|
46014
45948
|
const retryInMs = result.failedCount > 0 ? RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_RETRY_INTERVAL_MS : RUNTIME_AGENT_CONTROLLER_REPORT_SYNC_INTERVAL_MS;
|
|
@@ -46037,10 +45971,13 @@ async function runDaemonSocketSession(input) {
|
|
|
46037
45971
|
code: "daemon.run.runtime_agent_controller_report_sync_failed",
|
|
46038
45972
|
text: `runtime agent controller report sync failed: ${toErrorMessage$29(error)}`
|
|
46039
45973
|
});
|
|
45974
|
+
} finally {
|
|
45975
|
+
runtimeAgentControllerReportSyncInFlight = false;
|
|
46040
45976
|
}
|
|
46041
45977
|
};
|
|
46042
45978
|
const syncProviderConversationProofsIfDue = async () => {
|
|
46043
|
-
if (Date.now() < nextProviderConversationProofSyncAtMs) return;
|
|
45979
|
+
if (providerConversationProofSyncInFlight || Date.now() < nextProviderConversationProofSyncAtMs) return;
|
|
45980
|
+
providerConversationProofSyncInFlight = true;
|
|
46044
45981
|
try {
|
|
46045
45982
|
const result = await syncLocalServiceProviderConversationProofs({ routeCatalog: createRouteCatalogFromMutableState(input.routeCatalogState) });
|
|
46046
45983
|
const retryInMs = result.failedCount > 0 ? PROVIDER_CONVERSATION_PROOF_SYNC_RETRY_INTERVAL_MS : PROVIDER_CONVERSATION_PROOF_SYNC_INTERVAL_MS;
|
|
@@ -46069,8 +46006,26 @@ async function runDaemonSocketSession(input) {
|
|
|
46069
46006
|
code: "daemon.run.provider_conversation_proof_sync_failed",
|
|
46070
46007
|
text: `provider conversation proof sync failed: ${toErrorMessage$29(error)}`
|
|
46071
46008
|
});
|
|
46009
|
+
} finally {
|
|
46010
|
+
providerConversationProofSyncInFlight = false;
|
|
46072
46011
|
}
|
|
46073
46012
|
};
|
|
46013
|
+
const startSupplementalEvidenceSyncs = () => {
|
|
46014
|
+
syncRuntimeAgentControllerReportsIfDue().catch((error) => {
|
|
46015
|
+
emitRunLine({
|
|
46016
|
+
presenter: input.presenter,
|
|
46017
|
+
code: "daemon.run.runtime_agent_controller_report_sync_failed",
|
|
46018
|
+
text: `runtime agent controller report sync failed: ${toErrorMessage$29(error)}`
|
|
46019
|
+
});
|
|
46020
|
+
});
|
|
46021
|
+
syncProviderConversationProofsIfDue().catch((error) => {
|
|
46022
|
+
emitRunLine({
|
|
46023
|
+
presenter: input.presenter,
|
|
46024
|
+
code: "daemon.run.provider_conversation_proof_sync_failed",
|
|
46025
|
+
text: `provider conversation proof sync failed: ${toErrorMessage$29(error)}`
|
|
46026
|
+
});
|
|
46027
|
+
});
|
|
46028
|
+
};
|
|
46074
46029
|
input.socket.onError((error) => {
|
|
46075
46030
|
emitRunLine({
|
|
46076
46031
|
presenter: input.presenter,
|
|
@@ -63253,7 +63208,7 @@ function buildSpaceMemberAgentStatusLine(member, snapshot) {
|
|
|
63253
63208
|
return joinStyledMetadataSegments(segments);
|
|
63254
63209
|
}
|
|
63255
63210
|
function formatSpaceMemberManualParticipationSegment(member) {
|
|
63256
|
-
const readiness =
|
|
63211
|
+
const readiness = resolveSpaceMemberAgentOwnerWakeDiagnosticsView(member).agentExecutionReadiness ?? null;
|
|
63257
63212
|
if (!readiness) return null;
|
|
63258
63213
|
if (hasManualParticipationOnlyReason(readiness.reasonCodes)) return "manual join/send only";
|
|
63259
63214
|
return null;
|
|
@@ -81165,7 +81120,7 @@ function resolveExpectedWakeProjectionProfileIds(result) {
|
|
|
81165
81120
|
return result.added.filter((candidate) => candidate.profileKind === "agent" && candidate.localParticipationReadiness === "ready").map((candidate) => candidate.profileId);
|
|
81166
81121
|
}
|
|
81167
81122
|
function hasExpectedWakeProjection(membersSnapshot, expectedProfileIds) {
|
|
81168
|
-
const wakeableProfileIds = new Set(membersSnapshot.agents.filter((member) => member.status === "active" && member.
|
|
81123
|
+
const wakeableProfileIds = new Set(membersSnapshot.agents.filter((member) => member.status === "active" && member.agentWakeAvailability?.status === "available_for_wake").map((member) => member.profileId));
|
|
81169
81124
|
for (const profileId of expectedProfileIds) if (!wakeableProfileIds.has(profileId)) return false;
|
|
81170
81125
|
return true;
|
|
81171
81126
|
}
|
|
@@ -82474,7 +82429,7 @@ function resolveKnownSpaceVisibilityScope(input) {
|
|
|
82474
82429
|
return "profile";
|
|
82475
82430
|
}
|
|
82476
82431
|
function shouldLoadCloudKnownSpaces(input) {
|
|
82477
|
-
if (input.command === "join" || input.command === "delete" || input.command === "password" || input.command === "add_members" || input.command === "leave") return true;
|
|
82432
|
+
if (input.command === "join" || input.command === "delete" || input.command === "password" || input.command === "add_members" || input.command === "remove_members" || input.command === "leave") return true;
|
|
82478
82433
|
return input.visibilityScope === "owner";
|
|
82479
82434
|
}
|
|
82480
82435
|
function sortKnownSpacesForSelection(spaces) {
|
|
@@ -84053,15 +84008,12 @@ async function resolveAgentProfileRuntimeState(profile, _input = {}) {
|
|
|
84053
84008
|
});
|
|
84054
84009
|
const agentReplyReadiness = currentReplyReadiness.agentReplyReadiness;
|
|
84055
84010
|
const workspace = buildProfileWorkspacePresentation(currentReplyReadiness.profileWorkspaceRuntimeResolution);
|
|
84056
|
-
const replyState =
|
|
84057
|
-
agentReplyReadiness,
|
|
84058
|
-
daemonRouteObservation: currentReplyReadiness.daemonRouteObservation
|
|
84059
|
-
});
|
|
84011
|
+
const replyState = resolveReplyState(agentReplyReadiness);
|
|
84060
84012
|
const localAgentId = agentReplyReadiness?.localAgentId ?? null;
|
|
84061
84013
|
const localAgentDisplayName = localAgentId ? resolveHumanControllerDisplayName({ agentControllerRef: `builtin:${localAgentId}` }) || localAgentId : null;
|
|
84062
84014
|
const localAgentEnabled = localAgentId && agentReplyReadiness ? !agentReplyReadiness.reasonCodes.includes("controller.registry.disabled") : null;
|
|
84063
84015
|
return {
|
|
84064
|
-
|
|
84016
|
+
wakeRouteEvidence: currentReplyReadiness.daemonRouteObservation,
|
|
84065
84017
|
openClawLocalDiagnostics: resolveOpenClawLocalDiagnosticsValue(currentReplyReadiness.openClawLocalDiagnostics),
|
|
84066
84018
|
transportMode: agentReplyReadiness?.transportMode ?? RAW_NOT_CONFIGURED,
|
|
84067
84019
|
...replyState,
|
|
@@ -84071,8 +84023,8 @@ async function resolveAgentProfileRuntimeState(profile, _input = {}) {
|
|
|
84071
84023
|
workspace
|
|
84072
84024
|
};
|
|
84073
84025
|
}
|
|
84074
|
-
function
|
|
84075
|
-
if (!
|
|
84026
|
+
function resolveReplyState(agentReplyReadiness) {
|
|
84027
|
+
if (!agentReplyReadiness) return {
|
|
84076
84028
|
autoReplyReady: false,
|
|
84077
84029
|
autoReplyReason: "reply readiness is not available",
|
|
84078
84030
|
replyReadiness: "unknown",
|
|
@@ -84080,31 +84032,16 @@ function resolveRouteAwareReplyState(input) {
|
|
|
84080
84032
|
replyReadinessReasonCodes: [],
|
|
84081
84033
|
replyReadinessReasonText: "reply readiness is not available"
|
|
84082
84034
|
};
|
|
84083
|
-
|
|
84084
|
-
const reasonText = describeRouteObservationReplyBlocker(input.daemonRouteObservation);
|
|
84085
|
-
return {
|
|
84086
|
-
autoReplyReady: false,
|
|
84087
|
-
autoReplyReason: reasonText,
|
|
84088
|
-
replyReadiness: "blocked",
|
|
84089
|
-
replyReadinessLabel: `blocked (${reasonText})`,
|
|
84090
|
-
replyReadinessReasonCodes: [input.daemonRouteObservation.reasonCode],
|
|
84091
|
-
replyReadinessReasonText: reasonText
|
|
84092
|
-
};
|
|
84093
|
-
}
|
|
84094
|
-
const readiness = mapAgentReplyReadinessToLegacyAutoReply(input.agentReplyReadiness);
|
|
84035
|
+
const readiness = mapAgentReplyReadinessToLegacyAutoReply(agentReplyReadiness);
|
|
84095
84036
|
return {
|
|
84096
84037
|
autoReplyReady: readiness.ready,
|
|
84097
84038
|
autoReplyReason: readiness.reason,
|
|
84098
|
-
replyReadiness:
|
|
84099
|
-
replyReadinessLabel: formatAgentReplyReadinessLabel(
|
|
84100
|
-
replyReadinessReasonCodes: [...
|
|
84101
|
-
replyReadinessReasonText:
|
|
84039
|
+
replyReadiness: agentReplyReadiness.replyReadiness,
|
|
84040
|
+
replyReadinessLabel: formatAgentReplyReadinessLabel(agentReplyReadiness),
|
|
84041
|
+
replyReadinessReasonCodes: [...agentReplyReadiness.reasonCodes],
|
|
84042
|
+
replyReadinessReasonText: agentReplyReadiness.reasonText
|
|
84102
84043
|
};
|
|
84103
84044
|
}
|
|
84104
|
-
function describeRouteObservationReplyBlocker(observation) {
|
|
84105
|
-
if (observation.status === "offline") return "server cannot reach this device";
|
|
84106
|
-
return "server route is not confirmed";
|
|
84107
|
-
}
|
|
84108
84045
|
function buildAgentProfileRuntimeRows(runtimeState) {
|
|
84109
84046
|
if (!runtimeState) return [];
|
|
84110
84047
|
return [
|
|
@@ -84117,9 +84054,9 @@ function buildAgentProfileRuntimeRows(runtimeState) {
|
|
|
84117
84054
|
label: "Can Reply in Space",
|
|
84118
84055
|
value: formatHumanReplyReadinessLabel(runtimeState.replyReadinessLabel)
|
|
84119
84056
|
},
|
|
84120
|
-
...runtimeState.
|
|
84057
|
+
...runtimeState.wakeRouteEvidence ? [{
|
|
84121
84058
|
label: "Server Can Reach This Device",
|
|
84122
|
-
value: formatDaemonRouteObservationLabel(runtimeState.
|
|
84059
|
+
value: formatDaemonRouteObservationLabel(runtimeState.wakeRouteEvidence)
|
|
84123
84060
|
}] : [],
|
|
84124
84061
|
...buildProfileWorkspaceRows(runtimeState.workspace),
|
|
84125
84062
|
...buildOpenClawRuntimeRows(runtimeState.openClawLocalDiagnostics)
|
|
@@ -84128,7 +84065,7 @@ function buildAgentProfileRuntimeRows(runtimeState) {
|
|
|
84128
84065
|
function buildAgentProfileRuntimeData(runtimeState) {
|
|
84129
84066
|
if (!runtimeState) return {};
|
|
84130
84067
|
return {
|
|
84131
|
-
|
|
84068
|
+
wakeRouteEvidence: runtimeState.wakeRouteEvidence,
|
|
84132
84069
|
transportMode: runtimeState.transportMode,
|
|
84133
84070
|
replyReadiness: runtimeState.replyReadiness,
|
|
84134
84071
|
replyReadinessLabel: runtimeState.replyReadinessLabel,
|