@agimon-ai/po-web-dashboard 0.0.0-alpha.25 → 0.0.0-alpha.26

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.
@@ -21,8 +21,15 @@ function releaseTransport() {
21
21
  invokePlugin = void 0;
22
22
  watchThread = void 0;
23
23
  }
24
- /** Sends one command frame to a session's agent, enveloped for the hub. */
24
+ /** Routes extension channel frames to the hub and agent commands to the session protocol. */
25
25
  function sendFrame(sessionId, frame) {
26
+ if ("payload" in frame) {
27
+ sendHubFrame({
28
+ ...frame,
29
+ sessionId
30
+ });
31
+ return;
32
+ }
26
33
  require_sessionProtocolCommands.sendSessionProtocolFrame(sessionId, frame);
27
34
  }
28
35
  /** Resolves when a session command is accepted or explicitly refused, never when a turn finishes. */
@@ -1 +1 @@
1
- {"version":3,"file":"transport.cjs","names":["requestSessionProtocolFrame"],"sources":["../../../src/web/lib/transport.ts"],"sourcesContent":["import { requestSessionProtocolFrame, sendSessionProtocolFrame } from './sessionProtocolCommands';\n\ntype Frame = Record<string, unknown>;\n\nlet send: ((frame: object) => void) | undefined;\nlet invokePlugin:\n | ((call: {\n mount:\n | { scope: 'global' }\n | { scope: 'workspace'; workspaceId: string }\n | { scope: 'session'; sessionId: string };\n service: string;\n method: string;\n input: unknown;\n }) => Promise<unknown>)\n | undefined;\nlet watchThread: ((sessionId: string, threadId: string) => () => void) | undefined;\nconst hubConnectedListeners = new Set<() => void>();\n\n/**\n * Holds the live socket sender.\n *\n * The socket is owned by the composition root but commands are issued from\n * feature code, and this keeps that one indirection explicit instead of\n * threading a sender through every component.\n */\nexport function bindTransport(\n sender: (frame: object) => void,\n pluginInvoker?: typeof invokePlugin,\n threadWatcher?: typeof watchThread,\n): void {\n send = sender;\n invokePlugin = pluginInvoker;\n watchThread = threadWatcher;\n}\n\nexport function releaseTransport(): void {\n send = undefined;\n invokePlugin = undefined;\n watchThread = undefined;\n}\n\n/** Sends one command frame to a session's agent, enveloped for the hub. */\nexport function sendFrame(sessionId: string, frame: Frame): void {\n sendSessionProtocolFrame(sessionId, frame);\n}\n\n/** Resolves when a session command is accepted or explicitly refused, never when a turn finishes. */\nexport function sendFrameWithAck(sessionId: string, frame: Frame): ReturnType<typeof requestSessionProtocolFrame> {\n return requestSessionProtocolFrame(sessionId, frame);\n}\n\n/** Sends one extension channel frame `{ type, sessionId, payload }` to its session. */\nexport function sendHubFrame(frame: object): void {\n send?.(frame);\n}\n\n/** Follows one child thread over the bound socket; undefined until a socket is bound. */\nexport function watchHubThread(sessionId: string, threadId: string): (() => void) | undefined {\n return watchThread?.(sessionId, threadId);\n}\n\n/** Calls an exact-scope typed server method through the authenticated Chord binding. */\nexport function invokeServerMethod(call: Parameters<NonNullable<typeof invokePlugin>>[0]): Promise<unknown> {\n if (!invokePlugin) return Promise.reject(new Error('The plugin protocol is not connected.'));\n return invokePlugin(call);\n}\n\n/** Subscribes to fresh page socket connections. */\nexport function onHubConnected(listener: () => void): () => void {\n hubConnectedListeners.add(listener);\n return () => hubConnectedListeners.delete(listener);\n}\n\n/** Notifies page socket consumers after the hub establishes a fresh connection. */\nexport function notifyHubConnected(): void {\n for (const listener of hubConnectedListeners) listener();\n}\n"],"mappings":";;AAIA,IAAI;AACJ,IAAI;AAWJ,IAAI;AACJ,MAAM,wCAAwB,IAAI,IAAgB;;;;;;;;AASlD,SAAgB,cACd,QACA,eACA,eACM;CACN,OAAO;CACP,eAAe;CACf,cAAc;AAChB;AAEA,SAAgB,mBAAyB;CACvC,OAAO,KAAA;CACP,eAAe,KAAA;CACf,cAAc,KAAA;AAChB;;AAGA,SAAgB,UAAU,WAAmB,OAAoB;CAC/D,gCAAA,yBAAyB,WAAW,KAAK;AAC3C;;AAGA,SAAgB,iBAAiB,WAAmB,OAA8D;CAChH,OAAOA,gCAAAA,4BAA4B,WAAW,KAAK;AACrD;;AAGA,SAAgB,aAAa,OAAqB;CAChD,OAAO,KAAK;AACd;;AAGA,SAAgB,eAAe,WAAmB,UAA4C;CAC5F,OAAO,cAAc,WAAW,QAAQ;AAC1C;;AAGA,SAAgB,mBAAmB,MAAyE;CAC1G,IAAI,CAAC,cAAc,OAAO,QAAQ,uBAAO,IAAI,MAAM,uCAAuC,CAAC;CAC3F,OAAO,aAAa,IAAI;AAC1B;;AAGA,SAAgB,eAAe,UAAkC;CAC/D,sBAAsB,IAAI,QAAQ;CAClC,aAAa,sBAAsB,OAAO,QAAQ;AACpD;;AAGA,SAAgB,qBAA2B;CACzC,KAAK,MAAM,YAAY,uBAAuB,SAAS;AACzD"}
1
+ {"version":3,"file":"transport.cjs","names":["requestSessionProtocolFrame"],"sources":["../../../src/web/lib/transport.ts"],"sourcesContent":["import { requestSessionProtocolFrame, sendSessionProtocolFrame } from './sessionProtocolCommands';\n\ntype Frame = Record<string, unknown>;\n\nlet send: ((frame: object) => void) | undefined;\nlet invokePlugin:\n | ((call: {\n mount:\n | { scope: 'global' }\n | { scope: 'workspace'; workspaceId: string }\n | { scope: 'session'; sessionId: string };\n service: string;\n method: string;\n input: unknown;\n }) => Promise<unknown>)\n | undefined;\nlet watchThread: ((sessionId: string, threadId: string) => () => void) | undefined;\nconst hubConnectedListeners = new Set<() => void>();\n\n/**\n * Holds the live socket sender.\n *\n * The socket is owned by the composition root but commands are issued from\n * feature code, and this keeps that one indirection explicit instead of\n * threading a sender through every component.\n */\nexport function bindTransport(\n sender: (frame: object) => void,\n pluginInvoker?: typeof invokePlugin,\n threadWatcher?: typeof watchThread,\n): void {\n send = sender;\n invokePlugin = pluginInvoker;\n watchThread = threadWatcher;\n}\n\nexport function releaseTransport(): void {\n send = undefined;\n invokePlugin = undefined;\n watchThread = undefined;\n}\n\n/** Routes extension channel frames to the hub and agent commands to the session protocol. */\nexport function sendFrame(sessionId: string, frame: Frame): void {\n if ('payload' in frame) {\n sendHubFrame({ ...frame, sessionId });\n return;\n }\n sendSessionProtocolFrame(sessionId, frame);\n}\n\n/** Resolves when a session command is accepted or explicitly refused, never when a turn finishes. */\nexport function sendFrameWithAck(sessionId: string, frame: Frame): ReturnType<typeof requestSessionProtocolFrame> {\n return requestSessionProtocolFrame(sessionId, frame);\n}\n\n/** Sends one extension channel frame `{ type, sessionId, payload }` to its session. */\nexport function sendHubFrame(frame: object): void {\n send?.(frame);\n}\n\n/** Follows one child thread over the bound socket; undefined until a socket is bound. */\nexport function watchHubThread(sessionId: string, threadId: string): (() => void) | undefined {\n return watchThread?.(sessionId, threadId);\n}\n\n/** Calls an exact-scope typed server method through the authenticated Chord binding. */\nexport function invokeServerMethod(call: Parameters<NonNullable<typeof invokePlugin>>[0]): Promise<unknown> {\n if (!invokePlugin) return Promise.reject(new Error('The plugin protocol is not connected.'));\n return invokePlugin(call);\n}\n\n/** Subscribes to fresh page socket connections. */\nexport function onHubConnected(listener: () => void): () => void {\n hubConnectedListeners.add(listener);\n return () => hubConnectedListeners.delete(listener);\n}\n\n/** Notifies page socket consumers after the hub establishes a fresh connection. */\nexport function notifyHubConnected(): void {\n for (const listener of hubConnectedListeners) listener();\n}\n"],"mappings":";;AAIA,IAAI;AACJ,IAAI;AAWJ,IAAI;AACJ,MAAM,wCAAwB,IAAI,IAAgB;;;;;;;;AASlD,SAAgB,cACd,QACA,eACA,eACM;CACN,OAAO;CACP,eAAe;CACf,cAAc;AAChB;AAEA,SAAgB,mBAAyB;CACvC,OAAO,KAAA;CACP,eAAe,KAAA;CACf,cAAc,KAAA;AAChB;;AAGA,SAAgB,UAAU,WAAmB,OAAoB;CAC/D,IAAI,aAAa,OAAO;EACtB,aAAa;GAAE,GAAG;GAAO;EAAU,CAAC;EACpC;CACF;CACA,gCAAA,yBAAyB,WAAW,KAAK;AAC3C;;AAGA,SAAgB,iBAAiB,WAAmB,OAA8D;CAChH,OAAOA,gCAAAA,4BAA4B,WAAW,KAAK;AACrD;;AAGA,SAAgB,aAAa,OAAqB;CAChD,OAAO,KAAK;AACd;;AAGA,SAAgB,eAAe,WAAmB,UAA4C;CAC5F,OAAO,cAAc,WAAW,QAAQ;AAC1C;;AAGA,SAAgB,mBAAmB,MAAyE;CAC1G,IAAI,CAAC,cAAc,OAAO,QAAQ,uBAAO,IAAI,MAAM,uCAAuC,CAAC;CAC3F,OAAO,aAAa,IAAI;AAC1B;;AAGA,SAAgB,eAAe,UAAkC;CAC/D,sBAAsB,IAAI,QAAQ;CAClC,aAAa,sBAAsB,OAAO,QAAQ;AACpD;;AAGA,SAAgB,qBAA2B;CACzC,KAAK,MAAM,YAAY,uBAAuB,SAAS;AACzD"}
@@ -25,7 +25,7 @@ declare let watchThread: ((sessionId: string, threadId: string) => () => void) |
25
25
  */
