@plurnk/plurnk-service 1.15.0 → 1.16.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.
Files changed (88) hide show
  1. package/.env.defaults +2 -2
  2. package/SPEC.md +105 -77
  3. package/digest-sql/curation/curation.sql +1 -1
  4. package/dist/build-info.json +1 -1
  5. package/dist/core/AdmittedTurnExecutor.js +1 -1
  6. package/dist/core/AdmittedTurnExecutor.js.map +1 -1
  7. package/dist/core/BudgetReadout.d.ts.map +1 -1
  8. package/dist/core/BudgetReadout.js +28 -42
  9. package/dist/core/BudgetReadout.js.map +1 -1
  10. package/dist/core/Engine.sql +2 -8
  11. package/dist/core/PacketBuilder.d.ts.map +1 -1
  12. package/dist/core/PacketBuilder.js +3 -4
  13. package/dist/core/PacketBuilder.js.map +1 -1
  14. package/dist/core/ResourceSelector.d.ts.map +1 -1
  15. package/dist/core/ResourceSelector.js +36 -7
  16. package/dist/core/ResourceSelector.js.map +1 -1
  17. package/dist/core/ResourceTransfers.d.ts.map +1 -1
  18. package/dist/core/ResourceTransfers.js +72 -7
  19. package/dist/core/ResourceTransfers.js.map +1 -1
  20. package/dist/core/SendBroadcastHandler.js +2 -2
  21. package/dist/core/SendBroadcastHandler.js.map +1 -1
  22. package/dist/core/ToolResources.js +2 -2
  23. package/dist/core/ToolResources.js.map +1 -1
  24. package/dist/core/TurnMaterialization.d.ts.map +1 -1
  25. package/dist/core/TurnMaterialization.js +0 -11
  26. package/dist/core/TurnMaterialization.js.map +1 -1
  27. package/dist/core/TurnOps.js +2 -2
  28. package/dist/core/TurnOps.js.map +1 -1
  29. package/dist/core/TurnRunner.js +3 -3
  30. package/dist/core/TurnRunner.js.map +1 -1
  31. package/dist/core/attachments.js +2 -2
  32. package/dist/core/attachments.js.map +1 -1
  33. package/dist/core/fork.d.ts.map +1 -1
  34. package/dist/core/fork.js +0 -4
  35. package/dist/core/fork.js.map +1 -1
  36. package/dist/core/fork.sql +5 -16
  37. package/dist/core/mutation-types.d.ts +1 -0
  38. package/dist/core/mutation-types.d.ts.map +1 -1
  39. package/dist/core/packet-wire.d.ts.map +1 -1
  40. package/dist/core/packet-wire.js +39 -62
  41. package/dist/core/packet-wire.js.map +1 -1
  42. package/dist/core/turn-signals.d.ts +1 -1
  43. package/dist/core/turn-signals.d.ts.map +1 -1
  44. package/dist/core/turn-signals.js +1 -1
  45. package/dist/core/turn-signals.js.map +1 -1
  46. package/dist/digest/DigestRender.d.ts.map +1 -1
  47. package/dist/digest/DigestRender.js +1 -4
  48. package/dist/digest/DigestRender.js.map +1 -1
  49. package/dist/digest/digest-rows.d.ts +0 -3
  50. package/dist/digest/digest-rows.d.ts.map +1 -1
  51. package/dist/digest/digest.sql +1 -7
  52. package/dist/schemes/Exec.d.ts.map +1 -1
  53. package/dist/schemes/Exec.js +6 -10
  54. package/dist/schemes/Exec.js.map +1 -1
  55. package/dist/schemes/ExecOutputScheme.js +1 -1
  56. package/dist/schemes/ExecOutputScheme.js.map +1 -1
  57. package/dist/schemes/File.d.ts.map +1 -1
  58. package/dist/schemes/File.js +31 -10
  59. package/dist/schemes/File.js.map +1 -1
  60. package/dist/schemes/Log.d.ts.map +1 -1
  61. package/dist/schemes/Log.js +7 -21
  62. package/dist/schemes/Log.js.map +1 -1
  63. package/dist/schemes/Log.sql +1 -66
  64. package/dist/schemes/Prompt.js +1 -1
  65. package/dist/schemes/Prompt.js.map +1 -1
  66. package/dist/schemes/Worker.js +1 -1
  67. package/dist/schemes/Worker.js.map +1 -1
  68. package/dist/schemes/_entry-crud.d.ts +3 -0
  69. package/dist/schemes/_entry-crud.d.ts.map +1 -1
  70. package/dist/schemes/_entry-crud.js +18 -3
  71. package/dist/schemes/_entry-crud.js.map +1 -1
  72. package/dist/schemes/_entry-find.d.ts.map +1 -1
  73. package/dist/schemes/_entry-find.js +16 -5
  74. package/dist/schemes/_entry-find.js.map +1 -1
  75. package/dist/schemes/_entry-ops.d.ts.map +1 -1
  76. package/dist/schemes/_entry-ops.js +9 -1
  77. package/dist/schemes/_entry-ops.js.map +1 -1
  78. package/dist/schemes/_entry-send.js +1 -1
  79. package/dist/schemes/_entry-send.js.map +1 -1
  80. package/dist/server/FunctionalityManager.js +1 -1
  81. package/dist/server/FunctionalityManager.js.map +1 -1
  82. package/dist/server/logEntry.d.ts +0 -1
  83. package/dist/server/logEntry.d.ts.map +1 -1
  84. package/dist/server/logEntry.js +1 -13
  85. package/dist/server/logEntry.js.map +1 -1
  86. package/dist/server/logEntry.sql +1 -5
  87. package/migrations/001_schema.sql +9 -255
  88. package/package.json +30 -30
