@agenr/openclaw-plugin 1.5.0 → 2026.6.2

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 (54) hide show
  1. package/LICENSE +21 -661
  2. package/README.md +1 -0
  3. package/dist/build-before-turn-artifact-NPUHVWFE.js +71 -0
  4. package/dist/build-recall-artifact-F3LS3PZX.js +62 -0
  5. package/dist/chunk-5AXMFBHR.js +14 -0
  6. package/dist/chunk-5AYIXQRF.js +4452 -0
  7. package/dist/chunk-5TIP2EPP.js +6944 -0
  8. package/dist/chunk-GAERET5Q.js +2070 -0
  9. package/dist/chunk-GF3PX3VM.js +41 -0
  10. package/dist/chunk-GKZQ5AG5.js +44 -0
  11. package/dist/chunk-LDJN7CVU.js +3231 -0
  12. package/dist/chunk-MC3C2XM5.js +148 -0
  13. package/dist/chunk-NBS62ES5.js +3012 -0
  14. package/dist/chunk-NSLTJBUC.js +270 -0
  15. package/dist/chunk-OJSIZDZD.js +9 -0
  16. package/dist/chunk-OWGQWQUP.js +45 -0
  17. package/dist/chunk-Q5UTJXHZ.js +1069 -0
  18. package/dist/chunk-SOQW7356.js +2416 -0
  19. package/dist/chunk-VBPYU7GO.js +597 -0
  20. package/dist/chunk-VTHBPXDQ.js +1750 -0
  21. package/dist/chunk-XFJ4S4G2.js +1679 -0
  22. package/dist/chunk-Y5NB3FTH.js +106 -0
  23. package/dist/chunk-ZX55JBV2.js +4451 -0
  24. package/dist/index.js +1905 -15298
  25. package/dist/lifecycle-checkpoint-IAC5FCQU.js +154 -0
  26. package/dist/scan-6JKPOQHD.js +6 -0
  27. package/dist/service-EKFACEN6.js +15 -0
  28. package/dist/service-RHNB5AEQ.js +861 -0
  29. package/dist/sink-AUAAWC5O.js +8 -0
  30. package/openclaw.plugin.json +148 -11
  31. package/package.json +7 -5
  32. package/dist/anthropic-RE4XNAKE.js +0 -5515
  33. package/dist/azure-openai-responses-IQLXOCZS.js +0 -190
  34. package/dist/chunk-6DQXEU2A.js +0 -32306
  35. package/dist/chunk-EAQYK3U2.js +0 -41
  36. package/dist/chunk-HNWLZUWE.js +0 -31
  37. package/dist/chunk-JRUUYSFL.js +0 -262
  38. package/dist/chunk-OLOUBEE5.js +0 -14022
  39. package/dist/chunk-P5HNPYGQ.js +0 -174
  40. package/dist/chunk-RD7BUOBD.js +0 -416
  41. package/dist/chunk-RWWH2U4W.js +0 -7056
  42. package/dist/chunk-SEOMNQGB.js +0 -86
  43. package/dist/chunk-SQLXP7LT.js +0 -4792
  44. package/dist/chunk-URGOKODJ.js +0 -17
  45. package/dist/dist-R6ESEJ6P.js +0 -1244
  46. package/dist/google-NAVXTQLO.js +0 -371
  47. package/dist/google-gemini-cli-NKYJWHX2.js +0 -712
  48. package/dist/google-vertex-ZBJ2EDRH.js +0 -414
  49. package/dist/mistral-SBQYC4J5.js +0 -38407
  50. package/dist/multipart-parser-DV373IRF.js +0 -371
  51. package/dist/openai-codex-responses-XN3T3DEN.js +0 -712
  52. package/dist/openai-completions-75ZFOFU6.js +0 -657
  53. package/dist/openai-responses-DCK4BVNT.js +0 -198
  54. package/dist/src-T5RRS2HN.js +0 -1408
