@cortexkit/aft-opencode 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.
Files changed (70) hide show
  1. package/dist/bash-wait-detach.d.ts +17 -5
  2. package/dist/bash-wait-detach.d.ts.map +1 -1
  3. package/dist/bg-notifications.d.ts +5 -0
  4. package/dist/bg-notifications.d.ts.map +1 -1
  5. package/dist/bridge-bootstrap.d.ts +7 -5
  6. package/dist/bridge-bootstrap.d.ts.map +1 -1
  7. package/dist/config-live-reload.d.ts +8 -10
  8. package/dist/config-live-reload.d.ts.map +1 -1
  9. package/dist/config.d.ts +24 -19
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/entry/server.js +25133 -25815
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +24767 -22902
  14. package/dist/lsp-auto-install.d.ts.map +1 -1
  15. package/dist/lsp-github-install.d.ts +5 -117
  16. package/dist/lsp-github-install.d.ts.map +1 -1
  17. package/dist/permissions/v2.d.ts +9 -158
  18. package/dist/permissions/v2.d.ts.map +1 -1
  19. package/dist/shared/status.d.ts +9 -4
  20. package/dist/shared/status.d.ts.map +1 -1
  21. package/dist/subc-tool-schemas.d.ts +1 -1
  22. package/dist/tool-registration.d.ts +3 -0
  23. package/dist/tool-registration.d.ts.map +1 -1
  24. package/dist/tools/_shared.d.ts +4 -5
  25. package/dist/tools/_shared.d.ts.map +1 -1
  26. package/dist/tools/ast.d.ts.map +1 -1
  27. package/dist/tools/bash.d.ts.map +1 -1
  28. package/dist/tools/bash_watch.d.ts.map +1 -1
  29. package/dist/tools/definitions/v2.d.ts +13 -3
  30. package/dist/tools/definitions/v2.d.ts.map +1 -1
  31. package/dist/tools/hoisted/v2.d.ts +3 -17
  32. package/dist/tools/hoisted/v2.d.ts.map +1 -1
  33. package/dist/tools/hoisted.d.ts.map +1 -1
  34. package/dist/tools/inspect.d.ts.map +1 -1
  35. package/dist/tools/navigation.d.ts.map +1 -1
  36. package/dist/tools/permissions.d.ts +2 -0
  37. package/dist/tools/permissions.d.ts.map +1 -1
  38. package/dist/tools/reading.d.ts.map +1 -1
  39. package/dist/tools/safety.d.ts.map +1 -1
  40. package/dist/tools/search.d.ts.map +1 -1
  41. package/dist/tui/v2-status.d.ts.map +1 -1
  42. package/dist/types.d.ts +7 -1
  43. package/dist/types.d.ts.map +1 -1
  44. package/dist/v2-host-tool-names.d.ts +43 -0
  45. package/dist/v2-host-tool-names.d.ts.map +1 -0
  46. package/dist/v2-prompt-detach.d.ts +6 -1
  47. package/dist/v2-prompt-detach.d.ts.map +1 -1
  48. package/dist/v2-session-lifecycle.d.ts +22 -0
  49. package/dist/v2-session-lifecycle.d.ts.map +1 -0
  50. package/dist/v2-tool-hooks.d.ts +14 -2
  51. package/dist/v2-tool-hooks.d.ts.map +1 -1
  52. package/dist/wakes/runtime-consumer.d.ts +6 -1
  53. package/dist/wakes/runtime-consumer.d.ts.map +1 -1
  54. package/dist/wakes/session-delivery.d.ts +12 -7
  55. package/dist/wakes/session-delivery.d.ts.map +1 -1
  56. package/package.json +20 -12
  57. package/src/entry/server-runtime.mjs +32 -18
  58. package/src/shared/status.ts +25 -4
  59. package/src/tui/v2-status.ts +1 -0
  60. package/src/tui/v2.tsx +7 -4
  61. package/src/tui-compiled/v2-status.ts +1 -0
  62. package/src/tui-compiled/v2.tsx +7 -4
  63. package/dist/lsp-github-probe.d.ts +0 -81
  64. package/dist/lsp-github-probe.d.ts.map +0 -1
  65. package/dist/lsp-github-table.d.ts +0 -55
  66. package/dist/lsp-github-table.d.ts.map +0 -1
  67. package/dist/permissions/v2-service.d.ts +0 -135
  68. package/dist/permissions/v2-service.d.ts.map +0 -1
  69. package/dist/v2-host-tool-overlap.d.ts +0 -66
  70. package/dist/v2-host-tool-overlap.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;;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ChF,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,118 +1,6 @@