26
26
  export declare function bindTransport(sender: (frame: object) => void, pluginInvoker?: typeof invokePlugin, threadWatcher?: typeof watchThread): void;
27
27
  export declare function releaseTransport(): void;
28
- /** Sends one command frame to a session's agent, enveloped for the hub. */
28
+ /** Routes extension channel frames to the hub and agent commands to the session protocol. */
29
29
  export declare function sendFrame(sessionId: string, frame: Frame): void;
30
30
  /** Resolves when a session command is accepted or explicitly refused, never when a turn finishes. */
31
31
  export declare function sendFrameWithAck(sessionId: string, frame: Frame): ReturnType<typeof requestSessionProtocolFrame>;
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.mts","names":[],"sources":["../../../src/web/lib/transport.ts"],"mappings":";;KAEK,QAAQ;YAGT,gBACE;EACA;IACM;;IACA;IAAoB;;IACpB;IAAkB;;EACxB;EACA;EACA;MACI;YAEN,eAAe,mBAAmB;;;;;;;;wBAUtB,cACd,SAAS,wBACT,uBAAuB,cACvB,uBAAuB;wBAOT;;wBAOA,UAAU,mBAAmB,OAAO;;wBAKpC,iBAAiB,mBAAmB,OAAO,QAAQ,kBAAkB;;wBAKrE,aAAa;;wBAKb,eAAe,mBAAmB;;wBAKlC,mBAAmB,MAAM,WAAW,mBAAmB,oBAAoB;;wBAM3E,eAAe;;wBAMf"}
1
+ {"version":3,"file":"transport.d.mts","names":[],"sources":["../../../src/web/lib/transport.ts"],"mappings":";;KAEK,QAAQ;YAGT,gBACE;EACA;IACM;;IACA;IAAoB;;IACpB;IAAkB;;EACxB;EACA;EACA;MACI;YAEN,eAAe,mBAAmB;;;;;;;;wBAUtB,cACd,SAAS,wBACT,uBAAuB,cACvB,uBAAuB;wBAOT;;wBAOA,UAAU,mBAAmB,OAAO;;wBASpC,iBAAiB,mBAAmB,OAAO,QAAQ,kBAAkB;;wBAKrE,aAAa;;wBAKb,eAAe,mBAAmB;;wBAKlC,mBAAmB,MAAM,WAAW,mBAAmB,oBAAoB;;wBAM3E,eAAe;;wBAMf"}
@@ -21,8 +21,15 @@ function releaseTransport() {
21
21
  invokePlugin = void 0;
22
22
  watchThread = void 0;
23
23
  }
