@thinkingai/ae-cli 6.1.18 → 6.1.20

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 (127) hide show
  1. package/README.md +97 -38
  2. package/README.zh.md +101 -38
  3. package/dist/{auth-ROB2EDYV.js → auth-FUM37MHF.js} +241 -126
  4. package/dist/{capability-DKMYUTLC.js → capability-AXFQW5WM.js} +49 -35
  5. package/dist/{chunk-JHENBQ5B.js → chunk-4P355ZWB.js} +70 -1
  6. package/dist/chunk-6ZIQV5GW.js +26 -0
  7. package/dist/{chunk-TUKQZTMI.js → chunk-7K24F7T2.js} +2 -0
  8. package/dist/{chunk-OO6XR6LK.js → chunk-AMBFK2K3.js} +2 -0
  9. package/dist/chunk-ATSM5XAW.js +623 -0
  10. package/dist/{chunk-4XXOWOTA.js → chunk-BBEFP4SB.js} +31 -38
  11. package/dist/{chunk-BYYS3ANB.js → chunk-CZU3V3DQ.js} +5 -15
  12. package/dist/{chunk-VTWMIC5L.js → chunk-E2JKXMVO.js} +2 -0
  13. package/dist/chunk-ECBLHAZO.js +15 -0
  14. package/dist/{sync-HKIOZXQE.js → chunk-I4WQAEYB.js} +31 -540
  15. package/dist/{chunk-DWO43OIB.js → chunk-JQ3ENZZH.js} +2 -0
  16. package/dist/chunk-LNZBEQXW.js +25216 -0
  17. package/dist/{chunk-ZQ47LWTI.js → chunk-QJQZH5GQ.js} +49 -79
  18. package/dist/{chunk-QZ3AS4KK.js → chunk-RSG4ONOI.js} +9 -8
  19. package/dist/{chunk-4NN5IWVN.js → chunk-T6OSFQZD.js} +2 -0
  20. package/dist/{chunk-Y3LOALAV.js → chunk-TAL6CZH6.js} +8 -7
  21. package/dist/{chunk-3KWQYGYI.js → chunk-TKHSULJT.js} +2 -0
  22. package/dist/chunk-VXNMYUXU.js +202 -0
  23. package/dist/{chunk-3FY3RJ26.js → chunk-WZ6YVQSF.js} +15 -14
  24. package/dist/{chunk-6EIJSNBD.js → chunk-Y74WTIKJ.js} +2 -0
  25. package/dist/{community-report-client-C7WDGET3.js → community-report-client-XXWGSBSD.js} +3 -4
  26. package/dist/{config-BMYZX2UE.js → config-EXUGQN5T.js} +10 -10
  27. package/dist/{data-integration-QEKDWQDY.js → data-integration-4NZ53OMT.js} +920 -97
  28. package/dist/index.js +56 -81
  29. package/dist/{local-data-upload-client-4YYHSYD6.js → local-data-upload-client-KYOKVYZV.js} +3 -4
  30. package/dist/{memory-I2WXDTV2.js → memory-ATNKZNW5.js} +6 -7
  31. package/dist/{metadata-I4C2EWUN.js → metadata-VZVC7YMH.js} +10 -11
  32. package/dist/{model-HLHIEFMU.js → model-E4JMQ4V2.js} +8 -9
  33. package/dist/{personal-semantic-preference-LIPACBDX.js → personal-semantic-preference-7S2SQ3UV.js} +9 -10
  34. package/dist/{project-semantic-RT3R2VQD.js → project-semantic-2SZP2OPO.js} +13 -14
  35. package/dist/sync-YV3E66IF.js +520 -0
  36. package/dist/{te-agent-BR6VDBNX.js → te-agent-JB5T3PO7.js} +396 -92
  37. package/dist/{te-analysis-7VUNUYWZ.js → te-analysis-3YJAAT2D.js} +196 -43
  38. package/dist/{te-community-5DMNKJWY.js → te-community-UDBI672N.js} +12 -34
  39. package/dist/{te-dataops-6P5IKWNJ.js → te-dataops-ZLYOCXZ4.js} +480 -81
  40. package/dist/{te-engage-KZPR5R22.js → te-engage-4XG6OJML.js} +88 -16
  41. package/dist/{te-experiment-6BITX4RD.js → te-experiment-VXUWPINJ.js} +83 -12
  42. package/dist/te-kb-WYQWHFSC.js +1732 -0
  43. package/dist/{te-system-FXITO2JG.js → te-system-7G6F2LJA.js} +569 -35
  44. package/dist/{te-team-ADOC2ROP.js → te-team-E7FBBXMQ.js} +8 -7
  45. package/dist/{update-YCYCKJOO.js → update-D47BUG25.js} +8 -8
  46. package/package.json +22 -10
  47. package/skills/ae-agent/SKILL.md +30 -13
  48. package/skills/ae-agent/references/agent-distribution.md +94 -0
  49. package/skills/ae-agent/references/approval-request.md +4 -0
  50. package/skills/ae-agent/references/command_index.md +9 -2
  51. package/skills/ae-agent/references/create-automation.md +20 -2
  52. package/skills/ae-agent/references/get-agent-context.md +70 -0
  53. package/skills/ae-agent/references/list-automations.md +18 -3
  54. package/skills/ae-agent/references/list-mcp-credentials.md +1 -1
  55. package/skills/ae-agent/references/mcp-token.md +3 -3
  56. package/skills/ae-agent/references/set-mcp-credential.md +0 -1
  57. package/skills/ae-agent/references/update-automation.md +18 -0
  58. package/skills/ae-analysis/SKILL.md +11 -2
  59. package/skills/ae-analysis/references/adhoc_run.md +2 -0
  60. package/skills/ae-analysis/references/ai_models.md +23 -3
  61. package/skills/ae-analysis/references/analysis_gateway_assets.md +3 -3
  62. package/skills/ae-analysis/references/audience_models.md +18 -0
  63. package/skills/ae-analysis/references/command_index.md +9 -9
  64. package/skills/ae-analysis/references/cross_source_config.md +84 -0
  65. package/skills/ae-analysis/references/dashboard_update.md +1 -1
  66. package/skills/ae-analysis/references/project_timezone_update.md +13 -4
  67. package/skills/ae-analysis/references/property_create.md +2 -0
  68. package/skills/ae-analysis/references/super_metadata_batch_create.md +2 -0
  69. package/skills/ae-analysis/references/user_cluster_models.md +2 -0
  70. package/skills/ae-analysis/references/user_cluster_update.md +8 -4
  71. package/skills/ae-analysis/references/user_tag_create.md +30 -2
  72. package/skills/ae-analysis/references/user_tag_models.md +17 -3
  73. package/skills/ae-analysis/references/user_tag_update.md +14 -2
  74. package/skills/ae-data-integration/SKILL.md +3 -1
  75. package/skills/ae-data-integration/references/dimension-routing.md +36 -0
  76. package/skills/ae-data-integration/references/error-handling.md +54 -1
  77. package/skills/ae-data-integration/references/local-analysis.md +2 -0
  78. package/skills/ae-data-integration/references/source-inspect.md +18 -2
  79. package/skills/ae-data-integration/references/tracking-plan.md +1 -1
  80. package/skills/ae-data-integration/references/transform.md +4 -2
  81. package/skills/ae-data-integration/references/ue-mapping.md +5 -2
  82. package/skills/ae-data-integration/references/ue-routing.md +40 -1
  83. package/skills/ae-dataops/SKILL.md +11 -1
  84. package/skills/ae-dataops/references/dataops-backfill.md +135 -0
  85. package/skills/ae-engage/SKILL.md +5 -0
  86. package/skills/ae-engage/references/build-task-save-guide.md +5 -1
  87. package/skills/ae-engage/references/save-flow.md +37 -1
  88. package/skills/ae-engage/references/save-task.md +6 -0
  89. package/skills/ae-experiment/SKILL.md +6 -2
  90. package/skills/ae-experiment/references/save_metric.md +20 -8
  91. package/skills/ae-generate-tracking-plan/SKILL.md +25 -13
  92. package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +1 -1
  93. package/skills/ae-kb/SKILL.md +218 -36
  94. package/skills/ae-kb/references/query-workflow.md +59 -29
  95. package/skills/ae-kb/references/versions.md +46 -0
  96. package/skills/ae-system/SKILL.md +29 -31
  97. package/skills/ae-system/references/channel-management.md +303 -0
  98. package/skills/ae-use-agent/SKILL.md +42 -0
  99. package/skills/ae-use-agent/references/local-agent.md +114 -0
  100. package/dist/auth-GBMV6TEJ.js +0 -14
  101. package/dist/capability-HYVVPG25.js +0 -352
  102. package/dist/chunk-EFH4XWYC.js +0 -556
  103. package/dist/chunk-J2DEBMRF.js +0 -313
  104. package/dist/chunk-JRJY5DMJ.js +0 -71
  105. package/dist/chunk-OMPRXM3V.js +0 -349
  106. package/dist/chunk-QNOLN2LJ.js +0 -509
  107. package/dist/chunk-RJDU7NYP.js +0 -1198
  108. package/dist/chunk-RNAALWJK.js +0 -98
  109. package/dist/chunk-SERWF6G5.js +0 -13
  110. package/dist/chunk-UW5UN47B.js +0 -70
  111. package/dist/chunk-ZQKDZXDO.js +0 -317
  112. package/dist/client-L2YDMHQ6.js +0 -203
  113. package/dist/memory-3ORCR7JH.js +0 -893
  114. package/dist/metadata-VUOQJE26.js +0 -339
  115. package/dist/model-UGRDX4MW.js +0 -139
  116. package/dist/personal-semantic-preference-OEISBRHM.js +0 -239
  117. package/dist/project-semantic-FFPWFPIW.js +0 -1114
  118. package/dist/sync-TFHU2UTG.js +0 -10261
  119. package/dist/te-agent-VLYOV7S4.js +0 -3894
  120. package/dist/te-analysis-4YGQL5RC.js +0 -9357
  121. package/dist/te-community-ISDQWJU7.js +0 -1859
  122. package/dist/te-dataops-CVULXNVB.js +0 -2209
  123. package/dist/te-engage-N5WI32H6.js +0 -4898
  124. package/dist/te-experiment-UVR4HLND.js +0 -988
  125. package/dist/te-kb-RCLSSH2Q.js +0 -935
  126. package/dist/te-system-K2GYMCTB.js +0 -2213
  127. package/skills/ae-agent/references/auto-provision-mcp-credentials.md +0 -57