@@ -10,11 +10,7 @@ SELECT le.*, l.sequence AS loop_seq, t.sequence AS turn_seq,
10
10
  AND json_type(t.packet, '$.assistant.reasoning') = 'text'
11
11
  AND length(json_extract(t.packet, '$.assistant.reasoning')) > 0
12
12
  THEN json_extract(t.packet, '$.assistant.reasoning')
13
- END AS reasoning,
14
- COALESCE((
15
- SELECT json_group_array(tag)
16
- FROM (SELECT tag FROM log_tags WHERE log_entry_id = le.id ORDER BY tag)
17
- ), '[]') AS tags
13
+ END AS reasoning
18
14
  FROM log_entries le
19
15
  JOIN loops l ON l.id = le.loop_id
20
16
  JOIN turns t ON t.id = le.turn_id
@@ -165,7 +165,6 @@ CREATE TABLE IF NOT EXISTS ambient_events (
165
165
  state TEXT NOT NULL CHECK (state IN ('resolved', 'failed', 'cancelled')),
166
166
  outcome TEXT,
167
167
  attrs TEXT NOT NULL DEFAULT '{}' CHECK (json_valid(attrs)),
168
- tags TEXT NOT NULL DEFAULT '[]' CHECK (json_valid(tags) AND json_type(tags) = 'array'),
169
168
  terminated_by TEXT CHECK (terminated_by IS NULL OR terminated_by = 'cancel'),
170
169
  created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
171
170
  CHECK (target_parent_worker_id IS NOT NULL OR workspace_broadcast = 1),
@@ -1432,117 +1431,7 @@ BEGIN
1432
1431
  SELECT RAISE(ABORT, 'log entry model call does not match its represented result');
1433
1432
  END;
1434
1433
 
1435
- -- {§log-item-tags} — log classification plus OPEN/FOLD selection and mutation.
1436
- -- A containing-history teardown cascades its classifications; log KILL leaves
1437
- -- both the event and its forensic classifications intact.
1438
- CREATE TABLE IF NOT EXISTS log_tags (
1439
- log_entry_id INTEGER NOT NULL,
1440
- tag TEXT NOT NULL,
1441
- PRIMARY KEY (log_entry_id, tag),
1442
- FOREIGN KEY (log_entry_id) REFERENCES log_entries(id) ON DELETE CASCADE
1443
- ) STRICT, WITHOUT ROWID;
1444
-
1445
- -- The relational table owns stored tag identity. Producers and curation
1446
- -- signals carry signs, but the stored name never does; delimiters, whitespace,
1447
- -- and control characters cannot become durable classifications through a
1448
- -- private SQL caller either.
1449
- CREATE TRIGGER IF NOT EXISTS log_tags_name_valid
1450
- BEFORE INSERT ON log_tags
1451
- WHEN length(NEW.tag) = 0
1452
- OR substr(NEW.tag, 1, 1) IN ('+', '-')
1453
- OR instr(NEW.tag, '[') > 0
1454
- OR instr(NEW.tag, ']') > 0
1455
- OR instr(NEW.tag, ',') > 0
1456
- OR instr(NEW.tag, char(0)) > 0
1457
- OR EXISTS (
1458
- WITH RECURSIVE offsets(position) AS (
1459
- SELECT 1
1460
- UNION ALL
1461
- SELECT position + 1 FROM offsets WHERE position < length(NEW.tag)
1462
- )
1463
- SELECT 1
1464
- FROM offsets
1465
- WHERE unicode(substr(NEW.tag, position, 1)) BETWEEN 0 AND 32
1466
- OR unicode(substr(NEW.tag, position, 1)) BETWEEN 127 AND 159
1467
- OR unicode(substr(NEW.tag, position, 1)) IN (160, 5760, 8232, 8233, 8239, 8287, 12288, 65279)
1468
- OR unicode(substr(NEW.tag, position, 1)) BETWEEN 8192 AND 8202
1469
- )
1470
- BEGIN
1471
- SELECT RAISE(ABORT, 'log tag name is invalid');
1472
- END;
1473
1434
 
1474
- CREATE INDEX IF NOT EXISTS log_tags_tag ON log_tags (tag);
1475
-
1476
- -- {§worker-initialization-entry} {§overflow-turn-script} — the turn identity
1477
- -- classifies every row in a kernel-authored recovery/orientation turn. No
1478
- -- caller can omit provenance from either its exact turnOps or its operation
1479
- -- outcomes.
1480
- CREATE TRIGGER IF NOT EXISTS log_entries_classify_plurnk_turn
1481
- AFTER INSERT ON log_entries
1482
- WHEN EXISTS (
1483
- SELECT 1
1484
- FROM turns
1485
- WHERE turns.id = NEW.turn_id
1486
- AND turns.producer = '_plurnk'
1487
- AND turns.kind IN ('initialization', 'overflow')
1488
- )
1489
- BEGIN
1490
- INSERT OR IGNORE INTO log_tags (log_entry_id, tag)
1491
- VALUES (NEW.id, '_plurnk');
1492
- INSERT OR IGNORE INTO log_tags (log_entry_id, tag)
1493
- SELECT NEW.id, CASE turns.kind
1494
- WHEN 'initialization' THEN 'init'
1495
- ELSE 'overflow'
1496
- END
1497
- FROM turns
1498
- WHERE turns.id = NEW.turn_id;
1499
-
1500
- UPDATE ambient_events
1501
- SET tags = COALESCE((
1502
- SELECT json_group_array(tag)
1503
- FROM (SELECT tag FROM log_tags WHERE log_entry_id = NEW.id ORDER BY tag)
1504
- ), '[]')
1505
- WHERE kind = 'activity'
1506
- AND producer_worker_id = NEW.worker_id
1507
- AND source_record_id = NEW.id;
1508
- END;
1509
-
1510
- -- Overflow admission reclassifies a would-be inference turn only after its
1511
- -- pre-model rows exist. Apply the same turn-owned classification to those
1512
- -- rows; later rows are covered by log_entries_classify_plurnk_turn above.
1513
- CREATE TRIGGER IF NOT EXISTS turns_classify_existing_plurnk_rows
1514
- AFTER UPDATE OF producer, kind ON turns
1515
- WHEN NEW.producer = '_plurnk'
1516
- AND NEW.kind IN ('initialization', 'overflow')
1517
- BEGIN
1518
- INSERT OR IGNORE INTO log_tags (log_entry_id, tag)
1519
- SELECT id, '_plurnk' FROM log_entries WHERE turn_id = NEW.id;
1520
- INSERT OR IGNORE INTO log_tags (log_entry_id, tag)
1521
- SELECT id, CASE NEW.kind
1522
- WHEN 'initialization' THEN 'init'
1523
- ELSE 'overflow'
1524
- END
1525
- FROM log_entries
1526
- WHERE turn_id = NEW.id;
1527
-
1528
- UPDATE ambient_events
1529
- SET tags = COALESCE((
1530
- SELECT json_group_array(tag)
1531
- FROM (
1532
- SELECT lt.tag
1533
- FROM log_tags lt
1534
- WHERE lt.log_entry_id = ambient_events.source_record_id
1535
- ORDER BY lt.tag
1536
- )
1537
- ), '[]')
1538
- WHERE kind = 'activity'
1539
- AND producer_worker_id = (
1540
- SELECT l.worker_id FROM loops l WHERE l.id = NEW.loop_id
1541
- )
1542
- AND source_record_id IN (
1543
- SELECT id FROM log_entries WHERE turn_id = NEW.id
1544
- );
1545
- END;
1546
1435
 
1547
1436
  -- Successful OPEN/FOLD/log-KILL rows are durable curation events even though
1548
1437
  -- their ordinary packet projection is suppressed. Preserve the exact selected
@@ -1557,10 +1446,6 @@ CREATE TABLE IF NOT EXISTS log_curation_effects (
1557
1446
  CHECK (json_valid(folded_before) AND json_type(folded_before) = 'array'),
1558
1447
  folded_after TEXT NOT NULL
1559
1448
  CHECK (json_valid(folded_after) AND json_type(folded_after) = 'array'),
1560
- tags_added TEXT NOT NULL DEFAULT '[]'
1561
- CHECK (json_valid(tags_added) AND json_type(tags_added) = 'array'),
1562
- tags_removed TEXT NOT NULL DEFAULT '[]'
1563
- CHECK (json_valid(tags_removed) AND json_type(tags_removed) = 'array'),
1564
1449
  PRIMARY KEY (operation_log_entry_id, target_log_entry_id),
1565
1450
  CHECK (operation_log_entry_id != target_log_entry_id),
1566
1451
  FOREIGN KEY (operation_log_entry_id) REFERENCES log_entries(id) ON DELETE CASCADE,
@@ -1593,7 +1478,7 @@ END;
1593
1478
 
1594
1479
  -- Make an invalid curation record structurally unavailable: the event must be
1595
1480
  -- one successful OPEN/FOLD/log-KILL row, both rows must belong to the same
1596
- -- worker, and its state transition and exact tag deltas must match that op.
1481
+ -- worker, and its state transition must match that op.
1597
1482
  CREATE TRIGGER IF NOT EXISTS log_curation_effects_valid
1598
1483
  BEFORE INSERT ON log_curation_effects
1599
1484
  BEGIN
@@ -1621,8 +1506,6 @@ BEGIN
1621
1506
  OR (
1622
1507
  NEW.active_after = 0
1623
1508
  AND json(NEW.folded_before) = json(NEW.folded_after)
1624
- AND json_array_length(NEW.tags_added) = 0
1625
- AND json_array_length(NEW.tags_removed) = 0
1626
1509
  )
1627
1510
  )
1628
1511
  )
