agent-transport-system 0.7.37 → 0.7.38

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import "./lock-DKrCsluT.js";
4
- import { t as DEV_LOCAL_GATEWAY_BASE_URL } from "./base-url-QcrZsd29.js";
3
+ import "./lock-DApq8Ch1.js";
4
+ import { t as DEV_LOCAL_GATEWAY_BASE_URL } from "./base-url-B07A0PWU.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 gatewayErrorCodeSchema, $n as conversationExecutionStateSchema, $t as signalEnvelopeSchema, A as createSpaceBodySchema, An as DAEMON_HUB_SCHEMA_VERSION, At as patchProfileSpaceHistoryStatusResponseSchema, B as daemonRouteObservationResponseSchema, Bn as SPACE_MENTION_REJECT_NOTICE_PURPOSE, Bt as prepareSessionResponseSchema, C as agentProfileBindingRouteParamsSchema, Cn as AGENT_REPLYING_END_PURPOSE, Cr as parseAgentControllerRef$1, Ct as localRuntimesQuerySchema, D as atsdControlPlaneResponseSchema, Dn as ATSD_TASK_RESULT_SCHEMA_VERSION, Dr as resolveMessageEnvelopeTargetField, Dt as notifyAgentProfileRouteCatalogChangedBodySchema, E as atsdControlPlaneRequestSchema, En as AGENT_REPLY_PREVIEW_PURPOSE, Er as resolveBuiltinAgentControllerConversationKind, Et as normalizeSpaceCursorPatch, F as createSpaceThreadResponseSchema, Fn as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, Ft as postNormalMessageResponseSchema, G as ensureAgentProfilePrimaryBindingResponseSchema, Gn as atsdTaskResultEnvelopeWriteSchema, Gt as querySpaceDeletionTombstonesResponseSchema, H as deleteSpaceResponseSchema, Hn as SPACE_UPDATES_MAX_LIMIT, Ht as projectObservabilityWakeCorrelation, I as createStartSessionBodySchema, In as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, It as postSpaceMembersBodySchema, J as forgetCurrentComputerResponseSchema, Jn as buildAgentControllerConversationRef, Jt as resolveStartHandoffBodySchema, K as entryBriefSchema, Kn as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, Kt as removeSpaceMembersResponseSchema, L as currentDeviceTargetResponseSchema, Ln as MESSAGE_MENTION_TYPE_VALUES, Lt as postSpaceMembersResponseSchema, M as createSpaceDiagnosticReportResponseSchema, Mn as DISPATCH_ACTIVITY_FAILED_PURPOSE, Mr as runtimeCoordinatorExecutionTokenEnvelopeSchema, Mt as patchSpaceContractResponseSchema, N as createSpaceResponseSchema, Nn as DISPATCH_ACTIVITY_RETRYING_PURPOSE, Nr as sanitizeSignalTextPreview, Nt as patchStartSessionBodySchema, O as catchupResponseSchema, On as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Or as resolveSingleSpaceMentionLabels, Ot as notifyAgentProfileRouteCatalogChangedResponseSchema, P as createSpaceThreadBodySchema, Pn as LEGACY_RUNTIME_DISPATCH_POLICY, Pt as postNormalMessageBodySchema, Q as formatLocalSetupActionLabel, Qn as collectCanonicalMentionTextFragments, Qt as setLocalRuntimeDisplayNameBodySchema, R as currentLocalRuntimeReplyReadinessResponseSchema, Rn as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, Rt as postSpaceThreadSignalBodySchema, S as agentExecutionReadinessRouteParamsSchema, Sn as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, Sr as normalizeSpacePasswordText, St as listSpaceThreadsResponseSchema, T as atsRequestContextSchema, Tn as AGENT_REPLY_PREVIEW_END_PURPOSE, Tr as profileWorkspaceModeSchema, Tt as normalizeListSignalsReadQuerySemantics, U as dispatchBriefSchema, Un as atsRuntimeProfileIdSchema, Ut as projectSpaceDispatchTraceFinalVisibleOutcome, V as daemonRuntimeLeaseSchema, Vn as SPACE_PASSWORD_MIN_LENGTH, Vt as prepareSessionStreamServerFrameSchema, W as ensureAgentProfilePrimaryBindingBodySchema, Wn as atsSpaceEgressActionSchema, Wt as providerDispatchRuntimeContextSchema, X as formatLocalComponentsSummaryLabel, Xn as canonicalizeAgentControllerRef, Xt as serverErrorFrameSchema, Y as formatLocalComponentsSummaryDescription, Yn as buildAgentControllerRoutingKey, Yt as resolveStartHandoffResponseSchema, Z as formatLocalSetupActionDescription, Zn as canonicalizeBuiltinAgentControllerRef, Zt as setCurrentDeviceTargetBodySchema, _ as ATSD_CONTROL_PLANE_SCHEMA_VERSION, _n as upsertProfileSpaceHistoryResponseSchema, _r as getSpaceMessageAddressingRelationSupportForTargetKind, _t as installedLocalComponentsSnapshotSchema, a as runWithHeldLock, an as startDeviceProjectionSchema, ar as daemonHubDispatchPreviewRequestSchema, at as getPrepareReadinessQuerySchema, b as LOCAL_COMPONENTS_SCHEMA_VERSION, bn as writeCurrentDeviceObservedMetadataResponseSchema, br as normalizeMessageEnvelope, bt as listSpaceThreadEventsResponseSchema, c as LEGACY_ATS_CLI_CONTEXT_ENV_KEY, cn as startSessionResponseSchema, cr as daemonHubHeartbeatResponseSchema, ct as getSpaceDispatchLookupResponseSchema, d as resolveCliContext, dn as startSessionWithTokenResponseSchema, dr as daemonHubRouteCatalogChangedFramePayloadSchema, dt as getSpaceStatusResponseSchema, en as spaceCreatorSchema, er as createDaemonRouteObservationSummary, et as gatewayErrorEnvelopeSchema, f as resolveCliContextId, fn as structuredGuidePayloadFromInputSchema, fr as daemonHubSubmitTaskResultRequestSchema, ft as getSpaceThreadResponseSchema, g as resolveMappedPublicAgentFailureReason, gn as submitRuntimeRegistrationResponseSchema, gr as formatCanonicalMentionLiteral, gt as incomingServerMessageSchema, h as resolveBuiltinAgentControllerBrand, hn as submitRuntimeRegistrationBodySchema, hr as daemonStreamFrameSchema, ht as getSpaceWakeTraceWaterfallResponseSchema, i as releaseLock, in as spaceViewerMembershipResponseSchema, ir as daemonHubDispatchPreviewEndRequestSchema, it as getAgentProfilePrimaryBindingResponseSchema, j as createSpaceDiagnosticReportBodySchema, jn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, jt as patchSpaceContractBodySchema, k as continuitySchema, kn as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, kr as resolveSpaceMentionLabels, kt as observabilityWakeTraceSelectorSchema, l as listCliContextStates, ln as startSessionSpaceChoiceBodySchema, lr as daemonHubRegisterSessionRequestSchema, lt as getSpaceDispatchResultResponseSchema, m as CODEX_UPGRADE_REQUIRED_REASON, mn as submitRuntimeAgentControllerReportsResponseSchema, mr as daemonServiceLaneSchema, mt as getSpaceWakeProgressResponseSchema, n as isAtsLockError, nn as spaceMembersSnapshotSchema, nr as daemonHubDeliveryExecutionIdentitySchema, nt as getAgentExecutionReadinessBatchResponseSchema, o as tryCleanupStaleLock, on as startProfileReadinessSummarySchema, or as daemonHubDispatchRuntimeEvidenceRequestSchema, ot as getPrepareReadinessResponseSchema, p as writeCliContextState, pn as submitRuntimeAgentControllerReportsBodySchema, pr as daemonServiceContractSchema, pt as getSpaceUpdatesResponseSchema, q as forgetComputerResponseSchema, qn as atsdTaskResultPayloadSchema, qt as resolveSpaceDispatchTraceRootCause, r as readLockMeta, rn as spaceMetaSchema, rr as daemonHubDispatchLifecycleRequestSchema, rt as getAgentExecutionReadinessResponseSchema, s as ATS_CLI_CONTEXT_ENV_KEY, sn as startSessionProgressSchema, sr as daemonHubHeartbeatRequestSchema, st as getSpaceContractResponseSchema, t as acquireLock, tn as spaceDispatchTraceResponseSchema, tr as daemonHubDeliverDispatchRequestSchema, tt as getAgentExecutionReadinessBatchBodySchema, u as readCliContextState, un as startSessionSpaceChoiceResponseSchema, ur as daemonHubRegisterSessionResponseSchema, ut as getSpaceMessageDetailsResponseSchema, v as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_NAME, vn as upsertSpaceDeletionTombstoneResponseSchema, vr as normalizeBuiltinAgentControllerId, vt as leaveSpaceResponseSchema, w as atsProfileIdSchema, wn as AGENT_REPLYING_PURPOSE, wr as parseOptionalClientMessageId, wt as localRuntimesResponseSchema, x as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, xn as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, xr as normalizeOptionalWorkingDirectory, xt as listSpaceThreadSignalsResponseSchema, y as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_VERSION, yn as writeCurrentDeviceObservedMetadataBodySchema, yr as normalizeKnownBuiltinAgentControllerId, yt as listProfileSpaceHistoryResponseSchema, z as daemonRouteCatalogCacheSchema, zn as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, zt as postSpaceThreadSignalResponseSchema } from "./lock-DKrCsluT.js";
3
+ import { $ as gatewayErrorCodeSchema, $n as conversationExecutionStateSchema, $t as signalEnvelopeSchema, A as createSpaceBodySchema, An as DAEMON_HUB_SCHEMA_VERSION, At as patchProfileSpaceHistoryStatusResponseSchema, B as daemonRouteObservationResponseSchema, Bn as SPACE_MENTION_REJECT_NOTICE_PURPOSE, Bt as prepareSessionResponseSchema, C as agentProfileBindingRouteParamsSchema, Cn as AGENT_REPLYING_END_PURPOSE, Cr as parseAgentControllerRef$1, Ct as localRuntimesQuerySchema, D as atsdControlPlaneResponseSchema, Dn as ATSD_TASK_RESULT_SCHEMA_VERSION, Dr as resolveMessageEnvelopeTargetField, Dt as notifyAgentProfileRouteCatalogChangedBodySchema, E as atsdControlPlaneRequestSchema, En as AGENT_REPLY_PREVIEW_PURPOSE, Er as resolveBuiltinAgentControllerConversationKind, Et as normalizeSpaceCursorPatch, F as createSpaceThreadResponseSchema, Fn as MAX_PROFILE_WORKING_DIRECTORY_LENGTH, Ft as postNormalMessageResponseSchema, G as ensureAgentProfilePrimaryBindingResponseSchema, Gn as atsdTaskResultEnvelopeWriteSchema, Gt as querySpaceDeletionTombstonesResponseSchema, H as deleteSpaceResponseSchema, Hn as SPACE_UPDATES_MAX_LIMIT, Ht as projectObservabilityWakeCorrelation, I as createStartSessionBodySchema, In as MAX_SIGNAL_REPLY_TO_PREVIEW_LENGTH, It as postSpaceMembersBodySchema, J as forgetCurrentComputerResponseSchema, Jn as buildAgentControllerConversationRef, Jt as resolveStartHandoffBodySchema, K as entryBriefSchema, Kn as atsdTaskResultOpenClawGatewayVisibilityStatusSchema, Kt as removeSpaceMembersResponseSchema, L as currentDeviceTargetResponseSchema, Ln as MESSAGE_MENTION_TYPE_VALUES, Lt as postSpaceMembersResponseSchema, M as createSpaceDiagnosticReportResponseSchema, Mn as DISPATCH_ACTIVITY_FAILED_PURPOSE, Mr as runtimeCoordinatorExecutionTokenEnvelopeSchema, Mt as patchSpaceContractResponseSchema, N as createSpaceResponseSchema, Nn as DISPATCH_ACTIVITY_RETRYING_PURPOSE, Nr as sanitizeSignalTextPreview, Nt as patchStartSessionBodySchema, O as catchupResponseSchema, On as CONVERSATION_CONTINUITY_WARNING_PURPOSE, Or as resolveSingleSpaceMentionLabels, Ot as notifyAgentProfileRouteCatalogChangedResponseSchema, P as createSpaceThreadBodySchema, Pn as LEGACY_RUNTIME_DISPATCH_POLICY, Pt as postNormalMessageBodySchema, Q as formatLocalSetupActionLabel, Qn as collectCanonicalMentionTextFragments, Qt as setLocalRuntimeDisplayNameBodySchema, R as currentLocalRuntimeReplyReadinessResponseSchema, Rn as SPACE_MEMBER_JOIN_NOTICE_PURPOSE, Rt as postSpaceThreadSignalBodySchema, S as agentExecutionReadinessRouteParamsSchema, Sn as writeSetupTokenLocalRuntimeObservedMetadataResponseSchema, Sr as normalizeSpacePasswordText, St as listSpaceThreadsResponseSchema, T as atsRequestContextSchema, Tn as AGENT_REPLY_PREVIEW_END_PURPOSE, Tr as profileWorkspaceModeSchema, Tt as normalizeListSignalsReadQuerySemantics, U as dispatchBriefSchema, Un as atsRuntimeProfileIdSchema, Ut as projectSpaceDispatchTraceFinalVisibleOutcome, V as daemonRuntimeLeaseSchema, Vn as SPACE_PASSWORD_MIN_LENGTH, Vt as prepareSessionStreamServerFrameSchema, W as ensureAgentProfilePrimaryBindingBodySchema, Wn as atsSpaceEgressActionSchema, Wt as providerDispatchRuntimeContextSchema, X as formatLocalComponentsSummaryLabel, Xn as canonicalizeAgentControllerRef, Xt as serverErrorFrameSchema, Y as formatLocalComponentsSummaryDescription, Yn as buildAgentControllerRoutingKey, Yt as resolveStartHandoffResponseSchema, Z as formatLocalSetupActionDescription, Zn as canonicalizeBuiltinAgentControllerRef, Zt as setCurrentDeviceTargetBodySchema, _ as ATSD_CONTROL_PLANE_SCHEMA_VERSION, _n as upsertProfileSpaceHistoryResponseSchema, _r as getSpaceMessageAddressingRelationSupportForTargetKind, _t as installedLocalComponentsSnapshotSchema, a as runWithHeldLock, an as startDeviceProjectionSchema, ar as daemonHubDispatchPreviewRequestSchema, at as getPrepareReadinessQuerySchema, b as LOCAL_COMPONENTS_SCHEMA_VERSION, bn as writeCurrentDeviceObservedMetadataResponseSchema, br as normalizeMessageEnvelope, bt as listSpaceThreadEventsResponseSchema, c as LEGACY_ATS_CLI_CONTEXT_ENV_KEY, cn as startSessionResponseSchema, cr as daemonHubHeartbeatResponseSchema, ct as getSpaceDispatchLookupResponseSchema, d as resolveCliContext, dn as startSessionWithTokenResponseSchema, dr as daemonHubRouteCatalogChangedFramePayloadSchema, dt as getSpaceStatusResponseSchema, en as spaceCreatorSchema, er as createDaemonRouteObservationSummary, et as gatewayErrorEnvelopeSchema, f as resolveCliContextId, fn as structuredGuidePayloadFromInputSchema, fr as daemonHubSubmitTaskResultRequestSchema, ft as getSpaceThreadResponseSchema, g as resolveMappedPublicAgentFailureReason, gn as submitRuntimeRegistrationResponseSchema, gr as formatCanonicalMentionLiteral, gt as incomingServerMessageSchema, h as resolveBuiltinAgentControllerBrand, hn as submitRuntimeRegistrationBodySchema, hr as daemonStreamFrameSchema, ht as getSpaceWakeTraceWaterfallResponseSchema, i as releaseLock, in as spaceViewerMembershipResponseSchema, ir as daemonHubDispatchPreviewEndRequestSchema, it as getAgentProfilePrimaryBindingResponseSchema, j as createSpaceDiagnosticReportBodySchema, jn as DISPATCH_ACTIVITY_DISPATCHING_PURPOSE, jt as patchSpaceContractBodySchema, k as continuitySchema, kn as CURRENT_DAEMON_EXECUTION_CONTRACT_EPOCH, kr as resolveSpaceMentionLabels, kt as observabilityWakeTraceSelectorSchema, l as listCliContextStates, ln as startSessionSpaceChoiceBodySchema, lr as daemonHubRegisterSessionRequestSchema, lt as getSpaceDispatchResultResponseSchema, m as CODEX_UPGRADE_REQUIRED_REASON, mn as submitRuntimeAgentControllerReportsResponseSchema, mr as daemonServiceLaneSchema, mt as getSpaceWakeProgressResponseSchema, n as isAtsLockError, nn as spaceMembersSnapshotSchema, nr as daemonHubDeliveryExecutionIdentitySchema, nt as getAgentExecutionReadinessBatchResponseSchema, o as tryCleanupStaleLock, on as startProfileReadinessSummarySchema, or as daemonHubDispatchRuntimeEvidenceRequestSchema, ot as getPrepareReadinessResponseSchema, p as writeCliContextState, pn as submitRuntimeAgentControllerReportsBodySchema, pr as daemonServiceContractSchema, pt as getSpaceUpdatesResponseSchema, q as forgetComputerResponseSchema, qn as atsdTaskResultPayloadSchema, qt as resolveSpaceDispatchTraceRootCause, r as readLockMeta, rn as spaceMetaSchema, rr as daemonHubDispatchLifecycleRequestSchema, rt as getAgentExecutionReadinessResponseSchema, s as ATS_CLI_CONTEXT_ENV_KEY, sn as startSessionProgressSchema, sr as daemonHubHeartbeatRequestSchema, st as getSpaceContractResponseSchema, t as acquireLock, tn as spaceDispatchTraceResponseSchema, tr as daemonHubDeliverDispatchRequestSchema, tt as getAgentExecutionReadinessBatchBodySchema, u as readCliContextState, un as startSessionSpaceChoiceResponseSchema, ur as daemonHubRegisterSessionResponseSchema, ut as getSpaceMessageDetailsResponseSchema, v as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_NAME, vn as upsertSpaceDeletionTombstoneResponseSchema, vr as normalizeBuiltinAgentControllerId, vt as leaveSpaceResponseSchema, w as atsProfileIdSchema, wn as AGENT_REPLYING_PURPOSE, wr as parseOptionalClientMessageId, wt as localRuntimesResponseSchema, x as SPACE_DISPATCH_TRACE_PROMPT_PREVIEW_MAX_CHARS, xn as writeSetupTokenLocalRuntimeObservedMetadataBodySchema, xr as normalizeOptionalWorkingDirectory, xt as listSpaceThreadSignalsResponseSchema, y as DAEMON_ROUTE_CATALOG_CACHE_SCHEMA_VERSION, yn as writeCurrentDeviceObservedMetadataBodySchema, yr as normalizeKnownBuiltinAgentControllerId, yt as listProfileSpaceHistoryResponseSchema, z as daemonRouteCatalogCacheSchema, zn as SPACE_MEMBER_REMOVE_NOTICE_PURPOSE, zt as postSpaceThreadSignalResponseSchema } from "./lock-DApq8Ch1.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-QcrZsd29.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-B07A0PWU.js";
6
6
  import { createRequire } from "node:module";
