agent-yes 1.244.1 → 1.244.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SUPPORTED_CLIS-Wwfy5Zi7.js → SUPPORTED_CLIS-76JVIvo2.js} +2 -2
- package/dist/{SUPPORTED_CLIS-DVljSgbA.js → SUPPORTED_CLIS-wtZAWIqV.js} +3 -3
- package/dist/{agentShare-D0mAGl5G.js → agentShare-BokFN5yh.js} +2 -2
- package/dist/{browser-BVW3dnwm.js → browser-CNdIibfn.js} +15 -3
- package/dist/{callback-D_uvz3mE.js → callback-CfpP3G3E.js} +3 -3
- package/dist/{callback-DRUl6-NH.js → callback-CvbnQmfJ.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-Cm_HkThF.js → notifyDaemon-2Wt04RUC.js} +2 -2
- package/dist/{rustBinary-BuRzWpGc.js → rustBinary-CK3EucYy.js} +2 -2
- package/dist/{schedule-B31bZTfW.js → schedule-D_gxvnkf.js} +4 -4
- package/dist/{serve-DP1T87y-.js → serve-CeFGSWkZ.js} +13 -13
- package/dist/{setup-8XxhNtNN.js → setup-BMZ5CUKG.js} +2 -2
- package/dist/{subcommands-Di4KtqM3.js → subcommands-CPRjp_FY.js} +1 -1
- package/dist/{subcommands-CvldqapF.js → subcommands-DHzOWlWy.js} +11 -11
- package/dist/{terminal-DPCev0ga.js → terminal-DmqEOsjR.js} +2 -2
- package/dist/terminal.js +1 -1
- package/dist/{ts-BCbfeJyl.js → ts-DE2iV6rV.js} +2 -2
- package/dist/{versionChecker-DZcfIJm8.js → versionChecker-Ba8m9VTm.js} +2 -2
- package/dist/{widget-CoIb-InF.js → widget-CtAC5BHV.js} +3 -3
- package/dist/widgets.js +1 -1
- package/dist/{ws-CKphbbLH.js → ws-CZEJdPBM.js} +2 -2
- package/package.json +4 -4
- package/ts/channels/hlc.spec.ts +56 -0
- package/ts/channels/link.spec.ts +72 -0
- package/ts/channels/op.spec.ts +78 -0
- package/ts/channels/store.browser.spec.ts +60 -0
- package/ts/channels/store.node.spec.ts +76 -0
- package/ts/channels/store.spec.ts +145 -0
- package/ts/channels/trust.spec.ts +86 -0
- package/ts/cli.ts +2 -3
- package/ts/cwdDeprecation.spec.ts +3 -1
- package/ts/serve.ts +22 -19
- package/ts/termToken.spec.ts +11 -3
- package/ts/terminal/browser.ts +32 -4
- package/ts/terminal.ts +3 -1
- package/ts/widget.ts +9 -3
package/ts/terminal/browser.ts
CHANGED
|
@@ -123,10 +123,24 @@ export class AyTerminal {
|
|
|
123
123
|
if (this.capHeartbeat || this.readOnly) return;
|
|
124
124
|
const g = globalThis as any;
|
|
125
125
|
this.capHeartbeat = (g.setInterval ?? setInterval)(() => {
|
|
126
|
-
if
|
|
126
|
+
// Self-validate each tick: if the panel is no longer showing its grid
|
|
127
|
+
// (minimized/collapsed/detached — via ANY path, not just the wired min button),
|
|
128
|
+
// withdraw instead of blindly renewing. Backstops a collapse that doesn't hit
|
|
129
|
+
// reflow (e.g. the host detached from the DOM, where ResizeObserver may not fire).
|
|
130
|
+
if (!this.lastCap || !this.isPanelVisible()) {
|
|
131
|
+
this.withdrawCap();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.sendCap(this.lastCap.cols, this.lastCap.rows);
|
|
127
135
|
}, 5000);
|
|
128
136
|
}
|
|
129
137
|
|
|
138
|
+
/** True while this widget's terminal grid is actually rendered (panel open & visible). */
|
|
139
|
+
private isPanelVisible(): boolean {
|
|
140
|
+
const el = this.term?.element as any; // the .xterm root
|
|
141
|
+
return !!(el && el.offsetWidth && el.offsetHeight);
|
|
142
|
+
}
|
|
143
|
+
|
|
130
144
|
/** Withdraw this widget's size cap (closed/minimized) → the daemon re-negotiates without it. */
|
|
131
145
|
private withdrawCap(): void {
|
|
132
146
|
if (this.capHeartbeat) {
|
|
@@ -292,7 +306,15 @@ export class AyTerminal {
|
|
|
292
306
|
// adds keystroke input (start(), /api/send), not a resize.
|
|
293
307
|
const reflow = () => {
|
|
294
308
|
const xt = inner.querySelector(".xterm") as any;
|
|
295
|
-
if (!xt || !xt.offsetWidth || !xt.offsetHeight)
|
|
309
|
+
if (!xt || !xt.offsetWidth || !xt.offsetHeight) {
|
|
310
|
+
// The panel just went invisible (minimized/collapsed/hidden — the wrap
|
|
311
|
+
// ResizeObserver fires this on collapse). Withdraw our cap so a hidden panel
|
|
312
|
+
// stops constraining the shared PTY, no matter WHICH gesture hid it (the wired
|
|
313
|
+
// min button, a page hiding the host, a max/min quirk). Guard on an active cap
|
|
314
|
+
// so transient 0-size layout ticks on mount don't spam the daemon.
|
|
315
|
+
if (!this.readOnly && (this.capHeartbeat || this.lastCap)) this.withdrawCap();
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
296
318
|
const s = Math.min(1, wrap.clientWidth / xt.offsetWidth, wrap.clientHeight / xt.offsetHeight);
|
|
297
319
|
inner.style.transform = `scale(${s})`;
|
|
298
320
|
// 3c: an interactive panel reports how many cols/rows it can show as a size
|
|
@@ -300,8 +322,14 @@ export class AyTerminal {
|
|
|
300
322
|
// widget renegotiates the shared PTY — through the daemon's min, bounded by the
|
|
301
323
|
// operator's local cap + floor, never a raw resize.
|
|
302
324
|
if (!this.readOnly && this.term?.cols) {
|
|
303
|
-
const capCols = Math.max(
|
|
304
|
-
|
|
325
|
+
const capCols = Math.max(
|
|
326
|
+
1,
|
|
327
|
+
Math.floor((wrap.clientWidth * this.term.cols) / xt.offsetWidth),
|
|
328
|
+
);
|
|
329
|
+
const capRows = Math.max(
|
|
330
|
+
1,
|
|
331
|
+
Math.floor((wrap.clientHeight * this.term.rows) / xt.offsetHeight),
|
|
332
|
+
);
|
|
305
333
|
this.reportCap(capCols, capRows);
|
|
306
334
|
}
|
|
307
335
|
};
|
package/ts/terminal.ts
CHANGED
|
@@ -178,7 +178,9 @@ async function cmdTermMint(args: string[]): Promise<number> {
|
|
|
178
178
|
});
|
|
179
179
|
const pid = positional[0];
|
|
180
180
|
if (!pid || positional.length > 1)
|
|
181
|
-
throw new Error(
|
|
181
|
+
throw new Error(
|
|
182
|
+
"usage: ay term mint <pid|keyword> [--ttl 15m] [--ro | --interactive] [--json]",
|
|
183
|
+
);
|
|
182
184
|
if (flags.ro && flags.interactive)
|
|
183
185
|
throw new Error("--ro and --interactive are mutually exclusive");
|
|
184
186
|
const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
|
package/ts/widget.ts
CHANGED
|
@@ -231,12 +231,18 @@ export async function cmdMint(args: string[]): Promise<number> {
|
|
|
231
231
|
});
|
|
232
232
|
const target = positional[0];
|
|
233
233
|
if (!target || positional.length > 1)
|
|
234
|
-
throw new Error(
|
|
234
|
+
throw new Error(
|
|
235
|
+
"usage: ay mint <pid|viewer|url|*> --caps tail,send,read,screenshot [--ttl 15m] [--json]",
|
|
236
|
+
);
|
|
235
237
|
if (typeof flags.caps !== "string")
|
|
236
238
|
throw new Error("--caps is required, e.g. --caps read or --caps tail,send");
|
|
237
|
-
const caps = flags.caps
|
|
239
|
+
const caps = flags.caps
|
|
240
|
+
.split(",")
|
|
241
|
+
.map((c) => c.trim())
|
|
242
|
+
.filter(Boolean);
|
|
238
243
|
const bad = caps.filter((c) => !KNOWN_CAPS.has(c));
|
|
239
|
-
if (bad.length)
|
|
244
|
+
if (bad.length)
|
|
245
|
+
throw new Error(`unknown cap(s): ${bad.join(", ")} (valid: ${[...KNOWN_CAPS].join(", ")})`);
|
|
240
246
|
const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
|
|
241
247
|
const { mintScopedTermToken } = await import("./serve.ts");
|
|
242
248
|
const r = await mintScopedTermToken(target, { ttlSec, caps });
|