@aiwg/cockpit 2026.8.19 → 2026.8.25
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/bridge/src/server.mjs +26 -10
- package/package.json +1 -1
- package/web/dist/assets/index-DdWLHb_H.js +312 -0
- package/web/dist/index.html +1 -1
- package/web/src/components/Missions.tsx +2 -0
- package/web/src/components/Missions.uhp.test.tsx +26 -0
- package/web/src/types.ts +8 -1
- package/web/dist/assets/index-CbaHxgUx.js +0 -312
package/bridge/src/server.mjs
CHANGED
|
@@ -2207,7 +2207,7 @@ async function getApprovals(executorUrl, status) {
|
|
|
2207
2207
|
};
|
|
2208
2208
|
}
|
|
2209
2209
|
|
|
2210
|
-
const TERMINAL_MISSION_STATES = new Set(['done', 'completed', 'complete', 'failed', 'aborted', 'canceled', 'cancelled', 'rejected']);
|
|
2210
|
+
const TERMINAL_MISSION_STATES = new Set(['done', 'completed', 'complete', 'failed', 'incomplete', 'aborted', 'canceled', 'cancelled', 'rejected']);
|
|
2211
2211
|
|
|
2212
2212
|
function normalizeMissionStatus(status) {
|
|
2213
2213
|
const value = String(status ?? 'unknown').toLowerCase();
|
|
@@ -2217,12 +2217,18 @@ function normalizeMissionStatus(status) {
|
|
|
2217
2217
|
return value;
|
|
2218
2218
|
}
|
|
2219
2219
|
|
|
2220
|
-
function missionSummary(mission) {
|
|
2221
|
-
const
|
|
2220
|
+
export function missionSummary(mission) {
|
|
2221
|
+
const canonical = mission?.apiVersion === 'mission.aiwg.io/v1' && mission?.kind === 'Mission';
|
|
2222
|
+
const canonicalStatus = canonical ? mission.status ?? {} : {};
|
|
2223
|
+
const canonicalMetadata = canonical ? mission.metadata ?? {} : {};
|
|
2224
|
+
const canonicalSpec = canonical ? mission.spec ?? {} : {};
|
|
2225
|
+
const canonicalProvenance = canonical ? mission.provenance ?? {} : {};
|
|
2226
|
+
const uhp = canonical ? mission.extensions?.['aiwg.source.uhp-2026-08-11'] ?? {} : {};
|
|
2227
|
+
const status = normalizeMissionStatus(canonical ? canonicalStatus.state : mission.status);
|
|
2222
2228
|
return {
|
|
2223
|
-
id: String(mission.id ?? mission.mission_id ?? mission.missionId ?? ''),
|
|
2224
|
-
title: mission.objective ?? mission.goal ?? mission.task ?? mission.title ?? 'Untitled mission',
|
|
2225
|
-
completion: mission.completion ?? mission.completionCriterion ?? mission.completion_criterion,
|
|
2229
|
+
id: String(canonicalMetadata.id ?? mission.id ?? mission.mission_id ?? mission.missionId ?? ''),
|
|
2230
|
+
title: canonicalSpec.objective ?? mission.objective ?? mission.goal ?? mission.task ?? mission.title ?? 'Untitled mission',
|
|
2231
|
+
completion: canonicalSpec.completionCriterion ?? mission.completion ?? mission.completionCriterion ?? mission.completion_criterion,
|
|
2226
2232
|
status,
|
|
2227
2233
|
loop: mission.loop ?? mission.iteration ?? mission.currentIteration ?? 0,
|
|
2228
2234
|
max_iterations: mission.maxIterations ?? mission.max_iterations ?? mission.maxIterations ?? 0,
|
|
@@ -2231,10 +2237,20 @@ function missionSummary(mission) {
|
|
|
2231
2237
|
target_agent: mission.targetAgent ?? mission.target_agent,
|
|
2232
2238
|
ralph_loop_id: mission.ralphLoopId ?? mission.ralph_loop_id,
|
|
2233
2239
|
ralph_pid: mission.ralphPid ?? mission.ralph_pid,
|
|
2234
|
-
started_at: mission.startedAt ?? mission.started_at,
|
|
2235
|
-
completed_at: mission.completedAt ?? mission.completed_at,
|
|
2236
|
-
error: mission.error,
|
|
2237
|
-
terminal: TERMINAL_MISSION_STATES.has(status),
|
|
2240
|
+
started_at: canonicalMetadata.createdAt ?? mission.startedAt ?? mission.started_at,
|
|
2241
|
+
completed_at: canonicalStatus.terminal ? canonicalMetadata.updatedAt : mission.completedAt ?? mission.completed_at,
|
|
2242
|
+
error: canonicalStatus.error?.message ?? mission.error,
|
|
2243
|
+
terminal: canonical ? canonicalStatus.terminal === true : TERMINAL_MISSION_STATES.has(status),
|
|
2244
|
+
...(canonical ? {
|
|
2245
|
+
canonical_version: mission.apiVersion,
|
|
2246
|
+
native_state: canonicalStatus.nativeState,
|
|
2247
|
+
transport: canonicalProvenance.transport,
|
|
2248
|
+
protocol_version: canonicalProvenance.sourceVersion,
|
|
2249
|
+
endpoint_profile: uhp.endpointProfile,
|
|
2250
|
+
response_id: uhp.responseId,
|
|
2251
|
+
remote_session_id: uhp.sessionId,
|
|
2252
|
+
artifacts: canonicalStatus.artifacts,
|
|
2253
|
+
} : {}),
|
|
2238
2254
|
...(graphMissionProjection(mission) ?? {}),
|
|
2239
2255
|
};
|
|
2240
2256
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiwg/cockpit",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.25",
|
|
4
4
|
"description": "AIWG Cockpit — UX-first control plane over AIWG + multi-stack agentic sessions. Opt-in, separately published; NOT shipped in the base aiwg npm package (guarded by test/smoke/cockpit-base-footprint.test.js).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|