@agentic-surfaces/core 0.1.17 → 0.1.19

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/dist/cache.d.ts CHANGED
@@ -6,6 +6,14 @@ export declare class SqliteCache implements Cache {
6
6
  setCursor(k: string, v: string): void;
7
7
  isSeen(k: string): boolean;
8
8
  markSeen(k: string): void;
9
+ entries(): {
10
+ seen: string[];
11
+ cursors: Array<{
12
+ key: string;
13
+ value: string;
14
+ }>;
15
+ };
16
+ forget(k: string): void;
9
17
  wipe(): void;
10
18
  close(): void;
11
19
  }
package/dist/cache.js CHANGED
@@ -21,6 +21,15 @@ export class SqliteCache {
21
21
  markSeen(k) {
22
22
  this.db.prepare("INSERT OR IGNORE INTO seen(key) VALUES(?)").run(k);
23
23
  }
24
+ entries() {
25
+ const seen = this.db.prepare("SELECT key FROM seen ORDER BY key").all().map((r) => r.key);
26
+ const cursors = this.db.prepare("SELECT key, value FROM cursors ORDER BY key").all();
27
+ return { seen, cursors };
28
+ }
29
+ forget(k) {
30
+ this.db.prepare("DELETE FROM seen WHERE key = ?").run(k);
31
+ this.db.prepare("DELETE FROM cursors WHERE key = ?").run(k);
32
+ }
24
33
  wipe() {
25
34
  this.db.exec("DELETE FROM cursors; DELETE FROM seen;");
26
35
  }
package/dist/executor.js CHANGED
@@ -11,7 +11,7 @@ export async function runWorkflow(opts) {
11
11
  };
12
12
  const queue = [triggerNodeId];
13
13
  const visited = new Set();
14
- observer?.onRunStart?.(workflow.name);
14
+ observer?.onRunStart?.(workflow.name, ctx.triggerPayload);
15
15
  while (queue.length > 0) {
16
16
  const id = queue.shift();
17
17
  if (visited.has(id))
package/dist/schema.js CHANGED
@@ -23,6 +23,7 @@ const node = z.object({
23
23
  const edge = z.object({ from: z.string().min(1), to: z.string().min(1), when: z.string().optional() });
24
24
  const workflow = z.object({
25
25
  name: z.string().min(1),
26
+ title: z.string().min(1).optional(),
26
27
  nodes: z.array(node).min(1),
27
28
  edges: z.array(edge).default([]),
28
29
  }).superRefine((wf, ctx) => {
package/dist/types.d.ts CHANGED
@@ -20,6 +20,8 @@ export interface WorkflowEdge {
20
20
  }
21
21
  export interface Workflow {
22
22
  name: string;
23
+ /** Human-readable display name for the UI (falls back to `name` when omitted). */
24
+ title?: string;
23
25
  nodes: WorkflowNode[];
24
26
  edges: WorkflowEdge[];
25
27
  }
@@ -32,6 +34,16 @@ export interface Cache {
32
34
  setCursor(k: string, v: string): void;
33
35
  isSeen(k: string): boolean;
34
36
  markSeen(k: string): void;
37
+ /** Inspect all cache contents (seen-set + cursors) — for the dashboard's cache view. */
38
+ entries(): {
39
+ seen: string[];
40
+ cursors: Array<{
41
+ key: string;
42
+ value: string;
43
+ }>;
44
+ };
45
+ /** Forget a single key (seen + cursor) so it gets reprocessed. */
46
+ forget(k: string): void;
35
47
  wipe(): void;
36
48
  }
37
49
  export interface Services {
@@ -65,7 +77,7 @@ export interface NodeHandler {
65
77
  execute(node: WorkflowNode, ctx: RunContext): Promise<NodeResult>;
66
78
  }
67
79
  export interface RunObserver {
68
- onRunStart?(workflow: string): void;
80
+ onRunStart?(workflow: string, payload?: unknown): void;
69
81
  onNodeStart?(nodeId: string): void;
70
82
  onNodeFinish?(nodeId: string, status: "success" | "failed", meta?: unknown): void;
71
83
  onRunFinish?(workflow: string, status: "success" | "failed"): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentic-surfaces/core",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -23,7 +23,7 @@
23
23
  "jsonata": "^2.2.1",
24
24
  "yaml": "^2.9.0",
25
25
  "zod": "^4.4.3",
26
- "@agentic-surfaces/agent": "0.1.17"
26
+ "@agentic-surfaces/agent": "0.1.19"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/better-sqlite3": "^7.6.13",