repoburg 1.3.259 → 1.3.261
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.
|
@@ -43612,6 +43612,19 @@ App state does NOT live in this folder \u2014 it is stored in the pane database
|
|
|
43612
43612
|
- submitTurn(sessionId, prompt) - send a prompt to a session
|
|
43613
43613
|
- onTurnCompleted(callback) - callback(event, { turnId, response }) when a turn ends
|
|
43614
43614
|
- onToolCall(callback) - callback({ callId, name, tool, args }) when the AGENT calls one of the manifest tools (name and tool carry the same tool name); answer with resolveToolCall(callId, result)
|
|
43615
|
+
- openSession(sessionId) - show that session in the pane (the view switches to its conversation); works only while the app is on screen, so call it from a click handler
|
|
43616
|
+
- openUrl(url) - open an absolute http(s) URL in a new browser tab; call it from a click handler (popup blockers allow tabs opened by a click)
|
|
43617
|
+
|
|
43618
|
+
## Links and navigation
|
|
43619
|
+
|
|
43620
|
+
The app runs in a sandboxed frame. Never navigate the frame itself
|
|
43621
|
+
(location.href = ...): the page would replace the app, and most sites
|
|
43622
|
+
refuse to be framed.
|
|
43623
|
+
- external pages: a plain <a href="https://..."> link opens in a new
|
|
43624
|
+
browser tab (target="_blank" works too); from code use
|
|
43625
|
+
AgentPane.openUrl(url)
|
|
43626
|
+
- sessions: AgentPane.openSession(id), e.g. a "session" link next to a
|
|
43627
|
+
job row (ids come from createSession)
|
|
43615
43628
|
|
|
43616
43629
|
## Agent tool calls (manifest "tools")
|
|
43617
43630
|
|
|
@@ -43626,7 +43639,8 @@ Headless contract for apps that declare tools:
|
|
|
43626
43639
|
- headless state is the instance of the CALLING session's workspace
|
|
43627
43640
|
('' = global when the caller has no known workspace); open tabs
|
|
43628
43641
|
sync via onStateChanged
|
|
43629
|
-
- createSession/submitTurn are not available in the
|
|
43642
|
+
- createSession/submitTurn/openSession/openUrl are not available in the
|
|
43643
|
+
headless runtime
|
|
43630
43644
|
|
|
43631
43645
|
If the app cannot load headless (broken app.js, no handler), the pane
|
|
43632
43646
|
falls back to relaying calls into the OPEN app iframe \u2014 the app must be
|
|
@@ -43678,6 +43692,13 @@ function readState(id) {
|
|
|
43678
43692
|
return { pinned: false, data: null };
|
|
43679
43693
|
}
|
|
43680
43694
|
}
|
|
43695
|
+
function isRegularFile(p) {
|
|
43696
|
+
try {
|
|
43697
|
+
return fs.statSync(p).isFile();
|
|
43698
|
+
} catch {
|
|
43699
|
+
return false;
|
|
43700
|
+
}
|
|
43701
|
+
}
|
|
43681
43702
|
var watcher = null;
|
|
43682
43703
|
var pendingChanges = /* @__PURE__ */ new Map();
|
|
43683
43704
|
var HOT_RELOAD_DEBOUNCE_MS = 250;
|
|
@@ -43692,6 +43713,7 @@ function startAppsWatch(onAppChange) {
|
|
|
43692
43713
|
const appId = segs[0];
|
|
43693
43714
|
const file = segs[segs.length - 1];
|
|
43694
43715
|
if (!appId || appId === path3.basename(root) || !APP_ID_RE.test(appId) || file === "state.json") return;
|
|
43716
|
+
if (segs.length === 1 && isRegularFile(path3.join(root, appId))) return;
|
|
43695
43717
|
const timer = pendingChanges.get(appId);
|
|
43696
43718
|
if (timer) clearTimeout(timer);
|
|
43697
43719
|
pendingChanges.set(
|
|
@@ -43795,6 +43817,12 @@ declare const AgentPane: {
|
|
|
43795
43817
|
onToolCall(cb: (payload: AgentPaneToolCallPayload) => void): void;
|
|
43796
43818
|
onStateChanged(cb: (payload: unknown) => void): void;
|
|
43797
43819
|
resolveToolCall(callId: string, result?: unknown): Promise<{ ok: boolean }>;
|
|
43820
|
+
/** Show a session in the pane (switches the view to its conversation).
|
|
43821
|
+
* Only works while the app is on screen: call it from a click handler. */
|
|
43822
|
+
openSession(sessionId: string): Promise<{ ok: boolean }>;
|
|
43823
|
+
/** Open an absolute http(s) URL in a new browser tab. Call it from a click
|
|
43824
|
+
* handler: popup blockers allow tabs opened by a user gesture. */
|
|
43825
|
+
openUrl(url: string): Promise<{ ok: boolean }>;
|
|
43798
43826
|
};
|
|
43799
43827
|
`;
|
|
43800
43828
|
var cache = /* @__PURE__ */ new Map();
|
|
@@ -44046,6 +44074,8 @@ function getHeadlessToolHandler(appId, workspace = "") {
|
|
|
44046
44074
|
// UI-flow APIs are intentionally unavailable headless.
|
|
44047
44075
|
createSession: () => Promise.reject(new Error("createSession is not available in the headless runtime")),
|
|
44048
44076
|
submitTurn: () => Promise.reject(new Error("submitTurn is not available in the headless runtime")),
|
|
44077
|
+
openSession: () => Promise.reject(new Error("openSession is not available in the headless runtime")),
|
|
44078
|
+
openUrl: () => Promise.reject(new Error("openUrl is not available in the headless runtime")),
|
|
44049
44079
|
onTurnCompleted: () => {
|
|
44050
44080
|
},
|
|
44051
44081
|
onTurnDelta: () => {
|
|
@@ -44230,6 +44260,7 @@ var SKELETON_TS = `// Skeleton mini app (TypeScript). window.AgentPane is the ty
|
|
|
44230
44260
|
// getState() / setState(data) persistent state (survives reloads)
|
|
44231
44261
|
// createSession / submitTurn talk to an agent session
|
|
44232
44262
|
// onTurnCompleted / onToolCall react to agent events
|
|
44263
|
+
// openSession / openUrl show a session / open a page in a new tab
|
|
44233
44264
|
interface Ui {
|
|
44234
44265
|
ready: boolean;
|
|
44235
44266
|
data: Record<string, unknown>;
|
|
@@ -43599,6 +43599,19 @@ App state does NOT live in this folder \u2014 it is stored in the pane database
|
|
|
43599
43599
|
- submitTurn(sessionId, prompt) - send a prompt to a session
|
|
43600
43600
|
- onTurnCompleted(callback) - callback(event, { turnId, response }) when a turn ends
|
|
43601
43601
|
- onToolCall(callback) - callback({ callId, name, tool, args }) when the AGENT calls one of the manifest tools (name and tool carry the same tool name); answer with resolveToolCall(callId, result)
|
|
43602
|
+
- openSession(sessionId) - show that session in the pane (the view switches to its conversation); works only while the app is on screen, so call it from a click handler
|
|
43603
|
+
- openUrl(url) - open an absolute http(s) URL in a new browser tab; call it from a click handler (popup blockers allow tabs opened by a click)
|
|
43604
|
+
|
|
43605
|
+
## Links and navigation
|
|
43606
|
+
|
|
43607
|
+
The app runs in a sandboxed frame. Never navigate the frame itself
|
|
43608
|
+
(location.href = ...): the page would replace the app, and most sites
|
|
43609
|
+
refuse to be framed.
|
|
43610
|
+
- external pages: a plain <a href="https://..."> link opens in a new
|
|
43611
|
+
browser tab (target="_blank" works too); from code use
|
|
43612
|
+
AgentPane.openUrl(url)
|
|
43613
|
+
- sessions: AgentPane.openSession(id), e.g. a "session" link next to a
|
|
43614
|
+
job row (ids come from createSession)
|
|
43602
43615
|
|
|
43603
43616
|
## Agent tool calls (manifest "tools")
|
|
43604
43617
|
|
|
@@ -43613,7 +43626,8 @@ Headless contract for apps that declare tools:
|
|
|
43613
43626
|
- headless state is the instance of the CALLING session's workspace
|
|
43614
43627
|
('' = global when the caller has no known workspace); open tabs
|
|
43615
43628
|
sync via onStateChanged
|
|
43616
|
-
- createSession/submitTurn are not available in the
|
|
43629
|
+
- createSession/submitTurn/openSession/openUrl are not available in the
|
|
43630
|
+
headless runtime
|
|
43617
43631
|
|
|
43618
43632
|
If the app cannot load headless (broken app.js, no handler), the pane
|
|
43619
43633
|
falls back to relaying calls into the OPEN app iframe \u2014 the app must be
|
|
@@ -43665,6 +43679,13 @@ function readState(id) {
|
|
|
43665
43679
|
return { pinned: false, data: null };
|
|
43666
43680
|
}
|
|
43667
43681
|
}
|
|
43682
|
+
function isRegularFile(p) {
|
|
43683
|
+
try {
|
|
43684
|
+
return fs.statSync(p).isFile();
|
|
43685
|
+
} catch {
|
|
43686
|
+
return false;
|
|
43687
|
+
}
|
|
43688
|
+
}
|
|
43668
43689
|
var watcher = null;
|
|
43669
43690
|
var pendingChanges = /* @__PURE__ */ new Map();
|
|
43670
43691
|
var HOT_RELOAD_DEBOUNCE_MS = 250;
|
|
@@ -43679,6 +43700,7 @@ function startAppsWatch(onAppChange) {
|
|
|
43679
43700
|
const appId = segs[0];
|
|
43680
43701
|
const file = segs[segs.length - 1];
|
|
43681
43702
|
if (!appId || appId === path3.basename(root) || !APP_ID_RE.test(appId) || file === "state.json") return;
|
|
43703
|
+
if (segs.length === 1 && isRegularFile(path3.join(root, appId))) return;
|
|
43682
43704
|
const timer = pendingChanges.get(appId);
|
|
43683
43705
|
if (timer) clearTimeout(timer);
|
|
43684
43706
|
pendingChanges.set(
|
|
@@ -43782,6 +43804,12 @@ declare const AgentPane: {
|
|
|
43782
43804
|
onToolCall(cb: (payload: AgentPaneToolCallPayload) => void): void;
|
|
43783
43805
|
onStateChanged(cb: (payload: unknown) => void): void;
|
|
43784
43806
|
resolveToolCall(callId: string, result?: unknown): Promise<{ ok: boolean }>;
|
|
43807
|
+
/** Show a session in the pane (switches the view to its conversation).
|
|
43808
|
+
* Only works while the app is on screen: call it from a click handler. */
|
|
43809
|
+
openSession(sessionId: string): Promise<{ ok: boolean }>;
|
|
43810
|
+
/** Open an absolute http(s) URL in a new browser tab. Call it from a click
|
|
43811
|
+
* handler: popup blockers allow tabs opened by a user gesture. */
|
|
43812
|
+
openUrl(url: string): Promise<{ ok: boolean }>;
|
|
43785
43813
|
};
|
|
43786
43814
|
`;
|
|
43787
43815
|
var cache = /* @__PURE__ */ new Map();
|
|
@@ -44033,6 +44061,8 @@ function getHeadlessToolHandler(appId, workspace = "") {
|
|
|
44033
44061
|
// UI-flow APIs are intentionally unavailable headless.
|
|
44034
44062
|
createSession: () => Promise.reject(new Error("createSession is not available in the headless runtime")),
|
|
44035
44063
|
submitTurn: () => Promise.reject(new Error("submitTurn is not available in the headless runtime")),
|
|
44064
|
+
openSession: () => Promise.reject(new Error("openSession is not available in the headless runtime")),
|
|
44065
|
+
openUrl: () => Promise.reject(new Error("openUrl is not available in the headless runtime")),
|
|
44036
44066
|
onTurnCompleted: () => {
|
|
44037
44067
|
},
|
|
44038
44068
|
onTurnDelta: () => {
|
|
@@ -44217,6 +44247,7 @@ var SKELETON_TS = `// Skeleton mini app (TypeScript). window.AgentPane is the ty
|
|
|
44217
44247
|
// getState() / setState(data) persistent state (survives reloads)
|
|
44218
44248
|
// createSession / submitTurn talk to an agent session
|
|
44219
44249
|
// onTurnCompleted / onToolCall react to agent events
|
|
44250
|
+
// openSession / openUrl show a session / open a page in a new tab
|
|
44220
44251
|
interface Ui {
|
|
44221
44252
|
ready: boolean;
|
|
44222
44253
|
data: Record<string, unknown>;
|