@cortexkit/aft 0.56.2 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/opencode.d.ts +10 -0
- package/dist/adapters/opencode.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts +7 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/doctor/opencode.d.ts.map +1 -1
- package/dist/index.js +810 -431
- package/dist/lib/binary-probe.d.ts +11 -0
- package/dist/lib/binary-probe.d.ts.map +1 -1
- package/dist/lib/diagnostics.d.ts +6 -0
- package/dist/lib/diagnostics.d.ts.map +1 -1
- package/dist/lib/onnx-fix.d.ts +3 -3
- package/dist/lib/onnx-fix.d.ts.map +1 -1
- package/dist/lib/onnx.d.ts +10 -0
- package/dist/lib/onnx.d.ts.map +1 -1
- package/dist/setup/host-generation.d.ts +19 -3
- package/dist/setup/host-generation.d.ts.map +1 -1
- package/dist/setup/opencode-config.d.ts +42 -3
- package/dist/setup/opencode-config.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -32,5 +32,16 @@ export declare function probeBinaryVersion(preferredVersion?: string): string |
|
|
|
32
32
|
/** Detailed binary probe used by diagnostics to explain mismatched candidates. */
|
|
33
33
|
export declare function probeAftBinary(preferredVersion?: string): BinaryProbeResult;
|
|
34
34
|
export declare function platformKey(platform?: string, arch?: string): string | null;
|
|
35
|
+
/** One line per searched location: what was found there, or why nothing was. */
|
|
36
|
+
export declare function describeAftBinarySearch(preferredVersion?: string): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Error text for a command that needs the native binary and found none.
|
|
39
|
+
*
|
|
40
|
+
* It lists every location searched instead of only naming a remedy. A reader
|
|
41
|
+
* who just ran the suggested command successfully needs to know which location
|
|
42
|
+
* we looked in and found empty; "run aft doctor" alone reads as "you did it
|
|
43
|
+
* wrong" and sends them around the same loop again.
|
|
44
|
+
*/
|
|
45
|
+
export declare function missingAftBinaryMessage(command: string, preferredVersion?: string): string;
|
|
35
46
|
export declare function findAftBinary(preferredVersion?: string): string | null;
|
|
36
47
|
//# sourceMappingURL=binary-probe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-probe.d.ts","sourceRoot":"","sources":["../../src/lib/binary-probe.ts"],"names":[],"mappings":"AA4CA,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,0BAA0B,CAAC;IACnC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACpC;AAuBD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE3E;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAkD3E;AAmBD,wBAAgB,WAAW,CACzB,QAAQ,GAAE,MAAyB,EACnC,IAAI,GAAE,MAAqB,GAC1B,MAAM,GAAG,IAAI,CAOf;
|
|
1
|
+
{"version":3,"file":"binary-probe.d.ts","sourceRoot":"","sources":["../../src/lib/binary-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
|
@@ -61,6 +61,12 @@ export interface HarnessDiagnostic {
|
|
|
61
61
|
cachedCompatible: boolean | null;
|
|
62
62
|
platform: string;
|
|
63
63
|
installHint: string;
|
|
64
|
+
/**
|
|
65
|
+
* True when AFT downloads and manages the runtime itself on this
|
|
66
|
+
* platform/arch. Where it is false there is no published build AFT can
|
|
67
|
+
* fetch, and installing by hand is the only route.
|
|
68
|
+
*/
|
|
69
|
+
autoDownloadable: boolean;
|
|
64
70
|
requirement: string;
|
|
65
71
|
};
|
|
66
72
|
logFile: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/lib/diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/lib/diagnostics.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,mBAAmB,CAAC;AAE7E,OAAO,EAAE,KAAK,sBAAsB,EAA+B,MAAM,oBAAoB,CAAC;AAG9F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAcxE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,WAAW,EAAE,eAAe,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,EAAE,cAAc,CAAC;IACzB,sFAAsF;IACtF,uBAAuB,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACpD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only.
|
|
14
14
|
*
|
|
15
|
-
* AFT owns a safe fourth option end-to-end:
|
|
16
|
-
* `<storage_dir>/onnxruntime
|
|
17
|
-
*
|
|
15
|
+
* AFT owns a safe fourth option end-to-end: stage and verify a managed v1.24,
|
|
16
|
+
* then transactionally replace only `<storage_dir>/onnxruntime/`. That's what
|
|
17
|
+
* `--fix` does.
|
|
18
18
|
*
|
|
19
19
|
* Pair this with the resolver fix in `packages/aft-bridge/src/onnx-runtime.ts`
|
|
20
20
|
* (which now skips system installs below v1.20) and the user gets a working
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onnx-fix.d.ts","sourceRoot":"","sources":["../../src/lib/onnx-fix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;
|
|
1
|
+
{"version":3,"file":"onnx-fix.d.ts","sourceRoot":"","sources":["../../src/lib/onnx-fix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAI5E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,EAAE,CAmDlF;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,gDAAgD;IAChD,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACxE,+CAA+C;IAC/C,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,wDAAwD;IACxD,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC3D;AA6ED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,cAAc,EAAE,EAC1B,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAgF/B"}
|
package/dist/lib/onnx.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export declare const ONNX_RUNTIME_VERSION = "1.24.4";
|
|
2
2
|
export declare function getOnnxLibraryName(): string;
|
|
3
|
+
/**
|
|
4
|
+
* What to tell a user whose ONNX Runtime is missing.
|
|
5
|
+
*
|
|
6
|
+
* The downloader's platform table decides this, not the platform name: the
|
|
7
|
+
* hint is asked for on every platform, and on one where AFT would have
|
|
8
|
+
* fetched the runtime itself, a manual install instruction sends the user
|
|
9
|
+
* after a package that may not exist. Microsoft publishes no macOS x64 build,
|
|
10
|
+
* which is the one platform where Homebrew really is the only route; macOS
|
|
11
|
+
* arm64 is an auto-download platform and used to be told to brew it anyway.
|
|
12
|
+
*/
|
|
3
13
|
export declare function getManualInstallHint(): string;
|
|
4
14
|
export declare function findIgnoredWindowsSystemOnnxRuntime(): string | null;
|
|
5
15
|
export declare function findSystemOnnxRuntime(): string | null;
|
package/dist/lib/onnx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onnx.d.ts","sourceRoot":"","sources":["../../src/lib/onnx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onnx.d.ts","sourceRoot":"","sources":["../../src/lib/onnx.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAa7C;AAkDD,wBAAgB,mCAAmC,IAAI,MAAM,GAAG,IAAI,CAcnE;AAED,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CAwErD;AACD,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUvE;AAyBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAwC9D;AAED,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAM/D"}
|
|
@@ -37,11 +37,27 @@ export interface V1VersionProbeOptions {
|
|
|
37
37
|
}
|
|
38
38
|
export declare function findExecutableOnPath(name: "opencode" | "opencode2", pathValue?: string, platform?: NodeJS.Platform): string | null;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
40
|
+
* Ask the executable at `executable` for its version, in disposable host
|
|
41
|
+
* roots. Both generations answer `--standalone --version` on stdout and exit
|
|
42
|
+
* 0, and the answer is what decides the generation, so the probe is named for
|
|
43
|
+
* the historical caller only — it makes no assumption about which host it is
|
|
44
|
+
* talking to. CI can enable the strict operator canary used by the load
|
|
45
|
+
* matrix, while production tolerates writes from an OpenCode process that is
|
|
46
|
+
* already using the live operator store.
|
|
43
47
|
*/
|
|
44
48
|
export declare function probeOpenCodeV1Version(executable: string, options?: V1VersionProbeOptions): string | null;
|
|
49
|
+
/**
|
|
50
|
+
* The version number a host reports for `--version`, lifted out of whatever
|
|
51
|
+
* else it prints on that line.
|
|
52
|
+
*
|
|
53
|
+
* The two generations do not print the same thing. OpenCode 1 prints a bare
|
|
54
|
+
* `1.18.30`; OpenCode 2 prints `opencode v2.0.12`. Returning that second
|
|
55
|
+
* string verbatim left the caller with something `Number.parseInt` reads as
|
|
56
|
+
* NaN, so a machine running only OpenCode 2 had no usable version signal and
|
|
57
|
+
* its host was filed as the older generation. Strip a leading program name
|
|
58
|
+
* and an optional `v`, and keep the pre-rename beta shape intact.
|
|
59
|
+
*/
|
|
60
|
+
export declare function parseHostVersion(output: string | null | undefined): string | null;
|
|
45
61
|
export declare function detectOpenCodeHostGeneration(dependencies?: HostGenerationDependencies): OpenCodeHostDetection;
|
|
46
62
|
export declare function formatHostGenerations(detection: OpenCodeHostDetection): string;
|
|
47
63
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-generation.d.ts","sourceRoot":"","sources":["../../src/setup/host-generation.ts"],"names":[],"mappings":"AAuBA,MAAM,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AACjD,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,sBAAsB,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,sBAAsB,GAAG,WAAW,GAAG,SAAS,CAAC;IACzD,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACtC,QAAQ,EAAE,oBAAoB,EA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C,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,OAAO,EAAE,MAAM,CAAC;KACjB,KACE,WAAW,CAAC;CAClB;AAOD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,GAAG,WAAW,EAC9B,SAAS,SAAyB,EAClC,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC3C,MAAM,GAAG,IAAI,CAef;AAqID;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,qBAA0B,GAClC,MAAM,GAAG,IAAI,CAyDf;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAIjF;AA0CD,wBAAgB,4BAA4B,CAC1C,YAAY,GAAE,0BAA+B,GAC5C,qBAAqB,CAwEvB;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,qBAAqB,GAAG,MAAM,CAK9E"}
|
|
@@ -1,16 +1,55 @@
|
|
|
1
1
|
export declare const AFT_OPENCODE_PACKAGE = "@cortexkit/aft-opencode";
|
|
2
2
|
export declare const MODERN_V1_VERSION: string;
|
|
3
|
+
/**
|
|
4
|
+
* The config key an OpenCode host reads its plugin list from.
|
|
5
|
+
*
|
|
6
|
+
* V1 reads `plugin`. V2 renamed it to `plugins` and reads that name, so the
|
|
7
|
+
* key a CLI writes has to follow the host in front of it: an entry under the
|
|
8
|
+
* name the running host does not read is an unregistered plugin.
|
|
9
|
+
*/
|
|
10
|
+
export type OpenCodePluginKey = "plugin" | "plugins";
|
|
11
|
+
/** Host generation as resolved by host-generation.ts (`OpenCodeHostDetection["status"]`). */
|
|
12
|
+
export type OpenCodeConfigGeneration = "v1" | "v2" | "ambiguous" | "unknown";
|
|
13
|
+
/** The key writes must use for a host of this generation. */
|
|
14
|
+
export declare function openCodePluginKey(generation: OpenCodeConfigGeneration): OpenCodePluginKey;
|
|
15
|
+
/** The key belonging to the other generation. */
|
|
16
|
+
export declare function otherOpenCodePluginKey(key: OpenCodePluginKey): OpenCodePluginKey;
|
|
17
|
+
/**
|
|
18
|
+
* The keys to search when answering "is AFT registered?".
|
|
19
|
+
*
|
|
20
|
+
* A settled generation answers for the single key that host reads. While the
|
|
21
|
+
* generation is unresolved neither key can be ruled out, so a registration
|
|
22
|
+
* under either one counts.
|
|
23
|
+
*/
|
|
24
|
+
export declare function openCodePluginReadKeys(generation: OpenCodeConfigGeneration): OpenCodePluginKey[];
|
|
3
25
|
export declare function pinnedPluginEntry(version: string): string;
|
|
4
26
|
export declare function isAftNpmEntry(entry: unknown): entry is string;
|
|
27
|
+
/** The package a config entry registers, in any shape either host accepts. */
|
|
28
|
+
export declare function pluginEntryPackage(entry: unknown): string | null;
|
|
29
|
+
/**
|
|
30
|
+
* True when the entry's shape is one the host reading `key` can load.
|
|
31
|
+
*
|
|
32
|
+
* Both hosts accept a bare package string. Options travel differently: V1
|
|
33
|
+
* pairs them in a tuple, V2 in a `package`/`options` object, and neither host
|
|
34
|
+
* understands the other's form.
|
|
35
|
+
*/
|
|
36
|
+
export declare function pluginEntryFitsKey(entry: unknown, key: OpenCodePluginKey): boolean;
|
|
5
37
|
export interface PluginConfigUpdate {
|
|
6
38
|
action: "already_present" | "added" | "updated";
|
|
7
39
|
changed: boolean;
|
|
8
40
|
entry: string;
|
|
41
|
+
/** Config key the entry was written under, so callers can name it in output. */
|
|
42
|
+
key: OpenCodePluginKey;
|
|
9
43
|
}
|
|
10
44
|
/**
|
|
11
45
|
* Normalize an OpenCode server or TUI config without replacing its parsed object.
|
|
12
|
-
* Keeping the object and its existing
|
|
46
|
+
* Keeping the object and its existing plugin array lets comment-json retain JSONC comments.
|
|
47
|
+
*
|
|
48
|
+
* Only the key this host generation reads is edited, and only AFT's own
|
|
49
|
+
* entries within it. The other generation's key is never rewritten or removed:
|
|
50
|
+
* one machine can run both hosts against one config file, so dropping the
|
|
51
|
+
* sibling key unregisters AFT on whichever host is not being configured.
|
|
13
52
|
*/
|
|
14
|
-
export declare function ensurePinnedPluginConfig(value: Record<string | symbol, unknown>, version: string, hasLocalAftEntry?: (entry: string) => boolean): PluginConfigUpdate;
|
|
15
|
-
export declare function pluginConfigNeedsUpdate(value: Record<string | symbol, unknown>, version: string, hasLocalAftEntry?: (entry: string) => boolean): boolean;
|
|
53
|
+
export declare function ensurePinnedPluginConfig(value: Record<string | symbol, unknown>, version: string, hasLocalAftEntry?: (entry: string) => boolean, generation?: OpenCodeConfigGeneration): PluginConfigUpdate;
|
|
54
|
+
export declare function pluginConfigNeedsUpdate(value: Record<string | symbol, unknown>, version: string, hasLocalAftEntry?: (entry: string) => boolean, generation?: OpenCodeConfigGeneration): boolean;
|
|
16
55
|
//# sourceMappingURL=opencode-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode-config.d.ts","sourceRoot":"","sources":["../../src/setup/opencode-config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAE5D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAK7D;
|
|
1
|
+
{"version":3,"file":"opencode-config.d.ts","sourceRoot":"","sources":["../../src/setup/opencode-config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,6FAA6F;AAC7F,MAAM,MAAM,wBAAwB,GAAG,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,SAAS,CAAC;AAE7E,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC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GED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Unified CLI for Agent File Tools (AFT) — setup, one-shot index snapshots, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@clack/prompts": "^1.6.0",
|
|
27
|
-
"@cortexkit/aft-bridge": "0.
|
|
27
|
+
"@cortexkit/aft-bridge": "0.57.0",
|
|
28
28
|
"comment-json": "^4.6.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|