@immediately-run/sdk 0.60.0 → 0.64.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/dist/agentChatClient.d.cts +1 -0
- package/dist/agentChatClient.d.ts +1 -0
- package/dist/agentLoop.cjs +7 -1
- package/dist/agentLoop.cjs.map +1 -1
- package/dist/agentLoop.d.cts +21 -0
- package/dist/agentLoop.d.ts +21 -0
- package/dist/agentLoop.js +7 -1
- package/dist/agentLoop.js.map +1 -1
- package/dist/agentPause.cjs +68 -0
- package/dist/agentPause.cjs.map +1 -0
- package/dist/agentPause.d.cts +37 -0
- package/dist/agentPause.d.ts +37 -0
- package/dist/agentPause.js +45 -0
- package/dist/agentPause.js.map +1 -0
- package/dist/anchorClick.cjs +40 -0
- package/dist/anchorClick.cjs.map +1 -0
- package/dist/anchorClick.d.cts +23 -0
- package/dist/anchorClick.d.ts +23 -0
- package/dist/anchorClick.js +16 -0
- package/dist/anchorClick.js.map +1 -0
- package/dist/components/Link.cjs +4 -11
- package/dist/components/Link.cjs.map +1 -1
- package/dist/components/Link.d.cts +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/Link.js +3 -10
- package/dist/components/Link.js.map +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/llm.cjs +17 -1
- package/dist/llm.cjs.map +1 -1
- package/dist/llm.d.cts +34 -15
- package/dist/llm.d.ts +34 -15
- package/dist/llm.js +17 -1
- package/dist/llm.js.map +1 -1
- package/dist/openRepository.cjs +44 -0
- package/dist/openRepository.cjs.map +1 -0
- package/dist/openRepository.d.cts +36 -0
- package/dist/openRepository.d.ts +36 -0
- package/dist/openRepository.js +21 -0
- package/dist/openRepository.js.map +1 -0
- package/dist/platformLink.cjs +18 -3
- package/dist/platformLink.cjs.map +1 -1
- package/dist/platformLink.d.cts +33 -10
- package/dist/platformLink.d.ts +33 -10
- package/dist/platformLink.js +18 -3
- package/dist/platformLink.js.map +1 -1
- package/dist/protocolSchemes.cjs +1 -0
- package/dist/protocolSchemes.cjs.map +1 -1
- package/dist/protocolSchemes.d.cts +1 -0
- package/dist/protocolSchemes.d.ts +1 -0
- package/dist/protocolSchemes.js +2 -0
- package/dist/protocolSchemes.js.map +1 -1
- package/dist/recents.cjs +9 -1
- package/dist/recents.cjs.map +1 -1
- package/dist/recents.d.cts +6 -0
- package/dist/recents.d.ts +6 -0
- package/dist/recents.js +9 -1
- package/dist/recents.js.map +1 -1
- package/dist/region.cjs +22 -2
- package/dist/region.cjs.map +1 -1
- package/dist/region.d.cts +20 -1
- package/dist/region.d.ts +20 -1
- package/dist/region.js +18 -1
- package/dist/region.js.map +1 -1
- package/dist/urlUtils.cjs.map +1 -1
- package/dist/urlUtils.d.cts +6 -2
- package/dist/urlUtils.d.ts +6 -2
- package/dist/urlUtils.js.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.cts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +7 -3
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var agentPause_exports = {};
|
|
20
|
+
__export(agentPause_exports, {
|
|
21
|
+
PauseController: () => PauseController
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(agentPause_exports);
|
|
24
|
+
class PauseController {
|
|
25
|
+
constructor() {
|
|
26
|
+
this.paused = false;
|
|
27
|
+
this.waiters = /* @__PURE__ */ new Set();
|
|
28
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
29
|
+
}
|
|
30
|
+
/** Set the pause state. Idempotent — setting the value it already holds does nothing. */
|
|
31
|
+
set(paused) {
|
|
32
|
+
if (this.paused === paused) return;
|
|
33
|
+
this.paused = paused;
|
|
34
|
+
if (!paused) {
|
|
35
|
+
const waiting = [...this.waiters];
|
|
36
|
+
this.waiters.clear();
|
|
37
|
+
for (const w of waiting) w();
|
|
38
|
+
}
|
|
39
|
+
for (const l of this.listeners) l(this.paused);
|
|
40
|
+
}
|
|
41
|
+
isPaused() {
|
|
42
|
+
return this.paused;
|
|
43
|
+
}
|
|
44
|
+
whenResumed(signal) {
|
|
45
|
+
if (!this.paused || signal?.aborted) return Promise.resolve();
|
|
46
|
+
return new Promise((resolve) => {
|
|
47
|
+
const done = () => {
|
|
48
|
+
this.waiters.delete(done);
|
|
49
|
+
signal?.removeEventListener("abort", done);
|
|
50
|
+
resolve();
|
|
51
|
+
};
|
|
52
|
+
this.waiters.add(done);
|
|
53
|
+
signal?.addEventListener("abort", done, { once: true });
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/** Subscribe to pause changes (a UI showing "paused — this view is hidden"). */
|
|
57
|
+
onChange(listener) {
|
|
58
|
+
this.listeners.add(listener);
|
|
59
|
+
return () => {
|
|
60
|
+
this.listeners.delete(listener);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
PauseController
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=agentPause.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/agentPause.ts"],"sourcesContent":["// Pause + resume for a run whose surface the user cannot see (R3-562;\n// AGENT_RUN_DURABILITY_SPEC §7 R-ARD-20a).\n//\n// WHY. The host now keeps a chrome region MOUNTED and merely hides it when the user\n// switches activity, so coming back does not reboot the app's iframe and destroy the\n// run (§7 R-ARD-20 — the T1 teardown). But hiding stops a frame PAINTING, not\n// executing, and a loop that keeps executing behind `display:none` + `inert` breaks a\n// requirement `LLM_AND_AGENTS_SPEC` §3.3 calls normative: the **loop observability\n// contract** wants a streaming transcript, a tool-call log rendered in order, a\n// reachable **stop button**, and every write visible at or before contribute. None of\n// that survives an inert subtree. It also contradicts R-ARD-15 one section earlier,\n// which forbids an agent writing files with no human present.\n//\n// So: kept-mounted, not kept-executing. The run pauses at its next turn boundary and\n// continues when the region is revealed. It costs nothing — the frame, the in-memory\n// loop state and the transcript all survive, so a reveal continues with zero waste, no\n// repair pass and no resume gate. The run is never torn down; it is only not advancing\n// while nobody can see or stop it.\n//\n// THE THREE VERBS ARE NOT THE SAME.\n// * STOP — `RunAgentOptions.signal`. Ends the run. The transcript so far is kept.\n// * STEER — `agentSteering.ts`. Ends the current TURN, injects a correction, CONTINUES.\n// * PAUSE — this controller. Ends nothing and injects nothing: the loop simply does\n// not start its next turn until the pause lifts. The user did not ask for\n// it and never sees it as an interruption — it is the host's fact about\n// whether anyone is watching, so it leaves no mark in the transcript.\n//\n// WHY IT NEVER INTERRUPTS A TURN. The loop checks this at the TOP of an iteration, after\n// the previous iteration's tool batch has appended every `tool_result`. Pausing anywhere\n// else could leave a `tool_use` block without its pair, and the next request would then be\n// malformed and rejected by the provider for the whole conversation — the same property\n// `agentSteering` states for an interrupt, and for the same reason.\n\n/** What the loop needs from a pause source (so it can be faked in tests). */\nexport interface PauseSource {\n /** Is the run currently not allowed to advance? Read at each turn boundary. */\n isPaused(): boolean;\n /**\n * Resolves when the pause lifts — or immediately if it is already lifted.\n *\n * `signal` is the RUN's stop signal, and passing it is not optional in practice: a run\n * stopped (or signed out) while its region is hidden would otherwise await a resume\n * that never comes, and the awaited promise would keep the whole loop — transcript,\n * tools, client — alive for the life of the tab. Resolving on abort hands control back\n * to the loop, which re-checks `signal.aborted` and breaks.\n */\n whenResumed(signal?: AbortSignal): Promise<void>;\n}\n\n/**\n * The live pause state. Owned by the app (which sets it from the host's\n * `onRegionVisibilityChange`) and read by the loop.\n *\n * Deliberately NOT wired to the visibility channel in here: the controller is the\n * mechanism and knows nothing about why a run is paused, which keeps it usable for a\n * second reason later (a phone backgrounding, a user \"hold\" button) without this file\n * having an opinion about which reasons exist.\n */\nexport class PauseController implements PauseSource {\n private paused = false;\n private waiters = new Set<() => void>();\n private listeners = new Set<(paused: boolean) => void>();\n\n /** Set the pause state. Idempotent — setting the value it already holds does nothing. */\n set(paused: boolean): void {\n if (this.paused === paused) return;\n this.paused = paused;\n if (!paused) {\n // Copy before draining: a waiter's continuation may synchronously pause again,\n // and iterating the live set while it is being added to is how that turns into a\n // lost or double-fired wake.\n const waiting = [...this.waiters];\n this.waiters.clear();\n for (const w of waiting) w();\n }\n for (const l of this.listeners) l(this.paused);\n }\n\n isPaused(): boolean {\n return this.paused;\n }\n\n whenResumed(signal?: AbortSignal): Promise<void> {\n if (!this.paused || signal?.aborted) return Promise.resolve();\n return new Promise<void>((resolve) => {\n const done = (): void => {\n this.waiters.delete(done);\n signal?.removeEventListener('abort', done);\n resolve();\n };\n this.waiters.add(done);\n signal?.addEventListener('abort', done, { once: true });\n });\n }\n\n /** Subscribe to pause changes (a UI showing \"paused — this view is hidden\"). */\n onChange(listener: (paused: boolean) => void): () => void {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0DO,MAAM,gBAAuC;AAAA,EAA7C;AACL,SAAQ,SAAS;AACjB,SAAQ,UAAU,oBAAI,IAAgB;AACtC,SAAQ,YAAY,oBAAI,IAA+B;AAAA;AAAA;AAAA,EAGvD,IAAI,QAAuB;AACzB,QAAI,KAAK,WAAW,OAAQ;AAC5B,SAAK,SAAS;AACd,QAAI,CAAC,QAAQ;AAIX,YAAM,UAAU,CAAC,GAAG,KAAK,OAAO;AAChC,WAAK,QAAQ,MAAM;AACnB,iBAAW,KAAK,QAAS,GAAE;AAAA,IAC7B;AACA,eAAW,KAAK,KAAK,UAAW,GAAE,KAAK,MAAM;AAAA,EAC/C;AAAA,EAEA,WAAoB;AAClB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,YAAY,QAAqC;AAC/C,QAAI,CAAC,KAAK,UAAU,QAAQ,QAAS,QAAO,QAAQ,QAAQ;AAC5D,WAAO,IAAI,QAAc,CAAC,YAAY;AACpC,YAAM,OAAO,MAAY;AACvB,aAAK,QAAQ,OAAO,IAAI;AACxB,gBAAQ,oBAAoB,SAAS,IAAI;AACzC,gBAAQ;AAAA,MACV;AACA,WAAK,QAAQ,IAAI,IAAI;AACrB,cAAQ,iBAAiB,SAAS,MAAM,EAAE,MAAM,KAAK,CAAC;AAAA,IACxD,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,SAAS,UAAiD;AACxD,SAAK,UAAU,IAAI,QAAQ;AAC3B,WAAO,MAAM;AACX,WAAK,UAAU,OAAO,QAAQ;AAAA,IAChC;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** What the loop needs from a pause source (so it can be faked in tests). */
|
|
2
|
+
interface PauseSource {
|
|
3
|
+
/** Is the run currently not allowed to advance? Read at each turn boundary. */
|
|
4
|
+
isPaused(): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Resolves when the pause lifts — or immediately if it is already lifted.
|
|
7
|
+
*
|
|
8
|
+
* `signal` is the RUN's stop signal, and passing it is not optional in practice: a run
|
|
9
|
+
* stopped (or signed out) while its region is hidden would otherwise await a resume
|
|
10
|
+
* that never comes, and the awaited promise would keep the whole loop — transcript,
|
|
11
|
+
* tools, client — alive for the life of the tab. Resolving on abort hands control back
|
|
12
|
+
* to the loop, which re-checks `signal.aborted` and breaks.
|
|
13
|
+
*/
|
|
14
|
+
whenResumed(signal?: AbortSignal): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The live pause state. Owned by the app (which sets it from the host's
|
|
18
|
+
* `onRegionVisibilityChange`) and read by the loop.
|
|
19
|
+
*
|
|
20
|
+
* Deliberately NOT wired to the visibility channel in here: the controller is the
|
|
21
|
+
* mechanism and knows nothing about why a run is paused, which keeps it usable for a
|
|
22
|
+
* second reason later (a phone backgrounding, a user "hold" button) without this file
|
|
23
|
+
* having an opinion about which reasons exist.
|
|
24
|
+
*/
|
|
25
|
+
declare class PauseController implements PauseSource {
|
|
26
|
+
private paused;
|
|
27
|
+
private waiters;
|
|
28
|
+
private listeners;
|
|
29
|
+
/** Set the pause state. Idempotent — setting the value it already holds does nothing. */
|
|
30
|
+
set(paused: boolean): void;
|
|
31
|
+
isPaused(): boolean;
|
|
32
|
+
whenResumed(signal?: AbortSignal): Promise<void>;
|
|
33
|
+
/** Subscribe to pause changes (a UI showing "paused — this view is hidden"). */
|
|
34
|
+
onChange(listener: (paused: boolean) => void): () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { PauseController, type PauseSource };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** What the loop needs from a pause source (so it can be faked in tests). */
|
|
2
|
+
interface PauseSource {
|
|
3
|
+
/** Is the run currently not allowed to advance? Read at each turn boundary. */
|
|
4
|
+
isPaused(): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Resolves when the pause lifts — or immediately if it is already lifted.
|
|
7
|
+
*
|
|
8
|
+
* `signal` is the RUN's stop signal, and passing it is not optional in practice: a run
|
|
9
|
+
* stopped (or signed out) while its region is hidden would otherwise await a resume
|
|
10
|
+
* that never comes, and the awaited promise would keep the whole loop — transcript,
|
|
11
|
+
* tools, client — alive for the life of the tab. Resolving on abort hands control back
|
|
12
|
+
* to the loop, which re-checks `signal.aborted` and breaks.
|
|
13
|
+
*/
|
|
14
|
+
whenResumed(signal?: AbortSignal): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The live pause state. Owned by the app (which sets it from the host's
|
|
18
|
+
* `onRegionVisibilityChange`) and read by the loop.
|
|
19
|
+
*
|
|
20
|
+
* Deliberately NOT wired to the visibility channel in here: the controller is the
|
|
21
|
+
* mechanism and knows nothing about why a run is paused, which keeps it usable for a
|
|
22
|
+
* second reason later (a phone backgrounding, a user "hold" button) without this file
|
|
23
|
+
* having an opinion about which reasons exist.
|
|
24
|
+
*/
|
|
25
|
+
declare class PauseController implements PauseSource {
|
|
26
|
+
private paused;
|
|
27
|
+
private waiters;
|
|
28
|
+
private listeners;
|
|
29
|
+
/** Set the pause state. Idempotent — setting the value it already holds does nothing. */
|
|
30
|
+
set(paused: boolean): void;
|
|
31
|
+
isPaused(): boolean;
|
|
32
|
+
whenResumed(signal?: AbortSignal): Promise<void>;
|
|
33
|
+
/** Subscribe to pause changes (a UI showing "paused — this view is hidden"). */
|
|
34
|
+
onChange(listener: (paused: boolean) => void): () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { PauseController, type PauseSource };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "./chunk-VHAA22YE.js";
|
|
2
|
+
class PauseController {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.paused = false;
|
|
5
|
+
this.waiters = /* @__PURE__ */ new Set();
|
|
6
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
7
|
+
}
|
|
8
|
+
/** Set the pause state. Idempotent — setting the value it already holds does nothing. */
|
|
9
|
+
set(paused) {
|
|
10
|
+
if (this.paused === paused) return;
|
|
11
|
+
this.paused = paused;
|
|
12
|
+
if (!paused) {
|
|
13
|
+
const waiting = [...this.waiters];
|
|
14
|
+
this.waiters.clear();
|
|
15
|
+
for (const w of waiting) w();
|
|
16
|
+
}
|
|
17
|
+
for (const l of this.listeners) l(this.paused);
|
|
18
|
+
}
|
|
19
|
+
isPaused() {
|
|
20
|
+
return this.paused;
|
|
21
|
+
}
|
|
22
|
+
whenResumed(signal) {
|
|
23
|
+
if (!this.paused || signal?.aborted) return Promise.resolve();
|
|
24
|
+
return new Promise((resolve) => {
|
|
25
|
+
const done = () => {
|
|
26
|
+
this.waiters.delete(done);
|
|
27
|
+
signal?.removeEventListener("abort", done);
|
|
28
|
+
resolve();
|
|
29
|
+
};
|
|
30
|
+
this.waiters.add(done);
|
|
31
|
+
signal?.addEventListener("abort", done, { once: true });
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** Subscribe to pause changes (a UI showing "paused — this view is hidden"). */
|
|
35
|
+
onChange(listener) {
|
|
36
|
+
this.listeners.add(listener);
|
|
37
|
+
return () => {
|
|
38
|
+
this.listeners.delete(listener);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
PauseController
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=agentPause.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/agentPause.ts"],"sourcesContent":["// Pause + resume for a run whose surface the user cannot see (R3-562;\n// AGENT_RUN_DURABILITY_SPEC §7 R-ARD-20a).\n//\n// WHY. The host now keeps a chrome region MOUNTED and merely hides it when the user\n// switches activity, so coming back does not reboot the app's iframe and destroy the\n// run (§7 R-ARD-20 — the T1 teardown). But hiding stops a frame PAINTING, not\n// executing, and a loop that keeps executing behind `display:none` + `inert` breaks a\n// requirement `LLM_AND_AGENTS_SPEC` §3.3 calls normative: the **loop observability\n// contract** wants a streaming transcript, a tool-call log rendered in order, a\n// reachable **stop button**, and every write visible at or before contribute. None of\n// that survives an inert subtree. It also contradicts R-ARD-15 one section earlier,\n// which forbids an agent writing files with no human present.\n//\n// So: kept-mounted, not kept-executing. The run pauses at its next turn boundary and\n// continues when the region is revealed. It costs nothing — the frame, the in-memory\n// loop state and the transcript all survive, so a reveal continues with zero waste, no\n// repair pass and no resume gate. The run is never torn down; it is only not advancing\n// while nobody can see or stop it.\n//\n// THE THREE VERBS ARE NOT THE SAME.\n// * STOP — `RunAgentOptions.signal`. Ends the run. The transcript so far is kept.\n// * STEER — `agentSteering.ts`. Ends the current TURN, injects a correction, CONTINUES.\n// * PAUSE — this controller. Ends nothing and injects nothing: the loop simply does\n// not start its next turn until the pause lifts. The user did not ask for\n// it and never sees it as an interruption — it is the host's fact about\n// whether anyone is watching, so it leaves no mark in the transcript.\n//\n// WHY IT NEVER INTERRUPTS A TURN. The loop checks this at the TOP of an iteration, after\n// the previous iteration's tool batch has appended every `tool_result`. Pausing anywhere\n// else could leave a `tool_use` block without its pair, and the next request would then be\n// malformed and rejected by the provider for the whole conversation — the same property\n// `agentSteering` states for an interrupt, and for the same reason.\n\n/** What the loop needs from a pause source (so it can be faked in tests). */\nexport interface PauseSource {\n /** Is the run currently not allowed to advance? Read at each turn boundary. */\n isPaused(): boolean;\n /**\n * Resolves when the pause lifts — or immediately if it is already lifted.\n *\n * `signal` is the RUN's stop signal, and passing it is not optional in practice: a run\n * stopped (or signed out) while its region is hidden would otherwise await a resume\n * that never comes, and the awaited promise would keep the whole loop — transcript,\n * tools, client — alive for the life of the tab. Resolving on abort hands control back\n * to the loop, which re-checks `signal.aborted` and breaks.\n */\n whenResumed(signal?: AbortSignal): Promise<void>;\n}\n\n/**\n * The live pause state. Owned by the app (which sets it from the host's\n * `onRegionVisibilityChange`) and read by the loop.\n *\n * Deliberately NOT wired to the visibility channel in here: the controller is the\n * mechanism and knows nothing about why a run is paused, which keeps it usable for a\n * second reason later (a phone backgrounding, a user \"hold\" button) without this file\n * having an opinion about which reasons exist.\n */\nexport class PauseController implements PauseSource {\n private paused = false;\n private waiters = new Set<() => void>();\n private listeners = new Set<(paused: boolean) => void>();\n\n /** Set the pause state. Idempotent — setting the value it already holds does nothing. */\n set(paused: boolean): void {\n if (this.paused === paused) return;\n this.paused = paused;\n if (!paused) {\n // Copy before draining: a waiter's continuation may synchronously pause again,\n // and iterating the live set while it is being added to is how that turns into a\n // lost or double-fired wake.\n const waiting = [...this.waiters];\n this.waiters.clear();\n for (const w of waiting) w();\n }\n for (const l of this.listeners) l(this.paused);\n }\n\n isPaused(): boolean {\n return this.paused;\n }\n\n whenResumed(signal?: AbortSignal): Promise<void> {\n if (!this.paused || signal?.aborted) return Promise.resolve();\n return new Promise<void>((resolve) => {\n const done = (): void => {\n this.waiters.delete(done);\n signal?.removeEventListener('abort', done);\n resolve();\n };\n this.waiters.add(done);\n signal?.addEventListener('abort', done, { once: true });\n });\n }\n\n /** Subscribe to pause changes (a UI showing \"paused — this view is hidden\"). */\n onChange(listener: (paused: boolean) => void): () => void {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n }\n}\n"],"mappings":";AA0DO,MAAM,gBAAuC;AAAA,EAA7C;AACL,SAAQ,SAAS;AACjB,SAAQ,UAAU,oBAAI,IAAgB;AACtC,SAAQ,YAAY,oBAAI,IAA+B;AAAA;AAAA;AAAA,EAGvD,IAAI,QAAuB;AACzB,QAAI,KAAK,WAAW,OAAQ;AAC5B,SAAK,SAAS;AACd,QAAI,CAAC,QAAQ;AAIX,YAAM,UAAU,CAAC,GAAG,KAAK,OAAO;AAChC,WAAK,QAAQ,MAAM;AACnB,iBAAW,KAAK,QAAS,GAAE;AAAA,IAC7B;AACA,eAAW,KAAK,KAAK,UAAW,GAAE,KAAK,MAAM;AAAA,EAC/C;AAAA,EAEA,WAAoB;AAClB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,YAAY,QAAqC;AAC/C,QAAI,CAAC,KAAK,UAAU,QAAQ,QAAS,QAAO,QAAQ,QAAQ;AAC5D,WAAO,IAAI,QAAc,CAAC,YAAY;AACpC,YAAM,OAAO,MAAY;AACvB,aAAK,QAAQ,OAAO,IAAI;AACxB,gBAAQ,oBAAoB,SAAS,IAAI;AACzC,gBAAQ;AAAA,MACV;AACA,WAAK,QAAQ,IAAI,IAAI;AACrB,cAAQ,iBAAiB,SAAS,MAAM,EAAE,MAAM,KAAK,CAAC;AAAA,IACxD,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,SAAS,UAAiD;AACxD,SAAK,UAAU,IAAI,QAAQ;AAC3B,WAAO,MAAM;AACX,WAAK,UAAU,OAAO,QAAQ;AAAA,IAChC;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var anchorClick_exports = {};
|
|
20
|
+
__export(anchorClick_exports, {
|
|
21
|
+
isBrowserGestureClick: () => isBrowserGestureClick,
|
|
22
|
+
useComposedAnchorClick: () => useComposedAnchorClick
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(anchorClick_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
const isBrowserGestureClick = (event) => event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0;
|
|
27
|
+
const useComposedAnchorClick = (onClick, intercept, interceptDeps) => (0, import_react.useCallback)(
|
|
28
|
+
(e) => {
|
|
29
|
+
onClick?.(e);
|
|
30
|
+
if (e.defaultPrevented) return;
|
|
31
|
+
intercept(e);
|
|
32
|
+
},
|
|
33
|
+
[onClick, ...interceptDeps]
|
|
34
|
+
);
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
isBrowserGestureClick,
|
|
38
|
+
useComposedAnchorClick
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=anchorClick.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/anchorClick.ts"],"sourcesContent":["// The click contract the link primitives share (`components/Link.tsx`, `platformLink.tsx`).\n//\n// Both spelled this out inline until it became one named contract, which is how they\n// drifted apart once already; R3-568 added a third spelling in `PlatformLink` and drifted\n// again (it ignored a caller-supplied `target`), so the contract and its guard now live in\n// one module that every primitive imports.\nimport { useCallback } from 'react';\nimport type { DependencyList, MouseEvent, MouseEventHandler } from 'react';\n\n/**\n * True when the click is the browser's to handle, not ours: a modified click or a\n * non-primary button means \"open this somewhere else\", and the sandbox permits that\n * (`allow-popups`) even where it forbids moving the top-level window.\n *\n * Intercepting these would take away open-in-new-tab, which is one of the two things\n * (with copy-link) that make an `href` worth rendering at all.\n */\nexport const isBrowserGestureClick = (event: MouseEvent<HTMLAnchorElement>): boolean =>\n event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0;\n\n/**\n * Compose a consumer-supplied `onClick` with an interception: the consumer handler runs\n * FIRST, and calling `preventDefault()` in it opts the click out of the interception\n * entirely; otherwise `intercept` runs.\n *\n * `intercept` is re-created on every render, so it is deliberately NOT a dependency:\n * `interceptDeps` names the values it closes over, and the memo is invalidated exactly when\n * those change.\n */\nexport const useComposedAnchorClick = (\n onClick: MouseEventHandler<HTMLAnchorElement> | undefined,\n intercept: (e: MouseEvent<HTMLAnchorElement>) => void,\n interceptDeps: DependencyList,\n): MouseEventHandler<HTMLAnchorElement> =>\n useCallback(\n (e: MouseEvent<HTMLAnchorElement>) => {\n onClick?.(e);\n if (e.defaultPrevented) return;\n intercept(e);\n },\n [onClick, ...interceptDeps],\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,mBAA4B;AAWrB,MAAM,wBAAwB,CAAC,UACpC,MAAM,WAAW,MAAM,WAAW,MAAM,YAAY,MAAM,UAAU,MAAM,WAAW;AAWhF,MAAM,yBAAyB,CACpC,SACA,WACA,sBAEA;AAAA,EACE,CAAC,MAAqC;AACpC,cAAU,CAAC;AACX,QAAI,EAAE,iBAAkB;AACxB,cAAU,CAAC;AAAA,EACb;AAAA,EACA,CAAC,SAAS,GAAG,aAAa;AAC5B;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MouseEvent, MouseEventHandler, DependencyList } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* True when the click is the browser's to handle, not ours: a modified click or a
|
|
5
|
+
* non-primary button means "open this somewhere else", and the sandbox permits that
|
|
6
|
+
* (`allow-popups`) even where it forbids moving the top-level window.
|
|
7
|
+
*
|
|
8
|
+
* Intercepting these would take away open-in-new-tab, which is one of the two things
|
|
9
|
+
* (with copy-link) that make an `href` worth rendering at all.
|
|
10
|
+
*/
|
|
11
|
+
declare const isBrowserGestureClick: (event: MouseEvent<HTMLAnchorElement>) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Compose a consumer-supplied `onClick` with an interception: the consumer handler runs
|
|
14
|
+
* FIRST, and calling `preventDefault()` in it opts the click out of the interception
|
|
15
|
+
* entirely; otherwise `intercept` runs.
|
|
16
|
+
*
|
|
17
|
+
* `intercept` is re-created on every render, so it is deliberately NOT a dependency:
|
|
18
|
+
* `interceptDeps` names the values it closes over, and the memo is invalidated exactly when
|
|
19
|
+
* those change.
|
|
20
|
+
*/
|
|
21
|
+
declare const useComposedAnchorClick: (onClick: MouseEventHandler<HTMLAnchorElement> | undefined, intercept: (e: MouseEvent<HTMLAnchorElement>) => void, interceptDeps: DependencyList) => MouseEventHandler<HTMLAnchorElement>;
|
|
22
|
+
|
|
23
|
+
export { isBrowserGestureClick, useComposedAnchorClick };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MouseEvent, MouseEventHandler, DependencyList } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* True when the click is the browser's to handle, not ours: a modified click or a
|
|
5
|
+
* non-primary button means "open this somewhere else", and the sandbox permits that
|
|
6
|
+
* (`allow-popups`) even where it forbids moving the top-level window.
|
|
7
|
+
*
|
|
8
|
+
* Intercepting these would take away open-in-new-tab, which is one of the two things
|
|
9
|
+
* (with copy-link) that make an `href` worth rendering at all.
|
|
10
|
+
*/
|
|
11
|
+
declare const isBrowserGestureClick: (event: MouseEvent<HTMLAnchorElement>) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Compose a consumer-supplied `onClick` with an interception: the consumer handler runs
|
|
14
|
+
* FIRST, and calling `preventDefault()` in it opts the click out of the interception
|
|
15
|
+
* entirely; otherwise `intercept` runs.
|
|
16
|
+
*
|
|
17
|
+
* `intercept` is re-created on every render, so it is deliberately NOT a dependency:
|
|
18
|
+
* `interceptDeps` names the values it closes over, and the memo is invalidated exactly when
|
|
19
|
+
* those change.
|
|
20
|
+
*/
|
|
21
|
+
declare const useComposedAnchorClick: (onClick: MouseEventHandler<HTMLAnchorElement> | undefined, intercept: (e: MouseEvent<HTMLAnchorElement>) => void, interceptDeps: DependencyList) => MouseEventHandler<HTMLAnchorElement>;
|
|
22
|
+
|
|
23
|
+
export { isBrowserGestureClick, useComposedAnchorClick };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./chunk-VHAA22YE.js";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
const isBrowserGestureClick = (event) => event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0;
|
|
4
|
+
const useComposedAnchorClick = (onClick, intercept, interceptDeps) => useCallback(
|
|
5
|
+
(e) => {
|
|
6
|
+
onClick?.(e);
|
|
7
|
+
if (e.defaultPrevented) return;
|
|
8
|
+
intercept(e);
|
|
9
|
+
},
|
|
10
|
+
[onClick, ...interceptDeps]
|
|
11
|
+
);
|
|
12
|
+
export {
|
|
13
|
+
isBrowserGestureClick,
|
|
14
|
+
useComposedAnchorClick
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=anchorClick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/anchorClick.ts"],"sourcesContent":["// The click contract the link primitives share (`components/Link.tsx`, `platformLink.tsx`).\n//\n// Both spelled this out inline until it became one named contract, which is how they\n// drifted apart once already; R3-568 added a third spelling in `PlatformLink` and drifted\n// again (it ignored a caller-supplied `target`), so the contract and its guard now live in\n// one module that every primitive imports.\nimport { useCallback } from 'react';\nimport type { DependencyList, MouseEvent, MouseEventHandler } from 'react';\n\n/**\n * True when the click is the browser's to handle, not ours: a modified click or a\n * non-primary button means \"open this somewhere else\", and the sandbox permits that\n * (`allow-popups`) even where it forbids moving the top-level window.\n *\n * Intercepting these would take away open-in-new-tab, which is one of the two things\n * (with copy-link) that make an `href` worth rendering at all.\n */\nexport const isBrowserGestureClick = (event: MouseEvent<HTMLAnchorElement>): boolean =>\n event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0;\n\n/**\n * Compose a consumer-supplied `onClick` with an interception: the consumer handler runs\n * FIRST, and calling `preventDefault()` in it opts the click out of the interception\n * entirely; otherwise `intercept` runs.\n *\n * `intercept` is re-created on every render, so it is deliberately NOT a dependency:\n * `interceptDeps` names the values it closes over, and the memo is invalidated exactly when\n * those change.\n */\nexport const useComposedAnchorClick = (\n onClick: MouseEventHandler<HTMLAnchorElement> | undefined,\n intercept: (e: MouseEvent<HTMLAnchorElement>) => void,\n interceptDeps: DependencyList,\n): MouseEventHandler<HTMLAnchorElement> =>\n useCallback(\n (e: MouseEvent<HTMLAnchorElement>) => {\n onClick?.(e);\n if (e.defaultPrevented) return;\n intercept(e);\n },\n [onClick, ...interceptDeps],\n );\n"],"mappings":";AAMA,SAAS,mBAAmB;AAWrB,MAAM,wBAAwB,CAAC,UACpC,MAAM,WAAW,MAAM,WAAW,MAAM,YAAY,MAAM,UAAU,MAAM,WAAW;AAWhF,MAAM,yBAAyB,CACpC,SACA,WACA,kBAEA;AAAA,EACE,CAAC,MAAqC;AACpC,cAAU,CAAC;AACX,QAAI,EAAE,iBAAkB;AACxB,cAAU,CAAC;AAAA,EACb;AAAA,EACA,CAAC,SAAS,GAAG,aAAa;AAC5B;","names":[]}
|
package/dist/components/Link.cjs
CHANGED
|
@@ -25,25 +25,18 @@ __export(Link_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(Link_exports);
|
|
26
26
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
27
|
var import_react = require("react");
|
|
28
|
+
var import_anchorClick = require("../anchorClick");
|
|
28
29
|
var import_routing = require("../routing");
|
|
29
30
|
var import_scrollToId = require("../scrollToId");
|
|
30
31
|
var import_TinkerableContext = require("../TinkerableContext");
|
|
31
32
|
var import_urlUtils = require("../urlUtils");
|
|
32
|
-
const useComposedAnchorClick = (onClick, intercept, interceptDeps) => (0, import_react.useCallback)(
|
|
33
|
-
(e) => {
|
|
34
|
-
onClick?.(e);
|
|
35
|
-
if (e.defaultPrevented) return;
|
|
36
|
-
intercept(e);
|
|
37
|
-
},
|
|
38
|
-
[onClick, ...interceptDeps]
|
|
39
|
-
);
|
|
40
33
|
const FragmentLink = ({
|
|
41
34
|
href,
|
|
42
35
|
children,
|
|
43
36
|
onClick,
|
|
44
37
|
...props
|
|
45
38
|
}) => {
|
|
46
|
-
const clickHandler = useComposedAnchorClick(
|
|
39
|
+
const clickHandler = (0, import_anchorClick.useComposedAnchorClick)(
|
|
47
40
|
onClick,
|
|
48
41
|
(e) => {
|
|
49
42
|
if (href && href.startsWith("#")) {
|
|
@@ -62,11 +55,11 @@ const InternalLink = ({
|
|
|
62
55
|
target,
|
|
63
56
|
...props
|
|
64
57
|
}) => {
|
|
65
|
-
const clickHandler = useComposedAnchorClick(
|
|
58
|
+
const clickHandler = (0, import_anchorClick.useComposedAnchorClick)(
|
|
66
59
|
onClick,
|
|
67
60
|
(e) => {
|
|
68
61
|
if (!href) return;
|
|
69
|
-
if (
|
|
62
|
+
if ((0, import_anchorClick.isBrowserGestureClick)(e)) return;
|
|
70
63
|
if (target && target !== "_self") return;
|
|
71
64
|
e.preventDefault();
|
|
72
65
|
(0, import_routing.navigate)(href);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Link.tsx"],"sourcesContent":["import { ReactNode, use,
|
|
1
|
+
{"version":3,"sources":["../../src/components/Link.tsx"],"sourcesContent":["import { ReactNode, use } from 'react';\nimport { isBrowserGestureClick, useComposedAnchorClick } from '../anchorClick';\nimport { navigate } from '../routing';\nimport { scrollToId } from '../scrollToId';\nimport { TinkerableContext } from '../TinkerableContext';\nimport { constructOuterUrl, isInternalHref } from '../urlUtils';\n\n/** A same-page anchor (`#frag`): scrolls the addressed section into view on click\n * **without a route change** (MARKDOWN_SYNTAX_SPEC §13.5). The default behavior of a\n * bare `#`-href is intercepted so the sandbox URL the host owns is never mutated\n * out from under it; a fragment that names nothing leaves the scroll position\n * untouched (a soft failure). */\nexport const FragmentLink = ({\n href,\n children,\n onClick,\n ...props\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const clickHandler = useComposedAnchorClick(\n onClick,\n (e) => {\n if (href && href.startsWith('#')) {\n e.preventDefault();\n scrollToId(href.slice(1));\n }\n },\n [href],\n );\n return (\n <a href={href} onClick={clickHandler} {...props}>\n {children}\n </a>\n );\n};\n\n/** An `<a>` that performs in-sandbox navigation on click (prevents the default\n * full-page load and routes via {@link navigate}).\n *\n * A consumer-supplied `onClick` is COMPOSED with the router interception, never\n * substituted for it (`useComposedAnchorClick`, `../anchorClick`): it runs first, and\n * calling `preventDefault()` opts out of routing. Regression guard: `...props`\n * used to spread AFTER `onClick={clickHandler}`, so a consumer `onClick` (e.g. a\n * drawer's close-on-navigate) silently REPLACED the interception — the default\n * anchor action then navigated the sandboxed iframe itself to the host URL,\n * reloading the whole app (and framing the host inside its own sandbox).\n *\n * Modifier/middle clicks and explicit non-self `target`s keep the browser\n * default: the rendered href is a real host URL, so open-in-new-tab works. */\nexport const InternalLink = ({\n href,\n children,\n onClick,\n target,\n ...props\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const clickHandler = useComposedAnchorClick(\n onClick,\n (e) => {\n if (!href) return;\n // Open-in-new-tab gestures (and an explicit target) are the browser's.\n if (isBrowserGestureClick(e)) return;\n if (target && target !== '_self') return;\n e.preventDefault();\n navigate(href);\n },\n [href, target],\n );\n // Spread FIRST so no forwarded prop can clobber the interception or the href.\n return (\n <a {...props} href={href} target={target} onClick={clickHandler}>\n {children}\n </a>\n );\n};\n\n/** A link that routes same-app hrefs through the sandbox router (as an\n * {@link InternalLink}) and renders external hrefs as a plain `<a>`. */\nexport const Link = ({\n href,\n children,\n ...properties\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const { outerHref, navigationState } = use(TinkerableContext);\n // A pure same-page fragment (`#sec-8-9`) scrolls in place — no route change (§13.5).\n if (href && href.startsWith('#')) {\n return (\n <FragmentLink href={href} {...properties}>\n {children}\n </FragmentLink>\n );\n }\n if (href && isInternalHref(outerHref, href, navigationState)) {\n const targetHref = constructOuterUrl(outerHref, href, navigationState);\n return (\n <InternalLink href={targetHref} {...properties}>\n {children}\n </InternalLink>\n );\n } else {\n // create a regular link to external resource\n return <a {...{ href, ...properties }}>{children}</a>;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BI;AA7BJ,mBAA+B;AAC/B,yBAA8D;AAC9D,qBAAyB;AACzB,wBAA2B;AAC3B,+BAAkC;AAClC,sBAAkD;AAO3C,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,mBAAe;AAAA,IACnB;AAAA,IACA,CAAC,MAAM;AACL,UAAI,QAAQ,KAAK,WAAW,GAAG,GAAG;AAChC,UAAE,eAAe;AACjB,0CAAW,KAAK,MAAM,CAAC,CAAC;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AACA,SACE,4CAAC,OAAE,MAAY,SAAS,cAAe,GAAG,OACvC,UACH;AAEJ;AAeO,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,mBAAe;AAAA,IACnB;AAAA,IACA,CAAC,MAAM;AACL,UAAI,CAAC,KAAM;AAEX,cAAI,0CAAsB,CAAC,EAAG;AAC9B,UAAI,UAAU,WAAW,QAAS;AAClC,QAAE,eAAe;AACjB,mCAAS,IAAI;AAAA,IACf;AAAA,IACA,CAAC,MAAM,MAAM;AAAA,EACf;AAEA,SACE,4CAAC,OAAG,GAAG,OAAO,MAAY,QAAgB,SAAS,cAChD,UACH;AAEJ;AAIO,MAAM,OAAO,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,EAAE,WAAW,gBAAgB,QAAI,kBAAI,0CAAiB;AAE5D,MAAI,QAAQ,KAAK,WAAW,GAAG,GAAG;AAChC,WACE,4CAAC,gBAAa,MAAa,GAAG,YAC3B,UACH;AAAA,EAEJ;AACA,MAAI,YAAQ,gCAAe,WAAW,MAAM,eAAe,GAAG;AAC5D,UAAM,iBAAa,mCAAkB,WAAW,MAAM,eAAe;AACrE,WACE,4CAAC,gBAAa,MAAM,YAAa,GAAG,YACjC,UACH;AAAA,EAEJ,OAAO;AAEL,WAAO,4CAAC,OAAG,GAAG,EAAE,MAAM,GAAG,WAAW,GAAI,UAAS;AAAA,EACnD;AACF;","names":[]}
|
|
@@ -10,7 +10,7 @@ declare const FragmentLink: ({ href, children, onClick, ...props }: React.Detail
|
|
|
10
10
|
* full-page load and routes via {@link navigate}).
|
|
11
11
|
*
|
|
12
12
|
* A consumer-supplied `onClick` is COMPOSED with the router interception, never
|
|
13
|
-
* substituted for it (`useComposedAnchorClick`
|
|
13
|
+
* substituted for it (`useComposedAnchorClick`, `../anchorClick`): it runs first, and
|
|
14
14
|
* calling `preventDefault()` opts out of routing. Regression guard: `...props`
|
|
15
15
|
* used to spread AFTER `onClick={clickHandler}`, so a consumer `onClick` (e.g. a
|
|
16
16
|
* drawer's close-on-navigate) silently REPLACED the interception — the default
|
|
@@ -10,7 +10,7 @@ declare const FragmentLink: ({ href, children, onClick, ...props }: React.Detail
|
|
|
10
10
|
* full-page load and routes via {@link navigate}).
|
|
11
11
|
*
|
|
12
12
|
* A consumer-supplied `onClick` is COMPOSED with the router interception, never
|
|
13
|
-
* substituted for it (`useComposedAnchorClick`
|
|
13
|
+
* substituted for it (`useComposedAnchorClick`, `../anchorClick`): it runs first, and
|
|
14
14
|
* calling `preventDefault()` opts out of routing. Regression guard: `...props`
|
|
15
15
|
* used to spread AFTER `onClick={clickHandler}`, so a consumer `onClick` (e.g. a
|
|
16
16
|
* drawer's close-on-navigate) silently REPLACED the interception — the default
|
package/dist/components/Link.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import "../chunk-VHAA22YE.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { use
|
|
3
|
+
import { use } from "react";
|
|
4
|
+
import { isBrowserGestureClick, useComposedAnchorClick } from "../anchorClick";
|
|
4
5
|
import { navigate } from "../routing";
|
|
5
6
|
import { scrollToId } from "../scrollToId";
|
|
6
7
|
import { TinkerableContext } from "../TinkerableContext";
|
|
7
8
|
import { constructOuterUrl, isInternalHref } from "../urlUtils";
|
|
8
|
-
const useComposedAnchorClick = (onClick, intercept, interceptDeps) => useCallback(
|
|
9
|
-
(e) => {
|
|
10
|
-
onClick?.(e);
|
|
11
|
-
if (e.defaultPrevented) return;
|
|
12
|
-
intercept(e);
|
|
13
|
-
},
|
|
14
|
-
[onClick, ...interceptDeps]
|
|
15
|
-
);
|
|
16
9
|
const FragmentLink = ({
|
|
17
10
|
href,
|
|
18
11
|
children,
|
|
@@ -42,7 +35,7 @@ const InternalLink = ({
|
|
|
42
35
|
onClick,
|
|
43
36
|
(e) => {
|
|
44
37
|
if (!href) return;
|
|
45
|
-
if (e
|
|
38
|
+
if (isBrowserGestureClick(e)) return;
|
|
46
39
|
if (target && target !== "_self") return;
|
|
47
40
|
e.preventDefault();
|
|
48
41
|
navigate(href);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Link.tsx"],"sourcesContent":["import { ReactNode, use,
|
|
1
|
+
{"version":3,"sources":["../../src/components/Link.tsx"],"sourcesContent":["import { ReactNode, use } from 'react';\nimport { isBrowserGestureClick, useComposedAnchorClick } from '../anchorClick';\nimport { navigate } from '../routing';\nimport { scrollToId } from '../scrollToId';\nimport { TinkerableContext } from '../TinkerableContext';\nimport { constructOuterUrl, isInternalHref } from '../urlUtils';\n\n/** A same-page anchor (`#frag`): scrolls the addressed section into view on click\n * **without a route change** (MARKDOWN_SYNTAX_SPEC §13.5). The default behavior of a\n * bare `#`-href is intercepted so the sandbox URL the host owns is never mutated\n * out from under it; a fragment that names nothing leaves the scroll position\n * untouched (a soft failure). */\nexport const FragmentLink = ({\n href,\n children,\n onClick,\n ...props\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const clickHandler = useComposedAnchorClick(\n onClick,\n (e) => {\n if (href && href.startsWith('#')) {\n e.preventDefault();\n scrollToId(href.slice(1));\n }\n },\n [href],\n );\n return (\n <a href={href} onClick={clickHandler} {...props}>\n {children}\n </a>\n );\n};\n\n/** An `<a>` that performs in-sandbox navigation on click (prevents the default\n * full-page load and routes via {@link navigate}).\n *\n * A consumer-supplied `onClick` is COMPOSED with the router interception, never\n * substituted for it (`useComposedAnchorClick`, `../anchorClick`): it runs first, and\n * calling `preventDefault()` opts out of routing. Regression guard: `...props`\n * used to spread AFTER `onClick={clickHandler}`, so a consumer `onClick` (e.g. a\n * drawer's close-on-navigate) silently REPLACED the interception — the default\n * anchor action then navigated the sandboxed iframe itself to the host URL,\n * reloading the whole app (and framing the host inside its own sandbox).\n *\n * Modifier/middle clicks and explicit non-self `target`s keep the browser\n * default: the rendered href is a real host URL, so open-in-new-tab works. */\nexport const InternalLink = ({\n href,\n children,\n onClick,\n target,\n ...props\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const clickHandler = useComposedAnchorClick(\n onClick,\n (e) => {\n if (!href) return;\n // Open-in-new-tab gestures (and an explicit target) are the browser's.\n if (isBrowserGestureClick(e)) return;\n if (target && target !== '_self') return;\n e.preventDefault();\n navigate(href);\n },\n [href, target],\n );\n // Spread FIRST so no forwarded prop can clobber the interception or the href.\n return (\n <a {...props} href={href} target={target} onClick={clickHandler}>\n {children}\n </a>\n );\n};\n\n/** A link that routes same-app hrefs through the sandbox router (as an\n * {@link InternalLink}) and renders external hrefs as a plain `<a>`. */\nexport const Link = ({\n href,\n children,\n ...properties\n}: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>): ReactNode => {\n const { outerHref, navigationState } = use(TinkerableContext);\n // A pure same-page fragment (`#sec-8-9`) scrolls in place — no route change (§13.5).\n if (href && href.startsWith('#')) {\n return (\n <FragmentLink href={href} {...properties}>\n {children}\n </FragmentLink>\n );\n }\n if (href && isInternalHref(outerHref, href, navigationState)) {\n const targetHref = constructOuterUrl(outerHref, href, navigationState);\n return (\n <InternalLink href={targetHref} {...properties}>\n {children}\n </InternalLink>\n );\n } else {\n // create a regular link to external resource\n return <a {...{ href, ...properties }}>{children}</a>;\n }\n};\n"],"mappings":";AA6BI;AA7BJ,SAAoB,WAAW;AAC/B,SAAS,uBAAuB,8BAA8B;AAC9D,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAClC,SAAS,mBAAmB,sBAAsB;AAO3C,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,eAAe;AAAA,IACnB;AAAA,IACA,CAAC,MAAM;AACL,UAAI,QAAQ,KAAK,WAAW,GAAG,GAAG;AAChC,UAAE,eAAe;AACjB,mBAAW,KAAK,MAAM,CAAC,CAAC;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AACA,SACE,oBAAC,OAAE,MAAY,SAAS,cAAe,GAAG,OACvC,UACH;AAEJ;AAeO,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,eAAe;AAAA,IACnB;AAAA,IACA,CAAC,MAAM;AACL,UAAI,CAAC,KAAM;AAEX,UAAI,sBAAsB,CAAC,EAAG;AAC9B,UAAI,UAAU,WAAW,QAAS;AAClC,QAAE,eAAe;AACjB,eAAS,IAAI;AAAA,IACf;AAAA,IACA,CAAC,MAAM,MAAM;AAAA,EACf;AAEA,SACE,oBAAC,OAAG,GAAG,OAAO,MAAY,QAAgB,SAAS,cAChD,UACH;AAEJ;AAIO,MAAM,OAAO,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA4G;AAC1G,QAAM,EAAE,WAAW,gBAAgB,IAAI,IAAI,iBAAiB;AAE5D,MAAI,QAAQ,KAAK,WAAW,GAAG,GAAG;AAChC,WACE,oBAAC,gBAAa,MAAa,GAAG,YAC3B,UACH;AAAA,EAEJ;AACA,MAAI,QAAQ,eAAe,WAAW,MAAM,eAAe,GAAG;AAC5D,UAAM,aAAa,kBAAkB,WAAW,MAAM,eAAe;AACrE,WACE,oBAAC,gBAAa,MAAM,YAAa,GAAG,YACjC,UACH;AAAA,EAEJ,OAAO;AAEL,WAAO,oBAAC,OAAG,GAAG,EAAE,MAAM,GAAG,WAAW,GAAI,UAAS;AAAA,EACnD;AACF;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -58,6 +58,7 @@ __reExport(index_exports, require("./netFetch"), module.exports);
|
|
|
58
58
|
__reExport(index_exports, require("./feed"), module.exports);
|
|
59
59
|
__reExport(index_exports, require("./secrets"), module.exports);
|
|
60
60
|
__reExport(index_exports, require("./recents"), module.exports);
|
|
61
|
+
__reExport(index_exports, require("./openRepository"), module.exports);
|
|
61
62
|
__reExport(index_exports, require("./llm"), module.exports);
|
|
62
63
|
__reExport(index_exports, require("./diagnostics"), module.exports);
|
|
63
64
|
__reExport(index_exports, require("./vcs"), module.exports);
|
|
@@ -76,6 +77,7 @@ __reExport(index_exports, require("./sandboxTypes"), module.exports);
|
|
|
76
77
|
__reExport(index_exports, require("./safeContent"), module.exports);
|
|
77
78
|
__reExport(index_exports, require("./agentLoop"), module.exports);
|
|
78
79
|
__reExport(index_exports, require("./agentSteering"), module.exports);
|
|
80
|
+
__reExport(index_exports, require("./agentPause"), module.exports);
|
|
79
81
|
__reExport(index_exports, require("./agentChatClient"), module.exports);
|
|
80
82
|
__reExport(index_exports, require("./metadataQueryTool"), module.exports);
|
|
81
83
|
__reExport(index_exports, require("./collectHeadings"), module.exports);
|
|
@@ -119,6 +121,7 @@ __reExport(index_exports, require("./platformLink"), module.exports);
|
|
|
119
121
|
...require("./feed"),
|
|
120
122
|
...require("./secrets"),
|
|
121
123
|
...require("./recents"),
|
|
124
|
+
...require("./openRepository"),
|
|
122
125
|
...require("./llm"),
|
|
123
126
|
...require("./diagnostics"),
|
|
124
127
|
...require("./vcs"),
|
|
@@ -137,6 +140,7 @@ __reExport(index_exports, require("./platformLink"), module.exports);
|
|
|
137
140
|
...require("./safeContent"),
|
|
138
141
|
...require("./agentLoop"),
|
|
139
142
|
...require("./agentSteering"),
|
|
143
|
+
...require("./agentPause"),
|
|
140
144
|
...require("./agentChatClient"),
|
|
141
145
|
...require("./metadataQueryTool"),
|
|
142
146
|
...require("./collectHeadings"),
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './MDXProvider';\nexport * from './routing';\nexport * from './boot';\nexport * from './components/Include';\n// Only the component is public. `stripFrontmatter`/`appMountRelative` are module-level\n// exports so they can be unit-tested directly, NOT public API — the SDK's surface is\n// backwards-compatible forever, so an internal helper exported for a test's convenience is a\n// permanent commitment made for the wrong reason.\nexport { SafeInclude } from './components/SafeInclude';\nexport * from './sourceCache';\nexport * from './components/MDXComponents';\nexport * from './linkSpace';\nexport * from './bundle';\n// Deprecated `Corpus*` spellings of the above (R3-482); see `src/corpus.ts`.\nexport * from './corpus';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks';\n// R3-276: the supported way for a viewer app to provide its own metadata store,\n// replacing a wholesale re-provision of `TinkerableContext` in app code.\nexport * from './metadataSource';\n// The deprecated injected-bundler adapters, re-exported so their deprecation notices\n// are visible in the published docs (R3-278; the window only narrows).\nexport { getInjectedMetadataEmitter, getInjectedMetadataSnapshot } from './injectedBundler';\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './chromeState';\nexport * from './workspace';\nexport * from './hostAttention';\nexport * from './region';\nexport * from './mounts';\nexport * from './analytics';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './feed';\nexport * from './secrets';\nexport * from './recents'; // R3-485: the gated recent-projects read (page.home)\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './vcs';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './launch';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './protocolDeadline';\nexport * from './sandboxTypes';\nexport * from './safeContent';\n// R3-489 (GROVE_AGENT_SPEC): the embedded-agent seam every app shares — the tool-use\n// loop ported from agent-demo (`runAgent` over the host chat slot), the MDX metadata\n// query tool, the headings index collector, the deixis context block, and the fence\n// for corpus-derived bytes entering a loop.\nexport * from './agentLoop';\nexport * from './agentSteering';\nexport * from './agentChatClient';\nexport * from './metadataQueryTool';\nexport * from './collectHeadings';\nexport * from './agentContext';\nexport * from './fence';\nexport * from './platformLink';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,0BAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,iCAHd;AAQA,yBAA4B;AAC5B,0BAAc,0BATd;AAUA,0BAAc,uCAVd;AAWA,0BAAc,wBAXd;AAYA,0BAAc,qBAZd;AAcA,0BAAc,qBAdd;AAeA,0BAAc,oCAfd;AAgBA,0BAAc,gCAhBd;AAiBA,0BAAc,oBAjBd;AAoBA,0BAAc,6BApBd;AAuBA,6BAAwE;AACxE,0BAAc,mBAxBd;AAyBA,0BAAc,oBAzBd;AA0BA,0BAAc,4BA1Bd;AA2BA,0BAAc,qBA3Bd;AA4BA,0BAAc,yBA5Bd;AA6BA,0BAAc,0BA7Bd;AA8BA,0BAAc,wBA9Bd;AA+BA,0BAAc,4BA/Bd;AAgCA,0BAAc,qBAhCd;AAiCA,0BAAc,qBAjCd;AAkCA,0BAAc,wBAlCd;AAmCA,0BAAc,yBAnCd;AAoCA,0BAAc,sBApCd;AAqCA,0BAAc,kBArCd;AAsCA,0BAAc,kBAtCd;AAuCA,0BAAc,uBAvCd;AAwCA,0BAAc,mBAxCd;AAyCA,0BAAc,sBAzCd;AA0CA,0BAAc,sBA1Cd;AA2CA,0BAAc,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './MDXProvider';\nexport * from './routing';\nexport * from './boot';\nexport * from './components/Include';\n// Only the component is public. `stripFrontmatter`/`appMountRelative` are module-level\n// exports so they can be unit-tested directly, NOT public API — the SDK's surface is\n// backwards-compatible forever, so an internal helper exported for a test's convenience is a\n// permanent commitment made for the wrong reason.\nexport { SafeInclude } from './components/SafeInclude';\nexport * from './sourceCache';\nexport * from './components/MDXComponents';\nexport * from './linkSpace';\nexport * from './bundle';\n// Deprecated `Corpus*` spellings of the above (R3-482); see `src/corpus.ts`.\nexport * from './corpus';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks';\n// R3-276: the supported way for a viewer app to provide its own metadata store,\n// replacing a wholesale re-provision of `TinkerableContext` in app code.\nexport * from './metadataSource';\n// The deprecated injected-bundler adapters, re-exported so their deprecation notices\n// are visible in the published docs (R3-278; the window only narrows).\nexport { getInjectedMetadataEmitter, getInjectedMetadataSnapshot } from './injectedBundler';\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './chromeState';\nexport * from './workspace';\nexport * from './hostAttention';\nexport * from './region';\nexport * from './mounts';\nexport * from './analytics';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './feed';\nexport * from './secrets';\nexport * from './recents'; // R3-485: the gated recent-projects read (page.home)\nexport * from './openRepository'; // R3-476: host-mediated open-in-a-new-tab (route:read)\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './vcs';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './launch';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './protocolDeadline';\nexport * from './sandboxTypes';\nexport * from './safeContent';\n// R3-489 (GROVE_AGENT_SPEC): the embedded-agent seam every app shares — the tool-use\n// loop ported from agent-demo (`runAgent` over the host chat slot), the MDX metadata\n// query tool, the headings index collector, the deixis context block, and the fence\n// for corpus-derived bytes entering a loop.\nexport * from './agentLoop';\nexport * from './agentSteering';\nexport * from './agentPause';\nexport * from './agentChatClient';\nexport * from './metadataQueryTool';\nexport * from './collectHeadings';\nexport * from './agentContext';\nexport * from './fence';\nexport * from './platformLink';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,0BAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,iCAHd;AAQA,yBAA4B;AAC5B,0BAAc,0BATd;AAUA,0BAAc,uCAVd;AAWA,0BAAc,wBAXd;AAYA,0BAAc,qBAZd;AAcA,0BAAc,qBAdd;AAeA,0BAAc,oCAfd;AAgBA,0BAAc,gCAhBd;AAiBA,0BAAc,oBAjBd;AAoBA,0BAAc,6BApBd;AAuBA,6BAAwE;AACxE,0BAAc,mBAxBd;AAyBA,0BAAc,oBAzBd;AA0BA,0BAAc,4BA1Bd;AA2BA,0BAAc,qBA3Bd;AA4BA,0BAAc,yBA5Bd;AA6BA,0BAAc,0BA7Bd;AA8BA,0BAAc,wBA9Bd;AA+BA,0BAAc,4BA/Bd;AAgCA,0BAAc,qBAhCd;AAiCA,0BAAc,qBAjCd;AAkCA,0BAAc,wBAlCd;AAmCA,0BAAc,yBAnCd;AAoCA,0BAAc,sBApCd;AAqCA,0BAAc,kBArCd;AAsCA,0BAAc,kBAtCd;AAuCA,0BAAc,uBAvCd;AAwCA,0BAAc,mBAxCd;AAyCA,0BAAc,sBAzCd;AA0CA,0BAAc,sBA1Cd;AA2CA,0BAAc,6BA3Cd;AA4CA,0BAAc,kBA5Cd;AA6CA,0BAAc,0BA7Cd;AA8CA,0BAAc,kBA9Cd;AA+CA,0BAAc,yBA/Cd;AAgDA,0BAAc,iBAhDd;AAiDA,0BAAc,oBAjDd;AAkDA,0BAAc,oBAlDd;AAmDA,0BAAc,qBAnDd;AAoDA,0BAAc,sBApDd;AAqDA,0BAAc,wBArDd;AAsDA,0BAAc,oBAtDd;AAuDA,0BAAc,sBAvDd;AAwDA,0BAAc,6BAxDd;AAyDA,0BAAc,+BAzDd;AA0DA,0BAAc,2BA1Dd;AA2DA,0BAAc,0BA3Dd;AAgEA,0BAAc,wBAhEd;AAiEA,0BAAc,4BAjEd;AAkEA,0BAAc,yBAlEd;AAmEA,0BAAc,8BAnEd;AAoEA,0BAAc,gCApEd;AAqEA,0BAAc,8BArEd;AAsEA,0BAAc,2BAtEd;AAuEA,0BAAc,oBAvEd;AAwEA,0BAAc,2BAxEd;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -20,7 +20,7 @@ export { FormFactor, FormFactorClass, Orientation, getFormFactor, onFormFactorCh
|
|
|
20
20
|
export { ChromeState, getChromeState, onChromeStateChange, useChromeState } from './chromeState.cjs';
|
|
21
21
|
export { Workspace, getWorkspace, onWorkspaceChange, useWorkspace } from './workspace.cjs';
|
|
22
22
|
export { HostAttention, HostAttentionKind, NO_HOST_ATTENTION, getHostAttention, onHostAttentionChange, useHostAttention } from './hostAttention.cjs';
|
|
23
|
-
export { getRegion, useRegion } from './region.cjs';
|
|
23
|
+
export { getRegion, isRegionHidden, onRegionVisibilityChange, useRegion, useRegionHidden } from './region.cjs';
|
|
24
24
|
export { Invite, MountQuery, MountRemoveReason, MountRule, RemovedMount, SandboxMount, SessionMount, SpaceError, acceptInvite, awaitMatchingMount, createSpace, declineInvite, findMount, getAppMountPath, getInvites, getMounts, getSessionMounts, importSettingsFromParent, listMyInvites, listPendingInvites, listSettingsApps, makeContentRef, mount, mountSpace, onInvitesChange, onMountsChange, onSessionMountsChange, openSettings, openSettingsOf, requestMount, requestSpace, resolveContentRef, resolveContentRefs, revokeInvite, unmountSpace, useInvites, useMounts, useSessionMounts, waitForMount } from './mounts.cjs';
|
|
25
25
|
export { AnalyticsAck, AnalyticsPropValue, emitAnalyticsEvent, recordRoute, track, trackRoute } from './analytics.cjs';
|
|
26
26
|
export { ContributeMode, ContributeOptions, ContributionEvent, ContributionResult, contribute } from './contribute.cjs';
|
|
@@ -31,7 +31,8 @@ export { HostFetchInit, HostFetchResponse, HostFetchStreamEvent, HostFetchStream
|
|
|
31
31
|
export { FeedFetchResponse, FeedParams, feedFetch } from './feed.cjs';
|
|
32
32
|
export { SecretError, SecretGrant, SecretHints, SecretQuery, SecretType, SecretView, getSecrets, onSecretsChange, requestAddSecret, requestSecret, revokeSecret, useSecrets } from './secrets.cjs';
|
|
33
33
|
export { RecentProject, clearRecentProjects, listRecentProjects } from './recents.cjs';
|
|
34
|
-
export {
|
|
34
|
+
export { OpenRepositoryError, OpenRepositoryErrorCode, RepositoryCoordinates, openRepository } from './openRepository.cjs';
|
|
35
|
+
export { ChatDelta, ChatExecutor, ChatFeatures, ChatMessage, ChatProviderInfo, ChatProviderState, ChatRequest, ChatResult, ChatRole, ChatStopReason, ChatTierModels, ContentPart, ToolDef, chat, describeChat, describeChatState, normalizeProviderInfo, onChatProviderChange, onChatProviderStateChange, useChatProvider, useChatProviderState } from './llm.cjs';
|
|
35
36
|
export { BuildError, ConsoleEntry, ConsoleLevel, Diagnostics, DiagnosticsProvenance, getDiagnostics, onDiagnosticsChange, useDiagnostics } from './diagnostics.cjs';
|
|
36
37
|
export { VcsActionError, VcsBranch, VcsChange, VcsPR, VcsState, getVcsState, onVcsStateChange, refreshDiff, refreshPRs, resetWorkingTree, useVcsState } from './vcs.cjs';
|
|
37
38
|
export { FsChange, MountChange, getFsChange, onFsChange, useFsChange } from './onFsChange.cjs';
|
|
@@ -49,6 +50,7 @@ export { EvaluationContext, FileQueryResult, FilesMetadata, Metadata, MetadataQu
|
|
|
49
50
|
export * from '@immediately-run/safe-content';
|
|
50
51
|
export { AgentEvents, AgentMessage, AgentRole, AgentTool, COMPACTION_MARKER, ContentBlock, ImageBlock, ModelClient, ModelResponse, NUDGE_TEXT, ReasoningBlock, RunAgentOptions, StallReason, TextBlock, TokenUsage, ToolExecutor, ToolOutcome, ToolResultBlock, ToolUseBlock, compactTranscript, detectStall, estimateTokens, isContextOverflow, runAgent, shouldCompact } from './agentLoop.cjs';
|
|
51
52
|
export { INTERRUPTED_TURN_TEXT, STEER_INTERRUPT_MARKER, STEER_MARKER, SteerController, SteerMessage, SteerMode, SteerSource, anySignal, parseSteer, steerWireText } from './agentSteering.cjs';
|
|
53
|
+
export { PauseController, PauseSource } from './agentPause.cjs';
|
|
52
54
|
export { createChatModelClient } from './agentChatClient.cjs';
|
|
53
55
|
export { HeadingSummary, METADATA_HEADINGS_KEY, METADATA_QUERY_TOOL_DESCRIPTOR, METADATA_QUERY_TOOL_NAME, MetadataQueryError, MetadataQueryInput, MetadataQueryRow, createMetadataQueryTool, executeMetadataQuery, globToRegExp, runMetadataQuery } from './metadataQueryTool.cjs';
|
|
54
56
|
export { collectHeadings } from './collectHeadings.cjs';
|