@claudexor/harness-agy 3.5.0 → 3.8.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/README.md +9 -5
- package/dist/index.d.ts +17 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +70 -30
- package/dist/index.js.map +1 -1
- package/dist/print-command.d.ts +64 -0
- package/dist/print-command.d.ts.map +1 -0
- package/dist/print-command.js +384 -0
- package/dist/print-command.js.map +1 -0
- package/dist/profile.d.ts +9 -18
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +31 -49
- package/dist/profile.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -3,11 +3,15 @@
|
|
|
3
3
|
Adapter for Google's Antigravity CLI (`agy`): translates
|
|
4
4
|
`agy -p --output-format stream-json` into typed `HarnessEvent`s.
|
|
5
5
|
|
|
6
|
-
Accounts
|
|
7
|
-
credential)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
Accounts use NAMED credential-profile bindings only (there is no engine-default
|
|
7
|
+
agy credential). Every binding has a Claudexor-owned HOME that scopes vendor
|
|
8
|
+
state under `$HOME/.gemini/...`; credential custody is platform-defined.
|
|
9
|
+
Darwin and Linux declare the config-file/HOME transport. Windows uses the
|
|
10
|
+
current OS user's Credential Manager identity, permits one enabled binding,
|
|
11
|
+
and treats HOME as state scoping rather than an independent Google identity.
|
|
12
|
+
Readiness always comes from the bounded vendor `/model` probe, never from the
|
|
13
|
+
presence or absence of `antigravity-oauth-token`. See `src/profile.ts` for the
|
|
14
|
+
route and verification contract.
|
|
11
15
|
|
|
12
16
|
Fixtures under `fixtures/` pin the recorded 1.1.13 stream shapes; see
|
|
13
17
|
`fixtures/manifest.yaml` for provenance and stream-semantics expectations.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { HarnessCapabilityProfile } from "@claudexor/schema";
|
|
1
2
|
import type { HarnessAdapter } from "@claudexor/core";
|
|
2
|
-
export { AGY_BIN, agyProfileRunEnv,
|
|
3
|
+
export { AGY_BIN, agyProfileRunEnv, canonicalAgyProfileHome } from "./profile.js";
|
|
4
|
+
export { classifyAgyPrintResult, runAgyPrintCommand, type AgyPrintClassification, } from "./print-command.js";
|
|
3
5
|
/**
|
|
4
6
|
* The vendor's two quota GROUPS map onto disjoint halves of the same
|
|
5
7
|
* inventory: "Gemini Models" and "Claude and GPT models" (PLAN §1.2 F8). The
|
|
@@ -8,5 +10,19 @@ export { AGY_BIN, agyProfileRunEnv, agyTokenFilePresent, canonicalAgyProfileHome
|
|
|
8
10
|
*/
|
|
9
11
|
export declare const AGY_GEMINI_MODELS: ("claude-opus-4-6-thinking" | "claude-sonnet-4-6" | "gemini-3.1-pro-high" | "gemini-3.1-pro-low" | "gemini-3.5-flash-high" | "gemini-3.5-flash-low" | "gemini-3.5-flash-medium" | "gemini-3.6-flash-high" | "gemini-3.6-flash-low" | "gemini-3.6-flash-medium" | "gemini-3.7-flash-high" | "gemini-3.7-flash-low" | "gemini-3.7-flash-medium" | "gpt-oss-120b-medium")[];
|
|
10
12
|
export declare const AGY_THIRD_PARTY_MODELS: ("claude-opus-4-6-thinking" | "claude-sonnet-4-6" | "gemini-3.1-pro-high" | "gemini-3.1-pro-low" | "gemini-3.5-flash-high" | "gemini-3.5-flash-low" | "gemini-3.5-flash-medium" | "gemini-3.6-flash-high" | "gemini-3.6-flash-low" | "gemini-3.6-flash-medium" | "gemini-3.7-flash-high" | "gemini-3.7-flash-low" | "gemini-3.7-flash-medium" | "gpt-oss-120b-medium")[];
|
|
13
|
+
/** One manifest-owned declaration of the managed login's stdin contract. */
|
|
14
|
+
export declare const AGY_MANAGED_LOGIN: {
|
|
15
|
+
readonly stdin: "terminal";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Static auth/profile policy. Windows Credential Manager is scoped to the OS
|
|
19
|
+
* user, not the profile HOME, so only one enabled binding is honest there.
|
|
20
|
+
* Darwin/Linux retain the legacy profile-scoped, unbounded defaults.
|
|
21
|
+
*/
|
|
22
|
+
export declare const AGY_CAPABILITY_PROFILE: HarnessCapabilityProfile;
|
|
23
|
+
/** Platform disclosure derived from the same transport and effective-policy
|
|
24
|
+
* facts used by admission. Darwin is the one live-proven profile-isolation
|
|
25
|
+
* lane; other lanes stay explicit rather than maintaining parallel truth. */
|
|
26
|
+
export declare function agyPlatformIsolationDetail(platform?: NodeJS.Platform): string | null;
|
|
11
27
|
export declare function createAgyAdapter(): HarnessAdapter;
|
|
12
28
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,wBAAwB,EAIzB,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAelE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC;AA2D5B;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,0WAA0D,CAAC;AACzF,eAAO,MAAM,sBAAsB,0WAA2D,CAAC;AAE/F,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB;aAAK,KAAK,EAAE,UAAU;CAAW,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,wBAiCjC,CAAC;AAEL;;6EAE6E;AAC7E,wBAAgB,0BAA0B,CACxC,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC3C,MAAM,GAAG,IAAI,CAgBf;AAeD,wBAAgB,gBAAgB,IAAI,cAAc,CAyKjD"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConformanceReport as ConformanceReportSchema, HarnessManifest as HarnessManifestSchema, } from "@claudexor/schema";
|
|
2
|
-
import { HarnessUnavailableError, promptWithInstructions, runCapture, runCliHarness, } from "@claudexor/core";
|
|
1
|
+
import { ConformanceReport as ConformanceReportSchema, credentialProfilePolicyForPlatform, credentialTransportsForPlatform, HarnessCapabilityProfile as HarnessCapabilityProfileSchema, HarnessManifest as HarnessManifestSchema, } from "@claudexor/schema";
|
|
2
|
+
import { HarnessUnavailableError, harnessPlatform, promptWithInstructions, runCapture, runCliHarness, } from "@claudexor/core";
|
|
3
3
|
import { CLAUDEXOR_VERSION, nowIso, redactSecrets } from "@claudexor/util";
|
|
4
4
|
import { parseAgyEvent } from "./parse.js";
|
|
5
5
|
import { AGY_BIN, probeAgyCredentialProfile, resolveAgyProfileRoute } from "./profile.js";
|
|
@@ -7,7 +7,8 @@ import { AGY_VENDOR_CLI_VERSION } from "./vendor-cli-version.js";
|
|
|
7
7
|
// The package publishes only what other packages consume. The profile probe,
|
|
8
8
|
// the route resolver and the stream parser are reached through the adapter
|
|
9
9
|
// this file returns, so re-exporting them would be a dead public surface.
|
|
10
|
-
export { AGY_BIN, agyProfileRunEnv,
|
|
10
|
+
export { AGY_BIN, agyProfileRunEnv, canonicalAgyProfileHome } from "./profile.js";
|
|
11
|
+
export { classifyAgyPrintResult, runAgyPrintCommand, } from "./print-command.js";
|
|
11
12
|
/**
|
|
12
13
|
* Access mapping, each leg LIVE-PROVEN on agy 1.1.13 (PLAN §1.2 F11, §1.2d):
|
|
13
14
|
* plan mode answered read-only prompts and withheld a requested write;
|
|
@@ -71,6 +72,63 @@ const AGY_KNOWN_MODELS = [
|
|
|
71
72
|
*/
|
|
72
73
|
export const AGY_GEMINI_MODELS = AGY_KNOWN_MODELS.filter((m) => m.startsWith("gemini-"));
|
|
73
74
|
export const AGY_THIRD_PARTY_MODELS = AGY_KNOWN_MODELS.filter((m) => !m.startsWith("gemini-"));
|
|
75
|
+
/** One manifest-owned declaration of the managed login's stdin contract. */
|
|
76
|
+
export const AGY_MANAGED_LOGIN = { stdin: "terminal" };
|
|
77
|
+
/**
|
|
78
|
+
* Static auth/profile policy. Windows Credential Manager is scoped to the OS
|
|
79
|
+
* user, not the profile HOME, so only one enabled binding is honest there.
|
|
80
|
+
* Darwin/Linux retain the legacy profile-scoped, unbounded defaults.
|
|
81
|
+
*/
|
|
82
|
+
export const AGY_CAPABILITY_PROFILE = HarnessCapabilityProfileSchema.parse({
|
|
83
|
+
auth: {
|
|
84
|
+
supported_sources: ["native_session"],
|
|
85
|
+
preferred_source: "native_session",
|
|
86
|
+
credential_transports: [
|
|
87
|
+
{
|
|
88
|
+
source: "native_session",
|
|
89
|
+
kind: "config_file",
|
|
90
|
+
relocatable_by: ["HOME"],
|
|
91
|
+
platforms: ["darwin", "linux"],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
source: "native_session",
|
|
95
|
+
kind: "os_keychain",
|
|
96
|
+
relocatable_by: [],
|
|
97
|
+
platforms: ["win32"],
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
credential_profile_policies: [
|
|
101
|
+
{
|
|
102
|
+
source: "native_session",
|
|
103
|
+
platforms: ["win32"],
|
|
104
|
+
identity_scope: "os_user",
|
|
105
|
+
max_enabled_profiles: 1,
|
|
106
|
+
cleanup_owner: "vendor",
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
managed_login: AGY_MANAGED_LOGIN,
|
|
110
|
+
},
|
|
111
|
+
access_control: { readonly_mechanism: "permission_deny" },
|
|
112
|
+
isolation: { supported_containment: ["env_or_file_injection"] },
|
|
113
|
+
attachment_inputs: [],
|
|
114
|
+
});
|
|
115
|
+
/** Platform disclosure derived from the same transport and effective-policy
|
|
116
|
+
* facts used by admission. Darwin is the one live-proven profile-isolation
|
|
117
|
+
* lane; other lanes stay explicit rather than maintaining parallel truth. */
|
|
118
|
+
export function agyPlatformIsolationDetail(platform = process.platform) {
|
|
119
|
+
const host = harnessPlatform(platform);
|
|
120
|
+
if (!host)
|
|
121
|
+
return `Antigravity credential behavior is undeclared on ${platform}`;
|
|
122
|
+
const transports = credentialTransportsForPlatform(AGY_CAPABILITY_PROFILE.auth, host);
|
|
123
|
+
const policy = credentialProfilePolicyForPlatform(AGY_CAPABILITY_PROFILE.auth, "native_session", host);
|
|
124
|
+
if (host === "darwin")
|
|
125
|
+
return null;
|
|
126
|
+
const kinds = transports.map((transport) => transport.kind).join(" + ") || "no declared transport";
|
|
127
|
+
if (policy.identity_scope === "os_user") {
|
|
128
|
+
return `Antigravity uses ${kinds} credentials scoped to the current OS user; the named HOME scopes vendor state but is not an independent identity (maximum ${policy.max_enabled_profiles ?? "unbounded"} enabled binding)`;
|
|
129
|
+
}
|
|
130
|
+
return `named-account isolation is unverified on ${host}: the declared ${kinds} transport has profile-scoped policy but no live multi-account proof on this platform`;
|
|
131
|
+
}
|
|
74
132
|
const AGY_ENABLED_INTENTS = [
|
|
75
133
|
"explain",
|
|
76
134
|
"plan",
|
|
@@ -86,6 +144,7 @@ const AGY_ENABLED_INTENTS = [
|
|
|
86
144
|
export function createAgyAdapter() {
|
|
87
145
|
return {
|
|
88
146
|
id: "agy",
|
|
147
|
+
capabilityProfile: AGY_CAPABILITY_PROFILE,
|
|
89
148
|
async discover() {
|
|
90
149
|
const version = await detectVersion();
|
|
91
150
|
if (version === null) {
|
|
@@ -121,23 +180,7 @@ export function createAgyAdapter() {
|
|
|
121
180
|
known_models: [...AGY_KNOWN_MODELS],
|
|
122
181
|
known_models_verified_against: AGY_VENDOR_CLI_VERSION,
|
|
123
182
|
},
|
|
124
|
-
capability_profile:
|
|
125
|
-
auth: {
|
|
126
|
-
supported_sources: ["native_session"],
|
|
127
|
-
preferred_source: "native_session",
|
|
128
|
-
credential_transports: [
|
|
129
|
-
// The profile HOME relocates the vendor's whole config root and
|
|
130
|
-
// its file-based OAuth token (Л-15/Л-16): config_file, HOME.
|
|
131
|
-
{ source: "native_session", kind: "config_file", relocatable_by: ["HOME"] },
|
|
132
|
-
],
|
|
133
|
-
},
|
|
134
|
-
// readonly = vendor plan mode: write tools are withheld
|
|
135
|
-
// (permission-denied), reads and answers flow (live-proven F11).
|
|
136
|
-
access_control: { readonly_mechanism: "permission_deny" },
|
|
137
|
-
isolation: { supported_containment: ["env_or_file_injection"] },
|
|
138
|
-
// No proven attachment path yet — honest empty set (INV-064/065).
|
|
139
|
-
attachment_inputs: [],
|
|
140
|
-
},
|
|
183
|
+
capability_profile: AGY_CAPABILITY_PROFILE,
|
|
141
184
|
auth_modes: ["local_session"],
|
|
142
185
|
access_profiles_supported: [
|
|
143
186
|
"readonly",
|
|
@@ -152,16 +195,13 @@ export function createAgyAdapter() {
|
|
|
152
195
|
const version = await detectVersion();
|
|
153
196
|
const installedSemver = version === null ? null : (/\d+\.\d+\.\d+/.exec(version)?.[0] ?? null);
|
|
154
197
|
const versionDrift = version !== null && installedSemver !== AGY_VENDOR_CLI_VERSION
|
|
155
|
-
? `installed agy "${version}" differs from the verified ${AGY_VENDOR_CLI_VERSION}; the
|
|
198
|
+
? `installed agy "${version}" differs from the verified ${AGY_VENDOR_CLI_VERSION}; the platform credential transport and profile policy are re-proven per version (R-2')`
|
|
156
199
|
: null;
|
|
157
|
-
// Л-24:
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
const platformProof = process.platform === "darwin"
|
|
163
|
-
? null
|
|
164
|
-
: `named-account isolation is unverified on ${process.platform}: the mechanism is the same profile HOME proven on macOS, but no live multi-account run has been recorded here`;
|
|
200
|
+
// Л-24 + INV-067: config-file identity isolation is live-proven only on
|
|
201
|
+
// macOS. Linux retains that declared transport without a live multi-
|
|
202
|
+
// account proof. Windows has a different effective policy altogether:
|
|
203
|
+
// the vendor credential is OS-user-scoped and HOME scopes state only.
|
|
204
|
+
const platformProof = agyPlatformIsolationDetail();
|
|
165
205
|
const requestedSource = spec.authSource;
|
|
166
206
|
if (requestedSource !== undefined && requestedSource !== "native_session") {
|
|
167
207
|
return ConformanceReportSchema.parse({
|
|
@@ -227,7 +267,7 @@ export function createAgyAdapter() {
|
|
|
227
267
|
? [{ id: "version_pin", status: "fail", detail: versionDrift }]
|
|
228
268
|
: [{ id: "version_pin", status: "pass", detail: AGY_VENDOR_CLI_VERSION }]),
|
|
229
269
|
...(platformProof
|
|
230
|
-
? [{ id: "platform_isolation", status: "
|
|
270
|
+
? [{ id: "platform_isolation", status: "skip", detail: platformProof }]
|
|
231
271
|
: []),
|
|
232
272
|
],
|
|
233
273
|
enabled_intents: [],
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,IAAI,uBAAuB,EAC5C,kCAAkC,EAClC,+BAA+B,EAC/B,wBAAwB,IAAI,8BAA8B,EAC1D,eAAe,IAAI,qBAAqB,GACzC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,6EAA6E;AAC7E,2EAA2E;AAC3E,0EAA0E;AAC1E,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAA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OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { spawn, type SpawnOptionsWithoutStdio } from "node:child_process";
|
|
2
|
+
import { reapProcessTree } from "@claudexor/core";
|
|
3
|
+
export declare const AGY_PRINT_TIMEOUT_MS = 30000;
|
|
4
|
+
export declare const AGY_PRINT_STREAM_LIMIT_BYTES: number;
|
|
5
|
+
type EnvMap = Record<string, string | null | undefined>;
|
|
6
|
+
export type AgyPrintFailureReason = "spawn_failed" | "timed_out" | "aborted" | "output_overflow" | "termination_unconfirmed";
|
|
7
|
+
export type AgyPrintCommandResult = {
|
|
8
|
+
kind: "completed";
|
|
9
|
+
code: number | null;
|
|
10
|
+
signal: NodeJS.Signals | null;
|
|
11
|
+
stdout: string;
|
|
12
|
+
stderr: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: "failed";
|
|
15
|
+
reason: AgyPrintFailureReason;
|
|
16
|
+
detail: string;
|
|
17
|
+
stdout: string;
|
|
18
|
+
stderr: string;
|
|
19
|
+
};
|
|
20
|
+
export interface AgyPrintCommandOptions {
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
maxStdoutBytes?: number;
|
|
23
|
+
maxStderrBytes?: number;
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
platform?: NodeJS.Platform;
|
|
26
|
+
/** Bounded cancellation proof seam; production default is 5 seconds. */
|
|
27
|
+
cancelDeadlineMs?: number;
|
|
28
|
+
/** Bounded post-exit pipe drain seam; production default is 200 ms. */
|
|
29
|
+
drainMs?: number;
|
|
30
|
+
/** Deterministic binary-resolution seam; production uses the shared exact resolver. */
|
|
31
|
+
resolveBinary?: (bin: string, env: NodeJS.ProcessEnv, platform: NodeJS.Platform) => string | null;
|
|
32
|
+
/** Deterministic lifecycle seams. */
|
|
33
|
+
spawnProcess?: typeof spawn;
|
|
34
|
+
reap?: typeof reapProcessTree;
|
|
35
|
+
/** Deterministic passive-registry seam; production uses the shared registry. */
|
|
36
|
+
processRegistry?: {
|
|
37
|
+
register(pid: number, command: string): void;
|
|
38
|
+
unregister(pid: number): void;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** Spawn policy is exported so Windows fixtures can assert no inherited console/stdio. */
|
|
42
|
+
export declare function agyPrintSpawnOptions(platform: NodeJS.Platform, env: NodeJS.ProcessEnv): SpawnOptionsWithoutStdio;
|
|
43
|
+
/**
|
|
44
|
+
* Bounded print-mode owner for `/model` and `/quota`. The child has no stdin
|
|
45
|
+
* and no controlling terminal: POSIX starts a new session; Windows uses
|
|
46
|
+
* DETACHED_PROCESS because CREATE_NO_WINDOW still exposes a windowless
|
|
47
|
+
* CONIN$. Child exit is completion authority; descendant-held pipes receive
|
|
48
|
+
* only a bounded drain.
|
|
49
|
+
*/
|
|
50
|
+
export declare function runAgyPrintCommand(bin: string, command: "/model" | "/quota", envPatch: EnvMap, options?: AgyPrintCommandOptions): Promise<AgyPrintCommandResult>;
|
|
51
|
+
export type AgyPrintClassification = {
|
|
52
|
+
kind: "success";
|
|
53
|
+
envelope: Record<string, unknown>;
|
|
54
|
+
} | {
|
|
55
|
+
kind: "unauthenticated";
|
|
56
|
+
detail: string;
|
|
57
|
+
} | {
|
|
58
|
+
kind: "probe_failed";
|
|
59
|
+
detail: string;
|
|
60
|
+
};
|
|
61
|
+
/** Shared exit/envelope/auth classifier for doctor and quota. */
|
|
62
|
+
export declare function classifyAgyPrintResult(result: AgyPrintCommandResult): AgyPrintClassification;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=print-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print-command.d.ts","sourceRoot":"","sources":["../src/print-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAA4B,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAGpG,OAAO,EAIL,eAAe,EAMhB,MAAM,iBAAiB,CAAC;AAG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AAE,OAAO,eAAe,CAAC;IAC9B,gFAAgF;IAChF,eAAe,CAAC,EAAE;QAChB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;KAC/B,CAAC;CACH;AAED,0FAA0F;AAC1F,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,GAAG,EAAE,MAAM,CAAC,UAAU,GACrB,wBAAwB,CAU1B;AAqED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,QAAQ,GAAG,QAAQ,EAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAgPhC;AAED,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAkC7C,iEAAiE;AACjE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,qBAAqB,GAAG,sBAAsB,CAyC5F"}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { extname, isAbsolute } from "node:path";
|
|
3
|
+
import { composeBaseEnv, defaultProcessGroupService, labelStreams, reapProcessTree, registerChildProcess, resolveHarnessBinary, unregisterChildProcess, } from "@claudexor/core";
|
|
4
|
+
import { redactSecrets } from "@claudexor/util";
|
|
5
|
+
export const AGY_PRINT_TIMEOUT_MS = 30_000;
|
|
6
|
+
export const AGY_PRINT_STREAM_LIMIT_BYTES = 256 * 1024;
|
|
7
|
+
const AGY_PRINT_DRAIN_MS = 200;
|
|
8
|
+
const AGY_PRINT_CANCEL_DEADLINE_MS = 5_000;
|
|
9
|
+
/** Spawn policy is exported so Windows fixtures can assert no inherited console/stdio. */
|
|
10
|
+
export function agyPrintSpawnOptions(platform, env) {
|
|
11
|
+
return {
|
|
12
|
+
env,
|
|
13
|
+
shell: false,
|
|
14
|
+
detached: true,
|
|
15
|
+
windowsHide: platform === "win32",
|
|
16
|
+
// On Windows CREATE_NO_WINDOW still exposes a windowless CONIN$. A real
|
|
17
|
+
// DETACHED_PROCESS prevents console inheritance; ignored stdin gives print
|
|
18
|
+
// mode immediate EOF without exposing an input descriptor.
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function composedEnv(patch) {
|
|
22
|
+
const env = composeBaseEnv("mirror_native");
|
|
23
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
24
|
+
if (value === null || value === undefined)
|
|
25
|
+
delete env[key];
|
|
26
|
+
else
|
|
27
|
+
env[key] = value;
|
|
28
|
+
}
|
|
29
|
+
return env;
|
|
30
|
+
}
|
|
31
|
+
function exactBinary(bin, env, platform, resolver) {
|
|
32
|
+
const resolved = resolver
|
|
33
|
+
? resolver(bin, env, platform)
|
|
34
|
+
: resolveHarnessBinary(bin, env, process.execPath, platform);
|
|
35
|
+
if (!resolved || !isAbsolute(resolved))
|
|
36
|
+
return null;
|
|
37
|
+
if (platform === "win32" && ![".exe", ".com"].includes(extname(resolved).toLowerCase())) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return resolved;
|
|
41
|
+
}
|
|
42
|
+
function boundedBuffer(maxBytes, overflow) {
|
|
43
|
+
const chunks = [];
|
|
44
|
+
let bytes = 0;
|
|
45
|
+
let overflowed = false;
|
|
46
|
+
const markOverflow = () => {
|
|
47
|
+
if (overflowed)
|
|
48
|
+
return;
|
|
49
|
+
overflowed = true;
|
|
50
|
+
overflow();
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
push(chunk) {
|
|
54
|
+
if (chunk.length === 0)
|
|
55
|
+
return;
|
|
56
|
+
// A prior chunk may have filled the cap exactly. The NEXT byte is still
|
|
57
|
+
// overflow and must cancel; silently returning here used to let an
|
|
58
|
+
// unbounded producer run forever. This also makes a zero-byte cap real.
|
|
59
|
+
if (bytes >= maxBytes) {
|
|
60
|
+
markOverflow();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const remaining = maxBytes - bytes;
|
|
64
|
+
if (chunk.length > remaining) {
|
|
65
|
+
if (remaining > 0)
|
|
66
|
+
chunks.push(chunk.subarray(0, remaining));
|
|
67
|
+
bytes = maxBytes;
|
|
68
|
+
markOverflow();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
chunks.push(chunk);
|
|
72
|
+
bytes += chunk.length;
|
|
73
|
+
},
|
|
74
|
+
text() {
|
|
75
|
+
return Buffer.concat(chunks, bytes).toString("utf8");
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function delay(ms) {
|
|
80
|
+
return new Promise((resolve) => {
|
|
81
|
+
const timer = setTimeout(resolve, ms);
|
|
82
|
+
timer.unref();
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Bounded print-mode owner for `/model` and `/quota`. The child has no stdin
|
|
87
|
+
* and no controlling terminal: POSIX starts a new session; Windows uses
|
|
88
|
+
* DETACHED_PROCESS because CREATE_NO_WINDOW still exposes a windowless
|
|
89
|
+
* CONIN$. Child exit is completion authority; descendant-held pipes receive
|
|
90
|
+
* only a bounded drain.
|
|
91
|
+
*/
|
|
92
|
+
export async function runAgyPrintCommand(bin, command, envPatch, options = {}) {
|
|
93
|
+
const platform = options.platform ?? process.platform;
|
|
94
|
+
const env = composedEnv(envPatch);
|
|
95
|
+
const resolved = exactBinary(bin, env, platform, options.resolveBinary);
|
|
96
|
+
if (!resolved) {
|
|
97
|
+
return {
|
|
98
|
+
kind: "failed",
|
|
99
|
+
reason: "spawn_failed",
|
|
100
|
+
detail: `agy executable could not be resolved to an exact ${platform === "win32" ? "Windows image" : "regular executable"}`,
|
|
101
|
+
stdout: "",
|
|
102
|
+
stderr: "",
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
if (options.abortSignal?.aborted) {
|
|
106
|
+
return {
|
|
107
|
+
kind: "failed",
|
|
108
|
+
reason: "aborted",
|
|
109
|
+
detail: "agy print probe was aborted",
|
|
110
|
+
stdout: "",
|
|
111
|
+
stderr: "",
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
let child;
|
|
115
|
+
try {
|
|
116
|
+
child = (options.spawnProcess ?? spawn)(resolved, ["-p", command, "--output-format", "json"], {
|
|
117
|
+
...agyPrintSpawnOptions(platform, env),
|
|
118
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
return {
|
|
123
|
+
kind: "failed",
|
|
124
|
+
reason: "spawn_failed",
|
|
125
|
+
detail: redactSecrets(error instanceof Error ? error.message : String(error)).slice(0, 300),
|
|
126
|
+
stdout: "",
|
|
127
|
+
stderr: "",
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
const pid = child.pid;
|
|
131
|
+
const processRegistry = options.processRegistry ?? {
|
|
132
|
+
register: registerChildProcess,
|
|
133
|
+
unregister: unregisterChildProcess,
|
|
134
|
+
};
|
|
135
|
+
let registered = false;
|
|
136
|
+
if (typeof pid === "number") {
|
|
137
|
+
processRegistry.register(pid, resolved);
|
|
138
|
+
registered = true;
|
|
139
|
+
}
|
|
140
|
+
const unregisterExitedChild = () => {
|
|
141
|
+
if (!registered || typeof pid !== "number")
|
|
142
|
+
return;
|
|
143
|
+
registered = false;
|
|
144
|
+
processRegistry.unregister(pid);
|
|
145
|
+
};
|
|
146
|
+
let group;
|
|
147
|
+
if (platform !== "win32" && typeof pid === "number") {
|
|
148
|
+
const captured = defaultProcessGroupService.captureLeader(pid);
|
|
149
|
+
if (captured.status === "known")
|
|
150
|
+
group = captured.handle;
|
|
151
|
+
}
|
|
152
|
+
let requested = null;
|
|
153
|
+
let reap = null;
|
|
154
|
+
let cancellationDeadlineTimer;
|
|
155
|
+
let resolveCancellationDeadline;
|
|
156
|
+
const cancellationDeadline = new Promise((resolve) => {
|
|
157
|
+
resolveCancellationDeadline = resolve;
|
|
158
|
+
});
|
|
159
|
+
const requestCancel = (why) => {
|
|
160
|
+
requested ??= why;
|
|
161
|
+
if (!cancellationDeadlineTimer) {
|
|
162
|
+
// Relative to the FIRST cancellation trigger, not the original process
|
|
163
|
+
// timeout. Abort/overflow at t=0 must settle after one cancel deadline,
|
|
164
|
+
// never after timeout+deadline.
|
|
165
|
+
cancellationDeadlineTimer = setTimeout(() => resolveCancellationDeadline({ kind: "unconfirmed_wait" }), options.cancelDeadlineMs ?? AGY_PRINT_CANCEL_DEADLINE_MS);
|
|
166
|
+
}
|
|
167
|
+
if (reap || typeof pid !== "number") {
|
|
168
|
+
try {
|
|
169
|
+
child.kill("SIGKILL");
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
/* already gone */
|
|
173
|
+
}
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
reap = (options.reap ?? reapProcessTree)({
|
|
177
|
+
rootPid: pid,
|
|
178
|
+
cooperativeSignal: "SIGKILL",
|
|
179
|
+
graceMs: 0,
|
|
180
|
+
deadlineMs: options.cancelDeadlineMs ?? AGY_PRINT_CANCEL_DEADLINE_MS,
|
|
181
|
+
...(group ? { seedHandles: [group], rootIdentity: group.leader } : {}),
|
|
182
|
+
platform,
|
|
183
|
+
});
|
|
184
|
+
try {
|
|
185
|
+
child.kill("SIGKILL");
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
/* the tree reaper owns the bounded proof */
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
const stdout = boundedBuffer(options.maxStdoutBytes ?? AGY_PRINT_STREAM_LIMIT_BYTES, () => requestCancel("overflow"));
|
|
192
|
+
const stderr = boundedBuffer(options.maxStderrBytes ?? AGY_PRINT_STREAM_LIMIT_BYTES, () => requestCancel("overflow"));
|
|
193
|
+
child.stdout.on("data", (chunk) => stdout.push(chunk));
|
|
194
|
+
child.stderr.on("data", (chunk) => stderr.push(chunk));
|
|
195
|
+
let stdoutEnded = false;
|
|
196
|
+
let stderrEnded = false;
|
|
197
|
+
const stdoutEnd = new Promise((resolve) => child.stdout.once("end", () => {
|
|
198
|
+
stdoutEnded = true;
|
|
199
|
+
resolve();
|
|
200
|
+
}));
|
|
201
|
+
const stderrEnd = new Promise((resolve) => child.stderr.once("end", () => {
|
|
202
|
+
stderrEnded = true;
|
|
203
|
+
resolve();
|
|
204
|
+
}));
|
|
205
|
+
const terminal = new Promise((resolve) => {
|
|
206
|
+
let settled = false;
|
|
207
|
+
const settle = (value) => {
|
|
208
|
+
if (settled)
|
|
209
|
+
return;
|
|
210
|
+
settled = true;
|
|
211
|
+
resolve(value);
|
|
212
|
+
};
|
|
213
|
+
child.once("error", (error) => {
|
|
214
|
+
unregisterExitedChild();
|
|
215
|
+
settle({ kind: "error", error });
|
|
216
|
+
});
|
|
217
|
+
child.once("exit", (code, signal) => {
|
|
218
|
+
unregisterExitedChild();
|
|
219
|
+
settle({ kind: "exit", code, signal });
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
const timeout = setTimeout(() => requestCancel("timeout"), options.timeoutMs ?? AGY_PRINT_TIMEOUT_MS);
|
|
223
|
+
timeout.unref();
|
|
224
|
+
const onAbort = () => requestCancel("abort");
|
|
225
|
+
options.abortSignal?.addEventListener("abort", onAbort, { once: true });
|
|
226
|
+
// Abort can race the synchronous spawn/setup window after the pre-spawn
|
|
227
|
+
// check but before listener registration. AbortSignal does not replay that
|
|
228
|
+
// event, so sample it again after the listener is armed.
|
|
229
|
+
if (options.abortSignal?.aborted)
|
|
230
|
+
requestCancel("abort");
|
|
231
|
+
const outcome = await Promise.race([terminal, cancellationDeadline]);
|
|
232
|
+
clearTimeout(timeout);
|
|
233
|
+
if (cancellationDeadlineTimer)
|
|
234
|
+
clearTimeout(cancellationDeadlineTimer);
|
|
235
|
+
options.abortSignal?.removeEventListener("abort", onAbort);
|
|
236
|
+
// Do not await descendant-owned EOF indefinitely. Give bytes already in the
|
|
237
|
+
// pipes a small drain window, then detach the readers.
|
|
238
|
+
await Promise.race([
|
|
239
|
+
Promise.all([stdoutEnd, stderrEnd]).then(() => undefined),
|
|
240
|
+
delay(options.drainMs ?? AGY_PRINT_DRAIN_MS),
|
|
241
|
+
]);
|
|
242
|
+
if (!stdoutEnded)
|
|
243
|
+
child.stdout.destroy();
|
|
244
|
+
if (!stderrEnded)
|
|
245
|
+
child.stderr.destroy();
|
|
246
|
+
let termination = null;
|
|
247
|
+
if (reap) {
|
|
248
|
+
try {
|
|
249
|
+
termination = await Promise.race([
|
|
250
|
+
reap,
|
|
251
|
+
delay(options.cancelDeadlineMs ?? AGY_PRINT_CANCEL_DEADLINE_MS).then(() => ({
|
|
252
|
+
state: "unconfirmed",
|
|
253
|
+
survivors: typeof pid === "number" ? [pid] : [],
|
|
254
|
+
unresolved: [],
|
|
255
|
+
})),
|
|
256
|
+
]);
|
|
257
|
+
}
|
|
258
|
+
catch {
|
|
259
|
+
termination = {
|
|
260
|
+
state: "unconfirmed",
|
|
261
|
+
survivors: typeof pid === "number" ? [pid] : [],
|
|
262
|
+
unresolved: [],
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
const capturedOut = stdout.text();
|
|
267
|
+
const capturedErr = stderr.text();
|
|
268
|
+
const streamDetail = labelStreams(capturedErr, capturedOut, {
|
|
269
|
+
maxLen: 300,
|
|
270
|
+
transform: redactSecrets,
|
|
271
|
+
});
|
|
272
|
+
if (outcome.kind === "error") {
|
|
273
|
+
return {
|
|
274
|
+
kind: "failed",
|
|
275
|
+
reason: "spawn_failed",
|
|
276
|
+
detail: redactSecrets(outcome.error.message).slice(0, 300),
|
|
277
|
+
stdout: capturedOut,
|
|
278
|
+
stderr: capturedErr,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
if (outcome.kind === "unconfirmed_wait" || termination?.state === "unconfirmed") {
|
|
282
|
+
return {
|
|
283
|
+
kind: "failed",
|
|
284
|
+
reason: "termination_unconfirmed",
|
|
285
|
+
detail: streamDetail ?? "agy print probe termination could not be confirmed",
|
|
286
|
+
stdout: capturedOut,
|
|
287
|
+
stderr: capturedErr,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
if (requested) {
|
|
291
|
+
const reason = requested === "timeout" ? "timed_out" : requested === "abort" ? "aborted" : "output_overflow";
|
|
292
|
+
return {
|
|
293
|
+
kind: "failed",
|
|
294
|
+
reason,
|
|
295
|
+
detail: streamDetail ??
|
|
296
|
+
(reason === "timed_out"
|
|
297
|
+
? `agy did not answer ${command} within ${(options.timeoutMs ?? AGY_PRINT_TIMEOUT_MS) / 1000}s`
|
|
298
|
+
: reason === "aborted"
|
|
299
|
+
? "agy print probe was aborted"
|
|
300
|
+
: "agy print output exceeded its bounded stream limit"),
|
|
301
|
+
stdout: capturedOut,
|
|
302
|
+
stderr: capturedErr,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
return {
|
|
306
|
+
kind: "completed",
|
|
307
|
+
code: outcome.code,
|
|
308
|
+
signal: outcome.signal,
|
|
309
|
+
stdout: capturedOut,
|
|
310
|
+
stderr: capturedErr,
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
const RECOGNIZED_AUTH_REJECTIONS = [
|
|
314
|
+
"authentication required",
|
|
315
|
+
"authentication failed or timed out",
|
|
316
|
+
"not authenticated",
|
|
317
|
+
"login required",
|
|
318
|
+
"credential revoked",
|
|
319
|
+
"credentials revoked",
|
|
320
|
+
"token revoked",
|
|
321
|
+
"token expired",
|
|
322
|
+
];
|
|
323
|
+
function vendorError(envelope) {
|
|
324
|
+
const error = envelope["error"];
|
|
325
|
+
if (typeof error === "string" && error.trim())
|
|
326
|
+
return error.trim();
|
|
327
|
+
if (error && typeof error === "object" && !Array.isArray(error)) {
|
|
328
|
+
const message = error["message"];
|
|
329
|
+
if (typeof message === "string" && message.trim())
|
|
330
|
+
return message.trim();
|
|
331
|
+
}
|
|
332
|
+
return null;
|
|
333
|
+
}
|
|
334
|
+
function recognizedAuthRejection(detail) {
|
|
335
|
+
const normalized = detail.trim().toLowerCase().replaceAll(/\s+/g, " ");
|
|
336
|
+
return RECOGNIZED_AUTH_REJECTIONS.some((prefix) => normalized === prefix ||
|
|
337
|
+
normalized.startsWith(`${prefix}.`) ||
|
|
338
|
+
normalized.startsWith(`${prefix}:`) ||
|
|
339
|
+
normalized.startsWith(`${prefix} `));
|
|
340
|
+
}
|
|
341
|
+
/** Shared exit/envelope/auth classifier for doctor and quota. */
|
|
342
|
+
export function classifyAgyPrintResult(result) {
|
|
343
|
+
if (result.kind === "failed") {
|
|
344
|
+
return { kind: "probe_failed", detail: redactSecrets(result.detail).slice(0, 300) };
|
|
345
|
+
}
|
|
346
|
+
const streams = labelStreams(result.stderr, result.stdout, {
|
|
347
|
+
maxLen: 300,
|
|
348
|
+
transform: redactSecrets,
|
|
349
|
+
});
|
|
350
|
+
if (result.signal !== null) {
|
|
351
|
+
return {
|
|
352
|
+
kind: "probe_failed",
|
|
353
|
+
detail: `agy exited by signal ${result.signal}${streams ? ` (${streams})` : ""}`,
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
if (!result.stdout.trim()) {
|
|
357
|
+
return { kind: "probe_failed", detail: streams ?? "agy returned empty stdout" };
|
|
358
|
+
}
|
|
359
|
+
let envelope;
|
|
360
|
+
try {
|
|
361
|
+
envelope = JSON.parse(result.stdout);
|
|
362
|
+
}
|
|
363
|
+
catch {
|
|
364
|
+
return { kind: "probe_failed", detail: streams ?? "agy output was not valid JSON" };
|
|
365
|
+
}
|
|
366
|
+
if (!envelope || typeof envelope !== "object" || Array.isArray(envelope)) {
|
|
367
|
+
return { kind: "probe_failed", detail: "agy output was not a JSON object" };
|
|
368
|
+
}
|
|
369
|
+
const record = envelope;
|
|
370
|
+
const error = vendorError(record);
|
|
371
|
+
if (record["status"] === "ERROR" && error && recognizedAuthRejection(error)) {
|
|
372
|
+
return { kind: "unauthenticated", detail: redactSecrets(error).slice(0, 300) };
|
|
373
|
+
}
|
|
374
|
+
if (result.code !== 0 || record["status"] !== "SUCCESS") {
|
|
375
|
+
return {
|
|
376
|
+
kind: "probe_failed",
|
|
377
|
+
detail: (error ? redactSecrets(error).slice(0, 300) : null) ??
|
|
378
|
+
streams ??
|
|
379
|
+
`agy returned unsupported status/exit combination (status ${String(record["status"])}; exit ${String(result.code)})`,
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
return { kind: "success", envelope: record };
|
|
383
|
+
}
|
|
384
|
+
//# sourceMappingURL=print-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print-command.js","sourceRoot":"","sources":["../src/print-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAA2D,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAC3C,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,GAAG,IAAI,CAAC;AACvD,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,4BAA4B,GAAG,KAAK,CAAC;AA6C3C,0FAA0F;AAC1F,MAAM,UAAU,oBAAoB,CAClC,QAAyB,EACzB,GAAsB;IAEt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IAClC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,OAAO,IAAI,KAAK,IAAI,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5E,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;IACjF,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;QACxD,OAAO;YACL,IAAI,EAAE,cAAc;YACpB,MAAM,EACJ,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBACnD,OAAO;gBACP,4DAA4D,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG;SACvH,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC/C,CAAC"}
|
package/dist/profile.d.ts
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import type { CredentialProfile, CredentialProfileStatus } from "@claudexor/schema";
|
|
2
2
|
type EnvMap = Record<string, string | null | undefined>;
|
|
3
3
|
export declare const AGY_BIN: () => string;
|
|
4
|
-
/** Canonical, Claudexor-owned HOME for one named Antigravity
|
|
4
|
+
/** Canonical, Claudexor-owned HOME for one named Antigravity binding. */
|
|
5
5
|
export declare function canonicalAgyProfileHome(locator: string): string;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* login keychain in `$HOME/Library/Keychains` → `falling back to file`); the
|
|
10
|
-
* profile mechanism therefore REQUIRES that no keychain ever be created
|
|
11
|
-
* inside the profile HOME. Live-proven on three separate Google accounts
|
|
12
|
-
* (PLAN §1.2a-1.2c); re-proven per AGY_VENDOR_CLI_VERSION bump because the
|
|
13
|
-
* fallback is a vendor error path, not a documented mode (R-2').
|
|
14
|
-
*/
|
|
6
|
+
/** Diagnostic-only path for stale-file precedence fixtures. Credential
|
|
7
|
+
* readiness and routing never infer auth from this file: the effective
|
|
8
|
+
* transport is platform/version dependent and only the vendor probe proves it. */
|
|
15
9
|
export declare function agyTokenPath(profileHome: string): string;
|
|
16
|
-
/** The token must be a regular FILE: a directory at that path is a malformed
|
|
17
|
-
* profile, not a login, and must refuse rather than route (Ф0 review #11). */
|
|
18
|
-
export declare function agyTokenFilePresent(profileHome: string): boolean;
|
|
19
10
|
/**
|
|
20
11
|
* Exact strict-profile env: the profile HOME selects the vendor's whole
|
|
21
12
|
* config root (`$HOME/.gemini/...`) — agy has no config-dir env var, HOME is
|
|
@@ -46,10 +37,10 @@ export type AgyResolvedProfileRoute = {
|
|
|
46
37
|
refusal: string;
|
|
47
38
|
};
|
|
48
39
|
/**
|
|
49
|
-
* INV-135
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
40
|
+
* INV-135 route construction only: validate the named binding and build the
|
|
41
|
+
* exact scoped environment. Credential evidence belongs exclusively to the
|
|
42
|
+
* vendor probe; this resolver never treats a fallback token file (or its
|
|
43
|
+
* absence) as an auth oracle.
|
|
53
44
|
*/
|
|
54
45
|
export declare function resolveAgyProfileRoute(profile: Pick<CredentialProfile, "profile_id" | "credential_kind" | "isolation_locator">, specEnv?: EnvMap): AgyResolvedProfileRoute;
|
|
55
46
|
export interface AgyProfileProbeDeps {
|
|
@@ -69,7 +60,7 @@ export type AgyModelProbe = {
|
|
|
69
60
|
/**
|
|
70
61
|
* Quota-free liveness probe: `agy -p "/model" --output-format json` answers
|
|
71
62
|
* from the CLI without spending a turn (vendor 1.1.11+ print-mode
|
|
72
|
-
* slash-commands). SUCCESS proves the
|
|
63
|
+
* slash-commands). SUCCESS proves the named binding authenticates in the
|
|
73
64
|
* exact env its runs will spawn with (INV-067); an auth error is an honest
|
|
74
65
|
* logged-out/revoked verdict, and a spawn/parse failure stays `unknown`.
|
|
75
66
|
*/
|
package/dist/profile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAKpF,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAExD,eAAO,MAAM,OAAO,cAA+C,CAAC;AAEpE,yEAAyE;AACzE,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;kFAEkF;AAClF,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,MAAW,GAAG,MAAM,CASlF;AAED,MAAM,MAAM,uBAAuB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,iBAAiB,GAAG,mBAAmB,CAAC,EACxF,OAAO,GAAE,MAAW,GACnB,uBAAuB,CAWzB;AAED,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;CACnF;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,aAAa,CAAC,CA0BxB;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,iBAAiB,EAC1B,IAAI,GAAE,mBAA6D,EACnE,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAkClC"}
|
package/dist/profile.js
CHANGED
|
@@ -1,35 +1,19 @@
|
|
|
1
|
-
import { statSync } from "node:fs";
|
|
2
1
|
import { join } from "node:path";
|
|
3
|
-
import { canonicalIsolationLocator, providerScrubEnv
|
|
2
|
+
import { canonicalIsolationLocator, providerScrubEnv } from "@claudexor/core";
|
|
4
3
|
import { CredentialProfileStatus as CredentialProfileStatusSchema } from "@claudexor/schema";
|
|
5
4
|
import { nowIso, redactSecrets } from "@claudexor/util";
|
|
5
|
+
import { classifyAgyPrintResult, runAgyPrintCommand } from "./print-command.js";
|
|
6
6
|
export const AGY_BIN = () => process.env.CLAUDEXOR_AGY_BIN || "agy";
|
|
7
|
-
/** Canonical, Claudexor-owned HOME for one named Antigravity
|
|
7
|
+
/** Canonical, Claudexor-owned HOME for one named Antigravity binding. */
|
|
8
8
|
export function canonicalAgyProfileHome(locator) {
|
|
9
9
|
return canonicalIsolationLocator(locator, "credential profile Antigravity HOME");
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* login keychain in `$HOME/Library/Keychains` → `falling back to file`); the
|
|
15
|
-
* profile mechanism therefore REQUIRES that no keychain ever be created
|
|
16
|
-
* inside the profile HOME. Live-proven on three separate Google accounts
|
|
17
|
-
* (PLAN §1.2a-1.2c); re-proven per AGY_VENDOR_CLI_VERSION bump because the
|
|
18
|
-
* fallback is a vendor error path, not a documented mode (R-2').
|
|
19
|
-
*/
|
|
11
|
+
/** Diagnostic-only path for stale-file precedence fixtures. Credential
|
|
12
|
+
* readiness and routing never infer auth from this file: the effective
|
|
13
|
+
* transport is platform/version dependent and only the vendor probe proves it. */
|
|
20
14
|
export function agyTokenPath(profileHome) {
|
|
21
15
|
return join(profileHome, ".gemini", "antigravity-cli", "antigravity-oauth-token");
|
|
22
16
|
}
|
|
23
|
-
/** The token must be a regular FILE: a directory at that path is a malformed
|
|
24
|
-
* profile, not a login, and must refuse rather than route (Ф0 review #11). */
|
|
25
|
-
export function agyTokenFilePresent(profileHome) {
|
|
26
|
-
try {
|
|
27
|
-
return statSync(agyTokenPath(profileHome)).isFile();
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
17
|
/**
|
|
34
18
|
* Exact strict-profile env: the profile HOME selects the vendor's whole
|
|
35
19
|
* config root (`$HOME/.gemini/...`) — agy has no config-dir env var, HOME is
|
|
@@ -63,10 +47,10 @@ export function agyProfileRunEnv(profileHome, specEnv = {}) {
|
|
|
63
47
|
};
|
|
64
48
|
}
|
|
65
49
|
/**
|
|
66
|
-
* INV-135
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
50
|
+
* INV-135 route construction only: validate the named binding and build the
|
|
51
|
+
* exact scoped environment. Credential evidence belongs exclusively to the
|
|
52
|
+
* vendor probe; this resolver never treats a fallback token file (or its
|
|
53
|
+
* absence) as an auth oracle.
|
|
70
54
|
*/
|
|
71
55
|
export function resolveAgyProfileRoute(profile, specEnv = {}) {
|
|
72
56
|
if (profile.credential_kind !== "config_dir_login")
|
|
@@ -75,10 +59,6 @@ export function resolveAgyProfileRoute(profile, specEnv = {}) {
|
|
|
75
59
|
};
|
|
76
60
|
try {
|
|
77
61
|
const home = canonicalAgyProfileHome(profile.isolation_locator ?? "");
|
|
78
|
-
if (!agyTokenFilePresent(home))
|
|
79
|
-
return {
|
|
80
|
-
refusal: `credential profile "${profile.profile_id}" has no Antigravity login in its profile HOME (run \`claudexor profiles login agy ${profile.profile_id}\` first)`,
|
|
81
|
-
};
|
|
82
62
|
return { home, env: agyProfileRunEnv(home, specEnv) };
|
|
83
63
|
}
|
|
84
64
|
catch (err) {
|
|
@@ -88,28 +68,28 @@ export function resolveAgyProfileRoute(profile, specEnv = {}) {
|
|
|
88
68
|
/**
|
|
89
69
|
* Quota-free liveness probe: `agy -p "/model" --output-format json` answers
|
|
90
70
|
* from the CLI without spending a turn (vendor 1.1.11+ print-mode
|
|
91
|
-
* slash-commands). SUCCESS proves the
|
|
71
|
+
* slash-commands). SUCCESS proves the named binding authenticates in the
|
|
92
72
|
* exact env its runs will spawn with (INV-067); an auth error is an honest
|
|
93
73
|
* logged-out/revoked verdict, and a spawn/parse failure stays `unknown`.
|
|
94
74
|
*/
|
|
95
75
|
export async function defaultAgyModelProbe(env, abortSignal) {
|
|
96
76
|
try {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
kind: "
|
|
111
|
-
|
|
112
|
-
};
|
|
77
|
+
const classified = classifyAgyPrintResult(await runAgyPrintCommand(AGY_BIN(), "/model", env, { abortSignal }));
|
|
78
|
+
if (classified.kind === "unauthenticated")
|
|
79
|
+
return classified;
|
|
80
|
+
if (classified.kind === "probe_failed")
|
|
81
|
+
return classified;
|
|
82
|
+
const command = classified.envelope["command"];
|
|
83
|
+
const data = command && typeof command === "object" && !Array.isArray(command)
|
|
84
|
+
? command["data"]
|
|
85
|
+
: null;
|
|
86
|
+
const id = data && typeof data === "object" && !Array.isArray(data)
|
|
87
|
+
? data["id"]
|
|
88
|
+
: null;
|
|
89
|
+
if (typeof id !== "string" || !id.trim()) {
|
|
90
|
+
return { kind: "probe_failed", detail: "agy model envelope carried no model id" };
|
|
91
|
+
}
|
|
92
|
+
return { kind: "authenticated", modelId: id };
|
|
113
93
|
}
|
|
114
94
|
catch (err) {
|
|
115
95
|
return {
|
|
@@ -140,7 +120,8 @@ export async function probeAgyCredentialProfile(profile, deps = { runModelProbe:
|
|
|
140
120
|
...base,
|
|
141
121
|
availability: "available",
|
|
142
122
|
verification: "passed",
|
|
143
|
-
|
|
123
|
+
verification_source: "vendor",
|
|
124
|
+
detail: `Antigravity accepted the named binding${probe.modelId ? ` (model ${probe.modelId})` : ""}; whether the credential is backed by a keyring or file is not inferred`,
|
|
144
125
|
last_verified_at: nowIso(),
|
|
145
126
|
});
|
|
146
127
|
if (probe.kind === "unauthenticated")
|
|
@@ -148,7 +129,8 @@ export async function probeAgyCredentialProfile(profile, deps = { runModelProbe:
|
|
|
148
129
|
...base,
|
|
149
130
|
availability: "unavailable",
|
|
150
131
|
verification: "failed",
|
|
151
|
-
|
|
132
|
+
verification_source: "vendor",
|
|
133
|
+
detail: `Antigravity rejected the named binding credential: ${probe.detail}`,
|
|
152
134
|
});
|
|
153
135
|
return CredentialProfileStatusSchema.parse({
|
|
154
136
|
...base,
|
package/dist/profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAA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AAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,yEAAyE;YAC1K,gBAAgB,EAAE,MAAM,EAAE;SAC3B,CAAC,CAAC;IACL,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB;QAClC,OAAO,6BAA6B,CAAC,KAAK,CAAC;YACzC,GAAG,IAAI;YACP,YAAY,EAAE,aAAa;YAC3B,YAAY,EAAE,QAAQ;YACtB,mBAAmB,EAAE,QAAQ;YAC7B,MAAM,EAAE,sDAAsD,KAAK,CAAC,MAAM,EAAE;SAC7E,CAAC,CAAC;IACL,OAAO,6BAA6B,CAAC,KAAK,CAAC;QACzC,GAAG,IAAI;QACP,YAAY,EAAE,SAAS;QACvB,YAAY,EAAE,SAAS;QACvB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudexor/harness-agy",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Google Antigravity CLI adapter (agy -p --output-format stream-json).",
|
|
6
6
|
"type": "module",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@claudexor/
|
|
20
|
-
"@claudexor/
|
|
21
|
-
"@claudexor/
|
|
19
|
+
"@claudexor/core": "3.8.0",
|
|
20
|
+
"@claudexor/util": "3.8.0",
|
|
21
|
+
"@claudexor/schema": "3.8.0"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|