@ai-ecoverse/slicc-agent 1.0.0 → 1.1.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/README.md +25 -3
- package/dist/agent.js +45 -0
- package/dist/agent.js.map +7 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +7 -0
- package/dist/port.js +57 -0
- package/dist/port.js.map +7 -0
- package/dist/types/agent.d.ts +19 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/port.d.ts +23 -0
- package/package.json +26 -7
- package/src/index.js +0 -1
package/README.md
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
# slicc-agent
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
SLICC's agent core, built on pi's [durable](https://github.com/earendil-works/pi/tree/main/packages/durable) harness. It runs in a dedicated worker next to [slicc-kernel](https://github.com/ai-ecoverse/slicc-kernel) and is shown by [slicc-spectrum](https://github.com/ai-ecoverse/slicc-spectrum). The plan is in [ai-ecoverse/slicc-agent#2](https://github.com/ai-ecoverse/slicc-agent/issues/2).
|
|
4
|
+
|
|
5
|
+
The package ships unbundled ESM: `dist/` holds one file per source file and imports pi's packages by name, so [slicc-bios](https://github.com/ai-ecoverse/slicc-bios) installs it from its lockfile like any other package, and `pnpm upgrade @ai-ecoverse/slicc-agent` updates it in place.
|
|
6
|
+
|
|
7
|
+
## Use
|
|
4
8
|
|
|
5
9
|
```js
|
|
6
|
-
import {} from '@ai-ecoverse/slicc-agent';
|
|
10
|
+
import { connectAgent, openAgent, serveAgent } from '@ai-ecoverse/slicc-agent';
|
|
11
|
+
|
|
12
|
+
serveAgent(self, openAgent({ models, model: { provider: 'amazon-bedrock', modelId } }));
|
|
13
|
+
|
|
14
|
+
const agent = connectAgent(new Worker(workerUrl, { type: 'module' }));
|
|
15
|
+
await agent.prompt('What is in /home?');
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- `openAgent({ models, model, storage?, registry?, settings? })` opens a durable Harness (in memory unless `storage` is given) and its root conversation. `prompt(text)` submits an input and resolves with the answer's text.
|
|
19
|
+
- `serveAgent(endpoint, agent)` answers prompts that arrive on a worker or `MessagePort`; `connectAgent(endpoint)` is the page side.
|
|
20
|
+
|
|
21
|
+
## Develop
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npm install
|
|
25
|
+
npm run build
|
|
26
|
+
npm run test:unit
|
|
27
|
+
npm test
|
|
28
|
+
npm run lint
|
|
7
29
|
```
|
|
8
30
|
|
|
9
|
-
|
|
31
|
+
`npm test` builds `dist/`, bundles a test worker that runs the agent on pi's faux provider, and runs the integration tests in Chromium through the [slicc-shared-web harness](https://github.com/ai-ecoverse/slicc-shared-web#integration-test-harness). Unit tests live in `test/unit/`, which stays out of git; the pre-commit hook requires every changed line in `src/` to be covered. No test calls a real model.
|
package/dist/agent.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
|
2
|
+
import {
|
|
3
|
+
AssistantEntry,
|
|
4
|
+
createRegistry,
|
|
5
|
+
Harness,
|
|
6
|
+
MemoryStorage
|
|
7
|
+
} from "@earendil-works/pi-durable";
|
|
8
|
+
function answerText(content) {
|
|
9
|
+
if (typeof content === "string") return content;
|
|
10
|
+
if (!Array.isArray(content)) return "";
|
|
11
|
+
return content.filter((block) => block.type === "text").map((block) => block.text ?? "").join("");
|
|
12
|
+
}
|
|
13
|
+
async function prompt(root, text, context) {
|
|
14
|
+
const submission = await root.submit({ type: "input", content: text }, context);
|
|
15
|
+
const settled = await submission.wait(context);
|
|
16
|
+
const { answer, reason } = settled;
|
|
17
|
+
if (answer === void 0) throw new Error(`unanswered: ${reason}`);
|
|
18
|
+
const entry = await root.commit((tx) => tx.entry(AssistantEntry, answer), context);
|
|
19
|
+
return answerText(entry?.model?.[0]?.content);
|
|
20
|
+
}
|
|
21
|
+
async function openAgent(options) {
|
|
22
|
+
const context = options.context ?? BACKGROUND_CONTEXT;
|
|
23
|
+
const harness = await Harness.open(
|
|
24
|
+
options.storage ?? new MemoryStorage(),
|
|
25
|
+
{
|
|
26
|
+
models: options.models,
|
|
27
|
+
registry: options.registry ?? createRegistry(),
|
|
28
|
+
...options.settings ? { settings: options.settings } : {}
|
|
29
|
+
},
|
|
30
|
+
context
|
|
31
|
+
);
|
|
32
|
+
const root = await harness.root(context, { agent: { model: options.model } });
|
|
33
|
+
harness.resume();
|
|
34
|
+
return {
|
|
35
|
+
harness,
|
|
36
|
+
root,
|
|
37
|
+
prompt: (text) => prompt(root, text, context),
|
|
38
|
+
close: () => harness.close(context)
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
answerText,
|
|
43
|
+
openAgent
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/agent.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Context } from '@earendil-works/chord';\nimport { BACKGROUND_CONTEXT } from '@earendil-works/chord/context';\nimport type { Models } from '@earendil-works/pi-ai/models';\nimport {\n AssistantEntry,\n type Conversation,\n createRegistry,\n type EntryId,\n Harness,\n type HarnessOptions,\n MemoryStorage,\n type ModelRef,\n type Registry,\n type Storage,\n} from '@earendil-works/pi-durable';\n\nexport interface AgentOptions {\n models: Models;\n model: ModelRef;\n storage?: Storage;\n registry?: Registry;\n settings?: HarnessOptions['settings'];\n context?: Context;\n}\n\nexport interface Agent {\n readonly harness: Harness;\n readonly root: Conversation;\n prompt(text: string): Promise<string>;\n close(): Promise<void>;\n}\n\ninterface Block {\n type: string;\n text?: string;\n}\n\nexport function answerText(content: unknown): string {\n if (typeof content === 'string') return content;\n if (!Array.isArray(content)) return '';\n return (content as Block[])\n .filter((block) => block.type === 'text')\n .map((block) => block.text ?? '')\n .join('');\n}\n\nasync function prompt(root: Conversation, text: string, context: Context): Promise<string> {\n const submission = await root.submit({ type: 'input', content: text }, context);\n const settled = await submission.wait(context);\n const { answer, reason } = settled as { answer?: EntryId; reason?: string };\n if (answer === undefined) throw new Error(`unanswered: ${reason}`);\n const entry = await root.commit((tx) => tx.entry(AssistantEntry, answer), context);\n return answerText(entry?.model?.[0]?.content);\n}\n\nexport async function openAgent(options: AgentOptions): Promise<Agent> {\n const context = options.context ?? BACKGROUND_CONTEXT;\n const harness = await Harness.open(\n options.storage ?? new MemoryStorage(),\n {\n models: options.models,\n registry: options.registry ?? createRegistry(),\n ...(options.settings ? { settings: options.settings } : {}),\n },\n context\n );\n const root = await harness.root(context, { agent: { model: options.model } });\n harness.resume();\n return {\n harness,\n root,\n prompt: (text) => prompt(root, text, context),\n close: () => harness.close(context),\n };\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,0BAA0B;AAEnC;AAAA,EACE;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,OAIK;AAuBA,SAAS,WAAW,SAA0B;AACnD,MAAI,OAAO,YAAY,SAAU,QAAO;AACxC,MAAI,CAAC,MAAM,QAAQ,OAAO,EAAG,QAAO;AACpC,SAAQ,QACL,OAAO,CAAC,UAAU,MAAM,SAAS,MAAM,EACvC,IAAI,CAAC,UAAU,MAAM,QAAQ,EAAE,EAC/B,KAAK,EAAE;AACZ;AAEA,eAAe,OAAO,MAAoB,MAAc,SAAmC;AACzF,QAAM,aAAa,MAAM,KAAK,OAAO,EAAE,MAAM,SAAS,SAAS,KAAK,GAAG,OAAO;AAC9E,QAAM,UAAU,MAAM,WAAW,KAAK,OAAO;AAC7C,QAAM,EAAE,QAAQ,OAAO,IAAI;AAC3B,MAAI,WAAW,OAAW,OAAM,IAAI,MAAM,eAAe,MAAM,EAAE;AACjE,QAAM,QAAQ,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,MAAM,gBAAgB,MAAM,GAAG,OAAO;AACjF,SAAO,WAAW,OAAO,QAAQ,CAAC,GAAG,OAAO;AAC9C;AAEA,eAAsB,UAAU,SAAuC;AACrE,QAAM,UAAU,QAAQ,WAAW;AACnC,QAAM,UAAU,MAAM,QAAQ;AAAA,IAC5B,QAAQ,WAAW,IAAI,cAAc;AAAA,IACrC;AAAA,MACE,QAAQ,QAAQ;AAAA,MAChB,UAAU,QAAQ,YAAY,eAAe;AAAA,MAC7C,GAAI,QAAQ,WAAW,EAAE,UAAU,QAAQ,SAAS,IAAI,CAAC;AAAA,IAC3D;AAAA,IACA;AAAA,EACF;AACA,QAAM,OAAO,MAAM,QAAQ,KAAK,SAAS,EAAE,OAAO,EAAE,OAAO,QAAQ,MAAM,EAAE,CAAC;AAC5E,UAAQ,OAAO;AACf,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,QAAQ,CAAC,SAAS,OAAO,MAAM,MAAM,OAAO;AAAA,IAC5C,OAAO,MAAM,QAAQ,MAAM,OAAO;AAAA,EACpC;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { type Agent, type AgentOptions, answerText, openAgent } from './agent.ts';\nexport {\n type AgentClient,\n type AgentReply,\n type AgentRequest,\n connectAgent,\n type MessageEndpoint,\n serveAgent,\n} from './port.ts';\n"],
|
|
5
|
+
"mappings": "AAAA,SAAwC,YAAY,iBAAiB;AACrE;AAAA,EAIE;AAAA,EAEA;AAAA,OACK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/port.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function isRequest(data) {
|
|
2
|
+
const value = data;
|
|
3
|
+
return typeof value?.id === "number" && typeof value.prompt === "string";
|
|
4
|
+
}
|
|
5
|
+
function reason(error) {
|
|
6
|
+
return error instanceof Error ? error.message : String(error);
|
|
7
|
+
}
|
|
8
|
+
function serveAgent(endpoint, agent) {
|
|
9
|
+
endpoint.addEventListener("message", ({ data }) => {
|
|
10
|
+
if (!isRequest(data)) return;
|
|
11
|
+
agent.then((ready) => ready.prompt(data.prompt)).then(
|
|
12
|
+
(text) => endpoint.postMessage({ id: data.id, text }),
|
|
13
|
+
(error) => endpoint.postMessage({ id: data.id, error: reason(error) })
|
|
14
|
+
);
|
|
15
|
+
});
|
|
16
|
+
endpoint.start?.();
|
|
17
|
+
}
|
|
18
|
+
function failure(event) {
|
|
19
|
+
const message = event.message;
|
|
20
|
+
return new Error(message ? `agent failed: ${message}` : `agent failed: ${event.type}`);
|
|
21
|
+
}
|
|
22
|
+
function connectAgent(endpoint) {
|
|
23
|
+
const pending = /* @__PURE__ */ new Map();
|
|
24
|
+
let broken;
|
|
25
|
+
let next = 0;
|
|
26
|
+
const fail = (event) => {
|
|
27
|
+
broken = failure(event);
|
|
28
|
+
for (const call of pending.values()) call.reject(broken);
|
|
29
|
+
pending.clear();
|
|
30
|
+
};
|
|
31
|
+
endpoint.addEventListener("message", ({ data }) => {
|
|
32
|
+
const reply = data;
|
|
33
|
+
const call = pending.get(reply.id);
|
|
34
|
+
if (!call) return;
|
|
35
|
+
pending.delete(reply.id);
|
|
36
|
+
if ("error" in reply) call.reject(new Error(reply.error));
|
|
37
|
+
else call.resolve(reply.text);
|
|
38
|
+
});
|
|
39
|
+
endpoint.addEventListener("error", fail);
|
|
40
|
+
endpoint.addEventListener("messageerror", fail);
|
|
41
|
+
endpoint.start?.();
|
|
42
|
+
return {
|
|
43
|
+
prompt(text) {
|
|
44
|
+
if (broken) return Promise.reject(broken);
|
|
45
|
+
const id = ++next;
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
pending.set(id, { resolve, reject });
|
|
48
|
+
endpoint.postMessage({ id, prompt: text });
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
connectAgent,
|
|
55
|
+
serveAgent
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=port.js.map
|
package/dist/port.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/port.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Agent } from './agent.ts';\n\nexport interface AgentRequest {\n id: number;\n prompt: string;\n}\n\nexport type AgentReply = { id: number; text: string } | { id: number; error: string };\n\nexport interface MessageEndpoint {\n postMessage(message: unknown): void;\n addEventListener(type: 'message', listener: (event: MessageEvent) => void): void;\n addEventListener(type: 'error' | 'messageerror', listener: (event: Event) => void): void;\n start?(): void;\n}\n\nfunction isRequest(data: unknown): data is AgentRequest {\n const value = data as Partial<AgentRequest> | null;\n return typeof value?.id === 'number' && typeof value.prompt === 'string';\n}\n\nfunction reason(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport function serveAgent(endpoint: MessageEndpoint, agent: Promise<Agent>): void {\n endpoint.addEventListener('message', ({ data }) => {\n if (!isRequest(data)) return;\n agent\n .then((ready) => ready.prompt(data.prompt))\n .then(\n (text) => endpoint.postMessage({ id: data.id, text } satisfies AgentReply),\n (error: unknown) =>\n endpoint.postMessage({ id: data.id, error: reason(error) } satisfies AgentReply)\n );\n });\n endpoint.start?.();\n}\n\nexport interface AgentClient {\n prompt(text: string): Promise<string>;\n}\n\nfunction failure(event: Event): Error {\n const message = (event as ErrorEvent).message;\n return new Error(message ? `agent failed: ${message}` : `agent failed: ${event.type}`);\n}\n\nexport function connectAgent(endpoint: MessageEndpoint): AgentClient {\n const pending = new Map<number, { resolve(text: string): void; reject(error: Error): void }>();\n let broken: Error | undefined;\n let next = 0;\n const fail = (event: Event) => {\n broken = failure(event);\n for (const call of pending.values()) call.reject(broken);\n pending.clear();\n };\n endpoint.addEventListener('message', ({ data }) => {\n const reply = data as AgentReply;\n const call = pending.get(reply.id);\n if (!call) return;\n pending.delete(reply.id);\n if ('error' in reply) call.reject(new Error(reply.error));\n else call.resolve(reply.text);\n });\n endpoint.addEventListener('error', fail);\n endpoint.addEventListener('messageerror', fail);\n endpoint.start?.();\n return {\n prompt(text) {\n if (broken) return Promise.reject(broken);\n const id = ++next;\n return new Promise((resolve, reject) => {\n pending.set(id, { resolve, reject });\n endpoint.postMessage({ id, prompt: text } satisfies AgentRequest);\n });\n },\n };\n}\n"],
|
|
5
|
+
"mappings": "AAgBA,SAAS,UAAU,MAAqC;AACtD,QAAM,QAAQ;AACd,SAAO,OAAO,OAAO,OAAO,YAAY,OAAO,MAAM,WAAW;AAClE;AAEA,SAAS,OAAO,OAAwB;AACtC,SAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D;AAEO,SAAS,WAAW,UAA2B,OAA6B;AACjF,WAAS,iBAAiB,WAAW,CAAC,EAAE,KAAK,MAAM;AACjD,QAAI,CAAC,UAAU,IAAI,EAAG;AACtB,UACG,KAAK,CAAC,UAAU,MAAM,OAAO,KAAK,MAAM,CAAC,EACzC;AAAA,MACC,CAAC,SAAS,SAAS,YAAY,EAAE,IAAI,KAAK,IAAI,KAAK,CAAsB;AAAA,MACzE,CAAC,UACC,SAAS,YAAY,EAAE,IAAI,KAAK,IAAI,OAAO,OAAO,KAAK,EAAE,CAAsB;AAAA,IACnF;AAAA,EACJ,CAAC;AACD,WAAS,QAAQ;AACnB;AAMA,SAAS,QAAQ,OAAqB;AACpC,QAAM,UAAW,MAAqB;AACtC,SAAO,IAAI,MAAM,UAAU,iBAAiB,OAAO,KAAK,iBAAiB,MAAM,IAAI,EAAE;AACvF;AAEO,SAAS,aAAa,UAAwC;AACnE,QAAM,UAAU,oBAAI,IAAyE;AAC7F,MAAI;AACJ,MAAI,OAAO;AACX,QAAM,OAAO,CAAC,UAAiB;AAC7B,aAAS,QAAQ,KAAK;AACtB,eAAW,QAAQ,QAAQ,OAAO,EAAG,MAAK,OAAO,MAAM;AACvD,YAAQ,MAAM;AAAA,EAChB;AACA,WAAS,iBAAiB,WAAW,CAAC,EAAE,KAAK,MAAM;AACjD,UAAM,QAAQ;AACd,UAAM,OAAO,QAAQ,IAAI,MAAM,EAAE;AACjC,QAAI,CAAC,KAAM;AACX,YAAQ,OAAO,MAAM,EAAE;AACvB,QAAI,WAAW,MAAO,MAAK,OAAO,IAAI,MAAM,MAAM,KAAK,CAAC;AAAA,QACnD,MAAK,QAAQ,MAAM,IAAI;AAAA,EAC9B,CAAC;AACD,WAAS,iBAAiB,SAAS,IAAI;AACvC,WAAS,iBAAiB,gBAAgB,IAAI;AAC9C,WAAS,QAAQ;AACjB,SAAO;AAAA,IACL,OAAO,MAAM;AACX,UAAI,OAAQ,QAAO,QAAQ,OAAO,MAAM;AACxC,YAAM,KAAK,EAAE;AACb,aAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,gBAAQ,IAAI,IAAI,EAAE,SAAS,OAAO,CAAC;AACnC,iBAAS,YAAY,EAAE,IAAI,QAAQ,KAAK,CAAwB;AAAA,MAClE,CAAC;AAAA,IACH;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Context } from '@earendil-works/chord';
|
|
2
|
+
import type { Models } from '@earendil-works/pi-ai/models';
|
|
3
|
+
import { type Conversation, Harness, type HarnessOptions, type ModelRef, type Registry, type Storage } from '@earendil-works/pi-durable';
|
|
4
|
+
export interface AgentOptions {
|
|
5
|
+
models: Models;
|
|
6
|
+
model: ModelRef;
|
|
7
|
+
storage?: Storage;
|
|
8
|
+
registry?: Registry;
|
|
9
|
+
settings?: HarnessOptions['settings'];
|
|
10
|
+
context?: Context;
|
|
11
|
+
}
|
|
12
|
+
export interface Agent {
|
|
13
|
+
readonly harness: Harness;
|
|
14
|
+
readonly root: Conversation;
|
|
15
|
+
prompt(text: string): Promise<string>;
|
|
16
|
+
close(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare function answerText(content: unknown): string;
|
|
19
|
+
export declare function openAgent(options: AgentOptions): Promise<Agent>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Agent } from './agent.ts';
|
|
2
|
+
export interface AgentRequest {
|
|
3
|
+
id: number;
|
|
4
|
+
prompt: string;
|
|
5
|
+
}
|
|
6
|
+
export type AgentReply = {
|
|
7
|
+
id: number;
|
|
8
|
+
text: string;
|
|
9
|
+
} | {
|
|
10
|
+
id: number;
|
|
11
|
+
error: string;
|
|
12
|
+
};
|
|
13
|
+
export interface MessageEndpoint {
|
|
14
|
+
postMessage(message: unknown): void;
|
|
15
|
+
addEventListener(type: 'message', listener: (event: MessageEvent) => void): void;
|
|
16
|
+
addEventListener(type: 'error' | 'messageerror', listener: (event: Event) => void): void;
|
|
17
|
+
start?(): void;
|
|
18
|
+
}
|
|
19
|
+
export declare function serveAgent(endpoint: MessageEndpoint, agent: Promise<Agent>): void;
|
|
20
|
+
export interface AgentClient {
|
|
21
|
+
prompt(text: string): Promise<string>;
|
|
22
|
+
}
|
|
23
|
+
export declare function connectAgent(endpoint: MessageEndpoint): AgentClient;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-agent",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "SLICC's agent core:
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "SLICC's agent core on pi durable: an agent worker, session storage, remoting and pi extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -22,24 +22,43 @@
|
|
|
22
22
|
"provenance": true
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
|
-
".":
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/types/index.d.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
}
|
|
26
29
|
},
|
|
27
30
|
"files": [
|
|
28
|
-
"
|
|
31
|
+
"dist"
|
|
29
32
|
],
|
|
30
33
|
"scripts": {
|
|
31
34
|
"prepare": "lefthook install",
|
|
35
|
+
"build": "node build.mjs && tsc -p tsconfig.build.json",
|
|
36
|
+
"prepack": "npm run build",
|
|
37
|
+
"start": "npm run build && node test/integration/chrome.mjs",
|
|
38
|
+
"pretest": "npm run build && node test/integration/build.mjs && playwright-core install --no-shell chromium",
|
|
39
|
+
"test": "node --test --test-global-setup=node_modules/@ai-ecoverse/slicc-shared-web/harness/global.mjs 'test/integration/*.test.mjs'",
|
|
40
|
+
"test:unit": "NODE_NO_WARNINGS=1 mcr -c node_modules/@ai-ecoverse/slicc-shared-web/mcr.config.mjs node --test 'test/unit/**/*.test.mjs'",
|
|
41
|
+
"typecheck": "tsc",
|
|
32
42
|
"lint": "slicc-lint",
|
|
33
43
|
"format": "biome check --write .",
|
|
34
|
-
"test": "true",
|
|
35
44
|
"trust": "npx fledgling sync -y --skip-publish",
|
|
36
45
|
"trust:dry": "npx fledgling sync --dry-run -y --skip-publish",
|
|
37
46
|
"release": "semantic-release"
|
|
38
47
|
},
|
|
39
48
|
"devDependencies": {
|
|
40
|
-
"@ai-ecoverse/slicc-shared-web": "1.
|
|
49
|
+
"@ai-ecoverse/slicc-shared-web": "1.5.0",
|
|
41
50
|
"@biomejs/biome": "2.5.15",
|
|
51
|
+
"@types/node": "24.19.1",
|
|
52
|
+
"esbuild": "0.28.2",
|
|
42
53
|
"lefthook": "2.1.16",
|
|
43
|
-
"
|
|
54
|
+
"monocart-coverage-reports": "2.13.0",
|
|
55
|
+
"playwright-core": "1.63.0",
|
|
56
|
+
"semantic-release": "25.0.9",
|
|
57
|
+
"typescript": "7.0.2"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@earendil-works/chord": "1.0.4",
|
|
61
|
+
"@earendil-works/pi-ai": "1.0.4",
|
|
62
|
+
"@earendil-works/pi-durable": "1.0.4"
|
|
44
63
|
}
|
|
45
64
|
}
|
package/src/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|