@volter/supercode-orchestrator 0.4.89 → 0.4.91

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.
Files changed (2) hide show
  1. package/board/rows.mjs +2 -2
  2. package/package.json +3 -3
package/board/rows.mjs CHANGED
@@ -8,7 +8,7 @@ export class RuntimeRows {
8
8
  constructor(db) { this.db=db; this.revision=null; this.tables=new Map(); this.runtime={}; this.clocks={}; this.cachedTasks={}; this.cachedCards={}; }
9
9
  normalized() { return Boolean(this.db.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='runtime_rows'").get()); }
10
10
  watch(mem) {
11
- mem.exec('CREATE TEMP TABLE IF NOT EXISTS _runtime_dirty (name TEXT, key TEXT, PRIMARY KEY(name,key))');
11
+ mem.exec('CREATE TEMP TABLE IF NOT EXISTS _runtime_dirty (name TEXT, key TEXT)');
12
12
  for (const {name,sql} of mem.prepare("SELECT name,sql FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").all()) {
13
13
  const columns=mem.prepare(`PRAGMA table_info(${quote(name)})`).all();
14
14
  const keys=columns.filter(c=>c.pk).sort((a,b)=>a.pk-b.pk).map(c=>c.name);
@@ -48,7 +48,7 @@ export class RuntimeRows {
48
48
  return true;
49
49
  }
50
50
  changes(mem,{all=false}={}) {
51
- const dirty=all?[...this.tables.values()].flatMap(t=>mem.prepare(`SELECT ${t.keys.map(quote).join(',')} FROM ${quote(t.name)}`).all().map(row=>({name:t.name,key:JSON.stringify(t.keys.map(k=>row[k]))}))):mem.prepare('SELECT * FROM _runtime_dirty').all();
51
+ const dirty=all?[...this.tables.values()].flatMap(t=>mem.prepare(`SELECT ${t.keys.map(quote).join(',')} FROM ${quote(t.name)}`).all().map(row=>({name:t.name,key:JSON.stringify(t.keys.map(k=>row[k]))}))):mem.prepare('SELECT DISTINCT name,key FROM _runtime_dirty').all();
52
52
  return dirty.map(({name,key})=>{
53
53
  const table=this.tables.get(name);
54
54
  const row=mem.prepare(`SELECT * FROM ${quote(name)} WHERE ${table.keys.map(k=>`${quote(k)} IS ?`).join(' AND ')}`).get(...JSON.parse(key))??null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-orchestrator",
3
- "version": "0.4.89",
3
+ "version": "0.4.91",
4
4
  "type": "module",
5
5
  "description": "The orchestrator runtime over the Volter Harness ontology: one typed operational model whose folder is its serialization, read and written through the harness orchestration doors (docs/ORCHESTRATOR-IR.md)",
6
6
  "exports": {
@@ -24,9 +24,9 @@
24
24
  "check-types": "node scripts/generate-types.mjs --check"
25
25
  },
26
26
  "dependencies": {
27
- "yaml": "^2.9.0",
28
27
  "@volter/supercode-harness-sdk": "^0.3.41",
29
- "@volter/ztrack": "^2.4.14"
28
+ "@volter/ztrack": "^2.4.15",
29
+ "yaml": "^2.9.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@chat-adapter/state-memory": "4.39.0",