24
- /** Sends one command frame to a session's agent, enveloped for the hub. */
24
+ /** Routes extension channel frames to the hub and agent commands to the session protocol. */
25
25
  function sendFrame(sessionId, frame) {
26
+ if ("payload" in frame) {
27
+ sendHubFrame({
28
+ ...frame,
29
+ sessionId
30
+ });
31
+ return;
32
+ }
26
33
  sendSessionProtocolFrame(sessionId, frame);
27
34
  }
28
35
  /** Resolves when a session command is accepted or explicitly refused, never when a turn finishes. */
@@ -1 +1 @@
1
- {"version":3,"file":"transport.mjs","names":[],"sources":["../../../src/web/lib/transport.ts"],"sourcesContent":["import { requestSessionProtocolFrame, sendSessionProtocolFrame } from './sessionProtocolCommands';\n\ntype Frame = Record<string, unknown>;\n\nlet send: ((frame: object) => void) | undefined;\nlet invokePlugin:\n | ((call: {\n mount:\n | { scope: 'global' }\n | { scope: 'workspace'; workspaceId: string }\n | { scope: 'session'; sessionId: string };\n service: string;\n method: string;\n input: unknown;\n }) => Promise<unknown>)\n | undefined;\nlet watchThread: ((sessionId: string, threadId: string) => () => void) | undefined;\nconst hubConnectedListeners = new Set<() => void>();\n\n/**\n * Holds the live socket sender.\n *\n * The socket is owned by the composition root but commands are issued from\n * feature code, and this keeps that one indirection explicit instead of\n * threading a sender through every component.\n */\nexport function bindTransport(\n sender: (frame: object) => void,\n pluginInvoker?: typeof invokePlugin,\n threadWatcher?: typeof watchThread,\n): void {\n send = sender;\n invokePlugin = pluginInvoker;\n watchThread = threadWatcher;\n}\n\nexport function releaseTransport(): void {\n send = undefined;\n invokePlugin = undefined;\n watchThread = undefined;\n}\n\n/** Sends one command frame to a session's agent, enveloped for the hub. */\nexport function sendFrame(sessionId: string, frame: Frame): void {\n sendSessionProtocolFrame(sessionId, frame);\n}\n\n/** Resolves when a session command is accepted or explicitly refused, never when a turn finishes. */\nexport function sendFrameWithAck(sessionId: string, frame: Frame): ReturnType<typeof requestSessionProtocolFrame> {\n return requestSessionProtocolFrame(sessionId, frame);\n}\n\n/** Sends one extension channel frame `{ type, sessionId, payload }` to its session. */\nexport function sendHubFrame(frame: object): void {\n send?.(frame);\n}\n\n/** Follows one child thread over the bound socket; undefined until a socket is bound. */\nexport function watchHubThread(sessionId: string, threadId: string): (() => void) | undefined {\n return watchThread?.(sessionId, threadId);\n}\n\n/** Calls an exact-scope typed server method through the authenticated Chord binding. */\nexport function invokeServerMethod(call: Parameters<NonNullable<typeof invokePlugin>>[0]): Promise<unknown> {\n if (!invokePlugin) return Promise.reject(new Error('The plugin protocol is not connected.'));\n return invokePlugin(call);\n}\n\n/** Subscribes to fresh page socket connections. */\nexport function onHubConnected(listener: () => void): () => void {\n hubConnectedListeners.add(listener);\n return () => hubConnectedListeners.delete(listener);\n}\n\n/** Notifies page socket consumers after the hub establishes a fresh connection. */\nexport function notifyHubConnected(): void {\n for (const listener of hubConnectedListeners) listener();\n}\n"],"mappings":";;AAIA,IAAI;AACJ,IAAI;AAWJ,IAAI;AACJ,MAAM,wCAAwB,IAAI,IAAgB;;;;;;;;AASlD,SAAgB,cACd,QACA,eACA,eACM;CACN,OAAO;CACP,eAAe;CACf,cAAc;AAChB;AAEA,SAAgB,mBAAyB;CACvC,OAAO,KAAA;CACP,eAAe,KAAA;CACf,cAAc,KAAA;AAChB;;AAGA,SAAgB,UAAU,WAAmB,OAAoB;CAC/D,yBAAyB,WAAW,KAAK;AAC3C;;AAGA,SAAgB,iBAAiB,WAAmB,OAA8D;CAChH,OAAO,4BAA4B,WAAW,KAAK;AACrD;;AAGA,SAAgB,aAAa,OAAqB;CAChD,OAAO,KAAK;AACd;;AAGA,SAAgB,eAAe,WAAmB,UAA4C;CAC5F,OAAO,cAAc,WAAW,QAAQ;AAC1C;;AAGA,SAAgB,mBAAmB,MAAyE;CAC1G,IAAI,CAAC,cAAc,OAAO,QAAQ,uBAAO,IAAI,MAAM,uCAAuC,CAAC;CAC3F,OAAO,aAAa,IAAI;AAC1B;;AAGA,SAAgB,eAAe,UAAkC;CAC/D,sBAAsB,IAAI,QAAQ;CAClC,aAAa,sBAAsB,OAAO,QAAQ;AACpD;;AAGA,SAAgB,qBAA2B;CACzC,KAAK,MAAM,YAAY,uBAAuB,SAAS;AACzD"}
1
+ {"version":3,"file":"transport.mjs","names":[],"sources":["../../../src/web/lib/transport.ts"],"sourcesContent":["import { requestSessionProtocolFrame, sendSessionProtocolFrame } from './sessionProtocolCommands';\n\ntype Frame = Record<string, unknown>;\n\nlet send: ((frame: object) => void) | undefined;\nlet invokePlugin:\n | ((call: {\n mount:\n | { scope: 'global' }\n | { scope: 'workspace'; workspaceId: string }\n | { scope: 'session'; sessionId: string };\n service: string;\n method: string;\n input: unknown;\n }) => Promise<unknown>)\n | undefined;\nlet watchThread: ((sessionId: string, threadId: string) => () => void) | undefined;\nconst hubConnectedListeners = new Set<() => void>();\n\n/**\n * Holds the live socket sender.\n *\n * The socket is owned by the composition root but commands are issued from\n * feature code, and this keeps that one indirection explicit instead of\n * threading a sender through every component.\n */\nexport function bindTransport(\n sender: (frame: object) => void,\n pluginInvoker?: typeof invokePlugin,\n threadWatcher?: typeof watchThread,\n): void {\n send = sender;\n invokePlugin = pluginInvoker;\n watchThread = threadWatcher;\n}\n\nexport function releaseTransport(): void {\n send = undefined;\n invokePlugin = undefined;\n watchThread = undefined;\n}\n\n/** Routes extension channel frames to the hub and agent commands to the session protocol. */\nexport function sendFrame(sessionId: string, frame: Frame): void {\n if ('payload' in frame) {\n sendHubFrame({ ...frame, sessionId });\n return;\n }\n sendSessionProtocolFrame(sessionId, frame);\n}\n\n/** Resolves when a session command is accepted or explicitly refused, never when a turn finishes. */\nexport function sendFrameWithAck(sessionId: string, frame: Frame): ReturnType<typeof requestSessionProtocolFrame> {\n return requestSessionProtocolFrame(sessionId, frame);\n}\n\n/** Sends one extension channel frame `{ type, sessionId, payload }` to its session. */\nexport function sendHubFrame(frame: object): void {\n send?.(frame);\n}\n\n/** Follows one child thread over the bound socket; undefined until a socket is bound. */\nexport function watchHubThread(sessionId: string, threadId: string): (() => void) | undefined {\n return watchThread?.(sessionId, threadId);\n}\n\n/** Calls an exact-scope typed server method through the authenticated Chord binding. */\nexport function invokeServerMethod(call: Parameters<NonNullable<typeof invokePlugin>>[0]): Promise<unknown> {\n if (!invokePlugin) return Promise.reject(new Error('The plugin protocol is not connected.'));\n return invokePlugin(call);\n}\n\n/** Subscribes to fresh page socket connections. */\nexport function onHubConnected(listener: () => void): () => void {\n hubConnectedListeners.add(listener);\n return () => hubConnectedListeners.delete(listener);\n}\n\n/** Notifies page socket consumers after the hub establishes a fresh connection. */\nexport function notifyHubConnected(): void {\n for (const listener of hubConnectedListeners) listener();\n}\n"],"mappings":";;AAIA,IAAI;AACJ,IAAI;AAWJ,IAAI;AACJ,MAAM,wCAAwB,IAAI,IAAgB;;;;;;;;AASlD,SAAgB,cACd,QACA,eACA,eACM;CACN,OAAO;CACP,eAAe;CACf,cAAc;AAChB;AAEA,SAAgB,mBAAyB;CACvC,OAAO,KAAA;CACP,eAAe,KAAA;CACf,cAAc,KAAA;AAChB;;AAGA,SAAgB,UAAU,WAAmB,OAAoB;CAC/D,IAAI,aAAa,OAAO;EACtB,aAAa;GAAE,GAAG;GAAO;EAAU,CAAC;EACpC;CACF;CACA,yBAAyB,WAAW,KAAK;AAC3C;;AAGA,SAAgB,iBAAiB,WAAmB,OAA8D;CAChH,OAAO,4BAA4B,WAAW,KAAK;AACrD;;AAGA,SAAgB,aAAa,OAAqB;CAChD,OAAO,KAAK;AACd;;AAGA,SAAgB,eAAe,WAAmB,UAA4C;CAC5F,OAAO,cAAc,WAAW,QAAQ;AAC1C;;AAGA,SAAgB,mBAAmB,MAAyE;CAC1G,IAAI,CAAC,cAAc,OAAO,QAAQ,uBAAO,IAAI,MAAM,uCAAuC,CAAC;CAC3F,OAAO,aAAa,IAAI;AAC1B;;AAGA,SAAgB,eAAe,UAAkC;CAC/D,sBAAsB,IAAI,QAAQ;CAClC,aAAa,sBAAsB,OAAO,QAAQ;AACpD;;AAGA,SAAgB,qBAA2B;CACzC,KAAK,MAAM,YAAY,uBAAuB,SAAS;AACzD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-web-dashboard",
3
- "version": "0.0.0-alpha.25",
3
+ "version": "0.0.0-alpha.26",
4
4
  "description": "Shared browser state, actions and optional views for Po dashboard templates.",
5
5
  "keywords": [
6
6
  "ai",
@@ -61,9 +61,9 @@
61
61
  "access": "public"
62
62
  },
63
63
  "dependencies": {
64
- "@agimon-ai/po-core": "0.0.0-alpha.25",
65
- "@agimon-ai/po-web-components": "0.0.0-alpha.25",
66
- "@agimon-ai/po-web-security": "0.0.0-alpha.25",
64
+ "@agimon-ai/po-core": "0.0.0-alpha.26",
65
+ "@agimon-ai/po-web-components": "0.0.0-alpha.26",
66
+ "@agimon-ai/po-web-security": "0.0.0-alpha.26",
67
67
  "@earendil-works/chord": "1.3.0",
68
68
  "@simplewebauthn/browser": "^14.0.0",
69
69
  "@tanstack/react-router": "1.170.44",
@@ -73,7 +73,7 @@
73
73
  "qrcode-generator": "^2.0.4"
74
74
  },
75
75
  "devDependencies": {
76
- "@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.25",
76
+ "@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.26",
77
77
  "@types/node": "26.6.5",
78
78
  "@types/react": "19.3.0",
79
79
  "@types/react-dom": "19.3.0",