@north-light/crouter 0.3.203 → 0.3.205

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 (97) hide show
  1. package/dist/api/dto/broker.d.ts +2 -0
  2. package/dist/api/dto/nodes.d.ts +8 -5
  3. package/dist/api/index.d.ts +1 -0
  4. package/dist/api/index.js +1 -0
  5. package/dist/clients/attach/__tests__/context-message.test.js +54 -19
  6. package/dist/clients/attach/__tests__/page-block.test.d.ts +1 -0
  7. package/dist/clients/attach/__tests__/page-block.test.js +54 -0
  8. package/dist/clients/attach/render/chat-view.d.ts +3 -0
  9. package/dist/clients/attach/render/chat-view.js +56 -27
  10. package/dist/clients/attach/render/context-message.d.ts +6 -0
  11. package/dist/clients/attach/render/context-message.js +21 -3
  12. package/dist/clients/attach/render/group-activity.d.ts +5 -3
  13. package/dist/clients/attach/render/group-activity.js +10 -6
  14. package/dist/clients/attach/render/page-block.js +11 -11
  15. package/dist/clients/attach/viewer.js +717 -703
  16. package/dist/clients/conversation/projection.js +7 -37
  17. package/dist/commands/node/create.js +1 -1
  18. package/dist/commands/profile/project.js +1 -1
  19. package/dist/commands/profile/show.js +1 -1
  20. package/dist/commands/profile.js +1 -1
  21. package/dist/core/__tests__/canvas-inbox-watcher.test.js +88 -21
  22. package/dist/core/__tests__/human-deliver.test.js +66 -5
  23. package/dist/core/__tests__/serial/broker-snapshot-history.test.js +5 -2
  24. package/dist/core/__tests__/serial/deferred-no-wake.test.js +7 -4
  25. package/dist/core/__tests__/serial/flagship-lifecycle.test.js +2 -1
  26. package/dist/core/__tests__/serial/human-deliver-e2e.test.js +4 -1
  27. package/dist/core/__tests__/serial/revive.test.js +8 -3
  28. package/dist/core/__tests__/session-cycles.test.js +10 -6
  29. package/dist/core/canvas/render-source.js +3 -0
  30. package/dist/core/feed/feed.d.ts +7 -1
  31. package/dist/core/feed/feed.js +8 -7
  32. package/dist/core/feed/inbox.d.ts +16 -12
  33. package/dist/core/feed/inbox.js +56 -56
  34. package/dist/core/human/page-eval.d.ts +9 -4
  35. package/dist/core/human/page-eval.js +3 -1
  36. package/dist/core/human/page-markdown.d.ts +3 -0
  37. package/dist/core/human/page-markdown.js +295 -0
  38. package/dist/core/human/page.js +4 -0
  39. package/dist/core/runtime/broker/client-registry.d.ts +1 -0
  40. package/dist/core/runtime/broker/client-registry.js +1 -0
  41. package/dist/core/runtime/broker/fault-retry.js +8 -3
  42. package/dist/core/runtime/broker/frame-dispatch.d.ts +1 -1
  43. package/dist/core/runtime/broker/frame-dispatch.js +4 -2
  44. package/dist/core/runtime/broker/inbox.d.ts +14 -2
  45. package/dist/core/runtime/broker/inbox.js +52 -25
  46. package/dist/core/runtime/broker/passive.d.ts +1 -0
  47. package/dist/core/runtime/broker/tool-groups.js +3 -2
  48. package/dist/core/runtime/broker-protocol.d.ts +9 -0
  49. package/dist/core/runtime/broker-protocol.js +11 -0
  50. package/dist/core/runtime/broker.d.ts +2 -2
  51. package/dist/core/runtime/broker.js +31 -6
  52. package/dist/core/runtime/deliver-live.js +2 -1
  53. package/dist/core/runtime/kickoff.d.ts +3 -4
  54. package/dist/core/runtime/kickoff.js +23 -13
  55. package/dist/core/runtime/node-read.d.ts +2 -0
  56. package/dist/core/runtime/node-read.js +11 -3
  57. package/dist/core/runtime/session-cycles.d.ts +6 -1
  58. package/dist/core/runtime/session-cycles.js +17 -11
  59. package/dist/core/runtime/session-visibility.d.ts +7 -12
  60. package/dist/core/runtime/session-visibility.js +7 -13
  61. package/dist/core/runtime/situational-live.js +2 -1
  62. package/dist/core/runtime/stop-guard.js +8 -4
  63. package/dist/core/runtime/warm-pool.d.ts +1 -1
  64. package/dist/core/runtime/warm-pool.js +6 -9
  65. package/dist/daemon/api/handlers/nodes.js +10 -7
  66. package/dist/daemon/companion-retire.d.ts +2 -2
  67. package/dist/daemon/companion-retire.js +16 -9
  68. package/dist/daemon/human/finish.d.ts +2 -2
  69. package/dist/daemon/human/finish.js +48 -8
  70. package/dist/daemon/human/sweep.js +3 -2
  71. package/dist/daemon/messaging/node-message.d.ts +5 -0
  72. package/dist/daemon/messaging/node-message.js +6 -1
  73. package/dist/daemon/review/comment-notify.js +8 -0
  74. package/dist/daemon/review/deliver.js +2 -2
  75. package/dist/daemon/review/finish.js +3 -2
  76. package/dist/pi-extensions/__tests__/canvas-goal-capture-envelope.test.d.ts +1 -0
  77. package/dist/pi-extensions/__tests__/canvas-goal-capture-envelope.test.js +96 -0
  78. package/dist/pi-extensions/__tests__/canvas-stophook-agentend.test.js +1 -1
  79. package/dist/pi-extensions/__tests__/canvas-stophook-context-nudge.test.js +2 -2
  80. package/dist/pi-extensions/broker-local.d.ts +0 -2
  81. package/dist/pi-extensions/broker-local.js +0 -2
  82. package/dist/pi-extensions/canvas-context-intro.js +4 -3
  83. package/dist/pi-extensions/canvas-goal-capture.js +10 -6
  84. package/dist/pi-extensions/canvas-inbox-watcher.js +36 -25
  85. package/dist/pi-extensions/canvas-passive-context.d.ts +10 -0
  86. package/dist/pi-extensions/canvas-passive-context.js +23 -3
  87. package/dist/pi-extensions/canvas-review-boundary.d.ts +1 -1
  88. package/dist/pi-extensions/canvas-review-boundary.js +11 -3
  89. package/dist/pi-extensions/canvas-stophook.js +3 -3
  90. package/dist/shared/__tests__/generated-context-grammar.test.d.ts +1 -0
  91. package/dist/shared/__tests__/generated-context-grammar.test.js +85 -0
  92. package/dist/shared/generated-context.d.ts +57 -36
  93. package/dist/shared/generated-context.js +273 -174
  94. package/dist/shared/tool-groups.js +3 -2
  95. package/package.json +1 -1
  96. package/runtime.lock.json +2 -2
  97. package/scripts/postinstall.mjs +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/crouter",