@@ -1659,43 +1542,6 @@ BEGIN
1659
1542
  )
1660
1543
  )
1661
1544
  )
1662
- OR EXISTS (
1663
- SELECT 1
1664
- FROM (
1665
- SELECT value, type FROM json_each(NEW.tags_added)
1666
- UNION ALL
1667
- SELECT value, type FROM json_each(NEW.tags_removed)
1668
- ) tag
1669
- WHERE tag.type != 'text'
1670
- OR length(tag.value) = 0
1671
- OR substr(tag.value, 1, 1) IN ('+', '-')
1672
- OR instr(tag.value, '[') > 0
1673
- OR instr(tag.value, ']') > 0
1674
- OR instr(tag.value, ',') > 0
1675
- OR instr(tag.value, char(0)) > 0
1676
- OR EXISTS (
1677
- WITH RECURSIVE offsets(position) AS (
1678
- SELECT 1
1679
- UNION ALL
1680
- SELECT position + 1 FROM offsets WHERE position < length(tag.value)
1681
- )
1682
- SELECT 1
1683
- FROM offsets
1684
- WHERE unicode(substr(tag.value, position, 1)) BETWEEN 0 AND 32
1685
- OR unicode(substr(tag.value, position, 1)) BETWEEN 127 AND 159
1686
- OR unicode(substr(tag.value, position, 1)) IN (160, 5760, 8232, 8233, 8239, 8287, 12288, 65279)
1687
- OR unicode(substr(tag.value, position, 1)) BETWEEN 8192 AND 8202
1688
- )
1689
- )
1690
- OR (SELECT COUNT(*) FROM json_each(NEW.tags_added))
1691
- != (SELECT COUNT(DISTINCT value) FROM json_each(NEW.tags_added))
1692
- OR (SELECT COUNT(*) FROM json_each(NEW.tags_removed))
1693
- != (SELECT COUNT(DISTINCT value) FROM json_each(NEW.tags_removed))
1694
- OR EXISTS (
1695
- SELECT 1
1696
- FROM json_each(NEW.tags_added) addition
1697
- JOIN json_each(NEW.tags_removed) removal ON removal.value = addition.value
1698
- )
1699
1545
  THEN RAISE(ABORT, 'invalid log curation effect') END;
