dsh-plugin-xujie-memory 0.5.0 → 0.7.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.
- package/ACCEPTANCE.md +37 -0
- package/BUILD-PROVENANCE.json +53 -0
- package/CHANGELOG.md +40 -1
- package/LICENSE +21 -21
- package/README.md +67 -17
- package/README_EN.md +54 -8
- package/cordis.patch.yml +49 -49
- package/lib/client.js +17219 -0
- package/lib/controller.js +307 -0
- package/lib/index.js +200 -14
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +15104 -0
- package/lib/typert.remote-client.d.ts +40 -0
- package/lib/typert.remote-client.d.ts.map +1 -0
- package/lib/typert.remote-client.js +15093 -0
- package/lib/types.d.ts +13 -0
- package/lib/types.js +1 -0
- package/package.json +49 -5
- package/python/specs/characters/aloof.json +14 -14
- package/python/specs/characters/gentle.json +14 -14
- package/python/specs/characters/tsundere.json +14 -14
- package/python/specs/debt.v1.json +31 -31
- package/python/specs/nickname.v1.json +16 -16
- package/python/specs/preference.v1.json +16 -16
- package/python/xujie_memory/__init__.py +123 -123
- package/python/xujie_memory/admission.py +211 -211
- package/python/xujie_memory/audit.py +377 -377
- package/python/xujie_memory/benchmark.py +281 -281
- package/python/xujie_memory/character.py +199 -199
- package/python/xujie_memory/console.py +41 -41
- package/python/xujie_memory/consolidate.py +356 -356
- package/python/xujie_memory/due.py +121 -121
- package/python/xujie_memory/emotion.py +573 -573
- package/python/xujie_memory/engine.py +1333 -1312
- package/python/xujie_memory/errors.py +98 -98
- package/python/xujie_memory/importance.py +104 -104
- package/python/xujie_memory/judge.py +350 -350
- package/python/xujie_memory/management.py +203 -0
- package/python/xujie_memory/memory.py +71 -10
- package/python/xujie_memory/orchestrator.py +690 -666
- package/python/xujie_memory/phrasing.py +292 -292
- package/python/xujie_memory/privacy.py +105 -0
- package/python/xujie_memory/schema.sql +492 -480
- package/python/xujie_memory/server.py +76 -0
- package/python/xujie_memory/specs.py +170 -170
- package/python/xujie_memory/summary.py +238 -238
- package/scripts/build.mjs +19 -0
- package/scripts/prepack.mjs +9 -0
- package/scripts/test-all.mjs +9 -0
- package/scripts/test-node.mjs +10 -0
- package/src/client/MemoryPanel.tsx +536 -0
- package/src/client/NeuralField.tsx +88 -0
- package/src/client/css.d.ts +4 -0
- package/src/client/icons.tsx +28 -0
- package/src/client/index.tsx +59 -0
- package/src/client/memory-adapter.ts +67 -0
- package/src/client/model.ts +79 -0
- package/src/client/neural/engine.ts +999 -0
- package/src/client/neural/morphology.ts +219 -0
- package/src/client/panel.css +337 -0
- package/src/client/types.ts +6 -0
- package/src/controller.ts +88 -0
- package/src/generated/typert.host.js +449 -0
- package/src/generated/typert.remote-client.js +438 -0
- package/src/index.ts +2 -0
- package/src/types.ts +13 -0
- package/test/cordis-fixture.mjs +5 -0
- package/test/management_regression.py +187 -0
- package/test/node-regression.entry.mjs +52 -0
- package/vendor/DSH-LICENSE.txt +21 -0
- package/vendor/THIRD-PARTY.md +6 -0
- package/vendor/dsh-protocol/index.ts +484 -0
- package/vendor/dsh-protocol/json-value.ts +53 -0
- package/vendor/dsh-protocol/owned-value.ts +39 -0
- package/vendor/dsh-protocol/principal.ts +17 -0
- package/vendor/dsh-protocol/remote-access.ts +38 -0
- package/vendor/dsh-protocol/remote-error.ts +49 -0
- package/vendor/dsh-protocol/remote-info.ts +161 -0
- package/vendor/dsh-protocol/types.ts +939 -0
- package/vendor/licenses/jridgewell-gen-mapping-MIT.txt +19 -0
- package/vendor/licenses/jridgewell-resolve-uri-MIT.txt +19 -0
- package/vendor/licenses/jridgewell-sourcemap-codec-MIT.txt +19 -0
- package/vendor/licenses/jridgewell-trace-mapping-MIT.txt +19 -0
- package/vendor/licenses/zod-MIT.txt +21 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
/* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
|
|
5
|
+
|
|
6
|
+
let dsh_plugin_xujie_memory_xujieMemory_catalog_result$schema$value
|
|
7
|
+
const dsh_plugin_xujie_memory_xujieMemory_catalog_result$schema = () => (dsh_plugin_xujie_memory_xujieMemory_catalog_result$schema$value ??= z.object({
|
|
8
|
+
'scope_mode': z.string(),
|
|
9
|
+
'scopes': z.array(z.object({
|
|
10
|
+
'scope_id': z.string(),
|
|
11
|
+
'agent_id': z.string(),
|
|
12
|
+
'traces': z.number(),
|
|
13
|
+
})),
|
|
14
|
+
}))
|
|
15
|
+
let dsh_plugin_xujie_memory_xujieMemory_detail_parameter_0$schema$value
|
|
16
|
+
const dsh_plugin_xujie_memory_xujieMemory_detail_parameter_0$schema = () => (dsh_plugin_xujie_memory_xujieMemory_detail_parameter_0$schema$value ??= z.string())
|
|
17
|
+
let dsh_plugin_xujie_memory_xujieMemory_detail_parameter_1$schema$value
|
|
18
|
+
const dsh_plugin_xujie_memory_xujieMemory_detail_parameter_1$schema = () => (dsh_plugin_xujie_memory_xujieMemory_detail_parameter_1$schema$value ??= z.string())
|
|
19
|
+
let dsh_plugin_xujie_memory_xujieMemory_detail_result$schema$value
|
|
20
|
+
const dsh_plugin_xujie_memory_xujieMemory_detail_result$schema = () => (dsh_plugin_xujie_memory_xujieMemory_detail_result$schema$value ??= z.object({
|
|
21
|
+
'id': z.string(),
|
|
22
|
+
'trace_id': z.string(),
|
|
23
|
+
'scope_id': z.string(),
|
|
24
|
+
'content': z.string(),
|
|
25
|
+
'content_hash': z.string(),
|
|
26
|
+
'recorded_at': z.string(),
|
|
27
|
+
'source_kind': z.string(),
|
|
28
|
+
'importance': z.number(),
|
|
29
|
+
'anchor': z.boolean(),
|
|
30
|
+
'priority': z.number(),
|
|
31
|
+
}))
|
|
32
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_parameter_0$schema$value
|
|
33
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_parameter_0$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_parameter_0$schema$value ??= z.string())
|
|
34
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_parameter_1$schema$value
|
|
35
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_parameter_1$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_parameter_1$schema$value ??= z.string())
|
|
36
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_parameter_2$schema$value
|
|
37
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_parameter_2$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_parameter_2$schema$value ??= z.string())
|
|
38
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_parameter_3$schema$value
|
|
39
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_parameter_3$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_parameter_3$schema$value ??= z.string())
|
|
40
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_result$schema$value
|
|
41
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_result$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_result$schema$value ??= z.object({
|
|
42
|
+
'changed': z.boolean(),
|
|
43
|
+
'trace': z.object({
|
|
44
|
+
'id': z.string(),
|
|
45
|
+
'trace_id': z.string(),
|
|
46
|
+
'scope_id': z.string(),
|
|
47
|
+
'content': z.string(),
|
|
48
|
+
'content_hash': z.string(),
|
|
49
|
+
'recorded_at': z.string(),
|
|
50
|
+
'source_kind': z.string(),
|
|
51
|
+
'importance': z.number(),
|
|
52
|
+
'anchor': z.boolean(),
|
|
53
|
+
'priority': z.number(),
|
|
54
|
+
}),
|
|
55
|
+
'replaced_trace_id': z.union([z.undefined(), z.string()]).optional(),
|
|
56
|
+
'pending': z.union([z.undefined(), z.number()]).optional(),
|
|
57
|
+
}))
|
|
58
|
+
let dsh_plugin_xujie_memory_xujieMemory_forget_parameter_0$schema$value
|
|
59
|
+
const dsh_plugin_xujie_memory_xujieMemory_forget_parameter_0$schema = () => (dsh_plugin_xujie_memory_xujieMemory_forget_parameter_0$schema$value ??= z.string())
|
|
60
|
+
let dsh_plugin_xujie_memory_xujieMemory_forget_parameter_1$schema$value
|
|
61
|
+
const dsh_plugin_xujie_memory_xujieMemory_forget_parameter_1$schema = () => (dsh_plugin_xujie_memory_xujieMemory_forget_parameter_1$schema$value ??= z.string())
|
|
62
|
+
let dsh_plugin_xujie_memory_xujieMemory_forget_parameter_2$schema$value
|
|
63
|
+
const dsh_plugin_xujie_memory_xujieMemory_forget_parameter_2$schema = () => (dsh_plugin_xujie_memory_xujieMemory_forget_parameter_2$schema$value ??= z.string())
|
|
64
|
+
let dsh_plugin_xujie_memory_xujieMemory_forget_result$schema$value
|
|
65
|
+
const dsh_plugin_xujie_memory_xujieMemory_forget_result$schema = () => (dsh_plugin_xujie_memory_xujieMemory_forget_result$schema$value ??= z.object({
|
|
66
|
+
'trace_id': z.string(),
|
|
67
|
+
'erased': z.boolean(),
|
|
68
|
+
'already_erased': z.boolean(),
|
|
69
|
+
'state_keys': z.array(z.string()),
|
|
70
|
+
}))
|
|
71
|
+
let dsh_plugin_xujie_memory_xujieMemory_search_parameter_0$schema$value
|
|
72
|
+
const dsh_plugin_xujie_memory_xujieMemory_search_parameter_0$schema = () => (dsh_plugin_xujie_memory_xujieMemory_search_parameter_0$schema$value ??= z.string())
|
|
73
|
+
let dsh_plugin_xujie_memory_xujieMemory_search_parameter_1$schema$value
|
|
74
|
+
const dsh_plugin_xujie_memory_xujieMemory_search_parameter_1$schema = () => (dsh_plugin_xujie_memory_xujieMemory_search_parameter_1$schema$value ??= z.string())
|
|
75
|
+
let dsh_plugin_xujie_memory_xujieMemory_search_result$schema$value
|
|
76
|
+
const dsh_plugin_xujie_memory_xujieMemory_search_result$schema = () => (dsh_plugin_xujie_memory_xujieMemory_search_result$schema$value ??= z.array(z.object({
|
|
77
|
+
'trace_id': z.string(),
|
|
78
|
+
'content': z.string(),
|
|
79
|
+
'content_hash': z.string(),
|
|
80
|
+
'score': z.number(),
|
|
81
|
+
'priority': z.number(),
|
|
82
|
+
'anchor': z.boolean(),
|
|
83
|
+
'importance': z.number(),
|
|
84
|
+
'recorded_at': z.string(),
|
|
85
|
+
'layer': z.string(),
|
|
86
|
+
})))
|
|
87
|
+
let dsh_plugin_xujie_memory_xujieMemory_snapshot_parameter_0$schema$value
|
|
88
|
+
const dsh_plugin_xujie_memory_xujieMemory_snapshot_parameter_0$schema = () => (dsh_plugin_xujie_memory_xujieMemory_snapshot_parameter_0$schema$value ??= z.string())
|
|
89
|
+
let dsh_plugin_xujie_memory_xujieMemory_snapshot_result$schema$value
|
|
90
|
+
const dsh_plugin_xujie_memory_xujieMemory_snapshot_result$schema = () => (dsh_plugin_xujie_memory_xujieMemory_snapshot_result$schema$value ??= z.object({
|
|
91
|
+
'scope_id': z.string(),
|
|
92
|
+
'scope_mode': z.string(),
|
|
93
|
+
'nodes': z.array(z.object({
|
|
94
|
+
'id': z.string(),
|
|
95
|
+
'layer': z.string(),
|
|
96
|
+
'kind': z.string(),
|
|
97
|
+
'content': z.string(),
|
|
98
|
+
'editable': z.boolean(),
|
|
99
|
+
'trace_id': z.union([z.undefined(), z.string()]).optional(),
|
|
100
|
+
'content_hash': z.union([z.undefined(), z.string()]).optional(),
|
|
101
|
+
'recorded_at': z.union([z.undefined(), z.string()]).optional(),
|
|
102
|
+
'importance': z.union([z.undefined(), z.number()]).optional(),
|
|
103
|
+
'priority': z.union([z.undefined(), z.number()]).optional(),
|
|
104
|
+
'anchor': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
|
|
105
|
+
'status': z.union([z.undefined(), z.string()]).optional(),
|
|
106
|
+
'evidence': z.union([z.undefined(), z.array(z.string())]).optional(),
|
|
107
|
+
})),
|
|
108
|
+
'edges': z.array(z.object({
|
|
109
|
+
'source': z.string(),
|
|
110
|
+
'target': z.string(),
|
|
111
|
+
'kind': z.string(),
|
|
112
|
+
})),
|
|
113
|
+
'cards': z.array(z.object({
|
|
114
|
+
'account_id': z.string(),
|
|
115
|
+
'display_name': z.string(),
|
|
116
|
+
'status': z.string(),
|
|
117
|
+
'tags': z.array(z.object({
|
|
118
|
+
'tag_id': z.string(),
|
|
119
|
+
'kind': z.string(),
|
|
120
|
+
'value': z.string(),
|
|
121
|
+
'source': z.string(),
|
|
122
|
+
'confidence': z.number(),
|
|
123
|
+
})),
|
|
124
|
+
})),
|
|
125
|
+
'stats': z.object({
|
|
126
|
+
'traces': z.number(),
|
|
127
|
+
'traces_erased': z.number(),
|
|
128
|
+
'events': z.number(),
|
|
129
|
+
'states': z.number(),
|
|
130
|
+
'anchors': z.number(),
|
|
131
|
+
'clarifications_open': z.number(),
|
|
132
|
+
'summaries': z.number(),
|
|
133
|
+
}),
|
|
134
|
+
'truncated': z.boolean(),
|
|
135
|
+
'limit': z.number(),
|
|
136
|
+
}))
|
|
137
|
+
let dsh_plugin_xujie_memory_xujieMemory_detail_parameter_0_strict$schema$value
|
|
138
|
+
const dsh_plugin_xujie_memory_xujieMemory_detail_parameter_0_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_detail_parameter_0_strict$schema$value ??= z.string())
|
|
139
|
+
let dsh_plugin_xujie_memory_xujieMemory_detail_parameter_1_strict$schema$value
|
|
140
|
+
const dsh_plugin_xujie_memory_xujieMemory_detail_parameter_1_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_detail_parameter_1_strict$schema$value ??= z.string())
|
|
141
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_parameter_0_strict$schema$value
|
|
142
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_parameter_0_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_parameter_0_strict$schema$value ??= z.string())
|
|
143
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_parameter_1_strict$schema$value
|
|
144
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_parameter_1_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_parameter_1_strict$schema$value ??= z.string())
|
|
145
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_parameter_2_strict$schema$value
|
|
146
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_parameter_2_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_parameter_2_strict$schema$value ??= z.string())
|
|
147
|
+
let dsh_plugin_xujie_memory_xujieMemory_edit_parameter_3_strict$schema$value
|
|
148
|
+
const dsh_plugin_xujie_memory_xujieMemory_edit_parameter_3_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_edit_parameter_3_strict$schema$value ??= z.string())
|
|
149
|
+
let dsh_plugin_xujie_memory_xujieMemory_forget_parameter_0_strict$schema$value
|
|
150
|
+
const dsh_plugin_xujie_memory_xujieMemory_forget_parameter_0_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_forget_parameter_0_strict$schema$value ??= z.string())
|
|
151
|
+
let dsh_plugin_xujie_memory_xujieMemory_forget_parameter_1_strict$schema$value
|
|
152
|
+
const dsh_plugin_xujie_memory_xujieMemory_forget_parameter_1_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_forget_parameter_1_strict$schema$value ??= z.string())
|
|
153
|
+
let dsh_plugin_xujie_memory_xujieMemory_forget_parameter_2_strict$schema$value
|
|
154
|
+
const dsh_plugin_xujie_memory_xujieMemory_forget_parameter_2_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_forget_parameter_2_strict$schema$value ??= z.string())
|
|
155
|
+
let dsh_plugin_xujie_memory_xujieMemory_search_parameter_0_strict$schema$value
|
|
156
|
+
const dsh_plugin_xujie_memory_xujieMemory_search_parameter_0_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_search_parameter_0_strict$schema$value ??= z.string())
|
|
157
|
+
let dsh_plugin_xujie_memory_xujieMemory_search_parameter_1_strict$schema$value
|
|
158
|
+
const dsh_plugin_xujie_memory_xujieMemory_search_parameter_1_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_search_parameter_1_strict$schema$value ??= z.string())
|
|
159
|
+
let dsh_plugin_xujie_memory_xujieMemory_snapshot_parameter_0_strict$schema$value
|
|
160
|
+
const dsh_plugin_xujie_memory_xujieMemory_snapshot_parameter_0_strict$schema = () => (dsh_plugin_xujie_memory_xujieMemory_snapshot_parameter_0_strict$schema$value ??= z.string())
|
|
161
|
+
|
|
162
|
+
export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
163
|
+
package: 'dsh-plugin-xujie-memory',
|
|
164
|
+
methods: {
|
|
165
|
+
'xujieMemory/catalog': {
|
|
166
|
+
service: 'xujieMemory',
|
|
167
|
+
invocation: { kind: 'direct' },
|
|
168
|
+
parameters: [
|
|
169
|
+
],
|
|
170
|
+
result: {
|
|
171
|
+
mode: 'strict',
|
|
172
|
+
typeSymbol: 'dsh-plugin-xujie-memory/types#Catalog',
|
|
173
|
+
create: dsh_plugin_xujie_memory_xujieMemory_catalog_result$schema,
|
|
174
|
+
jsonSchema: {"type":"object","properties":{"scope_mode":{"type":"string"},"scopes":{"type":"array","items":{"type":"object","properties":{"scope_id":{"type":"string"},"agent_id":{"type":"string"},"traces":{"type":"number"}},"required":["scope_id","agent_id","traces"],"additionalProperties":true}}},"required":["scope_mode","scopes"],"additionalProperties":true},
|
|
175
|
+
},
|
|
176
|
+
sourceLocation: {"file":"packages/memory/src/controller.ts","line":40,"column":9},
|
|
177
|
+
},
|
|
178
|
+
'xujieMemory/detail': {
|
|
179
|
+
service: 'xujieMemory',
|
|
180
|
+
invocation: { kind: 'direct' },
|
|
181
|
+
parameters: [
|
|
182
|
+
{
|
|
183
|
+
name: 'scopeId',
|
|
184
|
+
source: 'json',
|
|
185
|
+
codec: {
|
|
186
|
+
mode: 'strict',
|
|
187
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/detail:scopeId',
|
|
188
|
+
create: dsh_plugin_xujie_memory_xujieMemory_detail_parameter_0$schema,
|
|
189
|
+
jsonSchema: {"type":"string"},
|
|
190
|
+
},
|
|
191
|
+
strictCodec: {
|
|
192
|
+
mode: 'strict',
|
|
193
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/detail:scopeId',
|
|
194
|
+
create: dsh_plugin_xujie_memory_xujieMemory_detail_parameter_0_strict$schema,
|
|
195
|
+
jsonSchema: {"type":"string"},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'traceId',
|
|
200
|
+
source: 'json',
|
|
201
|
+
codec: {
|
|
202
|
+
mode: 'strict',
|
|
203
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/detail:traceId',
|
|
204
|
+
create: dsh_plugin_xujie_memory_xujieMemory_detail_parameter_1$schema,
|
|
205
|
+
jsonSchema: {"type":"string"},
|
|
206
|
+
},
|
|
207
|
+
strictCodec: {
|
|
208
|
+
mode: 'strict',
|
|
209
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/detail:traceId',
|
|
210
|
+
create: dsh_plugin_xujie_memory_xujieMemory_detail_parameter_1_strict$schema,
|
|
211
|
+
jsonSchema: {"type":"string"},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
result: {
|
|
216
|
+
mode: 'strict',
|
|
217
|
+
typeSymbol: 'dsh-plugin-xujie-memory/types#Trace',
|
|
218
|
+
create: dsh_plugin_xujie_memory_xujieMemory_detail_result$schema,
|
|
219
|
+
jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"trace_id":{"type":"string"},"scope_id":{"type":"string"},"content":{"type":"string"},"content_hash":{"type":"string"},"recorded_at":{"type":"string"},"source_kind":{"type":"string"},"importance":{"type":"number"},"anchor":{"type":"boolean"},"priority":{"type":"number"}},"required":["id","trace_id","scope_id","content","content_hash","recorded_at","source_kind","importance","anchor","priority"],"additionalProperties":true},
|
|
220
|
+
},
|
|
221
|
+
sourceLocation: {"file":"packages/memory/src/controller.ts","line":62,"column":9},
|
|
222
|
+
},
|
|
223
|
+
'xujieMemory/edit': {
|
|
224
|
+
service: 'xujieMemory',
|
|
225
|
+
invocation: { kind: 'direct' },
|
|
226
|
+
parameters: [
|
|
227
|
+
{
|
|
228
|
+
name: 'scopeId',
|
|
229
|
+
source: 'json',
|
|
230
|
+
codec: {
|
|
231
|
+
mode: 'strict',
|
|
232
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/edit:scopeId',
|
|
233
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_parameter_0$schema,
|
|
234
|
+
jsonSchema: {"type":"string"},
|
|
235
|
+
},
|
|
236
|
+
strictCodec: {
|
|
237
|
+
mode: 'strict',
|
|
238
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/edit:scopeId',
|
|
239
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_parameter_0_strict$schema,
|
|
240
|
+
jsonSchema: {"type":"string"},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: 'traceId',
|
|
245
|
+
source: 'json',
|
|
246
|
+
codec: {
|
|
247
|
+
mode: 'strict',
|
|
248
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/edit:traceId',
|
|
249
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_parameter_1$schema,
|
|
250
|
+
jsonSchema: {"type":"string"},
|
|
251
|
+
},
|
|
252
|
+
strictCodec: {
|
|
253
|
+
mode: 'strict',
|
|
254
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/edit:traceId',
|
|
255
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_parameter_1_strict$schema,
|
|
256
|
+
jsonSchema: {"type":"string"},
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'content',
|
|
261
|
+
source: 'json',
|
|
262
|
+
codec: {
|
|
263
|
+
mode: 'strict',
|
|
264
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/edit:content',
|
|
265
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_parameter_2$schema,
|
|
266
|
+
jsonSchema: {"type":"string"},
|
|
267
|
+
},
|
|
268
|
+
strictCodec: {
|
|
269
|
+
mode: 'strict',
|
|
270
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/edit:content',
|
|
271
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_parameter_2_strict$schema,
|
|
272
|
+
jsonSchema: {"type":"string"},
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: 'expectedHash',
|
|
277
|
+
source: 'json',
|
|
278
|
+
codec: {
|
|
279
|
+
mode: 'strict',
|
|
280
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/edit:expectedHash',
|
|
281
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_parameter_3$schema,
|
|
282
|
+
jsonSchema: {"type":"string"},
|
|
283
|
+
},
|
|
284
|
+
strictCodec: {
|
|
285
|
+
mode: 'strict',
|
|
286
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/edit:expectedHash',
|
|
287
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_parameter_3_strict$schema,
|
|
288
|
+
jsonSchema: {"type":"string"},
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
result: {
|
|
293
|
+
mode: 'strict',
|
|
294
|
+
typeSymbol: 'dsh-plugin-xujie-memory/types#EditResult',
|
|
295
|
+
create: dsh_plugin_xujie_memory_xujieMemory_edit_result$schema,
|
|
296
|
+
jsonSchema: {"type":"object","properties":{"changed":{"type":"boolean"},"trace":{"type":"object","properties":{"id":{"type":"string"},"trace_id":{"type":"string"},"scope_id":{"type":"string"},"content":{"type":"string"},"content_hash":{"type":"string"},"recorded_at":{"type":"string"},"source_kind":{"type":"string"},"importance":{"type":"number"},"anchor":{"type":"boolean"},"priority":{"type":"number"}},"required":["id","trace_id","scope_id","content","content_hash","recorded_at","source_kind","importance","anchor","priority"],"additionalProperties":true},"replaced_trace_id":{"type":"string"},"pending":{"type":"number"}},"required":["changed","trace"],"additionalProperties":true},
|
|
297
|
+
},
|
|
298
|
+
sourceLocation: {"file":"packages/memory/src/controller.ts","line":77,"column":9},
|
|
299
|
+
},
|
|
300
|
+
'xujieMemory/forget': {
|
|
301
|
+
service: 'xujieMemory',
|
|
302
|
+
invocation: { kind: 'direct' },
|
|
303
|
+
parameters: [
|
|
304
|
+
{
|
|
305
|
+
name: 'scopeId',
|
|
306
|
+
source: 'json',
|
|
307
|
+
codec: {
|
|
308
|
+
mode: 'strict',
|
|
309
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/forget:scopeId',
|
|
310
|
+
create: dsh_plugin_xujie_memory_xujieMemory_forget_parameter_0$schema,
|
|
311
|
+
jsonSchema: {"type":"string"},
|
|
312
|
+
},
|
|
313
|
+
strictCodec: {
|
|
314
|
+
mode: 'strict',
|
|
315
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/forget:scopeId',
|
|
316
|
+
create: dsh_plugin_xujie_memory_xujieMemory_forget_parameter_0_strict$schema,
|
|
317
|
+
jsonSchema: {"type":"string"},
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: 'traceId',
|
|
322
|
+
source: 'json',
|
|
323
|
+
codec: {
|
|
324
|
+
mode: 'strict',
|
|
325
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/forget:traceId',
|
|
326
|
+
create: dsh_plugin_xujie_memory_xujieMemory_forget_parameter_1$schema,
|
|
327
|
+
jsonSchema: {"type":"string"},
|
|
328
|
+
},
|
|
329
|
+
strictCodec: {
|
|
330
|
+
mode: 'strict',
|
|
331
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/forget:traceId',
|
|
332
|
+
create: dsh_plugin_xujie_memory_xujieMemory_forget_parameter_1_strict$schema,
|
|
333
|
+
jsonSchema: {"type":"string"},
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
name: 'expectedHash',
|
|
338
|
+
source: 'json',
|
|
339
|
+
codec: {
|
|
340
|
+
mode: 'strict',
|
|
341
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/forget:expectedHash',
|
|
342
|
+
create: dsh_plugin_xujie_memory_xujieMemory_forget_parameter_2$schema,
|
|
343
|
+
jsonSchema: {"type":"string"},
|
|
344
|
+
},
|
|
345
|
+
strictCodec: {
|
|
346
|
+
mode: 'strict',
|
|
347
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/forget:expectedHash',
|
|
348
|
+
create: dsh_plugin_xujie_memory_xujieMemory_forget_parameter_2_strict$schema,
|
|
349
|
+
jsonSchema: {"type":"string"},
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
],
|
|
353
|
+
result: {
|
|
354
|
+
mode: 'strict',
|
|
355
|
+
typeSymbol: 'dsh-plugin-xujie-memory/types#ForgetResult',
|
|
356
|
+
create: dsh_plugin_xujie_memory_xujieMemory_forget_result$schema,
|
|
357
|
+
jsonSchema: {"type":"object","properties":{"trace_id":{"type":"string"},"erased":{"type":"boolean"},"already_erased":{"type":"boolean"},"state_keys":{"type":"array","items":{"type":"string"}}},"required":["trace_id","erased","already_erased","state_keys"],"additionalProperties":true},
|
|
358
|
+
},
|
|
359
|
+
sourceLocation: {"file":"packages/memory/src/controller.ts","line":84,"column":9},
|
|
360
|
+
},
|
|
361
|
+
'xujieMemory/search': {
|
|
362
|
+
service: 'xujieMemory',
|
|
363
|
+
invocation: { kind: 'direct' },
|
|
364
|
+
parameters: [
|
|
365
|
+
{
|
|
366
|
+
name: 'scopeId',
|
|
367
|
+
source: 'json',
|
|
368
|
+
codec: {
|
|
369
|
+
mode: 'strict',
|
|
370
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/search:scopeId',
|
|
371
|
+
create: dsh_plugin_xujie_memory_xujieMemory_search_parameter_0$schema,
|
|
372
|
+
jsonSchema: {"type":"string"},
|
|
373
|
+
},
|
|
374
|
+
strictCodec: {
|
|
375
|
+
mode: 'strict',
|
|
376
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/search:scopeId',
|
|
377
|
+
create: dsh_plugin_xujie_memory_xujieMemory_search_parameter_0_strict$schema,
|
|
378
|
+
jsonSchema: {"type":"string"},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
name: 'query',
|
|
383
|
+
source: 'json',
|
|
384
|
+
codec: {
|
|
385
|
+
mode: 'strict',
|
|
386
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/search:query',
|
|
387
|
+
create: dsh_plugin_xujie_memory_xujieMemory_search_parameter_1$schema,
|
|
388
|
+
jsonSchema: {"type":"string"},
|
|
389
|
+
},
|
|
390
|
+
strictCodec: {
|
|
391
|
+
mode: 'strict',
|
|
392
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/search:query',
|
|
393
|
+
create: dsh_plugin_xujie_memory_xujieMemory_search_parameter_1_strict$schema,
|
|
394
|
+
jsonSchema: {"type":"string"},
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
result: {
|
|
399
|
+
mode: 'strict',
|
|
400
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/search:result',
|
|
401
|
+
create: dsh_plugin_xujie_memory_xujieMemory_search_result$schema,
|
|
402
|
+
jsonSchema: {"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"content":{"type":"string"},"content_hash":{"type":"string"},"score":{"type":"number"},"priority":{"type":"number"},"anchor":{"type":"boolean"},"importance":{"type":"number"},"recorded_at":{"type":"string"},"layer":{"type":"string"}},"required":["trace_id","content","content_hash","score","priority","anchor","importance","recorded_at","layer"],"additionalProperties":true}},
|
|
403
|
+
},
|
|
404
|
+
sourceLocation: {"file":"packages/memory/src/controller.ts","line":67,"column":9},
|
|
405
|
+
},
|
|
406
|
+
'xujieMemory/snapshot': {
|
|
407
|
+
service: 'xujieMemory',
|
|
408
|
+
invocation: { kind: 'direct' },
|
|
409
|
+
parameters: [
|
|
410
|
+
{
|
|
411
|
+
name: 'scopeId',
|
|
412
|
+
source: 'json',
|
|
413
|
+
codec: {
|
|
414
|
+
mode: 'strict',
|
|
415
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/snapshot:scopeId',
|
|
416
|
+
create: dsh_plugin_xujie_memory_xujieMemory_snapshot_parameter_0$schema,
|
|
417
|
+
jsonSchema: {"type":"string"},
|
|
418
|
+
},
|
|
419
|
+
strictCodec: {
|
|
420
|
+
mode: 'strict',
|
|
421
|
+
typeSymbol: 'dsh-plugin-xujie-memory#xujieMemory/snapshot:scopeId',
|
|
422
|
+
create: dsh_plugin_xujie_memory_xujieMemory_snapshot_parameter_0_strict$schema,
|
|
423
|
+
jsonSchema: {"type":"string"},
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
result: {
|
|
428
|
+
mode: 'strict',
|
|
429
|
+
typeSymbol: 'dsh-plugin-xujie-memory/types#Snapshot',
|
|
430
|
+
create: dsh_plugin_xujie_memory_xujieMemory_snapshot_result$schema,
|
|
431
|
+
jsonSchema: {"type":"object","properties":{"scope_id":{"type":"string"},"scope_mode":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string"},"kind":{"type":"string"},"content":{"type":"string"},"editable":{"type":"boolean"},"trace_id":{"type":"string"},"content_hash":{"type":"string"},"recorded_at":{"type":"string"},"importance":{"type":"number"},"priority":{"type":"number"},"anchor":{"type":"boolean","enum":[false,true]},"status":{"type":"string"},"evidence":{"type":"array","items":{"type":"string"}}},"required":["id","layer","kind","content","editable"],"additionalProperties":true}},"edges":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"target":{"type":"string"},"kind":{"type":"string"}},"required":["source","target","kind"],"additionalProperties":true}},"cards":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string"},"display_name":{"type":"string"},"status":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"tag_id":{"type":"string"},"kind":{"type":"string"},"value":{"type":"string"},"source":{"type":"string"},"confidence":{"type":"number"}},"required":["tag_id","kind","value","source","confidence"],"additionalProperties":true}}},"required":["account_id","display_name","status","tags"],"additionalProperties":true}},"stats":{"type":"object","properties":{"traces":{"type":"number"},"traces_erased":{"type":"number"},"events":{"type":"number"},"states":{"type":"number"},"anchors":{"type":"number"},"clarifications_open":{"type":"number"},"summaries":{"type":"number"}},"required":["traces","traces_erased","events","states","anchors","clarifications_open","summaries"],"additionalProperties":true},"truncated":{"type":"boolean"},"limit":{"type":"number"}},"required":["scope_id","scope_mode","nodes","edges","cards","stats","truncated","limit"],"additionalProperties":true},
|
|
432
|
+
},
|
|
433
|
+
sourceLocation: {"file":"packages/memory/src/controller.ts","line":46,"column":9},
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
}, z)
|
|
437
|
+
|
|
438
|
+
export default TYPERT_REMOTE
|
package/src/index.ts
ADDED
package/src/types.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Public JSON DTOs for the owner-only memory management page. */
|
|
2
|
+
export interface ScopeRow { scope_id: string; agent_id: string; traces: number }
|
|
3
|
+
export interface Trace { id: string; trace_id: string; scope_id: string; content: string; content_hash: string; recorded_at: string; source_kind: string; importance: number; anchor: boolean; priority: number }
|
|
4
|
+
export interface Node { id: string; layer: string; kind: string; content: string; editable: boolean; trace_id?: string; content_hash?: string; recorded_at?: string; importance?: number; priority?: number; anchor?: boolean; status?: string; evidence?: string[] }
|
|
5
|
+
export interface Edge { source: string; target: string; kind: string }
|
|
6
|
+
export interface PersonTag { tag_id: string; kind: string; value: string; source: string; confidence: number }
|
|
7
|
+
export interface PersonCard { account_id: string; display_name: string; status: string; tags: PersonTag[] }
|
|
8
|
+
export interface Stats { traces: number; traces_erased: number; events: number; states: number; anchors: number; clarifications_open: number; summaries: number }
|
|
9
|
+
export interface Catalog { scope_mode: string; scopes: ScopeRow[] }
|
|
10
|
+
export interface Snapshot { scope_id: string; scope_mode: string; nodes: Node[]; edges: Edge[]; cards: PersonCard[]; stats: Stats; truncated: boolean; limit: number }
|
|
11
|
+
export interface SearchHit { trace_id: string; content: string; content_hash: string; score: number; priority: number; anchor: boolean; importance: number; recorded_at: string; layer: string }
|
|
12
|
+
export interface EditResult { changed: boolean; trace: Trace; replaced_trace_id?: string; pending?: number }
|
|
13
|
+
export interface ForgetResult { trace_id: string; erased: boolean; already_erased: boolean; state_keys: string[] }
|