@cortexkit/aft-opencode 0.57.2 → 0.58.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/dist/bash-wait-detach.d.ts +14 -5
- package/dist/bash-wait-detach.d.ts.map +1 -1
- package/dist/bridge-bootstrap.d.ts +199 -0
- package/dist/bridge-bootstrap.d.ts.map +1 -0
- package/dist/config-error-surface.d.ts +23 -0
- package/dist/config-error-surface.d.ts.map +1 -0
- package/dist/config-live-reload.d.ts +315 -0
- package/dist/config-live-reload.d.ts.map +1 -0
- package/dist/config.d.ts +112 -54
- package/dist/config.d.ts.map +1 -1
- package/dist/entry/server.js +10449 -7872
- package/dist/hooks/auto-update-checker/checker.d.ts +1 -0
- package/dist/hooks/auto-update-checker/checker.d.ts.map +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts +6 -0
- package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10315 -7815
- package/dist/logger.d.ts.map +1 -1
- package/dist/lsp-auto-install.d.ts.map +1 -1
- package/dist/lsp-npm-table.d.ts +1 -1
- package/dist/lsp-npm-table.d.ts.map +1 -1
- package/dist/rpc/register.d.ts +7 -1
- package/dist/rpc/register.d.ts.map +1 -1
- package/dist/shared/read-vision.d.ts +10 -0
- package/dist/shared/read-vision.d.ts.map +1 -0
- package/dist/shared/status.d.ts +45 -0
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/shared/subagent-detect.d.ts.map +1 -1
- package/dist/shutdown-hooks.d.ts +3 -9
- package/dist/shutdown-hooks.d.ts.map +1 -1
- package/dist/subc-tool-schemas.d.ts +9 -1
- package/dist/subc-tool-schemas.d.ts.map +1 -1
- package/dist/tool-perf.d.ts +1 -0
- package/dist/tool-perf.d.ts.map +1 -1
- package/dist/tool-registration.d.ts +19 -12
- package/dist/tool-registration.d.ts.map +1 -1
- package/dist/tools/ast.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash_watch.d.ts +3 -0
- package/dist/tools/bash_watch.d.ts.map +1 -1
- package/dist/tools/definitions/v2.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts +9 -12
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/tools/inspect.d.ts +5 -7
- package/dist/tools/inspect.d.ts.map +1 -1
- package/dist/tools/permissions.d.ts.map +1 -1
- package/dist/tools/reading.d.ts.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tui/v2-status.d.ts +1 -1
- package/dist/tui/v2-status.d.ts.map +1 -1
- package/dist/workflow-hints.d.ts +1 -7
- package/dist/workflow-hints.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/entry/server-runtime.mjs +133 -34
- package/src/logger.ts +5 -6
- package/src/shared/read-vision.ts +100 -0
- package/src/shared/status.ts +83 -4
- package/src/shared/subagent-detect.ts +56 -1
- package/src/tui/index.tsx +4 -10
- package/src/tui/sidebar-view.tsx +36 -15
- package/src/tui/v2-status.ts +25 -4
- package/src/tui-compiled/index.tsx +3 -3
- package/src/tui-compiled/sidebar-view.tsx +168 -126
- package/src/tui-compiled/v2-status.ts +25 -4
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AftTransportPool } from "@cortexkit/aft-bridge";
|
|
2
2
|
import type { AftConfig } from "./config.js";
|
|
3
3
|
type ActiveBridgePool = Pick<AftTransportPool, "getActiveBridgeForRoot" | "activeBridges">;
|
|
4
|
-
export
|
|
4
|
+
export { BASH_WAIT_DETACH_MAGIC_KEYWORD } from "@cortexkit/aft-bridge";
|
|
5
5
|
/** Return the user-entered text parts from OpenCode's chat.message output. */
|
|
6
6
|
export declare function extractUserMessageText(output: unknown): string;
|
|
7
7
|
/** Strip control tokens from mutable OpenCode text parts before model delivery. */
|
|
8
8
|
export declare function stripUserMessageDetachKeyword(output: unknown): string;
|
|
9
9
|
/**
|
|
10
|
-
* Decide whether a
|
|
11
|
-
*
|
|
10
|
+
* Decide whether a message should detach an active wait:true bash call and
|
|
11
|
+
* abort a sync bash_watch. `messageText` is the operator-typed text from
|
|
12
|
+
* `extractUserMessageText`, read before the keyword is stripped from it.
|
|
12
13
|
*/
|
|
13
14
|
export declare function shouldDetachBashWaitOnUserMessage(config: AftConfig, messageText: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Handle OpenCode's chat.message output for the session's blocking waits:
|
|
17
|
+
* decide, strip the `&detach` token from the mutable text parts, then (only
|
|
18
|
+
* when the decision says so) abort any sync bash_watch and detach any
|
|
19
|
+
* wait:true bash. Both waits follow the same decision, so
|
|
20
|
+
* `bash.detach_on_user_message: false` protects a sync bash_watch as well.
|
|
21
|
+
* Returns whether the waits were interrupted.
|
|
22
|
+
*/
|
|
23
|
+
export declare function interruptBashWaitsForChatMessage(pool: ActiveBridgePool, config: AftConfig, projectRoot: string, sessionID: string | undefined, output: unknown): boolean;
|
|
14
24
|
export declare function signalBashWaitDetachForProject(pool: ActiveBridgePool, projectRoot: string, sessionID: string | undefined): Promise<void>;
|
|
15
|
-
export {};
|
|
16
25
|
//# sourceMappingURL=bash-wait-detach.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-wait-detach.d.ts","sourceRoot":"","sources":["../src/bash-wait-detach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"bash-wait-detach.d.ts","sourceRoot":"","sources":["../src/bash-wait-detach.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAItB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,KAAK,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAE,wBAAwB,GAAG,eAAe,CAAC,CAAC;AAE3F,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAsBvE,8EAA8E;AAC9E,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAI9D;AAED,mFAAmF;AACnF,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAkBrE;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAKjG;AAED;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,OAAO,GACd,OAAO,CAST;AAoBD,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,OAAO,CAAC,IAAI,CAAC,CAyCf"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The per-plugin environment work that feeds every AFT bridge, shared by the
|
|
3
|
+
* OpenCode 1 plugin entry (`index.ts`) and the OpenCode 2 runtime entry
|
|
4
|
+
* (`entry/server-runtime.mjs`).
|
|
5
|
+
*
|
|
6
|
+
* Both entries used to assemble this state separately, and the OpenCode 2
|
|
7
|
+
* entry silently skipped most of it: it never resolved ONNX Runtime, so every
|
|
8
|
+
* bridge it spawned fell back to a bare `dlopen("libonnxruntime.dylib")` and
|
|
9
|
+
* semantic search failed on any host without `ORT_DYLIB_PATH` exported. Keeping
|
|
10
|
+
* the whole sequence in this module means an entry can only differ in the
|
|
11
|
+
* host-specific parts (how warnings reach the user, which directory it boots
|
|
12
|
+
* for), not in what the bridge is configured with.
|
|
13
|
+
*
|
|
14
|
+
* What lives here:
|
|
15
|
+
* - loading the AFT config after migrating legacy config file locations,
|
|
16
|
+
* putting an unusable configuration into the config error state and
|
|
17
|
+
* delivering migration notices;
|
|
18
|
+
* - resolving the `aft` binary (with a background download when uncached);
|
|
19
|
+
* - the one-time storage migration into the shared CortexKit root;
|
|
20
|
+
* - the flat configure overrides: config tiers, `storage_dir`,
|
|
21
|
+
* `bash_permissions`, `harness`, and the LSP install cache
|
|
22
|
+
* (`lsp_auto_install_binaries`, `lsp_paths_extra`, `lsp_inflight_installs`);
|
|
23
|
+
* - ONNX Runtime resolution, patched in as `_ort_dylib_dir` once it settles;
|
|
24
|
+
* - the version-mismatch upgrade handler and per-project config loader the
|
|
25
|
+
* transport pool is built with;
|
|
26
|
+
* - the registration-dependent overrides `edit_slot_survives` and
|
|
27
|
+
* `aft_search_registered`, applied once the final tool map is known;
|
|
28
|
+
* - the registration warnings every entry reports the same way: one
|
|
29
|
+
* aggregated unknown-name warning per load and the hashline downgrade.
|
|
30
|
+
*/
|
|
31
|
+
import { type AftTransportPool, type PoolOptions } from "@cortexkit/aft-bridge";
|
|
32
|
+
import { type AftConfig, type ConfigLoadError } from "./config.js";
|
|
33
|
+
import { openCodeHashlineDowngrade } from "./tool-registration.js";
|
|
34
|
+
/** Delivers a user-visible warning through whatever channel the host entry has. */
|
|
35
|
+
export type BootstrapNotify = (message: string) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Replaceable side effects. Production uses {@link defaultBridgeBootstrapDependencies};
|
|
38
|
+
* tests substitute fakes so a boot never downloads, spawns, or touches the
|
|
39
|
+
* user's real config and storage.
|
|
40
|
+
*/
|
|
41
|
+
export interface BridgeBootstrapDependencies {
|
|
42
|
+
loadConfig(directory: string): AftConfig;
|
|
43
|
+
/**
|
|
44
|
+
* Deliver the migration notices recorded by the most recent `loadConfig`
|
|
45
|
+
* call, once per notice identity. Optional so a substituted `loadConfig`
|
|
46
|
+
* does not deliver notices left over from a real load.
|
|
47
|
+
*/
|
|
48
|
+
deliverLoadNotices?(notify: BootstrapNotify): void;
|
|
49
|
+
/**
|
|
50
|
+
* Parse failures recorded by the most recent `loadConfig` call. Optional for
|
|
51
|
+
* the same reason as `deliverLoadNotices`: a substituted `loadConfig` must
|
|
52
|
+
* not see failures left over from a real load.
|
|
53
|
+
*/
|
|
54
|
+
configLoadErrors?(): readonly ConfigLoadError[];
|
|
55
|
+
/** The config files the most recent `loadConfig` call read. */
|
|
56
|
+
configLoadSources?(): readonly string[];
|
|
57
|
+
/** The text of each file the most recent `loadConfig` call read. */
|
|
58
|
+
configLoadTexts?(): ReadonlyMap<string, string>;
|
|
59
|
+
/** Error for a configured subc connection file that does not exist, or null. */
|
|
60
|
+
subcConnectionFileError?(subcConnectionFile: string | undefined): Promise<string | null>;
|
|
61
|
+
/** Moves legacy config files into the CortexKit layout; returns user-facing warnings. */
|
|
62
|
+
migrateConfigLocations(directory: string): string[];
|
|
63
|
+
resolveBinary(version: string): Promise<string>;
|
|
64
|
+
/** `binaryPath` is null when the subc daemon owns the binary; migration then resolves one only if it has work. */
|
|
65
|
+
ensureStorageMigrated(binaryPath: string | null): Promise<void>;
|
|
66
|
+
resolveStorageRoot(): string;
|
|
67
|
+
buildConfigureParams(directory: string, processState: Record<string, unknown>): Record<string, unknown>;
|
|
68
|
+
/** Returns the directory holding the ONNX Runtime library, or null. */
|
|
69
|
+
ensureOnnxRuntime(storageDir: string): Promise<string | null>;
|
|
70
|
+
/**
|
|
71
|
+
* Seeds the LSP entries of `configOverrides` and starts background installs.
|
|
72
|
+
* Resolves to the refreshed cache directories when installs ran, else null.
|
|
73
|
+
*/
|
|
74
|
+
startLspAutoInstall(directory: string, config: AftConfig, configOverrides: Record<string, unknown>, notify: BootstrapNotify): Promise<string[] | null> | null;
|
|
75
|
+
pushLspPaths(pool: Pick<AftTransportPool, "setConfigureOverride" | "reconfigure">, directory: string, paths: readonly string[]): Promise<void>;
|
|
76
|
+
isOrtAutoDownloadSupported(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Why the last managed ONNX Runtime install in this process failed, or
|
|
79
|
+
* null. Read only after `ensureOnnxRuntime` resolved null on a platform that
|
|
80
|
+
* supports auto-download, to tell the user why semantic search is off.
|
|
81
|
+
*/
|
|
82
|
+
onnxInstallFailure?(): string | null;
|
|
83
|
+
}
|
|
84
|
+
/** The user-facing notice for a failed managed ONNX Runtime install. */
|
|
85
|
+
export declare function onnxInstallFailureMessage(reason: string): string;
|
|
86
|
+
export declare const defaultBridgeBootstrapDependencies: BridgeBootstrapDependencies;
|
|
87
|
+
/**
|
|
88
|
+
* Result of loading the configuration an entry boots with. A configuration
|
|
89
|
+
* that cannot be used does not stop the plugin from loading: it yields the
|
|
90
|
+
* config error state, in which the entry registers the tool surface of
|
|
91
|
+
* `config` but every tool call fails with `message` (see
|
|
92
|
+
* {@link buildConfigErrorToolMap}).
|
|
93
|
+
*/
|
|
94
|
+
export type BootstrapConfig = {
|
|
95
|
+
ok: true;
|
|
96
|
+
config: AftConfig;
|
|
97
|
+
/** The config files this load read; a live config reload starts from them. */
|
|
98
|
+
sources?: readonly string[];
|
|
99
|
+
/** The text of each file this load read, keyed by path. */
|
|
100
|
+
sourceTexts?: Readonly<Record<string, string>>;
|
|
101
|
+
} | {
|
|
102
|
+
ok: false;
|
|
103
|
+
/** The error, its fix, and the note that a restart is needed. */
|
|
104
|
+
message: string;
|
|
105
|
+
/** Config whose tool surface is registered: the loaded one when usable, else the default. */
|
|
106
|
+
config: AftConfig;
|
|
107
|
+
};
|
|
108
|
+
/** The surface registered when the configuration is too broken to compute its own. */
|
|
109
|
+
export declare function defaultSurfaceConfig(): AftConfig;
|
|
110
|
+
/**
|
|
111
|
+
* Load the config for `directory`, migrating legacy config file locations
|
|
112
|
+
* first. Migration notices for retired keys that are still translated are
|
|
113
|
+
* delivered through `notify`, once per notice identity.
|
|
114
|
+
*
|
|
115
|
+
* A configuration that is rejected (a retired key after its migration window,
|
|
116
|
+
* an already retired GitHub alias), that does not parse, or whose load throws
|
|
117
|
+
* for any other reason yields the config error state with the default tool
|
|
118
|
+
* surface; migration is skipped then. Nothing falls back to defaults.
|
|
119
|
+
*/
|
|
120
|
+
export declare function loadBootstrapConfig(directory: string, notify: BootstrapNotify, dependencies?: BridgeBootstrapDependencies): BootstrapConfig;
|
|
121
|
+
/**
|
|
122
|
+
* {@link loadBootstrapConfig} plus the checks that need the loaded config: a
|
|
123
|
+
* configured `subc.connection_file` that does not exist also yields the config
|
|
124
|
+
* error state, keeping the loaded config's tool surface. The check runs before
|
|
125
|
+
* any binary, storage or transport work so the error state starts none of it.
|
|
126
|
+
*/
|
|
127
|
+
export declare function resolveBootstrapConfig(directory: string, notify: BootstrapNotify, dependencies?: BridgeBootstrapDependencies): Promise<BootstrapConfig>;
|
|
128
|
+
/**
|
|
129
|
+
* Answer "may AFT work in this project?" for projects other than the one an
|
|
130
|
+
* entry booted for. There is no config switch that turns AFT off; only a
|
|
131
|
+
* rejected configuration does, until it is fixed. Answers are cached per
|
|
132
|
+
* project and a rejection is logged once.
|
|
133
|
+
*/
|
|
134
|
+
export declare function createProjectAcceptance(bootRoot: string, dependencies?: Pick<BridgeBootstrapDependencies, "loadConfig">): (projectRoot: string) => boolean;
|
|
135
|
+
export interface BridgeEnvironmentOptions {
|
|
136
|
+
/** Project whose config tiers seed the flat configure payload. */
|
|
137
|
+
configRoot: string;
|
|
138
|
+
/** Directory scanned to decide which LSP servers are relevant. */
|
|
139
|
+
lspDirectory: string;
|
|
140
|
+
config: AftConfig;
|
|
141
|
+
pluginVersion: string;
|
|
142
|
+
notify: BootstrapNotify;
|
|
143
|
+
}
|
|
144
|
+
export interface BridgeEnvironment {
|
|
145
|
+
storageDir: string;
|
|
146
|
+
/**
|
|
147
|
+
* Resolved `aft` binary for the standalone bridge, or null when the config
|
|
148
|
+
* selects the subc daemon (which runs its own binary).
|
|
149
|
+
*/
|
|
150
|
+
binaryPath: string | null;
|
|
151
|
+
/** Flat configure overrides to construct the transport pool with. */
|
|
152
|
+
configOverrides: Record<string, unknown>;
|
|
153
|
+
/** Pending ONNX Runtime directory, or null when semantic search does not need it. */
|
|
154
|
+
onnxRuntime: Promise<string | null> | null;
|
|
155
|
+
/**
|
|
156
|
+
* Wire the asynchronous results into the pool once it exists: the ONNX
|
|
157
|
+
* Runtime directory as `_ort_dylib_dir`, and LSP directories that finished
|
|
158
|
+
* installing during startup.
|
|
159
|
+
*/
|
|
160
|
+
attach(pool: Pick<AftTransportPool, "setConfigureOverride" | "reconfigure">): void;
|
|
161
|
+
}
|
|
162
|
+
export declare function prepareBridgeEnvironment(options: BridgeEnvironmentOptions, dependencies?: BridgeBootstrapDependencies): Promise<BridgeEnvironment>;
|
|
163
|
+
/**
|
|
164
|
+
* Pool options both entries share: the error prefix, the minimum binary
|
|
165
|
+
* version, the coordinated upgrade when a bridge reports an older binary, and
|
|
166
|
+
* the per-project config tiers loaded at each bridge spawn.
|
|
167
|
+
*/
|
|
168
|
+
export declare function createSharedPoolOptions(options: {
|
|
169
|
+
pluginVersion: string;
|
|
170
|
+
getPool(): Pick<AftTransportPool, "replaceBinary">;
|
|
171
|
+
isProjectEnabled(projectRoot: string): boolean;
|
|
172
|
+
notifyForRoot(projectRoot: string, message: string): void;
|
|
173
|
+
dependencies?: BridgeBootstrapDependencies;
|
|
174
|
+
}): Pick<PoolOptions, "errorPrefix" | "minVersion" | "onVersionMismatch" | "projectConfigLoader">;
|
|
175
|
+
/**
|
|
176
|
+
* Apply the overrides that depend on the final registered tool surface.
|
|
177
|
+
*
|
|
178
|
+
* `edit_slot_survives` tells Rust whether the hashline edit arm is registered;
|
|
179
|
+
* `aft_search_registered` lets the grep-rewrite footer point at `aft_search`
|
|
180
|
+
* instead of the grep tool. Both reach lazily spawned bridges through the
|
|
181
|
+
* pool's runtime overrides.
|
|
182
|
+
*/
|
|
183
|
+
export declare function applyToolSurfaceOverrides(pool: Pick<AftTransportPool, "setConfigureOverride">, config: AftConfig, registeredTools: ReadonlySet<string>): {
|
|
184
|
+
hashlineEditRegistered: boolean;
|
|
185
|
+
aftSearchRegistered: boolean;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* The callback `buildAftToolDefinitions` reports unknown `disabled_tools`
|
|
189
|
+
* names through: one aggregated warning per load. Unknown names stay inert
|
|
190
|
+
* and are kept in the list.
|
|
191
|
+
*/
|
|
192
|
+
export declare function unknownDisabledToolsReporter(notify: BootstrapNotify): (unknown: readonly string[]) => void;
|
|
193
|
+
/**
|
|
194
|
+
* Report a requested hashline surface that the registered tools cannot serve
|
|
195
|
+
* (the tagged read or the edit slot is disabled). One warning per load; the
|
|
196
|
+
* surviving slots keep their ordinary behavior. Returns the downgrade, if any.
|
|
197
|
+
*/
|
|
198
|
+
export declare function reportHashlineDowngrade(config: AftConfig, registeredTools: ReadonlySet<string>, notify: BootstrapNotify): ReturnType<typeof openCodeHashlineDowngrade>;
|
|
199
|
+
//# sourceMappingURL=bridge-bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge-bootstrap.d.ts","sourceRoot":"","sources":["../src/bridge-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EACL,KAAK,gBAAgB,EAYrB,KAAK,WAAW,EAGjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,eAAe,EAUrB,MAAM,aAAa,CAAC;AAOrB,OAAO,EAAE,yBAAyB,EAAkC,MAAM,wBAAwB,CAAC;AAEnG,mFAAmF;AACnF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC;;;;OAIG;IACH,kBAAkB,CAAC,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IACnD;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,SAAS,eAAe,EAAE,CAAC;IAChD,+DAA+D;IAC/D,iBAAiB,CAAC,IAAI,S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A;CAAE,CAenE;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,eAAe,GACtB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAMtC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,MAAM,EAAE,eAAe,GACtB,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAO9C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The OpenCode side of the config error state (see `config-error.ts` in
|
|
3
|
+
* `@cortexkit/aft-bridge`): AFT's normal tool surface, with every tool call
|
|
4
|
+
* failing with the configuration error instead of reaching a bridge.
|
|
5
|
+
*/
|
|
6
|
+
import type { ToolDefinition } from "@opencode-ai/plugin";
|
|
7
|
+
import type { AftConfig } from "./config.js";
|
|
8
|
+
import type { PluginContext } from "./types.js";
|
|
9
|
+
type ToolMapBuilder = (ctx: PluginContext, config: AftConfig) => Record<string, ToolDefinition>;
|
|
10
|
+
/**
|
|
11
|
+
* Replace every tool's `execute` with one that throws `message`. A thrown
|
|
12
|
+
* error is how both OpenCode generations mark a tool call as failed, so the
|
|
13
|
+
* call shows as an error rather than a successful result carrying the text.
|
|
14
|
+
*/
|
|
15
|
+
export declare function failEveryToolCall(tools: Readonly<Record<string, ToolDefinition>>, message: string): Record<string, ToolDefinition>;
|
|
16
|
+
/**
|
|
17
|
+
* Build the tool surface `config` selects, with every call failing with
|
|
18
|
+
* `message`. The tool factories receive a transport pool that never starts a
|
|
19
|
+
* bridge, so building the surface cannot spawn anything either.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildConfigErrorToolMap(config: AftConfig, message: string, client: unknown, buildToolMap?: ToolMapBuilder): Record<string, ToolDefinition>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=config-error-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-error-surface.d.ts","sourceRoot":"","sources":["../src/config-error-surface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,KAAK,cAAc,GAAG,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,KAAK,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,EAC/C,OAAO,EAAE,MAAM,GACd,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAWhC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,OAAO,EACf,YAAY,GAAE,cAAwC,GACrD,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAUhC"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live reload of the plugin's own copy of the AFT config (`ctx.config`) when
|
|
3
|
+
* `~/.config/cortexkit/aft.jsonc` or `<project>/.cortexkit/aft.jsonc` changes.
|
|
4
|
+
* Shared by the OpenCode 1 plugin and the OpenCode 2 server entry. The engine
|
|
5
|
+
* applies its own keys from the same files separately.
|
|
6
|
+
*/
|
|
7
|
+
import { type LiveConfigLoad, type LiveConfigReload } from "@cortexkit/aft-bridge";
|
|
8
|
+
import { type AftConfig } from "./config.js";
|
|
9
|
+
/** The live keys, read through this host's bash resolution. */
|
|
10
|
+
export declare const OPENCODE_LIVE_CONFIG_KEYS: import("@cortexkit/aft-bridge").LiveConfigKey<{
|
|
11
|
+
$schema?: string | undefined;
|
|
12
|
+
edit_mode?: "default" | "hashline" | undefined;
|
|
13
|
+
format_on_edit?: boolean | undefined;
|
|
14
|
+
formatter_timeout_secs?: number | undefined;
|
|
15
|
+
validate_on_edit?: "syntax" | "full" | undefined;
|
|
16
|
+
formatter?: Record<string, "biome" | "oxfmt" | "prettier" | "deno" | "ruff" | "black" | "rustfmt" | "goimports" | "gofmt" | "none"> | undefined;
|
|
17
|
+
checker?: Record<string, "biome" | "ruff" | "none" | "tsc" | "tsgo" | "pyright" | "cargo" | "go" | "staticcheck"> | undefined;
|
|
18
|
+
configure_warnings_delivery?: "toast" | "log" | "chat" | undefined;
|
|
19
|
+
disabled_tools?: string[] | undefined;
|
|
20
|
+
restrict_to_project_root?: boolean | undefined;
|
|
21
|
+
indexes?: {
|
|
22
|
+
trigram?: boolean | undefined;
|
|
23
|
+
semantic?: boolean | undefined;
|
|
24
|
+
callgraph?: boolean | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
index?: {
|
|
27
|
+
roots?: {
|
|
28
|
+
path: string;
|
|
29
|
+
indexes: ("search" | "semantic" | "callgraph")[];
|
|
30
|
+
}[] | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
views?: {
|
|
33
|
+
enabled?: boolean | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
callgraph_chunk_size?: number | undefined;
|
|
36
|
+
inspect?: {
|
|
37
|
+
diagnostics_timeout_ms: number | undefined;
|
|
38
|
+
enabled?: boolean | undefined;
|
|
39
|
+
tier2_idle_minutes?: number | undefined;
|
|
40
|
+
tier2_pass_timeout_ms?: number | undefined;
|
|
41
|
+
categories?: Record<string, boolean> | undefined;
|
|
42
|
+
tier2_soft_deadline_ms?: number | undefined;
|
|
43
|
+
max_drill_down_items?: number | undefined;
|
|
44
|
+
duplicates?: {
|
|
45
|
+
expected_mirrors?: [string, string][] | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
idle?: {
|
|
49
|
+
root_ttl_minutes: number | undefined;
|
|
50
|
+
lsp_ttl_minutes: number | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
backup?: {
|
|
53
|
+
enabled?: boolean | undefined;
|
|
54
|
+
max_depth?: number | undefined;
|
|
55
|
+
max_file_size?: number | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
worktree?: {
|
|
58
|
+
ram_overlay?: boolean | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
sandbox?: {
|
|
61
|
+
enabled?: boolean | undefined;
|
|
62
|
+
write_allow?: string[] | undefined;
|
|
63
|
+
read_deny?: string[] | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
bash?: boolean | {
|
|
66
|
+
enabled?: boolean | undefined;
|
|
67
|
+
rewrite?: boolean | undefined;
|
|
68
|
+
compress?: boolean | undefined;
|
|
69
|
+
background?: boolean | undefined;
|
|
70
|
+
host_fallback?: boolean | undefined;
|
|
71
|
+
subagent_background?: boolean | undefined;
|
|
72
|
+
detach_on_user_message?: boolean | undefined;
|
|
73
|
+
long_running_reminder_enabled?: boolean | undefined;
|
|
74
|
+
long_running_reminder_interval_ms?: number | undefined;
|
|
75
|
+
foreground_wait_window_ms?: number | undefined;
|
|
76
|
+
watch_sync_max_ms?: number | undefined;
|
|
77
|
+
linux_scope?: boolean | undefined;
|
|
78
|
+
powershell_tool?: boolean | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
experimental?: {
|
|
81
|
+
bash?: {
|
|
82
|
+
rewrite?: boolean | undefined;
|
|
83
|
+
compress?: boolean | undefined;
|
|
84
|
+
background?: boolean | undefined;
|
|
85
|
+
long_running_reminder_enabled?: boolean | undefined;
|
|
86
|
+
long_running_reminder_interval_ms?: number | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
lsp_ty?: boolean | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
lsp?: {
|
|
91
|
+
servers?: Record<string, {
|
|
92
|
+
args: string[];
|
|
93
|
+
root_markers: string[];
|
|
94
|
+
disabled: boolean;
|
|
95
|
+
extensions?: string[] | undefined;
|
|
96
|
+
binary?: string | undefined;
|
|
97
|
+
env?: Record<string, string> | undefined;
|
|
98
|
+
initialization_options?: unknown;
|
|
99
|
+
}> | undefined;
|
|
100
|
+
disabled?: string[] | undefined;
|
|
101
|
+
python?: "pyright" | "ty" | "auto" | undefined;
|
|
102
|
+
diagnostics_on_edit?: boolean | undefined;
|
|
103
|
+
auto_install?: boolean | undefined;
|
|
104
|
+
grace_days?: number | undefined;
|
|
105
|
+
versions?: Record<string, string> | undefined;
|
|
106
|
+
} | undefined;
|
|
107
|
+
url_fetch_allow_private?: boolean | undefined;
|
|
108
|
+
semantic?: {
|
|
109
|
+
backend?: "fastembed" | "openai_compatible" | "ollama" | "synapse" | undefined;
|
|
110
|
+
model?: string | undefined;
|
|
111
|
+
base_url?: string | undefined;
|
|
112
|
+
api_key_env?: string | undefined;
|
|
113
|
+
timeout_ms?: number | undefined;
|
|
114
|
+
query_timeout_ms?: number | undefined;
|
|
115
|
+
query_instruction?: string | undefined;
|
|
116
|
+
max_batch_size?: number | undefined;
|
|
117
|
+
max_input_tokens?: number | undefined;
|
|
118
|
+
max_files?: number | undefined;
|
|
119
|
+
} | undefined;
|
|
120
|
+
search?: {
|
|
121
|
+
rerank?: {
|
|
122
|
+
backend?: "synapse" | "off" | "onnx" | "remote" | undefined;
|
|
123
|
+
model?: string | undefined;
|
|
124
|
+
endpoint?: string | undefined;
|
|
125
|
+
api_key_env?: string | undefined;
|
|
126
|
+
top_n?: number | undefined;
|
|
127
|
+
timeout_ms?: number | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
} | undefined;
|
|
130
|
+
auto_update?: boolean | undefined;
|
|
131
|
+
bridge?: {
|
|
132
|
+
request_timeout_ms?: number | undefined;
|
|
133
|
+
hang_threshold?: number | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
subc?: {
|
|
136
|
+
connection_file?: string | undefined;
|
|
137
|
+
client_reaper?: boolean | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
github?: {
|
|
140
|
+
shim?: boolean | undefined;
|
|
141
|
+
read?: boolean | undefined;
|
|
142
|
+
write?: boolean | undefined;
|
|
143
|
+
} | undefined;
|
|
144
|
+
gh_shim?: {
|
|
145
|
+
binary_path?: string | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
git?: {
|
|
148
|
+
co_author?: string | undefined;
|
|
149
|
+
} | undefined;
|
|
150
|
+
pi?: {
|
|
151
|
+
tool_presentation?: "top_level" | "host_default" | undefined;
|
|
152
|
+
} | undefined;
|
|
153
|
+
harnesses?: Record<string, {
|
|
154
|
+
$schema?: string | undefined;
|
|
155
|
+
edit_mode?: "default" | "hashline" | undefined;
|
|
156
|
+
format_on_edit?: boolean | undefined;
|
|
157
|
+
formatter_timeout_secs?: number | undefined;
|
|
158
|
+
validate_on_edit?: "syntax" | "full" | undefined;
|
|
159
|
+
formatter?: Record<string, "biome" | "oxfmt" | "prettier" | "deno" | "ruff" | "black" | "rustfmt" | "goimports" | "gofmt" | "none"> | undefined;
|
|
160
|
+
checker?: Record<string, "biome" | "ruff" | "none" | "tsc" | "tsgo" | "pyright" | "cargo" | "go" | "staticcheck"> | undefined;
|
|
161
|
+
configure_warnings_delivery?: "toast" | "log" | "chat" | undefined;
|
|
162
|
+
disabled_tools?: string[] | undefined;
|
|
163
|
+
restrict_to_project_root?: boolean | undefined;
|
|
164
|
+
indexes?: {
|
|
165
|
+
trigram?: boolean | undefined;
|
|
166
|
+
semantic?: boolean | undefined;
|
|
167
|
+
callgraph?: boolean | undefined;
|
|
168
|
+
} | undefined;
|
|
169
|
+
index?: {
|
|
170
|
+
roots?: {
|
|
171
|
+
path: string;
|
|
172
|
+
indexes: ("search" | "semantic" | "callgraph")[];
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
} | undefined;
|
|
175
|
+
views?: {
|
|
176
|
+
enabled?: boolean | undefined;
|
|
177
|
+
} | undefined;
|
|
178
|
+
callgraph_chunk_size?: number | undefined;
|
|
179
|
+
inspect?: {
|
|
180
|
+
diagnostics_timeout_ms: number | undefined;
|
|
181
|
+
enabled?: boolean | undefined;
|
|
182
|
+
tier2_idle_minutes?: number | undefined;
|
|
183
|
+
tier2_pass_timeout_ms?: number | undefined;
|
|
184
|
+
categories?: Record<string, boolean> | undefined;
|
|
185
|
+
tier2_soft_deadline_ms?: number | undefined;
|
|
186
|
+
max_drill_down_items?: number | undefined;
|
|
187
|
+
duplicates?: {
|
|
188
|
+
expected_mirrors?: [string, string][] | undefined;
|
|
189
|
+
} | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
idle?: {
|
|
192
|
+
root_ttl_minutes: number | undefined;
|
|
193
|
+
lsp_ttl_minutes: number | undefined;
|
|
194
|
+
} | undefined;
|
|
195
|
+
backup?: {
|
|
196
|
+
enabled?: boolean | undefined;
|
|
197
|
+
max_depth?: number | undefined;
|
|
198
|
+
max_file_size?: number | undefined;
|
|
199
|
+
} | undefined;
|
|
200
|
+
worktree?: {
|
|
201
|
+
ram_overlay?: boolean | undefined;
|
|
202
|
+
} | undefined;
|
|
203
|
+
sandbox?: {
|
|
204
|
+
enabled?: boolean | undefined;
|
|
205
|
+
write_allow?: string[] | undefined;
|
|
206
|
+
read_deny?: string[] | undefined;
|
|
207
|
+
} | undefined;
|
|
208
|
+
bash?: boolean | {
|
|
209
|
+
enabled?: boolean | undefined;
|
|
210
|
+
rewrite?: boolean | undefined;
|
|
211
|
+
compress?: boolean | undefined;
|
|
212
|
+
background?: boolean | undefined;
|
|
213
|
+
host_fallback?: boolean | undefined;
|
|
214
|
+
subagent_background?: boolean | undefined;
|
|
215
|
+
detach_on_user_message?: boolean | undefined;
|
|
216
|
+
long_running_reminder_enabled?: boolean | undefined;
|
|
217
|
+
long_running_reminder_interval_ms?: number | undefined;
|
|
218
|
+
foreground_wait_window_ms?: number | undefined;
|
|
219
|
+
watch_sync_max_ms?: number | undefined;
|
|
220
|
+
linux_scope?: boolean | undefined;
|
|
221
|
+
powershell_tool?: boolean | undefined;
|
|
222
|
+
} | undefined;
|
|
223
|
+
experimental?: {
|
|
224
|
+
bash?: {
|
|
225
|
+
rewrite?: boolean | undefined;
|
|
226
|
+
compress?: boolean | undefined;
|
|
227
|
+
background?: boolean | undefined;
|
|
228
|
+
long_running_reminder_enabled?: boolean | undefined;
|
|
229
|
+
long_running_reminder_interval_ms?: number | undefined;
|
|
230
|
+
} | undefined;
|
|
231
|
+
lsp_ty?: boolean | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
lsp?: {
|
|
234
|
+
servers?: Record<string, {
|
|
235
|
+
args: string[];
|
|
236
|
+
root_markers: string[];
|
|
237
|
+
disabled: boolean;
|
|
238
|
+
extensions?: string[] | undefined;
|
|
239
|
+
binary?: string | undefined;
|
|
240
|
+
env?: Record<string, string> | undefined;
|
|
241
|
+
initialization_options?: unknown;
|
|
242
|
+
}> | undefined;
|
|
243
|
+
disabled?: string[] | undefined;
|
|
244
|
+
python?: "pyright" | "ty" | "auto" | undefined;
|
|
245
|
+
diagnostics_on_edit?: boolean | undefined;
|
|
246
|
+
auto_install?: boolean | undefined;
|
|
247
|
+
grace_days?: number | undefined;
|
|
248
|
+
versions?: Record<string, string> | undefined;
|
|
249
|
+
} | undefined;
|
|
250
|
+
url_fetch_allow_private?: boolean | undefined;
|
|
251
|
+
semantic?: {
|
|
252
|
+
backend?: "fastembed" | "openai_compatible" | "ollama" | "synapse" | undefined;
|
|
253
|
+
model?: string | undefined;
|
|
254
|
+
base_url?: string | undefined;
|
|
255
|
+
api_key_env?: string | undefined;
|
|
256
|
+
timeout_ms?: number | undefined;
|
|
257
|
+
query_timeout_ms?: number | undefined;
|
|
258
|
+
query_instruction?: string | undefined;
|
|
259
|
+
max_batch_size?: number | undefined;
|
|
260
|
+
max_input_tokens?: number | undefined;
|
|
261
|
+
max_files?: number | undefined;
|
|
262
|
+
} | undefined;
|
|
263
|
+
search?: {
|
|
264
|
+
rerank?: {
|
|
265
|
+
backend?: "synapse" | "off" | "onnx" | "remote" | undefined;
|
|
266
|
+
model?: string | undefined;
|
|
267
|
+
endpoint?: string | undefined;
|
|
268
|
+
api_key_env?: string | undefined;
|
|
269
|
+
top_n?: number | undefined;
|
|
270
|
+
timeout_ms?: number | undefined;
|
|
271
|
+
} | undefined;
|
|
272
|
+
} | undefined;
|
|
273
|
+
auto_update?: boolean | undefined;
|
|
274
|
+
bridge?: {
|
|
275
|
+
request_timeout_ms?: number | undefined;
|
|
276
|
+
hang_threshold?: number | undefined;
|
|
277
|
+
} | undefined;
|
|
278
|
+
subc?: {
|
|
279
|
+
connection_file?: string | undefined;
|
|
280
|
+
client_reaper?: boolean | undefined;
|
|
281
|
+
} | undefined;
|
|
282
|
+
github?: {
|
|
283
|
+
shim?: boolean | undefined;
|
|
284
|
+
read?: boolean | undefined;
|
|
285
|
+
write?: boolean | undefined;
|
|
286
|
+
} | undefined;
|
|
287
|
+
gh_shim?: {
|
|
288
|
+
binary_path?: string | undefined;
|
|
289
|
+
} | undefined;
|
|
290
|
+
git?: {
|
|
291
|
+
co_author?: string | undefined;
|
|
292
|
+
} | undefined;
|
|
293
|
+
pi?: {
|
|
294
|
+
tool_presentation?: "top_level" | "host_default" | undefined;
|
|
295
|
+
} | undefined;
|
|
296
|
+
}> | undefined;
|
|
297
|
+
}>[];
|
|
298
|
+
export declare function loadOpenCodeConfigForLiveReload(directory: string): LiveConfigLoad<AftConfig>;
|
|
299
|
+
export interface OpenCodeLiveConfigReloadOptions {
|
|
300
|
+
/** The directory whose project config applies. */
|
|
301
|
+
directory: string;
|
|
302
|
+
/** The config files the startup load read (the bootstrap result's `sources`). */
|
|
303
|
+
initialSources: readonly string[];
|
|
304
|
+
/** Their texts (the bootstrap result's `sourceTexts`). */
|
|
305
|
+
initialSourceTexts?: Readonly<Record<string, string>>;
|
|
306
|
+
getConfig(): AftConfig;
|
|
307
|
+
setConfig(config: AftConfig): void;
|
|
308
|
+
/** Show a config error to the user. */
|
|
309
|
+
notify(message: string): void;
|
|
310
|
+
/** Tests drive `reload()` directly instead of watching. */
|
|
311
|
+
watch?: boolean;
|
|
312
|
+
}
|
|
313
|
+
/** Keep `ctx.config` current for the live keys while the host runs. */
|
|
314
|
+
export declare function startOpenCodeLiveConfigReload(options: OpenCodeLiveConfigReloadOptions): LiveConfigReload;
|
|
315
|
+
//# sourceMappingURL=config-live-reload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-live-reload.d.ts","sourceRoot":"","sources":["../src/config-live-reload.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAGtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,KAAK,SAAS,EAOf,MAAM,aAAa,CAAC;AAGrB,+DAA+D;AAC/D,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGrC,CAAC;AAaF,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,CAwB5F;AAED,MAAM,WAAW,+BAA+B;IAC9C,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC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