1700
1546
  END;
1701
1547
 
@@ -1715,7 +1561,7 @@ BEGIN
1715
1561
  END;
1716
1562
 
1717
1563
  -- One outer INSERT owns the whole landed curation event: exact selected rows,
1718
- -- their before/after projection and tag deltas, and the resulting current
1564
+ -- their before/after projection, and the resulting current
1719
1565
  -- state. Trigger failure rolls the operation row and all effects back together.
1720
1566
  -- The private plan is erased before INSERT returns.
1721
1567
  -- {§log-kill-scope} — a log KILL either retires a row whole (active 1→0, visibility untouched)
@@ -1729,8 +1575,6 @@ WHEN NEW.op = 'KILL'
1729
1575
  BEGIN
1730
1576
  SELECT CASE WHEN
1731
1577
  COALESCE(json_type(NEW.attrs, '$.__plurnk_curation.targets'), '') != 'array'
1732
- OR COALESCE(json_type(NEW.attrs, '$.__plurnk_curation.add'), '') != 'array'
1733
- OR COALESCE(json_type(NEW.attrs, '$.__plurnk_curation.remove'), '') != 'array'
1734
1578
  OR json_array_length(NEW.attrs, '$.__plurnk_curation.targets') = 0
1735
1579
  OR EXISTS (
1736
1580
  SELECT 1
@@ -1807,50 +1651,6 @@ BEGIN
1807
1651
  )
