agl 43.7.0 → 43.9.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.
- package/changelog.md +33 -0
- package/dist_serve/bundle.js +871 -858
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +824 -6
- package/dist_ts/aglapi/interfaces.d.ts +43 -0
- package/dist_ts/aglapi/interfaces.js +11 -1
- package/dist_ts/classes.apnsclient.d.ts +97 -0
- package/dist_ts/classes.apnsclient.js +363 -0
- package/dist_ts/classes.authmodels.js +19 -6
- package/dist_ts/classes.authstore.js +15 -2
- package/dist_ts/classes.cli.js +8 -1
- package/dist_ts/classes.controller.d.ts +30 -3
- package/dist_ts/classes.controller.js +250 -9
- package/dist_ts/classes.controllerdevices.d.ts +35 -7
- package/dist_ts/classes.controllerdevices.js +86 -13
- package/dist_ts/classes.controllerpush.d.ts +111 -0
- package/dist_ts/classes.controllerpush.js +299 -0
- package/dist_ts/classes.fcmclient.d.ts +78 -0
- package/dist_ts/classes.fcmclient.js +278 -0
- package/dist_ts/classes.inbox.d.ts +10 -2
- package/dist_ts/classes.inbox.js +9 -2
- package/dist_ts/classes.mcpclient.d.ts +5 -0
- package/dist_ts/classes.mcpclient.js +20 -8
- package/dist_ts/classes.mcpcontrollerhost.d.ts +3 -0
- package/dist_ts/classes.mcpcontrollerhost.js +21 -2
- package/dist_ts/classes.mcptools.d.ts +1 -1
- package/dist_ts/classes.mcptools.js +2 -1
- package/dist_ts/classes.mcpvalidation.js +4 -1
- package/dist_ts/classes.mcpworkercaller.d.ts +6 -0
- package/dist_ts/classes.mcpworkercaller.js +26 -4
- package/dist_ts/classes.pushdelivery.d.ts +115 -0
- package/dist_ts/classes.pushdelivery.js +311 -0
- package/dist_ts/classes.pushhandover.d.ts +46 -0
- package/dist_ts/classes.pushhandover.js +131 -0
- package/dist_ts/classes.pushregistrations.d.ts +96 -0
- package/dist_ts/classes.pushregistrations.js +263 -0
- package/dist_ts/classes.pushsettings.d.ts +125 -0
- package/dist_ts/classes.pushsettings.js +377 -0
- package/dist_ts/classes.ticketstore.d.ts +3 -3
- package/dist_ts/classes.ticketstore.js +23 -4
- package/dist_ts/classes.workercallers.d.ts +73 -2
- package/dist_ts/classes.workercallers.js +354 -43
- package/dist_ts/driver/classes.directreports.d.ts +5 -0
- package/dist_ts/driver/classes.directreports.js +3 -2
- package/dist_ts/fleet/classes.workerlaunches.d.ts +6 -4
- package/dist_ts/fleet/classes.workerlaunches.js +10 -9
- package/dist_ts/fleet/classes.workers.d.ts +12 -2
- package/dist_ts/fleet/classes.workers.js +82 -2
- package/dist_ts/functions.deviceapi.d.ts +23 -3
- package/dist_ts/functions.deviceapi.js +43 -3
- package/dist_ts/functions.mcptickettools.d.ts +60 -0
- package/dist_ts/functions.mcptickettools.js +4 -3
- package/dist_ts/functions.pushcli.d.ts +43 -0
- package/dist_ts/functions.pushcli.js +201 -0
- package/dist_ts/functions.pushcredentials.d.ts +53 -0
- package/dist_ts/functions.pushcredentials.js +111 -0
- package/dist_ts/functions.pushwire.d.ts +8 -0
- package/dist_ts/functions.pushwire.js +83 -0
- package/dist_ts/functions.remotecli.d.ts +2 -2
- package/dist_ts/functions.remotecli.js +4 -4
- package/dist_ts/functions.ticketcli.d.ts +4 -2
- package/dist_ts/functions.ticketcli.js +70 -4
- package/dist_ts/functions.ticketlisting.d.ts +38 -0
- package/dist_ts/functions.ticketlisting.js +211 -0
- package/dist_ts/functions.ticketvalidation.d.ts +62 -0
- package/dist_ts/functions.ticketvalidation.js +41 -3
- package/dist_ts/functions.workercallervalidation.js +3 -2
- package/dist_ts/functions.workerprocessproof.d.ts +12 -0
- package/dist_ts/functions.workerprocessproof.js +32 -1
- package/dist_ts/interfaces.auth.d.ts +27 -3
- package/dist_ts/interfaces.auth.js +9 -1
- package/dist_ts/interfaces.lifecycle.d.ts +7 -1
- package/dist_ts/interfaces.push.d.ts +69 -0
- package/dist_ts/interfaces.push.js +25 -0
- package/dist_ts/plugins.d.ts +3 -1
- package/dist_ts/plugins.js +4 -2
- package/dist_ts_interfaces/devices.d.ts +178 -2
- package/dist_ts_interfaces/devices.js +24 -2
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/mcprequests.d.ts +3 -2
- package/dist_ts_interfaces/mcprequests.js +3 -1
- package/dist_ts_interfaces/push.d.ts +166 -0
- package/dist_ts_interfaces/push.js +24 -0
- package/dist_ts_interfaces/requests.tickets.d.ts +31 -3
- package/dist_ts_interfaces/requests.tickets.js +2 -2
- package/dist_ts_interfaces/tickets.d.ts +174 -2
- package/dist_ts_interfaces/tickets.js +20 -2
- package/dist_ts_interfaces/workercallers.d.ts +43 -3
- package/package.json +2 -2
- package/readme.md +95 -14
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +823 -5
- package/ts/aglapi/interfaces.ts +10 -0
- package/ts/classes.apnsclient.ts +389 -0
- package/ts/classes.authmodels.ts +21 -5
- package/ts/classes.authstore.ts +14 -1
- package/ts/classes.cli.ts +7 -0
- package/ts/classes.controller.ts +273 -7
- package/ts/classes.controllerdevices.ts +94 -12
- package/ts/classes.controllerpush.ts +351 -0
- package/ts/classes.fcmclient.ts +292 -0
- package/ts/classes.inbox.ts +13 -2
- package/ts/classes.mcpclient.ts +22 -7
- package/ts/classes.mcpcontrollerhost.ts +22 -1
- package/ts/classes.mcptools.ts +1 -0
- package/ts/classes.mcpvalidation.ts +2 -0
- package/ts/classes.mcpworkercaller.ts +24 -2
- package/ts/classes.pushdelivery.ts +378 -0
- package/ts/classes.pushhandover.ts +98 -0
- package/ts/classes.pushregistrations.ts +244 -0
- package/ts/classes.pushsettings.ts +428 -0
- package/ts/classes.ticketstore.ts +21 -3
- package/ts/classes.workercallers.ts +329 -37
- package/ts/driver/classes.directreports.ts +7 -1
- package/ts/fleet/classes.workerlaunches.ts +9 -7
- package/ts/fleet/classes.workers.ts +65 -2
- package/ts/functions.deviceapi.ts +54 -2
- package/ts/functions.mcptickettools.ts +3 -2
- package/ts/functions.pushcli.ts +212 -0
- package/ts/functions.pushcredentials.ts +129 -0
- package/ts/functions.pushwire.ts +106 -0
- package/ts/functions.remotecli.ts +3 -2
- package/ts/functions.ticketcli.ts +70 -5
- package/ts/functions.ticketlisting.ts +214 -0
- package/ts/functions.ticketvalidation.ts +41 -2
- package/ts/functions.workercallervalidation.ts +2 -1
- package/ts/functions.workerprocessproof.ts +34 -0
- package/ts/interfaces.auth.ts +26 -3
- package/ts/interfaces.lifecycle.ts +7 -1
- package/ts/interfaces.push.ts +78 -0
- package/ts/plugins.ts +3 -1
- package/ts_interfaces/devices.schema.json +327 -0
- package/ts_interfaces/devices.ts +206 -1
- package/ts_interfaces/index.ts +1 -0
- package/ts_interfaces/mcprequests.ts +3 -0
- package/ts_interfaces/push.ts +162 -0
- package/ts_interfaces/requests.tickets.ts +32 -2
- package/ts_interfaces/tickets.ts +136 -3
- package/ts_interfaces/workercallers.ts +34 -2
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements.inbox.ts +50 -9
|
@@ -60,12 +60,18 @@ export interface IFleetWorkerCallerHooks {
|
|
|
60
60
|
}>;
|
|
61
61
|
getWorkerCallerStatus(launchId: string): IWorkerCallerReadiness;
|
|
62
62
|
/**
|
|
63
|
-
* Revokes one launch, or the current launch of a worker, also one the controller kept from before a restart
|
|
64
|
-
* reason but `generation_change` revokes it for good: its
|
|
63
|
+
* Revokes one launch, or the current launch of a worker, also one the controller kept from before a restart or
|
|
64
|
+
* recorded for a bridge it identified by its process. Every reason but `generation_change` revokes it for good: its
|
|
65
|
+
* kept binding is deleted with it.
|
|
65
66
|
*/
|
|
66
67
|
revokeWorkerCaller(request: ({ launchId: string } | { workerId: string }) & {
|
|
67
68
|
reason: 'failure' | 'stop' | 'replacement' | 'generation_change' | 'cancelled';
|
|
68
69
|
}): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* The fleet adopted or re-bound a worker: every process whose bridge the controller refused to identify is
|
|
72
|
+
* identified afresh at its bridge's next call.
|
|
73
|
+
*/
|
|
74
|
+
clearCallerRefusals(): void;
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
/** The background job a Claude worker's launch is bound to, as the controller asks the fleet about it. */
|
|
@@ -87,6 +93,27 @@ export type TWorkerClaudeJobObservation =
|
|
|
87
93
|
| { state: 'ended'; reason: string }
|
|
88
94
|
| { state: 'unproven'; reason: string };
|
|
89
95
|
|
|
96
|
+
/**
|
|
97
|
+
* The process an MCP bridge runs under (its direct parent), which the controller proved to run an installed Claude Code
|
|
98
|
+
* release, and that process's own parent, as the controller asks the fleet whose job it is.
|
|
99
|
+
*/
|
|
100
|
+
export interface IWorkerClaudeProcessRequest {
|
|
101
|
+
pid: number;
|
|
102
|
+
parentPid: number;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* What the fleet names a process for: `identified` when a fresh inventory of the fleet's Claude homes lists it exactly
|
|
107
|
+
* once, as the process of a background job with an agent id whose session it lists once, and exactly one stored worker
|
|
108
|
+
* of any owner, a live Claude worker without a dispatch in flight or a lost one, binds that session under the home that
|
|
109
|
+
* lists it. Otherwise `refused` by the check that failed: `parent` when the process is not the job's but its own parent
|
|
110
|
+
* is (the bridge runs one level too deep), `inventory` or `worker`; with the worker when one is named, and whether the
|
|
111
|
+
* refusal holds while the process runs (`forGood`) or may pass soon.
|
|
112
|
+
*/
|
|
113
|
+
export type TWorkerClaudeProcessIdentification =
|
|
114
|
+
| { state: 'identified'; workerId: string; projectId: string; nativeSessionId: string; jobId: string }
|
|
115
|
+
| { state: 'refused'; check: 'parent' | 'inventory' | 'worker'; reason: string; forGood: boolean; workerId?: string; nativeSessionId?: string };
|
|
116
|
+
|
|
90
117
|
export interface IWorkerCallerSubject {
|
|
91
118
|
kind: 'worker_launch';
|
|
92
119
|
launchId: string;
|
|
@@ -101,10 +128,15 @@ export interface IWorkerCallerSubject {
|
|
|
101
128
|
workerName: string;
|
|
102
129
|
}
|
|
103
130
|
|
|
131
|
+
/**
|
|
132
|
+
* A bridge enrolls with the launch its MCP configuration gave it, a Codex challenge or thread, or, holding none, its
|
|
133
|
+
* process id alone: the controller then identifies it by its process chain.
|
|
134
|
+
*/
|
|
104
135
|
export type TWorkerCallerEnrollment = { bridgePid: number } & (
|
|
105
136
|
| { launchId: string; launchGeneration: string }
|
|
106
137
|
| { challenge: string; nativeThreadId: string }
|
|
107
138
|
| { nativeThreadId: string }
|
|
139
|
+
| Record<never, never>
|
|
108
140
|
);
|
|
109
141
|
|
|
110
142
|
export interface IWorkerCallerEnrollmentResponse extends IWorkerCallerReadiness {
|
package/ts_web/elements.inbox.ts
CHANGED
|
@@ -102,14 +102,23 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
102
102
|
private unsubscribe: (() => void) | undefined;
|
|
103
103
|
private subscribedFeed: InboxFeed | undefined;
|
|
104
104
|
private ageTimer: ReturnType<typeof setInterval> | undefined;
|
|
105
|
+
/** The item the detail showed at the last render. */
|
|
106
|
+
private detailShownId = '';
|
|
107
|
+
/** The list and the detail's body scroll on their own; each fades toward an edge past which more lies. */
|
|
108
|
+
private readonly listEdges = new plugins.deesCatalog.ScrollEdgeShadowController(this,
|
|
109
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.list'));
|
|
110
|
+
private readonly detailEdges = new plugins.deesCatalog.ScrollEdgeShadowController(this,
|
|
111
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.detailBody'));
|
|
105
112
|
|
|
106
113
|
public static styles = [
|
|
107
114
|
plugins.deesElement.cssManager.defaultStyles,
|
|
108
115
|
plugins.deesCatalog.themeDefaultStyles,
|
|
116
|
+
plugins.deesCatalog.scrollEdgeFadeStyles,
|
|
109
117
|
css`
|
|
110
|
-
|
|
118
|
+
/* The view itself never scrolls: the list and the detail's body are the two scrollers, each with its own edge fade. */
|
|
119
|
+
:host { display: block; height: 100%; min-height: 0; overflow: hidden; container-type: inline-size; }
|
|
111
120
|
.page { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 16px; padding: 20px; max-width: 1400px; margin: 0 auto;
|
|
112
|
-
|
|
121
|
+
height: 100%; box-sizing: border-box; }
|
|
113
122
|
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
|
|
114
123
|
h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--dees-color-text-primary); }
|
|
115
124
|
.subtitle { margin: 4px 0 0; font-size: 13px; color: var(--dees-color-text-secondary); }
|
|
@@ -117,8 +126,11 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
117
126
|
.search { width: 240px; }
|
|
118
127
|
.notes:empty { display: none; }
|
|
119
128
|
.notes { display: grid; gap: 8px; }
|
|
120
|
-
.split { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
|
|
121
|
-
|
|
129
|
+
.split { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 16px;
|
|
130
|
+
align-items: start; min-height: 0; }
|
|
131
|
+
/* The padding keeps a row's focus ring inside the scroller, which clips what leaves it. */
|
|
132
|
+
.list { display: grid; gap: 6px; align-content: start; max-height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
|
|
133
|
+
padding: 3px; margin: -3px; }
|
|
122
134
|
.row { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px; text-align: left; font: inherit;
|
|
123
135
|
color: var(--dees-color-text-primary); background: var(--dees-color-bg-secondary); border: 1px solid var(--dees-color-border-subtle);
|
|
124
136
|
border-radius: 10px; cursor: pointer; }
|
|
@@ -141,14 +153,16 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
141
153
|
.title { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
|
|
142
154
|
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--dees-color-text-secondary);
|
|
143
155
|
overflow-wrap: anywhere; }
|
|
144
|
-
.detail { display:
|
|
156
|
+
.detail { display: flex; flex-direction: column; max-height: 100%; min-height: 0; box-sizing: border-box; min-width: 0; background: var(--dees-color-bg-secondary); border: 1px solid var(--dees-color-border-subtle);
|
|
145
157
|
border-radius: 12px; overflow: hidden; }
|
|
158
|
+
.detailHead, .detailFoot { flex: none; }
|
|
146
159
|
.detailHead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px;
|
|
147
160
|
border-bottom: 1px solid var(--dees-color-border-subtle); }
|
|
148
161
|
.detailWhat { flex: 1; min-width: 0; display: grid; gap: 2px; }
|
|
149
162
|
.detailKind { margin: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
|
|
150
163
|
.detailMeta { margin: 0; font-size: 12px; color: var(--dees-color-text-secondary); }
|
|
151
|
-
.detailBody { display: grid; gap: 14px; padding: 16px; min-width: 0;
|
|
164
|
+
.detailBody { display: grid; gap: 14px; align-content: start; padding: 16px; min-width: 0; flex: 0 1 auto; min-height: 0; overflow-y: auto;
|
|
165
|
+
overscroll-behavior: contain; }
|
|
152
166
|
.detailTitle { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
|
|
153
167
|
.line { margin: 0; padding: 10px 12px; border-left: 3px solid var(--dees-color-accent-warning); background: var(--dees-color-fill-tertiary);
|
|
154
168
|
border-radius: 6px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
@@ -160,7 +174,14 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
160
174
|
.nothingShown { margin: 0; padding: 12px; font-size: 13px; color: var(--dees-color-text-secondary); }
|
|
161
175
|
.emptyCard { align-self: start; padding: 40px 24px; background: var(--dees-color-bg-secondary);
|
|
162
176
|
border: 1px solid var(--dees-color-border-subtle); border-radius: 12px; }
|
|
163
|
-
|
|
177
|
+
/* One column, by the view's own width (a sidebar may stand beside it): the list keeps at most two fifths of the
|
|
178
|
+
height above the detail, and both still scroll on their own. */
|
|
179
|
+
@container (max-width: 900px) {
|
|
180
|
+
.split { display: flex; flex-direction: column; align-items: stretch; }
|
|
181
|
+
.list { flex: 0 1 auto; max-height: 40%; }
|
|
182
|
+
.detail { flex: 0 1 auto; max-height: none; }
|
|
183
|
+
.search { width: 100%; }
|
|
184
|
+
}
|
|
164
185
|
@media (max-width: 600px) { .page { padding: 12px; gap: 12px; } h2 { font-size: 19px; } }
|
|
165
186
|
`,
|
|
166
187
|
];
|
|
@@ -171,6 +192,26 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
171
192
|
this.ageTimer ??= setInterval(() => { this.now = Date.now(); }, 30_000);
|
|
172
193
|
}
|
|
173
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Another item took the detail: its body starts at its top, and the item's row is brought into the list's view. Only
|
|
197
|
+
* the list is moved, never by `scrollIntoView`, which would also scroll the view's own clipped box.
|
|
198
|
+
*/
|
|
199
|
+
protected updated(changedArg: Map<PropertyKey, unknown>): void {
|
|
200
|
+
super.updated(changedArg);
|
|
201
|
+
const shownId = this.shadowRoot?.querySelector<HTMLElement>('.detail')?.dataset.detail ?? '';
|
|
202
|
+
if (shownId === this.detailShownId) return;
|
|
203
|
+
this.detailShownId = shownId;
|
|
204
|
+
const body = this.shadowRoot?.querySelector<HTMLElement>('.detailBody');
|
|
205
|
+
if (body) body.scrollTop = 0;
|
|
206
|
+
const list = this.shadowRoot?.querySelector<HTMLElement>('.list');
|
|
207
|
+
const row = list?.querySelector<HTMLElement>('.row.selected');
|
|
208
|
+
if (!list || !row) return;
|
|
209
|
+
const listBox = list.getBoundingClientRect();
|
|
210
|
+
const rowBox = row.getBoundingClientRect();
|
|
211
|
+
if (rowBox.top < listBox.top) list.scrollTop -= listBox.top - rowBox.top + 3;
|
|
212
|
+
else if (rowBox.bottom > listBox.bottom) list.scrollTop += rowBox.bottom - listBox.bottom + 3;
|
|
213
|
+
}
|
|
214
|
+
|
|
174
215
|
public async disconnectedCallback(): Promise<void> {
|
|
175
216
|
this.unsubscribe?.();
|
|
176
217
|
this.unsubscribe = undefined;
|
|
@@ -284,7 +325,7 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
284
325
|
const item = this.shownItem();
|
|
285
326
|
return html`
|
|
286
327
|
<div class="split">
|
|
287
|
-
<div class
|
|
328
|
+
<div class=${`list ${this.listEdges.fadeClasses()}`} role="list" aria-label="What waits for you">
|
|
288
329
|
${shown.length === 0 ? html`<p class="nothingShown">Nothing that waits matches.</p>` : shown.map((itemArg) => this.renderRow(itemArg, itemArg.id === item?.id))}
|
|
289
330
|
</div>
|
|
290
331
|
${item ? this.renderDetail(item) : ''}
|
|
@@ -336,7 +377,7 @@ export class AglInbox extends plugins.deesElement.DeesElement {
|
|
|
336
377
|
${inboxOpenLabel(itemArg)} <dees-icon icon="lucide:ExternalLink" iconSize="13"></dees-icon>
|
|
337
378
|
</dees-button>`}
|
|
338
379
|
</header>
|
|
339
|
-
<div class
|
|
380
|
+
<div class=${`detailBody ${this.detailEdges.fadeClasses()}`}>
|
|
340
381
|
${this.cardShowsTitle(itemArg) ? '' : html`<h3 class="detailTitle">${itemArg.title}</h3>`}
|
|
341
382
|
${this.renderBody(itemArg, state)}
|
|
342
383
|
</div>
|