@cortexkit/aft-opencode 0.63.5 → 0.65.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/bg-notifications.d.ts.map +1 -1
- package/dist/config-live-reload.d.ts +4 -28
- package/dist/config-live-reload.d.ts.map +1 -1
- package/dist/config.d.ts +11 -40
- package/dist/config.d.ts.map +1 -1
- package/dist/entry/server.js +1726 -674
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1726 -674
- package/dist/lsp-auto-install.d.ts.map +1 -1
- package/dist/shared/session-directory.d.ts +11 -4
- package/dist/shared/session-directory.d.ts.map +1 -1
- package/dist/shared/status.d.ts +2 -6
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/subc-tool-schemas.d.ts +4 -3
- package/dist/subc-tool-schemas.d.ts.map +1 -1
- package/dist/tool-registration.d.ts +1 -1
- package/dist/tool-registration.d.ts.map +1 -1
- package/dist/tools/_shared.d.ts +11 -17
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash_watch.d.ts +6 -3
- package/dist/tools/bash_watch.d.ts.map +1 -1
- package/dist/tools/definitions/v2.d.ts +26 -1
- package/dist/tools/definitions/v2.d.ts.map +1 -1
- package/dist/tools/inspect.d.ts +0 -15
- package/dist/tools/inspect.d.ts.map +1 -1
- package/dist/tui/preferences.d.ts +1 -1
- package/dist/tui/shared-sidebar.d.ts +4 -0
- package/dist/tui/shared-sidebar.d.ts.map +1 -0
- package/dist/tui/v2-status.d.ts +3 -2
- package/dist/tui/v2-status.d.ts.map +1 -1
- package/dist/v2-session-lifecycle.d.ts.map +1 -1
- package/dist/workflow-hints.d.ts +1 -5
- package/dist/workflow-hints.d.ts.map +1 -1
- package/package.json +14 -12
- package/src/shared/session-directory.ts +90 -17
- package/src/shared/status.ts +6 -26
- package/src/tui/index.tsx +8 -28
- package/src/tui/preferences.ts +1 -1
- package/src/tui/shared-sidebar.ts +14 -0
- package/src/tui/sidebar-view.tsx +257 -283
- package/src/tui/v2-status.ts +5 -14
- package/src/tui-compiled/index.tsx +6 -44
- package/src/tui-compiled/preferences.ts +1 -1
- package/src/tui-compiled/shared-sidebar-host.tsx +816 -0
- package/src/tui-compiled/shared-sidebar-local.tsx +816 -0
- package/src/tui-compiled/shared-sidebar.LICENSE +21 -0
- package/src/tui-compiled/shared-sidebar.ts +14 -0
- package/src/tui-compiled/sidebar-view.tsx +185 -261
- package/src/tui-compiled/sidebar.tsx +1 -0
- package/src/tui-compiled/v2-status.ts +5 -14
- package/src/tui-compiled/v2.tsx +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-auto-install.d.ts","sourceRoot":"","sources":["../src/lsp-auto-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,OAAO,EACL,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"lsp-auto-install.d.ts","sourceRoot":"","sources":["../src/lsp-auto-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,OAAO,EACL,KAAK,gBAAgB,EAatB,MAAM,uBAAuB,CAAC;AAe/B,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAM3F,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEhF,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,WAAW,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3C,kGAAkG;IAClG,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED,qCAAqC;AACrC,MAAM,WAAW,iBAAiB;IACh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AC,EACpE,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
*
|
|
13
13
|
* The session itself stores the correct directory in OpenCode's SQLite
|
|
14
14
|
* (`Session.directory` in the SDK). This helper looks it up once per
|
|
15
|
-
* session and caches the result
|
|
16
|
-
*
|
|
15
|
+
* session and caches the result. A session.moved event invalidates the
|
|
16
|
+
* cached root because OpenCode 2 sessions can change Location.
|
|
17
17
|
*
|
|
18
18
|
* The bug should also be fixed upstream in OpenCode's
|
|
19
19
|
* `packages/opencode/src/session/registry.ts`. Until then this
|
|
@@ -32,8 +32,9 @@ export declare const FAILED_LOOKUP_RETRY_MS = 30000;
|
|
|
32
32
|
/**
|
|
33
33
|
* Resolve the project directory the session was created with from the SDK's
|
|
34
34
|
* session object. Returns the SDK-reported directory, or `null` when the
|
|
35
|
-
* lookup is unavailable/fails
|
|
36
|
-
* directory
|
|
35
|
+
* lookup is unavailable/fails. Only session-scoped tool calls may fall back
|
|
36
|
+
* to their runtime directory; broadcast events must not open a route without
|
|
37
|
+
* a resolved session directory.
|
|
37
38
|
*
|
|
38
39
|
* This function is best-effort: any error (missing `client.session.get`,
|
|
39
40
|
* network failure, malformed response) is logged and recorded as a
|
|
@@ -41,6 +42,10 @@ export declare const FAILED_LOOKUP_RETRY_MS = 30000;
|
|
|
41
42
|
* same session.
|
|
42
43
|
*/
|
|
43
44
|
export declare function getSessionDirectory(client: unknown, sessionId: string, fallbackDirectory: string): Promise<string | null>;
|
|
45
|
+
/** Session events may open routes only in the owning V2 Location. */
|
|
46
|
+
export declare function getSessionDirectoryForEvent(client: unknown, sessionId: string, instanceDirectory: string): Promise<string | null>;
|
|
47
|
+
/** Deleted records cannot be queried: prefer the event's Location, then a previously resolved ref. */
|
|
48
|
+
export declare function getSessionDirectoryForDeletedEvent(client: unknown, sessionId: string, eventLocation: unknown): string | null;
|
|
44
49
|
/**
|
|
45
50
|
* Synchronous cache probe. Returns the resolved directory for a session if we
|
|
46
51
|
* already looked it up; otherwise `undefined` so the caller falls through to
|
|
@@ -60,6 +65,8 @@ export declare function getSessionDirectoryCached(sessionId: string | undefined)
|
|
|
60
65
|
*/
|
|
61
66
|
export declare function warmSessionDirectory(client: unknown, sessionId: string | undefined, fallbackDirectory: string): void;
|
|
62
67
|
export declare function verifySessionDirectory(client: unknown, sessionId: string): Promise<string | null>;
|
|
68
|
+
/** Forget directory snapshots when the host moves or removes a session. */
|
|
69
|
+
export declare function clearSessionDirectory(sessionId: string): void;
|
|
63
70
|
/** Release transport routes on deletion without querying a session the host has already removed. */
|
|
64
71
|
export declare function closeDeletedSessionRoutes(pool: AftTransportPool, sessionId: string, fallbackDirectory: string): Promise<void>;
|
|
65
72
|
/** Test-only: clear the cache between unit tests. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-directory.d.ts","sourceRoot":"","sources":["../../src/shared/session-directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"session-directory.d.ts","sourceRoot":"","sources":["../../src/shared/session-directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAsD9D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,OAAQ,CAAC;AACvC,eAAO,MAAM,4BAA4B,OAAoB,CAAC;AAC9D,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,QAAS,CAAC;AA0B7C;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqBxB;AAED,qEAAqE;AACrE,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CASxB;AAED,sGAAsG;AACtG,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,OAAO,GACrB,MAAM,GAAG,IAAI,CA0Bf;AAgJD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,IAAI,GAAG,SAAS,CAS3B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,iBAAiB,EAAE,MAAM,GACxB,IAAI,CAIN;AAqBD,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB;AA2CD,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAI7D;AAED,oGAAoG;AACpG,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,gBAAgB,EACtB,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,qDAAqD;AACrD,wBAAgB,kCAAkC,IAAI,IAAI,CAMzD"}
|
package/dist/shared/status.d.ts
CHANGED
|
@@ -38,11 +38,7 @@ export interface StatusBar {
|
|
|
38
38
|
disabled_categories?: string[];
|
|
39
39
|
errors?: number;
|
|
40
40
|
warnings?: number;
|
|
41
|
-
dead_code?: number;
|
|
42
|
-
unused_exports?: number;
|
|
43
|
-
duplicates?: number;
|
|
44
41
|
todos?: number;
|
|
45
|
-
tier2_stale?: boolean;
|
|
46
42
|
/**
|
|
47
43
|
* `no_language_server` means no server is running. `producer_missing`
|
|
48
44
|
* masks both counts when an expected project producer has failed, even if
|
|
@@ -129,12 +125,12 @@ export interface AftStatusSnapshot {
|
|
|
129
125
|
};
|
|
130
126
|
storage_dir: string | null;
|
|
131
127
|
/** Total checkpoints across all sessions sharing this bridge. */
|
|
132
|
-
checkpoints_total: number;
|
|
128
|
+
checkpoints_total: number | null;
|
|
133
129
|
/** Current session's own slice of undo/checkpoint state. */
|
|
134
130
|
session: {
|
|
135
131
|
id: string;
|
|
136
132
|
tracked_files: number;
|
|
137
|
-
checkpoints: number;
|
|
133
|
+
checkpoints: number | null;
|
|
138
134
|
};
|
|
139
135
|
/** Compression aggregate passthrough; rendering is added separately. */
|
|
140
136
|
compression?: StatusCompression;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/shared/status.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,KAAK,uBAAuB,EAC5B,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,OAAO,EAAE,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,uBAAuB,EAAE,CAAC;AAE5F;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,IAAI,CACZ,iBAAiB,CAAC,gBAAgB,CAAC,EACnC,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,GAAG,gBAAgB,CAC3E,GACA,MAAM,CAMR;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,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AAC,EAAE,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAqGD,6GAA6G;AAC7G,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQzD;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAK7E;AAED,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAajD;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,iBAAiB,CAoGpF;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CA8F3E;AASD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG;IAChE,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,IAAI,EAAE,OAAO,CAAC;CACf,CAKA;AAeD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAiGtE"}
|
|
@@ -42,9 +42,10 @@ export declare function buildSubcToolSchemasJson(): string;
|
|
|
42
42
|
export declare const SUBC_BARE_TOOL_NAMES: readonly SubcBareToolName[];
|
|
43
43
|
/**
|
|
44
44
|
* Tool schemas the module catalog's `worker` preset serves in place of the
|
|
45
|
-
* base ones, plus the tools only that preset serves. The `
|
|
46
|
-
*
|
|
47
|
-
*
|
|
45
|
+
* base ones, plus the tools only that preset serves. The `reader` preset only
|
|
46
|
+
* narrows the tool list, so it needs no entries here, and the `head` preset is
|
|
47
|
+
* the base artifact unchanged except for a runner head (a head whose catalog
|
|
48
|
+
* request names its model), which is also served `head.bash_watch`.
|
|
48
49
|
*
|
|
49
50
|
* A worker is a delegated session: once its turn ends it has delivered its
|
|
50
51
|
* result, and nothing (no completion reminder, no async notification) wakes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subc-tool-schemas.d.ts","sourceRoot":"","sources":["../src/subc-tool-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"subc-tool-schemas.d.ts","sourceRoot":"","sources":["../src/subc-tool-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAoBhD,QAAA,MAAM,eAAe,kRAyBX,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,UAAQ,GAAG,aAAa,CAgB1E;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AA2C1D;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,UAAQ,EAClB,aAAa,UAAQ,GACpB,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAoInD;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAajG;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAED,eAAO,MAAM,oBAAoB,EAAE,SAAS,gBAAgB,EAAoB,CAAC;AAEjF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,UAAQ,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAuCzD;AA+DD,2FAA2F;AAC3F,wBAAgB,wBAAwB,IAAI,MAAM,CASjD;AAED,qFAAqF;AACrF,wBAAgB,8BAA8B,IAAI,MAAM,CASvD;AAED,8DAA8D;AAC9D,eAAO,MAAM,wBAAwB,sCAAuC,CAAC;AAE7E;;;;GAIG;AACH,wBAAgB,gCAAgC,IAAI,MAAM,CAKzD"}
|
|
@@ -62,7 +62,7 @@ export declare function buildAftToolDefinitions(ctx: PluginContext, config: AftC
|
|
|
62
62
|
/** Backward-compatible V1 name for the shared definition inventory. */
|
|
63
63
|
export declare function buildOpenCodeToolMap(ctx: PluginContext, config: AftConfig, onUnknownDisabled?: (names: readonly string[]) => void): Record<string, ToolDefinition>;
|
|
64
64
|
/**
|
|
65
|
-
* Register the shared
|
|
65
|
+
* Register the shared inventory directly, with read-only copies in Code Mode.
|
|
66
66
|
*
|
|
67
67
|
* `definitions` is keyed by AFT tool name; each tool is registered under its
|
|
68
68
|
* OpenCode 2 name (`bash` as `shell`, `apply_patch` as `patch`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registration.d.ts","sourceRoot":"","sources":["../src/tool-registration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,aAAa,CAAC;AAKvF,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAC;AASnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-registration.d.ts","sourceRoot":"","sources":["../src/tool-registration.ts"],"names":[],"mappings":"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,EAAE,aAAa,EAClB,MAAM,EAAE,SAAS,EACjB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,GACrD,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAwBhC;AAkCD,uEAAuE;AACvE,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,SAAS,EACjB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,GACrD,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAEhC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,yBAAyB,EAClC,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,EACrD,SAAS,GAAE,eAAoB,GAC9B,OAAO,CA8BT"}
|
package/dist/tools/_shared.d.ts
CHANGED
|
@@ -61,8 +61,8 @@ export interface ToolRuntime {
|
|
|
61
61
|
sessionID?: string;
|
|
62
62
|
/**
|
|
63
63
|
* True when `directory` is the directory the host placed this session in, so
|
|
64
|
-
* it, not `worktree
|
|
65
|
-
*
|
|
64
|
+
* it, not `worktree` or a cached session directory, is the root to use.
|
|
65
|
+
* OpenCode 2 sets this: its `directory` is the session's Location
|
|
66
66
|
* directory, while its `worktree` is the project's main checkout, which is
|
|
67
67
|
* the wrong root for a session in a linked git worktree (issue #387).
|
|
68
68
|
* OpenCode 1 leaves it unset because its `directory` can be the launch cwd
|
|
@@ -78,23 +78,17 @@ export interface ToolRuntime {
|
|
|
78
78
|
/**
|
|
79
79
|
* Resolve the canonical project root for a runtime.
|
|
80
80
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* CLI use, older hosts). Normalizes trailing slashes and resolves symlinks
|
|
84
|
-
* so `/repo` and `/repo/` and `/Users/.../repo -> /Volumes/...` collapse to
|
|
85
|
-
* the same key.
|
|
81
|
+
* Normalizes trailing slashes and resolves symlinks so `/repo` and `/repo/`
|
|
82
|
+
* and `/Users/.../repo -> /Volumes/...` collapse to the same key.
|
|
86
83
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* session's actual project directory.
|
|
84
|
+
* OpenCode 2's per-call `directory` is the session's current Location, so it
|
|
85
|
+
* wins over the cache after a session move. Only a call without a directory
|
|
86
|
+
* falls back to the cache. Its `worktree` is the main checkout, which is the
|
|
87
|
+
* wrong root for a session in a linked git worktree.
|
|
92
88
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* wrong answer (issue #387). `worktree` keeps that meaning for the permission
|
|
97
|
-
* checks that treat the main checkout as part of the project.
|
|
89
|
+
* OpenCode 1 still prefers the cached session directory: its `ctx.directory`
|
|
90
|
+
* can be the launch cwd rather than the resumed session's project. Without
|
|
91
|
+
* a cache entry it prefers `worktree`, then `directory`.
|
|
98
92
|
*/
|
|
99
93
|
export declare function projectRootFor(runtime: ToolRuntime): string;
|
|
100
94
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACf,MAAM,uBAAuB,CAAC;AAa/B,OAAO,EAAE,KAAK,WAAW,EAAQ,MAAM,qBAAqB,CAAC;AAO7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,GACR,CAAC;AAOhD,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAIhD,OAAO,EACL,iBAA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AE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA+DlC;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACrC,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,cAAc,CAAC,CAgEzB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACpC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAUlC"}
|
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,
|
|
1
|
+
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AAAA,OAAO,EAqBL,KAAK,eAAe,EAIrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,iCAAiC,6FAC8C,CAAC;AAyK7F;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,EAC/B,SAAS,EAAE,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GACnE,OAAO,CAET;AAuCD;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CACjC,mBAAmB,EAAE,OAAO,EAC5B,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,OAAO,EACrB,mBAAmB,UAAO,EAC1B,WAAW,UAAO,EAClB,mBAAmB,UAAO,EAC1B,OAAO,GAAE,sBAA2B,GACnC,MAAM,CA8BR;AAoDD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,OAAO,CAE7E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,OAAO,EACrB,IAAI,GAAE,eAA2B,GAChC,MAAM,CASR;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,aAAa,EAClB,2BAA2B,CAAC,EAAE,OAAO,GACpC,cAAc,CA+YhB;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA+DvE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA+BrE"}
|
|
@@ -29,10 +29,13 @@ type BashStatusWithWait = Record<string, unknown> & {
|
|
|
29
29
|
* `primary` wording, which covers both roles. The subc module catalog's
|
|
30
30
|
* `worker` preset uses the `worker` wording: a delegated worker is never woken
|
|
31
31
|
* by a completion reminder or an async notification once its turn ends, so it
|
|
32
|
-
* is told only how to wait.
|
|
33
|
-
*
|
|
32
|
+
* is told only how to wait. A runner head's catalog uses the `primary` wording
|
|
33
|
+
* without its async-watch sentences (`asyncWatches` false). The polling warning
|
|
34
|
+
* names bash_status only when the model can call it.
|
|
34
35
|
*/
|
|
35
|
-
export declare function bashWatchDescription(role: WatchCallerRole, statusRegistered: boolean): string;
|
|
36
|
+
export declare function bashWatchDescription(role: WatchCallerRole, statusRegistered: boolean, asyncWatches?: boolean): string;
|
|
37
|
+
/** The `pattern` argument's sentence about the sync and async watch modes. */
|
|
38
|
+
export declare const WATCH_PATTERN_MODES_SENTENCE = " Optional in sync mode; required with background:true.";
|
|
36
39
|
export declare function createBashWatchTool(ctx: PluginContext): ToolDefinition;
|
|
37
40
|
export declare function waitForBashStatus(ctx: PluginContext, runtime: ToolContext, taskId: string, outputMode: string | undefined, waitFor: BashWaitPattern | undefined, effectiveWaitMs: number | undefined, role: WatchCallerRole): Promise<BashStatusWithWait>;
|
|
38
41
|
export declare function parseWaitPattern(value: unknown): BashWaitPattern | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash_watch.d.ts","sourceRoot":"","sources":["../../src/tools/bash_watch.ts"],"names":[],"mappings":"AAAA,OAAO,EAkBL,KAAK,eAAe,EAOrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAavE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAsBjD,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,cAAc,GAAG,aAAa,GAAG,SAAS,CAAC;IACtF,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAA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,CAClC,IAAI,EAAE,eAAe,EACrB,gBAAgB,EAAE,OAAO,EACzB,YAAY,UAAO,GAClB,MAAM,CAOR;AAED,8EAA8E;AAC9E,eAAO,MAAM,4BAA4B,2DACiB,CAAC;AAE3D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CAsJtE;AA4KD,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,kBAAkB,CAAC,CAyM7B;AAkDD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAI5E;AAgMD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAEvD"}
|
|
@@ -60,10 +60,35 @@ export interface V2ProviderTool {
|
|
|
60
60
|
description: string;
|
|
61
61
|
input: ReturnType<typeof tool.schema.object> & Pick<ZodType, "~standard">;
|
|
62
62
|
options: Readonly<Record<string, unknown>> & {
|
|
63
|
-
codemode:
|
|
63
|
+
codemode: boolean;
|
|
64
64
|
};
|
|
65
65
|
execute(input: Record<string, unknown>, context: V2ExecutionContext): Effect.Effect<Record<string, unknown>, unknown>;
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Report AFT's shell permission refusal as the host's own permission failure,
|
|
69
|
+
* so OpenCode 2 files it as `permission.rejected` rather than `tool.execution`.
|
|
70
|
+
*
|
|
71
|
+
* When a deny rule matches, or the person rejects the prompt with feedback,
|
|
72
|
+
* the host's `permission.assert` fails with a `Tool.Error` whose `error` is the
|
|
73
|
+
* host's `Permission.BlockedError` or `Permission.CorrectedError`. The host
|
|
74
|
+
* classifies a failed tool call by the error the tool fails with: a
|
|
75
|
+
* `Tool.Error` holding one of those permission errors becomes
|
|
76
|
+
* `permission.rejected`, and the model is shown the inner error's text (the
|
|
77
|
+
* blocked error's `message`, which is its `reason` when set, or the
|
|
78
|
+
* correction's `feedback`). Every other failure becomes `tool.execution`.
|
|
79
|
+
* See `toSessionError` in @opencode/core 2.0.29 and 2.1.0
|
|
80
|
+
* (`src/session/to-session-error.ts`) and the plugin `permission.assert`
|
|
81
|
+
* adapter (`src/plugin/host.ts`).
|
|
82
|
+
*
|
|
83
|
+
* The bash permission loop wraps the host's failure in a
|
|
84
|
+
* `BashPermissionLoopError` carrying AFT's refusal text, which loses that
|
|
85
|
+
* classification. The plugin API exports no permission error classes, so the
|
|
86
|
+
* replacement errors are built with the constructors of the errors the host
|
|
87
|
+
* failed with, and carry AFT's text in the field the host shows the model.
|
|
88
|
+
* If the host's errors do not have exactly that shape, the original error is
|
|
89
|
+
* returned: the model sees the same text, filed as a tool execution failure.
|
|
90
|
+
*/
|
|
91
|
+
export declare function hostPermissionRefusal(error: unknown): unknown;
|
|
67
92
|
/**
|
|
68
93
|
* Project one shared V1 definition into the V2 provider-tool contract.
|
|
69
94
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/v2.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/v2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KA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,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CA+C7D;AAuOD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,cAAc,EAC1B,QAAQ,EAAE,UAAU,EACpB,SAAS,GAAE,eAAoB,GAC9B,cAAc,CAkGhB;AAED,wFAAwF;AACxF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,GAAG,MAAM,CAwBhG"}
|
package/dist/tools/inspect.d.ts
CHANGED
|
@@ -46,20 +46,5 @@ export interface InspectToolConfig {
|
|
|
46
46
|
* registration predicate.
|
|
47
47
|
*/
|
|
48
48
|
export declare function shouldRegisterInspectTool(config: InspectToolConfig): boolean;
|
|
49
|
-
type TimerHandle = ReturnType<typeof setTimeout>;
|
|
50
|
-
export interface InspectTier2IdleSchedulerOptions {
|
|
51
|
-
isEnabled: () => boolean;
|
|
52
|
-
idleMinutes: () => number | undefined;
|
|
53
|
-
run: (sessionID: string) => Promise<void>;
|
|
54
|
-
warn?: (message: string) => void;
|
|
55
|
-
setTimer?: (callback: () => void, delayMs: number) => TimerHandle;
|
|
56
|
-
clearTimer?: (timer: TimerHandle) => void;
|
|
57
|
-
}
|
|
58
|
-
export declare function createInspectTier2IdleScheduler(options: InspectTier2IdleSchedulerOptions): {
|
|
59
|
-
schedule: (sessionID: string) => void;
|
|
60
|
-
clear: (sessionID: string) => void;
|
|
61
|
-
clearAll: () => void;
|
|
62
|
-
};
|
|
63
49
|
export declare function inspectTools(ctx: PluginContext): Record<string, ToolDefinition>;
|
|
64
|
-
export {};
|
|
65
50
|
//# sourceMappingURL=inspect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/tools/inspect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,KAAK,EAA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,CAE5E;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAmE/E"}
|
|
@@ -10,7 +10,7 @@ export interface AftTuiPrefs {
|
|
|
10
10
|
rememberCollapsed: boolean;
|
|
11
11
|
collapsed: boolean | null;
|
|
12
12
|
/**
|
|
13
|
-
* Whether OpenCode 2 shows AFT's health line (`AFT E0 W0 |
|
|
13
|
+
* Whether OpenCode 2 shows AFT's health line (`AFT E0 W0 | T0`)
|
|
14
14
|
* in the prompt footer. Off hides it entirely; the sidebar and the status
|
|
15
15
|
* dialog are unaffected.
|
|
16
16
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-sidebar.d.ts","sourceRoot":"","sources":["../../src/tui/shared-sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,aAAa,MAAM,6BAA6B,CAAC;AAYlE,eAAO,MAAM,YAAY,mCAAuB,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC"}
|
package/dist/tui/v2-status.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ import { type AftStatusSnapshot } from "../shared/status";
|
|
|
3
3
|
* The V2 footer segment. "AFT starting…" is only true before the bridge has
|
|
4
4
|
* delivered a real snapshot. After that the footer shows every health category
|
|
5
5
|
* that has a value and `?` for any that does not, because a producer that is
|
|
6
|
-
* unavailable (for example
|
|
7
|
-
*
|
|
6
|
+
* unavailable (for example no language server) can leave the complete
|
|
7
|
+
* `status_bar` missing for the whole session. Dead code, unused exports and
|
|
8
|
+
* duplicates are not shown: they are computed only by aft_inspect.
|
|
8
9
|
*/
|
|
9
10
|
export declare function formatAftStatusSegment(status: AftStatusSnapshot | null): string;
|
|
10
11
|
export type AftSidebarSummary = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-status.d.ts","sourceRoot":"","sources":["../../src/tui/v2-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAwC,MAAM,kBAAkB,CAAC;AAyBhG
|
|
1
|
+
{"version":3,"file":"v2-status.d.ts","sourceRoot":"","sources":["../../src/tui/v2-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAwC,MAAM,kBAAkB,CAAC;AAyBhG;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,MAAM,CAO/E;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAMF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,iBAAiB,CAsBvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-session-lifecycle.d.ts","sourceRoot":"","sources":["../src/v2-session-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAU,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"v2-session-lifecycle.d.ts","sourceRoot":"","sources":["../src/v2-session-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAU,MAAM,QAAQ,CAAC;AAW/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAWhD,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAQxE;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAEf;AAiBD;;;GAGG;AACH,wBAAgB,gBAAgB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CHANGED
|
@@ -23,11 +23,7 @@ export interface WorkflowHintsOpts {
|
|
|
23
23
|
export declare function hashlineTagSourceHint(bashRewritesMintTags: boolean, isRegistered?: (toolName: string) => boolean): string;
|
|
24
24
|
/** The hashline hint for a session whose bash rewrites `cat`/`head`/`tail`. */
|
|
25
25
|
export declare const HASHLINE_TAG_SOURCE_HINT: string;
|
|
26
|
-
/**
|
|
27
|
-
* Build the workflow hints block. Returns `null` when no hints are
|
|
28
|
-
* applicable for the configured surface (e.g. `tool_surface: "minimal"`
|
|
29
|
-
* with no aft_outline/aft_zoom available — only safety tool is registered).
|
|
30
|
-
*/
|
|
26
|
+
/** Build guidance only for the tools and bash features available in this session. */
|
|
31
27
|
export declare function buildWorkflowHints(opts: WorkflowHintsOpts): string | null;
|
|
32
28
|
/**
|
|
33
29
|
* Resolve workflow-hints opts from a loaded AftConfig and the active
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-hints.d.ts","sourceRoot":"","sources":["../src/workflow-hints.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,aAAa,CAAC;AAGhE,MAAM,WAAW,iBAAiB;IAChC,2DAA2D;IAC3D,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sCAAsC;IACtC,sBAAsB,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iDAAiD;IACjD,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,OAAO,EAC7B,YAAY,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAoB,GACvD,MAAM,CAER;AAED,+EAA+E;AAC/E,eAAO,MAAM,wBAAwB,QAA8B,CAAC;AAEpE
|
|
1
|
+
{"version":3,"file":"workflow-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 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft-opencode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "OpenCode plugin for Agent
|
|
5
|
+
"description": "OpenCode plugin for Agent Foundational Toolkit (AFT) — tree-sitter and lsp powered code analysis",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"license": "MIT",
|
|
@@ -26,22 +26,24 @@
|
|
|
26
26
|
"build": "bun build src/index.ts src/entry/server.mjs --outdir dist --target node --format esm --external effect && tsc --emitDeclarationOnly && bun run build:tui",
|
|
27
27
|
"typecheck": "tsc --noEmit && tsc -p tsconfig.scripts.json",
|
|
28
28
|
"pretest": "node -e \"if (process.env.CI !== 'true') { const { spawnSync } = require('node:child_process'); const result = spawnSync('cargo', ['build'], { cwd: '../..', stdio: 'inherit', shell: process.platform === 'win32' }); process.exit(result.status ?? 1); } else { console.log('Skipping cargo build in CI; workflow builds agent-file-tools before tests.'); }\"",
|
|
29
|
-
"test": "bun test",
|
|
29
|
+
"test": "bun run build:tui && bun test",
|
|
30
30
|
"test:e2e": "bun test src/__tests__/e2e/",
|
|
31
31
|
"test:load-matrix": "bun test ./test/load-matrix/load-matrix.ts",
|
|
32
32
|
"lint": "biome check src",
|
|
33
33
|
"schema": "bun scripts/build-schema.ts",
|
|
34
34
|
"build:tool-schemas": "bun run scripts/build-tool-schemas.ts",
|
|
35
35
|
"prepublishOnly": "bun run build",
|
|
36
|
+
"pretest:unit": "bun run build:tui",
|
|
36
37
|
"test:unit": "bun test src/__tests__ ./test/ ./__tests__/ --path-ignore-patterns 'src/__tests__/e2e/**'",
|
|
37
38
|
"build:tui": "bun scripts/build-tui.ts",
|
|
38
39
|
"smoke:tui": "bun test ./scripts/smoke-tui-pack-install.ts"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"@clack/prompts": "^1.6.0",
|
|
42
|
-
"@cortexkit/aft-bridge": "0.
|
|
43
|
-
"@
|
|
44
|
-
"@opentui/
|
|
43
|
+
"@cortexkit/aft-bridge": "0.65.0",
|
|
44
|
+
"@cortexkit/opencode-sidebar": "0.3.0",
|
|
45
|
+
"@opentui/core": "0.4.5",
|
|
46
|
+
"@opentui/solid": "0.4.5",
|
|
45
47
|
"comment-json": "^4.6.2",
|
|
46
48
|
"effect": "4.0.1",
|
|
47
49
|
"solid-js": "1.9.12",
|
|
@@ -49,12 +51,12 @@
|
|
|
49
51
|
"zod": "^4.4.3"
|
|
50
52
|
},
|
|
51
53
|
"optionalDependencies": {
|
|
52
|
-
"@cortexkit/aft-darwin-arm64": "0.
|
|
53
|
-
"@cortexkit/aft-darwin-x64": "0.
|
|
54
|
-
"@cortexkit/aft-linux-arm64": "0.
|
|
55
|
-
"@cortexkit/aft-linux-x64": "0.
|
|
56
|
-
"@cortexkit/aft-win32-arm64": "0.
|
|
57
|
-
"@cortexkit/aft-win32-x64": "0.
|
|
54
|
+
"@cortexkit/aft-darwin-arm64": "0.65.0",
|
|
55
|
+
"@cortexkit/aft-darwin-x64": "0.65.0",
|
|
56
|
+
"@cortexkit/aft-linux-arm64": "0.65.0",
|
|
57
|
+
"@cortexkit/aft-linux-x64": "0.65.0",
|
|
58
|
+
"@cortexkit/aft-win32-arm64": "0.65.0",
|
|
59
|
+
"@cortexkit/aft-win32-x64": "0.65.0"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
60
62
|
"@opencode-ai/plugin": "^1.17.11",
|