@xenosystem/agent-interface-ui 0.1.3 → 0.1.5

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.
Files changed (54) hide show
  1. package/dist/adapters/agentHostPlatformBridge.d.ts.map +1 -1
  2. package/dist/adapters/agentHostPlatformBridge.js +78 -4
  3. package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
  4. package/dist/components/agent/AgentInterface.d.ts +2 -1
  5. package/dist/components/agent/AgentInterface.d.ts.map +1 -1
  6. package/dist/components/agent/AgentInterface.js +110 -14
  7. package/dist/components/agent/AgentInterface.js.map +1 -1
  8. package/dist/components/agent/AgentView.d.ts +1 -0
  9. package/dist/components/agent/AgentView.d.ts.map +1 -1
  10. package/dist/components/agent/AgentView.js +57 -47
  11. package/dist/components/agent/AgentView.js.map +1 -1
  12. package/dist/components/agent/AgentWorkbenchPanel.d.ts +3 -0
  13. package/dist/components/agent/AgentWorkbenchPanel.d.ts.map +1 -1
  14. package/dist/components/agent/AgentWorkbenchPanel.js +2 -1
  15. package/dist/components/agent/AgentWorkbenchPanel.js.map +1 -1
  16. package/dist/components/agent/FleetPanel.d.ts.map +1 -1
  17. package/dist/components/agent/FleetPanel.js +7 -1
  18. package/dist/components/agent/FleetPanel.js.map +1 -1
  19. package/dist/components/agent/RunReviewPanel.d.ts.map +1 -1
  20. package/dist/components/agent/RunReviewPanel.js +2 -2
  21. package/dist/components/agent/RunReviewPanel.js.map +1 -1
  22. package/dist/components/agent/SessionsPanel.d.ts.map +1 -1
  23. package/dist/components/agent/SessionsPanel.js +85 -5
  24. package/dist/components/agent/SessionsPanel.js.map +1 -1
  25. package/dist/components/agent/compactionSummary.d.ts +0 -23
  26. package/dist/components/agent/compactionSummary.d.ts.map +1 -1
  27. package/dist/components/agent/compactionSummary.js +145 -3
  28. package/dist/components/agent/compactionSummary.js.map +1 -1
  29. package/dist/components/agent/injectionSummary.d.ts +37 -0
  30. package/dist/components/agent/injectionSummary.d.ts.map +1 -0
  31. package/dist/components/agent/injectionSummary.js +49 -0
  32. package/dist/components/agent/injectionSummary.js.map +1 -0
  33. package/dist/components/agent/runtimeEventSummary.d.ts +61 -0
  34. package/dist/components/agent/runtimeEventSummary.d.ts.map +1 -0
  35. package/dist/components/agent/runtimeEventSummary.js +112 -0
  36. package/dist/components/agent/runtimeEventSummary.js.map +1 -0
  37. package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.d.ts.map +1 -1
  38. package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.js +27 -1
  39. package/dist/components/agent/settings/sections/AgentPermissionRulesPanel.js.map +1 -1
  40. package/dist/components/agent/timelineContextPressure.d.ts +62 -0
  41. package/dist/components/agent/timelineContextPressure.d.ts.map +1 -0
  42. package/dist/components/agent/timelineContextPressure.js +104 -0
  43. package/dist/components/agent/timelineContextPressure.js.map +1 -0
  44. package/dist/components/agent/tokenLabel.d.ts +14 -0
  45. package/dist/components/agent/tokenLabel.d.ts.map +1 -0
  46. package/dist/components/agent/tokenLabel.js +18 -0
  47. package/dist/components/agent/tokenLabel.js.map +1 -0
  48. package/dist/index.d.ts +17 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +17 -0
  51. package/dist/index.js.map +1 -1
  52. package/dist/platformApiTypes.d.ts +36 -1
  53. package/dist/platformApiTypes.d.ts.map +1 -1
  54. package/package.json +5 -5
