@tai42/api-client 32.0.0 → 34.0.0

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 (100) hide show
  1. package/dist/client/backend-client.d.ts +27 -0
  2. package/dist/client/backend-client.d.ts.map +1 -1
  3. package/dist/client/backup-client.d.ts +4 -0
  4. package/dist/client/backup-client.d.ts.map +1 -1
  5. package/dist/client/config-client.d.ts +31 -0
  6. package/dist/client/config-client.d.ts.map +1 -1
  7. package/dist/client/index.d.ts +148 -1
  8. package/dist/client/index.d.ts.map +1 -1
  9. package/dist/client/index.js +5 -0
  10. package/dist/client/index.js.map +1 -1
  11. package/dist/client/manifest-client.d.ts +33 -1
  12. package/dist/client/manifest-client.d.ts.map +1 -1
  13. package/dist/client/manifest-client.js +3 -3
  14. package/dist/client/manifest-client.js.map +1 -1
  15. package/dist/client/marketplace-client.d.ts +40 -0
  16. package/dist/client/marketplace-client.d.ts.map +1 -1
  17. package/dist/client/profiles-client.d.ts +4 -0
  18. package/dist/client/profiles-client.d.ts.map +1 -1
  19. package/dist/client/tool-extensions-client.d.ts +4 -0
  20. package/dist/client/tool-extensions-client.d.ts.map +1 -1
  21. package/dist/client/tools-client.d.ts +1 -0
  22. package/dist/client/tools-client.d.ts.map +1 -1
  23. package/dist/failed-mcp-roster.d.ts +30 -0
  24. package/dist/failed-mcp-roster.d.ts.map +1 -0
  25. package/dist/failed-mcp-roster.js +56 -0
  26. package/dist/failed-mcp-roster.js.map +1 -0
  27. package/dist/failed-reply-roll.d.ts +22 -0
  28. package/dist/failed-reply-roll.d.ts.map +1 -0
  29. package/dist/failed-reply-roll.js +46 -0
  30. package/dist/failed-reply-roll.js.map +1 -0
  31. package/dist/fleet-report.d.ts +122 -50
  32. package/dist/fleet-report.d.ts.map +1 -1
  33. package/dist/fleet-report.js +168 -89
  34. package/dist/fleet-report.js.map +1 -1
  35. package/dist/generated/api-routes.d.ts +4 -4
  36. package/dist/generated/api-routes.js +1 -1
  37. package/dist/generated/api-routes.js.map +1 -1
  38. package/dist/generated/openapi-schemas.d.ts +303 -30
  39. package/dist/generated/openapi-schemas.d.ts.map +1 -1
  40. package/dist/generated/openapi-schemas.js +14 -13
  41. package/dist/generated/openapi-schemas.js.map +1 -1
  42. package/dist/generated/served-schemas.d.ts +1 -1
  43. package/dist/generated/served-schemas.js +1 -1
  44. package/dist/generated/served-schemas.js.map +1 -1
  45. package/dist/http.d.ts.map +1 -1
  46. package/dist/http.js +5 -2
  47. package/dist/http.js.map +1 -1
  48. package/dist/index.d.ts +8 -3
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +4 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/mcp-failure.d.ts +18 -0
  53. package/dist/mcp-failure.d.ts.map +1 -0
  54. package/dist/mcp-failure.js +39 -0
  55. package/dist/mcp-failure.js.map +1 -0
  56. package/dist/schemas/backup.d.ts +8 -0
  57. package/dist/schemas/backup.d.ts.map +1 -1
  58. package/dist/schemas/fleet.d.ts +49 -10
  59. package/dist/schemas/fleet.d.ts.map +1 -1
  60. package/dist/schemas/fleet.js +20 -11
  61. package/dist/schemas/fleet.js.map +1 -1
  62. package/dist/schemas/manifest-mcp.d.ts +9 -6
  63. package/dist/schemas/manifest-mcp.d.ts.map +1 -1
  64. package/dist/schemas/manifest-mcp.js +4 -3
  65. package/dist/schemas/manifest-mcp.js.map +1 -1
  66. package/dist/schemas/marketplace.d.ts +44 -2
  67. package/dist/schemas/marketplace.d.ts.map +1 -1
  68. package/dist/schemas/marketplace.js +8 -2
  69. package/dist/schemas/marketplace.js.map +1 -1
  70. package/dist/schemas/profiles.d.ts +13 -7
  71. package/dist/schemas/profiles.d.ts.map +1 -1
  72. package/dist/schemas/profiles.js +9 -7
  73. package/dist/schemas/profiles.js.map +1 -1
  74. package/dist/schemas/served.d.ts +1 -1
  75. package/dist/schemas/system-kinds.d.ts +4 -0
  76. package/dist/schemas/system-kinds.d.ts.map +1 -1
  77. package/dist/schemas/system-kinds.js +5 -4
  78. package/dist/schemas/system-kinds.js.map +1 -1
  79. package/dist/schemas/tools.d.ts +5 -1
  80. package/dist/schemas/tools.d.ts.map +1 -1
  81. package/dist/schemas/tools.js +3 -1
  82. package/dist/schemas/tools.js.map +1 -1
  83. package/package.json +1 -1
  84. package/src/client/index.ts +5 -0
  85. package/src/client/manifest-client.ts +4 -4
  86. package/src/failed-mcp-roster.ts +70 -0
  87. package/src/failed-reply-roll.ts +71 -0
  88. package/src/fleet-report.ts +306 -118
  89. package/src/generated/api-routes.ts +1 -1
  90. package/src/generated/openapi-schemas.ts +16 -13
  91. package/src/generated/served-schemas.ts +1 -1
  92. package/src/http.ts +5 -2
  93. package/src/index.ts +13 -2
  94. package/src/mcp-failure.ts +46 -0
  95. package/src/schemas/fleet.ts +20 -11
  96. package/src/schemas/manifest-mcp.ts +4 -3
  97. package/src/schemas/marketplace.ts +8 -2
  98. package/src/schemas/profiles.ts +9 -7
  99. package/src/schemas/system-kinds.ts +5 -4
  100. package/src/schemas/tools.ts +3 -1
