@psiclawops/hypercompositor 0.8.5 → 0.9.1
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/LICENSE +190 -0
- package/README.md +20 -0
- package/package.json +4 -4
- package/dist/index.d.ts +0 -179
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3209
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 PsiClawOps
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# HyperCompositor
|
|
2
|
+
|
|
3
|
+
HyperCompositor is the OpenClaw context-engine plugin for HyperMem. It connects HyperMem's adaptive context lifecycle, recall, trimming, compaction, and diagnostics into the OpenClaw context assembly path.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @psiclawops/hypercompositor
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
See the main HyperMem install guide for runtime staging and OpenClaw activation:
|
|
12
|
+
|
|
13
|
+
- https://github.com/PsiClawOps/hypermem
|
|
14
|
+
- https://github.com/PsiClawOps/hypermem/blob/main/INSTALL.md
|
|
15
|
+
|
|
16
|
+
## Package
|
|
17
|
+
|
|
18
|
+
- Plugin id: `hypercompositor`
|
|
19
|
+
- Plugin kind: `context-engine`
|
|
20
|
+
- License: Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@psiclawops/hypercompositor",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "HyperCompositor
|
|
3
|
+
"version": "0.9.1",
|
|
4
|
+
"description": "HyperCompositor \u2014 context engine plugin for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"openclaw": {
|
|
19
19
|
"plugin": {
|
|
20
20
|
"id": "hypercompositor",
|
|
21
|
-
"name": "HyperCompositor
|
|
21
|
+
"name": "HyperCompositor \u2014 Context Engine",
|
|
22
22
|
"kind": "context-engine"
|
|
23
23
|
},
|
|
24
24
|
"extensions": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typecheck": "tsc --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@psiclawops/hypermem": "
|
|
41
|
+
"@psiclawops/hypermem": "0.9.1",
|
|
42
42
|
"zod": "^4.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
package/dist/index.d.ts
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hypermem Context Engine Plugin
|
|
3
|
-
*
|
|
4
|
-
* Implements OpenClaw's ContextEngine interface backed by hypermem's
|
|
5
|
-
* four-layer memory architecture:
|
|
6
|
-
*
|
|
7
|
-
* L1 Cache — SQLite `:memory:` hot session working memory
|
|
8
|
-
* L2 Messages — per-agent conversation history (SQLite)
|
|
9
|
-
* L3 Vectors — semantic + keyword search (KNN + FTS5)
|
|
10
|
-
* L4 Library — facts, knowledge, episodes, preferences
|
|
11
|
-
*
|
|
12
|
-
* Lifecycle mapping:
|
|
13
|
-
* ingest() → record each message into messages.db
|
|
14
|
-
* assemble() → compositor builds context from all four layers
|
|
15
|
-
* compact() → delegate to runtime (ownsCompaction: false)
|
|
16
|
-
* afterTurn() → trigger background indexer (fire-and-forget)
|
|
17
|
-
* bootstrap() → warm hot-cache session, register agent in fleet
|
|
18
|
-
* dispose() → close hypermem connections
|
|
19
|
-
*
|
|
20
|
-
* Session key format expected: "agent:<agentId>:<channel>:<name>"
|
|
21
|
-
*/
|
|
22
|
-
import type { NeutralMessage, NeutralToolCall, NeutralToolResult, ComposeRequest, ComposeResult } from '@psiclawops/hypermem';
|
|
23
|
-
import { resolveTrimBudgets } from '@psiclawops/hypermem';
|
|
24
|
-
export type { NeutralMessage, NeutralToolCall, NeutralToolResult, ComposeRequest, ComposeResult };
|
|
25
|
-
type TrimTelemetryPath = 'assemble.normal' | 'assemble.toolLoop' | 'assemble.subagent' | 'reshape' | 'compact.nuclear' | 'compact.history' | 'compact.history2' | 'afterTurn.secondary' | 'warmstart';
|
|
26
|
-
type DegradationTelemetryPath = 'compose' | 'toolLoop';
|
|
27
|
-
interface DegradationTelemetryFields {
|
|
28
|
-
agentId: string;
|
|
29
|
-
sessionKey: string;
|
|
30
|
-
turnId: string;
|
|
31
|
-
path: DegradationTelemetryPath;
|
|
32
|
-
toolChainCoEjections?: number;
|
|
33
|
-
toolChainStubReplacements?: number;
|
|
34
|
-
artifactDegradations?: number;
|
|
35
|
-
artifactOversizeThresholdTokens?: number;
|
|
36
|
-
replayState?: 'entering' | 'stabilizing' | 'exited';
|
|
37
|
-
replayReason?: string;
|
|
38
|
-
}
|
|
39
|
-
declare function trimTelemetry(fields: {
|
|
40
|
-
path: TrimTelemetryPath;
|
|
41
|
-
agentId: string;
|
|
42
|
-
sessionKey: string;
|
|
43
|
-
preTokens: number;
|
|
44
|
-
postTokens: number;
|
|
45
|
-
removed: number;
|
|
46
|
-
cacheInvalidated: boolean;
|
|
47
|
-
reason: string;
|
|
48
|
-
}): void;
|
|
49
|
-
declare function assembleTrace(fields: {
|
|
50
|
-
agentId: string;
|
|
51
|
-
sessionKey: string;
|
|
52
|
-
turnId: string;
|
|
53
|
-
path: 'cold' | 'replay' | 'subagent';
|
|
54
|
-
toolLoop: boolean;
|
|
55
|
-
msgCount: number;
|
|
56
|
-
}): void;
|
|
57
|
-
declare function degradationTelemetry(fields: DegradationTelemetryFields): void;
|
|
58
|
-
declare function nextTurnId(): string;
|
|
59
|
-
declare const GUARD_TELEMETRY_REASONS: readonly ["warmstart-pressure-demoted", "reshape-downshift-demoted", "duplicate-claim-suppressed", "afterturn-secondary-demoted", "window-within-budget-skip", "pressure-accounting-anomaly"];
|
|
60
|
-
type GuardTelemetryReason = typeof GUARD_TELEMETRY_REASONS[number];
|
|
61
|
-
declare function beginTrimOwnerTurn(sessionKey: string, turnId: string): void;
|
|
62
|
-
declare function endTrimOwnerTurn(sessionKey: string, turnId: string): void;
|
|
63
|
-
/**
|
|
64
|
-
* Claim the steady-state trim owner slot for the current turn.
|
|
65
|
-
*
|
|
66
|
-
* Behavior:
|
|
67
|
-
* - compact.* paths are exception-only and pass through without claiming.
|
|
68
|
-
* - Non-steady paths (warmstart, reshape, afterTurn.secondary) also pass
|
|
69
|
-
* through without claiming. Demoted/no-op sites should normally emit
|
|
70
|
-
* via guardTelemetry() instead so they stay visible without contending
|
|
71
|
-
* for ownership (sub-tasks 2.2 and 2.3 wire this in).
|
|
72
|
-
* - Steady-state paths (assemble.normal, assemble.subagent,
|
|
73
|
-
* assemble.toolLoop) claim the single owner slot for the current turn.
|
|
74
|
-
* The first such claim succeeds. A second steady-state claim against the
|
|
75
|
-
* same turn is a duplicate-turn violation: it throws loudly under
|
|
76
|
-
* NODE_ENV='development' and warns in other environments (returning
|
|
77
|
-
* false so non-dev runtimes keep working).
|
|
78
|
-
*
|
|
79
|
-
* Callers should invoke this immediately before the real
|
|
80
|
-
* trimHistoryToTokenBudget() call. Guard telemetry does NOT route through
|
|
81
|
-
* this helper — it is explicitly excluded from the steady-state invariant.
|
|
82
|
-
*
|
|
83
|
-
* Returns true when the claim succeeds (or is exempt); false on a swallowed
|
|
84
|
-
* duplicate claim in non-development. In development the duplicate throws
|
|
85
|
-
* before returning.
|
|
86
|
-
*/
|
|
87
|
-
declare function claimTrimOwner(sessionKey: string, turnId: string, path: TrimTelemetryPath): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Non-counting guard / noop telemetry.
|
|
90
|
-
*
|
|
91
|
-
* Emits a `trim-guard` record on the same JSONL channel as trimTelemetry()
|
|
92
|
-
* but with a distinct event name so per-turn reporting (scripts/trim-report.mjs,
|
|
93
|
-
* future ownership dashboards) can keep it out of `trimCount`. Used by
|
|
94
|
-
* demoted/no-op call sites in 2.2 and 2.3 so their path labels stay visible
|
|
95
|
-
* in telemetry without consuming a steady-state owner slot.
|
|
96
|
-
*
|
|
97
|
-
* Zero-cost when telemetry is off. Never throws.
|
|
98
|
-
*/
|
|
99
|
-
declare function guardTelemetry(fields: {
|
|
100
|
-
path: TrimTelemetryPath;
|
|
101
|
-
agentId: string;
|
|
102
|
-
sessionKey: string;
|
|
103
|
-
reason: GuardTelemetryReason;
|
|
104
|
-
}): void;
|
|
105
|
-
export declare const __telemetryForTests: {
|
|
106
|
-
trimTelemetry: typeof trimTelemetry;
|
|
107
|
-
assembleTrace: typeof assembleTrace;
|
|
108
|
-
degradationTelemetry: typeof degradationTelemetry;
|
|
109
|
-
guardTelemetry: typeof guardTelemetry;
|
|
110
|
-
nextTurnId: typeof nextTurnId;
|
|
111
|
-
beginTrimOwnerTurn: typeof beginTrimOwnerTurn;
|
|
112
|
-
endTrimOwnerTurn: typeof endTrimOwnerTurn;
|
|
113
|
-
claimTrimOwner: typeof claimTrimOwner;
|
|
114
|
-
TRIM_SOFT_TARGET: number;
|
|
115
|
-
TRIM_GROWTH_THRESHOLD: number;
|
|
116
|
-
TRIM_HEADROOM_FRACTION: number;
|
|
117
|
-
resolveTrimBudgets: typeof resolveTrimBudgets;
|
|
118
|
-
reset(): void;
|
|
119
|
-
};
|
|
120
|
-
export declare const CONTEXT_WINDOW_OVERRIDE_KEY_REGEX: RegExp;
|
|
121
|
-
export type ContextWindowOverride = {
|
|
122
|
-
contextTokens?: number;
|
|
123
|
-
contextWindow?: number;
|
|
124
|
-
};
|
|
125
|
-
export declare function sanitizeContextWindowOverrides(raw: unknown): {
|
|
126
|
-
value: Record<string, ContextWindowOverride>;
|
|
127
|
-
warnings: string[];
|
|
128
|
-
};
|
|
129
|
-
export declare function resolveEffectiveBudget(args: {
|
|
130
|
-
tokenBudget?: number;
|
|
131
|
-
model?: string;
|
|
132
|
-
contextWindowSize: number;
|
|
133
|
-
contextWindowReserve: number;
|
|
134
|
-
contextWindowOverrides?: Record<string, ContextWindowOverride>;
|
|
135
|
-
}): {
|
|
136
|
-
budget: number;
|
|
137
|
-
source: string;
|
|
138
|
-
};
|
|
139
|
-
export interface ModelIdentity {
|
|
140
|
-
rawModel: string | null;
|
|
141
|
-
modelKey: string | null;
|
|
142
|
-
provider: string | null;
|
|
143
|
-
modelId: string | null;
|
|
144
|
-
}
|
|
145
|
-
export declare function resolveModelIdentity(model?: string): ModelIdentity;
|
|
146
|
-
export declare function diffModelState(previous: {
|
|
147
|
-
model?: string;
|
|
148
|
-
modelKey?: string | null;
|
|
149
|
-
provider?: string | null;
|
|
150
|
-
modelId?: string | null;
|
|
151
|
-
tokenBudget?: number;
|
|
152
|
-
} | null | undefined, current: {
|
|
153
|
-
model?: string;
|
|
154
|
-
tokenBudget?: number;
|
|
155
|
-
}): {
|
|
156
|
-
previousIdentity: ModelIdentity;
|
|
157
|
-
currentIdentity: ModelIdentity;
|
|
158
|
-
modelChanged: boolean;
|
|
159
|
-
providerChanged: boolean;
|
|
160
|
-
modelIdChanged: boolean;
|
|
161
|
-
budgetChanged: boolean;
|
|
162
|
-
budgetDownshift: boolean;
|
|
163
|
-
budgetUplift: boolean;
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Bust the assembly cache for a specific agent+session.
|
|
167
|
-
* Call this after writing to identity files (SOUL.md, IDENTITY.md, TOOLS.md,
|
|
168
|
-
* USER.md) to ensure the next assemble() runs full compositor, not a replay.
|
|
169
|
-
*/
|
|
170
|
-
export declare function bustAssemblyCache(agentId: string, sessionKey: string): Promise<void>;
|
|
171
|
-
declare const _default: {
|
|
172
|
-
id: string;
|
|
173
|
-
name: string;
|
|
174
|
-
description: string;
|
|
175
|
-
configSchema: import("openclaw/plugin-sdk").OpenClawPluginConfigSchema;
|
|
176
|
-
register: NonNullable<import("openclaw/plugin-sdk/plugin-entry").OpenClawPluginDefinition["register"]>;
|
|
177
|
-
} & Pick<import("openclaw/plugin-sdk/plugin-entry").OpenClawPluginDefinition, "kind" | "reload" | "nodeHostCommands" | "securityAuditCollectors">;
|
|
178
|
-
export default _default;
|
|
179
|
-
//# sourceMappingURL=index.d.ts.map
|
package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