1808
1652
  )
1809
1653
  )
1810
- OR EXISTS (
1811
- SELECT 1
1812
- FROM (
1813
- SELECT value, type FROM json_each(NEW.attrs, '$.__plurnk_curation.add')
1814
- UNION ALL
1815
- SELECT value, type FROM json_each(NEW.attrs, '$.__plurnk_curation.remove')
1816
- ) tag
1817
- WHERE tag.type != 'text'
1818
- OR length(tag.value) = 0
1819
- OR substr(tag.value, 1, 1) IN ('+', '-')
1820
- OR instr(tag.value, '[') > 0
1821
- OR instr(tag.value, ']') > 0
1822
- OR instr(tag.value, ',') > 0
1823
- OR instr(tag.value, char(0)) > 0
1824
- OR EXISTS (
1825
- WITH RECURSIVE offsets(position) AS (
1826
- SELECT 1
1827
- UNION ALL
1828
- SELECT position + 1 FROM offsets WHERE position < length(tag.value)
1829
- )
1830
- SELECT 1
1831
- FROM offsets
1832
- WHERE unicode(substr(tag.value, position, 1)) BETWEEN 0 AND 32
1833
- OR unicode(substr(tag.value, position, 1)) BETWEEN 127 AND 159
1834
- OR unicode(substr(tag.value, position, 1)) IN (160, 5760, 8232, 8233, 8239, 8287, 12288, 65279)
1835
- OR unicode(substr(tag.value, position, 1)) BETWEEN 8192 AND 8202
1836
- )
1837
- )
1838
- OR (
1839
- SELECT COUNT(*) FROM json_each(NEW.attrs, '$.__plurnk_curation.add')
1840
- ) != (
1841
- SELECT COUNT(DISTINCT value) FROM json_each(NEW.attrs, '$.__plurnk_curation.add')
1842
- )
1843
- OR (
1844
- SELECT COUNT(*) FROM json_each(NEW.attrs, '$.__plurnk_curation.remove')
1845
- ) != (
1846
- SELECT COUNT(DISTINCT value) FROM json_each(NEW.attrs, '$.__plurnk_curation.remove')
1847
- )
1848
- OR EXISTS (
1849
- SELECT 1
1850
- FROM json_each(NEW.attrs, '$.__plurnk_curation.add') addition
1851
- JOIN json_each(NEW.attrs, '$.__plurnk_curation.remove') removal
1852
- ON removal.value = addition.value
1853
- )
1854
1654
  THEN RAISE(ABORT, 'invalid private log curation payload') END;
