agent-transport-system 0.6.3 → 0.6.5
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 +94 -70
- package/dist/ats.js.map +1 -1
- package/dist/{daemon-runtime-lease-CPbMaqMB.js → daemon-runtime-lease-U1Vdl_Hk.js} +1 -1
- package/dist/{lock-BcF0dHom.js → lock-BYMWvQAg.js} +2 -2
- package/dist/lock-BYMWvQAg.js.map +1 -0
- package/dist/{runtime-config-DYCRuhwW.js → runtime-config-CxhCKyAq.js} +33 -9
- package/dist/runtime-config-CxhCKyAq.js.map +1 -0
- package/package.json +2 -2
- package/skills/ats-cli/SKILL.md +4 -2
- package/skills/ats-cli/playbooks/space-ops.md +1 -1
- package/skills/ats-cli/references/commands.md +1 -1
- package/skills/ats-cli/references/runtime-resolution.md +1 -1
- package/dist/lock-BcF0dHom.js.map +0 -1
- package/dist/runtime-config-DYCRuhwW.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-BYMWvQAg.js";
|
|
4
|
+
import { v as DEV_LOCAL_GATEWAY_BASE_URL } from "./runtime-config-CxhCKyAq.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 getAgentExecutionReadinessBatchBodySchema, $n as atsdTaskResultEnvelopeWriteSchema, $t as serverErrorFrameSchema, A as claimExecutionDiagnosticsResponseSchema, An as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, Ar as resolveSpaceMentionLabels, At as observabilityWakeTraceSelectorSchema, B as currentLocalRuntimeReplyReadinessResponseSchema, Bn as DISPATCH_ACTIVITY_FAILED_PURPOSE, Bt as postSpaceThreadSignalResponseSchema, C as atsdControlPlaneRequestSchema, Cn as submitRuntimeRegistrationBodySchema, Cr as normalizeOptionalWorkingDirectory, Ct as localRuntimesResponseSchema, D as canonicalizeControllerRefForKind, Dn as writeCurrentDeviceObservedMetadataBodySchema, Dr as resolveBuiltinUpstreamConversationRefKind, Dt as normalizeSpaceCursorPatch, E as canonicalizeBuiltinControllerRef, En as upsertSpaceDeletionTombstoneResponseSchema, Er as profileWorkspaceModeSchema, Et as normalizeListSignalsReadQuerySemantics, F as createSpaceResponseSchema, Fn as ATSD_TASK_RESULT_SCHEMA_VERSION, Ft as postNormalMessageBodySchema, G as ensureAgentProfilePrimaryBindingBodySchema, Gn as MESSAGE_MENTION_TYPE_VALUES, Gt as providerDispatchRuntimeContextSchema, H as daemonRuntimeLeaseSchema, Hn as LEGACY_RUNTIME_DISPATCH_POLICY, Ht as prepareSessionStreamServerFrameSchema, I as createSpaceThreadBodySchema, In as CONVERSATION_CONTINUITY_WARNING_PURPOSE, It as postNormalMessageResponseSchema, J as finalClaimRouteParamsSchema, Jn as SPACE_MENTION_REJECT_NOTICE_PURPOSE, Jt as reserveFinalClaimBodySchema, K as ensureAgentProfilePrimaryBindingResponseSchema, Kn as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, Kt as querySpaceDeletionTombstonesResponseSchema, L as createSpaceThreadResponseSchema, Ln as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, Lt as postSpaceMembersBodySchema, M as createSpaceBodySchema, Mn as AGENT_REPLYING_PURPOSE, Mt as patchSpaceContractBodySchema, N as createSpaceDiagnosticReportBodySchema, Nn as AGENT_REPLY_PREVIEW_END_PURPOSE, Nr as runtimeCoordinatorExecutionTokenEnvelopeSchema, Nt as patchSpaceContractResponseSchema, O as catchupResponseSchema, On as writeCurrentDeviceObservedMetadataResponseSchema, Or as resolveMessageEnvelopeTargetField, Ot as notifyAgentProfileRouteCatalogChangedBodySchema, P as createSpaceDiagnosticReportResponseSchema, Pn as AGENT_REPLY_PREVIEW_PURPOSE, Pr as sanitizeSignalTextPreview, Pt as patchStartSessionBodySchema, Q as gatewayErrorEnvelopeSchema, Qn as atsSpaceEgressActionSchema, Qt as resolveStartHandoffResponseSchema, R as createStartSessionBodySchema, Rn as DAEMON_HUB_SCHEMA_VERSION, Rt as postSpaceMembersResponseSchema, S as atsRequestContextSchema, Sn as submitRuntimeCapabilityReportsResponseSchema, Sr as normalizeMessageEnvelope, St as localRuntimesQuerySchema, T as buildControllerRoutingKeyForKind, Tn as upsertProfileSpaceHistoryResponseSchema, Tr as parseOptionalClientMessageId, Tt as normalizeBuiltinControllerProviderId, U as deleteSpaceResponseSchema, Un as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, Ut as projectObservabilityWakeCorrelation, V as daemonRouteObservationResponseSchema, Vn as DISPATCH_ACTIVITY_RETRYING_PURPOSE, Vt as prepareSessionResponseSchema, W as dispatchBriefSchema, Wn as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, Wt as projectSpaceDispatchTraceFinalVisibleOutcome, X as forgetCurrentComputerResponseSchema, Xn as SPACE_UPDATES_MAX_LIMIT, Xt as resolveSpaceDispatchTraceRootCause, Y as forgetComputerResponseSchema, Yn as SPACE_PASSWORD_MIN_LENGTH, Yt as resolveBuiltinProviderConversationCapability, Z as gatewayErrorCodeSchema, Zn as atsRuntimeProfileIdSchema, Zt as resolveStartHandoffBodySchema, _ as ATSD_CONTROL_PLANE_SCHEMA_VERSION, _n as startSessionSpaceChoiceBodySchema, _r as daemonHubSubmitTaskResultRequestSchema, _t as leaveSpaceResponseSchema, a as runWithHeldLock, an as spaceConversationBindingImportResponseSchema, ar as createDaemonRouteObservationSummary, at as getSpaceContractResponseSchema, b as agentProfileBindingRouteParamsSchema, bn as structuredGuidePayloadFromInputSchema, br as formatCanonicalMentionLiteral, bt as listSpaceThreadSignalsResponseSchema, c as LEGACY_ATS_RUNTIME_SESSION_ENV_KEY, cn as spaceCreatorSchema, cr as daemonHubDispatchLifecycleRequestSchema, ct as getSpaceDispatchLookupResponseSchema, d as resolveRuntimeSession, dn as spaceMetaSchema, dr as daemonHubDispatchRuntimeEvidenceRequestSchema, dt as getSpaceThreadResponseSchema, en as setCurrentDeviceTargetBodySchema, er as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, et as getAgentExecutionReadinessBatchResponseSchema, f as resolveRuntimeSessionId, fn as spaceViewerMembershipResponseSchema, fr as daemonHubHeartbeatRequestSchema, ft as getSpaceUpdatesResponseSchema, g as resolveMappedPublicAgentFailureReason, gn as startSessionResponseSchema, gr as daemonHubRouteCatalogChangedFramePayloadSchema, gt as isExplicitBuiltinControllerRef, h as resolveBuiltinAgentControllerBrand, hn as startSessionProgressSchema, hr as daemonHubRegisterSessionResponseSchema, ht as incomingServerMessageSchema, i as releaseLock, in as spaceConversationBindingDeleteResponseSchema, ir as conversationExecutionStateSchema, it as getPrepareReadinessResponseSchema, j as continuitySchema, jn as AGENT_REPLYING_END_PURPOSE, jt as patchProfileSpaceHistoryStatusResponseSchema, k as claimExecutionDiagnosticsQuerySchema, kn as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, kr as resolveSingleSpaceMentionLabels, kt as notifyAgentProfileRouteCatalogChangedResponseSchema, l as listRuntimeSessionStates, ln as spaceDispatchTraceResponseSchema, lr as daemonHubDispatchPreviewEndRequestSchema, lt as getSpaceDispatchResultResponseSchema, m as CODEX_UPGRADE_REQUIRED_REASON, mn as startProfileReadinessSummarySchema, mr as daemonHubRegisterSessionRequestSchema, mt as getSpaceWakeTraceWaterfallResponseSchema, n as isAtsLockError, nn as signalEnvelopeSchema, nr as buildUpstreamConversationRef, nt as getAgentProfilePrimaryBindingResponseSchema, o as tryCleanupStaleLock, on as spaceConversationBindingResponseSchema, or as daemonHubDeliverDispatchRequestSchema, ot as getSpaceConversationRemoteStatusResponseSchema, p as writeRuntimeSessionState, pn as startDeviceProjectionSchema, pr as daemonHubHeartbeatResponseSchema, pt as getSpaceWakeProgressResponseSchema, q as entryBriefSchema, qn as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, qt as removeSpaceMembersResponseSchema, r as readLockMeta, rn as spaceConversationBindingConflictResponseSchema, rr as collectCanonicalMentionTextFragments, rt as getPrepareReadinessQuerySchema, s as ATS_RUNTIME_SESSION_ENV_KEY, sn as spaceConversationBindingUpsertResponseSchema, sr as daemonHubDeliveryExecutionIdentitySchema, st as getSpaceConversationStatusResponseSchema, t as acquireLock, tn as setLocalRuntimeDisplayNameBodySchema, tr as atsdTaskResultPayloadSchema, tt as getAgentExecutionReadinessResponseSchema, u as readRuntimeSessionState, un as spaceMembersSnapshotSchema, ur as daemonHubDispatchPreviewRequestSchema, ut as getSpaceStatusResponseSchema, v as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, vn as startSessionSpaceChoiceResponseSchema, vr as daemonServiceContractSchema, vt as listProfileSpaceHistoryResponseSchema, w as atsdControlPlaneResponseSchema, wn as submitRuntimeRegistrationResponseSchema, wr as normalizeSpacePasswordText, wt as normalizeBuiltinControllerAgentId, x as atsProfileIdSchema, xn as submitRuntimeCapabilityReportsBodySchema, xr as getSpaceMessageAddressingRelationSupportForTargetKind, xt as listSpaceThreadsResponseSchema, y as agentExecutionReadinessRouteParamsSchema, yn as startSessionWithTokenResponseSchema, yr as daemonStreamFrameSchema, yt as listSpaceThreadEventsResponseSchema, z as currentDeviceTargetResponseSchema, zn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, zt as postSpaceThreadSignalBodySchema } from "./lock-
|
|
3
|
+
import { $ as getAgentExecutionReadinessBatchBodySchema, $n as atsdTaskResultEnvelopeWriteSchema, $t as serverErrorFrameSchema, A as claimExecutionDiagnosticsResponseSchema, An as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, Ar as resolveSpaceMentionLabels, At as observabilityWakeTraceSelectorSchema, B as currentLocalRuntimeReplyReadinessResponseSchema, Bn as DISPATCH_ACTIVITY_FAILED_PURPOSE, Bt as postSpaceThreadSignalResponseSchema, C as atsdControlPlaneRequestSchema, Cn as submitRuntimeRegistrationBodySchema, Cr as normalizeOptionalWorkingDirectory, Ct as localRuntimesResponseSchema, D as canonicalizeControllerRefForKind, Dn as writeCurrentDeviceObservedMetadataBodySchema, Dr as resolveBuiltinUpstreamConversationRefKind, Dt as normalizeSpaceCursorPatch, E as canonicalizeBuiltinControllerRef, En as upsertSpaceDeletionTombstoneResponseSchema, Er as profileWorkspaceModeSchema, Et as normalizeListSignalsReadQuerySemantics, F as createSpaceResponseSchema, Fn as ATSD_TASK_RESULT_SCHEMA_VERSION, Ft as postNormalMessageBodySchema, G as ensureAgentProfilePrimaryBindingBodySchema, Gn as MESSAGE_MENTION_TYPE_VALUES, Gt as providerDispatchRuntimeContextSchema, H as daemonRuntimeLeaseSchema, Hn as LEGACY_RUNTIME_DISPATCH_POLICY, Ht as prepareSessionStreamServerFrameSchema, I as createSpaceThreadBodySchema, In as CONVERSATION_CONTINUITY_WARNING_PURPOSE, It as postNormalMessageResponseSchema, J as finalClaimRouteParamsSchema, Jn as SPACE_MENTION_REJECT_NOTICE_PURPOSE, Jt as reserveFinalClaimBodySchema, K as ensureAgentProfilePrimaryBindingResponseSchema, Kn as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, Kt as querySpaceDeletionTombstonesResponseSchema, L as createSpaceThreadResponseSchema, Ln as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, Lt as postSpaceMembersBodySchema, M as createSpaceBodySchema, Mn as AGENT_REPLYING_PURPOSE, Mt as patchSpaceContractBodySchema, N as createSpaceDiagnosticReportBodySchema, Nn as AGENT_REPLY_PREVIEW_END_PURPOSE, Nr as runtimeCoordinatorExecutionTokenEnvelopeSchema, Nt as patchSpaceContractResponseSchema, O as catchupResponseSchema, On as writeCurrentDeviceObservedMetadataResponseSchema, Or as resolveMessageEnvelopeTargetField, Ot as notifyAgentProfileRouteCatalogChangedBodySchema, P as createSpaceDiagnosticReportResponseSchema, Pn as AGENT_REPLY_PREVIEW_PURPOSE, Pr as sanitizeSignalTextPreview, Pt as patchStartSessionBodySchema, Q as gatewayErrorEnvelopeSchema, Qn as atsSpaceEgressActionSchema, Qt as resolveStartHandoffResponseSchema, R as createStartSessionBodySchema, Rn as DAEMON_HUB_SCHEMA_VERSION, Rt as postSpaceMembersResponseSchema, S as atsRequestContextSchema, Sn as submitRuntimeCapabilityReportsResponseSchema, Sr as normalizeMessageEnvelope, St as localRuntimesQuerySchema, T as buildControllerRoutingKeyForKind, Tn as upsertProfileSpaceHistoryResponseSchema, Tr as parseOptionalClientMessageId, Tt as normalizeBuiltinControllerProviderId, U as deleteSpaceResponseSchema, Un as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, Ut as projectObservabilityWakeCorrelation, V as daemonRouteObservationResponseSchema, Vn as DISPATCH_ACTIVITY_RETRYING_PURPOSE, Vt as prepareSessionResponseSchema, W as dispatchBriefSchema, Wn as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, Wt as projectSpaceDispatchTraceFinalVisibleOutcome, X as forgetCurrentComputerResponseSchema, Xn as SPACE_UPDATES_MAX_LIMIT, Xt as resolveSpaceDispatchTraceRootCause, Y as forgetComputerResponseSchema, Yn as SPACE_PASSWORD_MIN_LENGTH, Yt as resolveBuiltinProviderConversationCapability, Z as gatewayErrorCodeSchema, Zn as atsRuntimeProfileIdSchema, Zt as resolveStartHandoffBodySchema, _ as ATSD_CONTROL_PLANE_SCHEMA_VERSION, _n as startSessionSpaceChoiceBodySchema, _r as daemonHubSubmitTaskResultRequestSchema, _t as leaveSpaceResponseSchema, a as runWithHeldLock, an as spaceConversationBindingImportResponseSchema, ar as createDaemonRouteObservationSummary, at as getSpaceContractResponseSchema, b as agentProfileBindingRouteParamsSchema, bn as structuredGuidePayloadFromInputSchema, br as formatCanonicalMentionLiteral, bt as listSpaceThreadSignalsResponseSchema, c as LEGACY_ATS_RUNTIME_SESSION_ENV_KEY, cn as spaceCreatorSchema, cr as daemonHubDispatchLifecycleRequestSchema, ct as getSpaceDispatchLookupResponseSchema, d as resolveRuntimeSession, dn as spaceMetaSchema, dr as daemonHubDispatchRuntimeEvidenceRequestSchema, dt as getSpaceThreadResponseSchema, en as setCurrentDeviceTargetBodySchema, er as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, et as getAgentExecutionReadinessBatchResponseSchema, f as resolveRuntimeSessionId, fn as spaceViewerMembershipResponseSchema, fr as daemonHubHeartbeatRequestSchema, ft as getSpaceUpdatesResponseSchema, g as resolveMappedPublicAgentFailureReason, gn as startSessionResponseSchema, gr as daemonHubRouteCatalogChangedFramePayloadSchema, gt as isExplicitBuiltinControllerRef, h as resolveBuiltinAgentControllerBrand, hn as startSessionProgressSchema, hr as daemonHubRegisterSessionResponseSchema, ht as incomingServerMessageSchema, i as releaseLock, in as spaceConversationBindingDeleteResponseSchema, ir as conversationExecutionStateSchema, it as getPrepareReadinessResponseSchema, j as continuitySchema, jn as AGENT_REPLYING_END_PURPOSE, jt as patchProfileSpaceHistoryStatusResponseSchema, k as claimExecutionDiagnosticsQuerySchema, kn as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, kr as resolveSingleSpaceMentionLabels, kt as notifyAgentProfileRouteCatalogChangedResponseSchema, l as listRuntimeSessionStates, ln as spaceDispatchTraceResponseSchema, lr as daemonHubDispatchPreviewEndRequestSchema, lt as getSpaceDispatchResultResponseSchema, m as CODEX_UPGRADE_REQUIRED_REASON, mn as startProfileReadinessSummarySchema, mr as daemonHubRegisterSessionRequestSchema, mt as getSpaceWakeTraceWaterfallResponseSchema, n as isAtsLockError, nn as signalEnvelopeSchema, nr as buildUpstreamConversationRef, nt as getAgentProfilePrimaryBindingResponseSchema, o as tryCleanupStaleLock, on as spaceConversationBindingResponseSchema, or as daemonHubDeliverDispatchRequestSchema, ot as getSpaceConversationRemoteStatusResponseSchema, p as writeRuntimeSessionState, pn as startDeviceProjectionSchema, pr as daemonHubHeartbeatResponseSchema, pt as getSpaceWakeProgressResponseSchema, q as entryBriefSchema, qn as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, qt as removeSpaceMembersResponseSchema, r as readLockMeta, rn as spaceConversationBindingConflictResponseSchema, rr as collectCanonicalMentionTextFragments, rt as getPrepareReadinessQuerySchema, s as ATS_RUNTIME_SESSION_ENV_KEY, sn as spaceConversationBindingUpsertResponseSchema, sr as daemonHubDeliveryExecutionIdentitySchema, st as getSpaceConversationStatusResponseSchema, t as acquireLock, tn as setLocalRuntimeDisplayNameBodySchema, tr as atsdTaskResultPayloadSchema, tt as getAgentExecutionReadinessResponseSchema, u as readRuntimeSessionState, un as spaceMembersSnapshotSchema, ur as daemonHubDispatchPreviewRequestSchema, ut as getSpaceStatusResponseSchema, v as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, vn as startSessionSpaceChoiceResponseSchema, vr as daemonServiceContractSchema, vt as listProfileSpaceHistoryResponseSchema, w as atsdControlPlaneResponseSchema, wn as submitRuntimeRegistrationResponseSchema, wr as normalizeSpacePasswordText, wt as normalizeBuiltinControllerAgentId, x as atsProfileIdSchema, xn as submitRuntimeCapabilityReportsBodySchema, xr as getSpaceMessageAddressingRelationSupportForTargetKind, xt as listSpaceThreadsResponseSchema, y as agentExecutionReadinessRouteParamsSchema, yn as startSessionWithTokenResponseSchema, yr as daemonStreamFrameSchema, yt as listSpaceThreadEventsResponseSchema, z as currentDeviceTargetResponseSchema, zn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, zt as postSpaceThreadSignalBodySchema } from "./lock-BYMWvQAg.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-CxhCKyAq.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.6.
|
|
30
|
+
var version = "0.6.5";
|
|
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-05-
|
|
35
|
+
atsReleaseDate: "2026-05-28",
|
|
36
36
|
description: "Agent Transport System CLI - https://ats.sh",
|
|
37
37
|
license: "MIT",
|
|
38
38
|
type: "module",
|
|
@@ -4061,7 +4061,7 @@ async function setDaemonServiceRuntimeState(state, pathInput = {}) {
|
|
|
4061
4061
|
await writeDaemonServiceRuntimeState(state, pathInput);
|
|
4062
4062
|
}
|
|
4063
4063
|
async function clearDaemonServiceRuntimeState(pathInput = {}) {
|
|
4064
|
-
const { clearDaemonRuntimeLease } = await import("./daemon-runtime-lease-
|
|
4064
|
+
const { clearDaemonRuntimeLease } = await import("./daemon-runtime-lease-U1Vdl_Hk.js");
|
|
4065
4065
|
await Promise.all([rm(daemonServiceRuntimeStatePath(pathInput), { force: true }), clearDaemonRuntimeLease(pathInput)]);
|
|
4066
4066
|
}
|
|
4067
4067
|
async function withDaemonServiceRunLock(callback, meta = {
|
|
@@ -5137,7 +5137,7 @@ async function getAuthSession() {
|
|
|
5137
5137
|
}
|
|
5138
5138
|
async function getAuthSessionMetadata() {
|
|
5139
5139
|
const payload = await readSessionPayload();
|
|
5140
|
-
if (
|
|
5140
|
+
if (payload?.v !== 1) return null;
|
|
5141
5141
|
const authBaseUrl = normalizeOptionalString$20(payload.authBaseUrl);
|
|
5142
5142
|
const clientId = normalizeOptionalString$20(payload.clientId);
|
|
5143
5143
|
const createdAt = normalizeOptionalString$20(payload.createdAt);
|
|
@@ -5158,7 +5158,7 @@ async function clearAuthSession() {
|
|
|
5158
5158
|
}
|
|
5159
5159
|
async function getLocalAuthSessionState() {
|
|
5160
5160
|
const payload = await readSessionPayload();
|
|
5161
|
-
if (
|
|
5161
|
+
if (payload?.v !== 1) return {
|
|
5162
5162
|
state: "missing",
|
|
5163
5163
|
session: null
|
|
5164
5164
|
};
|
|
@@ -6311,7 +6311,7 @@ function createSpaceUnsupportedProfileKindGuideError(input) {
|
|
|
6311
6311
|
agentCommands: [
|
|
6312
6312
|
"ats profiles list --view agent",
|
|
6313
6313
|
"ats space list --profile <profile-id> --view agent",
|
|
6314
|
-
"ats space history <space-id> --profile <profile-id> --view agent"
|
|
6314
|
+
"ats space history <space-id> --profile <profile-id> --kind text --limit 20 --view agent"
|
|
6315
6315
|
],
|
|
6316
6316
|
notes: ["`--view agent` controls machine-readable output. It does not require the acting identity to be an Agent Profile.", "System profiles are internal and cannot be used as the acting identity for Space commands."]
|
|
6317
6317
|
},
|
|
@@ -6344,7 +6344,7 @@ function createSpaceRemoveMembersCurrentProfileGuideError(input) {
|
|
|
6344
6344
|
],
|
|
6345
6345
|
agentRequiredArgs: ["<space-id>", `--profile ${input.profileId}`],
|
|
6346
6346
|
agentOptionalArgs: ["--view <agent|human|auto>"],
|
|
6347
|
-
agentCommands: [`ats space leave <space-id> --profile ${input.profileId} --view agent`, `ats space history <space-id> --profile ${input.profileId} --view agent`],
|
|
6347
|
+
agentCommands: [`ats space leave <space-id> --profile ${input.profileId} --view agent`, `ats space history <space-id> --profile ${input.profileId} --kind text --limit 20 --view agent`],
|
|
6348
6348
|
notes: ["self-removal is blocked for remove-members; leave is the self-exit command."]
|
|
6349
6349
|
},
|
|
6350
6350
|
hints: [`ats space leave <space-id> --profile ${input.profileId} --view agent`]
|
|
@@ -7782,7 +7782,7 @@ function shouldBlockConditionalWakeabilityAnomaly(input) {
|
|
|
7782
7782
|
}
|
|
7783
7783
|
function hasVerifiedRunningDaemonExecutionEvidence(input) {
|
|
7784
7784
|
const inventory = input.inventory;
|
|
7785
|
-
if (
|
|
7785
|
+
if (inventory?.runtimeStatus.status !== "running") return false;
|
|
7786
7786
|
if (inventory.runtimeContractCompatibility?.status !== "compatible") return false;
|
|
7787
7787
|
if (!hasUsableServiceContract(inventory.serviceContract)) return false;
|
|
7788
7788
|
if (!(inventory.activeBundleEntryPath && inventory.runtimeCommandEntryPath && inventory.runtimeCommandPathExists === true)) return false;
|
|
@@ -12595,7 +12595,9 @@ async function runCliDriver(input) {
|
|
|
12595
12595
|
stderrText += text;
|
|
12596
12596
|
stderrLineBuffer = emitLines({
|
|
12597
12597
|
buffer: stderrLineBuffer + text,
|
|
12598
|
-
onLine: input.onStderrLine
|
|
12598
|
+
onLine: input.onStderrLine === void 0 ? void 0 : (event) => {
|
|
12599
|
+
input.onStderrLine?.(event);
|
|
12600
|
+
}
|
|
12599
12601
|
}).buffer;
|
|
12600
12602
|
});
|
|
12601
12603
|
child.on("close", (exitCode, signal) => {
|
|
@@ -19338,7 +19340,7 @@ async function inspectDaemonServiceInventory(input) {
|
|
|
19338
19340
|
};
|
|
19339
19341
|
}
|
|
19340
19342
|
async function resolveActiveBundleSourceAvailability(activeBundle) {
|
|
19341
|
-
if (
|
|
19343
|
+
if (activeBundle?.bundleFormat !== "legacy_linked_v1") return null;
|
|
19342
19344
|
return await pathExists$1(activeBundle.sourcePackageRootPath).catch(() => null);
|
|
19343
19345
|
}
|
|
19344
19346
|
function scopeServiceManagerToCurrentRoot(input) {
|
|
@@ -22016,7 +22018,7 @@ async function resolveProjectedLaunchContracts(input) {
|
|
|
22016
22018
|
const launchContracts = /* @__PURE__ */ new Map();
|
|
22017
22019
|
for (const [controllerId, projected] of input.projectedControllers.entries()) {
|
|
22018
22020
|
const targetState = input.targetStateById.get(controllerId) ?? null;
|
|
22019
|
-
if (
|
|
22021
|
+
if (targetState?.targetKind !== "builtin" || !targetState.detected) continue;
|
|
22020
22022
|
const repairResult = await repairBuiltinAgentLaunchContract({
|
|
22021
22023
|
agentId: targetState.agentId,
|
|
22022
22024
|
detected: targetState.detected,
|
|
@@ -37123,6 +37125,7 @@ function buildActionGuidanceLines(input) {
|
|
|
37123
37125
|
const lines = [];
|
|
37124
37126
|
if (publicationRequirement.allowsRawReplyWithoutAction) lines.push("- Default: share your raw reply to the Space.");
|
|
37125
37127
|
lines.push(`- ${publicationRequirement.actionRequirementLine}`);
|
|
37128
|
+
lines.push("- When ATS Space Action commands are available, run one command in the shell. Do not print fallback JSON as your final answer unless every Space Action command fails.");
|
|
37126
37129
|
lines.push(...buildSpaceActionCommandLines(input, publicationRequirement));
|
|
37127
37130
|
lines.push(`- Need context? Run \`${buildSpaceHistoryCommand({
|
|
37128
37131
|
cliEntry: input.cliEntry,
|
|
@@ -37162,7 +37165,7 @@ function buildIfUnsureLine(input) {
|
|
|
37162
37165
|
function buildSpaceHistoryCommand(input) {
|
|
37163
37166
|
const cliEntry = normalizeOptionalText$46(input.cliEntry) ?? "ats";
|
|
37164
37167
|
const normalizedSpaceId = normalizeOptionalText$46(input.spaceId);
|
|
37165
|
-
return normalizedSpaceId ? `${cliEntry} space history ${normalizedSpaceId}` : `${cliEntry} space history <space-id
|
|
37168
|
+
return normalizedSpaceId ? `${cliEntry} space history ${normalizedSpaceId} --kind text --limit 20` : `${cliEntry} space history <space-id> --kind text --limit 20`;
|
|
37166
37169
|
}
|
|
37167
37170
|
function buildActivatedByLine(input) {
|
|
37168
37171
|
const mentionSourceProfileName = normalizeOptionalText$46(input.mentionSourceProfileName);
|
|
@@ -37320,7 +37323,7 @@ async function resolveImportedConversationTarget(profile) {
|
|
|
37320
37323
|
const refKind = resolveBuiltinUpstreamConversationRefKind(providerId);
|
|
37321
37324
|
if (!refKind) throw new Error(`cannot infer upstream conversation ref kind for provider ${providerId}`);
|
|
37322
37325
|
const capability = resolveBuiltinProviderConversationCapability(providerId) ?? null;
|
|
37323
|
-
if (
|
|
37326
|
+
if (capability?.externalImport !== "by_ref_id") throw new Error(`external import is not supported for provider ${providerId}`);
|
|
37324
37327
|
return {
|
|
37325
37328
|
capability,
|
|
37326
37329
|
controllerKind: runtimeCapability.capabilityKind,
|
|
@@ -41543,7 +41546,7 @@ function buildStructuredActionRepairPrompt(input) {
|
|
|
41543
41546
|
const previousOutput = normalizeOptionalText$46(input.previousOutput);
|
|
41544
41547
|
const normalizedSpaceId = normalizeOptionalText$46(input.spaceId);
|
|
41545
41548
|
const cliEntry = normalizeOptionalText$46(input.cliEntry) ?? "ats";
|
|
41546
|
-
const historyCommand = normalizedSpaceId ? `${cliEntry} space history ${normalizedSpaceId}` : `${cliEntry} space history <space-id
|
|
41549
|
+
const historyCommand = normalizedSpaceId ? `${cliEntry} space history ${normalizedSpaceId} --kind text --limit 20` : `${cliEntry} space history <space-id> --kind text --limit 20`;
|
|
41547
41550
|
const promptCommand = `${cliEntry} prompt`;
|
|
41548
41551
|
const spaceGuideCommand = normalizedSpaceId ? `${cliEntry} space guide ${normalizedSpaceId}` : `${cliEntry} space guide <space-id>`;
|
|
41549
41552
|
const publicationRequirement = resolveSpacePublicationRequirement(input.spaceContractSnapshot);
|
|
@@ -41558,6 +41561,7 @@ function buildStructuredActionRepairPrompt(input) {
|
|
|
41558
41561
|
] : [],
|
|
41559
41562
|
"Do not change the user's intent.",
|
|
41560
41563
|
"ATS only consumes your final answer and at most one valid trailing ```ats-space-action``` JSON block.",
|
|
41564
|
+
"If an ATS Space Action CLI command is available, run that command instead of printing fallback JSON.",
|
|
41561
41565
|
"Return the corrected final answer again.",
|
|
41562
41566
|
publicationRequirement.repairRequirementLine,
|
|
41563
41567
|
...SPACE_ACTION_TARGET_GUIDANCE_LINES,
|
|
@@ -45066,6 +45070,18 @@ function consumeAnsiOperatingSystemCommand(value, startIndex) {
|
|
|
45066
45070
|
return value.length;
|
|
45067
45071
|
}
|
|
45068
45072
|
|
|
45073
|
+
//#endregion
|
|
45074
|
+
//#region src/system/local-service-diagnostics.ts
|
|
45075
|
+
function buildLocalServiceDiagnosticsPayload(input) {
|
|
45076
|
+
return { localServiceDiagnostics: {
|
|
45077
|
+
source: "local_service_diagnostics",
|
|
45078
|
+
scope: "diagnostic_only",
|
|
45079
|
+
meaning: "Local service and local agent evidence only. Do not treat this as final Space delivery or Wake outcome truth; use daemonRouteObservation and service trace for actual delivery.",
|
|
45080
|
+
deviceEvidence: input.deviceEvidence,
|
|
45081
|
+
agentEvidence: input.agentEvidence
|
|
45082
|
+
} };
|
|
45083
|
+
}
|
|
45084
|
+
|
|
45069
45085
|
//#endregion
|
|
45070
45086
|
//#region src/commands/daemon.ts
|
|
45071
45087
|
const STATUS_CLEANUP_SIGNIFICANT_ANOMALIES = DAEMON_SERVICE_REPAIR_ANOMALIES;
|
|
@@ -46765,13 +46781,10 @@ function emitDaemonAgentStatus(input) {
|
|
|
46765
46781
|
});
|
|
46766
46782
|
}
|
|
46767
46783
|
function buildDaemonLocalReplyReadinessEvidenceDiagnostics(input) {
|
|
46768
|
-
return {
|
|
46769
|
-
|
|
46770
|
-
|
|
46771
|
-
|
|
46772
|
-
device: input.deviceReplyReadiness,
|
|
46773
|
-
agent: input.legacyAgentReplyReadiness
|
|
46774
|
-
} };
|
|
46784
|
+
return buildLocalServiceDiagnosticsPayload({
|
|
46785
|
+
deviceEvidence: input.deviceReplyReadiness,
|
|
46786
|
+
agentEvidence: input.legacyAgentReplyReadiness
|
|
46787
|
+
});
|
|
46775
46788
|
}
|
|
46776
46789
|
function emitDaemonAgentLocalStatus(input) {
|
|
46777
46790
|
const { environmentTarget, presenter, snapshot } = input;
|
|
@@ -47201,7 +47214,7 @@ function formatDaemonInstallNextStep(runtimeProjection) {
|
|
|
47201
47214
|
return formatInlineAtsCliCommands("Run `ats service start` now to keep ATS Service running in the background.");
|
|
47202
47215
|
}
|
|
47203
47216
|
function requiresDaemonSignIn(runtimeProjection) {
|
|
47204
|
-
if (
|
|
47217
|
+
if (runtimeProjection?.status !== "skipped") return false;
|
|
47205
47218
|
return isLocalControllerSignInRequiredReason(mapLocalControllerStatusReason(runtimeProjection.reason));
|
|
47206
47219
|
}
|
|
47207
47220
|
function isLocalControllerSignInRequiredReason(reason) {
|
|
@@ -51212,7 +51225,7 @@ async function resolveSkillInstallStateForTarget(input) {
|
|
|
51212
51225
|
source,
|
|
51213
51226
|
state: "missing"
|
|
51214
51227
|
});
|
|
51215
|
-
if (
|
|
51228
|
+
if (target.marker?.managedBy !== "ats") {
|
|
51216
51229
|
if (isLegacyAtsSkillSymlink({
|
|
51217
51230
|
skillId: input.skill.id,
|
|
51218
51231
|
target
|
|
@@ -51599,7 +51612,8 @@ async function inspectPotentialLegacyAtsSkill(input) {
|
|
|
51599
51612
|
parentDir,
|
|
51600
51613
|
reasonCode: "legacy_ats_skill_id",
|
|
51601
51614
|
problem: "This is an old ATS skill name. Agents can still load it and learn stale ATS instructions.",
|
|
51602
|
-
recommendation: "Install the current ATS skill into this skill root, then remove or rename this legacy skill directory."
|
|
51615
|
+
recommendation: "Install the current ATS skill into this skill root, then remove or rename this legacy skill directory.",
|
|
51616
|
+
cleanupCommands: buildLegacySkillCleanupCommands(skillDir)
|
|
51603
51617
|
};
|
|
51604
51618
|
if (input.currentSkillIds.has(input.skillId) && !input.targetCurrentSkillDirs.has(skillDir) && isLikelyAtsSkillDocument(rawSkill)) return {
|
|
51605
51619
|
skillId: input.skillId,
|
|
@@ -51607,10 +51621,17 @@ async function inspectPotentialLegacyAtsSkill(input) {
|
|
|
51607
51621
|
parentDir,
|
|
51608
51622
|
reasonCode: "unmanaged_current_ats_skill_copy",
|
|
51609
51623
|
problem: "This looks like an ATS skill copy, but this ATS installation does not manage it.",
|
|
51610
|
-
recommendation: "Replace it through ats skills ensure for that skill root, or remove it if this agent should not use ATS."
|
|
51624
|
+
recommendation: "Replace it through ats skills ensure for that skill root, or remove it if this agent should not use ATS.",
|
|
51625
|
+
cleanupCommands: buildLegacySkillCleanupCommands(skillDir)
|
|
51611
51626
|
};
|
|
51612
51627
|
return null;
|
|
51613
51628
|
}
|
|
51629
|
+
function buildLegacySkillCleanupCommands(skillDir) {
|
|
51630
|
+
return [`rm -rf ${quoteShellArg(skillDir)}`, `mv ${quoteShellArg(skillDir)} ${quoteShellArg(`${skillDir}.legacy`)}`];
|
|
51631
|
+
}
|
|
51632
|
+
function quoteShellArg(value) {
|
|
51633
|
+
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
51634
|
+
}
|
|
51614
51635
|
function isLikelyAtsSkillDocument(rawSkill) {
|
|
51615
51636
|
const normalized = rawSkill.toLowerCase();
|
|
51616
51637
|
return normalized.includes("agent transport system") || normalized.includes("ats cli") || normalized.includes("ats space action") || normalized.includes("ats skills");
|
|
@@ -53324,7 +53345,8 @@ function emitLegacyAtsSkillFindingsHumanCard(input) {
|
|
|
53324
53345
|
`path: ${finding.skillDir}`,
|
|
53325
53346
|
"not managed by this ATS installation",
|
|
53326
53347
|
finding.problem,
|
|
53327
|
-
finding.recommendation
|
|
53348
|
+
finding.recommendation,
|
|
53349
|
+
`cleanup: ${finding.cleanupCommands.join(" or ")}`
|
|
53328
53350
|
].join(" · ")
|
|
53329
53351
|
})),
|
|
53330
53352
|
compact: true
|
|
@@ -56197,7 +56219,7 @@ function applySingleEnableSelection(input) {
|
|
|
56197
56219
|
return;
|
|
56198
56220
|
}
|
|
56199
56221
|
const targetState = input.targetStateById.get(input.requestedId);
|
|
56200
|
-
if (
|
|
56222
|
+
if (targetState?.targetKind !== "builtin") {
|
|
56201
56223
|
input.summary.errors.push({
|
|
56202
56224
|
agentId: input.requestedId,
|
|
56203
56225
|
code: "agents.config_write_failed",
|
|
@@ -62794,13 +62816,10 @@ function isConnectionVerificationPendingReason(reasonCode) {
|
|
|
62794
62816
|
return reasonCode === "agent_profile_binding.execution_readiness_pending";
|
|
62795
62817
|
}
|
|
62796
62818
|
function buildLocalReplyReadinessEvidenceDiagnostics(input) {
|
|
62797
|
-
return {
|
|
62798
|
-
|
|
62799
|
-
|
|
62800
|
-
|
|
62801
|
-
device: input.deviceReplyReadiness,
|
|
62802
|
-
agent: input.legacyAgentReplyReadiness
|
|
62803
|
-
} };
|
|
62819
|
+
return buildLocalServiceDiagnosticsPayload({
|
|
62820
|
+
deviceEvidence: input.deviceReplyReadiness,
|
|
62821
|
+
agentEvidence: input.legacyAgentReplyReadiness
|
|
62822
|
+
});
|
|
62804
62823
|
}
|
|
62805
62824
|
function formatRuntimeReportSubmission(submission) {
|
|
62806
62825
|
switch (submission.status) {
|
|
@@ -63405,7 +63424,7 @@ async function runProfileCreate(input) {
|
|
|
63405
63424
|
presenter,
|
|
63406
63425
|
profile: created,
|
|
63407
63426
|
agentRuntimeState: await resolveAgentProfileRuntimeState(created),
|
|
63408
|
-
selectionResult: await setSelectedAtsProfileId(created.atsProfileId),
|
|
63427
|
+
selectionResult: runtime.resolvedView === "human" ? await setSelectedAtsProfileId(created.atsProfileId) : null,
|
|
63409
63428
|
setupResult: draft.setupResult
|
|
63410
63429
|
});
|
|
63411
63430
|
}
|
|
@@ -63491,6 +63510,7 @@ async function resolveProfileCreateLocalAgentSelection(input) {
|
|
|
63491
63510
|
}
|
|
63492
63511
|
async function emitProfileCreateResult(input) {
|
|
63493
63512
|
if (input.runtime.resolvedView === "human") {
|
|
63513
|
+
if (!input.selectionResult) throw new Error("profile.create selection result missing in human view");
|
|
63494
63514
|
renderProfileReadyCard({
|
|
63495
63515
|
presenter: input.presenter,
|
|
63496
63516
|
profile: input.profile,
|
|
@@ -63521,7 +63541,9 @@ async function emitProfileCreateResult(input) {
|
|
|
63521
63541
|
profileKind: input.profile.profileKind,
|
|
63522
63542
|
ownerUserId: input.profile.ownerUserId,
|
|
63523
63543
|
...buildAgentProfileStateData(input.profile),
|
|
63524
|
-
...buildAgentProfileRuntimeData(input.agentRuntimeState)
|
|
63544
|
+
...buildAgentProfileRuntimeData(input.agentRuntimeState),
|
|
63545
|
+
currentProfileChanged: false,
|
|
63546
|
+
nextSteps: buildAgentCreateNextSteps(input.profile)
|
|
63525
63547
|
}
|
|
63526
63548
|
});
|
|
63527
63549
|
await emitProfileCreateAgentSetupHint({
|
|
@@ -63531,26 +63553,15 @@ async function emitProfileCreateResult(input) {
|
|
|
63531
63553
|
setupResult: input.setupResult
|
|
63532
63554
|
});
|
|
63533
63555
|
input.presenter.line({
|
|
63534
|
-
code: "profile.
|
|
63535
|
-
text:
|
|
63556
|
+
code: "profile.selection_unchanged",
|
|
63557
|
+
text: `created profile ${input.profile.atsProfileId}; current profile was not changed`,
|
|
63536
63558
|
data: {
|
|
63537
|
-
|
|
63538
|
-
|
|
63539
|
-
|
|
63540
|
-
profileHandle: input.profile.profileHandle,
|
|
63541
|
-
profileKind: input.profile.profileKind,
|
|
63542
|
-
ownerUserId: input.profile.ownerUserId,
|
|
63543
|
-
...buildAgentProfileStateData(input.profile),
|
|
63544
|
-
...buildAgentProfileRuntimeData(input.agentRuntimeState),
|
|
63559
|
+
createdProfileId: input.profile.atsProfileId,
|
|
63560
|
+
currentProfileChanged: false,
|
|
63561
|
+
reason: "Agent View profile creation does not change the acting identity. Pass --profile explicitly when this profile should act.",
|
|
63545
63562
|
nextSteps: buildAgentCreateNextSteps(input.profile)
|
|
63546
63563
|
}
|
|
63547
63564
|
});
|
|
63548
|
-
emitNonPersistentSelectionWarning({
|
|
63549
|
-
runtime: input.runtime,
|
|
63550
|
-
presenter: input.presenter,
|
|
63551
|
-
selectionPersistent: input.selectionResult.persistent,
|
|
63552
|
-
runtimeSessionSource: input.selectionResult.runtimeSessionSource
|
|
63553
|
-
});
|
|
63554
63565
|
}
|
|
63555
63566
|
function emitProfileCreateAgentSetupHint(input) {
|
|
63556
63567
|
if (!input.setupResult || input.setupResult.status === "configured") return;
|
|
@@ -66421,7 +66432,7 @@ function buildHumanTraceRows(input) {
|
|
|
66421
66432
|
},
|
|
66422
66433
|
{
|
|
66423
66434
|
label: "Next",
|
|
66424
|
-
value: formatAtsCliCommand("ats space history <space-id> --limit 20")
|
|
66435
|
+
value: formatAtsCliCommand("ats space history <space-id> --kind text --limit 20")
|
|
66425
66436
|
}
|
|
66426
66437
|
];
|
|
66427
66438
|
const rows = [
|
|
@@ -68176,7 +68187,7 @@ const SUMMARY_BY_COMMAND = {
|
|
|
68176
68187
|
join: "Use `ats space join --view agent` with an explicit space ID to connect deterministically.",
|
|
68177
68188
|
watch: "Use `ats space watch --view agent` with an explicit space ID to read space activity deterministically.",
|
|
68178
68189
|
send: "Use `ats space send --view agent` with an explicit space ID and explicit message input.",
|
|
68179
|
-
history: "Use `ats space history --view agent` with an explicit space ID
|
|
68190
|
+
history: "Use `ats space history --kind text --brief --view agent` with an explicit space ID for conversation context. Use `--json` only when you need signal envelopes plus `messageReadProjection`.",
|
|
68180
68191
|
contract: "Use `ats space contract --view agent` with an explicit space ID to read the current space contract deterministically.",
|
|
68181
68192
|
contract_set: "Use `ats space contract set --view agent` with an explicit space ID and explicit patch flags to update the current space contract deterministically.",
|
|
68182
68193
|
status: "Use `ats space status --view agent` with an explicit space ID to read the current space status deterministically.",
|
|
@@ -70195,7 +70206,7 @@ function isTransientSignalTextHint(event) {
|
|
|
70195
70206
|
}
|
|
70196
70207
|
function isTransientSignalTextHintClearEvent(event) {
|
|
70197
70208
|
const rawMeta = resolveSignalTextMeta$1(event);
|
|
70198
|
-
if (
|
|
70209
|
+
if (rawMeta?.transient !== true) return false;
|
|
70199
70210
|
const purpose = String(rawMeta.purpose ?? "").trim();
|
|
70200
70211
|
return purpose === AGENT_REPLYING_END_PURPOSE || purpose === AGENT_REPLY_PREVIEW_END_PURPOSE;
|
|
70201
70212
|
}
|
|
@@ -71292,7 +71303,7 @@ function isDispatchActivityPurpose(purpose) {
|
|
|
71292
71303
|
function resolveDispatchActivityBase(event) {
|
|
71293
71304
|
if (event.type !== "signal.text") return null;
|
|
71294
71305
|
const meta = resolveSignalTextMetaFromEnvelope$1(event);
|
|
71295
|
-
if (
|
|
71306
|
+
if (meta?.transient !== true) return null;
|
|
71296
71307
|
const purpose = String(meta.purpose ?? "").trim();
|
|
71297
71308
|
if (!isDispatchActivityPurpose(purpose)) return null;
|
|
71298
71309
|
const dispatchId = String(meta.dispatchId ?? "").trim();
|
|
@@ -74725,7 +74736,10 @@ async function emitSpaceCommandPreflight(input) {
|
|
|
74725
74736
|
profileName: input.profile.profileName,
|
|
74726
74737
|
profileKind: input.profile.profileKind
|
|
74727
74738
|
},
|
|
74728
|
-
agentReplyReadiness: toSpacePreflightAgentReplyReadiness(
|
|
74739
|
+
agentReplyReadiness: toSpacePreflightAgentReplyReadiness({
|
|
74740
|
+
command: input.command,
|
|
74741
|
+
readiness: replyReadinessSnapshot.agentReplyReadiness
|
|
74742
|
+
}),
|
|
74729
74743
|
services: { daemon: {
|
|
74730
74744
|
installed: replyReadinessSnapshot.daemonStatus.installed,
|
|
74731
74745
|
version: replyReadinessSnapshot.daemonStatus.installed ? replyReadinessSnapshot.daemonStatus.state.daemonVersion : null,
|
|
@@ -74896,13 +74910,17 @@ function resolveSpacePreflightRepairReason(serviceParticipationReadiness) {
|
|
|
74896
74910
|
}
|
|
74897
74911
|
}
|
|
74898
74912
|
function toSpacePreflightAgentReplyReadiness(input) {
|
|
74899
|
-
if (!input) return null;
|
|
74913
|
+
if (!shouldIncludeWakeReadinessInSpacePreflight(input.command)) return null;
|
|
74914
|
+
if (!input.readiness) return null;
|
|
74900
74915
|
return {
|
|
74901
|
-
reasonCodes: input.reasonCodes,
|
|
74902
|
-
reasonText: input.reasonText,
|
|
74903
|
-
replyReadiness: input.replyReadiness
|
|
74916
|
+
reasonCodes: input.readiness.reasonCodes,
|
|
74917
|
+
reasonText: input.readiness.reasonText,
|
|
74918
|
+
replyReadiness: input.readiness.replyReadiness
|
|
74904
74919
|
};
|
|
74905
74920
|
}
|
|
74921
|
+
function shouldIncludeWakeReadinessInSpacePreflight(command) {
|
|
74922
|
+
return command === "join";
|
|
74923
|
+
}
|
|
74906
74924
|
function emitSpacePreflightRepairGuidance(input) {
|
|
74907
74925
|
if (!input.guidance || input.mode === "suppress") return;
|
|
74908
74926
|
input.presenter.line({
|
|
@@ -74918,7 +74936,7 @@ function shouldEmitSpaceCommandPreflightOutput(emitOutput) {
|
|
|
74918
74936
|
return emitOutput !== false;
|
|
74919
74937
|
}
|
|
74920
74938
|
function emitSpaceFailureNextStep(input) {
|
|
74921
|
-
const guidance = resolveSpaceFailureGuidance(input.error);
|
|
74939
|
+
const guidance = resolveSpaceFailureGuidance(input.error, { command: input.command });
|
|
74922
74940
|
if (!guidance) return;
|
|
74923
74941
|
input.presenter.line({
|
|
74924
74942
|
code: `space.${input.command}.next_step`,
|
|
@@ -74929,7 +74947,7 @@ function emitSpaceFailureNextStep(input) {
|
|
|
74929
74947
|
}
|
|
74930
74948
|
});
|
|
74931
74949
|
}
|
|
74932
|
-
function resolveSpaceFailureGuidance(error) {
|
|
74950
|
+
function resolveSpaceFailureGuidance(error, options = {}) {
|
|
74933
74951
|
const message = toErrorMessage$7(error);
|
|
74934
74952
|
const lowered = message.toLowerCase();
|
|
74935
74953
|
const localErrorCode = readErrorCode(error);
|
|
@@ -75014,6 +75032,7 @@ function resolveSpaceFailureGuidance(error) {
|
|
|
75014
75032
|
}
|
|
75015
75033
|
if (lowered.includes("network.timeout") || lowered.includes("timed out") || lowered.includes("upstream_unreachable") || lowered.includes("gateway is unreachable") || lowered.includes("can't reach the gateway")) return resolveGatewayUnavailableFailureGuidance({
|
|
75016
75034
|
code,
|
|
75035
|
+
command: options.command,
|
|
75017
75036
|
message,
|
|
75018
75037
|
parsedHttpError,
|
|
75019
75038
|
status
|
|
@@ -75021,6 +75040,11 @@ function resolveSpaceFailureGuidance(error) {
|
|
|
75021
75040
|
return null;
|
|
75022
75041
|
}
|
|
75023
75042
|
function resolveGatewayUnavailableFailureGuidance(input) {
|
|
75043
|
+
if (input.command === "send") return {
|
|
75044
|
+
reason: "space_send_timeout_uncertain",
|
|
75045
|
+
summary: "the send request timed out before ATS could confirm the result. Check recent text history before retrying so you do not duplicate a message.",
|
|
75046
|
+
steps: [formatAtsCliCommand("ats space history <space-id> --kind text --limit 20 --view agent")]
|
|
75047
|
+
};
|
|
75024
75048
|
const failureKind = classifyGatewayChainFailure({
|
|
75025
75049
|
code: input.code,
|
|
75026
75050
|
message: resolveGatewayFailureMessage(input),
|
|
@@ -76710,7 +76734,7 @@ var PiTuiComposerAutocompleteProvider = class {
|
|
|
76710
76734
|
}
|
|
76711
76735
|
enterRelationPicker(item, prefix) {
|
|
76712
76736
|
const mentionItem = asMentionAutocompleteItem(item);
|
|
76713
|
-
if (
|
|
76737
|
+
if (mentionItem?.mentionPresentation !== "target_choice" || !prefix.startsWith("@")) return false;
|
|
76714
76738
|
const target = buildMentionPickerTargetFromItem(mentionItem);
|
|
76715
76739
|
if (!target) return false;
|
|
76716
76740
|
this.#mentionPickerState = enterRelationPickerState({
|
|
@@ -84496,7 +84520,7 @@ function buildSpaceListProofPayload() {
|
|
|
84496
84520
|
wakeExecutionSucceeded: "not_checked",
|
|
84497
84521
|
proves: "This command proves known Space records are visible to the acting profile.",
|
|
84498
84522
|
doesNotProve: "It does not prove conversation history is readable, members are wake-ready, or a Wake produced a visible reply.",
|
|
84499
|
-
nextChecks: ["<ATS_CLI> space history <space-id> --brief --limit 20 --view agent", "<ATS_CLI> space status <space-id> --json --view agent"]
|
|
84523
|
+
nextChecks: ["<ATS_CLI> space history <space-id> --kind text --brief --limit 20 --view agent", "<ATS_CLI> space status <space-id> --json --view agent"]
|
|
84500
84524
|
};
|
|
84501
84525
|
}
|
|
84502
84526
|
async function runSpaceAddMembers(input) {
|
|
@@ -98024,12 +98048,12 @@ function resolveSpaceHintByMessage(message) {
|
|
|
98024
98048
|
commandPrefix: "ats space send"
|
|
98025
98049
|
})) return [
|
|
98026
98050
|
"ats space send <space-id> \"hello world\"",
|
|
98027
|
-
"ats space history <space-id> --limit 20",
|
|
98051
|
+
"ats space history <space-id> --kind text --limit 20",
|
|
98028
98052
|
"ats space join <space-id>"
|
|
98029
98053
|
];
|
|
98030
98054
|
if (message.includes("agent role is required for this space; pass --role <text>") || message.includes("agent roleInstructions is required for this space; pass --role-instructions <text>")) return [
|
|
98031
98055
|
"ats space join <space-id> --role <text> --role-instructions <text>",
|
|
98032
|
-
"ats space history <space-id> --limit 20",
|
|
98056
|
+
"ats space history <space-id> --kind text --limit 20",
|
|
98033
98057
|
"ats space watch <space-id>"
|
|
98034
98058
|
];
|
|
98035
98059
|
if (includesMissingRequiredArgumentMessage(message, {
|
|
@@ -98037,7 +98061,7 @@ function resolveSpaceHintByMessage(message) {
|
|
|
98037
98061
|
commandPrefix: "ats space"
|
|
98038
98062
|
})) return [
|
|
98039
98063
|
"ats --view human space",
|
|
98040
|
-
"ats space history <space-id>",
|
|
98064
|
+
"ats space history <space-id> --kind text",
|
|
98041
98065
|
"ats space join <space-id>"
|
|
98042
98066
|
];
|
|
98043
98067
|
return null;
|