agent-transport-system 0.7.11 → 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 +133 -47
- package/dist/ats.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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",
|
|
@@ -52962,6 +52962,7 @@ async function runSkillsInstall(input) {
|
|
|
52962
52962
|
presenter,
|
|
52963
52963
|
installResults,
|
|
52964
52964
|
legacyFindings,
|
|
52965
|
+
quiet: input.quiet,
|
|
52965
52966
|
storeDir: skillsDir()
|
|
52966
52967
|
});
|
|
52967
52968
|
return "completed";
|
|
@@ -54567,6 +54568,7 @@ function emitInstallSummary(input) {
|
|
|
54567
54568
|
legacyReview: legacyFindings.length > 0 ? buildLegacyAtsSkillAgentReview(legacyFindings) : null,
|
|
54568
54569
|
requiresReview: summary.failed > 0 || legacyFindings.length > 0
|
|
54569
54570
|
};
|
|
54571
|
+
if (input.quiet && !payload.requiresReview) return;
|
|
54570
54572
|
if (input.resolvedView === "agent") {
|
|
54571
54573
|
emitLegacyAtsSkillAgentAttention({
|
|
54572
54574
|
legacyFindings,
|
|
@@ -67878,31 +67880,6 @@ async function emitSetupLocalAgentConnectionReadinessResult(input) {
|
|
|
67878
67880
|
reasonCodes: assessment.reasonCodes,
|
|
67879
67881
|
runtimeReportSubmission
|
|
67880
67882
|
});
|
|
67881
|
-
const basePayload = {
|
|
67882
|
-
profile: {
|
|
67883
|
-
profileId: input.profile.atsProfileId,
|
|
67884
|
-
profileName: input.profile.profileName,
|
|
67885
|
-
profileKind: input.profile.profileKind
|
|
67886
|
-
},
|
|
67887
|
-
localAgentReadiness,
|
|
67888
|
-
atsService: {
|
|
67889
|
-
serviceReadiness: serviceReadiness.serviceReadiness,
|
|
67890
|
-
serviceReadinessState: serviceReadiness.serviceReadinessState,
|
|
67891
|
-
summaryText: serviceReadiness.summaryText,
|
|
67892
|
-
detailText: serviceReadiness.detailText,
|
|
67893
|
-
nextSteps: serviceReadiness.nextSteps,
|
|
67894
|
-
runtimeHeadline: serviceReadiness.runtimeHeadline
|
|
67895
|
-
},
|
|
67896
|
-
diagnostics: buildLocalReplyReadinessEvidenceDiagnostics({
|
|
67897
|
-
deviceReplyReadiness: snapshot.deviceReplyReadiness,
|
|
67898
|
-
legacyAgentReplyReadiness: snapshot.agentReplyReadiness
|
|
67899
|
-
}),
|
|
67900
|
-
runtimeReportSubmission,
|
|
67901
|
-
agentProfileBindingEnsure,
|
|
67902
|
-
formalAgentConnection,
|
|
67903
|
-
agentConnectionReadiness,
|
|
67904
|
-
guidance
|
|
67905
|
-
};
|
|
67906
67883
|
if (input.view === "human") {
|
|
67907
67884
|
renderInfoCard({
|
|
67908
67885
|
presenter: input.presenter,
|
|
@@ -67946,19 +67923,23 @@ async function emitSetupLocalAgentConnectionReadinessResult(input) {
|
|
|
67946
67923
|
});
|
|
67947
67924
|
return completionFacts;
|
|
67948
67925
|
}
|
|
67949
|
-
const
|
|
67950
|
-
|
|
67951
|
-
|
|
67952
|
-
|
|
67953
|
-
|
|
67926
|
+
const payload = buildSetupLocalAgentConnectionAgentPayload({
|
|
67927
|
+
agentConnectionReadiness,
|
|
67928
|
+
agentProfileBindingEnsure,
|
|
67929
|
+
formalAgentConnection,
|
|
67930
|
+
guidance,
|
|
67931
|
+
localAgentReadiness,
|
|
67932
|
+
profile: input.profile,
|
|
67933
|
+
runtimeReportSubmission,
|
|
67934
|
+
serviceReadiness
|
|
67935
|
+
});
|
|
67954
67936
|
input.presenter.data({
|
|
67955
67937
|
code: "setup.local_agent_connection.result",
|
|
67956
67938
|
payload
|
|
67957
67939
|
});
|
|
67958
67940
|
input.presenter.line({
|
|
67959
67941
|
code: "setup.local_agent_connection.summary",
|
|
67960
|
-
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"}
|
|
67961
|
-
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"}`
|
|
67962
67943
|
});
|
|
67963
67944
|
return completionFacts;
|
|
67964
67945
|
}
|
|
@@ -68051,6 +68032,54 @@ function resolveLocalAgentReadinessSummary(state) {
|
|
|
68051
68032
|
};
|
|
68052
68033
|
}
|
|
68053
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
|
+
}
|
|
68054
68083
|
function resolveFormalAgentConnectionProjection(result) {
|
|
68055
68084
|
if (result.status === "accepted" && result.routable) return {
|
|
68056
68085
|
label: "Connected to this computer.",
|
|
@@ -68172,12 +68201,6 @@ function isLocalServiceConnectionUnavailableReason(reasonCode) {
|
|
|
68172
68201
|
function isConnectionVerificationPendingReason(reasonCode) {
|
|
68173
68202
|
return reasonCode === "agent_profile_binding.execution_readiness_pending";
|
|
68174
68203
|
}
|
|
68175
|
-
function buildLocalReplyReadinessEvidenceDiagnostics(input) {
|
|
68176
|
-
return buildLocalServiceDiagnosticsPayload({
|
|
68177
|
-
deviceEvidence: input.deviceReplyReadiness,
|
|
68178
|
-
agentEvidence: input.legacyAgentReplyReadiness
|
|
68179
|
-
});
|
|
68180
|
-
}
|
|
68181
68204
|
function formatRuntimeReportSubmission(submission) {
|
|
68182
68205
|
switch (submission.status) {
|
|
68183
68206
|
case "submitted": return "Submitted.";
|
|
@@ -68517,9 +68540,44 @@ function emitSetupComplete(input) {
|
|
|
68517
68540
|
}
|
|
68518
68541
|
input.presenter.data({
|
|
68519
68542
|
code: "setup.complete",
|
|
68520
|
-
payload
|
|
68543
|
+
payload: buildSetupCompleteAgentPayload(payload)
|
|
68521
68544
|
});
|
|
68522
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
|
+
}
|
|
68523
68581
|
async function ensureSetupManagedSkills(input) {
|
|
68524
68582
|
const result = await runSkillsEnsure({
|
|
68525
68583
|
all: true,
|
|
@@ -76061,12 +76119,6 @@ function buildLocalServiceNotRequiredPreflight(input) {
|
|
|
76061
76119
|
},
|
|
76062
76120
|
actionRequirements: input.actionRequirements,
|
|
76063
76121
|
agentReplyReadiness: null,
|
|
76064
|
-
services: { daemon: {
|
|
76065
|
-
installed: false,
|
|
76066
|
-
version: null,
|
|
76067
|
-
runtimeStatus: "unknown",
|
|
76068
|
-
runtimeReason: null
|
|
76069
|
-
} },
|
|
76070
76122
|
env: {
|
|
76071
76123
|
baseUrl: input.baseUrl,
|
|
76072
76124
|
requestTimeoutMs: resolveSpaceRequestTimeoutMsForDiagnostics()
|
|
@@ -76163,7 +76215,7 @@ function shouldSurfaceServiceRepairGuidanceInPreflight(command) {
|
|
|
76163
76215
|
}
|
|
76164
76216
|
function buildAgentSpaceCommandPreflightText(input) {
|
|
76165
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`;
|
|
76166
|
-
return `preflight ${input.payload.command}: auth=${input.payload.auth.state}, profile=${input.payload.profile.profileId}, daemon=${input.payload.services
|
|
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}`;
|
|
76167
76219
|
}
|
|
76168
76220
|
function buildHumanSpaceCommandPreflightText(input) {
|
|
76169
76221
|
const actionRequirements = resolveSpacePreflightActionRequirements(input.command);
|
|
@@ -96852,6 +96904,33 @@ function emitSpaceStatusHumanOutput(input) {
|
|
|
96852
96904
|
minContentWidth: 56
|
|
96853
96905
|
});
|
|
96854
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
|
+
}
|
|
96855
96934
|
function buildSpaceStatusOverviewRows(status) {
|
|
96856
96935
|
return [
|
|
96857
96936
|
{
|
|
@@ -96990,6 +97069,13 @@ async function runSpaceStatus(input) {
|
|
|
96990
97069
|
outJsonLine(statusRead.result);
|
|
96991
97070
|
return;
|
|
96992
97071
|
}
|
|
97072
|
+
if (runtime.resolvedView === "agent") {
|
|
97073
|
+
emitSpaceStatusAgentOutput({
|
|
97074
|
+
presenter,
|
|
97075
|
+
status: statusRead.result
|
|
97076
|
+
});
|
|
97077
|
+
return;
|
|
97078
|
+
}
|
|
96993
97079
|
emitSpaceStatusHumanOutput({
|
|
96994
97080
|
presenter,
|
|
96995
97081
|
status: statusRead.result
|