agent-transport-system 0.7.10 → 0.7.12

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.7.10";
30
+ var version = "0.7.12";
31
31
  var package_default = {
32
32
  $schema: "https://www.schemastore.org/package.json",
33
33
  name: "agent-transport-system",
@@ -8246,10 +8246,30 @@ function safeParseJson$1(raw) {
8246
8246
  }
8247
8247
  }
8248
8248
 
8249
+ //#endregion
8250
+ //#region src/config/published-production-safety.ts
8251
+ const PUBLISHED_PRODUCTION_ATS_ROOT = normalizeComparablePath(join(homedir(), resolveDefaultAtsHomeDirname("prod")));
8252
+ function assertNoPublishedProductionMutationDuringTests(pathInput, targetName) {
8253
+ if (!isTestProcess(pathInput)) return;
8254
+ if (!isPublishedProductionAtsRoot(pathInput)) return;
8255
+ throw new Error([`Refusing to mutate ${targetName} in the published production lane during tests.`, "Set ATS_HOME to a fresh temporary directory, or run the validation through ats-dev or ats-canary."].join(" "));
8256
+ }
8257
+ function isPublishedProductionAtsRoot(pathInput) {
8258
+ return normalizeComparablePath(resolveAtsRootDir(pathInput)) === PUBLISHED_PRODUCTION_ATS_ROOT;
8259
+ }
8260
+ function isTestProcess(pathInput = {}) {
8261
+ const env = pathInput.env ?? process.env;
8262
+ const argv = pathInput.argv ?? process.argv;
8263
+ return env.NODE_ENV === "test" || env.VITEST === "true" || typeof env.VITEST_WORKER_ID === "string" || typeof env.JEST_WORKER_ID === "string" || argv.some((arg) => arg.includes("vitest"));
8264
+ }
8265
+ function normalizeComparablePath(path) {
8266
+ const normalized = resolve(path);
8267
+ return process.platform === "win32" ? normalized.toLowerCase() : normalized;
8268
+ }
8269
+
8249
8270
  //#endregion
8250
8271
  //#region src/config/daemon-service-contract.ts
8251
8272
  const DAEMON_SERVICE_CONTRACT_FILENAME = "service-contract.json";
8252
- const PUBLISHED_PRODUCTION_ATS_ROOT = normalizeComparablePath(join(homedir(), resolveDefaultAtsHomeDirname("prod")));
8253
8273
  function daemonServiceContractPath(pathInput = {}) {
8254
8274
  return join(daemonRuntimeStateRootPath(pathInput), DAEMON_SERVICE_CONTRACT_FILENAME);
8255
8275
  }
@@ -8283,13 +8303,11 @@ async function clearDaemonServiceContract(pathInput = {}) {
8283
8303
  await rm(daemonServiceContractPath(pathInput), { force: true });
8284
8304
  }
8285
8305
  function assertDaemonServiceContractMutationAllowed(pathInput) {
8286
- if (!isTestProcess()) return;
8287
- if (!isPublishedProductionAtsRoot(pathInput)) return;
8288
- throw new Error(["Refusing to mutate ATS Service contract in the published production lane during tests.", "Set ATS_HOME to a fresh temporary directory, or run the validation through ats-dev or ats-canary."].join(" "));
8306
+ assertNoPublishedProductionMutationDuringTests(pathInput, "ATS Service contract");
8289
8307
  }
8290
8308
  function assertDaemonServiceContractIdentityAllowed(candidate, pathInput) {
8291
- if (!isPublishedProductionAtsRoot(pathInput)) return;
8292
8309
  if (!isUnsafeProductionDaemonServiceContractIdentity(candidate)) return;
8310
+ if (isTestProcess(pathInput) && !isPublishedProductionAtsRoot(pathInput)) return;
8293
8311
  throw new Error(["Refusing to write ATS Service contract with a test fixture identity in the published production lane.", "Run `ats service repair --profile <profile-id>` from the signed-in production lane, or clear the polluted local service state before retrying."].join(" "));
8294
8312
  }