1855
1655
 
1856
1656
  INSERT INTO log_curation_effects (
@@ -1859,9 +1659,7 @@ BEGIN
1859
1659
  active_before,
1860
1660
  active_after,
1861
1661
  folded_before,
1862
- folded_after,
1863
- tags_added,
1864
- tags_removed
1662
+ folded_after
1865
1663
  )
1866
1664
  SELECT
1867
1665
  NEW.id,
@@ -1869,31 +1667,7 @@ BEGIN
1869
1667
  json_extract(selected.value, '$.activeBefore'),
1870
1668
  json_extract(selected.value, '$.activeAfter'),
1871
1669
  json_extract(selected.value, '$.foldedBefore'),
1872
- json_extract(selected.value, '$.foldedAfter'),
1873
- COALESCE((
1874
- SELECT json_group_array(ordered.tag)
1875
- FROM (
1876
- SELECT addition.value AS tag
1877
- FROM json_each(NEW.attrs, '$.__plurnk_curation.add') addition
1878
- WHERE NOT EXISTS (
1879
- SELECT 1 FROM log_tags
1880
- WHERE log_entry_id = target.id AND tag = addition.value
1881
- )
1882
- ORDER BY addition.value
1883
- ) ordered
1884
- ), '[]'),
1885
- COALESCE((
1886
- SELECT json_group_array(ordered.tag)
1887
- FROM (
1888
- SELECT removal.value AS tag
1889
- FROM json_each(NEW.attrs, '$.__plurnk_curation.remove') removal
1890
- WHERE EXISTS (
1891
- SELECT 1 FROM log_tags
1892
- WHERE log_entry_id = target.id AND tag = removal.value
1893
- )
1894
- ORDER BY removal.value
1895
- ) ordered
1896
- ), '[]')
1670
+ json_extract(selected.value, '$.foldedAfter')
1897
1671
  FROM json_each(NEW.attrs, '$.__plurnk_curation.targets') selected
1898
1672
  JOIN log_entries target ON target.id = json_extract(selected.value, '$.id');
1899
1673
 
@@ -1913,20 +1687,6 @@ BEGIN
1913
1687
  FROM json_each(NEW.attrs, '$.__plurnk_curation.targets')
1914
1688
  );
1915
1689
 
1916
- DELETE FROM log_tags
1917
- WHERE log_entry_id IN (
1918
- SELECT json_extract(value, '$.id')
1919
- FROM json_each(NEW.attrs, '$.__plurnk_curation.targets')
1920
- )
1921
- AND tag IN (
1922
- SELECT value FROM json_each(NEW.attrs, '$.__plurnk_curation.remove')
1923
- );
1924
-
1925
- INSERT OR IGNORE INTO log_tags (log_entry_id, tag)
1926
- SELECT json_extract(selected.value, '$.id'), addition.value
1927
- FROM json_each(NEW.attrs, '$.__plurnk_curation.targets') selected
1928
- CROSS JOIN json_each(NEW.attrs, '$.__plurnk_curation.add') addition;
1929
-
1930
1690
  UPDATE log_entries
1931
1691
  SET attrs = json_remove(attrs, '$.__plurnk_curation')