@@ -0,0 +1,154 @@
1
+ import {
2
+ normalizeOptionalString
3
+ } from "./chunk-OJSIZDZD.js";
4
+
5
+ // src/app/working-memory/lifecycle-checkpoint.ts
6
+ async function attachWorkingCheckpointRefresh(event, result, workingMemory) {
7
+ const refreshRequest = resolveWorkingCheckpointRefreshRequest(event, result);
8
+ if (!refreshRequest) {
9
+ return result;
10
+ }
11
+ const workingCheckpointRefresh = workingMemory ? await mergeWorkingCheckpoint(refreshRequest, workingMemory) : skippedRefreshWithoutWorkingMemory(refreshRequest.attachLabel);
12
+ return {
13
+ ...result,
14
+ workingCheckpointRefresh
15
+ };
16
+ }
17
+ async function mergeWorkingCheckpoint(request, workingMemory) {
18
+ const scope = resolveWorkingRefreshScope(request.event);
19
+ if (!scope) {
20
+ return {
21
+ ok: false,
22
+ reason: "missing_scope",
23
+ message: `${request.lifecycleLabel} requires working-scope facts.`
24
+ };
25
+ }
26
+ const result = await workingMemory.run({
27
+ action: "update",
28
+ scope,
29
+ operation: {
30
+ type: "merge_checkpoint",
31
+ checkpoint: {
32
+ summary: request.summary,
33
+ recordedAt: request.event.observedAt
34
+ }
35
+ },
36
+ updateReason: request.updateReason,
37
+ actor: "runtime",
38
+ source: "lifecycle_hook"
39
+ });
40
+ if (!result.ok) {
41
+ return mapWorkingMemoryRefreshFailure(result.code, result.message, request.lifecycleLabel);
42
+ }
43
+ if (result.action !== "update") {
44
+ return {
45
+ ok: false,
46
+ reason: "working_memory_unavailable",
47
+ message: `Expected working-memory update result, received ${result.action}.`
48
+ };
49
+ }
50
+ return {
51
+ ok: true,
52
+ action: "working_checkpoint_refreshed",
53
+ workingSetId: result.workingSet.id,
54
+ revision: result.workingSet.revision
55
+ };
56
+ }
57
+ function resolveWorkingCheckpointRefreshRequest(event, result) {
58
+ const compactionEvent = resolveCompactionCheckpointRefreshEvent(event, result);
59
+ if (compactionEvent) {
60
+ const summary = normalizeOptionalString(compactionEvent.artifact.summary);
61
+ if (!summary) {
62
+ return void 0;
63
+ }
64
+ const sourceId = normalizeOptionalString(compactionEvent.artifact.sourceId) ?? "unknown";
65
+ return {
66
+ event: compactionEvent,
67
+ summary,
68
+ updateReason: `Refreshed working checkpoint from session compaction ${sourceId}.`,
69
+ lifecycleLabel: "compaction checkpoint refresh",
70
+ attachLabel: "Compaction checkpoint refresh"
71
+ };
72
+ }
73
+ const shutdownEvent = resolveShutdownCheckpointRefreshEvent(event, result);
74
+ if (!shutdownEvent) {
75
+ return void 0;
76
+ }
77
+ const reason = normalizeShutdownReason(shutdownEvent.shutdownReason);
78
+ return {
79
+ event: shutdownEvent,
80
+ summary: `Session shutdown (${reason}) recorded. Resume from the latest working-set snapshot; no implicit close was performed.`,
81
+ updateReason: `Recorded working checkpoint from session shutdown (${reason}).`,
82
+ lifecycleLabel: "shutdown checkpoint refresh",
83
+ attachLabel: "Shutdown checkpoint refresh"
84
+ };
85
+ }
86
+ function resolveCompactionCheckpointRefreshEvent(event, result) {
87
+ if (event.type !== "session_compact" || result.artifact?.kind !== "compaction_checkpoint") {
88
+ return void 0;
89
+ }
90
+ const artifact = event.artifact;
91
+ if (!isCompactionCheckpointArtifact(artifact)) {
92
+ return void 0;
93
+ }
94
+ return {
95
+ ...event,
96
+ type: "session_compact",
97
+ artifact
98
+ };
99
+ }
100
+ function resolveShutdownCheckpointRefreshEvent(event, result) {
101
+ if (event.type !== "session_shutdown" || result.accepted !== true) {
102
+ return void 0;
103
+ }
104
+ return {
105
+ ...event,
106
+ type: "session_shutdown"
107
+ };
108
+ }
109
+ function isCompactionCheckpointArtifact(artifact) {
110
+ return artifact?.kind === "compaction_checkpoint";
111
+ }
112
+ function resolveWorkingRefreshScope(event) {
113
+ if (event.workingScope && Object.keys(event.workingScope).length > 0) {
114
+ return event.workingScope;
115
+ }
116
+ return void 0;
117
+ }
118
+ function mapWorkingMemoryRefreshFailure(code, message, lifecycleLabel) {
119
+ if (code === "feature_disabled") {
120
+ return {
121
+ ok: false,
122
+ reason: "not_applicable",
123
+ message: `Working memory is disabled; ${lifecycleLabel} was skipped.`
124
+ };
125
+ }
126
+ if (code === "missing_active_set") {
127
+ return {
128
+ ok: false,
129
+ reason: "no_active_working_set",
130
+ code,
131
+ message
132
+ };
133
+ }
134
+ return {
135
+ ok: false,
136
+ reason: "working_memory_unavailable",
137
+ code,
138
+ message
139
+ };
140
+ }
141
+ function normalizeShutdownReason(shutdownReason) {
142
+ const trimmed = shutdownReason?.trim();
143
+ return trimmed && trimmed.length > 0 ? trimmed : "unknown";
144
+ }
145
+ function skippedRefreshWithoutWorkingMemory(label) {
146
+ return {
147
+ ok: false,
148
+ reason: "not_applicable",
149
+ message: `${label} requires a working-memory service, but none was wired into the runtime.`
150
+ };
151
+ }
152
+ export {
153
+ attachWorkingCheckpointRefresh
154
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ runDreamScan
3
+ } from "./chunk-GKZQ5AG5.js";
4
+ export {
5
+ runDreamScan
6
+ };
@@ -0,0 +1,15 @@
1
+ import {
2
+ backupDatabaseFile,
3
+ runDream,
4
+ runDreamWithHeldLock
5
+ } from "./chunk-5AYIXQRF.js";
6
+ import "./chunk-GF3PX3VM.js";
7
+ import "./chunk-SOQW7356.js";
8
+ import "./chunk-VTHBPXDQ.js";
9
+ import "./chunk-VBPYU7GO.js";
10
+ import "./chunk-GKZQ5AG5.js";
11
+ export {
12
+ backupDatabaseFile,
13
+ runDream,
14
+ runDreamWithHeldLock
15
+ };