@@ -0,0 +1,49 @@
1
+ /**
2
+ * A readable line for `context.injected` — XENO SPAWN §2.2 pin-forward.
3
+ *
4
+ * 🔴 THE THIRD EVENT IN THIS FAMILY TO RENDER AS A REQUEST ID. The timeline builds each row's
5
+ * summary from five STRING payload fields — summary, outputPreview, reason, checkpointId,
6
+ * toolName — and an injection payload has none of them. It fell through to
7
+ * `summary || requestId || timestamp || id` and showed a 36-character identifier, identical on
8
+ * every event of that turn. `context.compacted` was fixed for this, then
9
+ * `context.history.compacted`, and this is the last of the three §15 step 3 signals to arrive in
10
+ * the list unreadable.
11
+ *
12
+ * 🔴 `deferred` IS NOT DECORATION — BUT IT IS PAST TENSE, AND THIS FILE HAD IT BACKWARDS.
13
+ *
14
+ * The previous wording rendered a deferred row as *"queued … enters context after the open tool
15
+ * calls finish"*, reasoning that a deferred injection is NOT yet in the agent's context. That is
16
+ * true of what `injectContext()` RETURNS to its caller. It is false of this EVENT.
17
+ *
18
+ * `context.injected` is emitted only when the content actually enters the context —
19
+ * `flushContextInjections` refuses to run while tool uses are unresolved, appends the synthetic
20
+ * message, and THEN emits. So `deferred: true` means "this waited for a boundary and has now
21
+ * LANDED", not "this is still waiting".
22
+ *
23
+ * ⚠️ MEASURED ON A REAL TURN, not read off the source: pinned while a tool call was outstanding,
24
+ * the event arrived with `deferred: true` and its `messageId` was ALREADY in the agent's message
25
+ * list at the instant it fired — and the agent then answered from the pinned content.
26
+ *
27
+ * So the old row told an operator a node had not arrived when it had. §3 makes the graph a RECORD
28
+ * and "what did this agent know?" is answered from it — a future-tense row about a completed
29
+ * arrival answers that question wrongly, which is the same class of error the row was written to
30
+ * prevent, pointing the other way. Both branches now say it LANDED; `deferred` says whether it had
31
+ * to wait.
32
+ */
33
+ function readString(record, key) {
34
+ const value = record[key];
35
+ return typeof value === 'string' && value ? value : undefined;
36
+ }
37
+ export function injectionSummary(entry) {
38
+ if (entry.type !== 'context.injected')
39
+ return undefined;
40
+ // A human-facing label first, then the canvas node id — both name the thing a person pinned.
41
+ // The message id is deliberately NOT a fallback: it is the identifier the row already showed,
42
+ // and repeating it here would reproduce the defect this function exists to fix.
43
+ const named = readString(entry.payload, 'label') ?? readString(entry.payload, 'sourceNodeId');
44
+ const subject = named ? `"${named}"` : 'content';
45
+ return entry.payload['deferred'] === true
46
+ ? `pinned ${subject} into context — waited for the open tool calls to finish`
47
+ : `pinned ${subject} into context`;
48
+ }
49
+ //# sourceMappingURL=injectionSummary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectionSummary.js","sourceRoot":"","sources":["../../../src/components/agent/injectionSummary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,SAAS,UAAU,CAAC,MAA+B,EAAE,GAAW;IAC9D,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AAC/D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,KAAyD;IAEzD,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB;QAAE,OAAO,SAAS,CAAA;IACvD,6FAA6F;IAC7F,8FAA8F;IAC9F,gFAAgF;IAChF,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA;IAC7F,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;IAChD,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI;QACvC,CAAC,CAAC,UAAU,OAAO,0DAA0D;QAC7E,CAAC,CAAC,UAAU,OAAO,eAAe,CAAA;AACtC,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Every payload field the generic fallback will accept, in precedence order.
3
+ *
4
+ * 🔴 `error`, `message` and `promptPreview` WERE MISSING, and the most costly absence was `error`:
5
+ * `turn.failed` carries nothing else, so a failed turn drew a request id where its reason should
6
+ * be. A row that says nothing when something breaks is the worst case this fallback has.
7
+ *
8
+ * Found by sweeping the whole `XenoRuntimeEventType` union rather than waiting for a fifth report
9
+ * — for each variant, does it carry a field this list reads, or does a dedicated formatter handle
10
+ * it? Nine did neither; these three fields cover the four that were actually losing information
11
+ * (`turn.failed`, `turn.suspended`, `turn.continuation_resumed`, `turn.started`) plus the
12
+ * `hub.model.*` family, which carries `message`.
13
+ *
14
+ * 🔴 THE FIRST SWEEP WAS ITSELF INCOMPLETE, which is the more useful lesson. It covered the SDK's
15
+ * `XenoRuntimeEventType` union — but the timeline renders ACP, `ask_user`, `hub.*` and permission
16
+ * events too, and the projection routes on **42** type literals. Asking the same question of the
17
+ * whole routed set found three more families losing text:
18
+ *
19
+ * ask_user.requested `question` — the agent asking a human, drawn as a request id
20
+ * ask_user.answered `answer` — what the human said back
21
+ *
22
+ * The first is the most user-facing row this product has: the agent is blocked, asking a question,
23
+ * and the record shows an identifier. **A sweep is only as complete as the set you ask it about.**
24
+ *
25
+ * 🔴 A THIRD CLAIM HERE WAS WRONG AND IS CORRECTED: it said `title` fixed "EVERY ACP tool row".
26
+ * It does not, and it never did. Checked against `AcpRuntimeEventMapper` — the only producer of
27
+ * `acp.tool.*` — rather than against a payload I had invented from the projection's reads:
28
+ *
29
+ * `acp.tool.started` ALWAYS sets `toolName` (`update.title || 'ACP Tool'`), so it already read
30
+ * `acp.tool.*` updates set `toolName` and `title` TOGETHER, or neither
31
+ *
32
+ * So `title` never arrives without `toolName`, and this entry cannot change an outcome today. It
33
+ * is kept because `title` is a real field in the projection's vocabulary and costs nothing — not
34
+ * because it repaired anything.
35
+ *
36
+ * ⚠️ THE ACP GAP THAT IS REAL, and that this list CANNOT close: an `acp.tool.completed` with no
37
+ * agent-supplied title — the normal case, because the STARTED event carried it — has no name in
38
+ * its payload at all, and still renders as a request id. The name exists in the timeline (join on
39
+ * `toolCallId`), but §3 makes this record append-only, so enriching the stored payload is the
40
+ * wrong answer and handing the formatter timeline context is a signature change with a wide blast
41
+ * radius. That is a design fork, recorded rather than rushed.
42
+ *
43
+ * ✅ What the sweep genuinely bought the ACP lane is `error`: `acp.tool.failed` used to draw an id
44
+ * and now reports why.
45
+ *
46
+ * ⚠️ The remaining exclusions are deliberate. `query.state`, `provider.event`, `thread.started`,
47
+ * `model.text.delta`, `tool.history.repaired`, `turn.cancelled` and `ask_user.cancelled` carry ids,
48
+ * counts or streaming fragments — for those the event TYPE is the information and the panel already
49
+ * shows it. Inventing a sentence from a count would add noise, not meaning.
50
+ *
51
+ * ⚠️ ORDER IS THE CONTRACT. `error` sits directly after `reason` because a failure's cause
52
+ * outranks anything else a payload might also carry, and `promptPreview` sits last of the new
53
+ * three because it describes what was ASKED rather than what happened. The two identifiers stay at
54
+ * the bottom: they are what you show when there is genuinely nothing to say.
55
+ */
56
+ export declare const RUNTIME_EVENT_SUMMARY_FIELDS: readonly ["summary", "outputPreview", "reason", "error", "message", "question", "answer", "promptPreview", "title", "checkpointId", "toolName"];
57
+ export declare function runtimeEventSummary(entry: {
58
+ type: string;
59
+ payload: Record<string, unknown>;
60
+ }): string | undefined;
61
+ //# sourceMappingURL=runtimeEventSummary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeEventSummary.d.ts","sourceRoot":"","sources":["../../../src/components/agent/runtimeEventSummary.ts"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,eAAO,MAAM,4BAA4B,iJAY/B,CAAA;AAEV,wBAAgB,mBAAmB,CACjC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GACxD,MAAM,GAAG,SAAS,CAUpB"}
@@ -0,0 +1,112 @@
1
+ import { compactionSummary } from './compactionSummary.js';
2
+ import { injectionSummary } from './injectionSummary.js';
3
+ import { pressureSummary } from './timelineContextPressure.js';
4
+ /**
5
+ * The ONE place that decides how a runtime event row reads.
6
+ *
7
+ * 🔴 EXTRACTED BECAUSE THE GATE WAS TESTING A COPY. This chain lived inline in
8
+ * `toEngineeringRuntimeEvents`, and `test-kit`'s cross-package gate — the only one that spans
9
+ * projection and rendering — rebuilt it by hand as `compactionSummary(entry) ?? injectionSummary(entry)`.
10
+ * Two hand-maintained copies of the same precedence, one of them the thing that ships.
11
+ *
12
+ * That is not hypothetical drift: the copy in the gate did not know about `pressureSummary`, so a
13
+ * gate whose whole purpose is "every SPAWN signal renders" would have gone on passing while the
14
+ * shipped chain rendered pressure rows as request ids — or, after the fix, would have kept passing
15
+ * had the wiring been forgotten. A reachability gate that reimplements the thing it checks is
16
+ * asserting its own copy is correct.
17
+ *
18
+ * ## Why the dedicated formatters come FIRST
19
+ *
20
+ * The five string fields below are the generic fallback, and the events this family cares about
21
+ * carry NONE of them — their payloads are numbers and ids. Without a formatter ahead of the
22
+ * fallbacks, a row falls through to `summary || requestId || timestamp || id` in the panel and
23
+ * draws a 36-character request id, identical on every row of that turn. Not blank, which is
24
+ * exactly why it was never reported as broken — and why it has now happened FOUR times:
25
+ * `context.compacted`, `context.history.compacted`, `context.injected`, and `context.pressure`.
26
+ */
27
+ function readOptionalString(record, key) {
28
+ const value = record[key];
29
+ return typeof value === 'string' && value.trim() ? value : undefined;
30
+ }
31
+ /**
32
+ * Every payload field the generic fallback will accept, in precedence order.
33
+ *
34
+ * 🔴 `error`, `message` and `promptPreview` WERE MISSING, and the most costly absence was `error`:
35
+ * `turn.failed` carries nothing else, so a failed turn drew a request id where its reason should
36
+ * be. A row that says nothing when something breaks is the worst case this fallback has.
37
+ *
38
+ * Found by sweeping the whole `XenoRuntimeEventType` union rather than waiting for a fifth report
39
+ * — for each variant, does it carry a field this list reads, or does a dedicated formatter handle
40
+ * it? Nine did neither; these three fields cover the four that were actually losing information
41
+ * (`turn.failed`, `turn.suspended`, `turn.continuation_resumed`, `turn.started`) plus the
42
+ * `hub.model.*` family, which carries `message`.
43
+ *
44
+ * 🔴 THE FIRST SWEEP WAS ITSELF INCOMPLETE, which is the more useful lesson. It covered the SDK's
45
+ * `XenoRuntimeEventType` union — but the timeline renders ACP, `ask_user`, `hub.*` and permission
46
+ * events too, and the projection routes on **42** type literals. Asking the same question of the
47
+ * whole routed set found three more families losing text:
48
+ *
49
+ * ask_user.requested `question` — the agent asking a human, drawn as a request id
50
+ * ask_user.answered `answer` — what the human said back
51
+ *
52
+ * The first is the most user-facing row this product has: the agent is blocked, asking a question,
53
+ * and the record shows an identifier. **A sweep is only as complete as the set you ask it about.**
54
+ *
55
+ * 🔴 A THIRD CLAIM HERE WAS WRONG AND IS CORRECTED: it said `title` fixed "EVERY ACP tool row".
56
+ * It does not, and it never did. Checked against `AcpRuntimeEventMapper` — the only producer of
57
+ * `acp.tool.*` — rather than against a payload I had invented from the projection's reads:
58
+ *
59
+ * `acp.tool.started` ALWAYS sets `toolName` (`update.title || 'ACP Tool'`), so it already read
60
+ * `acp.tool.*` updates set `toolName` and `title` TOGETHER, or neither
61
+ *
62
+ * So `title` never arrives without `toolName`, and this entry cannot change an outcome today. It
63
+ * is kept because `title` is a real field in the projection's vocabulary and costs nothing — not
64
+ * because it repaired anything.
65
+ *
66
+ * ⚠️ THE ACP GAP THAT IS REAL, and that this list CANNOT close: an `acp.tool.completed` with no
67
+ * agent-supplied title — the normal case, because the STARTED event carried it — has no name in
68
+ * its payload at all, and still renders as a request id. The name exists in the timeline (join on
69
+ * `toolCallId`), but §3 makes this record append-only, so enriching the stored payload is the
70
+ * wrong answer and handing the formatter timeline context is a signature change with a wide blast
71
+ * radius. That is a design fork, recorded rather than rushed.
72
+ *
73
+ * ✅ What the sweep genuinely bought the ACP lane is `error`: `acp.tool.failed` used to draw an id
74
+ * and now reports why.
75
+ *
76
+ * ⚠️ The remaining exclusions are deliberate. `query.state`, `provider.event`, `thread.started`,
77
+ * `model.text.delta`, `tool.history.repaired`, `turn.cancelled` and `ask_user.cancelled` carry ids,
78
+ * counts or streaming fragments — for those the event TYPE is the information and the panel already
79
+ * shows it. Inventing a sentence from a count would add noise, not meaning.
80
+ *
81
+ * ⚠️ ORDER IS THE CONTRACT. `error` sits directly after `reason` because a failure's cause
82
+ * outranks anything else a payload might also carry, and `promptPreview` sits last of the new
83
+ * three because it describes what was ASKED rather than what happened. The two identifiers stay at
84
+ * the bottom: they are what you show when there is genuinely nothing to say.
85
+ */
86
+ export const RUNTIME_EVENT_SUMMARY_FIELDS = [
87
+ 'summary',
88
+ 'outputPreview',
89
+ 'reason',
90
+ 'error',
91
+ 'message',
92
+ 'question',
93
+ 'answer',
94
+ 'promptPreview',
95
+ 'title',
96
+ 'checkpointId',
97
+ 'toolName',
98
+ ];
99
+ export function runtimeEventSummary(entry) {
100
+ const dedicated = compactionSummary(entry)
101
+ || injectionSummary(entry)
102
+ || pressureSummary(entry);
103
+ if (dedicated)
104
+ return dedicated;
105
+ for (const field of RUNTIME_EVENT_SUMMARY_FIELDS) {
106
+ const value = readOptionalString(entry.payload, field);
107
+ if (value)
108
+ return value;
109
+ }
110
+ return undefined;
111
+ }
112
+ //# sourceMappingURL=runtimeEventSummary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeEventSummary.js","sourceRoot":"","sources":["../../../src/components/agent/runtimeEventSummary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,SAAS,kBAAkB,CAAC,MAA+B,EAAE,GAAW;IACtE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AACtE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,SAAS;IACT,eAAe;IACf,QAAQ;IACR,OAAO;IACP,SAAS;IACT,UAAU;IACV,QAAQ;IACR,eAAe;IACf,OAAO;IACP,cAAc;IACd,UAAU;CACF,CAAA;AAEV,MAAM,UAAU,mBAAmB,CACjC,KAAyD;IAEzD,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CAAC;WACrC,gBAAgB,CAAC,KAAK,CAAC;WACvB,eAAe,CAAC,KAAK,CAAC,CAAA;IAC3B,IAAI,SAAS;QAAE,OAAO,SAAS,CAAA;IAC/B,KAAK,MAAM,KAAK,IAAI,4BAA4B,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACtD,IAAI,KAAK;YAAE,OAAO,KAAK,CAAA;IACzB,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AgentPermissionRulesPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/agent/settings/sections/AgentPermissionRulesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAI/D;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,sBAAsB,GAAG,MAAM,CAMtE;AAED,wBAAgB,yBAAyB,IAAI,KAAK,CAAC,YAAY,CAoF9D"}
1
+ {"version":3,"file":"AgentPermissionRulesPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/agent/settings/sections/AgentPermissionRulesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAI/D;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,sBAAsB,GAAG,MAAM,CAMtE;AAED,wBAAgB,yBAAyB,IAAI,KAAK,CAAC,YAAY,CA6G9D"}
@@ -46,8 +46,34 @@ export function AgentPermissionRulesPanel() {
46
46
  const bridge = getAgentPlatformBridge()?.agent;
47
47
  if (!bridge?.revokePermissionRule)
48
48
  return;
49
- await bridge.revokePermissionRule({ ruleId });
49
+ /**
50
+ * 🔴 The result was DISCARDED — `success`, `revoked` and `error` all of
51
+ * them — and the list simply refreshed. A revoke that failed showed
52
+ * nothing: the rule stayed in the list with no explanation, and on a
53
+ * PERMISSION control that means a person believing they withdrew a grant
54
+ * that is still in force. This panel already refuses to render a failed
55
+ * READ as "no rules" for exactly that reason; the write had no such care.
56
+ *
57
+ * `success` and `revoked` are separate answers and both are needed.
58
+ * `success` says the call went through; `revoked` says a rule was actually
59
+ * removed. Success-without-revoked means the rule was already gone, which
60
+ * is a fine outcome and a different sentence — the same distinction the
61
+ * landing queue draws between a failed CALL and a refused ENTRY.
62
+ */
63
+ const result = await bridge.revokePermissionRule({ ruleId });
64
+ /**
65
+ * ⚠️ Refresh FIRST, then report. `refresh` clears the error on a successful
66
+ * READ, so setting the message before it would have wiped every refusal the
67
+ * moment the list came back — a fix that looked right and displayed
68
+ * nothing, which is the bug it was written to remove.
69
+ */
50
70
  await refresh();
71
+ if (!result.success) {
72
+ setError(result.error || 'Could not revoke that permission rule.');
73
+ }
74
+ else if (!result.revoked) {
75
+ setError('That rule was already gone; nothing was revoked.');
76
+ }
51
77
  }, [refresh]);