1932
1692
  WHERE id = NEW.id;
@@ -2026,13 +1786,7 @@ FROM (
2026
1786
  le.status_rx,
2027
1787
  le.state,
2028
1788
  le.outcome,
2029
- json_remove(le.attrs, '$.__plurnk_curation') AS attrs,
2030
- COALESCE((
2031
- SELECT json_group_array(ordered.tag)
2032
- FROM (
2033
- SELECT tag FROM log_tags WHERE log_entry_id = le.id ORDER BY tag
2034
- ) ordered
2035
- ), '[]') AS tags
1789
+ json_remove(le.attrs, '$.__plurnk_curation') AS attrs
2036
1790
  FROM log_entries le
2037
1791
  JOIN workers w ON w.id = le.worker_id
2038
1792
  JOIN loops l ON l.id = le.loop_id
@@ -2062,14 +1816,14 @@ BEGIN
2062
1816
  op, delimiter, signal,
2063
1817
  scheme, username, password, hostname, port, pathname, query, fragment,
2064
1818
  line_marker, tx, mimetype_tx, rx, mimetype_rx, status_rx,
2065
- state, outcome, attrs, tags
1819
+ state, outcome, attrs
2066
1820
  )
2067
1821
  SELECT workspace_id, producer_worker_id, target_parent_worker_id,
2068
1822
  workspace_broadcast, 'activity', source_record_id, at, source,
2069
1823
  op, delimiter, signal,
2070
1824
  scheme, username, password, hostname, port, pathname, query, fragment,
2071
1825
  line_marker, tx, mimetype_tx, rx, mimetype_rx, status_rx,
2072
- state, outcome, attrs, tags
1826
+ state, outcome, attrs
2073
1827
  FROM ambient_activity_candidates
2074
1828
  WHERE source_record_id = NEW.id;
2075
1829
 
@@ -2100,14 +1854,14 @@ BEGIN
2100
1854
  op, delimiter, signal,
2101
1855
  scheme, username, password, hostname, port, pathname, query, fragment,
2102
1856
  line_marker, tx, mimetype_tx, rx, mimetype_rx, status_rx,
2103
- state, outcome, attrs, tags
1857
+ state, outcome, attrs
2104
1858
  )
2105
1859
  SELECT workspace_id, producer_worker_id, target_parent_worker_id,
2106
1860
  workspace_broadcast, 'activity', source_record_id, at, source,
2107
1861
  op, delimiter, signal,
2108
1862
  scheme, username, password, hostname, port, pathname, query, fragment,
2109
1863
  line_marker, tx, mimetype_tx, rx, mimetype_rx, status_rx,
2110
- state, outcome, attrs, tags
1864
+ state, outcome, attrs
2111
1865
  FROM ambient_activity_candidates
2112
1866
  WHERE source_record_id = NEW.id;
2113
1867
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-service",
3
- "version": "1.15.0",
3
+ "version": "1.16.1",
4
4
  "description": "Plurnk agent runtime — the server / engine / core. Implements the @plurnk/plurnk-contracts contract.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -87,41 +87,41 @@
87
87
  "@opentelemetry/resources": "^2.11.0",
88
88
  "@opentelemetry/sdk-metrics": "^2.11.0",
89
89
  "@opentelemetry/sdk-trace-base": "^2.11.0",
