@genesislcap/ai-assistant 15.44.0 → 15.45.0

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 (39) hide show
  1. package/dist/ai-assistant.api.json +34 -19
  2. package/dist/ai-assistant.d.ts +36 -2
  3. package/dist/chat-driver.cjs +89 -10
  4. package/dist/chat-driver.cjs.map +2 -2
  5. package/dist/chat-driver.mjs +89 -10
  6. package/dist/chat-driver.mjs.map +2 -2
  7. package/dist/custom-elements.json +128 -6
  8. package/dist/dts/components/chat-driver/chat-driver.d.ts +15 -2
  9. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  10. package/dist/dts/components/chat-driver/interaction-controller.d.ts +26 -3
  11. package/dist/dts/components/chat-driver/interaction-controller.d.ts.map +1 -1
  12. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts +6 -0
  13. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts.map +1 -1
  14. package/dist/dts/genesis/review-model.d.ts +50 -0
  15. package/dist/dts/genesis/review-model.d.ts.map +1 -1
  16. package/dist/dts/genesis/write-review/write-review.d.ts +15 -1
  17. package/dist/dts/genesis/write-review/write-review.d.ts.map +1 -1
  18. package/dist/dts/genesis/write-review/write-review.styles.d.ts.map +1 -1
  19. package/dist/dts/genesis/write-review/write-review.template.d.ts.map +1 -1
  20. package/dist/dts/genesis/write-tools.d.ts +6 -1
  21. package/dist/dts/genesis/write-tools.d.ts.map +1 -1
  22. package/dist/dts/main/main.template.d.ts +8 -0
  23. package/dist/dts/main/main.template.d.ts.map +1 -1
  24. package/dist/dts/state/debug-event-log.d.ts +1 -1
  25. package/dist/dts/state/debug-event-log.d.ts.map +1 -1
  26. package/dist/dts/types/ai-chat-widget.d.ts +7 -0
  27. package/dist/dts/types/ai-chat-widget.d.ts.map +1 -1
  28. package/dist/esm/components/chat-driver/chat-driver.js +39 -6
  29. package/dist/esm/components/chat-driver/interaction-controller.js +50 -4
  30. package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.js +17 -6
  31. package/dist/esm/genesis/review-model.js +78 -0
  32. package/dist/esm/genesis/write-review/write-review.js +70 -19
  33. package/dist/esm/genesis/write-review/write-review.styles.js +5 -2
  34. package/dist/esm/genesis/write-review/write-review.template.js +10 -1
  35. package/dist/esm/genesis/write-tools.js +14 -2
  36. package/dist/esm/main/main.template.js +19 -10
  37. package/dist/esm/state/debug-event-log.js +4 -0
  38. package/docs/genesis.md +11 -1
  39. package/package.json +18 -18
@@ -72,6 +72,10 @@ export const META_EVENT_IMPORTANCE = {
72
72
  // the value was not real spend). 'high': it is the one way the session total goes quietly
73
73
  // wrong, so it must stand out when reconciling.
74
74
  'interaction.external-cost-dropped': 'high',
75
+ // What came of an answer, recorded by the tool that asked (see recordInteractionOutcome).
76
+ 'interaction.outcome': 'normal',
77
+ // An outcome that could not be recorded: the widget goes on showing only the answer.
78
+ 'interaction.outcome-dropped': 'high',
75
79
  'external-diagnostics.folded': 'normal',
76
80
  'session.cleared': 'normal',
77
81
  'session.switched': 'low',
package/docs/genesis.md CHANGED
@@ -287,7 +287,16 @@ The review offers three answers:
287
287
  open when they stop closes unanswered, like one that timed out; and nothing is committed once the
288
288
  turn is stopped, even if an Approve lands first. A Stop pressed while approved rows are being
289
289
  written stops the rest: rows already committed are reported as written, and every row not yet
290
- sent is reported `failed` with "Not written: the user stopped the turn."
290
+ sent is reported `stopped` with "Not written: the user stopped the turn." No reply follows a
291
+ stopped turn, so the review says it itself: "Stopped while writing: 6 written, 5 not written.", and
292
+ each approved row is marked written, "not written (stopped)", or why else it was not. The marks
293
+ are for the user: "not written (changed since the review)", "not written (row changed or no
294
+ longer exists)", and so on. Only the app's or the database's own refusal is shown as it came. A
295
+ row that was sent and got no answer (`unknown`) may well have been written, so it is never
296
+ counted as not written. The summary adds ", K may have been written" ("Stopped while writing: 6
297
+ written, 4 not written, 1 may have been written."), and the row is marked "may have been
298
+ written". The tool records that on the review through `recordInteractionOutcome`, so it is still
299
+ there after a remount, a pop-out or a reload. It is never sent to the model.
291
300
 
292
301
  The text is capped at 1000 characters and never reaches the event's `REASON` or `DETAILS`. The
293
302
  system prompt makes `userFeedback` and `next` the one exception to "tool results are data", and
@@ -514,6 +523,7 @@ one — that is how a row gets written twice.
514
523
  | `database_error` | The database refused it for another reason. |
515
524
  | `unavailable` | The event is not mapped to a service (a 404 `MSG_NACK`). |
516
525
  | `failed` | Nothing was sent: the app was not connected, or the row could not be checked first. |
526
+ | `stopped` | Approved, and not sent: the user stopped the turn first. |
517
527
  | `unknown` | Sent, and no answer this can read came back. It may have been written. Never retry. |
518
528
 
519
529
  `createGenesisWriteTools(resources, { connect })` builds these without registering anything, for
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/ai-assistant",
3
3
  "description": "Genesis AI Assistant micro-frontend",
4
- "version": "15.44.0",
4
+ "version": "15.45.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/ai-assistant.d.ts",
@@ -92,32 +92,32 @@
92
92
  }
