agent-transport-system 0.6.7 → 0.6.8

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.js CHANGED
@@ -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.6.7";
30
+ var version = "0.6.8";
31
31
  var package_default = {
32
32
  $schema: "https://www.schemastore.org/package.json",
33
33
  name: "agent-transport-system",
@@ -24304,8 +24304,7 @@ function buildDaemonServiceRefreshHandoffMessage() {
24304
24304
  return `${DAEMON_SERVICE_REFRESH_SUMMARY} Run \`${formatDaemonServiceRefreshCommand()}\` in human view, then return to ATS Web.`;
24305
24305
  }
24306
24306
  function buildDaemonServiceRefreshNextStep() {
24307
- const stoppedFollowUp = `If ATS Service is still stopped after repair, run \`${formatDaemonServiceStartCommand()}\`.`;
24308
- return `${DAEMON_SERVICE_REFRESH_SUMMARY} Run \`${formatDaemonServiceRefreshCommand()}\`. ${stoppedFollowUp}`;
24307
+ return `${DAEMON_SERVICE_REFRESH_SUMMARY} Run \`${formatDaemonServiceRefreshCommand()}\`. If Wake or readiness still looks wrong after repair, run \`${formatDaemonServiceStatusCommand()}\`.`;
24309
24308
  }
24310
24309
  function buildDaemonServiceStatusReadOnlyDetail() {
24311
24310
  return "Status is read-only. It does not change ATS Service.";
@@ -24341,6 +24340,10 @@ function formatDaemonServiceStartCommand() {
24341
24340
  const [startCommand] = formatAtsCliCommands(["ats service start"]);
24342
24341
  return startCommand;
24343
24342
  }
24343
+ function formatDaemonServiceStatusCommand() {
24344
+ const [statusCommand] = formatAtsCliCommands(["ats service status"]);
24345
+ return statusCommand;
24346
+ }
24344
24347
 
24345
24348
  //#endregion
24346
24349
  //#region src/system/service-readiness-resolver.ts
@@ -36358,6 +36361,14 @@ function normalizeOptionalText$2$1(value) {
36358
36361
  const normalized = typeof value === "string" ? value.trim() : "";
36359
36362
  return normalized.length > 0 ? normalized : null;
36360
36363
  }
36364
+ const ATS_AGENT_MENTAL_MODEL_LINES = [
36365
+ "ATS is the Agent Transport System: a user wakes an Agent Profile in a Space, the correct local ATS Service carries the local run, and the Space shows a visible reply or an explicit visible failure.",
36366
+ "A Space is the shared collaboration surface; an Agent Profile is the AI teammate identity; ATS Service is the local execution carrier, not the Space truth, profile identity, readiness authority, or final outcome owner.",
36367
+ "Default Collaboration mode keeps private agent work local. Publish the public outcome through ATS Space Action; raw or transparent context sharing is explicit opt-in."
36368
+ ];
36369
+ function buildAgentFacingMentalModelLines() {
36370
+ return [...ATS_AGENT_MENTAL_MODEL_LINES];
36371
+ }
36361
36372
  const STRUCTURED_ACTION_BLOCK_INFO_STRING = "ats-space-action";
36362
36373
  const STRUCTURED_ACTION_BLOCK_RE = /(?:\r?\n)?```ats-space-action\s*\r?\n([\s\S]*?)\r?\n```\s*$/;
36363
36374
  const STRUCTURED_ACTION_BLOCK_LINE_BREAK_RE = /\r?\n/u;
@@ -36788,7 +36799,7 @@ function areAllowedActionsEquivalent(left, right) {
36788
36799
  return canonicalLeft.length === canonicalRight.length && canonicalLeft.every((action, index) => action === canonicalRight[index]);
36789
36800
  }
36790
36801
  const COLLABORATION_HOW_THIS_SPACE_WORKS = "ATS is an external collaboration layer, not your private scratchpad. Work normally in your local context, then publish only the public outcome this Space needs with one ATS Space Action.";
36791
- const COLLABORATION_ACTION_REQUIREMENT = "Final outcome: use exactly one ATS Space Action. Prefer the CLI command; fall back to one trailing ats-space-action block only if the CLI command is unavailable.";
36802
+ const COLLABORATION_ACTION_REQUIREMENT = "Final outcome: use exactly one ATS Space Action through the CLI. Only if every Space Action CLI command fails, use one trailing ats-space-action block.";
36792
36803
  const COLLABORATION_REPAIR_REQUIREMENT = "Return the corrected final answer again, preserve the user's intent, and end with exactly one valid trailing ```ats-space-action``` JSON block.";
36793
36804
  const RAW_CONTEXT_SHARING_HOW_THIS_SPACE_WORKS = "This Space uses transparent context sharing: ATS may share your raw reply directly. Use ATS Space Action when you need a controlled visible outcome.";
36794
36805
  const RAW_CONTEXT_SHARING_ACTION_REQUIREMENT = "Raw reply is allowed. Use ATS Space Action only when you need a controlled visible outcome.";
@@ -36910,7 +36921,7 @@ function buildDispatchReplyContextSummary(replyToSnapshot) {
36910
36921
 
36911
36922
  //#endregion
36912
36923
  //#region src/daemon/dispatch/parse-dispatch-task.ts
36913
- const ATS_SPACE_DEFINITION = "ATS Space is an external collaboration layer where humans and Agent Profiles coordinate work without mirroring private agent context.";
36924
+ const ATS_SPACE_DEFINITION = buildAgentFacingMentalModelLines().slice(0, 2).join(" ");
36914
36925
  const ENTRY_BRIEF_TEMPLATE_VERSION = "space-mesh-entry-brief-v1";
36915
36926
  const COMPACT_DISPATCH_BOOTSTRAP_TEMPLATE_VERSION = ENTRY_BRIEF_TEMPLATE_VERSION;
36916
36927
  const DEFAULT_SPACE_PURPOSE = "shared coordination";
@@ -37195,7 +37206,8 @@ function buildSendTargetReferenceLines(input) {
37195
37206
  function buildIfUnsureLine(input) {
37196
37207
  return [
37197
37208
  `Need context? Run \`${buildSpaceHistoryCommand(input)}\`.`,
37198
- `Need action help? Run \`${buildSpaceActionCommand(input, "help")}\`, \`${buildSpaceActionCommand(input, "targets")}\`, or \`${buildPromptSpaceActionCommand(input)}\`.`,
37209
+ `Need action help? Run \`${buildSpaceActionCommand(input, "help")}\` or \`${buildSpaceActionCommand(input, "targets")}\`.`,
37210
+ `Fallback JSON is last resort: only if every Space Action command fails, run \`${buildPromptSpaceActionCommand(input)}\`.`,
37199
37211
  "Still unclear? Ask one short question."
37200
37212
  ].join(" ");
37201
37213
  }
@@ -45185,7 +45197,7 @@ function isDaemonRunAlreadyRunningReason(reason) {
45185
45197
  }
45186
45198
  function createDaemonAlreadyRunningResult() {
45187
45199
  return {
45188
- ok: false,
45200
+ ok: true,
45189
45201
  reason: LEGACY_DAEMON_RUN_ALREADY_RUNNING_REASON
45190
45202
  };
45191
45203
  }
@@ -47641,7 +47653,6 @@ async function runDaemonRunInteractivePreflightBeforeModePrompt(input) {
47641
47653
  const { runtimeStatus, effectiveRuntimeStatus } = await readCurrentDaemonRuntimeContext();
47642
47654
  if (effectiveRuntimeStatus === "running") {
47643
47655
  emitDaemonAlreadyRunningState(input.runtime, input.presenter, runtimeStatus);
47644
- process.exitCode = 1;
47645
47656
  return createDaemonAlreadyRunningResult();
47646
47657
  }
47647
47658
  const authReadiness = await resolveDaemonRunAuthReadiness({ gatewayUrl: input.input.gatewayUrl });
@@ -48282,7 +48293,7 @@ async function executeDaemonRunWithJournal(input) {
48282
48293
  }
48283
48294
  function summarizeDaemonRunJournalResult(result) {
48284
48295
  return {
48285
- result: result.ok ? "started" : result.reason,
48296
+ result: result.reason,
48286
48297
  metadata: { ok: result.ok }
48287
48298
  };
48288
48299
  }
@@ -48418,7 +48429,6 @@ async function runSystemDaemonCore(context) {
48418
48429
  const { runtimeStatus, effectiveRuntimeStatus } = await readCurrentDaemonRuntimeContext();
48419
48430
  if (effectiveRuntimeStatus === "running") {
48420
48431
  emitDaemonAlreadyRunningState(runtime, presenter, runtimeStatus);
48421
- process.exitCode = 1;
48422
48432
  return createDaemonAlreadyRunningResult();
48423
48433
  }
48424
48434
  if (runtimeStatus.status === "stale") await clearDaemonServiceRuntimeState();
@@ -48875,11 +48885,16 @@ function resolveDaemonContractServiceController(input) {
48875
48885
  return null;
48876
48886
  }
48877
48887
  function emitDaemonAlreadyRunningState(runtime, presenter, runtimeStatus) {
48888
+ const statusCommand = formatAtsCliCommand("ats service status");
48889
+ const guidance = `ATS Service is already running. If Wake or readiness still looks wrong, \`ats service start\` is not the repair step. Run \`${statusCommand}\`; if local participation is unhealthy, run \`${formatAtsCliCommand("ats service repair")}\` or use Check this computer in ATS Web.`;
48878
48890
  if (runtime.resolvedView === "agent") {
48879
48891
  presenter.data({
48880
48892
  code: "daemon.run.already_running",
48881
48893
  payload: {
48882
- ok: false,
48894
+ ok: true,
48895
+ guidance,
48896
+ lifecycleState: "running",
48897
+ nextSteps: [statusCommand],
48883
48898
  reason: LEGACY_DAEMON_RUN_ALREADY_RUNNING_REASON,
48884
48899
  status: runtimeStatus
48885
48900
  }
@@ -48900,8 +48915,12 @@ function emitDaemonAlreadyRunningState(runtime, presenter, runtimeStatus) {
48900
48915
  value: runtimeStatus.pid === null ? "not available" : String(runtimeStatus.pid)
48901
48916
  },
48902
48917
  {
48903
- label: "💡 Action",
48904
- value: "run `ats service stop` first, then try `ats service start` again."
48918
+ label: "💡 What this means",
48919
+ value: "ATS Service is already running."
48920
+ },
48921
+ {
48922
+ label: "🔧 Next",
48923
+ value: guidance
48905
48924
  }
48906
48925
  ])
48907
48926
  });
@@ -51600,6 +51619,7 @@ async function tryCreateSymlink(input) {
51600
51619
  //#endregion
51601
51620
  //#region src/skills/legacy-audit.ts
51602
51621
  const LEGACY_ATS_SKILL_IDS = new Set(["ats-cli-guide"]);
51622
+ const LEGACY_ATS_SKILL_VERIFICATION_COMMAND = "ats skills check --view agent";
51603
51623
  async function detectLegacyAtsSkillCopies(input) {
51604
51624
  const currentSkillIds = new Set(input.localSkills.map((skill) => skill.id));
51605
51625
  const roots = resolveCandidateSkillRoots(input);
@@ -51652,8 +51672,10 @@ async function inspectPotentialLegacyAtsSkill(input) {
51652
51672
  parentDir,
51653
51673
  reasonCode: "legacy_ats_skill_id",
51654
51674
  problem: "This is an old ATS skill name. Agents can still load it and learn stale ATS instructions.",
51655
- recommendation: "Install the current ATS skill into this skill root, then remove or rename this legacy skill directory.",
51656
- cleanupCommands: buildLegacySkillCleanupCommands(skillDir)
51675
+ recommendation: "Do not load or follow this skill. Install the current ATS skill into this skill root, then remove or rename this legacy skill directory and rerun the ATS skills check.",
51676
+ currentInstallCommand: buildCurrentSkillInstallCommand(parentDir),
51677
+ cleanupCommands: buildLegacySkillCleanupCommands(skillDir),
51678
+ verificationCommand: LEGACY_ATS_SKILL_VERIFICATION_COMMAND
51657
51679
  };
51658
51680
  if (input.currentSkillIds.has(input.skillId) && !input.targetCurrentSkillDirs.has(skillDir) && isLikelyAtsSkillDocument(rawSkill)) return {
51659
51681
  skillId: input.skillId,
@@ -51661,13 +51683,18 @@ async function inspectPotentialLegacyAtsSkill(input) {
51661
51683
  parentDir,
51662
51684
  reasonCode: "unmanaged_current_ats_skill_copy",
51663
51685
  problem: "This looks like an ATS skill copy, but this ATS installation does not manage it.",
51664
- recommendation: "Replace it through ats skills ensure for that skill root, or remove it if this agent should not use ATS.",
51665
- cleanupCommands: buildLegacySkillCleanupCommands(skillDir)
51686
+ recommendation: "Do not load or follow this unmanaged copy until the current ATS-managed skill is installed for this skill root. Install the current skill, then remove or rename this directory if this agent should not use the unmanaged copy.",
51687
+ currentInstallCommand: buildCurrentSkillInstallCommand(parentDir),
51688
+ cleanupCommands: buildLegacySkillCleanupCommands(skillDir),
51689
+ verificationCommand: LEGACY_ATS_SKILL_VERIFICATION_COMMAND
51666
51690
  };
51667
51691
  return null;
51668
51692
  }
51669
51693
  function buildLegacySkillCleanupCommands(skillDir) {
51670
- return [`rm -rf ${quoteShellArg(skillDir)}`, `mv ${quoteShellArg(skillDir)} ${quoteShellArg(`${skillDir}.legacy`)}`];
51694
+ return [`mv ${quoteShellArg(skillDir)} ${quoteShellArg(`${skillDir}.legacy`)}`, `rm -rf ${quoteShellArg(skillDir)}`];
51695
+ }
51696
+ function buildCurrentSkillInstallCommand(parentDir) {
51697
+ return `ats skills ensure --dir ${quoteShellArg(parentDir)} --view agent`;
51671
51698
  }
51672
51699
  function quoteShellArg(value) {
51673
51700
  return `'${value.replace(/'/g, "'\\''")}'`;
@@ -51915,6 +51942,7 @@ async function runSkillsCheck$1(input) {
51915
51942
  localSkills,
51916
51943
  targets: checkTargets
51917
51944
  });
51945
+ const payloadLegacyFindings = runtime.resolvedView === "agent" ? formatLegacyAtsSkillFindingsForAgentView(legacyFindings) : legacyFindings;
51918
51946
  await persistDetectedInstallStateFromCheck({ states });
51919
51947
  const summary = summarizeSkillState(states);
51920
51948
  const targetStates = summarizeSkillsCheckTargets({
@@ -51929,9 +51957,9 @@ async function runSkillsCheck$1(input) {
51929
51957
  summary,
51930
51958
  states,
51931
51959
  targetStates,
51932
- legacyFindings,
51933
- legacyFindingCount: legacyFindings.length,
51934
- legacyReview: legacyFindings.length > 0 ? buildLegacyAtsSkillAgentReview(legacyFindings) : null,
51960
+ legacyFindings: payloadLegacyFindings,
51961
+ legacyFindingCount: payloadLegacyFindings.length,
51962
+ legacyReview: payloadLegacyFindings.length > 0 ? buildLegacyAtsSkillAgentReview(payloadLegacyFindings) : null,
51935
51963
  requiresReview: summary.outdated > 0 || summary.missing > 0 || summary.externalConflict > 0 || legacyFindings.length > 0
51936
51964
  };
51937
51965
  if (runtime.resolvedView === "agent" && !input.suppressAgentOverview) emitSkillsAgentOverview({
@@ -51949,7 +51977,7 @@ async function runSkillsCheck$1(input) {
51949
51977
  if (input.quiet) return "completed";
51950
51978
  if (runtime.resolvedView === "agent") {
51951
51979
  emitLegacyAtsSkillAgentAttention({
51952
- legacyFindings,
51980
+ legacyFindings: payloadLegacyFindings,
51953
51981
  presenter,
51954
51982
  source: "skills.check"
51955
51983
  });
@@ -53400,30 +53428,62 @@ function emitLegacyAtsSkillFindingsHumanCard(input) {
53400
53428
  }
53401
53429
  function buildLegacyAtsSkillNextStepRows(legacyFindings) {
53402
53430
  if (legacyFindings.length === 0) return [];
53431
+ const installCommands = buildLegacyAtsSkillInstallCommands(legacyFindings).map((command) => formatAtsCliCommand(command));
53432
+ const verificationCommand = formatAtsCliCommand(legacyFindings[0]?.verificationCommand ?? "ats skills check --view agent");
53403
53433
  return [{
53404
53434
  label: "legacy ATS skills",
53405
- value: pc.bold(formatInlineAtsCliCommands("Remove or rename the listed legacy ATS skill directories after installing the current skill with `ats skills ensure --all --view agent` or `ats skills ensure --dir <absolute-path> --view agent`."))
53435
+ value: pc.bold([
53436
+ "Do not read the listed legacy ATS skill instructions.",
53437
+ `Run ${formatInlineCommandList(installCommands)} for each affected skill root.`,
53438
+ "After the install succeeds, rename or remove the legacy directories.",
53439
+ `Then rerun \`${verificationCommand}\`.`
53440
+ ].join(" "))
53406
53441
  }];
53407
53442
  }
53443
+ function formatLegacyAtsSkillFindingsForAgentView(legacyFindings) {
53444
+ return legacyFindings.map((finding) => ({
53445
+ ...finding,
53446
+ currentInstallCommand: formatAtsCliCommand(finding.currentInstallCommand),
53447
+ verificationCommand: formatAtsCliCommand(finding.verificationCommand)
53448
+ }));
53449
+ }
53408
53450
  function buildLegacyAtsSkillAgentReview(legacyFindings) {
53451
+ const installCommands = buildLegacyAtsSkillInstallCommands(legacyFindings);
53452
+ const verificationCommand = legacyFindings[0]?.verificationCommand ?? "ats skills check --view agent";
53409
53453
  return {
53410
53454
  priority: "high",
53411
53455
  reason: "Legacy or unmanaged ATS skill copies can make agents read old ATS instructions even when the current ATS-managed skill is up to date.",
53412
- nextStep: "Install the current ATS skill first, then remove or rename each listed legacy directory.",
53456
+ nextStep: "Do not read or follow the listed legacy ATS skill instructions. Run each install command, then remove or rename each listed legacy directory, then rerun the ATS skills check.",
53457
+ nextActions: [
53458
+ "Do not read or follow instructions from the listed legacy ATS skill directories.",
53459
+ ...installCommands.map((command) => `Run ${command}.`),
53460
+ "After the current ATS skill install succeeds for that root, rename or remove each listed legacy directory. Prefer mv ... .legacy when you need reversible cleanup.",
53461
+ `Rerun ${verificationCommand}.`
53462
+ ],
53463
+ installCommands,
53413
53464
  paths: legacyFindings.map((finding) => finding.skillDir),
53414
- cleanupCommands: legacyFindings.flatMap((finding) => finding.cleanupCommands)
53465
+ cleanupCommands: legacyFindings.flatMap((finding) => finding.cleanupCommands),
53466
+ verificationCommand
53415
53467
  };
53416
53468
  }
53469
+ function buildLegacyAtsSkillInstallCommands(legacyFindings) {
53470
+ return [...new Set(legacyFindings.map((finding) => finding.currentInstallCommand))].sort((left, right) => left.localeCompare(right));
53471
+ }
53417
53472
  function emitLegacyAtsSkillAgentAttention(input) {
53418
53473
  if (input.legacyFindings.length === 0) return;
53419
53474
  const review = buildLegacyAtsSkillAgentReview(input.legacyFindings);
53420
53475
  const directoryLabel = input.legacyFindings.length === 1 ? "directory" : "directories";
53476
+ const installCommands = review.installCommands.map((command) => formatAtsCliCommand(command));
53477
+ const verificationCommand = formatAtsCliCommand(review.verificationCommand);
53421
53478
  input.presenter.line({
53422
53479
  code: `${input.source}.legacy_attention_required`,
53423
53480
  text: [
53424
53481
  `attention required: found ${input.legacyFindings.length} legacy or unmanaged ATS skill ${directoryLabel}: ${review.paths.join(", ")}.`,
53425
53482
  "These copies are outside the current ATS-managed skill install and can make agents read old ATS instructions.",
53426
- "Install the current ATS skill first, then remove or rename each listed directory."
53483
+ "Do not read or follow those skill instructions.",
53484
+ `Next: run ${formatInlineCommandList(installCommands)}.`,
53485
+ "After the current skill is installed, rename or remove each listed directory; ATS will not do this automatically.",
53486
+ `Then rerun \`${verificationCommand}\`.`
53427
53487
  ].join(" "),
53428
53488
  data: {
53429
53489
  legacyFindingCount: input.legacyFindings.length,
@@ -53432,6 +53492,9 @@ function emitLegacyAtsSkillAgentAttention(input) {
53432
53492
  }
53433
53493
  });
53434
53494
  }
53495
+ function formatInlineCommandList(commands) {
53496
+ return commands.map((command) => `\`${command}\``).join(", ");
53497
+ }
53435
53498
  function formatSkillsCommand(command) {
53436
53499
  return pc.bold(pc.cyan(formatAtsCliCommand(command)));
53437
53500
  }
@@ -53952,19 +54015,20 @@ function emitInstallSummary(input) {
53952
54015
  const installedTargets = summarizeInstalledTargets(input.installResults);
53953
54016
  const failed = input.installResults.filter((item) => item.status === "failed");
53954
54017
  const skipped = input.installResults.filter((item) => item.status === "skipped");
54018
+ const legacyFindings = input.resolvedView === "agent" ? formatLegacyAtsSkillFindingsForAgentView(input.legacyFindings ?? []) : input.legacyFindings ?? [];
53955
54019
  const payload = {
53956
54020
  storeDir: input.storeDir,
53957
54021
  summary,
53958
54022
  installedTargets,
53959
54023
  results: input.installResults,
53960
- legacyFindings: input.legacyFindings ?? [],
53961
- legacyFindingCount: input.legacyFindings?.length ?? 0,
53962
- legacyReview: (input.legacyFindings?.length ?? 0) > 0 ? buildLegacyAtsSkillAgentReview(input.legacyFindings ?? []) : null,
53963
- requiresReview: summary.failed > 0 || (input.legacyFindings?.length ?? 0) > 0
54024
+ legacyFindings,
54025
+ legacyFindingCount: legacyFindings.length,
54026
+ legacyReview: legacyFindings.length > 0 ? buildLegacyAtsSkillAgentReview(legacyFindings) : null,
54027
+ requiresReview: summary.failed > 0 || legacyFindings.length > 0
53964
54028
  };
53965
54029
  if (input.resolvedView === "agent") {
53966
54030
  emitLegacyAtsSkillAgentAttention({
53967
- legacyFindings: input.legacyFindings ?? [],
54031
+ legacyFindings,
53968
54032
  presenter: input.presenter,
53969
54033
  source: "skills.install"
53970
54034
  });
@@ -58823,7 +58887,7 @@ function buildReplyReadinessNextSteps(input) {
58823
58887
  case "runtime.adapter.unsupported": return [formatAtsCliCommand("ats agents detect"), formatAtsCliCommand("ats agents list")];
58824
58888
  case "controller.bootstrap.failed": return [...buildLocalAgentLaunchRepairNextSteps({ localAgentId: input.localAgentId }), formatAtsCliCommand("openclaw agents list")];
58825
58889
  case "controller.gateway.unhealthy": return [...buildLocalAgentLaunchRepairNextSteps({ localAgentId: input.localAgentId }), formatAtsCliCommand("openclaw health --json")];
58826
- case "route.offline": return [formatAtsCliCommand(`ats service status --profile ${profileId}`), formatAtsCliCommand("ats service start")];
58890
+ case "route.offline": return [formatAtsCliCommand(`ats service status --profile ${profileId}`), formatAtsCliCommand("ats service repair")];
58827
58891
  case "route.not_registered": return [formatAtsCliCommand(`ats service status --profile ${profileId}`), formatAtsCliCommand("ats doctor --repair")];
58828
58892
  case "service.gateway_chain_unhealthy": return resolveGatewayChainRepairGuidance({}).nextSteps;
58829
58893
  case "dispatch.storage_not_ready": return resolveGatewayChainRepairGuidance({ failureKind: "dispatch_storage_not_ready" }).nextSteps;
@@ -63612,7 +63676,7 @@ async function emitProfileCreateResult(input) {
63612
63676
  }
63613
63677
  input.presenter.line({
63614
63678
  code: "profile.created",
63615
- text: `created profile: ${input.profile.atsProfileId}`,
63679
+ text: `created Agent Profile identity: ${input.profile.atsProfileId}`,
63616
63680
  data: {
63617
63681
  atsProfileId: input.profile.atsProfileId,
63618
63682
  profileName: input.profile.profileName,
@@ -63622,6 +63686,7 @@ async function emitProfileCreateResult(input) {
63622
63686
  ...buildAgentProfileStateData(input.profile),
63623
63687
  ...buildAgentProfileRuntimeData(input.agentRuntimeState),
63624
63688
  currentProfileChanged: false,
63689
+ ...buildAgentCreateWakeReadinessData(input.profile),
63625
63690
  nextSteps: buildAgentCreateNextSteps(input.profile)
63626
63691
  }
63627
63692
  });
@@ -63638,6 +63703,7 @@ async function emitProfileCreateResult(input) {
63638
63703
  createdProfileId: input.profile.atsProfileId,
63639
63704
  currentProfileChanged: false,
63640
63705
  reason: "Agent View profile creation does not change the acting identity. Pass --profile explicitly when this profile should act.",
63706
+ ...buildAgentCreateWakeReadinessData(input.profile),
63641
63707
  nextSteps: buildAgentCreateNextSteps(input.profile)
63642
63708
  }
63643
63709
  });
@@ -64566,11 +64632,12 @@ function renderProfileReadyCard(input) {
64566
64632
  label: "Default for This Account",
64567
64633
  value: "Yes"
64568
64634
  });
64635
+ rows.push(...buildProfileCreateWakeReadinessRows(input));
64569
64636
  rows.push(...buildAgentProfileStateRows(input.profile));
64570
64637
  rows.push(...buildAgentProfileRuntimeRows(input.agentRuntimeState));
64571
64638
  renderInfoCard({
64572
64639
  presenter: input.presenter,
64573
- title: "Profile Ready",
64640
+ title: input.state === "created" && input.profile.profileKind === "agent" ? "Agent Profile Identity Created" : "Profile Ready",
64574
64641
  codePrefix: "profile.created.card",
64575
64642
  rows,
64576
64643
  sanitize: true
@@ -64623,6 +64690,12 @@ function renderProfileSummaryCard(input) {
64623
64690
  });
64624
64691
  }
64625
64692
  function buildAgentCreateNextSteps(profile) {
64693
+ if (profile.profileKind === "agent") return [
64694
+ formatAtsCliCommand(`ats agents prepare --profile ${profile.atsProfileId} --view agent`),
64695
+ formatAtsCliCommand(`ats service status --profile ${profile.atsProfileId} --view agent`),
64696
+ formatAtsCliCommand(`ats profiles show ${profile.atsProfileId} --view agent`),
64697
+ formatAtsCliCommand(`ats whoami --profile ${profile.atsProfileId} --view agent`)
64698
+ ];
64626
64699
  return [
64627
64700
  formatAtsCliCommand("ats profiles list --view agent"),
64628
64701
  formatAtsCliCommand(`ats profiles set ${profile.atsProfileId} --view agent`),
@@ -64631,6 +64704,24 @@ function buildAgentCreateNextSteps(profile) {
64631
64704
  formatAtsCliCommand(`ats space join --profile ${profile.atsProfileId} <space-id> --view agent`)
64632
64705
  ];
64633
64706
  }
64707
+ function buildAgentCreateWakeReadinessData(profile) {
64708
+ if (profile.profileKind !== "agent") return {};
64709
+ return {
64710
+ identityCreated: true,
64711
+ wakeReadinessVerified: false,
64712
+ wakeReadinessNote: "This command created the Agent Profile identity. It did not verify that this profile can be woken from a Space or reply from this computer."
64713
+ };
64714
+ }
64715
+ function buildProfileCreateWakeReadinessRows(input) {
64716
+ if (input.state !== "created" || input.profile.profileKind !== "agent") return [];
64717
+ return [{
64718
+ label: "Wake Readiness",
64719
+ value: "Not verified by profile creation"
64720
+ }, {
64721
+ label: "Next",
64722
+ value: `Run ${formatAtsCliCommand(`ats agents prepare --profile ${input.profile.atsProfileId}`)} before expecting this Agent Profile to reply from a Space.`
64723
+ }];
64724
+ }
64634
64725
  function buildAgentUpdateNextSteps(profile) {
64635
64726
  return [
64636
64727
  formatAtsCliCommand(`ats profiles show ${profile.atsProfileId} --view agent`),
@@ -65170,7 +65261,8 @@ const PROMPT_GUIDE_CATALOG = {
65170
65261
  guide: {
65171
65262
  summary: "Use this guide for `ats space` operations, including create, join, watch, send, guide, password, structured actions, and delete.",
65172
65263
  humanSteps: [
65173
- "Treat ATS as an external collaboration layer, not a private scratchpad or transcript mirror.",
65264
+ ATS_AGENT_MENTAL_MODEL_LINES[0],
65265
+ ATS_AGENT_MENTAL_MODEL_LINES[2],
65174
65266
  "Use canonical `<space-id>` targets instead of space names.",
65175
65267
  "Keep `--profile <profile-id>` explicit in agent or multi-process workflows.",
65176
65268
  "If a protected Space blocks access, first confirm the active account/profile. Join once with the Space password only when the account has not joined yet.",
@@ -65183,8 +65275,7 @@ const PROMPT_GUIDE_CATALOG = {
65183
65275
  "ats space send --profile <profile-id> <space-id> \"<message>\" --view agent",
65184
65276
  "ats space guide <space-id> --profile <profile-id> --view agent",
65185
65277
  "ats space publication set <space-id> collaboration --profile <owner-profile-id> --password <space-password> --view agent",
65186
- "ats prompt space --raw",
65187
- "ats prompt space-action --raw"
65278
+ "ats prompt space --raw"
65188
65279
  ],
65189
65280
  notes: [
65190
65281
  "Collaboration mode is the default: agents should publish concise public outcomes through ATS Space Action rather than mirror all private work into the Space.",
@@ -65215,12 +65306,12 @@ const PROMPT_GUIDE_CATALOG = {
65215
65306
  "<DISPATCH_ACTION_CLI> space action status done \"short completion update\"",
65216
65307
  "<DISPATCH_ACTION_CLI> space action silent --reason \"No public reply is needed.\"",
65217
65308
  "<DISPATCH_ACTION_CLI> space action targets",
65218
- "<DISPATCH_ACTION_CLI> space action help",
65219
- "ats prompt space-action --raw"
65309
+ "<DISPATCH_ACTION_CLI> space action help"
65220
65310
  ],
65221
65311
  notes: [
65222
65312
  "Write actions require an active ATS Space Wake dispatch context.",
65223
65313
  "`<DISPATCH_ACTION_CLI>` is a placeholder in guides, not a literal command.",
65314
+ "Fallback JSON is last resort: only if every Space Action CLI command fails, run `ats prompt space-action --raw` and use one trailing `ats-space-action` block.",
65224
65315
  "Wake targets must be ready Agent Profiles in the current Space.",
65225
65316
  "`working` is not accepted here because status actions are final visible outcomes in the current contract."
65226
65317
  ]
@@ -65813,8 +65904,47 @@ function buildServiceTraceAgentExecutionStatus(input) {
65813
65904
  runtimeReadiness: normalizePrepareReadiness(input.prepareReadiness)
65814
65905
  });
65815
65906
  }
65816
- function buildServiceTraceAgentExecutionStatusRows(projection) {
65817
- return createAgentExecutionStatusDisplayRows(projection);
65907
+ function buildServiceTraceLocalExecutionDiagnosticRows(projection) {
65908
+ return createAgentExecutionStatusDisplayRows(projection).map(formatLocalExecutionDiagnosticRow);
65909
+ }
65910
+ function formatLocalExecutionDiagnosticRow(row) {
65911
+ switch (row.label) {
65912
+ case "Reply status": return {
65913
+ label: "Current Local Execution Projection",
65914
+ value: formatLocalExecutionProjectionValue(row.value)
65915
+ };
65916
+ case "Connection": return {
65917
+ label: "Current Binding Evidence",
65918
+ value: row.value
65919
+ };
65920
+ case "Local readiness": return {
65921
+ label: "Current Prepare Evidence",
65922
+ value: row.value.replace("Local readiness", "Prepare evidence")
65923
+ };
65924
+ case "Reply route": return {
65925
+ label: "Current Daemon Route Evidence",
65926
+ value: row.value
65927
+ };
65928
+ case "Wake": return {
65929
+ label: "Current Wake Diagnostic",
65930
+ value: row.value.replace("Wake is available from this computer.", "Local evidence says Wake can be attempted from this computer.")
65931
+ };
65932
+ default: return row;
65933
+ }
65934
+ }
65935
+ function formatLocalExecutionProjectionValue(value) {
65936
+ const [status = "", ...detailParts] = value.split(" · ");
65937
+ const diagnosticStatus = formatLocalExecutionDiagnosticStatus(status);
65938
+ const detail = detailParts.join(" · ");
65939
+ return detail ? `Local evidence: ${diagnosticStatus} · ${detail}` : `Local evidence: ${diagnosticStatus}`;
65940
+ }
65941
+ function formatLocalExecutionDiagnosticStatus(status) {
65942
+ switch (status) {
65943
+ case "Ready": return "reply-capable";
65944
+ case "Not ready": return "not reply-capable";
65945
+ case "Blocked": return "blocked";
65946
+ default: return status.toLowerCase();
65947
+ }
65818
65948
  }
65819
65949
  function normalizeBindingProjection(binding) {
65820
65950
  if (!binding) return null;
@@ -65981,6 +66111,7 @@ async function runServiceTrace(input, deps = {}) {
65981
66111
  });
65982
66112
  const daemonDispatchJournal = resolveDaemonDispatchJournalEvidence(selection.dispatchId);
65983
66113
  const agentSummary = buildAgentTraceCompactSummary({ trace: traceResponse.trace });
66114
+ const traceReadinessGuidance = shouldExposeCurrentReadinessGuidance(traceResponse.trace) ? targetContext.guidance : null;
65984
66115
  const payload = {
65985
66116
  correlation: traceResponse.correlation,
65986
66117
  query: traceResponse.query,
@@ -66008,7 +66139,7 @@ async function runServiceTrace(input, deps = {}) {
66008
66139
  },
66009
66140
  currentProfileWorkspace: targetContext.currentProfileWorkspace,
66010
66141
  agentSummary,
66011
- guidance: targetContext.guidance
66142
+ guidance: traceReadinessGuidance
66012
66143
  };
66013
66144
  if (runtime.resolvedView === "agent") {
66014
66145
  presenter.data({
@@ -66046,7 +66177,7 @@ async function runServiceTrace(input, deps = {}) {
66046
66177
  currentDeviceReplyReadiness: targetContext.currentReplyReadiness?.deviceReplyReadiness ?? null,
66047
66178
  currentDaemonRouteObservation: targetContext.currentReplyReadiness?.daemonRouteObservation ?? null,
66048
66179
  currentProfileWorkspace: targetContext.currentProfileWorkspace,
66049
- guidance: targetContext.guidance,
66180
+ guidance: traceReadinessGuidance,
66050
66181
  claimExecutionDiagnostics,
66051
66182
  agentExecutionStatus,
66052
66183
  daemonDispatchJournal
@@ -66300,6 +66431,31 @@ async function resolveTraceTargetContext(input) {
66300
66431
  guidance
66301
66432
  };
66302
66433
  }
66434
+ const TRACE_GUIDANCE_SUPPRESSED_RUNTIME_COORDINATOR_STATUSES = new Set([
66435
+ "created",
66436
+ "delivery_pending",
66437
+ "delivery_accepted",
66438
+ "accepted_local",
66439
+ "running",
66440
+ "completed_local",
66441
+ "result_received",
66442
+ "result_accepted",
66443
+ "reply_published"
66444
+ ]);
66445
+ const TRACE_GUIDANCE_SUPPRESSED_HEAD_STATUSES = new Set([
66446
+ "accepted",
66447
+ "execution_linked",
66448
+ "waiting",
66449
+ "publication_intent_ready"
66450
+ ]);
66451
+ function shouldExposeCurrentReadinessGuidance(trace) {
66452
+ if (!trace) return true;
66453
+ if (projectSpaceDispatchTraceFinalVisibleOutcome(trace).delivered) return false;
66454
+ const executionStatus = trace.runtimeCoordinatorExecution?.status ?? null;
66455
+ if (executionStatus && TRACE_GUIDANCE_SUPPRESSED_RUNTIME_COORDINATOR_STATUSES.has(executionStatus)) return false;
66456
+ const headLifecycle = trace.runtimeCoordinatorHeadLifecycle ?? null;
66457
+ return !(headLifecycle?.readStatus === "found" && TRACE_GUIDANCE_SUPPRESSED_HEAD_STATUSES.has(headLifecycle.status));
66458
+ }
66303
66459
  function renderLookupNotFound(input) {
66304
66460
  const lookup = {
66305
66461
  query: {
@@ -66554,17 +66710,17 @@ function buildHumanTraceRows(input) {
66554
66710
  {
66555
66711
  label: "Target",
66556
66712
  value: input.targetProfile?.profileName ?? input.trace.dispatch.targetProfileId
66557
- },
66558
- {
66559
- label: "Dispatch Ledger Evidence",
66560
- value: `${input.trace.dispatch.status} · attempts ${input.trace.dispatch.attemptCount}`
66561
- },
66562
- {
66563
- label: "Root Cause",
66564
- value: resolveTraceRootCause(input.trace)
66565
66713
  }
66566
66714
  ];
66567
66715
  appendFinalVisibleOutcomeRows(rows, input.trace);
66716
+ rows.push({
66717
+ label: "Root Cause",
66718
+ value: resolveTraceRootCause(input.trace)
66719
+ });
66720
+ rows.push({
66721
+ label: "Dispatch Ledger Evidence",
66722
+ value: `${input.trace.dispatch.status} · attempts ${input.trace.dispatch.attemptCount}`
66723
+ });
66568
66724
  appendPublicationDiagnosticRows(rows, input.trace);
66569
66725
  rows.push({
66570
66726
  label: "Legacy Claim Diagnostic Evidence",
@@ -66572,10 +66728,10 @@ function buildHumanTraceRows(input) {
66572
66728
  });
66573
66729
  if (input.agentExecutionStatus) {
66574
66730
  rows.push({
66575
- label: "Current Readiness Evidence",
66576
- value: "Core AgentExecutionReadiness for this computer; not this Wake's final result."
66731
+ label: "Current Local Execution Diagnostics",
66732
+ value: "Local binding, prepare, daemon route, and claim evidence only; not Core AgentExecutionReadiness and not this Wake's final result."
66577
66733
  });
66578
- rows.push(...buildServiceTraceAgentExecutionStatusRows(input.agentExecutionStatus).map(formatServiceTraceAgentExecutionStatusEvidenceRow));
66734
+ rows.push(...buildServiceTraceLocalExecutionDiagnosticRows(input.agentExecutionStatus));
66579
66735
  }
66580
66736
  if (input.currentAgentReplyReadiness) {
66581
66737
  rows.push({
@@ -66584,11 +66740,11 @@ function buildHumanTraceRows(input) {
66584
66740
  });
66585
66741
  rows.push({
66586
66742
  label: "Current Local Reply Evidence",
66587
- value: formatAgentReplyReadinessLabel(input.currentAgentReplyReadiness)
66743
+ value: formatLocalReplyEvidenceLabel(formatAgentReplyReadinessLabel(input.currentAgentReplyReadiness))
66588
66744
  });
66589
66745
  rows.push({
66590
66746
  label: "Current Local Service Link Evidence",
66591
- value: input.currentDeviceReplyReadiness === null ? "Unknown" : formatDeviceReplyReadinessLabel(input.currentDeviceReplyReadiness)
66747
+ value: input.currentDeviceReplyReadiness === null ? "Unknown" : formatLocalReplyEvidenceLabel(formatDeviceReplyReadinessLabel(input.currentDeviceReplyReadiness))
66592
66748
  });
66593
66749
  if (input.currentDaemonRouteObservation) rows.push({
66594
66750
  label: "Current Local Reply Route Evidence",
@@ -66639,30 +66795,12 @@ function buildHumanTraceRows(input) {
66639
66795
  });
66640
66796
  return rows;
66641
66797
  }
66642
- function formatServiceTraceAgentExecutionStatusEvidenceRow(row) {
66643
- switch (row.label) {
66644
- case "Reply status": return {
66645
- ...row,
66646
- label: "Current Computer Reply Readiness"
66647
- };
66648
- case "Connection": return {
66649
- ...row,
66650
- label: "Current Connection Evidence"
66651
- };
66652
- case "Local readiness": return {
66653
- ...row,
66654
- label: "Current Local Readiness Evidence"
66655
- };
66656
- case "Reply route": return {
66657
- ...row,
66658
- label: "Current Reply Route Evidence"
66659
- };
66660
- case "Wake": return {
66661
- ...row,
66662
- label: "Current Computer Wake Availability"
66663
- };
66664
- default: return row;
66665
- }
66798
+ function formatLocalReplyEvidenceLabel(value) {
66799
+ if (value === "Ready") return "Local evidence: reply-capable";
66800
+ if (value.startsWith("Ready · ")) return `Local evidence: reply-capable · ${value.slice(8)}`;
66801
+ if (value === "Not ready") return "Local evidence: not reply-capable";
66802
+ if (value.startsWith("Not ready · ")) return `Local evidence: not reply-capable · ${value.slice(12)}`;
66803
+ return value;
66666
66804
  }
66667
66805
  async function resolveServiceTraceActorProfile(input) {
66668
66806
  if (normalizeOptionalString$5(input.explicitProfileId) || !canUseInteractivePrompts(input.runtime)) return input.actingProfile;
@@ -67237,6 +67375,8 @@ function appendDispatchExecutionRows(rows, trace) {
67237
67375
  }
67238
67376
  function buildAgentTraceSummary(input) {
67239
67377
  if (!input.trace) return `dispatch ${input.dispatchId}: not_found`;
67378
+ const finalVisibleOutcome = projectSpaceDispatchTraceFinalVisibleOutcome(input.trace);
67379
+ const finalVisibleOutcomeSummary = finalVisibleOutcome.status === "not_applicable" ? "finalVisibleOutcome=not_applicable" : `finalVisibleOutcome=${finalVisibleOutcome.status}`;
67240
67380
  const attemptStatus = input.trace.latestAttempt?.status ?? "none";
67241
67381
  const streamingMode = input.trace.streaming?.streamingMode ?? "final";
67242
67382
  const previewEmitted = input.trace.streaming?.previewEmitted === true;
@@ -67245,9 +67385,7 @@ function buildAgentTraceSummary(input) {
67245
67385
  const resultInboxSummary = input.trace.resultInbox ? ` resultInbox=${input.trace.resultInbox.publishState}` : "";
67246
67386
  const headLifecycleSummary = input.trace.runtimeCoordinatorHeadLifecycle ? ` head=${formatRuntimeCoordinatorHeadLifecycleSummary(input.trace.runtimeCoordinatorHeadLifecycle)}` : "";
67247
67387
  const finalVisibleSummary = input.trace.finalVisibleMessage ? ` finalVisible=${input.trace.finalVisibleMessage.signalType}:${input.trace.finalVisibleMessage.signalId}` : "";
67248
- const finalVisibleOutcome = projectSpaceDispatchTraceFinalVisibleOutcome(input.trace);
67249
- const finalVisibleOutcomeSummary = finalVisibleOutcome.status === "not_applicable" ? "" : ` finalVisibleOutcome=${finalVisibleOutcome.status}`;
67250
- return `dispatch ${input.trace.dispatch.dispatchId}: status=${input.trace.dispatch.status} rootCause=${resolveTraceRootCause(input.trace)} latestAttempt=${attemptStatus} streaming=${streamingMode} preview=${previewEmitted ? "emitted" : "none"}${headLifecycleSummary}${resultInboxSummary}${finalVisibleSummary}${finalVisibleOutcomeSummary}${runtimeSummary}${dispatchExecutionSummary}`;
67388
+ return `dispatch ${input.trace.dispatch.dispatchId}: ${finalVisibleOutcomeSummary} delivered=${finalVisibleOutcome.delivered ? "true" : "false"} rootCause=${resolveTraceRootCause(input.trace)} status=${input.trace.dispatch.status} latestAttempt=${attemptStatus} streaming=${streamingMode} preview=${previewEmitted ? "emitted" : "none"}${headLifecycleSummary}${resultInboxSummary}${finalVisibleSummary}${runtimeSummary}${dispatchExecutionSummary}`;
67251
67389
  }
67252
67390
  function buildAgentTraceCompactSummary(input) {
67253
67391
  const trace = input.trace;
@@ -82535,13 +82673,13 @@ function handleBlockedSpaceJoinLocalParticipation(input) {
82535
82673
  if (input.assessmentState === "not_needed") {
82536
82674
  input.presenter.line({
82537
82675
  code: "space.join.service.not_needed",
82538
- text: formatInlineAtsCliCommands("ATS will keep joining this space without local agent participation on this device. If you later bring local agents from this device into this space, use `ats service install` and `ats service start`.")
82676
+ text: formatInlineAtsCliCommands("ATS will keep joining this space without local Wake participation on this device. Space membership is separate from whether a local agent can reply from this computer. If you later want local agents from this device to reply, run `ats service status` and follow its recovery guidance.")
82539
82677
  });
82540
82678
  return "continue";
82541
82679
  }
82542
82680
  input.presenter.line({
82543
82681
  code: "space.join.service.pending",
82544
- text: formatInlineAtsCliCommands("ATS will keep joining this space without local agent participation on this device until ATS Service is ready. When you want local agents on this device to reply in the background, use `ats service install` and `ats service start`.")
82682
+ text: formatInlineAtsCliCommands("ATS will keep joining this space without local Wake participation on this device. Space membership is separate from whether a local agent can reply from this computer. Run `ats service status` to inspect local participation before expecting background replies.")
82545
82683
  });
82546
82684
  return "continue";
82547
82685
  }
@@ -82555,7 +82693,7 @@ function buildSpaceJoinMembershipOnlyMessage(input) {
82555
82693
  const reasonCodes = input.reasonCodes;
82556
82694
  const statusCommand = formatAtsCliCommand(`ats service status --profile ${profileId}`);
82557
82695
  if (reasonCodes.includes("profile.unbound")) return `${profileName} will join this space, but it is not connected to a local agent on this device yet. It can appear here now, but it will not wake or reply from this device until you choose a local agent in ATS Web.`;
82558
- if (reasonCodes.some((reasonCode) => LOCAL_SERVICE_ONLY_JOIN_BLOCK_REASON_CODES.has(reasonCode)) || reasonCodes.includes("dispatch.storage_not_ready") || reasonCodes.includes("service.gateway_chain_unhealthy") || reasonCodes.includes("route.offline") || reasonCodes.includes("route.not_registered")) return formatInlineAtsCliCommands(`${profileName} will join this space, but it will not wake or reply from this device until ATS Service is ready. Use \`ats service install\`, \`ats service start\`, or \`${statusCommand}\` to check this device.`);
82696
+ if (reasonCodes.some((reasonCode) => LOCAL_SERVICE_ONLY_JOIN_BLOCK_REASON_CODES.has(reasonCode)) || reasonCodes.includes("dispatch.storage_not_ready") || reasonCodes.includes("service.gateway_chain_unhealthy") || reasonCodes.includes("route.offline") || reasonCodes.includes("route.not_registered")) return formatInlineAtsCliCommands(`${profileName} will join this space, but it will not wake or reply from this device yet. Space membership is separate from local Wake participation. Use \`${statusCommand}\` to check this device; if local participation is unhealthy, follow the status or repair guidance before expecting background replies.`);
82559
82697
  if (reasonCodes.includes("controller.launch.needs_repair") || reasonCodes.includes("controller.launch.choice_required") || reasonCodes.includes("workspace.missing") || reasonCodes.includes("workspace.invalid")) return formatInlineAtsCliCommands(`${profileName} will join this space, but its local agent setup on this device needs attention. Use \`ats agents list\` to find the local agent, then run \`ats agents repair --agent <agent-id>\`.`);
82560
82698
  return `${profileName} will join this space, but local setup on this device is still incomplete. It can appear here now, but it will not wake or reply from this device until you check Local Agents in ATS Web.`;
82561
82699
  }
@@ -84543,7 +84681,7 @@ function emitSpaceCreatePasswordOptionalHint(input) {
84543
84681
  minLength: SPACE_PASSWORD_MIN_LENGTH,
84544
84682
  charset: "any"
84545
84683
  },
84546
- command: "ats space create --name <name> --password <value>"
84684
+ command: formatAtsCliCommand("ats space create --name <name> --password <value>")
84547
84685
  }
84548
84686
  });
84549
84687
  }
@@ -85245,7 +85383,7 @@ async function ensureSpaceMemberCandidatesLocalParticipationReady(input) {
85245
85383
  candidates: preparedCandidates.map(toActionParticipationCandidateFromSpaceMemberCandidate)
85246
85384
  }).shouldOfferServiceGate) input.presenter.line({
85247
85385
  code: input.resolvedView === "human" && input.allowPrompt ? "space.add_members.service.declined" : "space.add_members.service.deferred",
85248
- text: formatInlineAtsCliCommands("ATS will continue adding these profiles without local agent participation on this device. If you later want local agents on this device to reply in the background, use `ats service install` and `ats service start`.")
85386
+ text: formatInlineAtsCliCommands("ATS will continue adding these profiles without local Wake participation on this device. Space membership is separate from whether a local agent can reply from this computer. Run `ats service status` to inspect local participation before expecting background replies.")
85249
85387
  });
85250
85388
  return {
85251
85389
  status: "continue",
@@ -85300,11 +85438,11 @@ function buildSpaceMemberJoinOnlyWarning(candidate) {
85300
85438
  }
85301
85439
  function resolveSpaceMemberJoinOnlyNextAction(candidate) {
85302
85440
  if (candidate.localParticipationReadiness === "not_running") return {
85303
- command: "ats service start",
85441
+ command: buildSpaceMemberProfileStatusCommand(candidate.profileId),
85304
85442
  kind: "command"
85305
85443
  };
85306
85444
  if (candidate.localParticipationReadiness === "not_installed") return {
85307
- command: "ats service install",
85445
+ command: buildSpaceMemberProfileStatusCommand(candidate.profileId),
85308
85446
  kind: "command"
85309
85447
  };
85310
85448
  if (candidate.localParticipationReadiness === "needs_repair" || hasSpaceMemberReasonCode(candidate, SPACE_MEMBER_LOCAL_AGENT_REPAIR_REASON_CODES)) return {