@cortexkit/aft-pi 0.59.0 → 0.61.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/bash-wait-detach.d.ts +8 -4
- package/dist/bash-wait-detach.d.ts.map +1 -1
- package/dist/bg-notifications.d.ts.map +1 -1
- package/dist/config-error-state.d.ts +2 -2
- package/dist/config-error-state.d.ts.map +1 -1
- package/dist/config-live-reload.d.ts.map +1 -1
- package/dist/config.d.ts +30 -27
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8406 -7047
- package/dist/lsp-auto-install.d.ts.map +1 -1
- package/dist/lsp-github-install.d.ts +5 -110
- package/dist/lsp-github-install.d.ts.map +1 -1
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/ast.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +2 -0
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts +3 -2
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/tools/inspect.d.ts.map +1 -1
- package/dist/tools/navigate.d.ts.map +1 -1
- package/dist/tools/reading.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/lsp-github-probe.d.ts +0 -68
- package/dist/lsp-github-probe.d.ts.map +0 -1
- package/dist/lsp-github-table.d.ts +0 -55
- package/dist/lsp-github-table.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-auto-install.d.ts","sourceRoot":"","sources":["../src/lsp-auto-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,EACL,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"lsp-auto-install.d.ts","sourceRoot":"","sources":["../src/lsp-auto-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,EACL,KAAK,gBAAgB,EAUt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AC,CA0CvF;AAED;;;;;GAKG;AACH;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAYrD;AAqUD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAI/F;AAWD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,iBAAiB,EACzB,SAAS,GAAE,OAAO,KAAa,GAC9B,iBAAiB,CAiFnB;AAED,gFAAgF;AAChF,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,aAAa,CAAC,EACpE,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -1,111 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* <id>/
|
|
7
|
-
* bin/<binary> ← extracted binary (or shim)
|
|
8
|
-
* extracted/ ← validated extraction (kept for upgrades)
|
|
9
|
-
* .aft-version-check ← JSON: { last_checked, latest_eligible }
|
|
10
|
-
* .aft-installing ← lockfile while a download/extract runs
|
|
11
|
-
*
|
|
12
|
-
* `bin/<binary>` is what we add to `lsp_paths_extra` so the Rust resolver
|
|
13
|
-
* can find it.
|
|
14
|
-
*
|
|
15
|
-
* Extraction containment:
|
|
16
|
-
* 1. Download to `<id>/<asset-name>` with a hard size cap.
|
|
17
|
-
* 2. Extract into a quarantine dir `<id>/.staging-<rand>/`.
|
|
18
|
-
* 3. Walk the staging tree and reject any entry that is a symlink, hardlink,
|
|
19
|
-
* or whose canonical path escapes the staging root.
|
|
20
|
-
* 4. Only after validation: `renameSync(staging, extracted)` atomically
|
|
21
|
-
* replaces any prior extraction.
|
|
22
|
-
* 5. Stage dir is always cleaned up — success or failure.
|
|
23
|
-
*
|
|
24
|
-
* GitHub pin resolution:
|
|
25
|
-
* When `lsp.versions: { "owner/repo": "X" }` is set, we use GitHub's
|
|
26
|
-
* `/releases/tags/<tag>` endpoint directly (with `v`-prefix tolerance)
|
|
27
|
-
* instead of relying on the broader `/releases?per_page=30` probe. The
|
|
28
|
-
* probe is for "what is the latest eligible version" — not "is this
|
|
29
|
-
* specific pinned tag valid".
|
|
30
|
-
*/
|
|
31
|
-
import { type Arch, detectHostPlatform, findGithubServerById, GITHUB_LSP_TABLE, type GithubServerSpec, type Platform } from "./lsp-github-table.js";
|
|
32
|
-
/** Final binary path under our cache. */
|
|
33
|
-
export declare function ghBinaryPath(spec: GithubServerSpec, platform: Platform): string;
|
|
34
|
-
export declare function isGithubInstalled(spec: GithubServerSpec, platform: Platform): boolean;
|
|
35
|
-
export interface GithubInstallConfig {
|
|
36
|
-
autoInstall: boolean;
|
|
37
|
-
graceDays: number;
|
|
38
|
-
/** Per-package version pin map; key is `owner/repo`. Bypasses grace. */
|
|
39
|
-
versions: Readonly<Record<string, string>>;
|
|
40
|
-
disabled: ReadonlySet<string>;
|
|
41
|
-
}
|
|
42
|
-
/** Test hook: how many cached-binary hashes this process has computed. */
|
|
43
|
-
export declare function __githubBinaryHashCountForTests(): number;
|
|
44
|
-
declare function assertAllowedDownloadUrl(rawUrl: string): URL;
|
|
45
|
-
declare function downloadFile(url: string, destPath: string, fetchImpl: typeof fetch, assetSize?: number, signal?: AbortSignal): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Recursively validate that every entry under `stagingRoot` is contained
|
|
48
|
-
* within it (zip-slip + symlink containment).
|
|
49
|
-
*
|
|
50
|
-
* Rejects:
|
|
51
|
-
* - Any symlink (regardless of where it points). Symlinks in LSP
|
|
52
|
-
* installs are extremely rare and would be a red flag.
|
|
53
|
-
* - Any hardlink that has multiple inodes pointing at the same file
|
|
54
|
-
* OUTSIDE the staging root (we can't easily detect this for hardlinks
|
|
55
|
-
* to other paths inside the same archive, but those aren't a containment
|
|
56
|
-
* escape).
|
|
57
|
-
* - Any entry whose `realpath()` resolves outside `stagingRoot`. This
|
|
58
|
-
* catches what the platform extractor missed if it failed to defend
|
|
59
|
-
* against `..` traversal.
|
|
60
|
-
*
|
|
61
|
-
* Throws on any violation. The caller cleans up the staging dir.
|
|
62
|
-
*/
|
|
63
|
-
export declare function validateExtraction(stagingRoot: string): void;
|
|
64
|
-
/**
|
|
65
|
-
* Extract `archivePath` into `destDir` safely:
|
|
66
|
-
*
|
|
67
|
-
* 1. Stage extraction in `<destDir>.staging-<rand>/`.
|
|
68
|
-
* 2. Run the platform extractor against the staging dir.
|
|
69
|
-
* 3. Validate the staging tree (no symlinks, no escapes).
|
|
70
|
-
* 4. Atomic rename: `staging → destDir`. Any prior `destDir` is removed first.
|
|
71
|
-
* 5. Always cleanup staging on any failure.
|
|
72
|
-
*/
|
|
73
|
-
type ZipListingMode = "platform" | "tar";
|
|
74
|
-
export declare function precheckArchiveContents(archivePath: string, archiveType: string, zipListingMode?: ZipListingMode): Promise<void>;
|
|
75
|
-
declare function extractArchiveSafely(archivePath: string, destDir: string, archiveType: string): Promise<void>;
|
|
76
|
-
export interface GithubAutoInstallResult {
|
|
77
|
-
cachedBinDirs: string[];
|
|
78
|
-
installsStarted: number;
|
|
79
|
-
/** Binary names whose installs are actively in flight at return time. */
|
|
80
|
-
installingBinaries: string[];
|
|
81
|
-
skipped: Array<{
|
|
82
|
-
id: string;
|
|
83
|
-
reason: string;
|
|
84
|
-
}>;
|
|
85
|
-
/**
|
|
86
|
-
* Promise that resolves when every backgrounded GitHub install settles.
|
|
87
|
-
* Each install holds its per-package install lock for its full duration.
|
|
88
|
-
* Plugin startup ignores this; tests await it.
|
|
89
|
-
*/
|
|
90
|
-
installsComplete: Promise<void>;
|
|
91
|
-
/** Re-scan the cache after background installs settle. */
|
|
92
|
-
getCachedBinDirs: () => string[];
|
|
93
|
-
}
|
|
94
|
-
export declare function abortInFlightGithubInstalls(): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* Run the GitHub-release auto-install pass for every Pattern C server.
|
|
97
|
-
*
|
|
98
|
-
* Sync return: per-server cached bin dirs + skipped reasons known at decision
|
|
99
|
-
* time. Backgrounded installs settle into `installsComplete` so plugin
|
|
100
|
-
* startup is not blocked on slow downloads.
|
|
101
|
-
*/
|
|
102
|
-
export declare function runGithubAutoInstall(relevantServers: ReadonlySet<string>, config: GithubInstallConfig, fetchImpl?: typeof fetch): GithubAutoInstallResult;
|
|
103
|
-
/**
|
|
104
|
-
* Cheap project-relevance scan for GitHub-distributed servers. Root markers
|
|
105
|
-
* win immediately; otherwise use the bounded shared extension walk for
|
|
106
|
-
* monorepos with nested source files.
|
|
107
|
-
*/
|
|
108
|
-
export declare function discoverRelevantGithubServers(projectRoot: string): Set<string>;
|
|
109
|
-
/** Test-only re-exports. Production code uses these inline. */
|
|
110
|
-
export { type Arch, assertAllowedDownloadUrl as _assertAllowedDownloadUrlForTesting, detectHostPlatform, downloadFile as _downloadFileForTesting, extractArchiveSafely as _extractArchiveSafelyForTesting, findGithubServerById, GITHUB_LSP_TABLE, type GithubServerSpec, type Platform, precheckArchiveContents as _precheckArchiveSizeForTesting, };
|
|
1
|
+
import { type GithubAutoInstallOptions, type GithubAutoInstallResult, type GithubInstallConfig } from "@cortexkit/aft-bridge";
|
|
2
|
+
export type { Arch, GithubAutoInstallResult, GithubInstallConfig, GithubServerSpec, Platform, } from "@cortexkit/aft-bridge";
|
|
3
|
+
export { detectHostPlatform, findGithubServerById, GITHUB_LSP_TABLE } from "@cortexkit/aft-bridge";
|
|
4
|
+
export declare const ghBinaryPath: (spec: import("@cortexkit/aft-bridge").GithubServerSpec, platform: import("@cortexkit/aft-bridge").Platform) => string, isGithubInstalled: (spec: import("@cortexkit/aft-bridge").GithubServerSpec, platform: import("@cortexkit/aft-bridge").Platform) => boolean, __githubBinaryHashCountForTests: () => number, validateExtraction: (stagingRoot: string) => void, precheckArchiveContents: (archivePath: string, archiveType: string, zipListingMode?: "platform" | "tar") => Promise<void>, abortInFlightGithubInstalls: () => Promise<void>, discoverRelevantGithubServers: (projectRoot: string) => Set<string>, _assertAllowedDownloadUrlForTesting: (rawUrl: string) => URL, _downloadFileForTesting: (url: string, destPath: string, fetchImpl: typeof fetch, assetSize?: number, signal?: AbortSignal) => Promise<void>, _extractArchiveSafelyForTesting: (archivePath: string, destDir: string, archiveType: string, validateStaged?: (stagingDir: string) => Promise<void>) => Promise<void>, _precheckArchiveSizeForTesting: (archivePath: string, archiveType: string, zipListingMode?: "platform" | "tar") => Promise<void>, _runArchiveToolForTesting: (command: string, args: string[], timeout: number) => Promise<string>;
|
|
5
|
+
export declare const runGithubAutoInstall: (relevantServers: ReadonlySet<string>, config: GithubInstallConfig, fetchImpl?: typeof fetch, options?: GithubAutoInstallOptions) => GithubAutoInstallResult;
|
|
111
6
|
//# sourceMappingURL=lsp-github-install.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-github-install.d.ts","sourceRoot":"","sources":["../src/lsp-github-install.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lsp-github-install.d.ts","sourceRoot":"","sources":["../src/lsp-github-install.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAW/B,YAAY,EACV,IAAI,EACJ,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAgBnG,eAAO,MACL,YAAY,0HACZ,iBAAiB,2HACjB,+BAA+B,gBAC/B,kBAAkB,iCAClB,uBAAuB,oGACvB,2BAA2B,uBAC3B,6BAA6B,wCAC7B,mCAAmC,2BACnC,uBAAuB,uHACvB,+BAA+B,wIAC/B,8BAA8B,oGAC9B,yBAAyB,uEACR,CAAC;AAEpB,eAAO,MAAM,oBAAoB,EAAE,CACjC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,MAAM,EAAE,mBAAmB,EAC3B,SAAS,CAAC,EAAE,OAAO,KAAK,EACxB,OAAO,CAAC,EAAE,wBAAwB,KAC/B,uBAA8D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,mBAAmB,
|
|
1
|
+
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,mBAAmB,EAEnB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACf,MAAM,uBAAuB,CAAC;AAU/B,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAe,KAAK,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1E,KAAK,YAAY,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AACtE,KAAK,YAAY,GAAG,WAAW,GAAG,YAAY,CAAC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O,CAAC,cAAc,CAAC,CAwBzB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,GAAG,OAAO,EAC3C,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,QAAQ,GACjB,eAAe,CAAC,QAAQ,CAAC,CAE3B;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,QAAQ,GAAG,OAAO,EAC9C,OAAO,EAAE,YAAY,EAAE,EACvB,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/ast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/tools/ast.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEZ,KAAK,EACN,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/tools/ast.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEZ,KAAK,EACN,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,OAAO,EAWL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAM7B,MAAM,qBAAqB,CAAC;AAiD7B,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAgED,wCAAwC;AACxC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAqD/E;AAED,wCAAwC;AACxC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAmDhF;AAED,wCAAwC;AACxC,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,iBAAiB,GAAG,kBAAkB,EAChD,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,yCAwB3B;AAED,wCAAwC;AACxC,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,iBAAiB,GAAG,kBAAkB,EAChD,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4C,sFA2BtD;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CA2FhG"}
|
package/dist/tools/bash.d.ts
CHANGED
|
@@ -75,6 +75,8 @@ interface BashStatusDetails {
|
|
|
75
75
|
}> | null;
|
|
76
76
|
live_descendants_omitted?: number;
|
|
77
77
|
live_descendants_summary?: string;
|
|
78
|
+
/** Text note saying which phase a still-running remote task has reached on the build server. */
|
|
79
|
+
remote_phase_note?: string;
|
|
78
80
|
waited?: BashStatusWaited;
|
|
79
81
|
}
|
|
80
82
|
interface BashWriteDetails {
|
package/dist/tools/bash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"m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C,KAAK,IAAI,CAAC,GAAG,SAAS,UACpE,gBAAgB;EAe7B;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;EAiB7B;AAuCD,KAAK,eAAe,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAoQhG,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAEtF;AAoGD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAEtC"}
|
package/dist/tools/hoisted.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* `read` and `grep` keep the default text-only result rendering because our
|
|
17
17
|
* payload (`path`, `pattern`) already aligns with Pi's built-in arg shape.
|
|
18
18
|
*/
|
|
19
|
-
import { type AgentToolResult, type ExtensionAPI, type Theme } from "@earendil-works/pi-coding-agent";
|
|
19
|
+
import { type AgentToolResult, type ExtensionAPI, type ExtensionContext, type Theme } from "@earendil-works/pi-coding-agent";
|
|
20
20
|
import { type Component, Text } from "@earendil-works/pi-tui";
|
|
21
21
|
import type { PluginContext } from "../types.js";
|
|
22
22
|
import { type RenderResultOptionsLike } from "./render-helpers.js";
|
|
@@ -46,8 +46,9 @@ export declare function assertExternalDirectoryPermission(extCtx: {
|
|
|
46
46
|
cwd: string;
|
|
47
47
|
}, target: string, options?: {
|
|
48
48
|
restrictToProjectRoot?: boolean;
|
|
49
|
-
serverValidatedRead?: boolean;
|
|
50
49
|
}): Promise<void>;
|
|
50
|
+
/** Allow only Rust-confirmed, exact session-owned artifacts outside a restricted root. */
|
|
51
|
+
export declare function assertExternalReadPermission(ctx: PluginContext, extCtx: ExtensionContext, target: string, restrictToProjectRoot?: boolean): Promise<void>;
|
|
51
52
|
export interface ToolSurfaceFlags {
|
|
52
53
|
hoistRead: boolean;
|
|
53
54
|
hoistWrite: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAcH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAcH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAErB,KAAK,KAAK,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,SAAS,EAAqB,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAIjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAcjD,OAAO,EAKL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AA0D7B,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAE/E;AAqBD;;;;GAIG;AACH,UAAU,iBAAiB;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,EAAE,SAAS,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,OAAO,CAAC;CAClB;AAuFD;;;;;;;;;GASG;AACH,wBAAsB,iCAAiC,CACrD,MAAM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AC,MAAM,EAAE,OAAO,CAAC,GAChC,eAAe,CAAC,mBAAmB,CAAC,CAmFtC;AAuED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,OAAO,GAAG,MAAM,EAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,GACzB,IAAI,CAON;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,CAAC,mBAAmB,CAAC,EAC5C,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4C,GACpD,SAAS,CA8EX;AAED;6BAC6B;AAC7B,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS/E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA0B3D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,mBAAmB,EAAE,OAAO,EAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,MAAM,CAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/tools/inspect.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEZ,KAAK,EACN,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAI7B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/tools/inspect.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEZ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,aAAa,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"navigate.d.ts","sourceRoot":"","sources":["../../src/tools/navigate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAG5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAYjD,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAI7B,MAAM,qBAAqB,CAAC;AAoD7B,wCAAwC;AACxC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAU7F;AAED,wCAAwC;AACxC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,yCAezF;AAED,wCAAwC;AACxC,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4C,sFAWtD;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CA0E/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/tools/reading.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEZ,KAAK,EACN,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAWjD,OAAO,EASL,KAAK,iBAAiB,EACtB,KAAK,uBAA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EAAE,iBAAiB,yCAiCrF;AAED,wCAAwC;AACxC,wBAAgB,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,EAC1B,OAAO,GAAE,uBAA4C,sFAUtD;AAmBD,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,EAChB,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,cAAc,GACtB,IAAI,CA6MN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
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",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"test:e2e": "bun test src/__tests__/e2e/"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@cortexkit/aft-bridge": "0.
|
|
27
|
+
"@cortexkit/aft-bridge": "0.61.0",
|
|
28
28
|
"comment-json": "^5.0.0",
|
|
29
29
|
"diff": "^8.0.4",
|
|
30
30
|
"zod": "^4.4.3"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
34
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
35
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
36
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
37
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
38
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
33
|
+
"@cortexkit/aft-darwin-arm64": "0.61.0",
|
|
34
|
+
"@cortexkit/aft-darwin-x64": "0.61.0",
|
|
35
|
+
"@cortexkit/aft-linux-arm64": "0.61.0",
|
|
36
|
+
"@cortexkit/aft-linux-x64": "0.61.0",
|
|
37
|
+
"@cortexkit/aft-win32-arm64": "0.61.0",
|
|
38
|
+
"@cortexkit/aft-win32-x64": "0.61.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": "^0.80.2",
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Probes the GitHub releases API for a project's tagged releases and
|
|
3
|
-
* selects the newest tag whose asset publication satisfies AFT's
|
|
4
|
-
* supply-chain grace window.
|
|
5
|
-
*
|
|
6
|
-
* Same threat model as the npm registry probe — we want releases that
|
|
7
|
-
* have been observable for at least `graceDays` so the community has
|
|
8
|
-
* time to detect compromised tarballs and yank them.
|
|
9
|
-
*
|
|
10
|
-
* For repos that put release tags on a `published_at` field (almost
|
|
11
|
-
* all of them), we filter on that. Pre-releases are skipped by default.
|
|
12
|
-
*/
|
|
13
|
-
interface GithubRelease {
|
|
14
|
-
tag_name: string;
|
|
15
|
-
name?: string;
|
|
16
|
-
published_at?: string;
|
|
17
|
-
draft?: boolean;
|
|
18
|
-
prerelease?: boolean;
|
|
19
|
-
assets?: Array<{
|
|
20
|
-
name: string;
|
|
21
|
-
browser_download_url: string;
|
|
22
|
-
size?: number;
|
|
23
|
-
}>;
|
|
24
|
-
}
|
|
25
|
-
export interface GithubVersionPickResult {
|
|
26
|
-
/** Chosen release tag (e.g. "v21.1.0" or "21.1.0"), or null if none qualifies. */
|
|
27
|
-
tag: string | null;
|
|
28
|
-
/** Asset list of the chosen release — used to find the right archive. */
|
|
29
|
-
assets: Array<{
|
|
30
|
-
name: string;
|
|
31
|
-
url: string;
|
|
32
|
-
size?: number;
|
|
33
|
-
}>;
|
|
34
|
-
/** True when releases exist but none is older than `graceDays`. */
|
|
35
|
-
blockedByGrace: boolean;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Pick the newest non-draft non-prerelease release whose `published_at`
|
|
39
|
-
* is at least `graceDays` ago.
|
|
40
|
-
*
|
|
41
|
-
* The GitHub `/releases` endpoint returns up to 30 releases sorted newest
|
|
42
|
-
* first by default — pagination ignored because servers we care about
|
|
43
|
-
* cycle stable releases on the order of weeks/months.
|
|
44
|
-
*/
|
|
45
|
-
export declare function pickEligibleRelease(releases: readonly GithubRelease[], graceDays: number, now?: number): GithubVersionPickResult;
|
|
46
|
-
/**
|
|
47
|
-
* Fetch the GitHub releases list for `owner/repo` and apply the grace filter.
|
|
48
|
-
*
|
|
49
|
-
* Returns `null` on HTTP/network failure — caller should keep using whatever's
|
|
50
|
-
* already cached.
|
|
51
|
-
*/
|
|
52
|
-
export declare function probeGithubReleases(githubRepo: string, graceDays: number, fetchImpl?: typeof fetch): Promise<GithubVersionPickResult | null>;
|
|
53
|
-
/**
|
|
54
|
-
* Throw if `version` contains anything outside the safe allowlist.
|
|
55
|
-
*/
|
|
56
|
-
export declare function assertSafeVersion(version: string): void;
|
|
57
|
-
/** Non-throwing predicate for the cache-miss-on-corruption flow. */
|
|
58
|
-
export declare function isSafeVersion(version: string | null | undefined): version is string;
|
|
59
|
-
/**
|
|
60
|
-
* Strip a leading `v` from a release tag to get a clean version for asset
|
|
61
|
-
* templates that don't include the `v` prefix.
|
|
62
|
-
*
|
|
63
|
-
* Asserts the tag is safe via {@link assertSafeVersion} so callers can
|
|
64
|
-
* pass it into paths and command arguments without additional validation.
|
|
65
|
-
*/
|
|
66
|
-
export declare function stripTagV(tag: string): string;
|
|
67
|
-
export {};
|
|
68
|
-
//# sourceMappingURL=lsp-github-probe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-github-probe.d.ts","sourceRoot":"","sources":["../src/lsp-github-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,M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LSP servers AFT can
|
|
3
|
-
* auto-download.
|
|
4
|
-
*
|
|
5
|
-
* Each entry is a templated asset-name pattern keyed by `(platform, arch)`.
|
|
6
|
-
* The installer resolves the latest eligible release tag (with 7-day grace),
|
|
7
|
-
* matches the asset against `assetTemplate(platform, arch, version)`,
|
|
8
|
-
* downloads it, extracts to the cache, and exposes the binary.
|
|
9
|
-
*
|
|
10
|
-
* NOTE: terraform-ls uses HashiCorp's release API, not GitHub. It's a
|
|
11
|
-
* separate code path; not included in this table.
|
|
12
|
-
*
|
|
13
|
-
* NOTE: install oxlint in the project (`npm install --save-dev oxlint`).
|
|
14
|
-
* AFT resolves `node_modules/.bin/oxlint` and starts it with `--lsp`, or
|
|
15
|
-
* prefers the standalone `oxc_language_server` shipped by older releases.
|
|
16
|
-
* It stays project-managed rather than being downloaded by AFT.
|
|
17
|
-
*
|
|
18
|
-
* NOTE: kotlin-language-server is hosted on JetBrains CDN, not GitHub.
|
|
19
|
-
* Skipped from auto-download for v0.17.0 — users install via Homebrew /
|
|
20
|
-
* scoop / Snap / coursier.
|
|
21
|
-
*/
|
|
22
|
-
export type Platform = "darwin" | "linux" | "win32";
|
|
23
|
-
export type Arch = "x64" | "arm64";
|
|
24
|
-
export type ArchiveType = "tar.gz" | "tar.xz" | "zip";
|
|
25
|
-
export interface GithubServerSpec {
|
|
26
|
-
/** AFT server-kind id (matches `crates/aft/src/lsp/registry.rs::ServerKind::id_str`). */
|
|
27
|
-
readonly id: string;
|
|
28
|
-
/** GitHub `owner/repo`. */
|
|
29
|
-
readonly githubRepo: string;
|
|
30
|
-
/** Binary name placed under the cache `bin/` dir after extraction. */
|
|
31
|
-
readonly binary: string;
|
|
32
|
-
/** Returns the asset filename and archive type for the given platform/arch + version. */
|
|
33
|
-
readonly resolveAsset: (platform: Platform, arch: Arch, version: string) => {
|
|
34
|
-
name: string;
|
|
35
|
-
archive: ArchiveType;
|
|
36
|
-
} | null;
|
|
37
|
-
/**
|
|
38
|
-
* Path inside the extracted archive where the binary lives, relative to the
|
|
39
|
-
* extraction root. May contain `${version}` placeholder. The installer
|
|
40
|
-
* looks up this path and copies/symlinks it to `bin/<binary>`.
|
|
41
|
-
*/
|
|
42
|
-
readonly binaryPathInArchive: (platform: Platform, arch: Arch, version: string) => string;
|
|
43
|
-
}
|
|
44
|
-
export declare const GITHUB_LSP_TABLE: readonly GithubServerSpec[];
|
|
45
|
-
/** Find an entry by AFT server id. */
|
|
46
|
-
export declare function findGithubServerById(id: string): GithubServerSpec | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Map Node's `process.platform` and `process.arch` to our (Platform, Arch)
|
|
49
|
-
* pair, or null when the host isn't supported.
|
|
50
|
-
*/
|
|
51
|
-
export declare function detectHostPlatform(): {
|
|
52
|
-
platform: Platform;
|
|
53
|
-
arch: Arch;
|
|
54
|
-
} | null;
|
|
55
|
-
//# sourceMappingURL=lsp-github-table.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-github-table.d.ts","sourceRoot":"","sources":["../src/lsp-github-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yFAAyF;IACzF,QAAQ,CAAC,YAAY,EAAE,CACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,KACZ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