@@ -3,18 +3,19 @@
3
3
  * fleet broadcast. Every mutation surface (connector, backup, mcp-config, env,
4
4
  * extensions, single-MCP reload, fleet reload) routes its broadcast report through
5
5
  * this one function so a FAILED propagation is never invisible: an unconfirmed
6
- * sibling (any non-`applied` outcome) or an unreachable bus becomes an explicit
7
- * summary the UI renders as a loud, user-visible state — never a faked success on a
8
- * worker that did not converge.
6
+ * sibling (any non-`applied` outcome the operation's recycle roll did not settle) or an
7
+ * unreachable bus becomes an explicit summary the UI renders as a loud, user-visible
8
+ * state — never a faked success on a worker that did not converge.
9
9
  *
10
- * A mutation embeds its broadcast in one of two shapes: the mode-wrapped
11
- * {@link FleetReportFanout} (`fanout` field) or the bare {@link FleetResult} (the
12
- * fleet-reload and single-MCP-reload bodies). Both normalize to a
10
+ * A mutation embeds its broadcast in one of three shapes: the mode-wrapped
11
+ * {@link FleetReportFanout} (`fanout` field), the fleet soft restart's
12
+ * {@link FleetReloadResult}, or the bare {@link FleetResult} (the single-MCP reload,
13
+ * deregister and tool reload/remove bodies). Each normalizes to a
13
14
  * {@link FleetReportSummary} through the functions here; the SDK's `FleetReport`
14
15
  * component renders the summary.
15
16
  */
16
- import type { FleetOutcome, FleetReportFanout, FleetResult } from './schemas';
17
- /** A per-worker propagation FAILURE: a worker that did not confirm `applied`. */
17
+ import type { AwaitingWorker, FleetOutcome, FleetReloadResult, FleetReportFanout, FleetResult, RecycleRoll } from './schemas';
18
+ /** The outcome of a worker's broadcast row that did not confirm `applied`. */
18
19
  export type FleetFailureOutcome = Exclude<FleetOutcome, 'applied'>;
19
20
  /** One worker that failed to converge, with the report's message for it. */
20
21
  export interface FleetWorkerFailure {
@@ -22,26 +23,47 @@ export interface FleetWorkerFailure {
22
23
  readonly outcome: FleetFailureOutcome;
23
24
  /** The failed apply's `error`, or the publisher's computed-outcome `detail`. */
24
25
  readonly message: string | null;
26
+ /**
27
+ * True when the reply states its reload was refused at its epoch build
28
+ * (the `withheld` {@link AwaitingRestartReading}): trying again may be refused the same way
29
+ * until the stored config is fixed.
30
+ */
31
+ readonly withheld: boolean;
25
32
  }
26
33
  /**
27
34
  * The interpreted state of one broadcast.
28
- * - `converged` — the bus was reached and every worker applied (or the change was
29
- * local-only on a lone worker). The caller renders its own success; the report
35
+ * - `converged` — the bus was reached and every worker applied or was settled by the
36
+ * operation's roll (or the change was local-only on a lone worker). The caller renders its own success; the report
30
37
  * needs no loud state.
31
- * - `degraded` — the bus was reached but one or more workers did not confirm; the
32
- * named `failures` are stale/unreached siblings the operator must see.
38
+ * - `degraded` — the bus was reached but one or more workers did not confirm and the
39
+ * operation's roll did not settle them; the named `failures` are stale/unreached
40
+ * siblings the operator must see.
33
41
  * - `unreachable` — the bus itself could not be reached, so no sibling was told;
34
42
  * `error` carries the transport failure.
35
43
  */
36
44
  export type FleetReportStatus = 'converged' | 'degraded' | 'unreachable';
37
45
  /**
38
- * One worker whose reload named recycle-class keys awaiting a respawn: their value
39
- * changed since the worker bound it (at boot, or when the plugin that declares them was
46
+ * What the reply says about a worker awaiting a respawn:
47
+ * - `restartable` — it carries the worker's broadcast row or recycle line, and neither
48
+ * states a refused build, so a restart applies its settings.
49
+ * - `withheld` — its reload was refused at its epoch build: the stored config did not build
50
+ * on it, so the operation left it running on its current config and a restart may fail
51
+ * the same way until that config is fixed. Its broadcast row is `failed` with a
52
+ * `discarded` payload, or its recycle line is `withheld`.
53
+ * - `unstated` — it carries neither a row nor a line for the worker (an upgrade-all's reply
54
+ * has no rows, nor has a lone worker's `local-only` fan-out), so it does not say which of
55
+ * the other two the worker is.
56
+ */
57
+ export type AwaitingRestartReading = 'restartable' | 'withheld' | 'unstated';
58
+ /**
59
+ * One worker an operation names as still awaiting a respawn: its recycle-class keys
60
+ * changed since the worker bound them (at boot, or when the plugin that declares them was
40
61
  * loaded), and they take effect only when it is respawned.
41
62
  */
42
63
  export interface FleetWorkerAwaitingRespawn {
43
64
  readonly name: string;
44
65
  readonly keys: readonly string[];
66
+ readonly reading: AwaitingRestartReading;
45
67
  }
46
68
  export interface FleetReportSummary {
47
69
  readonly status: FleetReportStatus;
@@ -51,8 +73,15 @@ export interface FleetReportSummary {
51
73
  readonly failures: readonly FleetWorkerFailure[];
52
74
  /** The bus-unreachable transport error — non-null only when `unreachable`. */
53
75
  readonly error: string | null;
54
- /** The workers whose reload named recycle-class keys awaiting a respawn. */
76
+ /** The workers the operation names as still awaiting a respawn. */
55
77
  readonly awaiting: readonly FleetWorkerAwaitingRespawn[];
78
+ /** The workers whose roll line is `self-deferred`: a restart the reply cannot confirm. */
79
+ readonly restartsPending: readonly string[];
80
+ /**
81
+ * The workers the roll settled without a confirmed fresh life whose broadcast row did not
82
+ * confirm `applied`: the reply states no restart is outstanding, not that they applied.
83
+ */
84
+ readonly reloadsUnconfirmed: readonly string[];
56
85
  /**
57
86
  * The config store's error releasing its exclusive write span after the persist, or
58
87
  * `null` when it released. Non-null means the change landed but the store may hold
@@ -66,46 +95,89 @@ export interface FleetReportSummary {
66
95
  */
67
96
  export declare function isFleetReportFailure(summary: FleetReportSummary | null): boolean;
68
97
  /**
69
- * Interpret a bare {@link FleetResult} (the fleet-reload / single-MCP-reload body).
70
- * An unreachable bus is `unreachable`; a reachable report with any non-`applied`
71
- * worker is `degraded` (those workers named); otherwise `converged`. Every worker whose
72
- * reload payload names `awaiting_respawn` keys is listed under `awaiting`, whatever the
73
- * status.
98
+ * Interpret a bare {@link FleetResult} (the single-MCP reload, deregister, and tool
99
+ * reload/remove bodies). An unreachable bus is `unreachable`; a reachable report with
100
+ * any non-`applied` worker is `degraded` (those workers named); otherwise `converged`.
101
+ * A bare report states no verdict on workers awaiting a respawn, so `awaiting` is empty.
74
102
  */
75
103
  export declare function summarizeFleetResult(result: Omit<FleetResult, 'ok'>): FleetReportSummary;
76
104
  /**
77
- * Interpret a mutation's mode-wrapped {@link FleetReportFanout}. `null`/`undefined`
78
- * (the response path mutated no manifest) yields `null` — there is nothing to report.
79
- * A `local-only` fan-out is `converged` with its note; `fleet`/`unreachable` carry a
80
- * bare {@link FleetResult} judged as {@link summarizeFleetResult} judges its failures.
81
- * `awaiting` is the mutation's own verdict (its response's `awaiting_respawn`, or `[]`
82
- * for a mutation that states none): the operation knows whether its recycle roll
83
- * carried a worker's moved env, so its per-worker rows are never re-read for it.
84
- * `spanReleaseError` is the response's `span_release_error`: a non-null value makes the
85
- * summary a failure ({@link isFleetReportFailure}) whatever the fan-out reports, and a
86
- * response that mutated no manifest still yields a summary carrying it.
105
+ * What a reload's reply says of a worker it holds no broadcast row for:
106
+ * - `recycled` — a roll line confirms its old life gone and new capacity up.
107
+ * - `outcome-open` — a roll line of any other status, the roll's stop or the awaiting verdict
108
+ * names it: the reply leaves its outcome open.
109
+ * - `confirmed-clean` — `skipped` names it: it confirmed no restart is due and was left running.
110
+ * - `new-life` — only `fresh` names it: a new ready life, which the reply ties to no restart.
111
+ * - `roll-handed-off` — only `roll_deferred_to` names it: it carries out the roll after the reply.
112
+ */
113
+ export type FleetReloadWorkerStatement = 'recycled' | 'outcome-open' | 'confirmed-clean' | 'new-life' | 'roll-handed-off';
114
+ /** A worker a reload's reply names beyond its one row, with what the reply says of it. */
115
+ export interface FleetReloadNamedWorker {
116
+ readonly name: string;
117
+ readonly statement: FleetReloadWorkerStatement;
118
+ }
119
+ /**
120
+ * The workers a fleet reload's report covers: every worker on the bus (`fleet`), the workers the
121
+ * request named (`selected`), only the answering worker, because the deployment has no worker bus
122
+ * (`no-bus`) or no other worker is on it (`alone-on-bus`), or one row with nothing to say the
123
+ * worker was alone (`one-row`): `others` holds the other workers the reply names, each with what it
124
+ * says of them, and is empty when the roll could not read the bus and so names none.
125
+ */
126
+ export type FleetReloadReach = {
127
+ readonly kind: 'fleet';
128
+ } | {
129
+ readonly kind: 'selected';
130
+ readonly count: number;
131
+ } | {
132
+ readonly kind: 'no-bus';
133
+ } | {
134
+ readonly kind: 'alone-on-bus';
135
+ } | {
136
+ readonly kind: 'one-row';
137
+ readonly worker: string;
138
+ readonly others: readonly FleetReloadNamedWorker[];
139
+ };
140
+ /** A fleet reload's report, with the workers it covers. */
141
+ export interface FleetReloadSummary extends FleetReportSummary {
142
+ /** The workers the report covers. */
143
+ readonly reach: FleetReloadReach;
144
+ }
145
+ /**
146
+ * Interpret a fleet soft restart's {@link FleetReloadResult}: its per-worker report
147
+ * judged as {@link summarizeFleetResult} judges it, with `awaiting` the operation's own
148
+ * `awaiting_respawn` verdict. Each worker's reload payload states the keys that worker
149
+ * found moved before the operation's recycle roll ran; the roll restarts those workers,
150
+ * so only the verdict says which still await a respawn. Its rows and its roll's lines
151
+ * give the reading of each ({@link AwaitingRestartReading}), and the roll settles the
152
+ * workers whose rows did not confirm ({@link settledWorkers}).
153
+ *
154
+ * `targets` is what the request named, `null` for the whole fleet: the reply does not echo it,
155
+ * and a reply naming one target has the same shape as a lone worker's.
156
+ */
157
+ export declare function summarizeFleetReload(reply: Omit<FleetReloadResult, 'ok'>, targets: readonly string[] | null): FleetReloadSummary;
158
+ /**
159
+ * The slice of a mutation's reply its fleet report reads, under the reply's own field names.
160
+ * A reply states only what its operation has: `fanout` is absent or `null` when it reloaded
161
+ * no manifest, `awaiting_respawn` absent when it states no verdict, and `recycle` absent or
162
+ * `null` when it ran no roll.
87
163
  */
88
- export declare function summarizeFleetFanout(fanout: FleetReportFanout | null | undefined, awaiting: readonly FleetWorkerAwaitingRespawn[], spanReleaseError: string | null): FleetReportSummary | null;
89
- /** One MCP server skipped by the viability check — its title, a coarse status, and the
90
- * credential-free failure detail the platform records when present: `category` (`auth`
91
- * for a 401/403, `unreachable` for a transport error or timeout, `error` otherwise),
92
- * the redacted `message`, and the `http_status` the failure carried (`null` for a pure
93
- * transport failure). The three detail fields are absent when the reporting server
94
- * omitted them. */
95
- export interface FailedMcpEntry {
96
- readonly title: string;
97
- readonly status: string;
98
- readonly category?: string;
99
- readonly message?: string;
100
- readonly http_status?: number | null;
164
+ export interface FleetFanoutReply {
165
+ readonly fanout?: FleetReportFanout | null;
166
+ readonly awaiting_respawn?: readonly AwaitingWorker[];
167
+ /** The roll the operation ran. A reply carrying its roll's fields flat passes itself here. */
168
+ readonly recycle?: Pick<RecycleRoll, 'recycle' | 'skipped'> | null;
169
+ readonly span_release_error: string | null;
101
170
  }
102
171
  /**
103
- * The failed-MCP roster carried by a `GET /api/mcp-status/failed` broadcast report.
104
- * The query op rides the fleet fan-out primitive, so each worker's own failed list
105
- * arrives as its per-worker `payload` (opaque on the wire). This unions those lists
106
- * by title — a server failed on ANY worker is a server the operator must see — and
107
- * name-sorts the result, tolerating a worker whose payload is absent or malformed
108
- * (skipped, never a throw: a partial fleet report still yields the roster it can).
172
+ * Interpret a mutation's reply. A reply with no fan-out, no unreleased span and no worker
173
+ * awaiting a respawn yields `null`: there is nothing to report. A `local-only` fan-out is
174
+ * `converged` with its note; `fleet`/`unreachable` carry a bare {@link FleetResult} judged
175
+ * as {@link summarizeFleetResult} judges it. `awaiting_respawn` is the operation's own
176
+ * verdict: it knows whether its recycle roll carried a worker's moved env, so its per-worker
177
+ * rows are never re-read for it. The roll's lines, with the broadcast rows, give the reading of
178
+ * each worker it names ({@link AwaitingRestartReading}), and the roll settles the workers whose
179
+ * rows did not confirm ({@link settledWorkers}). A non-null `span_release_error` makes the summary a failure
180
+ * ({@link isFleetReportFailure}) whatever the fan-out reports.
109
181
  */
110
- export declare function failedMcpsFromReport(result: Omit<FleetResult, 'ok'>): FailedMcpEntry[];
182
+ export declare function summarizeFleetFanout(reply: FleetFanoutReply): FleetReportSummary | null;
111
183
  //# sourceMappingURL=fleet-report.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fleet-report.d.ts","sourceRoot":"","sources":["../src/fleet-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE9E,iFAAiF;AACjF,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AAEnE,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,kFAAkF;IAClF,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,C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ACrC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;CAClC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,EACpC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAChC,kBAAkB,CAKpB;AAoLD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACtD,8FAA8F;IAC9F,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC;IACnE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,IAAI,CAmBvF"}
@@ -1,16 +1,3 @@
1
- /**
2
- * The recycle-class keys a worker's reload payload names under `awaiting_respawn`.
3
- * The per-worker payload is opaque on the wire, so it is read defensively: a payload
4
- * that is not a reload result names nothing.
5
- */
6
- function awaitingKeys(payload) {
7
- if (typeof payload !== 'object' || payload === null || Array.isArray(payload))
8
- return [];
9
- const keys = payload.awaiting_respawn;
10
- if (!Array.isArray(keys))
11
- return [];
12
- return keys.filter((key) => typeof key === 'string');
13
- }
14
1
  /**
15
2
  * True when a summary describes a failure the operator must be shown: a propagation
16
3
  * that did not converge, or a write span the store did not release.
@@ -19,19 +6,143 @@ export function isFleetReportFailure(summary) {
19
6
  return summary !== null && (summary.status !== 'converged' || summary.spanReleaseError !== null);
20
7
  }
21
8
  /**
22
- * Interpret a bare {@link FleetResult} (the fleet-reload / single-MCP-reload body).
23
- * An unreachable bus is `unreachable`; a reachable report with any non-`applied`
24
- * worker is `degraded` (those workers named); otherwise `converged`. Every worker whose
25
- * reload payload names `awaiting_respawn` keys is listed under `awaiting`, whatever the
26
- * status.
9
+ * Interpret a bare {@link FleetResult} (the single-MCP reload, deregister, and tool
10
+ * reload/remove bodies). An unreachable bus is `unreachable`; a reachable report with
11
+ * any non-`applied` worker is `degraded` (those workers named); otherwise `converged`.
12
+ * A bare report states no verdict on workers awaiting a respawn, so `awaiting` is empty.
27
13
  */
28
14
  export function summarizeFleetResult(result) {
29
- const awaiting = result.results
30
- .map((entry) => ({ name: entry.name, keys: awaitingKeys(entry.payload) }))
31
- .filter((entry) => entry.keys.length > 0);
32
- return summarizeWith(result, awaiting, null);
15
+ return summarizeWith(result, [], NO_ROLL, null);
16
+ }
17
+ /**
18
+ * Interpret a fleet soft restart's {@link FleetReloadResult}: its per-worker report
19
+ * judged as {@link summarizeFleetResult} judges it, with `awaiting` the operation's own
20
+ * `awaiting_respawn` verdict. Each worker's reload payload states the keys that worker
21
+ * found moved before the operation's recycle roll ran; the roll restarts those workers,
22
+ * so only the verdict says which still await a respawn. Its rows and its roll's lines
23
+ * give the reading of each ({@link AwaitingRestartReading}), and the roll settles the
24
+ * workers whose rows did not confirm ({@link settledWorkers}).
25
+ *
26
+ * `targets` is what the request named, `null` for the whole fleet: the reply does not echo it,
27
+ * and a reply naming one target has the same shape as a lone worker's.
28
+ */
29
+ export function summarizeFleetReload(reply, targets) {
30
+ return {
31
+ ...summarizeWith(reply, reply.awaiting_respawn, reply.recycle ?? NO_ROLL, null),
32
+ reach: reloadReach(reply, targets),
33
+ };
34
+ }
35
+ /**
36
+ * The workers a reload's report covers. A reachable reply holds one row per expected worker, the
37
+ * answering worker's own among them, plus the gap rows, and its roll and verdict can still name a
38
+ * worker with no row. So a single row means the worker was alone on the bus only when the
39
+ * reply names no one else and its roll read the bus: a roll that stopped on no named worker stopped
40
+ * reading the bus, so its reply names no one because it could not tell.
41
+ */
42
+ function reloadReach(reply, targets) {
43
+ if (reply.local_only)
44
+ return { kind: 'no-bus' };
45
+ if (targets !== null)
46
+ return { kind: 'selected', count: targets.length };
47
+ const [row, ...otherRows] = reply.results;
48
+ if (row === undefined || otherRows.length > 0)
49
+ return { kind: 'fleet' };
50
+ const others = workersNamedBeyondRow(reply, row.name);
51
+ const rollCouldNotReadBus = reply.recycle?.recycle_stopped?.name === null;
52
+ return others.length > 0 || rollCouldNotReadBus
53
+ ? { kind: 'one-row', worker: row.name, others }
54
+ : { kind: 'alone-on-bus' };
55
+ }
56
+ /**
57
+ * The workers a reload's reply names under each statement, the leading statement first: an open
58
+ * outcome leads a settled one, and what the roll states of a worker's restart leads what only the
59
+ * reply's lists state.
60
+ */
61
+ function workersByStatement(reply) {
62
+ const roll = reply.recycle;
63
+ const lines = roll?.recycle ?? [];
64
+ const stoppedAt = roll?.recycle_stopped?.name ?? null;
65
+ return [
66
+ [
67
+ 'outcome-open',
68
+ [
69
+ ...lines.filter((line) => line.status !== 'recycled').map((line) => line.name),
70
+ ...(stoppedAt === null ? [] : [stoppedAt]),
71
+ ...reply.awaiting_respawn.map((worker) => worker.name),
72
+ ],
73
+ ],
74
+ ['recycled', lines.filter((line) => line.status === 'recycled').map((line) => line.name)],
75
+ ['confirmed-clean', roll?.skipped ?? []],
76
+ ['new-life', roll?.fresh.map((life) => life.name) ?? []],
77
+ ['roll-handed-off', reply.roll_deferred_to === null ? [] : [reply.roll_deferred_to]],
78
+ ];
79
+ }
80
+ /** Each worker a reload's reply names beyond its row, once, with the statement that leads for it. */
81
+ function workersNamedBeyondRow(reply, rowWorker) {
82
+ const statementOf = new Map();
83
+ for (const [statement, names] of workersByStatement(reply)) {
84
+ for (const name of names) {
85
+ if (name !== rowWorker && !statementOf.has(name))
86
+ statementOf.set(name, statement);
87
+ }
88
+ }
89
+ return [...statementOf].map(([name, statement]) => ({ name, statement }));
90
+ }
91
+ const NO_ROLL = { recycle: [], skipped: [] };
92
+ /** Whether a broadcast row states that its worker's reload was refused at its epoch build. */
93
+ function statesDiscardedBuild(row) {
94
+ if (row.outcome !== 'failed')
95
+ return false;
96
+ const payload = row.payload;
97
+ return (typeof payload === 'object' &&
98
+ payload !== null &&
99
+ payload.status === 'discarded');
100
+ }
101
+ /**
102
+ * The workers the reply states as withheld, the one reading of it: a broadcast row states
103
+ * a discarded build, or a recycle line is `withheld`.
104
+ */
105
+ function withheldWorkers(rows, recycle) {
106
+ return new Set([
107
+ ...rows.filter(statesDiscardedBuild).map((row) => row.name),
108
+ ...recycle.filter((line) => line.status === 'withheld').map((line) => line.name),
109
+ ]);
33
110
  }
34
- function summarizeWith(result, awaiting, spanReleaseError) {
111
+ /**
112
+ * The workers whose latest statement is the roll's and leaves nothing to converge, the one
113
+ * reading of it, whatever their broadcast rows say: a line `recycled` or `self-deferred`, or a
114
+ * worker named in `skipped`. A discarded build with no moved keys is skipped on that row alone,
115
+ * with no later statement, so its row still stands: the stored configuration did not build there.
116
+ */
117
+ function settledWorkers(rows, roll) {
118
+ const discarded = new Set(rows.filter(statesDiscardedBuild).map((row) => row.name));
119
+ return new Set([
120
+ ...roll.recycle
121
+ .filter((line) => line.status === 'recycled' || line.status === 'self-deferred')
122
+ .map((line) => line.name),
123
+ ...roll.skipped.filter((name) => !discarded.has(name)),
124
+ ]);
125
+ }
126
+ function awaitingWorkers(verdict, rows, recycle) {
127
+ const withheld = withheldWorkers(rows, recycle);
128
+ const stated = new Set([...rows, ...recycle].map((statement) => statement.name));
129
+ return verdict.map((worker) => ({
130
+ name: worker.name,
131
+ keys: worker.keys,
132
+ reading: withheld.has(worker.name)
133
+ ? 'withheld'
134
+ : stated.has(worker.name)
135
+ ? 'restartable'
136
+ : 'unstated',
137
+ }));
138
+ }
139
+ /** The worker lines of one status, by name. */
140
+ function linesWith(roll, status) {
141
+ return roll.recycle.filter((line) => line.status === status).map((line) => line.name);
142
+ }
143
+ function summarizeWith(result, verdict, roll, spanReleaseError) {
144
+ const awaiting = awaitingWorkers(verdict, result.results, roll.recycle);
145
+ const restartsPending = linesWith(roll, 'self-deferred');
35
146
  if (!result.reachable) {
36
147
  return {
37
148
  status: 'unreachable',
@@ -39,15 +150,22 @@ function summarizeWith(result, awaiting, spanReleaseError) {
39
150
  failures: [],
40
151
  error: result.error,
41
152
  awaiting,
153
+ restartsPending,
154
+ reloadsUnconfirmed: [],
42
155
  spanReleaseError,
43
156
  };
44
157
  }
45
- const failures = result.results
46
- .filter((entry) => entry.outcome !== 'applied')
158
+ const withheld = withheldWorkers(result.results, roll.recycle);
159
+ const settled = settledWorkers(result.results, roll);
160
+ const recycled = new Set(linesWith(roll, 'recycled'));
161
+ const unconfirmed = result.results.filter((entry) => entry.outcome !== 'applied');
162
+ const failures = unconfirmed
163
+ .filter((entry) => !settled.has(entry.name))
47
164
  .map((entry) => ({
48
165
  name: entry.name,
49
166
  outcome: entry.outcome,
50
167
  message: entry.error ?? entry.detail ?? null,
168
+ withheld: withheld.has(entry.name),
51
169
  }));
52
170
  return {
53
171
  status: failures.length > 0 ? 'degraded' : 'converged',
@@ -55,82 +173,43 @@ function summarizeWith(result, awaiting, spanReleaseError) {
55
173
  failures,
56
174
  error: null,
57
175
  awaiting,
176
+ restartsPending,
177
+ reloadsUnconfirmed: unconfirmed
178
+ .map((entry) => entry.name)
179
+ .filter((name) => settled.has(name) && !recycled.has(name)),
58
180
  spanReleaseError,
59
181
  };
60
182
  }
61
183
  /**
62
- * Interpret a mutation's mode-wrapped {@link FleetReportFanout}. `null`/`undefined`
63
- * (the response path mutated no manifest) yields `null` — there is nothing to report.
64
- * A `local-only` fan-out is `converged` with its note; `fleet`/`unreachable` carry a
65
- * bare {@link FleetResult} judged as {@link summarizeFleetResult} judges its failures.
66
- * `awaiting` is the mutation's own verdict (its response's `awaiting_respawn`, or `[]`
67
- * for a mutation that states none): the operation knows whether its recycle roll
68
- * carried a worker's moved env, so its per-worker rows are never re-read for it.
69
- * `spanReleaseError` is the response's `span_release_error`: a non-null value makes the
70
- * summary a failure ({@link isFleetReportFailure}) whatever the fan-out reports, and a
71
- * response that mutated no manifest still yields a summary carrying it.
184
+ * Interpret a mutation's reply. A reply with no fan-out, no unreleased span and no worker
185
+ * awaiting a respawn yields `null`: there is nothing to report. A `local-only` fan-out is
186
+ * `converged` with its note; `fleet`/`unreachable` carry a bare {@link FleetResult} judged
187
+ * as {@link summarizeFleetResult} judges it. `awaiting_respawn` is the operation's own
188
+ * verdict: it knows whether its recycle roll carried a worker's moved env, so its per-worker
189
+ * rows are never re-read for it. The roll's lines, with the broadcast rows, give the reading of
190
+ * each worker it names ({@link AwaitingRestartReading}), and the roll settles the workers whose
191
+ * rows did not confirm ({@link settledWorkers}). A non-null `span_release_error` makes the summary a failure
192
+ * ({@link isFleetReportFailure}) whatever the fan-out reports.
72
193
  */
73
- export function summarizeFleetFanout(fanout, awaiting, spanReleaseError) {
74
- if (fanout === null || fanout === undefined) {
75
- if (spanReleaseError === null)
194
+ export function summarizeFleetFanout(reply) {
195
+ const { fanout, span_release_error: spanReleaseError } = reply;
196
+ const verdict = reply.awaiting_respawn ?? [];
197
+ const roll = reply.recycle ?? NO_ROLL;
198
+ if (fanout === null || fanout === undefined || fanout.mode === 'local-only') {
199
+ const note = fanout?.note ?? null;
200
+ if (note === null && spanReleaseError === null && verdict.length === 0)
76
201
  return null;
77
202
  return {
78
203
  status: 'converged',
79
- note: null,
204
+ note,
80
205
  failures: [],
81
206
  error: null,
82
- awaiting,
207
+ awaiting: awaitingWorkers(verdict, [], roll.recycle),
208
+ restartsPending: linesWith(roll, 'self-deferred'),
209
+ reloadsUnconfirmed: [],
83
210
  spanReleaseError,
84
211
  };
85
212
  }
86
- if (fanout.mode === 'local-only') {
87
- return {
88
- status: 'converged',
89
- note: fanout.note,
90
- failures: [],
91
- error: null,
92
- awaiting,
93
- spanReleaseError,
94
- };
95
- }
96
- return summarizeWith(fanout, awaiting, spanReleaseError);
97
- }
98
- /**
99
- * The failed-MCP roster carried by a `GET /api/mcp-status/failed` broadcast report.
100
- * The query op rides the fleet fan-out primitive, so each worker's own failed list
101
- * arrives as its per-worker `payload` (opaque on the wire). This unions those lists
102
- * by title — a server failed on ANY worker is a server the operator must see — and
103
- * name-sorts the result, tolerating a worker whose payload is absent or malformed
104
- * (skipped, never a throw: a partial fleet report still yields the roster it can).
105
- */
106
- export function failedMcpsFromReport(result) {
107
- const byTitle = new Map();
108
- for (const worker of result.results) {
109
- const payload = worker.payload;
110
- if (!Array.isArray(payload))
111
- continue;
112
- for (const entry of payload) {
113
- if (typeof entry !== 'object' || entry === null || Array.isArray(entry))
114
- continue;
115
- const record = entry;
116
- const { title, status, category, message } = record;
117
- if (typeof title !== 'string' || title === '')
118
- continue;
119
- // First-seen wins: a server's earliest failure record carries the whole row,
120
- // detail fields included, and a later worker's echo of the same title is ignored.
121
- if (byTitle.has(title))
122
- continue;
123
- byTitle.set(title, {
124
- title,
125
- status: typeof status === 'string' ? status : 'unavailable',
126
- ...(typeof category === 'string' ? { category } : {}),
127
- ...(typeof message === 'string' ? { message } : {}),
128
- ...(typeof record.http_status === 'number' || record.http_status === null
129
- ? { http_status: record.http_status }
130
- : {}),
131
- });
132
- }
133
- }
134
- return [...byTitle.values()].sort((a, b) => a.title.localeCompare(b.title));
213
+ return summarizeWith(fanout, verdict, roll, spanReleaseError);
135
214
  }
136
215
  //# sourceMappingURL=fleet-report.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fleet-report.js","sourceRoot":"","sources":["../src/fleet-report.ts"],"names":[],"mappings":"AAoEA;;;;GAIG;AACH,SAAS,YAAY,CAAC,OAAgB;IACpC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IACzF,MAAM,IAAI,GAAI,OAAmC,CAAC,gBAAgB,CAAC;IACnE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,OAAO,IAAI,CAAC,MAAM,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I,CAAC;aAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC7D,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAgBD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAuB;IAC1D,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC;IAC/D,MAAM,OAAO,GAAG,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC;IAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,IAAI,OAAO,CAAC;IACtC,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAC5E,MAAM,IAAI,GAAG,MAAM,EAAE,IAAI,IAAI,IAAI,CAAC;QAClC,IAAI,IAAI,KAAK,IAAI,IAAI,gBAAgB,KAAK,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACpF,OAAO;YACL,MAAM,EAAE,WAAW;YACnB,IAAI;YACJ,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,eAAe,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACpD,eAAe,EAAE,SAAS,CAAC,IAAI,EAAE,eAAe,CAAC;YACjD,kBAAkB,EAAE,EAAE;YACtB,gBAAgB;SACjB,CAAC;IACJ,CAAC;IACD,OAAO,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;AAChE,CAAC"}
@@ -375,6 +375,10 @@ export declare const apiRoutes: {
375
375
  readonly method: "GET";
376
376
  readonly path: "/api/mcp-status/failed";
377
377
  };
378
+ readonly get_api_mcp_status_title_advertised_tools: {
379
+ readonly method: "GET";
380
+ readonly path: "/api/mcp-status/{title}/advertised-tools";
381
+ };
378
382
  readonly get_api_notifications: {
379
383
  readonly method: "GET";
380
384
  readonly path: "/api/notifications";
@@ -835,10 +839,6 @@ export declare const apiRoutes: {
835
839
  readonly method: "POST";
836
840
  readonly path: "/api/mcp-status/reload-failed";
837
841
  };
838
- readonly post_api_mcp_status_title_advertised_tools: {
839
- readonly method: "POST";
840
- readonly path: "/api/mcp-status/{title}/advertised-tools";
841
- };
842
842
  readonly post_api_mcp_status_title_deregister: {
843
843
  readonly method: "POST";
844
844
  readonly path: "/api/mcp-status/{title}/deregister";
@@ -100,6 +100,7 @@ export const apiRoutes = {
100
100
  get_api_mcp_config_schema: { method: "GET", path: "/api/mcp-config/schema" },
101
101
  get_api_mcp_status: { method: "GET", path: "/api/mcp-status" },
102
102
  get_api_mcp_status_failed: { method: "GET", path: "/api/mcp-status/failed" },
103
+ get_api_mcp_status_title_advertised_tools: { method: "GET", path: "/api/mcp-status/{title}/advertised-tools" },
103
104
  get_api_notifications: { method: "GET", path: "/api/notifications" },
104
105
  get_api_observability_capabilities: { method: "GET", path: "/api/observability/capabilities" },
105
106
  get_api_observability_metrics: { method: "GET", path: "/api/observability/metrics" },
@@ -215,7 +216,6 @@ export const apiRoutes = {
215
216
  post_api_mcp_config_entries: { method: "POST", path: "/api/mcp-config/entries" },
216
217
  post_api_mcp_config_secret_env: { method: "POST", path: "/api/mcp-config/secret-env" },
217
218
  post_api_mcp_status_reload_failed: { method: "POST", path: "/api/mcp-status/reload-failed" },
218
- post_api_mcp_status_title_advertised_tools: { method: "POST", path: "/api/mcp-status/{title}/advertised-tools" },
219
219
  post_api_mcp_status_title_deregister: { method: "POST", path: "/api/mcp-status/{title}/deregister" },
220
220
  post_api_mcp_status_title_reload: { method: "POST", path: "/api/mcp-status/{title}/reload" },
221
221
  post_api_notifications: { method: "POST", path: "/api/notifications" },