3
- "version": "0.3.203",
3
+ "version": "0.3.205",
4
4
  "description": "crtr — agent runtime with memory, plugins, and marketplaces",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/runtime.lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@north-light/crouter",
3
- "version": "0.3.203",
3
+ "version": "0.3.205",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@north-light/crouter",
9
- "version": "0.3.203",
9
+ "version": "0.3.205",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn } from 'node:child_process';
3
+ import { existsSync } from 'node:fs';
3
4
  import { dirname, join, resolve } from 'node:path';
4
5
  import { fileURLToPath, pathToFileURL } from 'node:url';
5
6
  import { patchPiTreeRootOrdering } from './patch-pi-tree-root-ordering.mjs';
@@ -34,6 +35,14 @@ async function main() {
34
35
  console.warn('[crtr postinstall] pi tree-root-ordering patch failed (non-fatal):', error?.message ?? error);
35
36
  }
36
37
  if (process.env.CI) return;
38
+ // A published tarball always ships `dist/`; a source checkout being installed
39
+ // never does, and its runtime generation comes from an explicit
40
+ // `npm run build && npm run install-runtime` afterwards. Staging an unbuilt
41
+ // tree can only fail its smoke validation.
42
+ if (!existsSync(join(ROOT, 'dist', 'index.js'))) {
43
+ console.log('crouter source checkout installed. Run `npm run build && npm run install-runtime` to produce a runtime generation.');
44
+ return;
45
+ }
37
46
  try {
38
47
  await installRuntime();
39
48
  } catch (error) {