@ai-matrx/chat 0.3.21 → 0.3.23
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-matrx/chat
|
|
2
2
|
|
|
3
|
+
## 0.3.23 — 2026-10-07
|
|
4
|
+
### The working document reaches the agent again
|
|
5
|
+
|
|
6
|
+
- The page rule (2026-10-01) withheld every value the chat page declares from the chat's own conversation. The chat manifest declares a lean ref named `working_document`, so the conversation's real, agent-editable working document was sent as `context_withheld: ["working_document"]` on every main-chat turn — the agent answered "I don't see a document". `working_document`, `user_scratchpad` and `user_scratchpad_<id8>` are now never the page's (`request-context.ts` `neverThePage`), matching aidream `page_withholds` and `@ai-matrx/agents` `pageContextWithholds` (parity corpus cases added).
|
|
7
|
+
- Consumer action: none.
|
|
8
|
+
|
|
9
|
+
## 0.3.22 — 2026-10-07
|
|
10
|
+
|
|
11
|
+
- `useDomCapturePrint`'s PDF goes through Alchemy's `/operate/capture` `documentToPdf` + kit `downloadFile` (needs alchemy 0.20.0), not `@ai-matrx/print/pdf` directly (AP-2 fifth check). Same options, same file name.
|
|
12
|
+
|
|
13
|
+
**Consumer action:** none.
|
|
14
|
+
|
|
3
15
|
## 0.3.21 — 2026-10-07
|
|
4
16
|
### The editable definition leaves chat (AGENT-CORE-PLAN B2, builder tier)
|
|
5
17
|
|
|
@@ -41,6 +41,10 @@ import { selectSavedContextRuleRows } from "./context-rules.thunks.js";
|
|
|
41
41
|
import { deliveredFieldsFor, toContextReceipt } from "./receipt-check.js";
|
|
42
42
|
import { resolveClientSurface } from "../utils/build-tool-injection.js";
|
|
43
43
|
import { surfaceWritesNoteSource } from "../utils/surface-writes-note.js";
|
|
44
|
+
import { docKindForContextKey } from "../../../utils/workingDocumentContext.js";
|
|
45
|
+
function neverThePage(key) {
|
|
46
|
+
return PERSON_CONTEXT_VALUES.has(key) || docKindForContextKey(key) !== null;
|
|
47
|
+
}
|
|
44
48
|
function pageContextFor(state, conversationId) {
|
|
45
49
|
const owner = pageOwningConversation(conversationId);
|
|
46
50
|
if (owner) {
|
|
@@ -49,7 +53,7 @@ function pageContextFor(state, conversationId) {
|
|
|
49
53
|
return {
|
|
50
54
|
mode: "own",
|
|
51
55
|
withheld: listed.filter(
|
|
52
|
-
(key) => !
|
|
56
|
+
(key) => !neverThePage(key) && !(companionOpen && key === SURFACE_CHAIN_KEY)
|
|
53
57
|
)
|
|
54
58
|
};
|
|
55
59
|
}
|
|
@@ -59,7 +63,7 @@ function pageContextFor(state, conversationId) {
|
|
|
59
63
|
return null;
|
|
60
64
|
}
|
|
61
65
|
function pageWithholds(page, key, surfaceKey) {
|
|
62
|
-
if (!page ||
|
|
66
|
+
if (!page || neverThePage(key)) return false;
|
|
63
67
|
if (page.withheld.includes(key)) return true;
|
|
64
68
|
return Boolean(surfaceKey && surfaceKey !== DEFAULT_SURFACE_KEY);
|
|
65
69
|
}
|
|
@@ -18,16 +18,20 @@ function useDomCapturePrint() {
|
|
|
18
18
|
try {
|
|
19
19
|
const { renderAllDiagrams } = await import("../../host/markdown-slots.js");
|
|
20
20
|
releaseRenderAll = (await renderAllDiagrams()).release;
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const [{ documentToPdf }, { downloadFile }] = await Promise.all([
|
|
22
|
+
import("@ai-matrx/alchemy/operate/capture"),
|
|
23
|
+
import("@ai-matrx/kit/download")
|
|
24
|
+
]);
|
|
25
|
+
const { filename = "ai-response", ...captureOptions } = options;
|
|
26
|
+
const pdf = await documentToPdf(el, {
|
|
24
27
|
scale: 2,
|
|
25
|
-
...
|
|
28
|
+
...captureOptions,
|
|
26
29
|
onProgress: (page, total) => {
|
|
27
30
|
setProgress(Math.round(page / Math.max(total, 1) * 100));
|
|
28
31
|
options.onProgress?.(page, total);
|
|
29
32
|
}
|
|
30
33
|
});
|
|
34
|
+
downloadFile(`${filename}.pdf`, pdf, "application/pdf");
|
|
31
35
|
} catch (err) {
|
|
32
36
|
const msg = err instanceof Error ? err.message : "PDF export failed";
|
|
33
37
|
setError(msg);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/chat",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
4
4
|
"description": "THE one AI Matrx person-to-agent chat system: the full chat (running agents, conversations, tool calls, streaming, context, surfaces, voice) as per-module subpaths @ai-matrx/chat/<domain>/<module> over a host contract (/host, /host/react) whose only required value is a db; plus the kernel compatibility entries (., /external-store, /matrx, /react, /tools, styles.css, tokens.css) until P28.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -226,24 +226,24 @@
|
|
|
226
226
|
"server-only": "^0.0.1",
|
|
227
227
|
"uuid": "^14.0.2",
|
|
228
228
|
"zod": "^4.6.5",
|
|
229
|
-
"@ai-matrx/agents": "latest",
|
|
230
229
|
"@ai-matrx/alchemy": "latest",
|
|
231
|
-
"@ai-matrx/browser-audio": "latest",
|
|
232
230
|
"@ai-matrx/associations": "latest",
|
|
233
|
-
"@ai-matrx/
|
|
231
|
+
"@ai-matrx/agents": "latest",
|
|
234
232
|
"@ai-matrx/canvas": "latest",
|
|
235
|
-
"@ai-matrx/
|
|
233
|
+
"@ai-matrx/content-ir": "latest",
|
|
234
|
+
"@ai-matrx/browser-audio": "latest",
|
|
236
235
|
"@ai-matrx/design-system": "latest",
|
|
237
236
|
"@ai-matrx/diff": "latest",
|
|
237
|
+
"@ai-matrx/data": "latest",
|
|
238
238
|
"@ai-matrx/icons": "latest",
|
|
239
239
|
"@ai-matrx/kit": "latest",
|
|
240
240
|
"@ai-matrx/media": "latest",
|
|
241
241
|
"@ai-matrx/print": "latest",
|
|
242
|
-
"@ai-matrx/content-ir-react": "latest",
|
|
243
242
|
"@ai-matrx/realtime": "latest",
|
|
243
|
+
"@ai-matrx/records": "latest",
|
|
244
244
|
"@ai-matrx/records-ui": "latest",
|
|
245
245
|
"@ai-matrx/tap-target": "latest",
|
|
246
|
-
"@ai-matrx/
|
|
246
|
+
"@ai-matrx/content-ir-react": "latest"
|
|
247
247
|
},
|
|
248
248
|
"devDependencies": {
|
|
249
249
|
"@arethetypeswrong/cli": "^0.18.5",
|