8295
8313
  function isDaemonServiceContractIdentityReusable(contract, pathInput = {}) {
@@ -8317,16 +8335,6 @@ const UNSAFE_PRODUCTION_PROFILE_IDS = new Set([
8317
8335
  function normalizeFixtureText(value) {
8318
8336
  return value.trim().toLowerCase();
8319
8337
  }
8320
- function isPublishedProductionAtsRoot(pathInput) {
8321
- return normalizeComparablePath(resolveAtsRootDir(pathInput)) === PUBLISHED_PRODUCTION_ATS_ROOT;
8322
- }
8323
- function isTestProcess(env = process.env) {
8324
- return env.NODE_ENV === "test" || env.VITEST === "true" || typeof env.VITEST_WORKER_ID === "string" || typeof env.JEST_WORKER_ID === "string" || process.argv.some((arg) => arg.includes("vitest"));
8325
- }
8326
- function normalizeComparablePath(path) {
8327
- const normalized = resolve(path);
8328
- return process.platform === "win32" ? normalized.toLowerCase() : normalized;
8329
- }
8330
8338
  function buildContractCandidate(input, pathInput, current) {
8331
8339
  const lane = input.lane ?? resolveAtsEnvPreset(pathInput);
8332
8340
  const connectedComputerId = input.connectedComputerId ?? (current && current.lane === lane && current.gatewayUrl === input.gatewayUrl && current.profileId === input.profileId && current.deviceId === input.deviceId ? current.connectedComputerId : void 0);
@@ -9793,6 +9801,7 @@ async function resolveDaemonLifecycleAttribution(input) {
9793
9801
  };
9794
9802
  }
9795
9803
  async function emitDaemonLifecycleEvent(input) {
9804
+ assertNoPublishedProductionMutationDuringTests(input.pathInput ?? {}, "ATS Service lifecycle journal");
9796
9805
  const journalPath = daemonLifecycleJournalPath(input.pathInput);
9797
9806
  const attribution = await resolveDaemonLifecycleAttribution(input);
9798
9807
  const event = {
@@ -50412,7 +50421,7 @@ async function resolveDaemonServiceParticipationStatusAfterInstall(input) {
50412
50421
  return { status: refreshedStatus };
50413
50422
  }
50414
50423
  async function runDaemonServiceSafeRefresh(input) {
50415
- const outcome = await runDaemonReinstall({
50424
+ return await runDaemonReinstall({
50416
50425
  agentOverviewHandled: true,
50417
50426
  ...input.gatewayUrl ? { gatewayUrl: input.gatewayUrl } : {},
50418
50427
  ...input.atsProfileId ? { profile: input.atsProfileId } : {},
@@ -50423,8 +50432,6 @@ async function runDaemonServiceSafeRefresh(input) {
50423
50432
  suppressAgentOverview: true,
50424
50433
  suppressInstallOutput: true
50425
50434
  });
50426
- if (outcome.ok && outcome.result === "completed" && outcome.serviceState === "running") return;
50427
- throw new Error(`ATS Service refresh did not complete: ${outcome.result}`);
50428
50435
  }
50429
50436
  async function runDaemonServiceParticipationActionStage(input) {
50430
50437
  if (input.status.kind === "needs_repair") return await runDaemonServiceParticipationRefresh({
@@ -50459,11 +50466,39 @@ async function runDaemonServiceParticipationRefresh(input) {
50459
50466
  data: { reasonCode: input.accountIssue.reasonCode }
50460
50467
  });
50461
50468
  try {
50462
- await runDaemonServiceSafeRefresh({
50469
+ const refreshOutcome = await runDaemonServiceSafeRefresh({
50463
50470
  atsProfileId: input.input.atsProfileId,
50464
50471
  gatewayUrl: input.input.gatewayUrl,
50465
50472
  view: input.input.view
50466
50473
  });
50474
+ if (refreshOutcome.ok && (refreshOutcome.result === "completed" || refreshOutcome.result === "stopped_safe") && refreshOutcome.serviceState === "stopped") {
50475
+ const startMapped = await mapDaemonBackgroundStartResult(await runDaemonBackgroundStartForDecision({
50476
+ gatewayUrl: input.input.gatewayUrl,
50477
+ ...input.input.atsProfileId ? { profile: input.input.atsProfileId } : {},
50478
+ view: input.input.view
50479
+ }), {
50480
+ expectedVersion: input.expectedVersion,
50481
+ presenter: input.input.presenter,
50482
+ codePrefix: input.codePrefix
50483
+ });
50484
+ if (startMapped.status !== "aligned") return startMapped;
50485
+ const accountIssueAfterStart = await resolveDaemonServiceAccountAlignmentIssue(input.input);
50486
+ if (accountIssueAfterStart) {
50487
+ renderDaemonStartNeedsAttention({
50488
+ presenter: input.input.presenter,
50489
+ codePrefix: input.codePrefix,
50490
+ summary: accountIssueAfterStart.summary
50491
+ });
50492
+ input.input.presenter.line({
50493
+ code: `${input.codePrefix}.account_alignment_failed`,
50494
+ text: accountIssueAfterStart.summary,
50495
+ data: { reasonCode: accountIssueAfterStart.reasonCode }
50496
+ });
50497
+ return { status: "needs_attention" };
50498
+ }
50499
+ return startMapped;
50500
+ }
50501
+ if (!(refreshOutcome.ok && refreshOutcome.result === "completed" && refreshOutcome.serviceState === "running")) throw new Error(`ATS Service refresh did not complete: ${refreshOutcome.result}`);
50467
50502
  } catch (error) {
50468
50503
  renderDaemonStartNeedsAttention({
50469
50504
  presenter: input.input.presenter,
@@ -52927,6 +52962,7 @@ async function runSkillsInstall(input) {
52927
52962
  presenter,
52928
52963
  installResults,
52929
52964
  legacyFindings,
52965
+ quiet: input.quiet,
52930
52966
  storeDir: skillsDir()
52931
52967
  });
52932
52968
  return "completed";
@@ -54532,6 +54568,7 @@ function emitInstallSummary(input) {
54532
54568
  legacyReview: legacyFindings.length > 0 ? buildLegacyAtsSkillAgentReview(legacyFindings) : null,
54533
54569
  requiresReview: summary.failed > 0 || legacyFindings.length > 0
54534
54570
  };
54571
+ if (input.quiet && !payload.requiresReview) return;
54535
54572
  if (input.resolvedView === "agent") {
54536
54573
  emitLegacyAtsSkillAgentAttention({
54537
54574
  legacyFindings,
@@ -64731,7 +64768,7 @@ function buildTerminalStep(input) {
64731
64768
  case "refresh_service": return {
64732
64769
  message: "Starting or repairing ATS Service.",
64733
64770
  run: async () => {
64734
- if ((await runDaemonServiceParticipationGate({
64771
+ const gate = await runDaemonServiceParticipationGate({
64735
64772
  intent: "start",
64736
64773
  presenter: input.input.presenter,
64737
64774
  resolvedView: input.input.runtime.resolvedView,
@@ -64741,7 +64778,8 @@ function buildTerminalStep(input) {
64741
64778
  ...input.humanProfileId ? { atsProfileId: input.humanProfileId } : {},
64742
64779
  forcePrompt: true,
64743
64780
  view: input.input.view
64744
- })).status !== "aligned") throw new Error("ATS Service is not connected yet.");
64781
+ });
64782
+ if (gate.status !== "aligned") throw new Error(gate.errorMessage ?? "ATS Service is not connected yet.");
64745
64783
  emitHumanStatus(input.input, "Current step", ["Connecting this computer to ATS.", "Saving this computer's ATS Service identity so ATS Web can use it."]);
64746
64784
  const runtimeIdentity = await syncLocalSetupCurrentDeviceTargetFromServiceContract({ gatewayUrl: input.input.gatewayUrl });
64747
64785
  emitHumanStatus(input.input, "Current step", ["Checking local setup state.", "Reading installed local agents and ATS Service compatibility."]);
@@ -67842,31 +67880,6 @@ async function emitSetupLocalAgentConnectionReadinessResult(input) {
67842
67880
  reasonCodes: assessment.reasonCodes,
67843
67881
  runtimeReportSubmission
67844
67882
  });
67845
- const basePayload = {
67846
- profile: {
67847
- profileId: input.profile.atsProfileId,
67848
- profileName: input.profile.profileName,
67849
- profileKind: input.profile.profileKind
67850
- },
67851
- localAgentReadiness,
67852
- atsService: {
67853
- serviceReadiness: serviceReadiness.serviceReadiness,
67854
- serviceReadinessState: serviceReadiness.serviceReadinessState,
67855
- summaryText: serviceReadiness.summaryText,
67856
- detailText: serviceReadiness.detailText,
67857
- nextSteps: serviceReadiness.nextSteps,
67858
- runtimeHeadline: serviceReadiness.runtimeHeadline
67859
- },
67860
- diagnostics: buildLocalReplyReadinessEvidenceDiagnostics({
67861
- deviceReplyReadiness: snapshot.deviceReplyReadiness,
67862
- legacyAgentReplyReadiness: snapshot.agentReplyReadiness
67863
- }),
67864
- runtimeReportSubmission,
67865
- agentProfileBindingEnsure,
67866
- formalAgentConnection,
67867
- agentConnectionReadiness,
67868
- guidance
67869
- };
67870
67883
  if (input.view === "human") {
67871
67884
  renderInfoCard({
67872
67885
  presenter: input.presenter,
@@ -67910,19 +67923,23 @@ async function emitSetupLocalAgentConnectionReadinessResult(input) {
67910
67923
  });
67911
67924
  return completionFacts;
67912
67925
  }
67913
- const prepareReadiness = await resolvePrepareReadinessApiEvidence({ profile: input.profile });
67914
- const payload = {
67915
- ...basePayload,
67916
- prepareReadiness
67917
- };
67926
+ const payload = buildSetupLocalAgentConnectionAgentPayload({
67927
+ agentConnectionReadiness,
67928
+ agentProfileBindingEnsure,
67929
+ formalAgentConnection,
67930
+ guidance,
67931
+ localAgentReadiness,
67932
+ profile: input.profile,
67933
+ runtimeReportSubmission,
67934
+ serviceReadiness
67935
+ });
67918
67936
  input.presenter.data({
67919
67937
  code: "setup.local_agent_connection.result",
67920
67938
  payload
67921
67939
  });
67922
67940
  input.presenter.line({
67923
67941
  code: "setup.local_agent_connection.summary",
67924
- text: `profile ${input.profile.atsProfileId}: agent_connection=${agentConnectionReadiness.status}, can_reply_from_this_computer=${agentConnectionReadiness.canReplyFromThisComputer ? "true" : "false"}, local_agent_readiness_evidence=${localAgentReadiness.status}, ats_service=${serviceReadiness.serviceReadiness}, next_action=${agentConnectionReadiness.nextAction ?? "none"}`,
67925
- data: payload
67942
+ text: `profile ${input.profile.atsProfileId}: agent_connection=${agentConnectionReadiness.status}, can_reply_from_this_computer=${agentConnectionReadiness.canReplyFromThisComputer ? "true" : "false"}, local_agent_readiness_evidence=${localAgentReadiness.status}, ats_service=${serviceReadiness.serviceReadiness}, next_action=${agentConnectionReadiness.nextAction ?? "none"}`
67926
67943
  });
67927
67944
  return completionFacts;
67928
67945
  }
@@ -68015,6 +68032,54 @@ function resolveLocalAgentReadinessSummary(state) {
68015
68032
  };
68016
68033
  }
68017
68034
  }
68035
+ function buildSetupLocalAgentConnectionAgentPayload(input) {
68036
+ const reportDetail = input.runtimeReportSubmission;
68037
+ const capability = parseCapabilityRef(input.runtimeReportSubmission.capabilityRef);
68038
+ return {
68039
+ profile: {
68040
+ profileId: input.profile.atsProfileId,
68041
+ profileName: input.profile.profileName,
68042
+ profileKind: input.profile.profileKind
68043
+ },
68044
+ localAgent: capability ? {
68045
+ agentId: capability.id,
68046
+ capabilityRef: capability.ref
68047
+ } : null,
68048
+ connection: {
68049
+ status: input.agentConnectionReadiness.status,
68050
+ canBeWokenInSpaces: input.agentConnectionReadiness.canBeWokenInSpaces,
68051
+ canReplyFromThisComputer: input.agentConnectionReadiness.canReplyFromThisComputer,
68052
+ summary: input.agentConnectionReadiness.summary,
68053
+ nextAction: input.agentConnectionReadiness.nextAction,
68054
+ reasonCodes: [...input.agentConnectionReadiness.reasonCodes]
68055
+ },
68056
+ localAgentReadiness: {
68057
+ status: input.localAgentReadiness.status,
68058
+ label: input.localAgentReadiness.label
68059
+ },
68060
+ atsService: {
68061
+ status: input.serviceReadiness.serviceReadiness,
68062
+ label: formatServiceParticipationReadinessLabel(input.serviceReadiness),
68063
+ nextSteps: input.serviceReadiness.nextSteps
68064
+ },
68065
+ serverConnectionReport: {
68066
+ status: input.runtimeReportSubmission.status,
68067
+ runtimeId: reportDetail.runtimeId ?? null,
68068
+ reason: reportDetail.reason ?? null
68069
+ },
68070
+ binding: {
68071
+ status: input.agentProfileBindingEnsure.status,
68072
+ label: input.formalAgentConnection.label,
68073
+ routable: input.agentProfileBindingEnsure.routable,
68074
+ reasonCodes: [...input.formalAgentConnection.reasonCodes]
68075
+ },
68076
+ guidance: {
68077
+ summary: input.guidance.summary,
68078
+ nextSteps: input.guidance.nextSteps
68079
+ },
68080
+ detailsCommand: formatAtsCliCommand(`ats service status --profile ${input.profile.atsProfileId} --view agent`)
68081
+ };
68082
+ }
68018
68083
  function resolveFormalAgentConnectionProjection(result) {
68019
68084
  if (result.status === "accepted" && result.routable) return {
68020
68085
  label: "Connected to this computer.",
@@ -68136,12 +68201,6 @@ function isLocalServiceConnectionUnavailableReason(reasonCode) {
68136
68201
  function isConnectionVerificationPendingReason(reasonCode) {
68137
68202
  return reasonCode === "agent_profile_binding.execution_readiness_pending";
68138
68203
  }
68139
- function buildLocalReplyReadinessEvidenceDiagnostics(input) {
68140
- return buildLocalServiceDiagnosticsPayload({
68141
- deviceEvidence: input.deviceReplyReadiness,
68142
- agentEvidence: input.legacyAgentReplyReadiness
68143
- });
68144
- }
68145
68204
  function formatRuntimeReportSubmission(submission) {
68146
68205
  switch (submission.status) {
68147
68206
  case "submitted": return "Submitted.";
@@ -68481,9 +68540,44 @@ function emitSetupComplete(input) {
68481
68540
  }
68482
68541
  input.presenter.data({
68483
68542
  code: "setup.complete",
68484
- payload
68543
+ payload: buildSetupCompleteAgentPayload(payload)
68485
68544
  });
68486
68545
  }
68546
+ function buildSetupCompleteAgentPayload(input) {
68547
+ return {
68548
+ lane: input.lane,
68549
+ cliCommandPrefix: input.cliCommandPrefix,
68550
+ laneRoot: input.laneRoot,
68551
+ gatewayUrl: input.gatewayUrl,
68552
+ authBaseUrl: input.authBaseUrl,
68553
+ path: input.path,
68554
+ service: input.service,
68555
+ localAgents: input.localAgents,
68556
+ localComponents: {
68557
+ entrypoint: input.localComponents.entrypoint,
68558
+ summaryLabel: input.localComponents.summaryLabel,
68559
+ setupAction: input.localComponents.setupAction,
68560
+ setupActionLabel: input.localComponents.setupActionLabel,
68561
+ cli: {
68562
+ status: input.localComponents.cli.status,
68563
+ packageVersion: input.localComponents.cli.packageVersion,
68564
+ latestPackageVersion: input.localComponents.cli.latestPackageVersion ?? null
68565
+ },
68566
+ service: {
68567
+ status: input.localComponents.service.status,
68568
+ installedBundleVersion: input.localComponents.service.installedBundleVersion ?? null,
68569
+ expectedBundleVersion: input.localComponents.service.expectedBundleVersion ?? null
68570
+ },
68571
+ skills: {
68572
+ status: input.localComponents.skills.status,
68573
+ targetCount: input.localComponents.skills.targetCount
68574
+ }
68575
+ },
68576
+ routeCatalogSync: input.routeCatalogSync,
68577
+ nextCommands: input.nextCommands,
68578
+ note: input.note
68579
+ };
68580
+ }
68487
68581
  async function ensureSetupManagedSkills(input) {
68488
68582
  const result = await runSkillsEnsure({
68489
68583
  all: true,
@@ -76025,12 +76119,6 @@ function buildLocalServiceNotRequiredPreflight(input) {
76025
76119
  },
76026
76120
  actionRequirements: input.actionRequirements,
76027
76121
  agentReplyReadiness: null,
76028
- services: { daemon: {
76029
- installed: false,
76030
- version: null,
76031
- runtimeStatus: "unknown",
76032
- runtimeReason: null
76033
- } },
76034
76122
  env: {
76035
76123
  baseUrl: input.baseUrl,
76036
76124
  requestTimeoutMs: resolveSpaceRequestTimeoutMsForDiagnostics()
@@ -76127,7 +76215,7 @@ function shouldSurfaceServiceRepairGuidanceInPreflight(command) {
76127
76215
  }
76128
76216
  function buildAgentSpaceCommandPreflightText(input) {
76129
76217
  if (input.payload.actionRequirements.localService === "not_required") return `preflight ${input.payload.command}: auth=${input.payload.auth.state}, profile=${input.payload.profile.profileId}, local_service=not_required`;
76130
- return `preflight ${input.payload.command}: auth=${input.payload.auth.state}, profile=${input.payload.profile.profileId}, daemon=${input.payload.services.daemon.runtimeStatus}, local_service_link=${input.serviceParticipationReadiness.serviceReadiness}, service_state=${input.serviceParticipationReadiness.serviceReadinessState}`;
76218
+ return `preflight ${input.payload.command}: auth=${input.payload.auth.state}, profile=${input.payload.profile.profileId}, daemon=${input.payload.services?.daemon.runtimeStatus ?? "unknown"}, local_service_link=${input.serviceParticipationReadiness.serviceReadiness}, service_state=${input.serviceParticipationReadiness.serviceReadinessState}`;
76131
76219
  }
76132
76220
  function buildHumanSpaceCommandPreflightText(input) {
76133
76221
  const actionRequirements = resolveSpacePreflightActionRequirements(input.command);
@@ -96816,6 +96904,33 @@ function emitSpaceStatusHumanOutput(input) {
96816
96904
  minContentWidth: 56
96817
96905
  });
96818
96906
  }
96907
+ function emitSpaceStatusAgentOutput(input) {
96908
+ const spaceLabel = input.status.name?.trim() || input.status.spaceId;
96909
+ input.presenter.line({
96910
+ code: "space.status",
96911
+ text: `space status: ${spaceLabel}, members=${input.status.members.totalCount}, agents=${input.status.members.agentCount}, wakeable=${input.status.members.wakeableAgentCount}, offline=${input.status.members.offlineAgentCount}`,
96912
+ data: {
96913
+ spaceId: input.status.spaceId,
96914
+ spaceName: input.status.name ?? null,
96915
+ members: {
96916
+ totalCount: input.status.members.totalCount,
96917
+ humanCount: input.status.members.humanCount,
96918
+ agentCount: input.status.members.agentCount,
96919
+ liveHumanCount: input.status.members.liveHumanCount,
96920
+ liveAgentCount: input.status.members.liveAgentCount,
96921
+ wakeableAgentCount: input.status.members.wakeableAgentCount,
96922
+ offlineAgentCount: input.status.members.offlineAgentCount
96923
+ },
96924
+ latestVisibleUpdate: input.status.latestVisibleUpdate ? {
96925
+ signalId: input.status.latestVisibleUpdate.signalId,
96926
+ signalType: input.status.latestVisibleUpdate.signalType,
96927
+ actorProfileId: input.status.latestVisibleUpdate.actorProfileId,
96928
+ actorName: input.status.latestVisibleUpdate.actorName ?? null,
96929
+ previewText: sanitizeTerminalDisplayText(input.status.latestVisibleUpdate.previewText, "single-line")
96930
+ } : null
96931
+ }
96932
+ });
96933
+ }
96819
96934
  function buildSpaceStatusOverviewRows(status) {
96820
96935
  return [
96821
96936
  {
@@ -96954,6 +97069,13 @@ async function runSpaceStatus(input) {
96954
97069
  outJsonLine(statusRead.result);
96955
97070
  return;
96956
97071
  }
97072
+ if (runtime.resolvedView === "agent") {
97073
+ emitSpaceStatusAgentOutput({
97074
+ presenter,
97075
+ status: statusRead.result
97076
+ });
97077
+ return;
97078
+ }
96957
97079
  emitSpaceStatusHumanOutput({
96958
97080
  presenter,
96959
97081
  status: statusRead.result