52
78
  return (_jsx("div", { className: "space-y-1", "data-testid": "agent-permission-rules", children: loading ? (_jsx("div", { className: "text-[10px] text-white/25 px-2 py-3", children: "Loading permission rules\u2026" })) : error ? (_jsx("div", { className: "text-[10px] text-white/50 px-2 py-3", children: error })) : rules.length === 0 ? (_jsxs("div", { className: "text-center py-8", children: [_jsx(ShieldCheck, { className: "w-6 h-6 text-white/10 mx-auto mb-2" }), _jsx("p", { className: "text-[10px] text-white/25", children: "No remembered permissions" }), _jsx("p", { className: "text-[9px] text-white/15 mt-1", children: "Choosing \u201Calways\u201D on an agent permission prompt records a rule here" })] })) : (rules.map((rule) => (_jsxs("div", { className: "flex items-center justify-between gap-2 py-2 px-2 hover:bg-white/[0.02]", children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [rule.decision === 'allow'
53
79
  ? _jsx(ShieldCheck, { className: "w-3.5 h-3.5 text-white/40 shrink-0" })
@@ -1 +1 @@
1
- {"version":3,"file":"AgentPermissionRulesPanel.js","sourceRoot":"","sources":["../../../../../src/components/agent/settings/sections/AgentPermissionRulesPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAwBnE,oFAAoF;AACpF,MAAM,UAAU,iBAAiB,CAAC,IAA4B;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,aAAa,CAAC,CAAC,CAAC,eAAe,CAAA;IAC5E,6EAA6E;IAC7E,oEAAoE;IACpE,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,aAAa,CAAA;IAC1E,OAAO,GAAG,IAAI,IAAI,KAAK,EAAE,CAAA;AAC3B,CAAC;AAED,MAAM,UAAU,yB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D,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,OAAG,iBAAiB,CAAC,IAAI,CAAC,IACjF,EACN,cAAK,SAAS,EAAC,mCAAmC,YAAE,IAAI,CAAC,EAAE,GAAO,IAC9D,IACF,EACN,iBACE,IAAI,EAAC,QAAQ,gBACD,eAAe,IAAI,CAAC,EAAE,EAAE,EACpC,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,EACvC,SAAS,EAAC,gDAAgD,YAE1D,KAAC,MAAM,IAAC,SAAS,EAAC,aAAa,GAAG,GAC3B,KArBJ,IAAI,CAAC,EAAE,CAsBR,CACP,CAAC,CACH,GACG,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"AgentPermissionRulesPanel.js","sourceRoot":"","sources":["../../../../../src/components/agent/settings/sections/AgentPermissionRulesPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAwBnE,oFAAoF;AACpF,MAAM,UAAU,iBAAiB,CAAC,IAA4B;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,aAAa,CAAC,CAAC,CAAC,eAAe,CAAA;IAC5E,6EAA6E;IAC7E,oEAAoE;IACpE,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,aAAa,CAAA;IAC1E,OAAO,GAAG,IAAI,IAAI,KAAK,EAAE,CAAA;AAC3B,CAAC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AC,CAClB,eAEE,SAAS,EAAC,yEAAyE,aAEnF,eAAK,SAAS,EAAC,iCAAiC,aAC7C,IAAI,CAAC,QAAQ,KAAK,OAAO;4BACxB,CAAC,CAAC,KAAC,WAAW,IAAC,SAAS,EAAC,oCAAoC,GAAG;4BAChE,CAAC,CAAC,KAAC,OAAO,IAAC,SAAS,EAAC,oCAAoC,GAAG,EAC9D,eAAK,SAAS,EAAC,SAAS,aACtB,eAAK,SAAS,EAAC,oCAAoC,aAChD,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,OAAG,iBAAiB,CAAC,IAAI,CAAC,IACjF,EACN,cAAK,SAAS,EAAC,mCAAmC,YAAE,IAAI,CAAC,EAAE,GAAO,IAC9D,IACF,EACN,iBACE,IAAI,EAAC,QAAQ,gBACD,eAAe,IAAI,CAAC,EAAE,EAAE,EACpC,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,EACvC,SAAS,EAAC,gDAAgD,YAE1D,KAAC,MAAM,IAAC,SAAS,EAAC,aAAa,GAAG,GAC3B,KArBJ,IAAI,CAAC,EAAE,CAsBR,CACP,CAAC,CACH,GACG,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,62 @@
1
+ import { type RuntimeTimelineContextPressure, type RuntimeTimelineProjection } from '@xenosystem/agent-interface-contract';
2
+ /**
3
+ * How full is this conversation's context, from the runtime timeline?
4
+ *
5
+ * 🔴 XENO SPAWN §15 step 3 calls context pressure part of "the product's reason to exist", and it
6
+ * reached `RuntimeTimelineProjection` days ago. Nothing rendered it: the UI's mapper reduces the
7
+ * timeline to a flat event list and DISCARDS `timeline.requests`, where the reading lives. A
8
+ * repo-wide search for `contextTokens` across `packages/ui` and `apps/` returned nothing.
9
+ *
10
+ * ⚠️ The division is NOT done here. `runtimeTimelineContextPressure` folds it once, in the
11
+ * contract, because the obvious numerator is the wrong one — `tokenUsage.input` is a cumulative
12
+ * billing counter, and every surface that reached for the field whose name matched the feature got
13
+ * a percentage that only ever rises. That mistake has now been made in four codebases; this file
14
+ * exists to consume the correction, not to repeat the arithmetic.
15
+ */
16
+ /**
17
+ * The most recent request that can honestly report a reading.
18
+ *
19
+ * ⚠️ Scans BACKWARDS and returns the first request that yields one, rather than taking the last
20
+ * request outright. A turn that ended without a completed model request has no reading at all, and
21
+ * treating the newest request as authoritative would blank a perfectly good figure from the turn
22
+ * before it — showing "unknown" for a context that is demonstrably full.
23
+ */
24
+ export declare function latestContextPressure(timeline: Pick<RuntimeTimelineProjection, 'requests'> | null | undefined): RuntimeTimelineContextPressure | null;
25
+ /**
26
+ * A line a person can read, or `null` when there is nothing honest to say.
27
+ *
28
+ * 🔴 `approximate` DECIDES THE PRECISION, and that is the whole point of carrying it. Only a
29
+ * budget from explicit config is exact; a provider profile is one window for every model that
30
+ * provider serves, and a third-party agent's own figure may be compacted well before it fills.
31
+ * Printing "12.3%" against a denominator nobody guaranteed invents precision the reading does not
32
+ * have — so an approximate one reads "about 12%".
33
+ *
34
+ * ⚠️ NOT clamped at 100%. A context over its budget is a real state and the most important one to
35
+ * see; hiding it behind a full bar would conceal exactly the moment §2.1 exists to anticipate.
36
+ */
37
+ export declare function formatContextPressure(pressure: RuntimeTimelineContextPressure | null): string | null;
38
+ /**
39
+ * A readable line for a `context.pressure` EVENT ROW — the fourth event in this family to render
40
+ * as a bare request id, and the one that hid the longest.
41
+ *
42
+ * 🔴 PRESSURE ALREADY "RENDERED", WHICH IS EXACTLY WHY THIS SURVIVED. `formatContextPressure`
43
+ * draws the panel's reading from `timeline.requests`, so the signal was visibly working — while
44
+ * every `context.pressure` row in the event LIST fell through
45
+ * `summary || requestId || timestamp || id` and drew a 36-character identifier, the same on every
46
+ * row of the turn. One signal, two surfaces, and "pressure renders" covered both.
47
+ *
48
+ * It is also the most frequent of the three §15 step-3 signals: `context.compacted` fires at a
49
+ * boundary and a pin is an operator action, but this one fires after EVERY model response. The
50
+ * rows nobody could read were the majority of the rows.
51
+ *
52
+ * ⚠️ The arithmetic and the wording are NOT repeated here. The payload is mapped onto the shape
53
+ * `runtimeTimelineContextPressure` already folds, and the sentence comes from
54
+ * `formatContextPressure` — so the "about" precision rule, the unclamped ratio and the
55
+ * `observed` denominator naming stay in one place. A second copy of that division is precisely the
56
+ * mistake this family has already made in four codebases.
57
+ */
58
+ export declare function pressureSummary(entry: {
59
+ type: string;
60
+ payload: Record<string, unknown>;
61
+ }): string | null;
62
+ //# sourceMappingURL=timelineContextPressure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timelineContextPressure.d.ts","sourceRoot":"","sources":["../../../src/components/agent/timelineContextPressure.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC/B,MAAM,sCAAsC,CAAA;AAE7C;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,GACvE,8BAA8B,GAAG,IAAI,CAMvC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,8BAA8B,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAgBpG;AAqBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GACxD,MAAM,GAAG,IAAI,CAOf"}
@@ -0,0 +1,104 @@
1
+ import { tokenLabel } from './tokenLabel.js';
2
+ import { latestRuntimeTimelineContextPressure, runtimeTimelineContextPressure, } from '@xenosystem/agent-interface-contract';
3
+ /**
4
+ * How full is this conversation's context, from the runtime timeline?
5
+ *
6
+ * 🔴 XENO SPAWN §15 step 3 calls context pressure part of "the product's reason to exist", and it
7
+ * reached `RuntimeTimelineProjection` days ago. Nothing rendered it: the UI's mapper reduces the
8
+ * timeline to a flat event list and DISCARDS `timeline.requests`, where the reading lives. A
9
+ * repo-wide search for `contextTokens` across `packages/ui` and `apps/` returned nothing.
10
+ *
11
+ * ⚠️ The division is NOT done here. `runtimeTimelineContextPressure` folds it once, in the
12
+ * contract, because the obvious numerator is the wrong one — `tokenUsage.input` is a cumulative
13
+ * billing counter, and every surface that reached for the field whose name matched the feature got
14
+ * a percentage that only ever rises. That mistake has now been made in four codebases; this file
15
+ * exists to consume the correction, not to repeat the arithmetic.
16
+ */
17
+ /**
18
+ * The most recent request that can honestly report a reading.
19
+ *
20
+ * ⚠️ Scans BACKWARDS and returns the first request that yields one, rather than taking the last
21
+ * request outright. A turn that ended without a completed model request has no reading at all, and
22
+ * treating the newest request as authoritative would blank a perfectly good figure from the turn
23
+ * before it — showing "unknown" for a context that is demonstrably full.
24
+ */
25
+ export function latestContextPressure(timeline) {
26
+ // 🔴 DELEGATES — the backwards scan lives in the contract package now, beside
27
+ // `runtimeTimelineContextSignals`, which needs the same reading. Two copies of "which request
28
+ // can honestly report pressure" is the duplication shape this repo keeps finding in
29
+ // classification code; the name and behaviour here are unchanged for consumers.
30
+ return latestRuntimeTimelineContextPressure(timeline);
31
+ }
32
+ /**
33
+ * A line a person can read, or `null` when there is nothing honest to say.
34
+ *
35
+ * 🔴 `approximate` DECIDES THE PRECISION, and that is the whole point of carrying it. Only a
36
+ * budget from explicit config is exact; a provider profile is one window for every model that
37
+ * provider serves, and a third-party agent's own figure may be compacted well before it fills.
38
+ * Printing "12.3%" against a denominator nobody guaranteed invents precision the reading does not
39
+ * have — so an approximate one reads "about 12%".
40
+ *
41
+ * ⚠️ NOT clamped at 100%. A context over its budget is a real state and the most important one to
42
+ * see; hiding it behind a full bar would conceal exactly the moment §2.1 exists to anticipate.
43
+ */
44
+ export function formatContextPressure(pressure) {
45
+ if (!pressure)
46
+ return null;
47
+ const percent = pressure.approximate
48
+ ? `about ${Math.round(pressure.ratio * 100)}%`
49
+ : `${(pressure.ratio * 100).toFixed(1)}%`;
50
+ /**
51
+ * 🔴 NAME THE DENOMINATOR WHEN IT IS NOT A WINDOW. `observed` is where this agent was WATCHED
52
+ * compacting, not how much it can hold — and rendering both as "context" makes one string mean
53
+ * two materially different things with no way for a reader to tell which.
54
+ *
55
+ * "500.0K / 1.0M context" invites the reading *this agent holds a million tokens*. It does not;
56
+ * it compacted at a million. The distinction is the entire value of the observed source, and
57
+ * hiding it would have kept the more accurate denominator while making it less honest.
58
+ */
59
+ const against = pressure.budgetSource === 'observed' ? 'at last compaction' : 'context';
60
+ return `${tokenLabel(pressure.usedTokens)} / ${tokenLabel(pressure.budgetTokens)} ${against} (${percent})`;
61
+ }
62
+ const BUDGET_SOURCES = [
63
+ 'config', 'provider', 'fallback', 'agent', 'observed',
64
+ ];
65
+ function readNumber(record, key) {
66
+ const value = record[key];
67
+ return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
68
+ }
69
+ function readBudgetSource(record, key) {
70
+ const value = record[key];
71
+ return typeof value === 'string' && BUDGET_SOURCES.includes(value)
72
+ ? value
73
+ : undefined;
74
+ }
75
+ /**
76
+ * A readable line for a `context.pressure` EVENT ROW — the fourth event in this family to render
77
+ * as a bare request id, and the one that hid the longest.
78
+ *
79
+ * 🔴 PRESSURE ALREADY "RENDERED", WHICH IS EXACTLY WHY THIS SURVIVED. `formatContextPressure`
80
+ * draws the panel's reading from `timeline.requests`, so the signal was visibly working — while
81
+ * every `context.pressure` row in the event LIST fell through
82
+ * `summary || requestId || timestamp || id` and drew a 36-character identifier, the same on every
83
+ * row of the turn. One signal, two surfaces, and "pressure renders" covered both.
84
+ *
85
+ * It is also the most frequent of the three §15 step-3 signals: `context.compacted` fires at a
86
+ * boundary and a pin is an operator action, but this one fires after EVERY model response. The
87
+ * rows nobody could read were the majority of the rows.
88
+ *
89
+ * ⚠️ The arithmetic and the wording are NOT repeated here. The payload is mapped onto the shape
90
+ * `runtimeTimelineContextPressure` already folds, and the sentence comes from
91
+ * `formatContextPressure` — so the "about" precision rule, the unclamped ratio and the
92
+ * `observed` denominator naming stay in one place. A second copy of that division is precisely the
93
+ * mistake this family has already made in four codebases.
94
+ */
95
+ export function pressureSummary(entry) {
96
+ if (entry.type !== 'context.pressure')
97
+ return null;
98
+ return formatContextPressure(runtimeTimelineContextPressure({
99
+ contextTokens: readNumber(entry.payload, 'contextTokens'),
100
+ contextBudgetTokens: readNumber(entry.payload, 'budgetTokens'),
101
+ contextBudgetSource: readBudgetSource(entry.payload, 'budgetSource'),
102
+ }));
103
+ }
104
+ //# sourceMappingURL=timelineContextPressure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timelineContextPressure.js","sourceRoot":"","sources":["../../../src/components/agent/timelineContextPressure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EACL,oCAAoC,EACpC,8BAA8B,GAI/B,MAAM,sCAAsC,CAAA;AAE7C;;;;;;;;;;;;;GAaG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAwE;IAExE,8EAA8E;IAC9E,8FAA8F;IAC9F,oFAAoF;IACpF,gFAAgF;IAChF,OAAO,oCAAoC,CAAC,QAAQ,CAAC,CAAA;AACvD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAA+C;IACnF,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAA;IAC1B,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW;QAClC,CAAC,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG;QAC9C,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,G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AC,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC;KACrE,CAAC,CAAC,CAAA;AACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * ONE token formatter for every surface that prints a context figure.
3
+ *
4
+ * 🔴 THIS EXISTED TWICE AND THE COPIES DIVERGED WITHIN A DAY — my own doing. `compactionSummary`
5
+ * and `timelineContextPressure` each carried a private copy; an `M` tier was added to one because
6
+ * a real boundary reads `1,002,419 → 16,023`, and the other kept rendering the same magnitude as
7
+ * `1002.4K`. Two surfaces of the same product, two answers for one number.
8
+ *
9
+ * ⚠️ The `M` tier is not cosmetic. This product's headline claim is how much context an agent lost;
10
+ * a measured 6.8M dropped in one session renders as `6834.2K` without it — correct, harder to read,
11
+ * and it makes the number look like a rounding artifact rather than the point.
12
+ */
13
+ export declare function tokenLabel(value: number): string;
14
+ //# sourceMappingURL=tokenLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenLabel.d.ts","sourceRoot":"","sources":["../../../src/components/agent/tokenLabel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * ONE token formatter for every surface that prints a context figure.
3
+ *
4
+ * 🔴 THIS EXISTED TWICE AND THE COPIES DIVERGED WITHIN A DAY — my own doing. `compactionSummary`
5
+ * and `timelineContextPressure` each carried a private copy; an `M` tier was added to one because
6
+ * a real boundary reads `1,002,419 → 16,023`, and the other kept rendering the same magnitude as
7
+ * `1002.4K`. Two surfaces of the same product, two answers for one number.
8
+ *
9
+ * ⚠️ The `M` tier is not cosmetic. This product's headline claim is how much context an agent lost;
10
+ * a measured 6.8M dropped in one session renders as `6834.2K` without it — correct, harder to read,
11
+ * and it makes the number look like a rounding artifact rather than the point.
12
+ */
13
+ export function tokenLabel(value) {
14
+ if (value >= 1_000_000)
15
+ return `${(value / 1_000_000).toFixed(1)}M`;
16
+ return value >= 1000 ? `${(value / 1000).toFixed(1)}K` : String(value);
17
+ }
18
+ //# sourceMappingURL=tokenLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenLabel.js","sourceRoot":"","sources":["../../../src/components/agent/tokenLabel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,IAAI,KAAK,IAAI,SAAS;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAA;IACnE,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACxE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,22 @@
1
1
  import type { AgentHostHandshake, AgentRuntimeProviderDescriptor, AgentSurfaceKind } from '@xenosystem/agent-interface-contract';
2
2
  import { AgentHostClient } from '@xenosystem/agent-interface-client';
3
+ /**
4
+ * 🔴 THE THREE SIGNAL FORMATTERS — exported so the chain can be asserted ACROSS the layer where it
5
+ * keeps breaking.
6
+ *
7
+ * XENO SPAWN §15 step 3's signals have now been found stopping at FIVE joins: emitted-not-forwarded,
8
+ * forwarded-not-projected, projected-not-mapped, mapped-not-rendered, and projected-but-
9
+ * unrenderable. Every chain gate in `host` stops at the projection, because `host` cannot see `ui` —
10
+ * which is exactly why the fifth stop went unnoticed. `test-kit` depends on both, so exporting these
11
+ * lets one gate span the whole stack.
12
+ *
13
+ * ⚠️ Not test-only plumbing. These are the canonical rendering of the three signals; a consumer
14
+ * shell that draws its own timeline would otherwise reimplement them and drift.
15
+ */
16
+ export * from './components/agent/compactionSummary.js';
17
+ export * from './components/agent/injectionSummary.js';
18
+ export * from './components/agent/runtimeEventSummary.js';
19
+ export * from './components/agent/timelineContextPressure.js';
3
20
  export * from './providerSelector.js';
4
21
  export * from './toolCardProjection.js';
5
22
  export * from './sessionTabs.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,8BAA8B,EAC9B,gBAAgB,EACjB,MAAM,sCAAsC,CAAA;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAEpE,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uCAAuC,CAAA;AACrD,cAAc,sCAAsC,CAAA;AACpD,cAAc,kCAAkC,CAAA;AAChD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA;AACpD,cAAc,uCAAuC,CAAA;AACrD,cAAc,gDAAgD,CAAA;AAC9D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uCAAuC,CAAA;AACrD,cAAc,sCAAsC,CAAA;AACpD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,oCAAoC,CAAA;AAClD,YAAY,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sCAAsC,CAAA;AACpF,YAAY,EACV,KAAK,EACL,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,YAAY,GACb,MAAM,sCAAsC,CAAA;AAE7C,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;AAE9F,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,0BAA0B,CAAA;IACjC,OAAO,EAAE,gB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CAAC,aAAa,CAA+B;gBAExC,MAAM,EAAE,eAAe;IAYnC,IAAI,QAAQ,IAAI,6BAA6B,CAE5C;IAED,SAAS,CAAC,QAAQ,EAAE,6BAA6B,GAAG,MAAM,IAAI;IAQ9D,KAAK,IAAI,OAAO,CAAC,6BAA6B,CAAC;IAM/C,IAAI,IAAI,IAAI;YAeE,aAAa;YAyBb,gBAAgB;IAU9B,OAAO,CAAC,QAAQ;IAWhB,OAAO,CAAC,WAAW;CAIpB"}
package/dist/index.js CHANGED
@@ -1,5 +1,22 @@
1
1
  import { isDevelopmentProviderReady } from '@xenosystem/agent-interface-core';
2
2
  import { AgentHostClient } from '@xenosystem/agent-interface-client';
3
+ /**
4
+ * 🔴 THE THREE SIGNAL FORMATTERS — exported so the chain can be asserted ACROSS the layer where it
5
+ * keeps breaking.
6
+ *
7
+ * XENO SPAWN §15 step 3's signals have now been found stopping at FIVE joins: emitted-not-forwarded,
8
+ * forwarded-not-projected, projected-not-mapped, mapped-not-rendered, and projected-but-
9
+ * unrenderable. Every chain gate in `host` stops at the projection, because `host` cannot see `ui` —
10
+ * which is exactly why the fifth stop went unnoticed. `test-kit` depends on both, so exporting these
11
+ * lets one gate span the whole stack.
12
+ *
13
+ * ⚠️ Not test-only plumbing. These are the canonical rendering of the three signals; a consumer
14
+ * shell that draws its own timeline would otherwise reimplement them and drift.
15
+ */
16
+ export * from './components/agent/compactionSummary.js';
17
+ export * from './components/agent/injectionSummary.js';
18
+ export * from './components/agent/runtimeEventSummary.js';
19
+ export * from './components/agent/timelineContextPressure.js';
3
20
  export * from './providerSelector.js';
4
21
  export * from './toolCardProjection.js';
5
22
  export * from './sessionTabs.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;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