knolo-core 0.3.0 → 3.1.1

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.
@@ -0,0 +1,45 @@
1
+ import type { ToolCallV1, ToolResultV1 } from './tools.js';
2
+ import type { RouteDecisionV1 } from './router.js';
3
+ export type TraceEventV1 = {
4
+ type: 'route.requested';
5
+ ts: string;
6
+ text: string;
7
+ agentCount: number;
8
+ } | {
9
+ type: 'route.decided';
10
+ ts: string;
11
+ decision: RouteDecisionV1;
12
+ selectedAgentId: string;
13
+ } | {
14
+ type: 'agent.selected';
15
+ ts: string;
16
+ agentId: string;
17
+ namespace?: string;
18
+ } | {
19
+ type: 'prompt.resolved';
20
+ ts: string;
21
+ agentId: string;
22
+ promptHash?: string;
23
+ patchKeys?: string[];
24
+ } | {
25
+ type: 'tool.requested';
26
+ ts: string;
27
+ agentId: string;
28
+ call: ToolCallV1;
29
+ } | {
30
+ type: 'tool.executed';
31
+ ts: string;
32
+ agentId: string;
33
+ result: ToolResultV1;
34
+ durationMs?: number;
35
+ } | {
36
+ type: 'run.completed';
37
+ ts: string;
38
+ agentId: string;
39
+ status: 'ok' | 'error';
40
+ };
41
+ export declare function nowIso(): string;
42
+ export declare function createTrace(): {
43
+ events: TraceEventV1[];
44
+ push(e: TraceEventV1): void;
45
+ };
package/dist/trace.js ADDED
@@ -0,0 +1,12 @@
1
+ export function nowIso() {
2
+ return new Date().toISOString();
3
+ }
4
+ export function createTrace() {
5
+ const events = [];
6
+ return {
7
+ events,
8
+ push(e) {
9
+ events.push(e);
10
+ },
11
+ };
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knolo-core",
3
- "version": "0.3.0",
3
+ "version": "3.1.1",
4
4
  "type": "module",
5
5
  "description": "Local-first knowledge packs for small LLMs.",
6
6
  "keywords": [
@@ -34,7 +34,9 @@
34
34
  "build": "tsc -p tsconfig.json",
35
35
  "prepublishOnly": "npm run build",
36
36
  "smoke": "node scripts/smoke.mjs",
37
- "test": "npm run build && node scripts/test.mjs"
37
+ "test": "npm run build && node scripts/test.mjs",
38
+ "format": "prettier --write src/agent.ts src/pack.ts src/builder.ts src/index.ts scripts/test.mjs README.md",
39
+ "format:check": "prettier --check src/agent.ts src/pack.ts src/builder.ts src/index.ts scripts/test.mjs README.md"
38
40
  },
39
41
  "devDependencies": {
40
42
  "typescript": "^5.5.0",