@agimon-ai/po-codemode 0.0.1-alpha.13 → 0.0.1-alpha.130

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/README.md CHANGED
@@ -7,7 +7,7 @@ This package is a composable [Po](https://www.npmjs.com/package/@agimon-ai/po) s
7
7
  ## Requirements
8
8
 
9
9
  - Node.js 24 or newer
10
- - `@earendil-works/pi-coding-agent` 1.3.0
10
+ - `@earendil-works/pi-coding-agent` 1.4.0
11
11
 
12
12
  ## Install
13
13
 
@@ -2,12 +2,29 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
+ let _agimon_ai_po_core_apiContracts = require("@agimon-ai/po-core/apiContracts");
6
+ let typebox = require("typebox");
5
7
  //#region src/schemas/apiContracts.ts
6
- /** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
7
- const apiContracts = (0, require("@agimon-ai/po-core/apiContracts").defineApiContract)({
8
+ const BackgroundScriptsPayloadSchema = typebox.Type.Object({ scripts: typebox.Type.Array(typebox.Type.Object({
9
+ id: typebox.Type.String(),
10
+ label: typebox.Type.String(),
11
+ startedAt: typebox.Type.String(),
12
+ status: typebox.Type.Union([typebox.Type.Literal("running"), typebox.Type.Literal("reporting")])
13
+ })) });
14
+ /** Agent tools and commands carry no HTTP surface; the page reads running background scripts from one hub channel. */
15
+ const apiContracts = (0, _agimon_ai_po_core_apiContracts.defineApiContract)({
8
16
  version: 1,
9
17
  http: [],
10
- sockets: [],
18
+ sockets: ["host", "workspace"].map((scope) => ({
19
+ id: "codemode.background.channel",
20
+ scope,
21
+ service: "po.hub",
22
+ member: "codemode_background",
23
+ kind: "channel",
24
+ direction: "server-to-client",
25
+ description: "The session's running background code-mode scripts, in the hub frame payload property.",
26
+ input: BackgroundScriptsPayloadSchema
27
+ })),
11
28
  dynamic: []
12
29
  });
13
30
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.cjs","names":["defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;;;;AAGA,MAAa,gBAAA,4CAAeA,CAAAA,CAAAA,kBAAAA,CAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
1
+ {"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nexport const BackgroundScriptsPayloadSchema = Type.Object({\n scripts: Type.Array(\n Type.Object({\n id: Type.String(),\n label: Type.String(),\n startedAt: Type.String(),\n status: Type.Union([Type.Literal('running'), Type.Literal('reporting')]),\n }),\n ),\n});\n\n/** Agent tools and commands carry no HTTP surface; the page reads running background scripts from one hub channel. */\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n sockets: (['host', 'workspace'] as const).map((scope) => ({\n id: 'codemode.background.channel',\n scope,\n service: 'po.hub',\n member: 'codemode_background',\n kind: 'channel',\n direction: 'server-to-client',\n description: \"The session's running background code-mode scripts, in the hub frame payload property.\",\n input: BackgroundScriptsPayloadSchema,\n })),\n dynamic: [],\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;AAGA,MAAa,iCAAiCA,QAAAA,KAAK,OAAO,EACxD,SAASA,QAAAA,KAAK,MACZA,QAAAA,KAAK,OAAO;CACV,IAAIA,QAAAA,KAAK,OAAO;CAChB,OAAOA,QAAAA,KAAK,OAAO;CACnB,WAAWA,QAAAA,KAAK,OAAO;CACvB,QAAQA,QAAAA,KAAK,MAAM,CAACA,QAAAA,KAAK,QAAQ,SAAS,GAAGA,QAAAA,KAAK,QAAQ,WAAW,CAAC,CAAC;AACzE,CAAC,CACH,EACF,CAAC;;AAGD,MAAa,gBAAA,GAAeC,gCAAAA,kBAAAA,CAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAU,CAAC,QAAQ,WAAW,CAAC,CAAW,KAAK,WAAW;EACxD,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;CACF,SAAS,CAAC;AACZ,CAAC"}
@@ -1,12 +1,13 @@
1
+ import { Type } from "typebox";
1
2
  //#region src/schemas/apiContracts.d.ts
2
- /** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
3
+ /** Agent tools and commands carry no HTTP surface; the page reads running background scripts from one hub channel. */
3
4
  export declare const apiContracts: {
4
5
  version: 1;
5
6
  protocols?: Record<string, string> | undefined;
6
7
  schemas?: Record<string, boolean | object> | undefined;
7
8
  http: {
8
9
  id: string;
9
- scope: "global" | "session" | "workspace";
10
+ scope: "host" | "session" | "workspace";
10
11
  basePath?: string | undefined;
11
12
  path: string;
12
13
  method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
@@ -34,7 +35,7 @@ export declare const apiContracts: {
34
35
  }[];
35
36
  sockets: {
36
37
  id: string;
37
- scope: "global" | "session" | "workspace";
38
+ scope: "host" | "session" | "workspace";
38
39
  description: string;
39
40
  availability?: string | undefined;
40
41
  service: string;
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";;qBAGa"}
1
+ {"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";;;qBAea"}
@@ -1,10 +1,26 @@
1
1
  import { defineApiContract } from "@agimon-ai/po-core/apiContracts";
2
+ import { Type } from "typebox";
2
3
  //#region src/schemas/apiContracts.ts
3
- /** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */
4
+ const BackgroundScriptsPayloadSchema = Type.Object({ scripts: Type.Array(Type.Object({
5
+ id: Type.String(),
6
+ label: Type.String(),
7
+ startedAt: Type.String(),
8
+ status: Type.Union([Type.Literal("running"), Type.Literal("reporting")])
9
+ })) });
10
+ /** Agent tools and commands carry no HTTP surface; the page reads running background scripts from one hub channel. */
4
11
  const apiContracts = defineApiContract({
5
12
  version: 1,
6
13
  http: [],
7
- sockets: [],
14
+ sockets: ["host", "workspace"].map((scope) => ({
15
+ id: "codemode.background.channel",
16
+ scope,
17
+ service: "po.hub",
18
+ member: "codemode_background",
19
+ kind: "channel",
20
+ direction: "server-to-client",
21
+ description: "The session's running background code-mode scripts, in the hub frame payload property.",
22
+ input: BackgroundScriptsPayloadSchema
23
+ })),
8
24
  dynamic: []
9
25
  });
10
26
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\n\n/** This server plugin contributes agent tools, commands or lifecycle only, with no separate HTTP or socket surface. */\nexport const apiContracts = defineApiContract({ version: 1, http: [], sockets: [], dynamic: [] });\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAa,eAAe,kBAAkB;CAAE,SAAS;CAAG,MAAM,CAAC;CAAG,SAAS,CAAC;CAAG,SAAS,CAAC;AAAE,CAAC"}
1
+ {"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nexport const BackgroundScriptsPayloadSchema = Type.Object({\n scripts: Type.Array(\n Type.Object({\n id: Type.String(),\n label: Type.String(),\n startedAt: Type.String(),\n status: Type.Union([Type.Literal('running'), Type.Literal('reporting')]),\n }),\n ),\n});\n\n/** Agent tools and commands carry no HTTP surface; the page reads running background scripts from one hub channel. */\nexport const apiContracts = defineApiContract({\n version: 1,\n http: [],\n sockets: (['host', 'workspace'] as const).map((scope) => ({\n id: 'codemode.background.channel',\n scope,\n service: 'po.hub',\n member: 'codemode_background',\n kind: 'channel',\n direction: 'server-to-client',\n description: \"The session's running background code-mode scripts, in the hub frame payload property.\",\n input: BackgroundScriptsPayloadSchema,\n })),\n dynamic: [],\n});\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAa,iCAAiC,KAAK,OAAO,EACxD,SAAS,KAAK,MACZ,KAAK,OAAO;CACV,IAAI,KAAK,OAAO;CAChB,OAAO,KAAK,OAAO;CACnB,WAAW,KAAK,OAAO;CACvB,QAAQ,KAAK,MAAM,CAAC,KAAK,QAAQ,SAAS,GAAG,KAAK,QAAQ,WAAW,CAAC,CAAC;AACzE,CAAC,CACH,EACF,CAAC;;AAGD,MAAa,eAAe,kBAAkB;CAC5C,SAAS;CACT,MAAM,CAAC;CACP,SAAU,CAAC,QAAQ,WAAW,CAAC,CAAW,KAAK,WAAW;EACxD,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;CACF,SAAS,CAAC;AACZ,CAAC"}