@cortexkit/aft-opencode 0.49.4 → 0.50.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 +6 -3
- package/dist/bg-notifications.d.ts.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +672 -108
- package/dist/normalize-schemas.d.ts +7 -4
- package/dist/normalize-schemas.d.ts.map +1 -1
- package/dist/tool-registration.d.ts +6 -0
- package/dist/tool-registration.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -8,11 +8,14 @@ import type { ToolDefinition } from "@opencode-ai/plugin";
|
|
|
8
8
|
* `tool.schema.toJSONSchema`, which preserves all metadata.
|
|
9
9
|
*/
|
|
10
10
|
export declare function normalizeToolArgSchemas<T extends Pick<ToolDefinition, "args">>(toolDefinition: T): T;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
export interface OpenCodeArgumentPreparation {
|
|
12
|
+
hashlineEffective?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Prepare raw OpenCode arguments against the schema arm registered for this session. */
|
|
15
|
+
export declare function prepareOpenCodeArguments(toolName: string, rawArguments: unknown, preparation?: OpenCodeArgumentPreparation): Record<string, unknown>;
|
|
16
|
+
declare function prepareToolMap(tools: Record<string, ToolDefinition>, preparation?: OpenCodeArgumentPreparation): Record<string, ToolDefinition>;
|
|
14
17
|
/** Normalize tool definitions and attach raw-argument preparation. */
|
|
15
|
-
export declare function normalizeToolMap(tools: Record<string, ToolDefinition
|
|
18
|
+
export declare function normalizeToolMap(tools: Record<string, ToolDefinition>, preparation?: OpenCodeArgumentPreparation): Record<string, ToolDefinition>;
|
|
16
19
|
/** Attach argument preparation without changing emitted schema metadata. */
|
|
17
20
|
export { prepareToolMap };
|
|
18
21
|
//# sourceMappingURL=normalize-schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-schemas.d.ts","sourceRoot":"","sources":["../src/normalize-schemas.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAiC1D;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAC5E,cAAc,EAAE,CAAC,GAChB,CAAC,CAKH;AAMD
|
|
1
|
+
{"version":3,"file":"normalize-schemas.d.ts","sourceRoot":"","sources":["../src/normalize-schemas.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAiC1D;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAC5E,cAAc,EAAE,CAAC,GAChB,CAAC,CAKH;AAMD,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,OAAO,EACrB,WAAW,GAAE,2BAAgC,GAC5C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAazB;AAyBD,iBAAS,cAAc,CACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EACrC,WAAW,GAAE,2BAAgC,GAC5C,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAchC;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EACrC,WAAW,GAAE,2BAAgC,GAC5C,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAGhC;AAED,4EAA4E;AAC5E,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { ToolDefinition } from "@opencode-ai/plugin";
|
|
2
2
|
import type { AftConfig } from "./config.js";
|
|
3
3
|
import type { PluginContext } from "./types.js";
|
|
4
|
+
/** Returns true when bare `edit` remains available after surface, hoisting, and disable filters. */
|
|
5
|
+
export declare function openCodeEditSlotSurvives(config: AftConfig): boolean;
|
|
6
|
+
/** Select the hashline schema only when the host's final edit slot can survive. */
|
|
7
|
+
export declare function openCodeHashlineEffective(config: AftConfig): boolean;
|
|
8
|
+
/** Return the process-state flag Rust uses to select the same edit schema arm. */
|
|
9
|
+
export declare function openCodeHashlineEditRegistered(config: AftConfig, registeredTools: ReadonlySet<string>): boolean;
|
|
4
10
|
/**
|
|
5
11
|
* Build the exact OpenCode registration map without starting a bridge.
|
|
6
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registration.d.ts","sourceRoot":"","sources":["../src/tool-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAa7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,SAAS,EACjB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,GACvE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"tool-registration.d.ts","sourceRoot":"","sources":["../src/tool-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAa7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD,oGAAoG;AACpG,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAMnE;AAED,mFAAmF;AACnF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAEpE;AAED,kFAAkF;AAClF,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,SAAS,EACjB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,GACvE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAiChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAe,cAAc,EAAc,MAAM,qBAAqB,CAAC;AAInF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAiDjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AA+OtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAoIjE;
|
|
1
|
+
{"version":3,"file":"hoisted.d.ts","sourceRoot":"","sources":["../../src/tools/hoisted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAe,cAAc,EAAc,MAAM,qBAAqB,CAAC;AAInF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAiDjD,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,EAAE,QAAQ,MAAM,EAAE,OAAO,MAAM,KAAG,MAChD,CAAC;AA+OtC;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAoIjE;AAyqBD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA0B/E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA4BnF"}
|
package/dist/types.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface PluginContext {
|
|
|
23
23
|
client: PluginInput["client"];
|
|
24
24
|
plugin?: ShellEnvPluginHost;
|
|
25
25
|
config: AftConfig;
|
|
26
|
+
/** Whether hashline edit/read mode is active for this plugin registration. */
|
|
27
|
+
hashlineEffective?: boolean;
|
|
26
28
|
/** Absolute path to AFT's storage dir (e.g. ~/.local/share/opencode/storage/plugin/aft) */
|
|
27
29
|
storageDir: string;
|
|
28
30
|
/** Returns false when user and project config merge to `enabled: false` for this project. */
|
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,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,CACR,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM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C,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;CACnF;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,MAAM,EAAE,SAAS,CAAC;IAClB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;CACrD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-opencode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@clack/prompts": "^1.6.0",
|
|
37
|
-
"@cortexkit/aft-bridge": "0.
|
|
37
|
+
"@cortexkit/aft-bridge": "0.50.1",
|
|
38
38
|
"@opentui/core": "0.4.3",
|
|
39
39
|
"@opentui/solid": "0.4.3",
|
|
40
40
|
"comment-json": "^4.6.2",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"zod": "^4.4.3"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
47
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
48
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
49
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
50
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
51
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
46
|
+
"@cortexkit/aft-darwin-arm64": "0.50.1",
|
|
47
|
+
"@cortexkit/aft-darwin-x64": "0.50.1",
|
|
48
|
+
"@cortexkit/aft-linux-arm64": "0.50.1",
|
|
49
|
+
"@cortexkit/aft-linux-x64": "0.50.1",
|
|
50
|
+
"@cortexkit/aft-win32-arm64": "0.50.1",
|
|
51
|
+
"@cortexkit/aft-win32-x64": "0.50.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@opencode-ai/plugin": "^1.17.11",
|