1
- /**
2
- * GitHub-release auto-installer for LSP servers (Pattern C).
3
- *
4
- * Cache layout under `<aft-cache-root>/lsp-binaries/`:
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
- /**
110
- * Test-only re-export of the GitHub download URL allowlist guard.
111
- *
112
- * The `__test` prefix marks this as test-internal. Production code
113
- * inside this module already calls `assertAllowedDownloadUrl` at the top
114
- * of `downloadFile`. We expose it here so the test suite can verify the
115
- * allowlist independently of full network mocking.
116
- */
117
- 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;
118
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAgDH,OAAO,EACL,KAAK,IAAI,EACT,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,uBAAuB,CAAC;AAyG/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,EAA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,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,163 +1,14 @@
1
- import { Effect } from "effect";
1
+ import type { PermissionDomain } from "@opencode/plugin/effect/permission";
2
2
  import type { V2ExecutionContext, V2PermissionRequest } from "../tools/definitions/v2.js";
3
- import type { V2PromptChannel } from "./v2-service.js";
4
- export type V2PermissionEffect = "allow" | "deny" | "ask";
5
- /** One ordered `{action, resource, effect}` entry of an OpenCode permission ruleset. */
6
- export interface V2PermissionRule {
7
- readonly action: string;
8
- readonly resource: string;
9
- readonly effect: V2PermissionEffect;
3
+ /** Rejecting a prompt without feedback ends the model's current step, not just the tool call. */
4
+ export declare class PermissionStepAbort extends Error {
5
+ readonly original: unknown;
6
+ constructor(original: unknown);
10
7
  }
11
- export interface V2AgentRecord {
12
- readonly permissions?: readonly V2PermissionRule[];
13
- }
14
- export interface V2SessionRecord {
15
- readonly agent?: string;
16
- readonly permissions?: readonly V2PermissionRule[];
17
- }
18
- /**
19
- * The two plugin domains AFT reads to learn the host's configured answer.
20
- *
21
- * OpenCode 2 hands a plugin `agent` and `session` domains whose records carry
22
- * the same ordered permission rulesets the host itself evaluates, so a tool can
23
- * resolve "allow", "deny", or "ask" without a round trip to the user.
24
- */
8
+ /** The host evaluates rules and hooks before prompting only when approval is required. */
25
9
  export interface V2PermissionHostContext {
26
- readonly agent: {
27
- get(input: {
28
- agentID: string;
29
- }): Effect.Effect<{
30
- data: V2AgentRecord;
31
- }, unknown>;
32
- };
33
- readonly session: {
34
- get(input: {
35
- sessionID: string;
36
- }): Effect.Effect<V2SessionRecord | undefined, unknown>;
37
- };
38
- }
39
- export type V2PermissionReply = "once" | "always" | "reject";
40
- export interface V2PermissionCreateInput {
41
- sessionID: string;
42
- action: string;
43
- resources: string[];
44
- save: string[];
45
- metadata: Record<string, unknown>;
46
- source: {
47
- type: "tool";
48
- messageID: string;
49
- id: string;
50
- };
51
- }
52
- interface V2PermissionCreateResult {
53
- id: string;
54
- effect: V2PermissionEffect;
55
- }
56
- interface V2EventSubscription {
57
- stream: AsyncIterable<unknown>;
58
- }
59
- /** The two service calls a permission prompt needs, in the shape AFT sends them. */
60
- export interface V2PermissionClient {
61
- permission: {
62
- create(input: V2PermissionCreateInput): Promise<V2PermissionCreateResult | {
63
- data?: V2PermissionCreateResult;
64
- error?: unknown;
65
- }>;
66
- };
67
- event: {
68
- subscribe(): Promise<V2EventSubscription>;
69
- };
70
- }
71
- export declare class PermissionDeniedError extends Error {
72
- readonly name = "PermissionDeniedError";
73
- }
74
- export declare class PermissionRejectedError extends Error {
75
- readonly name = "PermissionRejectedError";
76
- }
77
- /**
78
- * Raised when the rules resolve to "ask" and the service that shows the prompt
79
- * could not be reached.
80
- *
81
- * Deliberately not named like a rule denial: the caller-side classifier rewrites
82
- * recognised denial classes into a generic "denied by rule" sentence, and this
83
- * refusal has to keep its own text because that text names the way out.
84
- */
85
- export declare class PermissionPromptUnavailableError extends Error {
86
- readonly name = "PermissionPromptUnavailableError";
87
- }
88
- /**
89
- * Raised when the prompt was shown and no answer ever came back.
90
- *
91
- * Like the unavailable-prompt refusal this keeps its own text, because that
92
- * text is the only place the user learns that a prompt was raised on their
93
- * behalf and went unanswered. Never an allow: an answer nobody gave is not
94
- * permission.
95
- */
96
- export declare class PermissionPromptUnansweredError extends Error {
97
- readonly name = "PermissionPromptUnansweredError";
98
- }
99
- /** Raised when the host's rules for this call could not be read at all. */
100
- export declare class PermissionRulesUnavailableError extends Error {
101
- readonly name = "PermissionRulesUnavailableError";
102
- }
103
- /**
104
- * How long a raised prompt may stay unanswered before the call is refused.
105
- *
106
- * A prompt is a question for a person, and a person may be away from the
107
- * machine: ten minutes is well beyond the minutes a real answer takes, so an
108
- * answer that is coming still arrives in time. The bound exists for the answer
109
- * that is not coming, which used to hold the tool call open for the life of the
110
- * session.
111
- */
112
- export declare const V2_PROMPT_REPLY_TIMEOUT_MS: number;
113
- /**
114
- * How long AFT waits for its event subscription to start delivering before it
115
- * raises the request anyway.
116
- *
117
- * OpenCode greets a new subscriber immediately, so this is normally over in a
118
- * millisecond or two on a loopback connection. It is a bound rather than an
119
- * unconditional wait so a host that greets nobody cannot stop prompts from
120
- * being raised at all; a request raised without a confirmed subscription is
121
- * still bounded by the reply timeout, and refuses rather than allows.
122
- */
123
- export declare const V2_PROMPT_LISTEN_TIMEOUT_MS = 5000;
124
- export interface V2PermissionDecision {
125
- readonly effect: V2PermissionEffect;
126
- /** The resource that decided the outcome, absent when every resource allowed. */
127
- readonly resource?: string;
128
- /** The rule that decided the outcome, absent when every resource allowed. */
129
- readonly rule?: V2PermissionRule;
130
- }
131
- /**
132
- * Resolve one AFT permission request against a host ruleset.
133
- *
134
- * Mirrors OpenCode's own evaluation: any denied resource denies the whole
135
- * request, otherwise any resource that still wants a prompt makes the request
136
- * an "ask", and only a request whose resources are all allowed is allowed.
137
- *
138
- * One deliberate difference: OpenCode also folds in the user's saved "always"
139
- * grants before the allow/ask split, and those are not readable from a plugin.
140
- * A saved grant therefore reads as "ask" here, which costs one round trip to
141
- * the service: the host applies the grant when the request reaches it and
142
- * answers "allow" without showing anything.
143
- */
144
- export declare function decidePermission(request: V2PermissionRequest, rules: readonly V2PermissionRule[]): V2PermissionDecision;
145
- /** The wait bounds and cancellation one prompt runs under. */
146
- export interface V2PromptLimits {
147
- readonly replyTimeoutMs?: number;
148
- readonly listenTimeoutMs?: number;
149
- /** Ends the wait when the tool call it belongs to is cancelled. */
150
- readonly signal?: AbortSignal;
10
+ readonly permission: Pick<PermissionDomain, "assert">;
151
11
  }
152
- /**
153
- * Answer a V2 tool's permission request.
154
- *
155
- * The host's configured rules are evaluated first, so anything the user has
156
- * already permitted — reading a file inside the project under OpenCode's
157
- * default allow-everything ruleset, for instance — runs with no round trip,
158
- * and a denial fails naming the rule that produced it. Only a rule that asks
159
- * costs a call to the service, which raises the real prompt.
160
- */
161
- export declare function requestPermission(host: V2PermissionHostContext, request: V2PermissionRequest, context: V2ExecutionContext, prompt: V2PromptChannel, limits?: V2PromptLimits): Promise<void>;
162
- export {};
12
+ /** Delegate every decision to OpenCode so permission hooks also see allow and deny. */
13
+ export declare function requestPermission(host: V2PermissionHostContext, request: V2PermissionRequest, context: V2ExecutionContext, signal?: AbortSignal): Promise<void>;
163
14
  //# sourceMappingURL=v2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/permissions/v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAE1D,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACpD;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACpD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE;QACd,GAAG,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SA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AwBf"}
1
+ {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/permissions/v2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAG1F,iGAAiG;AACjG,qBAAa,mBAAoB,SAAQ,KAAK;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO;gBAAjB,QAAQ,EAAE,OAAO;CAGvC;AAED,0FAA0F;AAC1F,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;CACvD;AAaD,uFAAuF;AACvF,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,uBAAuB,EAC7B,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,kBAAkB,EAC3B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CAgCf"}
@@ -44,11 +44,16 @@ export interface StatusBar {
44
44
  todos?: number;
45
45
  tier2_stale?: boolean;
46
46
  /**
47
- * `"no_language_server"` when no language server is running, so errors and
48
- * warnings will not arrive until one starts. Absent while the counts are
49
- * present or a running server has not reported yet.
47
+ * `no_language_server` means no server is running. `producer_missing`
48
+ * masks both counts when an expected project producer has failed, even if
49
+ * another server supplied counts; diagnostics_gaps identifies the failures.
50
50
  */
51
- diagnostics?: "no_language_server";
51
+ diagnostics?: "no_language_server" | "producer_missing";
52
+ diagnostics_gaps?: Array<{
53
+ language: string;
54
+ producer: string;
55
+ root: string;
56
+ }>;
52
57
  }
53
58
  export interface AftStatusSnapshot {
54
59
  version: string;
@@ -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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,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,CAkFpF;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAiG3E;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,CAoGtE"}
@@ -12,7 +12,7 @@ export type SubcBareToolName = (typeof BARE_TOOL_ORDER)[number];
12
12
  * per-directory plugin surface it is ONE contract for every project a subc
13
13
  * consumer may bind. Config-gated arguments therefore have to be declared here
14
14
  * whenever the runtime honours them in any project, or a consumer working in a
15
- * project that does enable the feature could never see it. `sandbox.enabled` is
15
+ * project that does enable the feature could never see it. `sandbox.profile.head` is
16
16
  * exactly that case: it is project-settable one-way hardening, and the subc
17
17
  * bash path reads a passed `sandbox` argument regardless of this manifest.
18
18
  * Remote execution is different: the default artifacts omit it, and a
@@ -64,6 +64,9 @@ export declare function buildOpenCodeToolMap(ctx: PluginContext, config: AftConf
64
64
  /**
65
65
  * Register the shared definition inventory on V2 as direct provider tools.
66
66
  *
67
+ * `definitions` is keyed by AFT tool name; each tool is registered under its
68
+ * OpenCode 2 name (`bash` as `shell`, `apply_patch` as `patch`).
69
+ *
67
70
  * The transform removes only the host tools AFT replaces, does not mutate the
68
71
  * shared V1 definitions, and never calls `update`. Projection runs when the
69
72
  * host reads its tool transform, so the live runon gate is reflected without
@@ -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;AAehD,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE;QACJ,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC;KAC9D,CAAC;CACH;AAED,sFAAsF;AACtF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAEnE;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAEnE;AAED,wFAAwF;AACxF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAMpE;AAED,kFAAkF;AAClF,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,OAAO,CAIT;AAED;;;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AiB,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,CAQT"}
@@ -50,6 +50,8 @@ export { coerceOptionalInt, formatBridgeErrorMessage, isEmptyParam, LONG_RUNNING
50
50
  * they adopt session-aware calls.
51
51
  */
52
52
  export interface ToolRuntime {
53
+ /** Set by the OpenCode 2 adapter; shared OC1 definitions keep their existing policy. */
54
+ hostVersion?: 2;
53
55
  /** Worktree root (preferred); falls back to `directory` when absent. */
54
56
  worktree?: string;
55
57
  /** Agent's working directory for this tool call. */
@@ -116,11 +118,8 @@ export declare function resolvePathArg(ctx: PluginContext, runtime: ToolRuntime,
116
118
  * Get the BinaryBridge for the runtime's project root.
117
119
  *
118
120
  * Prefer `callBridge()` unless you need to send multiple requests yourself.
119
- *
120
- * This is synchronous and uses only the cached session directory. If the
121
- * cache is cold, it falls back to `runtime.directory` — `callBridge()`
122
- * eagerly warms the cache before calling this so the cache is hot for
123
- * subsequent calls in the same session.
121
+ * This synchronous helper uses only the cached session directory;
122
+ * `callBridge()` warms that cache before resolving the request's root.
124
123
  */
125
124
  export declare function bridgeFor(ctx: PluginContext, runtime: ToolRuntime): AftProjectTransport;
126
125
  export declare function callBridge(ctx: PluginContext, runtime: ToolRuntime, command: string, params?: Record<string, unknown>, options?: BridgeRequestOptions): Promise<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"_shared.d.ts","sourceRoot":"","sources":["../../src/tools/_shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EACV,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AAG,mBAAmB,CAEvF;AA2BD,wBAAsB,UAAU,CAC9B,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,CAqDlC;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,CAqCzB;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/tools/ast.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAoDjD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAuH3E"}
1
+ {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/tools/ast.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D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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,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACpC,CAAC;AAUF,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAqBlF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,EAAE,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAM7F;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,CA4HtE;AAuKD,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,CAoK7B;AA6CD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAI5E;AAkGD,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"}
@@ -27,6 +27,7 @@ export interface V2PermissionRequest {
27
27
  metadata: Record<string, unknown>;
28
28
  }
29
29
  export interface V2DefinitionRuntime extends V2ExecutionContext {
30
+ hostVersion: 2;
30
31
  directory: string;
31
32
  /** Always true here; see `ToolRuntime.directoryIsSessionRoot` in `tools/_shared.ts`. */
32
33
  directoryIsSessionRoot: true;
@@ -34,7 +35,8 @@ export interface V2DefinitionRuntime extends V2ExecutionContext {
34
35
  worktree: string;
35
36
  abort: AbortSignal;
36
37
  metadata(update: Record<string, unknown>): void;
37
- ask(request: V2PermissionRequest): Promise<void>;
38
+ /** A child signal can interrupt sibling batch assertions without aborting the whole tool. */
39
+ ask(request: V2PermissionRequest, permissionSignal?: AbortSignal): Promise<void>;
38
40
  }
39
41
  export interface V2BashExecution {
40
42
  name: "bash" | "aft_bash";
@@ -43,10 +45,11 @@ export interface V2BashExecution {
43
45
  definition: ToolDefinition;
44
46
  }
45
47
  export interface V2ToolConsumers {
48
+ onToolAbort?: (sessionID: string) => void;
46
49
  /** A resumed session can discover pending wakes without starting another shell. */
47
50
  registerSession?: (sessionID: string | undefined) => void;
48
51
  /** Maps legacy tool permission requests to the V2 session permission service. */
49
- requestPermission?: (request: V2PermissionRequest, context: V2ExecutionContext) => Promise<void>;
52
+ requestPermission?: (request: V2PermissionRequest, context: V2ExecutionContext, signal?: AbortSignal) => Promise<void>;
50
53
  /** Runs bash through the dedicated V2 executor while preserving the shared schema. */
51
54
  executeBash?: (execution: V2BashExecution) => Promise<ToolResult>;
52
55
  }
@@ -60,7 +63,14 @@ export interface V2ProviderTool {
60
63
  };
61
64
  execute(input: Record<string, unknown>, context: V2ExecutionContext): Effect.Effect<Record<string, unknown>, unknown>;
62
65
  }
63
- /** Project one shared V1 definition into the V2 provider-tool contract. */
66
+ /**
67
+ * Project one shared V1 definition into the V2 provider-tool contract.
68
+ *
69
+ * `name` is the AFT tool name. The projected tool is registered under the
70
+ * OpenCode 2 name (`bash` as `shell`, `apply_patch` as `patch`; see
71
+ * `v2-host-tool-names.ts`) with descriptions that name those tools, while
72
+ * permissions, the bash executor and the engine call keep using `name`.
73
+ */
64
74
  export declare function projectV2Tool(name: string, definition: ToolDefinition, location: V2Location, consumers?: V2ToolConsumers): V2ProviderTool;
65
75
  /** Serialize provider-specific JSON envelopes for deterministic fixture comparisons. */
66
76
  export declare function providerDefinitionBytes(provider: V2Provider, definition: V2ProviderTool): string;
@@ -1 +1 @@
1
- {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../../src/tools/definitions/v2.ts"],"names":[],"mappings":"AAAA,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;AAkBhC,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,sBAAsB,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAA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E,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG;QAC3C,QAAQ,EAAE,KAAK,CAAC;KACjB,CAAC;IACF,OAAO,CACL,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;CACpD;AAiRD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,cAAc,EAC1B,QAAQ,EAAE,UAAU,EACpB,SAAS,GAAE,eAAoB,GAC9B,cAAc,CAgEhB;AAED,wFAAwF;AACxF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,GAAG,MAAM,CAwBhG"}
@@ -1,25 +1,11 @@
1
1
  import { type V2PermissionHostContext } from "../../permissions/v2.js";
2
- import { type V2PromptChannel, type V2PromptServerSettings } from "../../permissions/v2-service.js";
3
2
  import type { V2ToolConsumers } from "../definitions/v2.js";
4
3
  export declare const V2_BUILTIN_REPLACEMENTS: readonly ["read", "edit", "write", "apply_patch"];
5
4
  export declare const V2_AFT_FILESYSTEM_TOOLS: readonly ["aft_delete", "aft_move"];
6
5
  export declare const V2_PERMISSION_ASK_INVENTORY: readonly ["read", "edit", "write", "apply_patch", "aft_delete", "aft_move", "bash:withPermissionLoop", "bash:host-fallback"];
7
6
  /**
8
- * Bind shared projected definitions to OpenCode 2's permission service.
9
- *
10
- * The probe looks for the two domains that carry the host's configured rules,
11
- * because those decide every call that needs no prompt; a context missing
12
- * either one is left without an evaluator so every ask-site refuses rather than
13
- * acting unchecked. The prompt channel is created here, once per Location, so
14
- * the client it discovers is shared by that Location's tool calls and is
15
- * dropped with these consumers when the Location scope ends.
7
+ * Bind projected tools to the host's in-process permission engine.
8
+ * Missing capabilities refuse startup instead of leaving gated tools disabled.
16
9
  */
17
- export declare function hoistedV2ToolConsumers(host: V2PermissionHostContext | object, prompt?: V2PromptChannel): V2ToolConsumers;
18
- /**
19
- * The prompt channel for a Location, honoring the user's `opencode` setting.
20
- *
21
- * The setting is the user-tier `opencode` block of the AFT config the Location
22
- * booted with; a project config cannot supply it.
23
- */
24
- export declare function v2PromptChannelFor(settings: V2PromptServerSettings | undefined): V2PromptChannel;
10
+ export declare function hoistedV2ToolConsumers(host: V2PermissionHostContext | object): V2ToolConsumers;
25
11
  //# sourceMappingURL=v2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../../src/tools/hoisted/v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,eAAO,MAAM,uBAAuB,mDAAoD,CAAC;AACzF,eAAO,MAAM,uBAAuB,qCAAsC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,8HAS9B,CAAC;AAQX;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,uBAAuB,GAAG,MAAM,EACtC,MAAM,GAAE,eAAyC,GAChD,eAAe,CAMjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,SAAS,GAAG,eAAe,CAEhG"}
1
+ {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../../src/tools/hoisted/v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK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ACtC,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,WAAW,CAAC;IAClE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC3C;AAED,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,gCAAgC;0BAiB1D,MAAM,KAAG,IAAI;uBAZhB,MAAM,KAAG,IAAI;oBAOlB,IAAI;EAsB1B;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAmE/E"}
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAqBjD;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAwHlF"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAyBjD;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA4HlF"}
@@ -31,6 +31,8 @@ export declare function resolveRelativePattern(context: ToolContext, target: str
31
31
  export declare function resolveRelativePatternFromAbsolute(context: ToolContext, absolutePath: string): string;
32
32
  export declare function resolveRelativePatterns(context: ToolContext, targets: string[]): string[];
33
33
  export declare function workspacePattern(_context: ToolContext): string;
34
+ /** Use native read's project-relative resource and error wording for OC2 source tools. */
35
+ export declare function assertV2ReadPermission(context: ToolContext, targetPath: string): Promise<string | undefined>;
34
36
  export declare function askEditPermission(context: ToolContext, patterns: string[], metadata?: Record<string, unknown>): Promise<string | undefined>;
35
37
  /**
36
38
  * Check if `child` is inside `parent`. Mirrors `AppFileSystem.contains` in