@cortexkit/aft-opencode 0.58.1 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bash-wait-detach.d.ts.map +1 -1
- package/dist/bg-notifications.d.ts +8 -0
- package/dist/bg-notifications.d.ts.map +1 -1
- package/dist/bridge-bootstrap.d.ts +4 -4
- package/dist/config-live-reload.d.ts +44 -8
- package/dist/config-live-reload.d.ts.map +1 -1
- package/dist/config.d.ts +85 -13
- package/dist/config.d.ts.map +1 -1
- package/dist/configure-warnings.d.ts.map +1 -1
- package/dist/entry/server.js +5329 -2607
- package/dist/hashline-tag-sources.d.ts +18 -0
- package/dist/hashline-tag-sources.d.ts.map +1 -0
- package/dist/hooks/auto-update-checker/checker.d.ts.map +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4511 -2373
- package/dist/lsp-auto-install.d.ts +30 -0
- package/dist/lsp-auto-install.d.ts.map +1 -1
- package/dist/lsp-github-install.d.ts +5 -2
- package/dist/lsp-github-install.d.ts.map +1 -1
- package/dist/lsp-github-table.d.ts +4 -3
- package/dist/lsp-github-table.d.ts.map +1 -1
- package/dist/lsp-npm-table.d.ts +10 -0
- package/dist/lsp-npm-table.d.ts.map +1 -1
- package/dist/lsp-registry-probe.d.ts +8 -4
- package/dist/lsp-registry-probe.d.ts.map +1 -1
- package/dist/notifications.d.ts +1 -1
- package/dist/notifications.d.ts.map +1 -1
- package/dist/permissions/v2-service.d.ts +110 -5
- package/dist/permissions/v2-service.d.ts.map +1 -1
- package/dist/rpc/contract.d.ts +1 -1
- package/dist/rpc/contract.d.ts.map +1 -1
- package/dist/rpc/register.d.ts +3 -5
- package/dist/rpc/register.d.ts.map +1 -1
- package/dist/shared/ignored-message.d.ts.map +1 -1
- package/dist/shared/read-vision.d.ts.map +1 -1
- package/dist/shared/rpc-client.d.ts +8 -0
- package/dist/shared/rpc-client.d.ts.map +1 -1
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/session-directory.d.ts +9 -0
- package/dist/shared/session-directory.d.ts.map +1 -1
- package/dist/shared/status.d.ts +1 -0
- package/dist/shared/status.d.ts.map +1 -1
- package/dist/shared/subagent-detect.d.ts +11 -4
- package/dist/shared/subagent-detect.d.ts.map +1 -1
- package/dist/shared/v2-context.d.ts +3 -0
- package/dist/shared/v2-context.d.ts.map +1 -0
- package/dist/subc-tool-schemas.d.ts +23 -1
- package/dist/subc-tool-schemas.d.ts.map +1 -1
- package/dist/tool-registration.d.ts +11 -8
- package/dist/tool-registration.d.ts.map +1 -1
- package/dist/tools/_shared.d.ts +16 -15
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +41 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash_watch.d.ts +14 -4
- package/dist/tools/bash_watch.d.ts.map +1 -1
- package/dist/tools/bash_write.d.ts.map +1 -1
- package/dist/tools/definitions/v2.d.ts +4 -0
- package/dist/tools/definitions/v2.d.ts.map +1 -1
- package/dist/tools/hoisted/v2.d.ts +8 -1
- package/dist/tools/hoisted/v2.d.ts.map +1 -1
- package/dist/tools/hoisted.d.ts +27 -7
- package/dist/tools/hoisted.d.ts.map +1 -1
- package/dist/tools/inspect.d.ts +10 -1
- package/dist/tools/inspect.d.ts.map +1 -1
- package/dist/tools/permissions.d.ts +2 -1
- package/dist/tools/permissions.d.ts.map +1 -1
- package/dist/tools/reading.d.ts +0 -3
- package/dist/tools/reading.d.ts.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/semantic.d.ts.map +1 -1
- package/dist/tui/aft-rpc.d.ts +14 -0
- package/dist/tui/aft-rpc.d.ts.map +1 -1
- package/dist/tui/v2-status.d.ts.map +1 -1
- package/dist/v2-host-tool-overlap.d.ts +66 -0
- package/dist/v2-host-tool-overlap.d.ts.map +1 -0
- package/dist/v2-prompt-detach.d.ts +70 -0
- package/dist/v2-prompt-detach.d.ts.map +1 -0
- package/dist/v2-tool-hooks.d.ts +6 -0
- package/dist/v2-tool-hooks.d.ts.map +1 -0
- package/dist/v2-workflow-hints.d.ts +4 -0
- package/dist/v2-workflow-hints.d.ts.map +1 -0
- package/dist/wakes/runtime-consumer.d.ts +2 -0
- package/dist/wakes/runtime-consumer.d.ts.map +1 -1
- package/dist/wakes/session-delivery.d.ts +9 -0
- package/dist/wakes/session-delivery.d.ts.map +1 -1
- package/dist/workflow-hints.d.ts +20 -7
- package/dist/workflow-hints.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/entry/server-runtime.mjs +41 -5
- package/src/shared/ignored-message.ts +18 -0
- package/src/shared/read-vision.ts +14 -4
- package/src/shared/rpc-client.ts +46 -5
- package/src/shared/rpc-server.ts +10 -0
- package/src/shared/session-directory.ts +147 -7
- package/src/shared/status.ts +15 -5
- package/src/shared/subagent-detect.ts +89 -28
- package/src/shared/v2-context.ts +7 -0
- package/src/tui/aft-rpc.ts +11 -0
- package/src/tui/index.tsx +20 -16
- package/src/tui/sidebar-view.tsx +9 -1
- package/src/tui/v2-status.ts +7 -5
- package/src/tui/v2.tsx +47 -0
- package/src/tui-compiled/aft-rpc.ts +11 -0
- package/src/tui-compiled/index.tsx +27 -16
- package/src/tui-compiled/sidebar-view.tsx +11 -2
- package/src/tui-compiled/v2-status.ts +7 -5
- package/src/tui-compiled/v2.tsx +26 -0
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
* avoids mid-session bridge restarts.
|
|
29
29
|
*/
|
|
30
30
|
import { type AftTransportPool } from "@cortexkit/aft-bridge";
|
|
31
|
+
import { type NpmServerSpec } from "./lsp-npm-table.js";
|
|
32
|
+
import { type VersionPickResult } from "./lsp-registry-probe.js";
|
|
31
33
|
/** Per-call configuration drawn from `lsp.*` plugin config. */
|
|
32
34
|
export interface AutoInstallConfig {
|
|
33
35
|
/** Master enable. Default: true. */
|
|
@@ -74,6 +76,27 @@ export interface AutoInstallResult {
|
|
|
74
76
|
getCachedBinDirs: () => string[];
|
|
75
77
|
}
|
|
76
78
|
export declare function abortInFlightAutoInstalls(): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Resolve which version to install for `spec`, honoring user pins,
|
|
81
|
+
* cached version checks, and the 7-day grace.
|
|
82
|
+
*
|
|
83
|
+
* Returns the version string to install, or null when:
|
|
84
|
+
* - probe failed and nothing is cached
|
|
85
|
+
* - all candidates are within grace (blockedByGrace)
|
|
86
|
+
*
|
|
87
|
+
* `null` callers should fall back to whatever's installed (if anything),
|
|
88
|
+
* else skip + warn.
|
|
89
|
+
*
|
|
90
|
+
* Apart from a user pin, the result always satisfies the entry's
|
|
91
|
+
* `supportedMajor`: a cached decision outside it is treated as a cache miss.
|
|
92
|
+
* Callers compare the result against the installed version, so a cached
|
|
93
|
+
* install of the wrong major is then replaced.
|
|
94
|
+
*/
|
|
95
|
+
export declare function resolveTargetVersion(spec: NpmServerSpec, config: AutoInstallConfig, fetchImpl?: typeof fetch): Promise<{
|
|
96
|
+
version: string | null;
|
|
97
|
+
pinned: boolean;
|
|
98
|
+
probe: VersionPickResult | null;
|
|
99
|
+
}>;
|
|
77
100
|
/**
|
|
78
101
|
* Spawn `npm install --no-save <pkg>@<version>` in the cache dir.
|
|
79
102
|
*
|
|
@@ -104,6 +127,13 @@ export declare function abortInFlightAutoInstalls(): Promise<void>;
|
|
|
104
127
|
* Idempotent: only writes when absent. Failures are non-fatal (logged).
|
|
105
128
|
*/
|
|
106
129
|
export declare function ensureInstallAnchor(cwd: string): void;
|
|
130
|
+
/**
|
|
131
|
+
* True when the cached install's recorded version is one this entry may use:
|
|
132
|
+
* inside `supportedMajor`, or exactly the user's `lsp.versions` pin. A cached
|
|
133
|
+
* install outside it is neither surfaced to the binary nor kept as a fallback,
|
|
134
|
+
* so the next install replaces it.
|
|
135
|
+
*/
|
|
136
|
+
export declare function installedVersionAllowed(spec: NpmServerSpec, config: AutoInstallConfig): boolean;
|
|
107
137
|
/**
|
|
108
138
|
* Top-level entry point. Returns the list of bin directories that already
|
|
109
139
|
* have an installed binary AND kicks off background installs for missing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-auto-install.d.ts","sourceRoot":"","sources":["../src/lsp-auto-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
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,EAQtB,MAAM,uBAAuB,CAAC;AAgB/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;IAChC,mFAAmF;IACnF,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gDAAgD;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B;;;;;;;OAOG;IACH,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C;;;;;;;;;OASG;IACH,gBAAgB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,MAAM,EAAE,CAAC;CAClC;AAiED,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAM/D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,iBAAiB,EACzB,SAAS,GAAE,OAAO,KAAa,GAC9B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAAE,CAAC,CA6CvF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAYrD;AAsVD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAI/F;AAWD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,iBAAiB,EACzB,SAAS,GAAE,OAAO,KAAa,GAC9B,iBAAiB,CA+EnB;AAED,gFAAgF;AAChF,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,aAAa,CAAC,EACpE,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,SAAS,MAAM,EAAE,GAC/B,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -39,6 +39,8 @@ export interface GithubInstallConfig {
|
|
|
39
39
|
versions: Readonly<Record<string, string>>;
|
|
40
40
|
disabled: ReadonlySet<string>;
|
|
41
41
|
}
|
|
42
|
+
/** Test hook: how many cached-binary hashes this process has computed. */
|
|
43
|
+
export declare function __githubBinaryHashCountForTests(): number;
|
|
42
44
|
declare function assertAllowedDownloadUrl(rawUrl: string): URL;
|
|
43
45
|
declare function downloadFile(url: string, destPath: string, fetchImpl: typeof fetch, assetSize?: number, signal?: AbortSignal): Promise<void>;
|
|
44
46
|
/**
|
|
@@ -69,7 +71,8 @@ export declare function validateExtraction(stagingRoot: string): void;
|
|
|
69
71
|
* 5. Always cleanup staging on any failure.
|
|
70
72
|
*/
|
|
71
73
|
type ZipListingMode = "platform" | "tar";
|
|
72
|
-
export declare function precheckArchiveContents(archivePath: string, archiveType: string, zipListingMode?: ZipListingMode): void
|
|
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>;
|
|
73
76
|
export interface GithubAutoInstallResult {
|
|
74
77
|
cachedBinDirs: string[];
|
|
75
78
|
installsStarted: number;
|
|
@@ -111,5 +114,5 @@ export declare function discoverRelevantGithubServers(projectRoot: string): Set<
|
|
|
111
114
|
* of `downloadFile`. We expose it here so the test suite can verify the
|
|
112
115
|
* allowlist independently of full network mocking.
|
|
113
116
|
*/
|
|
114
|
-
export { type Arch, assertAllowedDownloadUrl as _assertAllowedDownloadUrlForTesting, detectHostPlatform, downloadFile as _downloadFileForTesting, findGithubServerById, GITHUB_LSP_TABLE, type GithubServerSpec, type Platform, precheckArchiveContents as _precheckArchiveSizeForTesting, };
|
|
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, };
|
|
115
118
|
//# 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;;;;;;;;;;;;;;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@ -10,9 +10,10 @@
|
|
|
10
10
|
* NOTE: terraform-ls uses HashiCorp's release API, not GitHub. It's a
|
|
11
11
|
* separate code path; not included in this table.
|
|
12
12
|
*
|
|
13
|
-
* NOTE: oxlint
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* NOTE: install oxlint in the project (`npm install --save-dev oxlint`).
|
|
14
|
+
* AFT resolves `node_modules/.bin/oxlint` and starts it with `--lsp`, or
|
|
15
|
+
* prefers the standalone `oxc_language_server` shipped by older releases.
|
|
16
|
+
* It stays project-managed rather than being downloaded by AFT.
|
|
16
17
|
*
|
|
17
18
|
* NOTE: kotlin-language-server is hosted on JetBrains CDN, not GitHub.
|
|
18
19
|
* Skipped from auto-download for v0.17.0 — users install via Homebrew /
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-github-table.d.ts","sourceRoot":"","sources":["../src/lsp-github-table.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lsp-github-table.d.ts","sourceRoot":"","sources":["../src/lsp-github-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yFAAyF;IACzF,QAAQ,CAAC,YAAY,EAAE,CACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,KACZ;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,IAAI,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3F;AA4HD,eAAO,MAAM,gBAAgB,EAAE,SAAS,gBAAgB,EAMvD,CAAC;AAEF,sCAAsC;AACtC,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE7E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG,IAAI,CAQ9E"}
|
package/dist/lsp-npm-table.d.ts
CHANGED
|
@@ -36,10 +36,20 @@ export interface NpmServerSpec {
|
|
|
36
36
|
* user sees a recurring `lsp_binary_missing` warning.
|
|
37
37
|
*/
|
|
38
38
|
readonly packageJsonDeps?: readonly string[];
|
|
39
|
+
/**
|
|
40
|
+
* Install only releases of this major version. Registry versions and cached
|
|
41
|
+
* version decisions outside it are ignored, and a cached install of another
|
|
42
|
+
* major counts as out of date. Omit it to track the newest release.
|
|
43
|
+
*/
|
|
44
|
+
readonly supportedMajor?: number;
|
|
39
45
|
}
|
|
40
46
|
export declare const NPM_LSP_TABLE: readonly NpmServerSpec[];
|
|
41
47
|
/** Find an entry by AFT server id. */
|
|
42
48
|
export declare function findNpmServerById(id: string): NpmServerSpec | undefined;
|
|
43
49
|
/** Find an entry by binary name. */
|
|
44
50
|
export declare function findNpmServerByBinary(binary: string): NpmServerSpec | undefined;
|
|
51
|
+
/** Leading major version of a version string such as `5.9.3`, or null. */
|
|
52
|
+
export declare function majorVersionOf(version: string): number | null;
|
|
53
|
+
/** True when `version` is a release `spec` may install or keep. */
|
|
54
|
+
export declare function isVersionSupported(spec: NpmServerSpec, version: string): boolean;
|
|
45
55
|
//# sourceMappingURL=lsp-npm-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-npm-table.d.ts","sourceRoot":"","sources":["../src/lsp-npm-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,aAAa;IAC5B,sGAAsG;IACtG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"lsp-npm-table.d.ts","sourceRoot":"","sources":["../src/lsp-npm-table.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,aAAa;IAC5B,sGAAsG;IACtG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAkGjD,CAAC;AAEF,sCAAsC;AACtC,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEvE;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE/E;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG7D;AAED,mEAAmE;AACnE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGhF"}
|
|
@@ -25,6 +25,8 @@ export interface VersionPickResult {
|
|
|
25
25
|
version: string | null;
|
|
26
26
|
/** True when the registry has versions but none is older than `graceDays`. */
|
|
27
27
|
blockedByGrace: boolean;
|
|
28
|
+
/** True when the registry has versions but none passes the caller's version filter. */
|
|
29
|
+
outsideSupportedRange: boolean;
|
|
28
30
|
/** All eligible versions sorted by publish date (newest first). For tests/logs. */
|
|
29
31
|
eligible: ReadonlyArray<{
|
|
30
32
|
version: string;
|
|
@@ -36,15 +38,17 @@ export interface VersionPickResult {
|
|
|
36
38
|
* 1. is published at least `graceDays` ago
|
|
37
39
|
* 2. is the newest such version (per ISO publish time)
|
|
38
40
|
*
|
|
39
|
-
* Pre-release versions (semver "-" tags) are skipped
|
|
41
|
+
* Pre-release versions (semver "-" tags) are skipped, and so are versions
|
|
42
|
+
* `accept` rejects (for example, a major version the caller cannot use).
|
|
40
43
|
*/
|
|
41
|
-
export declare function pickEligibleVersion(response: RegistryResponse, graceDays: number, now?: number): VersionPickResult;
|
|
44
|
+
export declare function pickEligibleVersion(response: RegistryResponse, graceDays: number, now?: number, accept?: (version: string) => boolean): VersionPickResult;
|
|
42
45
|
/**
|
|
43
|
-
* Fetch the registry document for `npmPackage` and apply the grace filter
|
|
46
|
+
* Fetch the registry document for `npmPackage` and apply the grace filter
|
|
47
|
+
* plus the optional `accept` version filter.
|
|
44
48
|
*
|
|
45
49
|
* Returns `null` on HTTP/network failure (logs a warning) so callers can
|
|
46
50
|
* fall back to "use whatever's currently installed".
|
|
47
51
|
*/
|
|
48
|
-
export declare function probeRegistry(npmPackage: string, graceDays: number, fetchImpl?: typeof fetch): Promise<VersionPickResult | null>;
|
|
52
|
+
export declare function probeRegistry(npmPackage: string, graceDays: number, fetchImpl?: typeof fetch, accept?: (version: string) => boolean): Promise<VersionPickResult | null>;
|
|
49
53
|
export {};
|
|
50
54
|
//# sourceMappingURL=lsp-registry-probe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-registry-probe.d.ts","sourceRoot":"","sources":["../src/lsp-registry-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,2DAA2D;AAC3D,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE3C,UAAU,gBAAgB;IACxB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,0CAA0C;IAC1C,WAAW,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,8EAA8E;IAC9E,cAAc,EAAE,OAAO,CAAC;IACxB,mFAAmF;IACnF,QAAQ,EAAE,aAAa,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE;AAED
|
|
1
|
+
{"version":3,"file":"lsp-registry-probe.d.ts","sourceRoot":"","sources":["../src/lsp-registry-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,2DAA2D;AAC3D,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE3C,UAAU,gBAAgB;IACxB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,0CAA0C;IAC1C,WAAW,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,8EAA8E;IAC9E,cAAc,EAAE,OAAO,CAAC;IACxB,uFAAuF;IACvF,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mFAAmF;IACnF,QAAQ,EAAE,aAAa,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,EAAE,MAAM,EACjB,GAAG,GAAE,MAAmB,EACxB,MAAM,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAoB,GAChD,iBAAiB,CA8BnB;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,OAAO,KAAa,EAC/B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GACpC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAoBnC"}
|
package/dist/notifications.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export interface NotificationOptions {
|
|
|
44
44
|
serverUrl?: string;
|
|
45
45
|
}
|
|
46
46
|
export interface ConfigureWarning {
|
|
47
|
-
kind: "formatter_not_installed" | "checker_not_installed" | "lsp_binary_missing" | "config_parse_failed" | "config_key_dropped";
|
|
47
|
+
kind: "formatter_not_installed" | "checker_not_installed" | "lsp_binary_missing" | "config_parse_failed" | "config_key_dropped" | "config_migrated";
|
|
48
48
|
language?: string;
|
|
49
49
|
server?: string;
|
|
50
50
|
tool?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AA0K7D,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAID,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACpE,CAAC;AAwBF,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,EAAE,CAAC,CAqBvB;AAsHD,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,SAAS,CAA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,10 +1,21 @@
|
|
|
1
1
|
import type { V2PermissionClient } from "./v2.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Why no prompt client could be built, as a stable name next to the sentence.
|
|
4
|
+
*
|
|
5
|
+
* - `server_url_invalid`: the user's `opencode.server_url` setting cannot be
|
|
6
|
+
* used as written (not an http(s) URL, or its password variable is unset).
|
|
7
|
+
* - `server_url_unreachable`: the configured server did not answer, or refused
|
|
8
|
+
* AFT's credentials.
|
|
9
|
+
* - `own_server_unaddressable`: no setting, and AFT could not find and
|
|
10
|
+
* authenticate to the OpenCode server it runs inside.
|
|
11
|
+
*/
|
|
12
|
+
export type V2PromptUnavailableReason = "server_url_invalid" | "server_url_unreachable" | "own_server_unaddressable";
|
|
13
|
+
/**
|
|
14
|
+
* The outcome of looking for the OpenCode server that can show a prompt.
|
|
4
15
|
*
|
|
5
16
|
* The failure branch carries what was actually observed rather than a verdict,
|
|
6
17
|
* because it ends up in the sentence the user reads when a prompt could not be
|
|
7
|
-
* raised.
|
|
18
|
+
* raised, and that sentence has to say how to fix it.
|
|
8
19
|
*/
|
|
9
20
|
export type V2PromptChannelResult = {
|
|
10
21
|
readonly client: V2PermissionClient;
|
|
@@ -12,19 +23,113 @@ export type V2PromptChannelResult = {
|
|
|
12
23
|
} | {
|
|
13
24
|
readonly client?: undefined;
|
|
14
25
|
readonly unavailable: string;
|
|
26
|
+
readonly reason?: V2PromptUnavailableReason;
|
|
15
27
|
};
|
|
16
28
|
export interface V2PromptChannel {
|
|
17
|
-
/** The client for the
|
|
29
|
+
/** The client for the OpenCode server, or why none could be reached. */
|
|
18
30
|
client(): Promise<V2PromptChannelResult>;
|
|
19
31
|
}
|
|
32
|
+
/** The user-tier `opencode` config block (see config.ts). */
|
|
33
|
+
export interface V2PromptServerSettings {
|
|
34
|
+
readonly server_url?: string;
|
|
35
|
+
readonly server_password_env?: string;
|
|
36
|
+
}
|
|
37
|
+
/** One TCP socket a process is listening on, as the operating system reports it. */
|
|
38
|
+
export interface V2ListeningSocket {
|
|
39
|
+
/** Bind address: a concrete IP, or a wildcard such as `0.0.0.0`, `::` or `*`. */
|
|
40
|
+
readonly address: string;
|
|
41
|
+
readonly port: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* What discovery reads about the process AFT runs in.
|
|
45
|
+
*
|
|
46
|
+
* OpenCode 2 loads plugins inside its server process, so this process's own
|
|
47
|
+
* pid, command line, environment and listening sockets are the server's.
|
|
48
|
+
* Tests replace it.
|
|
49
|
+
*/
|
|
50
|
+
export interface V2ServerProcess {
|
|
51
|
+
readonly pid: number;
|
|
52
|
+
readonly argv: readonly string[];
|
|
53
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
54
|
+
/** Every OpenCode service registration file on this machine, by path. */
|
|
55
|
+
registrations(): Promise<readonly {
|
|
56
|
+
readonly path: string;
|
|
57
|
+
readonly text: string;
|
|
58
|
+
}[]>;
|
|
59
|
+
/**
|
|
60
|
+
* The TCP ports this process listens on. Rejects when the operating system
|
|
61
|
+
* could not be asked, which is different from an empty answer.
|
|
62
|
+
*/
|
|
63
|
+
listeningSockets(): Promise<readonly V2ListeningSocket[]>;
|
|
64
|
+
fetch(url: string, init: {
|
|
65
|
+
headers: Record<string, string>;
|
|
66
|
+
signal: AbortSignal;
|
|
67
|
+
}): Promise<Response>;
|
|
68
|
+
}
|
|
69
|
+
export interface V2DiscoveryOptions {
|
|
70
|
+
/** Bound on each health call. */
|
|
71
|
+
readonly timeoutMs?: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The username OpenCode 2's server checks Basic auth against.
|
|
75
|
+
*
|
|
76
|
+
* It is fixed: the server's auth layer (`server/auth.ts`, `ServerAuth.Config`)
|
|
77
|
+
* always sets `username: "opencode"` and ignores OPENCODE_SERVER_USERNAME,
|
|
78
|
+
* which only OpenCode 1 honored. Sending that variable's value would be refused.
|
|
79
|
+
*/
|
|
80
|
+
export declare const OPENCODE_BASIC_AUTH_USERNAME = "opencode";
|
|
81
|
+
interface ListenAddress {
|
|
82
|
+
readonly hostname: string;
|
|
83
|
+
readonly port?: number;
|
|
84
|
+
readonly stdio: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Where this process's own server listens, read from its command line.
|
|
88
|
+
*
|
|
89
|
+
* `opencode serve` takes `--hostname` (default 127.0.0.1) and `--port`. A
|
|
90
|
+
* wildcard bind is reached on loopback. `--stdio` is how `opencode --standalone`
|
|
91
|
+
* starts its private server: on a random port, with the password removed from
|
|
92
|
+
* the environment, so it is reported rather than probed.
|
|
93
|
+
*/
|
|
94
|
+
export declare function ownListenAddress(argv: readonly string[]): ListenAddress;
|
|
95
|
+
/**
|
|
96
|
+
* Pick the OpenCode server a permission prompt is raised on.
|
|
97
|
+
*
|
|
98
|
+
* The user's `opencode.server_url` wins and skips discovery. Without it, AFT
|
|
99
|
+
* looks for the server it is itself running in: first a service registration
|
|
100
|
+
* whose pid is this process, then the TCP ports this process listens on, with
|
|
101
|
+
* the password it was started with. Every candidate is verified with one
|
|
102
|
+
* authenticated health call whose answer must name this process, so a prompt
|
|
103
|
+
* never goes to some other OpenCode server that happens to be running.
|
|
104
|
+
*/
|
|
105
|
+
export declare function discoverPromptServer(settings: V2PromptServerSettings | undefined, server?: V2ServerProcess, options?: V2DiscoveryOptions): Promise<V2PromptChannelResult>;
|
|
106
|
+
/** This process, as discovery sees it. */
|
|
107
|
+
export declare function currentServerProcess(): V2ServerProcess;
|
|
108
|
+
/** Parse `lsof -F n` output: one `n<address>:<port>` line per socket. */
|
|
109
|
+
export declare function parseLsofListening(output: string): V2ListeningSocket[];
|
|
110
|
+
/**
|
|
111
|
+
* Parse `netstat -ano` output for one pid. A listening row is recognized by
|
|
112
|
+
* its zero foreign port rather than by the state column, which Windows
|
|
113
|
+
* translates on non-English systems.
|
|
114
|
+
*/
|
|
115
|
+
export declare function parseNetstatListening(output: string, pid: number): V2ListeningSocket[];
|
|
116
|
+
/**
|
|
117
|
+
* Parse `/proc/net/tcp` or `/proc/net/tcp6` rows that are listening (state
|
|
118
|
+
* `0A`) on one of the given socket inodes.
|
|
119
|
+
*/
|
|
120
|
+
export declare function parseProcNetListening(table: string, inodes: ReadonlySet<string>): V2ListeningSocket[];
|
|
121
|
+
/** Ask the operating system which TCP ports `pid` listens on. */
|
|
122
|
+
export declare function listeningSocketsOf(pid: number): Promise<V2ListeningSocket[]>;
|
|
20
123
|
/**
|
|
21
124
|
* One prompt channel for one OpenCode Location.
|
|
22
125
|
*
|
|
23
126
|
* The discovered client is kept so a session that answers many prompts pays for
|
|
24
127
|
* discovery once, and it is held in this closure rather than in module state so
|
|
25
128
|
* it is dropped with the Location's consumers when that scope is torn down.
|
|
26
|
-
* Only a successful discovery is remembered: a host whose
|
|
27
|
-
* yet must be able to raise the next prompt.
|
|
129
|
+
* Only a successful discovery is remembered: a host whose server was not up
|
|
130
|
+
* yet must be able to raise the next prompt. The first failure is logged, once,
|
|
131
|
+
* so the plugin log names the reason even when no prompt refusal is read.
|
|
28
132
|
*/
|
|
29
133
|
export declare function createV2PromptChannel(discovery?: () => Promise<V2PromptChannelResult>): V2PromptChannel;
|
|
134
|
+
export {};
|
|
30
135
|
//# sourceMappingURL=v2-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-service.d.ts","sourceRoot":"","sources":["../../src/permissions/v2-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v2-service.d.ts","sourceRoot":"","sources":["../../src/permissions/v2-service.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAA2B,MAAM,SAAS,CAAC;AAE3E;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GACjC,oBAAoB,GACpB,wBAAwB,GACxB,0BAA0B,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAAC,QAAQ,C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Ae,CAmBjB"}
|
package/dist/rpc/contract.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type AftIndexProgress, AftRpc, type AftRpcSession, IndexProgress, RpcSession, } from "../tui/aft-rpc";
|
|
1
|
+
export { type AftHostToolOverlapNotice, type AftIndexProgress, AftRpc, type AftRpcSession, HostToolOverlapNotice, IndexProgress, RpcSession, } from "../tui/aft-rpc";
|
|
2
2
|
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/rpc/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,MAAM,EACN,KAAK,aAAa,EAClB,aAAa,EACb,UAAU,GACX,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/rpc/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,MAAM,EACN,KAAK,aAAa,EAClB,qBAAqB,EACrB,aAAa,EACb,UAAU,GACX,MAAM,gBAAgB,CAAC"}
|
package/dist/rpc/register.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AftTransportPool } from "@cortexkit/aft-bridge";
|
|
2
2
|
import { Effect, type Scope } from "effect";
|
|
3
|
-
import { type AftIndexProgress, AftRpc, type AftRpcSession } from "./contract";
|
|
3
|
+
import { type AftHostToolOverlapNotice, type AftIndexProgress, AftRpc, type AftRpcSession } from "./contract";
|
|
4
4
|
type RpcRegistration = {
|
|
5
5
|
dispose: Effect.Effect<void>;
|
|
6
6
|
events: {
|
|
@@ -16,15 +16,13 @@ export type AftRpcContext = {
|
|
|
16
16
|
};
|
|
17
17
|
export type AftRpcLocation = {
|
|
18
18
|
directory: string;
|
|
19
|
-
project?: {
|
|
20
|
-
directory?: string;
|
|
21
|
-
canonical?: string;
|
|
22
|
-
};
|
|
23
19
|
};
|
|
24
20
|
export type RegisteredAftRpc = {
|
|
25
21
|
emitStatusInvalidated(payload?: AftRpcSession): Promise<void>;
|
|
26
22
|
emitShowStatusDialog(payload?: AftRpcSession): Promise<void>;
|
|
27
23
|
emitIndexProgress(payload: AftIndexProgress): Promise<void>;
|
|
24
|
+
/** A one-off user notice the OpenCode 2 TUI shows as a toast. */
|
|
25
|
+
emitHostToolOverlap(payload: AftHostToolOverlapNotice): Promise<void>;
|
|
28
26
|
dispose(): Promise<void>;
|
|
29
27
|
};
|
|
30
28
|
export declare function indexProgressFromStatus(snapshot: Record<string, unknown>): AftIndexProgress[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/rpc/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAQ5C,OAAO,
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/rpc/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAQ5C,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,MAAM,EACN,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AAEpB,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,EAAE;QACN,IAAI,CACF,IAAI,EAAE,MAAM,OAAO,MAAM,CAAC,MAAM,EAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,C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aAAa,EACtB,OAAO,EAAE,MAAM,GACd,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAyBvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignored-message.d.ts","sourceRoot":"","sources":["../../src/shared/ignored-message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ignored-message.d.ts","sourceRoot":"","sources":["../../src/shared/ignored-message.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAqEf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-vision.d.ts","sourceRoot":"","sources":["../../src/shared/read-vision.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-vision.d.ts","sourceRoot":"","sources":["../../src/shared/read-vision.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,KAAK,KAAK,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAgBrD,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAEvF;AAuBD,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CA0D9B"}
|
|
@@ -50,6 +50,14 @@ export declare class AftRpcClient {
|
|
|
50
50
|
* client knows to try the next port (the warm one).
|
|
51
51
|
*/
|
|
52
52
|
private looksLikePlaceholder;
|
|
53
|
+
/**
|
|
54
|
+
* The endpoint that served the last warm response, if it is still the newest
|
|
55
|
+
* live port file for this project. Discovery tries ports newest first and
|
|
56
|
+
* returns the first warm answer, so while this holds the full scan would
|
|
57
|
+
* reach the same server first. Reading the port files also drops entries
|
|
58
|
+
* whose owning process has died, so a dead server is never reused.
|
|
59
|
+
*/
|
|
60
|
+
private cachedEndpoint;
|
|
53
61
|
/** Check if any RPC server is reachable. */
|
|
54
62
|
isAvailable(): Promise<boolean>;
|
|
55
63
|
/** Resolve the freshest live endpoint for the persistent TUI WebSocket.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-client.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-client.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IACtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAuBD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAK9F;AAcD,wBAAgB,0BAA0B,IAAI,IAAI,CAGjD;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAEzE;AA4BD,qBAAa,YAAY;IACvB,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,iBAAiB,CAA6B;IACtD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC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AAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;IAIjD,6DAA6D;IACvD,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;YAQhB,QAAQ;YA2BR,SAAS;IA0BvB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,aAAa;IAiBrB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IA6B1B,4EAA4E;IAC5E,OAAO,CAAC,cAAc;IAWtB,8CAA8C;IAC9C,IAAI,IAAI,IAAI;YA6BE,WAAW;IAwDzB,OAAO,CAAC,eAAe;IA8DvB,OAAO,CAAC,OAAO;IAYf,OAAO,CAAC,QAAQ;CAwEjB"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How long a session lookup may run on either host version. Tool routing
|
|
3
|
+
* awaits this lookup, so an unresponsive host must not hold the call forever.
|
|
4
|
+
* After this budget the call proceeds with its own directory instead.
|
|
5
|
+
*/
|
|
6
|
+
export declare const LOOKUP_TIMEOUT_MS = 1000;
|
|
7
|
+
export declare const V2_SESSION_LOOKUP_TIMEOUT_MS = 1000;
|
|
8
|
+
/** A failed lookup is provisional; retry later without querying on every call. */
|
|
9
|
+
export declare const FAILED_LOOKUP_RETRY_MS = 30000;
|
|
1
10
|
/**
|
|
2
11
|
* Resolve the project directory the session was created with from the SDK's
|
|
3
12
|
* session object. Returns the SDK-reported directory, or `null` when the
|
|
@@ -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":"AAqEA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,OAAQ,CAAC;AACvC,eAAO,MAAM,4BAA4B,OAAoB,CAAC;AAC9D,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAuB7C;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqBxB;AAsHD;;;;;;;;;;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;AAoBD,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgCxB;AAED,qDAAqD;AACrD,wBAAgB,kCAAkC,IAAI,IAAI,CAIzD"}
|
package/dist/shared/status.d.ts
CHANGED
|
@@ -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,CACxD,GACA,MAAM,CAKR;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAA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wB,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"}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
/** Longest a caller waits for the host's session lookup. */
|
|
2
|
+
export declare const LOOKUP_TIMEOUT_MS = 1000;
|
|
3
|
+
/** How long a failed or timed-out lookup is answered as "primary" before retrying. */
|
|
4
|
+
export declare const FAILED_LOOKUP_RETRY_MS = 30000;
|
|
1
5
|
/**
|
|
2
6
|
* Returns `true` when the given session has a non-empty `parentID`
|
|
3
7
|
* (subagent). Returns `false` for primary sessions, when the SDK is
|
|
4
|
-
* unavailable, or when
|
|
5
|
-
* primary sessions working
|
|
8
|
+
* unavailable, or when the lookup fails or takes longer than
|
|
9
|
+
* LOOKUP_TIMEOUT_MS; the false default keeps primary sessions working
|
|
10
|
+
* exactly as before.
|
|
6
11
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
12
|
+
* A known answer is an O(1) cache hit. Otherwise at most one host lookup
|
|
13
|
+
* per session is in flight, and it is bounded by LOOKUP_TIMEOUT_MS.
|
|
9
14
|
*/
|
|
10
15
|
export declare function resolveIsSubagent(client: unknown, sessionId: string | undefined, _fallbackDirectory?: string): Promise<boolean>;
|
|
11
16
|
/** Test-only cache reset. Not exported from the public surface. */
|
|
12
17
|
export declare function _resetSubagentCacheForTest(): void;
|
|
18
|
+
/** Test-only clock override for the failed-lookup retry window. */
|
|
19
|
+
export declare function _setSubagentClockForTest(clock: () => number): void;
|
|
13
20
|
//# sourceMappingURL=subagent-detect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-detect.d.ts","sourceRoot":"","sources":["../../src/shared/subagent-detect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subagent-detect.d.ts","sourceRoot":"","sources":["../../src/shared/subagent-detect.ts"],"names":[],"mappings":"AA+DA,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,OAAQ,CAAC;AACvC,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAM7C;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,OAAO,CAAC,CAsBlB;AAmJD,mEAAmE;AACnE,wBAAgB,0BAA0B,IAAI,IAAI,CAIjD;AAED,mEAAmE;AACnE,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,MAAM,GAAG,IAAI,CAElE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2-context.d.ts","sourceRoot":"","sources":["../../src/shared/v2-context.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAK1D"}
|
|
@@ -15,6 +15,8 @@ export type SubcBareToolName = (typeof BARE_TOOL_ORDER)[number];
|
|
|
15
15
|
* project that does enable the feature could never see it. `sandbox.enabled` 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
|
+
* Remote execution is different: the default artifacts omit it, and a
|
|
19
|
+
* separately generated bash override is selected only for an enabled session.
|
|
18
20
|
*/
|
|
19
21
|
export declare function makeSubcSchemaStubCtx(): PluginContext;
|
|
20
22
|
/**
|
|
@@ -28,12 +30,32 @@ export declare const CONSUMER_ONLY_MARKER = "x-aft-consumer-only";
|
|
|
28
30
|
/**
|
|
29
31
|
* Build the bare-name → JSON Schema map for subc build_manifest.
|
|
30
32
|
*/
|
|
31
|
-
export declare function buildSubcToolSchemas(): Record<SubcBareToolName, Record<string, unknown>>;
|
|
33
|
+
export declare function buildSubcToolSchemas(remoteRuns?: boolean): Record<SubcBareToolName, Record<string, unknown>>;
|
|
32
34
|
/**
|
|
33
35
|
* Deterministic JSON bytes: top-level keys sorted, 2-space indent, trailing newline.
|
|
34
36
|
*/
|
|
35
37
|
export declare function serializeSubcToolSchemas(schemas: Record<string, Record<string, unknown>>): string;
|
|
36
38
|
export declare function buildSubcToolSchemasJson(): string;
|
|
37
39
|
export declare const SUBC_BARE_TOOL_NAMES: readonly SubcBareToolName[];
|
|
40
|
+
/**
|
|
41
|
+
* Tool schemas the module catalog's `worker` preset serves in place of the
|
|
42
|
+
* base ones, plus the tools only that preset serves. The `head` preset is the
|
|
43
|
+
* base artifact unchanged, and the `reader` preset only narrows the tool list,
|
|
44
|
+
* so neither needs entries here.
|
|
45
|
+
*
|
|
46
|
+
* A worker is a delegated session: once its turn ends it has delivered its
|
|
47
|
+
* result, and nothing (no completion reminder, no async notification) wakes
|
|
48
|
+
* it. Waiting descriptions use the same builders as the OpenCode tools;
|
|
49
|
+
* remote-run advice appears only in the enabled session override. `bash` and
|
|
50
|
+
* `powershell` keep their arguments but describe promotion and waiting for a
|
|
51
|
+
* worker, `bash_status` is the OpenCode tool's own (which points at
|
|
52
|
+
* `bash_watch`), and `bash_watch` is the OpenCode tool's schema with its
|
|
53
|
+
* worker description.
|
|
54
|
+
*/
|
|
55
|
+
export declare function buildSubcToolPresets(remoteRuns?: boolean): Record<string, Record<string, Record<string, unknown>>>;
|
|
56
|
+
/** Deterministic JSON bytes for the preset artifact, keys sorted at every preset level. */
|
|
57
|
+
export declare function buildSubcToolPresetsJson(): string;
|
|
58
|
+
/** Enabled-only bash overrides; default schemas never advertise remote execution. */
|
|
59
|
+
export declare function buildSubcRemoteToolSchemasJson(): string;
|
|
38
60
|
export {};
|
|
39
61
|
//# sourceMappingURL=subc-tool-schemas.d.ts.map
|
|
@@ -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;AA0BH,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;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,IAAI,aAAa,CAerD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAe1D;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,UAAQ,GACjB,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA8HnD;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;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,UAAQ,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAiCzD;AA0BD,2FAA2F;AAC3F,wBAAgB,wBAAwB,IAAI,MAAM,CASjD;AAED,qFAAqF;AACrF,wBAAgB,8BAA8B,IAAI,MAAM,CASvD"}
|