@cortexkit/aft-pi 0.18.4 → 0.19.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/bg-notifications.d.ts.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47073 -23892
- package/dist/logger.d.ts +16 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/tools/_shared.d.ts +1 -1
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/fs.d.ts +1 -1
- package/dist/tools/fs.d.ts.map +1 -1
- package/dist/tools/reading.d.ts +13 -6
- package/dist/tools/reading.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -6
- package/dist/bridge.d.ts +0 -116
- package/dist/bridge.d.ts.map +0 -1
- package/dist/downloader.d.ts +0 -35
- package/dist/downloader.d.ts.map +0 -1
- package/dist/onnx-runtime.d.ts +0 -53
- package/dist/onnx-runtime.d.ts.map +0 -1
- package/dist/platform.d.ts +0 -6
- package/dist/platform.d.ts.map +0 -1
- package/dist/pool.d.ts +0 -35
- package/dist/pool.d.ts.map +0 -1
- package/dist/resolver.d.ts +0 -11
- package/dist/resolver.d.ts.map +0 -1
package/dist/logger.d.ts
CHANGED
|
@@ -11,4 +11,20 @@ export declare function sessionLog(sessionId: string, message: string, data?: un
|
|
|
11
11
|
export declare function sessionWarn(sessionId: string, message: string, data?: unknown): void;
|
|
12
12
|
export declare function sessionError(sessionId: string, message: string, data?: unknown): void;
|
|
13
13
|
export declare function getLogFilePath(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Adapter that exposes this logger as a {@link import("@cortexkit/aft-bridge").Logger}
|
|
16
|
+
* for the shared bridge package.
|
|
17
|
+
*/
|
|
18
|
+
export declare const bridgeLogger: {
|
|
19
|
+
log(message: string, meta?: {
|
|
20
|
+
sessionId?: string;
|
|
21
|
+
}): void;
|
|
22
|
+
warn(message: string, meta?: {
|
|
23
|
+
sessionId?: string;
|
|
24
|
+
}): void;
|
|
25
|
+
error(message: string, meta?: {
|
|
26
|
+
sessionId?: string;
|
|
27
|
+
}): void;
|
|
28
|
+
getLogFilePath: () => string;
|
|
29
|
+
};
|
|
14
30
|
//# sourceMappingURL=logger.d.ts.map
|
package/dist/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAmEA,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEzD;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAE1D;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEnF;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEpF;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAErF;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAmEA,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEzD;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAE1D;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEnF;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEpF;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAErF;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY;iBACV,MAAM,SAAS;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;kBAIpC,MAAM,SAAS;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;mBAIpC,MAAM,SAAS;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;CAKrD,CAAC"}
|
package/dist/tools/_shared.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared helpers used by every Pi tool wrapper.
|
|
3
3
|
*/
|
|
4
|
+
import type { BinaryBridge, BridgeRequestOptions } from "@cortexkit/aft-bridge";
|
|
4
5
|
import type { AgentToolResult, ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
5
|
-
import type { BinaryBridge, BridgeRequestOptions } from "../bridge.js";
|
|
6
6
|
import type { PluginContext } from "../types.js";
|
|
7
7
|
/**
|
|
8
8
|
* Per-command timeout overrides (milliseconds).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEvF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQlE,CAAC;AAEF,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAErE;AAED,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CAEvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAK7E;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,MAAM,CAAC,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA0BlC;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,GAAG,OAAO,EAC3C,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,QAAQ,GACjB,eAAe,CAAC,QAAQ,CAAC,CAK3B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,GAAG,OAAO,EAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,CAAC,EAAE,QAAQ,GACjB,eAAe,CAAC,QAAQ,CAAC,CAE3B;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGvF"}
|
package/dist/tools/bash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA2DjD,QAAA,MAAM,cAAc;;EAIlB,CAAC;AAWH,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAsCD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA2DjD,QAAA,MAAM,cAAc;;EAIlB,CAAC;AAWH,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAsCD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CA+H3E;AAOD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa;;;;;;;;yBASpC,MAAM,UACX,MAAM,CAAC,OAAO,cAAc,CAAC,WAC5B,WAAW,GAAG,SAAS,aACrB,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,UACrE,gBAAgB;EAW7B;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa;;;;;;;;yBASlC,MAAM,UACX,MAAM,CAAC,OAAO,cAAc,CAAC,WAC5B,WAAW,GAAG,SAAS,aACrB,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,UACnE,gBAAgB;EAW7B"}
|
package/dist/tools/fs.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { type Static } from "@sinclair/typebox";
|
|
|
7
7
|
import type { PluginContext } from "../types.js";
|
|
8
8
|
import { type RenderContextLike } from "./render-helpers.js";
|
|
9
9
|
declare const DeleteParams: import("@sinclair/typebox").TObject<{
|
|
10
|
-
|
|
10
|
+
files: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
11
11
|
}>;
|
|
12
12
|
declare const MoveParams: import("@sinclair/typebox").TObject<{
|
|
13
13
|
filePath: import("@sinclair/typebox").TString;
|
package/dist/tools/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/tools/fs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,YAAY;;
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/tools/fs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAE7B,QAAA,MAAM,YAAY;;EAKhB,CAAC;AAEH,QAAA,MAAM,UAAU;;;EAGd,CAAC;AAEH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,wCAAwC;AACxC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,YAAY,GAAG,UAAU,EACnC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,EAC7D,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,uCAkB3B;AAED,wCAAwC;AACxC,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,YAAY,GAAG,UAAU,EACnC,IAAI,EAAE,MAAM,CAAC,OAAO,YAAY,CAAC,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,EAC7D,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,kFAsC3B;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,GAAG,IAAI,CAkG9F"}
|
package/dist/tools/reading.d.ts
CHANGED
|
@@ -7,12 +7,11 @@ import { type Static } from "@sinclair/typebox";
|
|
|
7
7
|
import type { PluginContext } from "../types.js";
|
|
8
8
|
import { type RenderContextLike } from "./render-helpers.js";
|
|
9
9
|
declare const OutlineParams: import("@sinclair/typebox").TObject<{
|
|
10
|
-
|
|
11
|
-
files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
12
|
-
directory: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
|
+
target: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>]>;
|
|
13
11
|
}>;
|
|
14
12
|
declare const ZoomParams: import("@sinclair/typebox").TObject<{
|
|
15
|
-
filePath: import("@sinclair/typebox").TString
|
|
13
|
+
filePath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
14
|
+
url: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
16
15
|
symbol: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
17
16
|
symbols: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
18
17
|
contextLines: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -45,7 +44,15 @@ export declare function renderZoomCall(args: Static<typeof ZoomParams>, theme: T
|
|
|
45
44
|
/** Exported for renderer unit tests. */
|
|
46
45
|
export declare function renderZoomResult(result: AgentToolResult<unknown>, args: Static<typeof ZoomParams>, theme: Theme, context: RenderContextLike): import("@mariozechner/pi-tui").Text | import("@mariozechner/pi-tui").Container;
|
|
47
46
|
export declare function registerReadingTools(pi: ExtensionAPI, ctx: PluginContext, surface: ReadingSurface): void;
|
|
48
|
-
/**
|
|
49
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Format multi-symbol zoom results as plain text. Successful entries use
|
|
49
|
+
* `formatZoomText` (line-numbered, no JSON escapes); failures render as
|
|
50
|
+
* `Symbol "name" not found: <reason>`. Sections are blank-line separated.
|
|
51
|
+
*
|
|
52
|
+
* Exported for regression tests. Output is byte-identical to the OpenCode
|
|
53
|
+
* plugin's formatZoomBatchResult — both hosts share `formatZoomText` from
|
|
54
|
+
* `@cortexkit/aft-bridge` so the agent sees the same shape across hosts.
|
|
55
|
+
*/
|
|
56
|
+
export declare function formatZoomBatchResult(targetLabel: string, symbols: string[], responses: Record<string, unknown>[]): ZoomBatchResult;
|
|
50
57
|
export {};
|
|
51
58
|
//# sourceMappingURL=reading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CA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BAAgB,gBAAgB,CAC9B,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,MAAM,CAAC,OAAO,UAAU,CAAC,EAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,kFAI3B;AAED,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,EAChB,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,cAAc,GACtB,IAAI,CAkJN;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnC,eAAe,CAyBjB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { BridgePool } from "@cortexkit/aft-bridge";
|
|
1
2
|
import type { AftConfig } from "./config.js";
|
|
2
|
-
import type { BridgePool } from "./pool.js";
|
|
3
3
|
/**
|
|
4
4
|
* Shared context passed to every tool wrapper.
|
|
5
5
|
* Bundles the bridge pool, the resolved AFT config, and the storage dir.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Pi coding agent extension for Agent File Tools (AFT) — tree-sitter and LSP-powered code analysis",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,17 +22,18 @@
|
|
|
22
22
|
"prepublishOnly": "bun run build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@cortexkit/aft-bridge": "0.19.1",
|
|
25
26
|
"@sinclair/typebox": "^0.34.33",
|
|
26
27
|
"comment-json": "^5.0.0",
|
|
27
28
|
"diff": "^8.0.4",
|
|
28
29
|
"zod": "^4.1.8"
|
|
29
30
|
},
|
|
30
31
|
"optionalDependencies": {
|
|
31
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
32
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
33
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
34
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
35
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
32
|
+
"@cortexkit/aft-darwin-arm64": "0.19.1",
|
|
33
|
+
"@cortexkit/aft-darwin-x64": "0.19.1",
|
|
34
|
+
"@cortexkit/aft-linux-arm64": "0.19.1",
|
|
35
|
+
"@cortexkit/aft-linux-x64": "0.19.1",
|
|
36
|
+
"@cortexkit/aft-win32-x64": "0.19.1"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@mariozechner/pi-coding-agent": "*",
|
package/dist/bridge.d.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import type { BgCompletion } from "./bg-notifications.js";
|
|
2
|
-
/**
|
|
3
|
-
* Compare two semver version strings (major.minor.patch plus pre-release).
|
|
4
|
-
* Returns: negative if a < b, 0 if equal, positive if a > b.
|
|
5
|
-
*/
|
|
6
|
-
export declare function compareSemver(a: string, b: string): number;
|
|
7
|
-
interface ConfigureWarningsContext {
|
|
8
|
-
projectRoot: string;
|
|
9
|
-
sessionId?: string;
|
|
10
|
-
client?: unknown;
|
|
11
|
-
warnings: unknown[];
|
|
12
|
-
}
|
|
13
|
-
export interface BridgeOptions {
|
|
14
|
-
/** Request timeout in milliseconds. Default: 30000 */
|
|
15
|
-
timeoutMs?: number;
|
|
16
|
-
/** Maximum restart attempts before giving up. Default: 3 */
|
|
17
|
-
maxRestarts?: number;
|
|
18
|
-
/** Minimum binary version required (semver). If the binary is older, onVersionMismatch is called. */
|
|
19
|
-
minVersion?: string;
|
|
20
|
-
/** Called when binary version is older than minVersion. Receives (binaryVersion, minVersion). */
|
|
21
|
-
onVersionMismatch?: (binaryVersion: string, minVersion: string) => void;
|
|
22
|
-
/** Called after the first successful configure returns user-visible warnings. */
|
|
23
|
-
onConfigureWarnings?: (context: ConfigureWarningsContext) => void | Promise<void>;
|
|
24
|
-
/** Called for server-pushed background bash completions. */
|
|
25
|
-
onBashCompletion?: (completion: BashCompletedPayload, bridge: BinaryBridge) => void | Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
export interface BashCompletedPayload extends BgCompletion {
|
|
28
|
-
type: "bash_completed";
|
|
29
|
-
session_id: string;
|
|
30
|
-
}
|
|
31
|
-
export interface BridgeRequestOptions {
|
|
32
|
-
onProgress?: (chunk: {
|
|
33
|
-
kind: "stdout" | "stderr";
|
|
34
|
-
text: string;
|
|
35
|
-
}) => void;
|
|
36
|
-
/** Per-call transport timeout in milliseconds. Defaults to the bridge-wide timeout. */
|
|
37
|
-
transportTimeoutMs?: number;
|
|
38
|
-
/**
|
|
39
|
-
* Skip the "kill the child process on timeout" behavior for this request.
|
|
40
|
-
*
|
|
41
|
-
* The default (false) treats a transport-level timeout as evidence the bridge
|
|
42
|
-
* is wedged — Rust normally responds well within the budget, so silence past
|
|
43
|
-
* the deadline almost always means a stuck child. Killing forces a clean
|
|
44
|
-
* respawn on the next call.
|
|
45
|
-
*
|
|
46
|
-
* Some commands enforce their own timeouts on the Rust side (notably `bash`,
|
|
47
|
-
* which uses a watchdog thread to terminate the child shell and return a
|
|
48
|
-
* timeout response). For those, a transport timeout means the response was
|
|
49
|
-
* lost or queued behind something else — the bridge itself is still healthy
|
|
50
|
-
* and should keep its warm state. Pass `keepBridgeOnTimeout: true` to
|
|
51
|
-
* reject the request without tearing down the bridge.
|
|
52
|
-
*/
|
|
53
|
-
keepBridgeOnTimeout?: boolean;
|
|
54
|
-
}
|
|
55
|
-
interface SendOptions extends BridgeRequestOptions {
|
|
56
|
-
timeoutMs?: number;
|
|
57
|
-
configureWarningClient?: unknown;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Manages a persistent `aft` child process, communicating via NDJSON over
|
|
61
|
-
* stdin/stdout. Lazy-spawns on first `send()` call. Handles crash detection
|
|
62
|
-
* with exponential backoff auto-restart.
|
|
63
|
-
*/
|
|
64
|
-
export declare class BinaryBridge {
|
|
65
|
-
private static readonly RESTART_RESET_MS;
|
|
66
|
-
/** How many recent stderr lines to keep for crash diagnostics. */
|
|
67
|
-
private static readonly STDERR_TAIL_MAX;
|
|
68
|
-
private binaryPath;
|
|
69
|
-
private cwd;
|
|
70
|
-
private process;
|
|
71
|
-
private pending;
|
|
72
|
-
private nextId;
|
|
73
|
-
private stdoutBuffer;
|
|
74
|
-
/** Ring buffer of the last N stderr lines, cleared on every spawn. */
|
|
75
|
-
private stderrTail;
|
|
76
|
-
private _restartCount;
|
|
77
|
-
private _shuttingDown;
|
|
78
|
-
private timeoutMs;
|
|
79
|
-
private maxRestarts;
|
|
80
|
-
private configured;
|
|
81
|
-
private _configurePromise;
|
|
82
|
-
private configOverrides;
|
|
83
|
-
private minVersion;
|
|
84
|
-
private onVersionMismatch;
|
|
85
|
-
private onConfigureWarnings;
|
|
86
|
-
private onBashCompletion;
|
|
87
|
-
private restartResetTimer;
|
|
88
|
-
constructor(binaryPath: string, cwd: string, options?: BridgeOptions, configOverrides?: Record<string, unknown>);
|
|
89
|
-
/** Number of times the binary has been restarted after a crash. */
|
|
90
|
-
get restartCount(): number;
|
|
91
|
-
/** Whether the child process is currently alive. */
|
|
92
|
-
isAlive(): boolean;
|
|
93
|
-
hasPendingRequests(): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Send a command to the binary and return the parsed response.
|
|
96
|
-
* Lazy-spawns the binary on first call.
|
|
97
|
-
*/
|
|
98
|
-
send(command: string, params?: Record<string, unknown>, options?: SendOptions): Promise<Record<string, unknown>>;
|
|
99
|
-
private deliverConfigureWarnings;
|
|
100
|
-
/** Kill the child process and reject all pending requests. */
|
|
101
|
-
shutdown(): Promise<void>;
|
|
102
|
-
/** Query binary version and compare against minVersion. Calls onVersionMismatch if outdated. */
|
|
103
|
-
private checkVersion;
|
|
104
|
-
private ensureSpawned;
|
|
105
|
-
private spawnProcess;
|
|
106
|
-
private pushStderrLine;
|
|
107
|
-
private formatStderrTail;
|
|
108
|
-
private onStdoutData;
|
|
109
|
-
private handleTimeout;
|
|
110
|
-
private handleCrash;
|
|
111
|
-
private rejectAllPending;
|
|
112
|
-
private scheduleRestartCountReset;
|
|
113
|
-
private clearRestartResetTimer;
|
|
114
|
-
}
|
|
115
|
-
export {};
|
|
116
|
-
//# sourceMappingURL=bridge.d.ts.map
|
package/dist/bridge.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAiB1D;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAkC1D;AA6CD,UAAU,wBAAwB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,E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IA6GpB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,YAAY;IA+DpB,OAAO,CAAC,aAAa;IA+BrB,OAAO,CAAC,WAAW;IAoDnB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,yBAAyB;IAQjC,OAAO,CAAC,sBAAsB;CAM/B"}
|
package/dist/downloader.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auto-download the AFT binary from GitHub releases.
|
|
3
|
-
*
|
|
4
|
-
* Resolution order (in resolver.ts):
|
|
5
|
-
* 1. Cached binary in ~/.cache/aft/bin/
|
|
6
|
-
* 2. npm platform package (@cortexkit/aft-darwin-arm64, etc.)
|
|
7
|
-
* 3. PATH lookup (which aft)
|
|
8
|
-
* 4. ~/.cargo/bin/aft
|
|
9
|
-
* 5. Auto-download from GitHub releases (this module)
|
|
10
|
-
*
|
|
11
|
-
* Cache dir respects XDG_CACHE_HOME on Linux/macOS and LOCALAPPDATA on Windows.
|
|
12
|
-
*/
|
|
13
|
-
/** Get the cache directory, respecting XDG_CACHE_HOME / LOCALAPPDATA. */
|
|
14
|
-
export declare function getCacheDir(): string;
|
|
15
|
-
/** Binary name for the current platform. */
|
|
16
|
-
export declare function getBinaryName(): string;
|
|
17
|
-
/** Return the cached binary path if it exists, otherwise null.
|
|
18
|
-
* Checks the version-specific cache directory only.
|
|
19
|
-
* The legacy flat cache (~/.cache/aft/bin/aft) is intentionally NOT checked
|
|
20
|
-
* because it can be overwritten by other instances, corrupting running processes. */
|
|
21
|
-
export declare function getCachedBinaryPath(version?: string): string | null;
|
|
22
|
-
/**
|
|
23
|
-
* Download the AFT binary for the current platform from GitHub releases.
|
|
24
|
-
*
|
|
25
|
-
* @param version - Git tag to download from (e.g. "v0.1.0"). If omitted,
|
|
26
|
-
* fetches the latest release tag via the GitHub API.
|
|
27
|
-
* @returns Absolute path to the downloaded binary, or null on failure.
|
|
28
|
-
*/
|
|
29
|
-
export declare function downloadBinary(version?: string): Promise<string | null>;
|
|
30
|
-
/**
|
|
31
|
-
* Ensure the AFT binary is available: check cache, then download if needed.
|
|
32
|
-
* This is the main entry point called by the resolver.
|
|
33
|
-
*/
|
|
34
|
-
export declare function ensureBinary(version?: string): Promise<string | null>;
|
|
35
|
-
//# sourceMappingURL=downloader.d.ts.map
|
package/dist/downloader.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloader.d.ts","sourceRoot":"","sources":["../src/downloader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,yEAAyE;AACzE,wBAAgB,WAAW,IAAI,MAAM,CASpC;AAED,4CAA4C;AAC5C,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;sFAGsF;AACtF,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAInE;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgH7E;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqB3E"}
|
package/dist/onnx-runtime.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auto-download and manage ONNX Runtime shared library for semantic search.
|
|
3
|
-
*
|
|
4
|
-
* Downloads the CPU-only ONNX Runtime from Microsoft's GitHub releases.
|
|
5
|
-
* The library is cached in the storage directory alongside semantic index data.
|
|
6
|
-
*
|
|
7
|
-
* Audit-3 v0.17 #1 hardening (v0.17.1): the previous implementation used
|
|
8
|
-
* `curl` with no size cap, no archive containment validation, no install
|
|
9
|
-
* lock, and no integrity verification — leaving an entire parallel install
|
|
10
|
-
* path that bypassed every defense the LSP GitHub installer had earned in
|
|
11
|
-
* Phase A through Phase E. This rewrite brings ONNX onto the same security
|
|
12
|
-
* floor:
|
|
13
|
-
*
|
|
14
|
-
* - Streaming size cap via fetch + ReadableStream transformer (`MAX_DOWNLOAD_BYTES`).
|
|
15
|
-
* - Streaming SHA-256 of the downloaded archive, persisted in `.aft-onnx-installed`.
|
|
16
|
-
* - Atomic O_EXCL install lock with PID-aware stale-lock recovery.
|
|
17
|
-
* - Containment-checked extraction: every file under the staging dir
|
|
18
|
-
* must be inside the staging root, no symlinks allowed before move.
|
|
19
|
-
* - Total extracted size cap (`MAX_EXTRACT_BYTES`) to defeat decompression
|
|
20
|
-
* bombs.
|
|
21
|
-
* - TOFU verification: if `.aft-onnx-installed` already records a hash for
|
|
22
|
-
* this version, refuse to use a binary that doesn't match.
|
|
23
|
-
*
|
|
24
|
-
* Supported platforms:
|
|
25
|
-
* - macOS ARM64 (osx-arm64)
|
|
26
|
-
* - Linux x64 (linux-x64)
|
|
27
|
-
* - Linux ARM64 (linux-aarch64)
|
|
28
|
-
* - Windows x64 (win-x64)
|
|
29
|
-
* - Windows ARM64 (win-arm64)
|
|
30
|
-
*
|
|
31
|
-
* macOS x64 (Intel) is not provided by Microsoft — users must install via:
|
|
32
|
-
* brew install onnxruntime
|
|
33
|
-
*/
|
|
34
|
-
/** Check if this platform can auto-download ONNX Runtime */
|
|
35
|
-
export declare function isOrtAutoDownloadSupported(): boolean;
|
|
36
|
-
/** Get the install hint for platforms where auto-download isn't available */
|
|
37
|
-
export declare function getManualInstallHint(): string;
|
|
38
|
-
/**
|
|
39
|
-
* Ensure ONNX Runtime is available. Returns the directory containing the library,
|
|
40
|
-
* or null if unavailable.
|
|
41
|
-
*
|
|
42
|
-
* Resolution order:
|
|
43
|
-
* 1. Cached in storageDir/onnxruntime/<version>/ (with TOFU verification)
|
|
44
|
-
* 2. System install (brew, apt, etc.)
|
|
45
|
-
* 3. Auto-download from GitHub releases (if platform supported)
|
|
46
|
-
* 4. null (user needs manual install)
|
|
47
|
-
*/
|
|
48
|
-
export declare function ensureOnnxRuntime(storageDir: string): Promise<string | null>;
|
|
49
|
-
/**
|
|
50
|
-
* Remove ONNX Runtime from temp files. Cleanup helper for test isolation.
|
|
51
|
-
*/
|
|
52
|
-
export declare function cleanupOnnxRuntime(storageDir: string): void;
|
|
53
|
-
//# sourceMappingURL=onnx-runtime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onnx-runtime.d.ts","sourceRoot":"","sources":["../src/onnx-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AA6FH,4DAA4D;AAC5D,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,IAAI,MAAM,CAQ7C;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA6ElF;AAqeD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAS3D"}
|
package/dist/platform.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared platform / architecture mappings used by both the resolver and downloader.
|
|
3
|
-
*/
|
|
4
|
-
export declare const PLATFORM_ARCH_MAP: Record<string, Record<string, string>>;
|
|
5
|
-
export declare const PLATFORM_ASSET_MAP: Record<string, string>;
|
|
6
|
-
//# sourceMappingURL=platform.d.ts.map
|
package/dist/platform.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIpE,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMrD,CAAC"}
|
package/dist/pool.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { BinaryBridge, type BridgeOptions } from "./bridge.js";
|
|
2
|
-
export interface PoolOptions extends BridgeOptions {
|
|
3
|
-
maxPoolSize?: number;
|
|
4
|
-
idleTimeoutMs?: number;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Manages a pool of BinaryBridge instances keyed by working directory.
|
|
8
|
-
*
|
|
9
|
-
* Pi has one extension instance per session, and sessions are bound to a single
|
|
10
|
-
* cwd. We pool by directory so `/new`, `/fork`, and `/resume` in the same cwd
|
|
11
|
-
* can reuse an existing warm bridge with its caches, LSP state, and backup
|
|
12
|
-
* history intact.
|
|
13
|
-
*/
|
|
14
|
-
export declare class BridgePool {
|
|
15
|
-
private readonly bridges;
|
|
16
|
-
private binaryPath;
|
|
17
|
-
private readonly maxPoolSize;
|
|
18
|
-
private readonly idleTimeoutMs;
|
|
19
|
-
private readonly bridgeOptions;
|
|
20
|
-
private readonly configOverrides;
|
|
21
|
-
private cleanupTimer;
|
|
22
|
-
constructor(binaryPath: string, options?: PoolOptions, configOverrides?: Record<string, unknown>);
|
|
23
|
-
/** Get any existing alive bridge, preferring the given directory. */
|
|
24
|
-
getAnyActiveBridge(directory: string): BinaryBridge | null;
|
|
25
|
-
/** Get an alive bridge only when it belongs to the requested directory. */
|
|
26
|
-
getActiveBridgeForRoot(directory: string): BinaryBridge | null;
|
|
27
|
-
/** Get or create a bridge for the given directory. */
|
|
28
|
-
getBridge(directory: string): BinaryBridge;
|
|
29
|
-
private cleanup;
|
|
30
|
-
private evictLRU;
|
|
31
|
-
shutdown(): Promise<void>;
|
|
32
|
-
replaceBinary(newPath: string): Promise<void>;
|
|
33
|
-
get size(): number;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=pool.d.ts.map
|
package/dist/pool.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../src/pool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAY/D,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IACxD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0B;IAC1D,OAAO,CAAC,YAAY,CAA+C;gBAGjE,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,WAAgB,EACzB,eAAe,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;IAoB/C,qEAAqE;IACrE,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAgB1D,2EAA2E;IAC3E,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAQ9D,sDAAsD;IACtD,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY;IAiB1C,OAAO,CAAC,OAAO;IAUf,OAAO,CAAC,QAAQ;IAgBV,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAUzB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnD,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
|
package/dist/resolver.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function platformKey(platform?: string, arch?: string): string;
|
|
2
|
-
/**
|
|
3
|
-
* Locate the `aft` binary synchronously by checking (in order):
|
|
4
|
-
* 1. Cached binary from previous auto-download (~/.cache/aft/bin/)
|
|
5
|
-
* 2. npm platform package via `require.resolve(@cortexkit/aft-<platform>/bin/aft)`
|
|
6
|
-
* 3. PATH lookup via `which aft` (or `where aft` on Windows)
|
|
7
|
-
* 4. ~/.cargo/bin/aft
|
|
8
|
-
*/
|
|
9
|
-
export declare function findBinarySync(): string | null;
|
|
10
|
-
export declare function findBinary(): Promise<string>;
|
|
11
|
-
//# sourceMappingURL=resolver.d.ts.map
|
package/dist/resolver.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../src/resolver.ts"],"names":[],"mappings":"AAgDA,wBAAgB,WAAW,CACzB,QAAQ,GAAE,MAAyB,EACnC,IAAI,GAAE,MAAqB,GAC1B,MAAM,CAgBR;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CA4C9C;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CA6BlD"}
|