@cortexkit/aft-opencode 0.25.2 → 0.26.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 +3 -0
- package/dist/bg-notifications.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +715 -334
- package/dist/lsp-github-install.d.ts +2 -2
- package/dist/lsp-github-install.d.ts.map +1 -1
- package/dist/shared/session-directory.d.ts +4 -3
- package/dist/shared/session-directory.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/tui.js +7 -7
- package/package.json +7 -7
- package/src/shared/session-directory.ts +12 -6
|
@@ -68,7 +68,7 @@ export declare function validateExtraction(stagingRoot: string): void;
|
|
|
68
68
|
* 4. Atomic rename: `staging → destDir`. Any prior `destDir` is removed first.
|
|
69
69
|
* 5. Always cleanup staging on any failure.
|
|
70
70
|
*/
|
|
71
|
-
declare function
|
|
71
|
+
export declare function precheckArchiveContents(archivePath: string, archiveType: string): void;
|
|
72
72
|
export interface GithubAutoInstallResult {
|
|
73
73
|
cachedBinDirs: string[];
|
|
74
74
|
installsStarted: number;
|
|
@@ -108,5 +108,5 @@ export declare function discoverRelevantGithubServers(projectRoot: string): Set<
|
|
|
108
108
|
* of `downloadFile`. We expose it here so the test suite can verify the
|
|
109
109
|
* allowlist independently of full network mocking.
|
|
110
110
|
*/
|
|
111
|
-
export { type Arch, assertAllowedDownloadUrl as _assertAllowedDownloadUrlForTesting, detectHostPlatform, downloadFile as _downloadFileForTesting, findGithubServerById, GITHUB_LSP_TABLE, type GithubServerSpec, type Platform,
|
|
111
|
+
export { type Arch, assertAllowedDownloadUrl as _assertAllowedDownloadUrlForTesting, detectHostPlatform, downloadFile as _downloadFileForTesting, findGithubServerById, GITHUB_LSP_TABLE, type GithubServerSpec, type Platform, precheckArchiveContents as _precheckArchiveSizeForTesting, };
|
|
112
112
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAuCH,OAAO,EACL,KAAK,IAAI,EACT,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"lsp-github-install.d.ts","sourceRoot":"","sources":["../src/lsp-github-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAuCH,OAAO,EACL,KAAK,IAAI,EACT,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,uBAAuB,CAAC;AAiC/B,yCAAyC;AACzC,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAG/E;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CASrF;AAsDD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3C,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B;AAoVD,iBAAS,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAgBrD;AAED,iBAAe,YAAY,CACzB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,OAAO,KAAK,EACvB,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,G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|
|
2
|
+
* Resolve the project directory the session was created with from the SDK's
|
|
3
|
+
* session object. Returns the SDK-reported directory, or `null` when the
|
|
4
|
+
* lookup is unavailable/fails — callers should fall back to the runtime's
|
|
5
|
+
* directory in that case.
|
|
5
6
|
*
|
|
6
7
|
* This function is best-effort: any error (missing `client.session.get`,
|
|
7
8
|
* network failure, malformed response) is logged and recorded as a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-directory.d.ts","sourceRoot":"","sources":["../../src/shared/session-directory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session-directory.d.ts","sourceRoot":"","sources":["../../src/shared/session-directory.ts"],"names":[],"mappings":"AA+CA;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA8CxB;AAWD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,IAAI,GAAG,SAAS,CAK3B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,iBAAiB,EAAE,MAAM,GACxB,IAAI,CAIN;AAED,qDAAqD;AACrD,wBAAgB,kCAAkC,IAAI,IAAI,CAEzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAuEjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AAqRtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA+JjE;
|
|
1
|
+
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAuEjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AAqRtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA+JjE;AA8kCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAwB/E;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAgGnF"}
|
package/dist/tui.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createMemo as createMemo2, createSignal as createSignal2, onCleanup as
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@cortexkit/aft-opencode",
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.26.1",
|
|
8
8
|
type: "module",
|
|
9
9
|
description: "OpenCode plugin for Agent File Tools (AFT) \u2014 tree-sitter and lsp powered code analysis",
|
|
10
10
|
main: "dist/index.js",
|
|
@@ -32,7 +32,7 @@ var package_default = {
|
|
|
32
32
|
},
|
|
33
33
|
dependencies: {
|
|
34
34
|
"@clack/prompts": "^1.2.0",
|
|
35
|
-
"@cortexkit/aft-bridge": "0.
|
|
35
|
+
"@cortexkit/aft-bridge": "0.26.1",
|
|
36
36
|
"@opencode-ai/plugin": "^1.14.39",
|
|
37
37
|
"@opencode-ai/sdk": "^1.14.39",
|
|
38
38
|
"comment-json": "^4.6.2",
|
|
@@ -40,11 +40,11 @@ var package_default = {
|
|
|
40
40
|
zod: "^4.1.8"
|
|
41
41
|
},
|
|
42
42
|
optionalDependencies: {
|
|
43
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
44
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
45
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
46
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
47
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
43
|
+
"@cortexkit/aft-darwin-arm64": "0.26.1",
|
|
44
|
+
"@cortexkit/aft-darwin-x64": "0.26.1",
|
|
45
|
+
"@cortexkit/aft-linux-arm64": "0.26.1",
|
|
46
|
+
"@cortexkit/aft-linux-x64": "0.26.1",
|
|
47
|
+
"@cortexkit/aft-win32-x64": "0.26.1"
|
|
48
48
|
},
|
|
49
49
|
devDependencies: {
|
|
50
50
|
"@types/node": "^22.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-opencode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Agent File Tools (AFT) — tree-sitter and lsp powered code analysis",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@clack/prompts": "^1.2.0",
|
|
31
|
-
"@cortexkit/aft-bridge": "0.
|
|
31
|
+
"@cortexkit/aft-bridge": "0.26.1",
|
|
32
32
|
"@opencode-ai/plugin": "^1.14.39",
|
|
33
33
|
"@opencode-ai/sdk": "^1.14.39",
|
|
34
34
|
"comment-json": "^4.6.2",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"zod": "^4.1.8"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
40
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
41
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
42
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
43
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
39
|
+
"@cortexkit/aft-darwin-arm64": "0.26.1",
|
|
40
|
+
"@cortexkit/aft-darwin-x64": "0.26.1",
|
|
41
|
+
"@cortexkit/aft-linux-arm64": "0.26.1",
|
|
42
|
+
"@cortexkit/aft-linux-x64": "0.26.1",
|
|
43
|
+
"@cortexkit/aft-win32-x64": "0.26.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^22.0.0",
|
|
@@ -28,8 +28,9 @@ interface SessionInfo {
|
|
|
28
28
|
interface OpenCodeClientShape {
|
|
29
29
|
session?: {
|
|
30
30
|
get?: (input: {
|
|
31
|
-
|
|
32
|
-
directory?: string;
|
|
31
|
+
path: { id: string };
|
|
32
|
+
query?: { directory?: string };
|
|
33
|
+
throwOnError?: boolean;
|
|
33
34
|
}) => Promise<{ data?: SessionInfo } | SessionInfo | undefined>;
|
|
34
35
|
};
|
|
35
36
|
}
|
|
@@ -45,9 +46,10 @@ const CACHE_MAX_ENTRIES = 200;
|
|
|
45
46
|
const cache = new Map<string, CacheEntry>();
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
|
-
* Resolve the project directory the session was created with
|
|
49
|
-
*
|
|
50
|
-
* back to the runtime's
|
|
49
|
+
* Resolve the project directory the session was created with from the SDK's
|
|
50
|
+
* session object. Returns the SDK-reported directory, or `null` when the
|
|
51
|
+
* lookup is unavailable/fails — callers should fall back to the runtime's
|
|
52
|
+
* directory in that case.
|
|
51
53
|
*
|
|
52
54
|
* This function is best-effort: any error (missing `client.session.get`,
|
|
53
55
|
* network failure, malformed response) is logged and recorded as a
|
|
@@ -81,7 +83,11 @@ export async function getSessionDirectory(
|
|
|
81
83
|
// Call as a method so the SDK's `this._client` reference resolves
|
|
82
84
|
// correctly. Extracting `c.session.get` into a local would lose the
|
|
83
85
|
// binding and crash the SDK with "undefined is not an object".
|
|
84
|
-
|
|
86
|
+
// SDK schema: SessionGetData uses `path: { id }`, NOT a flat
|
|
87
|
+
// `sessionID`. Do NOT pass `directory` — looking up a session by ID is an
|
|
88
|
+
// identity query, and newer SDKs don't accept a top-level directory here.
|
|
89
|
+
void fallbackDirectory;
|
|
90
|
+
const result = await sessionApi.get({ path: { id: sessionId } });
|
|
85
91
|
// SDK responses come either as `{ data: Session }` or directly as `Session`
|
|
86
92
|
// depending on `ThrowOnError`. Handle both shapes.
|
|
87
93
|
const session: SessionInfo | undefined =
|