@claudexor/harness-agy 3.6.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -5
- package/dist/index.d.ts +24 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +123 -44
- package/dist/index.js.map +1 -1
- package/dist/keychain.d.ts +41 -0
- package/dist/keychain.d.ts.map +1 -0
- package/dist/keychain.js +354 -0
- package/dist/keychain.js.map +1 -0
- 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 +11 -18
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +53 -49
- package/dist/profile.js.map +1 -1
- package/dist/vendor-cli-version.d.ts +6 -3
- package/dist/vendor-cli-version.d.ts.map +1 -1
- package/dist/vendor-cli-version.js +6 -3
- package/dist/vendor-cli-version.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -3,11 +3,25 @@
|
|
|
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
|
-
keychain
|
|
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
|
+
On Darwin, Claudexor lazily prepares the profile's own
|
|
10
|
+
`Library/Keychains/login.keychain-db` before an agy child starts. When setup
|
|
11
|
+
succeeds this prevents the missing-keychain prompt; an unsafe profile path
|
|
12
|
+
refuses that child before it can trigger SecurityAgent, while an operational
|
|
13
|
+
setup miss leaves the vendor's own file fallback available. The implementation
|
|
14
|
+
bootstraps the DB under a neutral filename and adopts the canonical name,
|
|
15
|
+
because Apple's `security` tool treats a path containing `login.keychain` as a
|
|
16
|
+
user search-list entry. This keeps host default/list preferences untouched.
|
|
17
|
+
The vendor still owns the item; no host Keychain is bridged and no credential
|
|
18
|
+
bytes are copied. Linux keeps the config-file/HOME route.
|
|
19
|
+
Windows uses the current OS user's Credential Manager identity, permits one
|
|
20
|
+
enabled binding, and treats HOME as state scoping rather than an independent
|
|
21
|
+
Google identity.
|
|
22
|
+
Readiness always comes from the bounded vendor `/model` probe, never from the
|
|
23
|
+
presence or absence of `antigravity-oauth-token`. See `src/profile.ts` for the
|
|
24
|
+
route and verification contract.
|
|
11
25
|
|
|
12
26
|
Fixtures under `fixtures/` pin the recorded 1.1.13 stream shapes; see
|
|
13
27
|
`fixtures/manifest.yaml` for provenance and stream-semantics expectations.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
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 { isAgyProfileKeychainUnsafe, prepareAgyProfileKeychain } from "./keychain.js";
|
|
5
|
+
export { classifyAgyPrintResult, runAgyPrintCommand, type AgyPrintClassification, } from "./print-command.js";
|
|
3
6
|
/**
|
|
4
7
|
* The vendor's two quota GROUPS map onto disjoint halves of the same
|
|
5
8
|
* inventory: "Gemini Models" and "Claude and GPT models" (PLAN §1.2 F8). The
|
|
@@ -8,5 +11,24 @@ export { AGY_BIN, agyProfileRunEnv, agyTokenFilePresent, canonicalAgyProfileHome
|
|
|
8
11
|
*/
|
|
9
12
|
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
13
|
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")[];
|
|
11
|
-
|
|
14
|
+
/** One manifest-owned declaration of the managed login's stdin contract. */
|
|
15
|
+
export declare const AGY_MANAGED_LOGIN: {
|
|
16
|
+
readonly stdin: "terminal";
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Static auth/profile policy. Windows Credential Manager is scoped to the OS
|
|
20
|
+
* user, not the profile HOME, so only one enabled binding is honest there.
|
|
21
|
+
* Darwin keeps both the vendor file fallback and its private profile-local
|
|
22
|
+
* keychain; Linux retains the legacy profile-scoped file route.
|
|
23
|
+
*/
|
|
24
|
+
export declare const AGY_CAPABILITY_PROFILE: HarnessCapabilityProfile;
|
|
25
|
+
/** Platform disclosure derived from the same transport and effective-policy
|
|
26
|
+
* facts used by admission. Darwin is the one live-proven profile-isolation
|
|
27
|
+
* lane; other lanes stay explicit rather than maintaining parallel truth. */
|
|
28
|
+
export declare function agyPlatformIsolationDetail(platform?: NodeJS.Platform): string | null;
|
|
29
|
+
export interface AgyAdapterOptions {
|
|
30
|
+
/** Test seam; production prepares the declared private Darwin keychain. */
|
|
31
|
+
prepareProfileKeychain?: (home: string, platform?: NodeJS.Platform) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function createAgyAdapter(options?: AgyAdapterOptions): HarnessAdapter;
|
|
12
34
|
//# 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;AAsBlE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC;AA0D5B;;;;;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;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,wBA+CjC,CAAC;AAEL;;6EAE6E;AAC7E,wBAAgB,0BAA0B,CACxC,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC3C,MAAM,GAAG,IAAI,CAgBf;AAeD,MAAM,WAAW,iBAAiB;IAChC,2EAA2E;IAC3E,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,KAAK,IAAI,CAAC;CAC7E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,iBAAsB,GAAG,cAAc,CAiLhF"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
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, needsPrivatePerProfileKeychain, promptWithInstructions, runCapture, runCliHarness, } from "@claudexor/core";
|
|
3
3
|
import { CLAUDEXOR_VERSION, nowIso, redactSecrets } from "@claudexor/util";
|
|
4
4
|
import { parseAgyEvent } from "./parse.js";
|
|
5
|
-
import {
|
|
5
|
+
import { isAgyProfileKeychainUnsafe, prepareAgyProfileKeychain } from "./keychain.js";
|
|
6
|
+
import { AGY_BIN, defaultAgyModelProbe, probeAgyCredentialProfile, resolveAgyProfileRoute, } from "./profile.js";
|
|
6
7
|
import { AGY_VENDOR_CLI_VERSION } from "./vendor-cli-version.js";
|
|
7
8
|
// The package publishes only what other packages consume. The profile probe,
|
|
8
9
|
// the route resolver and the stream parser are reached through the adapter
|
|
9
10
|
// this file returns, so re-exporting them would be a dead public surface.
|
|
10
|
-
export { AGY_BIN, agyProfileRunEnv,
|
|
11
|
+
export { AGY_BIN, agyProfileRunEnv, canonicalAgyProfileHome } from "./profile.js";
|
|
12
|
+
export { isAgyProfileKeychainUnsafe, prepareAgyProfileKeychain } from "./keychain.js";
|
|
13
|
+
export { classifyAgyPrintResult, runAgyPrintCommand, } from "./print-command.js";
|
|
11
14
|
/**
|
|
12
15
|
* Access mapping, each leg LIVE-PROVEN on agy 1.1.13 (PLAN §1.2 F11, §1.2d):
|
|
13
16
|
* plan mode answered read-only prompts and withheld a requested write;
|
|
@@ -21,7 +24,6 @@ function accessArgs(access) {
|
|
|
21
24
|
case "workspace_write":
|
|
22
25
|
return ["--mode", "accept-edits"];
|
|
23
26
|
case "full":
|
|
24
|
-
case "external_sandbox_full":
|
|
25
27
|
return ["--dangerously-skip-permissions"];
|
|
26
28
|
case "inherit_native":
|
|
27
29
|
return [];
|
|
@@ -71,6 +73,78 @@ const AGY_KNOWN_MODELS = [
|
|
|
71
73
|
*/
|
|
72
74
|
export const AGY_GEMINI_MODELS = AGY_KNOWN_MODELS.filter((m) => m.startsWith("gemini-"));
|
|
73
75
|
export const AGY_THIRD_PARTY_MODELS = AGY_KNOWN_MODELS.filter((m) => !m.startsWith("gemini-"));
|
|
76
|
+
/** One manifest-owned declaration of the managed login's stdin contract. */
|
|
77
|
+
export const AGY_MANAGED_LOGIN = { stdin: "terminal" };
|
|
78
|
+
/**
|
|
79
|
+
* Static auth/profile policy. Windows Credential Manager is scoped to the OS
|
|
80
|
+
* user, not the profile HOME, so only one enabled binding is honest there.
|
|
81
|
+
* Darwin keeps both the vendor file fallback and its private profile-local
|
|
82
|
+
* keychain; Linux retains the legacy profile-scoped file route.
|
|
83
|
+
*/
|
|
84
|
+
export const AGY_CAPABILITY_PROFILE = HarnessCapabilityProfileSchema.parse({
|
|
85
|
+
auth: {
|
|
86
|
+
supported_sources: ["native_session"],
|
|
87
|
+
preferred_source: "native_session",
|
|
88
|
+
credential_transports: [
|
|
89
|
+
{
|
|
90
|
+
source: "native_session",
|
|
91
|
+
kind: "config_file",
|
|
92
|
+
relocatable_by: ["HOME"],
|
|
93
|
+
platforms: ["linux"],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
source: "native_session",
|
|
97
|
+
kind: "config_file",
|
|
98
|
+
relocatable_by: ["HOME"],
|
|
99
|
+
platforms: ["darwin"],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
source: "native_session",
|
|
103
|
+
kind: "os_keychain",
|
|
104
|
+
relocatable_by: ["HOME"],
|
|
105
|
+
platforms: ["darwin"],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
source: "native_session",
|
|
109
|
+
kind: "os_keychain",
|
|
110
|
+
relocatable_by: [],
|
|
111
|
+
platforms: ["win32"],
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
credential_profile_policies: [
|
|
115
|
+
{
|
|
116
|
+
source: "native_session",
|
|
117
|
+
platforms: ["win32"],
|
|
118
|
+
identity_scope: "os_user",
|
|
119
|
+
max_enabled_profiles: 1,
|
|
120
|
+
cleanup_owner: "vendor",
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
managed_login: AGY_MANAGED_LOGIN,
|
|
124
|
+
},
|
|
125
|
+
access_control: { readonly_mechanism: "permission_deny" },
|
|
126
|
+
isolation: {
|
|
127
|
+
supported_containment: ["env_or_file_injection", "private_per_profile_keychain"],
|
|
128
|
+
},
|
|
129
|
+
attachment_inputs: [],
|
|
130
|
+
});
|
|
131
|
+
/** Platform disclosure derived from the same transport and effective-policy
|
|
132
|
+
* facts used by admission. Darwin is the one live-proven profile-isolation
|
|
133
|
+
* lane; other lanes stay explicit rather than maintaining parallel truth. */
|
|
134
|
+
export function agyPlatformIsolationDetail(platform = process.platform) {
|
|
135
|
+
const host = harnessPlatform(platform);
|
|
136
|
+
if (!host)
|
|
137
|
+
return `Antigravity credential behavior is undeclared on ${platform}`;
|
|
138
|
+
const transports = credentialTransportsForPlatform(AGY_CAPABILITY_PROFILE.auth, host);
|
|
139
|
+
const policy = credentialProfilePolicyForPlatform(AGY_CAPABILITY_PROFILE.auth, "native_session", host);
|
|
140
|
+
if (host === "darwin")
|
|
141
|
+
return null;
|
|
142
|
+
const kinds = transports.map((transport) => transport.kind).join(" + ") || "no declared transport";
|
|
143
|
+
if (policy.identity_scope === "os_user") {
|
|
144
|
+
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)`;
|
|
145
|
+
}
|
|
146
|
+
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`;
|
|
147
|
+
}
|
|
74
148
|
const AGY_ENABLED_INTENTS = [
|
|
75
149
|
"explain",
|
|
76
150
|
"plan",
|
|
@@ -83,9 +157,16 @@ const AGY_ENABLED_INTENTS = [
|
|
|
83
157
|
"synthesize",
|
|
84
158
|
"audit",
|
|
85
159
|
];
|
|
86
|
-
export function createAgyAdapter() {
|
|
160
|
+
export function createAgyAdapter(options = {}) {
|
|
161
|
+
const prepareProfileKeychain = options.prepareProfileKeychain ??
|
|
162
|
+
((home, platform = process.platform) => {
|
|
163
|
+
if (!needsPrivatePerProfileKeychain(AGY_CAPABILITY_PROFILE, platform))
|
|
164
|
+
return;
|
|
165
|
+
prepareAgyProfileKeychain(home, { platform });
|
|
166
|
+
});
|
|
87
167
|
return {
|
|
88
168
|
id: "agy",
|
|
169
|
+
capabilityProfile: AGY_CAPABILITY_PROFILE,
|
|
89
170
|
async discover() {
|
|
90
171
|
const version = await detectVersion();
|
|
91
172
|
if (version === null) {
|
|
@@ -121,47 +202,23 @@ export function createAgyAdapter() {
|
|
|
121
202
|
known_models: [...AGY_KNOWN_MODELS],
|
|
122
203
|
known_models_verified_against: AGY_VENDOR_CLI_VERSION,
|
|
123
204
|
},
|
|
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
|
-
},
|
|
205
|
+
capability_profile: AGY_CAPABILITY_PROFILE,
|
|
141
206
|
auth_modes: ["local_session"],
|
|
142
|
-
access_profiles_supported: [
|
|
143
|
-
"readonly",
|
|
144
|
-
"workspace_write",
|
|
145
|
-
"full",
|
|
146
|
-
"external_sandbox_full",
|
|
147
|
-
"inherit_native",
|
|
148
|
-
],
|
|
207
|
+
access_profiles_supported: ["readonly", "workspace_write", "full", "inherit_native"],
|
|
149
208
|
});
|
|
150
209
|
},
|
|
151
210
|
async doctor(spec) {
|
|
152
211
|
const version = await detectVersion();
|
|
153
212
|
const installedSemver = version === null ? null : (/\d+\.\d+\.\d+/.exec(version)?.[0] ?? null);
|
|
154
213
|
const versionDrift = version !== null && installedSemver !== AGY_VENDOR_CLI_VERSION
|
|
155
|
-
? `installed agy "${version}" differs from the verified ${AGY_VENDOR_CLI_VERSION}; the
|
|
214
|
+
? `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
215
|
: null;
|
|
157
|
-
// Л-24
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
const platformProof =
|
|
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`;
|
|
216
|
+
// Л-24 + INV-067: Darwin's profile-local keychain plus vendor fallback
|
|
217
|
+
// preserves the proven profile identity route. Linux retains the
|
|
218
|
+
// config-file transport without a live multi-account proof. Windows has
|
|
219
|
+
// a different effective policy altogether: the vendor credential is
|
|
220
|
+
// OS-user-scoped and HOME scopes state only.
|
|
221
|
+
const platformProof = agyPlatformIsolationDetail();
|
|
165
222
|
const requestedSource = spec.authSource;
|
|
166
223
|
if (requestedSource !== undefined && requestedSource !== "native_session") {
|
|
167
224
|
return ConformanceReportSchema.parse({
|
|
@@ -227,7 +284,7 @@ export function createAgyAdapter() {
|
|
|
227
284
|
? [{ id: "version_pin", status: "fail", detail: versionDrift }]
|
|
228
285
|
: [{ id: "version_pin", status: "pass", detail: AGY_VENDOR_CLI_VERSION }]),
|
|
229
286
|
...(platformProof
|
|
230
|
-
? [{ id: "platform_isolation", status: "
|
|
287
|
+
? [{ id: "platform_isolation", status: "skip", detail: platformProof }]
|
|
231
288
|
: []),
|
|
232
289
|
],
|
|
233
290
|
enabled_intents: [],
|
|
@@ -248,21 +305,24 @@ export function createAgyAdapter() {
|
|
|
248
305
|
});
|
|
249
306
|
},
|
|
250
307
|
run(spec) {
|
|
251
|
-
return runAgy(spec);
|
|
308
|
+
return runAgy(spec, prepareProfileKeychain);
|
|
252
309
|
},
|
|
253
310
|
review(spec) {
|
|
254
|
-
return runAgy(spec);
|
|
311
|
+
return runAgy(spec, prepareProfileKeychain);
|
|
255
312
|
},
|
|
256
313
|
// INV-135: pinned routing is admitted by THIS probe (there is no default
|
|
257
314
|
// store for the harness doctor to credit).
|
|
258
315
|
async probeCredentialProfile(profile, abortSignal) {
|
|
259
316
|
// The signal must reach the live probe: dropping it left an aborted
|
|
260
317
|
// doctor sweep waiting out the probe's own 30s timeout.
|
|
261
|
-
return probeAgyCredentialProfile(profile,
|
|
318
|
+
return probeAgyCredentialProfile(profile, {
|
|
319
|
+
runModelProbe: defaultAgyModelProbe,
|
|
320
|
+
prepareProfileKeychain: (home) => prepareProfileKeychain(home),
|
|
321
|
+
}, abortSignal);
|
|
262
322
|
},
|
|
263
323
|
};
|
|
264
324
|
}
|
|
265
|
-
async function* runAgy(spec) {
|
|
325
|
+
async function* runAgy(spec, prepareProfileKeychain) {
|
|
266
326
|
const profile = spec.credential_profile;
|
|
267
327
|
// Л-4: no engine-default credential — an unpinned agy run has nothing to
|
|
268
328
|
// route. Typed stream refusal (error then completed), the one refusal
|
|
@@ -283,6 +343,25 @@ async function* runAgy(spec) {
|
|
|
283
343
|
yield { type: "completed", session_id: spec.session_id, ts: nowIso() };
|
|
284
344
|
return;
|
|
285
345
|
}
|
|
346
|
+
// Path and identity failures are unsafe and stop before the vendor child.
|
|
347
|
+
// A recoverable security-tool miss keeps agy's own file fallback available;
|
|
348
|
+
// a custom test seam may model that same operational degradation.
|
|
349
|
+
try {
|
|
350
|
+
prepareProfileKeychain(route.home);
|
|
351
|
+
}
|
|
352
|
+
catch (error) {
|
|
353
|
+
if (isAgyProfileKeychainUnsafe(error)) {
|
|
354
|
+
yield {
|
|
355
|
+
type: "error",
|
|
356
|
+
session_id: spec.session_id,
|
|
357
|
+
ts: nowIso(),
|
|
358
|
+
error: redactSecrets(error instanceof Error ? error.message : String(error)).slice(0, 300),
|
|
359
|
+
};
|
|
360
|
+
yield { type: "completed", session_id: spec.session_id, ts: nowIso() };
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
// The vendor probe/run remains the final transport authority.
|
|
364
|
+
}
|
|
286
365
|
const args = ["-p", promptWithInstructions(spec), "--output-format", "stream-json"];
|
|
287
366
|
// Л-18: without --add-dir agy resolves relative paths against its own app
|
|
288
367
|
// data dir instead of the workspace (live-proven §1.2d).
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,iBAAiB,IAAI,uBAAuB,EAC5C,eAAe,IAAI,qBAAqB,GACzC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,uBAAuB,EACvB,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;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face AgySecurityResult {
|
|
2
|
+
status: number | null;
|
|
3
|
+
detail?: string;
|
|
4
|
+
}
|
|
5
|
+
export type AgySecurityRunner = (args: readonly string[], env: NodeJS.ProcessEnv) => AgySecurityResult;
|
|
6
|
+
export interface AgyKeychainOptions {
|
|
7
|
+
platform?: NodeJS.Platform;
|
|
8
|
+
runSecurity?: AgySecurityRunner;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Typed, bounded setup result. `unsafe` means the profile path or target
|
|
12
|
+
* identity is not proven and callers must refuse the vendor child; a false
|
|
13
|
+
* value is a recoverable security-tool miss where agy's file fallback may
|
|
14
|
+
* still keep authentication working.
|
|
15
|
+
*/
|
|
16
|
+
export declare class AgyProfileKeychainError extends Error {
|
|
17
|
+
readonly code: "agy_profile_keychain_unavailable";
|
|
18
|
+
readonly unsafe: boolean;
|
|
19
|
+
constructor(detail: string, options?: {
|
|
20
|
+
unsafe?: boolean;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export declare function isAgyProfileKeychainUnsafe(error: unknown): boolean;
|
|
24
|
+
/** The only keychain path agy may use for one named profile. */
|
|
25
|
+
export declare function agyProfileKeychainPath(profileHome: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Prepare the private Darwin keychain declared by the agy capability profile.
|
|
28
|
+
* Other platforms deliberately do nothing: Linux and Windows retain their
|
|
29
|
+
* vendor-owned credential behavior. The helper never reads, copies, or
|
|
30
|
+
* removes credential items; agy itself remains the only item owner. Creation
|
|
31
|
+
* uses a neutral bootstrap filename before adopting login.keychain-db because
|
|
32
|
+
* Apple's create operation treats the latter name as a user-list entry on the
|
|
33
|
+
* supported Darwin path.
|
|
34
|
+
*/
|
|
35
|
+
export declare function prepareAgyProfileKeychain(profileHome: string, options?: AgyKeychainOptions): void;
|
|
36
|
+
/**
|
|
37
|
+
* Low-level Darwin ensure used by the adapter's production seams and tests.
|
|
38
|
+
* The caller has already established that this is the private agy route.
|
|
39
|
+
*/
|
|
40
|
+
export declare function ensureAgyProfileKeychain(profileHome: string, options?: AgyKeychainOptions): void;
|
|
41
|
+
//# sourceMappingURL=keychain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keychain.d.ts","sourceRoot":"","sources":["../src/keychain.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC9B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,iBAAiB,CAAC;AAEvB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC3B,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC;AAED;;;;;GAKG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,EAAG,kCAAkC,CAAU;IAC5D,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEzB,YAAY,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO,EAI7D;CACF;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAElE;AAED,gEAAgE;AAChE,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAGlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,kBAAuB,GAC/B,IAAI,CAIN;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,kBAAuB,GAC/B,IAAI,CAqHN"}
|