7
7
  import { Command, Option } from "commander";
8
8
  import { accessSync, appendFileSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
@@ -27,7 +27,7 @@ import wrapAnsi from "wrap-ansi";
27
27
  import { Box, Container, Editor, Key, ProcessTerminal, TUI, Text, getEditorKeybindings, matchesKey } from "@mariozechner/pi-tui";
28
28
 
29
29
  //#region package.json
30
- var version = "0.7.37";
30
+ var version = "0.7.38";
31
31
  var package_default = {
32
32
  $schema: "https://www.schemastore.org/package.json",
33
33
  name: "agent-transport-system",
@@ -58,7 +58,7 @@ var package_default = {
58
58
  "test": "vitest run --config vitest.config.ts",
59
59
  "test:integration": "node scripts/run-integration-tests.mjs",
60
60
  "test:full": "pnpm run test && pnpm run test:integration",
61
- "test:daemon": "vitest run --config vitest.integration.config.ts tests/daemon-state.integration.test.ts tests/daemon-command.integration.test.ts tests/daemon-menu.integration.test.ts tests/daemon-run.integration.test.ts tests/daemon-bootstrap-recommendation.integration.test.ts",
61
+ "test:local-service": "vitest run --config vitest.integration.config.ts tests/local-service-state.integration.test.ts tests/local-service-command.integration.test.ts tests/local-service-menu.integration.test.ts tests/local-service-run.integration.test.ts tests/local-service-bootstrap-recommendation.test.ts",
62
62
  "test:watch": "vitest"
63
63
  },
64
64
  dependencies: {
@@ -11784,6 +11784,12 @@ function isDaemonReconcileInProgressError(error) {
11784
11784
 
11785
11785
  //#endregion
11786
11786
  //#region ../../runtime/local-service/src/space-action-target-guidance.ts
11787
+ const SPACE_ACTION_CONTEXT_GUIDANCE_LINES = [
11788
+ "- Source alignment: Treat this Wake message as the current source. If you use other Space messages, private context, memory, or tools, keep each source mapped to the action and reply it supports.",
11789
+ "- Delivery intent: If the user asks you to deliver work to another Agent Profile, use Handoff or Reply + handoff. A plain reply or a bare @name does not deliver executable work.",
11790
+ "- Reply placement: Reply where the current request should continue. Thread Wakes default to the current thread; only move the reply when the user explicitly asks.",
11791
+ "- Context sources: ATS metadata is infrastructure context, not proof of what a human or agent is doing. Use Space context, private context, memory, and tools when appropriate; avoid exposing secrets, credentials, private files, or high-risk sensitive data unless the owner clearly authorizes it."
11792
+ ];
11787
11793
  const SPACE_ACTION_TARGET_GUIDANCE_LINES = [
11788
11794
  "Prefer ATS Space Action CLI target flags such as --wake, --reference, and --cc.",
11789
11795
  "For fallback ats-space-action blocks, target semantics only count when they are written in post_message.messageEnvelope.",
@@ -12001,7 +12007,7 @@ async function setDaemonServiceRuntimeState(state, pathInput = {}) {
12001
12007
  await writeDaemonServiceRuntimeState(state, pathInput);
12002
12008
  }
12003
12009
  async function clearDaemonServiceRuntimeState(pathInput = {}) {
12004
- const { clearDaemonRuntimeLease } = await import("./daemon-runtime-lease-CyZs1l93.js");
12010
+ const { clearDaemonRuntimeLease } = await import("./daemon-runtime-lease-CNhK4_b8.js");
12005
12011
  await Promise.all([rm(daemonServiceRuntimeStatePath(pathInput), { force: true }), clearDaemonRuntimeLease(pathInput)]);
12006
12012
  }
12007
12013
  async function withDaemonServiceRunLock(callback, meta = {
@@ -18667,22 +18673,22 @@ function resolveDaemonStopStrategy(snapshot) {
18667
18673
  if (snapshot.effectiveRuntimeStatus !== "running" && !hasOwnedProcesses && snapshot.serviceManagerStatus?.running !== true) return {
18668
18674
  kind: "not_running",
18669
18675
  requiresResidualProcessCleanup: false,
18670
- reason: "no active daemon owner is currently running"
18676
+ reason: "no active local service owner is currently running"
18671
18677
  };
18672
18678
  if (snapshot.activeOwnerKinds.includes("system_service")) return {
18673
18679
  kind: "manager_first",
18674
18680
  requiresResidualProcessCleanup: true,
18675
- reason: "a system-managed daemon owner is active on this device, so stop must go through the OS service manager first"
18681
+ reason: "a system-managed local service owner is active on this device, so stop must go through the OS service manager first"
18676
18682
  };
18677
18683
  if (snapshot.systemServiceRegistrationPresent) return {
18678
18684
  kind: "process_then_manager_cleanup",
18679
18685
  requiresResidualProcessCleanup: true,
18680
- reason: "a direct local daemon owner is active and system service registration is still present, so stop must drain the process and then clear the service manager registration"
18686
+ reason: "a direct local service owner is active and system service registration is still present, so stop must drain the process and then clear the service manager registration"
18681
18687
  };
18682
18688
  return {
18683
18689
  kind: "process_only",
18684
18690
  requiresResidualProcessCleanup: true,
18685
- reason: "only direct local daemon processes are active on this device"
18691
+ reason: "only direct local service processes are active on this device"
18686
18692
  };
18687
18693
  }
18688
18694
  function hasActiveDaemonOwners(snapshot) {
@@ -22981,7 +22987,7 @@ async function maybeAutoStopIdleLocalService(input) {
22981
22987
  if (finalOwnerSnapshot && hasActiveDaemonOwners(finalOwnerSnapshot)) {
22982
22988
  input.presenter.line({
22983
22989
  code: `${input.codePrefix}.auto_stop_failed`,
22984
- text: "ATS stopped the system service manager, but local daemon owners are still active on this device."
22990
+ text: "ATS stopped the system service manager, but local service owners are still active on this device."
22985
22991
  });
22986
22992
  return {
22987
22993
  autoStopped: false,
@@ -31841,10 +31847,16 @@ function listSpaceBareMentionDiagnostics(input) {
31841
31847
  const maxResults = Math.max(1, Math.min(input.maxResults ?? MAX_BARE_MENTION_DIAGNOSTICS, 20));
31842
31848
  const diagnostics = [];
31843
31849
  const seenStarts = /* @__PURE__ */ new Set();
31850
+ const ignoredRanges = normalizeIgnoredRanges(input.ignoredRanges ?? []);
31844
31851
  for (let cursor = 0; cursor < input.text.length; cursor += 1) {
31845
31852
  const atIndex = input.text.indexOf("@", cursor);
31846
31853
  if (atIndex < 0) break;
31847
31854
  cursor = atIndex;
31855
+ const ignoredRange = findIgnoredRangeContaining(ignoredRanges, atIndex);
31856
+ if (ignoredRange) {
31857
+ cursor = Math.max(cursor, ignoredRange.end - 1);
31858
+ continue;
31859
+ }
31848
31860
  if (!isPotentialBareMentionStart(input.text, atIndex)) continue;
31849
31861
  const match = resolveBareMentionCandidateAt({
31850
31862
  atIndex,
@@ -31859,6 +31871,19 @@ function listSpaceBareMentionDiagnostics(input) {
31859
31871
  }
31860
31872
  return diagnostics;
31861
31873
  }
31874
+ function normalizeIgnoredRanges(ranges) {
31875
+ return ranges.filter((range) => range.start >= 0 && range.end > range.start).map((range) => ({
31876
+ end: range.end,
31877
+ start: range.start
31878
+ })).sort((left, right) => left.start - right.start);
31879
+ }
31880
+ function findIgnoredRangeContaining(ranges, index) {
31881
+ for (const range of ranges) {
31882
+ if (index < range.start) return null;
31883
+ if (index >= range.start && index < range.end) return range;
31884
+ }
31885
+ return null;
31886
+ }
31862
31887
  function buildBareMentionCandidates(entries) {
31863
31888
  const candidatesByLabel = /* @__PURE__ */ new Map();
31864
31889
  for (const entry of entries) {
@@ -34892,7 +34917,7 @@ async function confirmLocalExecutionEvidenceAfterBinding(input) {
34892
34917
  const readiness = await waitForExecutionReadinessAfterBinding(input);
34893
34918
  if (!readiness) return {
34894
34919
  reasonCodes: ["agent_profile_binding.execution_readiness_pending"],
34895
- status: "accepted"
34920
+ status: "unavailable"
34896
34921
  };
34897
34922
  if (isAgentExecutionReadyOrConnecting(readiness.agentExecutionReadiness)) return {
34898
34923
  reasonCodes: readiness.agentExecutionReadiness.reasonCodes,
@@ -38506,7 +38531,7 @@ function buildActionGuidanceLines(input) {
38506
38531
  spaceId: input.spaceId
38507
38532
  })}\`.`);
38508
38533
  if (input.threadContext) lines.push("- This dispatch belongs to a thread. Public replies should stay in that thread unless explicitly asked to reply in the main Space.");
38509
- lines.push("- Source alignment: Treat this Wake message as the current source. If you use other Space messages, private context, memory, or tools, keep each source mapped to the action and reply it supports.", "- Delivery intent: If the user asks you to deliver work to another Agent Profile, use Handoff or Reply + handoff. A plain reply or a bare @name does not deliver executable work.", "- Reply placement: Reply where the current request should continue. Thread Wakes default to the current thread; only move the reply when the user explicitly asks.", "- Context sources: ATS metadata is infrastructure context, not proof of what a human or agent is doing. Use Space context, private context, memory, and tools when appropriate; avoid exposing secrets, credentials, private files, or high-risk sensitive data unless the owner clearly authorizes it.");
38534
+ lines.push(...SPACE_ACTION_CONTEXT_GUIDANCE_LINES);
38510
38535
  lines.push("- If the current message mentions multiple targets, handle only the part assigned to you unless it explicitly asks you to synthesize for the group.");
38511
38536
  lines.push("- Wake asks another Agent Profile to act. Reference and CC are context only. Bare @names in prose do not create executable work.", "- For a normal reply to this Wake, do not add target flags. Use target flags only when this Wake asks you to hand off, reference, or CC another profile.");
38512
38537
  lines.push(`- Need action details? Run \`${buildSpaceActionCommand(input, "help")}\`. Only if every Space Action command fails, use \`${buildPromptSpaceActionCommand(input)}\` for fallback JSON.`);
@@ -42342,8 +42367,7 @@ function buildStructuredActionRepairPrompt(input) {
42342
42367
  ] : [],
42343
42368
  "This is a bounded repair of the public delivery action only. Do not redo the user's work.",
42344
42369
  "Do not change the user's intent.",
42345
- "Preserve source alignment: keep the corrected action tied to the same current Wake and reply target.",
42346
- "If the user's intent was to make another Agent Profile act, use Wake or Reply + handoff target semantics. A plain reply or bare @name is not executable delivery.",
42370
+ ...SPACE_ACTION_CONTEXT_GUIDANCE_LINES,
42347
42371
  "ATS only consumes your final answer and at most one valid trailing ```ats-space-action``` JSON block.",
42348
42372
  "If an ATS Space Action CLI command is available, run that command instead of printing fallback JSON.",
42349
42373
  publicationRequirement.repairRequirementLine,
@@ -44286,7 +44310,7 @@ async function runDaemonSocketSession(input) {
44286
44310
  leasesByProfileId,
44287
44311
  loadCatalog: async () => await loadDaemonRouteCatalog({
44288
44312
  localAdapterContainer: input.localAdapterContainer,
44289
- localReplyStateMode: "check",
44313
+ localReplyStateMode: "repair",
44290
44314
  ownerUserId: input.ownerUserId,
44291
44315
  presenter: input.presenter,
44292
44316
  allowEmpty: true,
@@ -44786,7 +44810,7 @@ const runDaemonServiceLoop = async (input) => {
44786
44810
  emitRunLine({
44787
44811
  presenter: input.presenter,
44788
44812
  code: "daemon.run.start",
44789
- text: `starting daemon service loop (gateway=${baseUrl}, owner=${ownerUserId}, profiles=${routeCatalogState.profileIds.length})`,
44813
+ text: `starting local service loop (gateway=${baseUrl}, owner=${ownerUserId}, profiles=${routeCatalogState.profileIds.length})`,
44790
44814
  payload: {
44791
44815
  adapterId: null,
44792
44816
  baseUrl,
@@ -44926,7 +44950,7 @@ const runDaemonServiceLoop = async (input) => {
44926
44950
  emitRunLine({
44927
44951
  presenter: input.presenter,
44928
44952
  code: "daemon.run.stopped",
44929
- text: "daemon service loop stopped"
44953
+ text: "local service loop stopped"
44930
44954
  });
44931
44955
  };
44932
44956
  async function loadInitialDaemonRouteCatalog(input) {
@@ -45349,7 +45373,7 @@ function toErrorMessage$13(error) {
45349
45373
  //#endregion
45350
45374
  //#region src/local-service/lifecycle/daemon-start-failure-log.ts
45351
45375
  const LOG_NOISE_PATTERNS = [
45352
- /^starting daemon service loop/i,
45376
+ /^starting local service loop/i,
45353
45377
  /^daemon stream connected/i,
45354
45378
  /^registered daemon session/i,
45355
45379
  /^catalog sync/i,
@@ -48566,7 +48590,7 @@ async function stopRegisteredDaemonServiceManager(input) {
48566
48590
  if (hasDifferentActiveDaemonOwnerAfterSystemStop(input.ownerSnapshot, finalOwnerSnapshot)) return buildDaemonStopWarningResult({
48567
48591
  reason: "stop_failed",
48568
48592
  runtimeStatus: finalOwnerSnapshot.runtimeStatus,
48569
- errorMessage: "daemon owners are still active after stopping the system service"
48593
+ errorMessage: "local service owners are still active after stopping the system service"
48570
48594
  });
48571
48595
  return buildDaemonStopWarningResult({
48572
48596
  reason: "system_timeout",
@@ -48592,7 +48616,7 @@ async function stopRegisteredDaemonServiceManager(input) {
48592
48616
  if (hasActiveDaemonOwners(finalOwnerSnapshot) || finalOwnerSnapshot.serviceManagerStatus?.enabled === true) return buildDaemonStopWarningResult({
48593
48617
  reason: "stop_failed",
48594
48618
  runtimeStatus: finalOwnerSnapshot.runtimeStatus,
48595
- errorMessage: "daemon owners are still active after stopping the system service"
48619
+ errorMessage: "local service owners are still active after stopping the system service"
48596
48620
  });
48597
48621
  return null;
48598
48622
  }
@@ -51199,7 +51223,7 @@ function resolveDaemonServiceParticipationCodePrefix(intent) {
51199
51223
  case "space_create_join": return "space.create_join.service";
51200
51224
  case "space_join": return "space.join.service";
51201
51225
  case "space_add_members": return "space.add_members.service";
51202
- default: throw new Error(`Unknown daemon service participation intent: ${intent}`);
51226
+ default: throw new Error(`Unknown local service participation intent: ${intent}`);
51203
51227
  }
51204
51228
  }
51205
51229
  function shouldStartAfterDaemonInstall(_intent) {
@@ -75654,10 +75678,26 @@ async function resolveBareMentionDiagnostics(input) {
75654
75678
  const snapshot = input.loadedMembersSnapshot ?? await loadMembersSnapshotForBareMentionDiagnostics(input);
75655
75679
  if (!snapshot) return [];
75656
75680
  return listSpaceBareMentionDiagnostics({
75681
+ ignoredRanges: resolveCanonicalMentionDiagnosticIgnoreRanges(input.preparedSubmission),
75657
75682
  snapshot,
75658
75683
  text: input.preparedSubmission.text
75659
75684
  });
75660
75685
  }
75686
+ function resolveCanonicalMentionDiagnosticIgnoreRanges(preparedSubmission) {
75687
+ const ranges = [];
75688
+ let cursor = 0;
75689
+ for (const mention of preparedSubmission.canonicalMentionsInTextOrder) {
75690
+ const start = preparedSubmission.text.indexOf(mention.text, cursor);
75691
+ if (start < 0) continue;
75692
+ const end = start + mention.text.length;
75693
+ ranges.push({
75694
+ end,
75695
+ start
75696
+ });
75697
+ cursor = end;
75698
+ }
75699
+ return ranges;
75700
+ }
75661
75701
  async function loadMembersSnapshotForBareMentionDiagnostics(input) {
75662
75702
  try {
75663
75703
  emitAgentSendProgress({