90
- "@plurnk/gbnf": "1.15.0",
91
- "@plurnk/plurnk-a2a": "1.15.0",
92
- "@plurnk/plurnk-agui": "1.15.0",
93
- "@plurnk/plurnk-contracts": "1.15.0",
94
- "@plurnk/plurnk-execs": "1.15.0",
95
- "@plurnk/plurnk-execs-common": "1.15.0",
96
- "@plurnk/plurnk-execs-jq": "1.15.0",
97
- "@plurnk/plurnk-execs-sqlite": "1.15.0",
98
- "@plurnk/plurnk-hooks": "1.15.0",
99
- "@plurnk/plurnk-mcp": "1.15.0",
100
- "@plurnk/plurnk-meta": "1.15.0",
101
- "@plurnk/plurnk-mimetypes": "1.15.0",
102
- "@plurnk/plurnk-mimetypes-application-ipynb": "1.15.0",
103
- "@plurnk/plurnk-mimetypes-application-json": "1.15.0",
104
- "@plurnk/plurnk-mimetypes-application-jsonl": "1.15.0",
105
- "@plurnk/plurnk-mimetypes-application-xml": "1.15.0",
106
- "@plurnk/plurnk-mimetypes-embeddings": "1.15.0",
107
- "@plurnk/plurnk-mimetypes-text-csv": "1.15.0",
108
- "@plurnk/plurnk-mimetypes-text-diff": "1.15.0",
109
- "@plurnk/plurnk-mimetypes-text-dotenv": "1.15.0",
110
- "@plurnk/plurnk-mimetypes-text-html": "1.15.0",
111
- "@plurnk/plurnk-mimetypes-text-ini": "1.15.0",
112
- "@plurnk/plurnk-mimetypes-text-markdown": "1.15.0",
113
- "@plurnk/plurnk-mimetypes-text-plain": "1.15.0",
114
- "@plurnk/plurnk-models": "1.15.0",
115
- "@plurnk/plurnk-providers": "1.15.0",
116
- "@plurnk/plurnk-schemes": "1.15.0",
117
- "@plurnk/plurnk-schemes-http": "1.15.0",
90
+ "@plurnk/gbnf": "1.16.1",
91
+ "@plurnk/plurnk-a2a": "1.16.1",
92
+ "@plurnk/plurnk-agui": "1.16.1",
93
+ "@plurnk/plurnk-contracts": "1.16.1",
94
+ "@plurnk/plurnk-execs": "1.16.1",
95
+ "@plurnk/plurnk-execs-common": "1.16.1",
96
+ "@plurnk/plurnk-execs-jq": "1.16.1",
97
+ "@plurnk/plurnk-execs-sqlite": "1.16.1",
98
+ "@plurnk/plurnk-hooks": "1.16.1",
99
+ "@plurnk/plurnk-mcp": "1.16.1",
100
+ "@plurnk/plurnk-meta": "1.16.1",
101
+ "@plurnk/plurnk-mimetypes": "1.16.1",
102
+ "@plurnk/plurnk-mimetypes-application-ipynb": "1.16.1",
103
+ "@plurnk/plurnk-mimetypes-application-json": "1.16.1",
104
+ "@plurnk/plurnk-mimetypes-application-jsonl": "1.16.1",
105
+ "@plurnk/plurnk-mimetypes-application-xml": "1.16.1",
106
+ "@plurnk/plurnk-mimetypes-embeddings": "1.16.1",
107
+ "@plurnk/plurnk-mimetypes-text-csv": "1.16.1",
108
+ "@plurnk/plurnk-mimetypes-text-diff": "1.16.1",
109
+ "@plurnk/plurnk-mimetypes-text-dotenv": "1.16.1",
110
+ "@plurnk/plurnk-mimetypes-text-html": "1.16.1",
111
+ "@plurnk/plurnk-mimetypes-text-ini": "1.16.1",
112
+ "@plurnk/plurnk-mimetypes-text-markdown": "1.16.1",
113
+ "@plurnk/plurnk-mimetypes-text-plain": "1.16.1",
114
+ "@plurnk/plurnk-models": "1.16.1",
115
+ "@plurnk/plurnk-providers": "1.16.1",
116
+ "@plurnk/plurnk-schemes": "1.16.1",
117
+ "@plurnk/plurnk-schemes-http": "1.16.1",
118
118
  "@possumtech/sqlrite": "^6.5.2",
119
119
  "diff": "^9.0.0",
120
120
  "yaml": "^2.9.0"
121
121
  },
122
122
  "devDependencies": {
123
123
  "@opentelemetry/core": "^2.11.0",
124
- "@plurnk/plurnk-mimetypes-tokenizers": "1.15.0",
124
+ "@plurnk/plurnk-mimetypes-tokenizers": "1.16.1",
125
125
  "@types/diff": "^7.0.2"
126
126
  },
127
127
  "homepage": "https://github.com/plurnk/plurnk-service/tree/main/plurnk-core#readme",