@@ -1,893 +0,0 @@
1
- import {
2
- buildCapabilityGatewayUrl,
3
- callCapabilityApi
4
- } from "./chunk-ZQ47LWTI.js";
5
- import "./chunk-SERWF6G5.js";
6
- import "./chunk-J2DEBMRF.js";
7
- import "./chunk-ZQKDZXDO.js";
8
- import "./chunk-3FY3RJ26.js";
9
- import "./chunk-UW5UN47B.js";
10
- import "./chunk-JHENBQ5B.js";
11
-
12
- // src/commands/memory/index.ts
13
- import fs from "fs/promises";
14
- import path from "path";
15
-
16
- // src/commands/memory/cli-client.ts
17
- var MEMORY_GATEWAY_DOMAIN = "memory";
18
- var DEFAULT_TE_CLAUDE_BASE_PATH = "/agent";
19
- var MEMORY_BASE_PATH = "memories";
20
- var MEMORY_DEFAULTS_PATH = `${MEMORY_BASE_PATH}/defaults`;
21
- function normalizeBasePath(value) {
22
- const trimmed = value.trim();
23
- if (!trimmed || trimmed === "/") return "";
24
- return `/${trimmed.replace(/^\/+|\/+$/g, "")}`;
25
- }
26
- function resolveMemoryApiBaseUrl(host) {
27
- const base = host.replace(/\/+$/, "");
28
- const basePath = normalizeBasePath(
29
- process.env.TE_CLAUDE_BASE_PATH ?? process.env.AE_API_PREFIX ?? DEFAULT_TE_CLAUDE_BASE_PATH
30
- );
31
- return basePath && !base.endsWith(basePath) ? `${base}${basePath}` : base;
32
- }
33
- function buildMemoryCliUrl(ctx, path2) {
34
- return buildCapabilityGatewayUrl(resolveMemoryApiBaseUrl(ctx.host()), MEMORY_GATEWAY_DOMAIN, path2);
35
- }
36
- function requestMemoryCli(ctx, method, path2, body, options = {}) {
37
- return callCapabilityApi(
38
- ctx.host(),
39
- MEMORY_GATEWAY_DOMAIN,
40
- path2,
41
- method,
42
- body,
43
- { apiBaseUrl: resolveMemoryApiBaseUrl(ctx.host()), ...options }
44
- );
45
- }
46
- function getMemoryCli(ctx, path2) {
47
- return requestMemoryCli(ctx, "GET", path2);
48
- }
49
- function postMemoryCli(ctx, path2, body, options = {}) {
50
- return requestMemoryCli(ctx, "POST", path2, body, options);
51
- }
52
- function patchMemoryCli(ctx, path2, body) {
53
- return requestMemoryCli(ctx, "PATCH", path2, body);
54
- }
55
- function putMemoryCli(ctx, path2, body) {
56
- return requestMemoryCli(ctx, "PUT", path2, body);
57
- }
58
- function deleteMemoryCli(ctx, path2) {
59
- return requestMemoryCli(ctx, "DELETE", path2);
60
- }
61
-
62
- // src/commands/memory/index.ts
63
- var SERVICE = "memory";
64
- var BASE_PATH = MEMORY_BASE_PATH;
65
- var DEFAULTS_PATH = MEMORY_DEFAULTS_PATH;
66
- var DEFAULT_AGENT_ID = "system-default-agent";
67
- var MANAGED_START = "<!-- ae-cli:user-memory:start -->";
68
- var MANAGED_END = "<!-- ae-cli:user-memory:end -->";
69
- var RUNTIME_MANAGED_START_PREFIX = "<!-- ae:user-memory:start";
70
- var RUNTIME_MANAGED_END = "<!-- ae:user-memory:end -->";
71
- var scopes = ["global", "agent"];
72
- var types = ["preference", "profile", "workflow", "fact", "temporary"];
73
- var submittedTypes = ["preference", "profile", "workflow", "fact"];
74
- var candidateSourceTypes = ["local_conversation", "memory_file"];
75
- var statuses = ["pending", "active", "rejected", "expired"];
76
- var MAX_MARK_USED_IDS = 200;
77
- var MAX_MEMORY_ID_LENGTH = 191;
78
- var MEMORY_JOB_POLL_INTERVAL_MS = 1500;
79
- var MEMORY_JOB_POLL_TIMEOUT_MS = 15 * 60 * 1e3;
80
- function optionalString(ctx, name) {
81
- const value = ctx.str(name).trim();
82
- return value ? value : void 0;
83
- }
84
- function assertValidExpiresAt(value) {
85
- if (!value) return;
86
- if (!/(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || Number.isNaN(Date.parse(value))) {
87
- throw new Error("--expires-at must be an ISO datetime with an explicit UTC offset");
88
- }
89
- }
90
- function assertAllowed(name, value, allowed) {
91
- if (value && !allowed.includes(value)) {
92
- throw new Error(`--${name} must be one of: ${allowed.join(", ")}`);
93
- }
94
- }
95
- function buildQuery(params) {
96
- const qs = new URLSearchParams();
97
- for (const [key, value] of Object.entries(params)) {
98
- if (value) qs.set(key, value);
99
- }
100
- const text = qs.toString();
101
- return text ? `?${text}` : "";
102
- }
103
- function envOptional(name) {
104
- const value = process.env[name]?.trim();
105
- return value ? value : void 0;
106
- }
107
- function defaultAgentId(ctx) {
108
- return optionalString(ctx, "agentId") ?? envOptional("TE_AGENT_CURRENT_AGENT_ID") ?? DEFAULT_AGENT_ID;
109
- }
110
- function currentAgentId(ctx) {
111
- const agentId = optionalString(ctx, "agentId") ?? envOptional("TE_AGENT_CURRENT_AGENT_ID");
112
- if (!agentId) {
113
- throw new Error("--agent-id is required outside a Web Agent session");
114
- }
115
- return agentId;
116
- }
117
- function markUsedIds(ctx) {
118
- const value = ctx.json("ids");
119
- if (!Array.isArray(value)) {
120
- throw new Error("--ids must be a JSON array");
121
- }
122
- if (value.length < 1 || value.length > MAX_MARK_USED_IDS) {
123
- throw new Error(`--ids must contain between 1 and ${MAX_MARK_USED_IDS} items`);
124
- }
125
- const ids = value.map((item, index) => {
126
- if (typeof item !== "string") {
127
- throw new Error(`--ids item ${index + 1} must be a string`);
128
- }
129
- const id = item.trim();
130
- if (!id) {
131
- throw new Error(`--ids item ${index + 1} must not be empty`);
132
- }
133
- if (id.length > MAX_MEMORY_ID_LENGTH) {
134
- throw new Error(`--ids item ${index + 1} must be at most ${MAX_MEMORY_ID_LENGTH} characters`);
135
- }
136
- return id;
137
- });
138
- return [...new Set(ids)];
139
- }
140
- function markUsedBody(ctx) {
141
- return {
142
- agentId: currentAgentId(ctx),
143
- ids: markUsedIds(ctx)
144
- };
145
- }
146
- function writeContextInput(ctx) {
147
- const file = optionalString(ctx, "file");
148
- if (!file) throw new Error("--file is required");
149
- const resolvedFile = path.resolve(file);
150
- if (path.basename(resolvedFile).toLowerCase() === "user-memories.md" && path.basename(path.dirname(resolvedFile)).toLowerCase() === ".claude") {
151
- throw new Error("--file must not target .claude/user-memories.md");
152
- }
153
- const limit = ctx.optionalNum("limit");
154
- if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1 || limit > 50)) {
155
- throw new Error("--limit must be an integer between 1 and 50");
156
- }
157
- return {
158
- file,
159
- agentId: defaultAgentId(ctx),
160
- limit
161
- };
162
- }
163
- function defaultPath(ctx) {
164
- return `${DEFAULTS_PATH}${buildQuery({ agentId: defaultAgentId(ctx) })}`;
165
- }
166
- function dryRunUrl(ctx, path2) {
167
- return buildMemoryCliUrl(ctx, path2);
168
- }
169
- function parseSelectionJson(raw) {
170
- if (!raw) {
171
- throw new Error("Provide --selection-json or run inside a te-agent conversation with current session selection");
172
- }
173
- let parsed;
174
- try {
175
- parsed = JSON.parse(raw);
176
- } catch {
177
- throw new Error("--selection-json must be valid JSON");
178
- }
179
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
180
- throw new Error("--selection-json must be a JSON object");
181
- }
182
- return parsed;
183
- }
184
- function defaultSaveBody(ctx) {
185
- return {
186
- selection: parseSelectionJson(
187
- optionalString(ctx, "selectionJson") ?? envOptional("TE_AGENT_CURRENT_SESSION_SELECTION_JSON")
188
- )
189
- };
190
- }
191
- function memoryBody(ctx) {
192
- const scope = optionalString(ctx, "scope") ?? "agent";
193
- const agentId = defaultAgentId(ctx);
194
- return {
195
- content: optionalString(ctx, "content"),
196
- type: optionalString(ctx, "type") ?? "preference",
197
- scopeType: scope,
198
- agentId: scope === "agent" ? agentId : null,
199
- pinned: ctx.bool("pinned") || void 0,
200
- expiresAt: optionalString(ctx, "expiresAt") ?? null,
201
- source: { sourceType: "manual", createdBy: "cli" }
202
- };
203
- }
204
- function updateBody(ctx) {
205
- const scope = optionalString(ctx, "scope");
206
- return {
207
- content: optionalString(ctx, "content"),
208
- type: optionalString(ctx, "type"),
209
- scopeType: scope,
210
- agentId: scope === "global" ? null : scope === "agent" ? defaultAgentId(ctx) : void 0,
211
- pinned: optionalString(ctx, "pinned") === void 0 ? void 0 : ctx.bool("pinned"),
212
- expiresAt: optionalString(ctx, "expiresAt") ?? void 0
213
- };
214
- }
215
- function compactObject(input) {
216
- return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== void 0));
217
- }
218
- async function readStdin() {
219
- const chunks = [];
220
- for await (const chunk of process.stdin) {
221
- chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
222
- }
223
- return Buffer.concat(chunks).toString("utf8").trim();
224
- }
225
- function parseCandidatePayload(raw) {
226
- let parsed;
227
- try {
228
- parsed = JSON.parse(raw);
229
- } catch {
230
- throw new Error("candidate input must be valid JSON");
231
- }
232
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
233
- throw new Error("candidate input must be a JSON object");
234
- }
235
- const root = parsed;
236
- if (Object.keys(root).some((key) => key !== "candidates") || !Array.isArray(root.candidates)) {
237
- throw new Error("candidate input must contain only a candidates array");
238
- }
239
- if (root.candidates.length < 1 || root.candidates.length > 10) {
240
- throw new Error("candidates must contain between 1 and 10 items");
241
- }
242
- const candidates = root.candidates.map((value, index) => {
243
- if (!value || typeof value !== "object" || Array.isArray(value)) {
244
- throw new Error(`candidate ${index + 1} must be an object`);
245
- }
246
- const item = value;
247
- if (Object.keys(item).some((key) => !["content", "type", "evidence"].includes(key))) {
248
- throw new Error(`candidate ${index + 1} contains unsupported fields`);
249
- }
250
- const content = typeof item.content === "string" ? item.content.trim() : "";
251
- const type = typeof item.type === "string" ? item.type : "";
252
- const evidence = typeof item.evidence === "string" && item.evidence.trim() ? item.evidence.trim() : void 0;
253
- if (content.length < 6 || content.length > 1e3) {
254
- throw new Error(`candidate ${index + 1} content must be between 6 and 1000 characters`);
255
- }
256
- if (!submittedTypes.includes(type)) {
257
- throw new Error(`candidate ${index + 1} type must be one of: ${submittedTypes.join(", ")}`);
258
- }
259
- if (evidence && evidence.length > 300) {
260
- throw new Error(`candidate ${index + 1} evidence must be at most 300 characters`);
261
- }
262
- return { content, type, evidence };
263
- });
264
- return { candidates };
265
- }
266
- function candidateTarget(ctx) {
267
- const scope = optionalString(ctx, "scope");
268
- const currentAgentId2 = envOptional("TE_AGENT_CURRENT_AGENT_ID");
269
- if (!scope) {
270
- if (!currentAgentId2) {
271
- throw new Error("Outside a Web Agent session, provide --scope global or --scope agent --agent-id <id>");
272
- }
273
- return {
274
- scopeType: "agent",
275
- agentId: optionalString(ctx, "agentId") ?? currentAgentId2
276
- };
277
- }
278
- if (scope === "global") return { scopeType: "global", agentId: null };
279
- const agentId = optionalString(ctx, "agentId") ?? currentAgentId2;
280
- if (!agentId) {
281
- throw new Error("--scope agent requires --agent-id outside a Web Agent session");
282
- }
283
- return { scopeType: "agent", agentId };
284
- }
285
- function validateCandidateSource(ctx) {
286
- const sourceType = optionalString(ctx, "sourceType");
287
- assertAllowed("source-type", sourceType, candidateSourceTypes);
288
- if (!sourceType) throw new Error("--source-type is required");
289
- const sourceName = optionalString(ctx, "sourceName");
290
- if (sourceName && (sourceName.includes("/") || sourceName.includes("\\") || sourceName === "." || sourceName === "..")) {
291
- throw new Error("--source-name must be a file name without a path");
292
- }
293
- if (sourceName && sourceName.length > 255) {
294
- throw new Error("--source-name must be at most 255 characters");
295
- }
296
- const sourceAgent = optionalString(ctx, "sourceAgent");
297
- if (sourceAgent && sourceAgent.length > 64) {
298
- throw new Error("--source-agent must be at most 64 characters");
299
- }
300
- const sourceSessionId = optionalString(ctx, "sourceSessionId");
301
- if (sourceSessionId && sourceSessionId.length > 191) {
302
- throw new Error("--source-session-id must be at most 191 characters");
303
- }
304
- const hasJson = Boolean(optionalString(ctx, "candidatesJson"));
305
- const hasStdin = ctx.bool("stdin");
306
- if (hasJson === hasStdin) {
307
- throw new Error("Provide exactly one of --candidates-json or --stdin");
308
- }
309
- candidateTarget(ctx);
310
- if (hasJson) parseCandidatePayload(optionalString(ctx, "candidatesJson"));
311
- }
312
- function submitCandidatesBody(ctx, payload) {
313
- const target = candidateTarget(ctx);
314
- return compactObject({
315
- ...payload,
316
- sourceType: optionalString(ctx, "sourceType"),
317
- sourceName: optionalString(ctx, "sourceName"),
318
- sourceAgent: optionalString(ctx, "sourceAgent"),
319
- sourceSessionId: optionalString(ctx, "sourceSessionId"),
320
- scopeType: target.scopeType,
321
- agentId: target.agentId,
322
- autoApprove: ctx.bool("autoApprove")
323
- });
324
- }
325
- async function readExtractText(ctx) {
326
- if (ctx.bool("stdin")) return readStdin();
327
- return optionalString(ctx, "text");
328
- }
329
- function extractBody(ctx, autoApprove) {
330
- const scope = optionalString(ctx, "scope") ?? "agent";
331
- return {
332
- agentId: defaultAgentId(ctx),
333
- conversationId: optionalString(ctx, "sessionId"),
334
- scopeType: scope,
335
- autoApprove: autoApprove ?? (ctx.bool("autoApprove") || void 0),
336
- model: optionalString(ctx, "model")
337
- };
338
- }
339
- function extractJobBody(ctx) {
340
- return {
341
- kind: "extract",
342
- ...extractBody(ctx),
343
- mode: "incremental"
344
- };
345
- }
346
- function organizeBody(ctx) {
347
- return {
348
- kind: "organize",
349
- agentId: defaultAgentId(ctx),
350
- scopeType: optionalString(ctx, "scope") ?? "agent"
351
- };
352
- }
353
- function wait(ms) {
354
- return new Promise((resolve) => setTimeout(resolve, ms));
355
- }
356
- async function pollMemoryJob(ctx, initial) {
357
- let payload = initial;
358
- const jobId = payload.item?.id;
359
- if (!jobId) return payload;
360
- const deadline = Date.now() + MEMORY_JOB_POLL_TIMEOUT_MS;
361
- while (payload.item?.status === "queued" || payload.item?.status === "running") {
362
- if (Date.now() >= deadline) {
363
- return {
364
- ...payload,
365
- timedOut: true,
366
- jobId,
367
- status: payload.item.status
368
- };
369
- }
370
- await wait(MEMORY_JOB_POLL_INTERVAL_MS);
371
- payload = await getMemoryCli(
372
- ctx,
373
- `${BASE_PATH}/jobs/${encodeURIComponent(jobId)}`
374
- );
375
- }
376
- return payload;
377
- }
378
- function normalizeMemoryContextItems(items) {
379
- return items.map((item, index) => {
380
- const id = typeof item?.id === "string" ? item.id.trim() : "";
381
- if (!id || id.length > MAX_MEMORY_ID_LENGTH) {
382
- throw new Error(
383
- `Memory context item ${index + 1} ID must be a non-empty string of at most ${MAX_MEMORY_ID_LENGTH} characters`
384
- );
385
- }
386
- if (typeof item.content !== "string") {
387
- throw new Error(`Memory context item ${index + 1} content must be a string`);
388
- }
389
- if (item.content.includes(MANAGED_START) || item.content.includes(MANAGED_END) || item.content.includes("<!-- ae:user-memory-id=") || item.content.includes(RUNTIME_MANAGED_START_PREFIX) || item.content.includes(RUNTIME_MANAGED_END)) {
390
- throw new Error(`Memory context item ${index + 1} content contains a reserved memory marker`);
391
- }
392
- return { ...item, id };
393
- });
394
- }
395
- function renderManagedBlock(items) {
396
- const normalizedItems = normalizeMemoryContextItems(items);
397
- const lines = [
398
- MANAGED_START,
399
- "## User Memory",
400
- "",
401
- ...normalizedItems.flatMap((item) => [
402
- `<!-- ae:user-memory-id="${item.id}" -->`,
403
- `- ${item.type ? `[${item.type}] ` : ""}${item.content}`
404
- ]),
405
- MANAGED_END
406
- ];
407
- return lines.join("\n");
408
- }
409
- function countOccurrences(source, marker) {
410
- return source.split(marker).length - 1;
411
- }
412
- function replaceManagedBlock(source, block) {
413
- if (source.includes(RUNTIME_MANAGED_START_PREFIX) || source.includes(RUNTIME_MANAGED_END)) {
414
- throw new Error("Target file contains a te-claude runtime memory block");
415
- }
416
- const startCount = countOccurrences(source, MANAGED_START);
417
- const endCount = countOccurrences(source, MANAGED_END);
418
- if (startCount !== endCount || startCount > 1) {
419
- throw new Error("Target file contains an incomplete or duplicate ae-cli user-memory block");
420
- }
421
- const start = source.indexOf(MANAGED_START);
422
- const end = source.indexOf(MANAGED_END);
423
- if (startCount === 1) {
424
- if (end <= start) {
425
- throw new Error("Target file contains an incomplete or duplicate ae-cli user-memory block");
426
- }
427
- return `${source.slice(0, start)}${block}${source.slice(end + MANAGED_END.length)}`;
428
- }
429
- const separator = source.length === 0 ? "" : /(?:\r?\n){2}$/.test(source) ? "" : /\r?\n$/.test(source) ? "\n" : "\n\n";
430
- return `${source}${separator}${block}
431
- `;
432
- }
433
- async function readMemoryTarget(target) {
434
- try {
435
- const stats = await fs.stat(target);
436
- if (!stats.isFile()) {
437
- throw new Error("Target path must be a regular file");
438
- }
439
- return await fs.readFile(target, "utf8");
440
- } catch (error) {
441
- if (error?.code === "ENOENT") return "";
442
- throw error;
443
- }
444
- }
445
- async function writeMemoryContextFile(target, items) {
446
- const block = renderManagedBlock(items);
447
- const current = await readMemoryTarget(target);
448
- const next = replaceManagedBlock(current, block);
449
- await fs.writeFile(target, next, "utf8");
450
- return { file: target, count: items.length, markers: [MANAGED_START, MANAGED_END] };
451
- }
452
- var listMemories = {
453
- service: SERVICE,
454
- command: "+list",
455
- description: "List user memories from te-claude",
456
- flags: [
457
- { name: "status", type: "string", required: false, desc: "Filter by status: pending | active | rejected | expired" },
458
- { name: "scope", type: "string", required: false, desc: "Filter by scope: global | agent" },
459
- { name: "agent-id", type: "string", required: false, desc: "Filter by Agent ID" },
460
- { name: "query", type: "string", required: false, desc: "Search text contained in memory content" }
461
- ],
462
- risk: "read",
463
- validate: (ctx) => {
464
- assertAllowed("status", optionalString(ctx, "status"), statuses);
465
- assertAllowed("scope", optionalString(ctx, "scope"), scopes);
466
- },
467
- dryRun: (ctx) => ({
468
- method: "GET",
469
- url: dryRunUrl(ctx, `${BASE_PATH}${buildQuery({
470
- status: optionalString(ctx, "status"),
471
- scopeType: optionalString(ctx, "scope"),
472
- agentId: optionalString(ctx, "agentId"),
473
- query: optionalString(ctx, "query")
474
- })}`)
475
- }),
476
- execute: (ctx) => getMemoryCli(ctx, `${BASE_PATH}${buildQuery({
477
- status: optionalString(ctx, "status"),
478
- scopeType: optionalString(ctx, "scope"),
479
- agentId: optionalString(ctx, "agentId"),
480
- query: optionalString(ctx, "query")
481
- })}`)
482
- };
483
- var getMemory = {
484
- service: SERVICE,
485
- command: "+get",
486
- description: "Get one user memory by ID",
487
- flags: [{ name: "id", type: "string", required: true, desc: "Memory ID" }],
488
- risk: "read",
489
- dryRun: (ctx) => ({
490
- method: "GET",
491
- url: dryRunUrl(ctx, `${BASE_PATH}/${encodeURIComponent(ctx.str("id"))}`)
492
- }),
493
- execute: (ctx) => getMemoryCli(ctx, `${BASE_PATH}/${encodeURIComponent(ctx.str("id"))}`)
494
- };
495
- var createMemory = {
496
- service: SERVICE,
497
- command: "+create",
498
- description: "Create a user memory",
499
- flags: [
500
- { name: "content", type: "string", required: true, desc: "Memory content" },
501
- { name: "type", type: "string", required: false, desc: "Memory type: preference | profile | workflow | fact | temporary" },
502
- { name: "scope", type: "string", required: false, desc: "Memory scope: global | agent" },
503
- { name: "agent-id", type: "string", required: false, desc: "Agent ID for agent-scoped memory" },
504
- { name: "pinned", type: "boolean", required: false, desc: "Pin the memory" },
505
- { name: "expires-at", type: "string", required: false, desc: "ISO datetime when the memory expires" }
506
- ],
507
- risk: "write",
508
- validate: (ctx) => {
509
- const type = optionalString(ctx, "type");
510
- assertAllowed("type", type, types);
511
- assertAllowed("scope", optionalString(ctx, "scope"), scopes);
512
- const expiresAt = optionalString(ctx, "expiresAt");
513
- if (type === "temporary" && !expiresAt) {
514
- throw new Error("--expires-at is required when --type is temporary");
515
- }
516
- assertValidExpiresAt(expiresAt);
517
- },
518
- dryRun: (ctx) => ({ method: "POST", url: dryRunUrl(ctx, BASE_PATH), body: compactObject(memoryBody(ctx)) }),
519
- execute: (ctx) => postMemoryCli(ctx, BASE_PATH, compactObject(memoryBody(ctx)))
520
- };
521
- var updateMemory = {
522
- service: SERVICE,
523
- command: "+update",
524
- description: "Update a user memory",
525
- flags: [
526
- { name: "id", type: "string", required: true, desc: "Memory ID" },
527
- { name: "content", type: "string", required: false, desc: "Replacement memory content" },
528
- { name: "type", type: "string", required: false, desc: "Memory type: preference | profile | workflow | fact | temporary" },
529
- { name: "scope", type: "string", required: false, desc: "Memory scope: global | agent" },
530
- { name: "agent-id", type: "string", required: false, desc: "Agent ID for agent-scoped memory" },
531
- { name: "pinned", type: "boolean", required: false, desc: "Pin or unpin the memory" },
532
- { name: "expires-at", type: "string", required: false, desc: "ISO datetime when the memory expires" }
533
- ],
534
- risk: "write",
535
- validate: (ctx) => {
536
- const type = optionalString(ctx, "type");
537
- assertAllowed("type", type, types);
538
- assertAllowed("scope", optionalString(ctx, "scope"), scopes);
539
- const expiresAt = optionalString(ctx, "expiresAt");
540
- if (type === "temporary" && !expiresAt) {
541
- throw new Error("--expires-at is required when --type is temporary");
542
- }
543
- assertValidExpiresAt(expiresAt);
544
- },
545
- dryRun: (ctx) => ({
546
- method: "PATCH",
547
- url: dryRunUrl(ctx, `${BASE_PATH}/${encodeURIComponent(ctx.str("id"))}`),
548
- body: compactObject(updateBody(ctx))
549
- }),
550
- execute: (ctx) => patchMemoryCli(ctx, `${BASE_PATH}/${encodeURIComponent(ctx.str("id"))}`, compactObject(updateBody(ctx)))
551
- };
552
- var deleteMemory = {
553
- service: SERVICE,
554
- command: "+delete",
555
- description: "Delete a user memory",
556
- flags: [{ name: "id", type: "string", required: true, desc: "Memory ID" }],
557
- risk: "write",
558
- dryRun: (ctx) => ({
559
- method: "DELETE",
560
- url: dryRunUrl(ctx, `${BASE_PATH}/${encodeURIComponent(ctx.str("id"))}`)
561
- }),
562
- execute: (ctx) => deleteMemoryCli(ctx, `${BASE_PATH}/${encodeURIComponent(ctx.str("id"))}`)
563
- };
564
- var extractMemory = {
565
- service: SERVICE,
566
- command: "+extract",
567
- description: "Extract memories from text, stdin, or a Web session",
568
- flags: [
569
- { name: "text", type: "string", required: false, desc: "Source text to extract from" },
570
- { name: "stdin", type: "boolean", required: false, desc: "Read source text from stdin" },
571
- { name: "session-id", type: "string", required: false, desc: "Web conversation ID to extract from" },
572
- { name: "agent-id", type: "string", required: false, desc: "Agent ID used for agent-scoped memory" },
573
- { name: "scope", type: "string", required: false, desc: "Memory scope: global | agent" },
574
- { name: "model", type: "string", required: false, desc: "Model id/key used by server-side extraction" },
575
- { name: "auto-approve", type: "boolean", required: false, desc: "Create active memories instead of pending suggestions" }
576
- ],
577
- risk: "write",
578
- validate: (ctx) => {
579
- assertAllowed("scope", optionalString(ctx, "scope"), scopes);
580
- if (!ctx.bool("stdin") && !optionalString(ctx, "text") && !optionalString(ctx, "sessionId")) {
581
- throw new Error("Provide --text, --stdin, or --session-id");
582
- }
583
- },
584
- dryRun: (ctx) => optionalString(ctx, "sessionId") ? { method: "POST", url: dryRunUrl(ctx, `${BASE_PATH}/jobs`), body: extractJobBody(ctx) } : { method: "POST", url: dryRunUrl(ctx, `${BASE_PATH}/extract`), body: extractBody(ctx) },
585
- execute: async (ctx) => {
586
- if (optionalString(ctx, "sessionId")) {
587
- const payload = await postMemoryCli(
588
- ctx,
589
- `${BASE_PATH}/jobs`,
590
- compactObject(extractJobBody(ctx))
591
- );
592
- return pollMemoryJob(ctx, payload);
593
- }
594
- const text = await readExtractText(ctx);
595
- return postMemoryCli(ctx, `${BASE_PATH}/extract`, compactObject({ ...extractBody(ctx), text }));
596
- }
597
- };
598
- var submitCandidatesMemory = {
599
- service: SERVICE,
600
- command: "+submit-candidates",
601
- description: "Submit locally extracted structured memory candidates for platform review",
602
- flags: [
603
- {
604
- name: "candidates-json",
605
- type: "string",
606
- required: false,
607
- desc: "JSON object containing a candidates array"
608
- },
609
- {
610
- name: "stdin",
611
- type: "boolean",
612
- required: false,
613
- desc: "Read candidate JSON from stdin"
614
- },
615
- {
616
- name: "source-type",
617
- type: "string",
618
- required: true,
619
- desc: "Source type: local_conversation | memory_file"
620
- },
621
- {
622
- name: "source-name",
623
- type: "string",
624
- required: false,
625
- desc: "Source file name only, without a path"
626
- },
627
- {
628
- name: "source-agent",
629
- type: "string",
630
- required: false,
631
- desc: "Local agent name, for example codex or claude"
632
- },
633
- {
634
- name: "source-session-id",
635
- type: "string",
636
- required: false,
637
- desc: "Optional local source session identifier"
638
- },
639
- {
640
- name: "scope",
641
- type: "string",
642
- required: false,
643
- desc: "Target scope: global | agent"
644
- },
645
- {
646
- name: "agent-id",
647
- type: "string",
648
- required: false,
649
- desc: "Target Agent ID for agent scope"
650
- },
651
- {
652
- name: "auto-approve",
653
- type: "boolean",
654
- required: false,
655
- desc: "Activate non-conflicting candidates immediately"
656
- }
657
- ],
658
- risk: "write",
659
- validate: (ctx) => {
660
- assertAllowed("scope", optionalString(ctx, "scope"), scopes);
661
- validateCandidateSource(ctx);
662
- },
663
- dryRun: (ctx) => ({
664
- method: "POST",
665
- url: dryRunUrl(ctx, `${BASE_PATH}/candidates`),
666
- body: submitCandidatesBody(ctx, ctx.bool("stdin") ? { candidates: "(candidate JSON from stdin)" } : parseCandidatePayload(optionalString(ctx, "candidatesJson")))
667
- }),
668
- execute: async (ctx) => {
669
- validateCandidateSource(ctx);
670
- const raw = ctx.bool("stdin") ? await readStdin() : optionalString(ctx, "candidatesJson");
671
- const payload = parseCandidatePayload(raw);
672
- return postMemoryCli(ctx, `${BASE_PATH}/candidates`, submitCandidatesBody(ctx, payload));
673
- }
674
- };
675
- var pendingList = {
676
- service: SERVICE,
677
- command: "+pending-list",
678
- description: "List pending user memories",
679
- flags: [],
680
- risk: "read",
681
- dryRun: (ctx) => ({ method: "GET", url: dryRunUrl(ctx, `${BASE_PATH}/pending`) }),
682
- execute: (ctx) => getMemoryCli(ctx, `${BASE_PATH}/pending`)
683
- };
684
- var pendingApprove = {
685
- service: SERVICE,
686
- command: "+pending-approve",
687
- description: "Approve one pending memory",
688
- flags: [{ name: "id", type: "string", required: true, desc: "Pending memory ID" }],
689
- risk: "write",
690
- dryRun: (ctx) => ({
691
- method: "POST",
692
- url: dryRunUrl(ctx, `${BASE_PATH}/pending/${encodeURIComponent(ctx.str("id"))}/approve`),
693
- body: {}
694
- }),
695
- execute: (ctx) => postMemoryCli(ctx, `${BASE_PATH}/pending/${encodeURIComponent(ctx.str("id"))}/approve`, {})
696
- };
697
- var pendingReject = {
698
- service: SERVICE,
699
- command: "+pending-reject",
700
- description: "Reject one pending memory",
701
- flags: [{ name: "id", type: "string", required: true, desc: "Pending memory ID" }],
702
- risk: "write",
703
- dryRun: (ctx) => ({
704
- method: "POST",
705
- url: dryRunUrl(ctx, `${BASE_PATH}/pending/${encodeURIComponent(ctx.str("id"))}/reject`),
706
- body: {}
707
- }),
708
- execute: (ctx) => postMemoryCli(ctx, `${BASE_PATH}/pending/${encodeURIComponent(ctx.str("id"))}/reject`, {})
709
- };
710
- var organizeMemory = {
711
- service: SERVICE,
712
- command: "+organize",
713
- description: "Organize active memories in a target scope and wait for pending suggestions",
714
- flags: [
715
- { name: "agent-id", type: "string", required: false, desc: "Agent ID used for agent-scoped memory" },
716
- { name: "scope", type: "string", required: false, desc: "Memory scope: global | agent" }
717
- ],
718
- risk: "write",
719
- validate: (ctx) => {
720
- assertAllowed("scope", optionalString(ctx, "scope"), scopes);
721
- },
722
- dryRun: (ctx) => ({
723
- method: "POST",
724
- url: dryRunUrl(ctx, `${BASE_PATH}/jobs`),
725
- body: organizeBody(ctx)
726
- }),
727
- execute: async (ctx) => {
728
- const payload = await postMemoryCli(
729
- ctx,
730
- `${BASE_PATH}/jobs`,
731
- organizeBody(ctx)
732
- );
733
- return pollMemoryJob(ctx, payload);
734
- }
735
- };
736
- var defaultGetMemory = {
737
- service: SERVICE,
738
- command: "+default-get",
739
- description: "Get the current Agent session defaults",
740
- flags: [{ name: "agent-id", type: "string", required: false, desc: "Agent ID, defaults to current conversation Agent" }],
741
- risk: "read",
742
- dryRun: (ctx) => ({ method: "GET", url: dryRunUrl(ctx, defaultPath(ctx)) }),
743
- execute: (ctx) => getMemoryCli(ctx, defaultPath(ctx))
744
- };
745
- var defaultSaveMemory = {
746
- service: SERVICE,
747
- command: "+default-save",
748
- description: "Save current session selection as the Agent default",
749
- flags: [
750
- { name: "agent-id", type: "string", required: false, desc: "Agent ID, defaults to current conversation Agent" },
751
- { name: "selection-json", type: "string", required: false, desc: "Session selection JSON, defaults to TE_AGENT_CURRENT_SESSION_SELECTION_JSON" }
752
- ],
753
- risk: "write",
754
- validate: (ctx) => {
755
- defaultSaveBody(ctx);
756
- },
757
- dryRun: (ctx) => ({ method: "PUT", url: dryRunUrl(ctx, defaultPath(ctx)), body: defaultSaveBody(ctx) }),
758
- execute: (ctx) => putMemoryCli(ctx, defaultPath(ctx), defaultSaveBody(ctx))
759
- };
760
- var defaultClearMemory = {
761
- service: SERVICE,
762
- command: "+default-clear",
763
- description: "Clear the current Agent session defaults",
764
- flags: [{ name: "agent-id", type: "string", required: false, desc: "Agent ID, defaults to current conversation Agent" }],
765
- risk: "write",
766
- dryRun: (ctx) => ({ method: "DELETE", url: dryRunUrl(ctx, defaultPath(ctx)) }),
767
- execute: (ctx) => deleteMemoryCli(ctx, defaultPath(ctx))
768
- };
769
- var contextMemory = {
770
- service: SERVICE,
771
- command: "+context",
772
- description: "Preview the Top-K memory context for one Agent",
773
- flags: [
774
- { name: "agent-id", type: "string", required: false, desc: "Agent ID used for context resolution" },
775
- { name: "limit", type: "number", required: false, desc: "Maximum number of memories, up to 50" }
776
- ],
777
- risk: "read",
778
- validate: (ctx) => {
779
- const limit = ctx.num("limit");
780
- if (limit && (limit < 1 || limit > 50)) throw new Error("--limit must be between 1 and 50");
781
- },
782
- dryRun: (ctx) => ({
783
- method: "POST",
784
- url: dryRunUrl(ctx, `${BASE_PATH}/context`),
785
- body: { agentId: defaultAgentId(ctx), limit: ctx.num("limit") || void 0 }
786
- }),
787
- execute: (ctx) => postMemoryCli(ctx, `${BASE_PATH}/context`, compactObject({
788
- agentId: defaultAgentId(ctx),
789
- limit: ctx.num("limit") || void 0
790
- }))
791
- };
792
- var markUsedMemory = {
793
- service: SERVICE,
794
- command: "+mark-used",
795
- description: "Submit actual-use accounting for memories used in the current answer",
796
- flags: [
797
- { name: "ids", type: "json", required: true, desc: "JSON array of 1 to 200 memory IDs actually used" },
798
- { name: "agent-id", type: "string", required: false, desc: "Current Agent ID, defaults to TE_AGENT_CURRENT_AGENT_ID" }
799
- ],
800
- risk: "write",
801
- validate: (ctx) => {
802
- markUsedBody(ctx);
803
- },
804
- dryRun: (ctx) => ({
805
- method: "POST",
806
- url: dryRunUrl(ctx, `${BASE_PATH}/use`),
807
- body: markUsedBody(ctx)
808
- }),
809
- execute: (ctx) => postMemoryCli(ctx, `${BASE_PATH}/use`, markUsedBody(ctx), {
810
- retryOnUnauthorized: false
811
- })
812
- };
813
- var writeContextMemory = {
814
- service: SERVICE,
815
- command: "+write-context",
816
- description: "Write the managed Top-K user-memory context into a target file",
817
- flags: [
818
- { name: "file", type: "string", required: true, desc: "Required target file path selected by the Agent" },
819
- { name: "agent-id", type: "string", required: false, desc: "Agent ID used for context resolution" },
820
- { name: "limit", type: "number", required: false, desc: "Maximum number of memories, up to 50" }
821
- ],
822
- risk: "write",
823
- validate: (ctx) => {
824
- writeContextInput(ctx);
825
- },
826
- dryRun: (ctx) => {
827
- const input = writeContextInput(ctx);
828
- return {
829
- method: "WRITE",
830
- url: input.file,
831
- body: compactObject({
832
- source: `${BASE_PATH}/context`,
833
- agentId: input.agentId,
834
- limit: input.limit,
835
- markers: [MANAGED_START, MANAGED_END]
836
- })
837
- };
838
- },
839
- execute: async (ctx) => {
840
- const input = writeContextInput(ctx);
841
- const payload = await postMemoryCli(
842
- ctx,
843
- `${BASE_PATH}/context`,
844
- compactObject({
845
- agentId: input.agentId,
846
- limit: input.limit
847
- })
848
- );
849
- return writeMemoryContextFile(input.file, payload.items ?? []);
850
- }
851
- };
852
- var commands = [
853
- listMemories,
854
- getMemory,
855
- createMemory,
856
- updateMemory,
857
- deleteMemory,
858
- extractMemory,
859
- submitCandidatesMemory,
860
- pendingList,
861
- pendingApprove,
862
- pendingReject,
863
- organizeMemory,
864
- defaultGetMemory,
865
- defaultSaveMemory,
866
- defaultClearMemory,
867
- contextMemory,
868
- markUsedMemory,
869
- writeContextMemory
870
- ];
871
- var memory_default = commands;
872
- export {
873
- contextMemory,
874
- createMemory,
875
- memory_default as default,
876
- defaultClearMemory,
877
- defaultGetMemory,
878
- defaultSaveMemory,
879
- deleteMemory,
880
- extractMemory,
881
- getMemory,
882
- listMemories,
883
- markUsedMemory,
884
- organizeMemory,
885
- pendingApprove,
886
- pendingList,
887
- pendingReject,
888
- renderManagedBlock,
889
- submitCandidatesMemory,
890
- updateMemory,
891
- writeContextMemory,
892
- writeMemoryContextFile
893
- };