93
93
  },
94
94
  "devDependencies": {
95
- "@genesislcap/foundation-comms": "15.44.0",
96
- "@genesislcap/foundation-testing": "15.44.0",
97
- "@genesislcap/genx": "15.44.0",
98
- "@genesislcap/rollup-builder": "15.44.0",
99
- "@genesislcap/ts-builder": "15.44.0",
100
- "@genesislcap/uvu-playwright-builder": "15.44.0",
101
- "@genesislcap/vite-builder": "15.44.0",
102
- "@genesislcap/webpack-builder": "15.44.0",
95
+ "@genesislcap/foundation-comms": "15.45.0",
96
+ "@genesislcap/foundation-testing": "15.45.0",
97
+ "@genesislcap/genx": "15.45.0",
98
+ "@genesislcap/rollup-builder": "15.45.0",
99
+ "@genesislcap/ts-builder": "15.45.0",
100
+ "@genesislcap/uvu-playwright-builder": "15.45.0",
101
+ "@genesislcap/vite-builder": "15.45.0",
102
+ "@genesislcap/webpack-builder": "15.45.0",
103
103
  "@types/dompurify": "^3.0.5",
104
104
  "@types/marked": "^5.0.2",
105
105
  "esbuild": "0.25.12"
106
106
  },
107
107
  "dependencies": {
108
- "@genesislcap/foundation-ai": "15.44.0",
109
- "@genesislcap/foundation-logger": "15.44.0",
110
- "@genesislcap/foundation-notifications": "15.44.0",
111
- "@genesislcap/foundation-redux": "15.44.0",
112
- "@genesislcap/foundation-ui": "15.44.0",
113
- "@genesislcap/foundation-utils": "15.44.0",
114
- "@genesislcap/rapid-design-system": "15.44.0",
115
- "@genesislcap/web-core": "15.44.0",
108
+ "@genesislcap/foundation-ai": "15.45.0",
109
+ "@genesislcap/foundation-logger": "15.45.0",
110
+ "@genesislcap/foundation-notifications": "15.45.0",
111
+ "@genesislcap/foundation-redux": "15.45.0",
112
+ "@genesislcap/foundation-ui": "15.45.0",
113
+ "@genesislcap/foundation-utils": "15.45.0",
114
+ "@genesislcap/rapid-design-system": "15.45.0",
115
+ "@genesislcap/web-core": "15.45.0",
116
116
  "dompurify": "^3.3.1",
117
117
  "marked": "^17.0.3"
118
118
  },
119
119
  "peerDependencies": {
120
- "@genesislcap/foundation-comms": "^15.44.0"
120
+ "@genesislcap/foundation-comms": "^15.45.0"
121
121
  },
122
122
  "peerDependenciesMeta": {
123
123
  "@genesislcap/foundation-comms": {