@claudexor/cli 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/dist/accounts-projection.d.ts +4 -2
- package/dist/accounts-projection.d.ts.map +1 -1
- package/dist/accounts-projection.js +49 -2
- package/dist/accounts-projection.js.map +1 -1
- package/dist/accounts-services.d.ts +7 -1
- package/dist/accounts-services.d.ts.map +1 -1
- package/dist/accounts-services.js +7 -2
- package/dist/accounts-services.js.map +1 -1
- package/dist/agy-quota-source.d.ts +2 -0
- package/dist/agy-quota-source.d.ts.map +1 -1
- package/dist/agy-quota-source.js +83 -108
- package/dist/agy-quota-source.js.map +1 -1
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +6 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/claudexord-entry.d.ts +7 -2
- package/dist/claudexord-entry.d.ts.map +1 -1
- package/dist/claudexord-entry.js +33 -11
- package/dist/claudexord-entry.js.map +1 -1
- package/dist/claudexord.d.ts.map +1 -1
- package/dist/claudexord.js +9 -12
- package/dist/claudexord.js.map +1 -1
- package/dist/cli-io.d.ts +1 -0
- package/dist/cli-io.d.ts.map +1 -1
- package/dist/cli-io.js +14 -0
- package/dist/cli-io.js.map +1 -1
- package/dist/cli.js +12 -18
- package/dist/cli.js.map +1 -1
- package/dist/command-flags.d.ts.map +1 -1
- package/dist/command-flags.js +3 -2
- package/dist/command-flags.js.map +1 -1
- package/dist/control-services.d.ts +824 -806
- package/dist/control-services.d.ts.map +1 -1
- package/dist/control-services.js +4 -16
- package/dist/control-services.js.map +1 -1
- package/dist/credential-commands.d.ts +17 -0
- package/dist/credential-commands.d.ts.map +1 -1
- package/dist/credential-commands.js +62 -14
- package/dist/credential-commands.js.map +1 -1
- package/dist/credential-profile-mutations.d.ts +9 -0
- package/dist/credential-profile-mutations.d.ts.map +1 -1
- package/dist/credential-profile-mutations.js +63 -31
- package/dist/credential-profile-mutations.js.map +1 -1
- package/dist/credential-status-invalidation.d.ts +2 -0
- package/dist/credential-status-invalidation.d.ts.map +1 -1
- package/dist/credential-status-invalidation.js +10 -0
- package/dist/credential-status-invalidation.js.map +1 -1
- package/dist/delegation-belt-descriptor.d.ts +2 -1
- package/dist/delegation-belt-descriptor.d.ts.map +1 -1
- package/dist/delegation-belt-descriptor.js +2 -1
- package/dist/delegation-belt-descriptor.js.map +1 -1
- package/dist/harness-command-specs.d.ts.map +1 -1
- package/dist/harness-command-specs.js +4 -4
- package/dist/harness-command-specs.js.map +1 -1
- package/dist/harness-command.d.ts +5 -3
- package/dist/harness-command.d.ts.map +1 -1
- package/dist/harness-command.js +5 -3
- package/dist/harness-command.js.map +1 -1
- package/dist/harness-install-lease.d.ts +11 -0
- package/dist/harness-install-lease.d.ts.map +1 -0
- package/dist/harness-install-lease.js +98 -0
- package/dist/harness-install-lease.js.map +1 -0
- package/dist/harness-install-proof.d.ts +36 -0
- package/dist/harness-install-proof.d.ts.map +1 -0
- package/dist/harness-install-proof.js +148 -0
- package/dist/harness-install-proof.js.map +1 -0
- package/dist/harness-install-recipes.d.ts +80 -0
- package/dist/harness-install-recipes.d.ts.map +1 -0
- package/dist/harness-install-recipes.js +130 -0
- package/dist/harness-install-recipes.js.map +1 -0
- package/dist/harness-installer.d.ts +45 -46
- package/dist/harness-installer.d.ts.map +1 -1
- package/dist/harness-installer.js +248 -156
- package/dist/harness-installer.js.map +1 -1
- package/dist/mcp-run-projections.d.ts +1 -1
- package/dist/native-login.d.ts +7 -0
- package/dist/native-login.d.ts.map +1 -1
- package/dist/native-login.js +29 -13
- package/dist/native-login.js.map +1 -1
- package/dist/profile-registration.d.ts +2 -0
- package/dist/profile-registration.d.ts.map +1 -1
- package/dist/profile-registration.js +49 -6
- package/dist/profile-registration.js.map +1 -1
- package/dist/quota-services.d.ts +2 -2
- package/dist/remote-command.d.ts +0 -2
- package/dist/remote-command.d.ts.map +1 -1
- package/dist/remote-command.js +3 -74
- package/dist/remote-command.js.map +1 -1
- package/dist/request-preflight.d.ts +1 -1
- package/dist/request-preflight.d.ts.map +1 -1
- package/dist/request-preflight.js +35 -11
- package/dist/request-preflight.js.map +1 -1
- package/dist/retry-command.d.ts.map +1 -1
- package/dist/retry-command.js +4 -0
- package/dist/retry-command.js.map +1 -1
- package/dist/setup-attach-command.d.ts +30 -0
- package/dist/setup-attach-command.d.ts.map +1 -0
- package/dist/setup-attach-command.js +118 -0
- package/dist/setup-attach-command.js.map +1 -0
- package/dist/setup-job-control-services.d.ts +2064 -0
- package/dist/setup-job-control-services.d.ts.map +1 -0
- package/dist/setup-job-control-services.js +33 -0
- package/dist/setup-job-control-services.js.map +1 -0
- package/dist/setup-job-store.d.ts +2 -2
- package/dist/setup-job-support.d.ts +23 -13
- package/dist/setup-job-support.d.ts.map +1 -1
- package/dist/setup-job-support.js +55 -13
- package/dist/setup-job-support.js.map +1 -1
- package/dist/setup-jobs.d.ts +4 -4
- package/dist/setup-jobs.d.ts.map +1 -1
- package/dist/setup-jobs.js +50 -47
- package/dist/setup-jobs.js.map +1 -1
- package/dist/setup-login-capability.d.ts +37 -0
- package/dist/setup-login-capability.d.ts.map +1 -0
- package/dist/setup-login-capability.js +96 -0
- package/dist/setup-login-capability.js.map +1 -0
- package/dist/setup-login-io.d.ts +4 -1
- package/dist/setup-login-io.d.ts.map +1 -1
- package/dist/setup-login-io.js +22 -3
- package/dist/setup-login-io.js.map +1 -1
- package/dist/setup-login-pty.d.ts +64 -22
- package/dist/setup-login-pty.d.ts.map +1 -1
- package/dist/setup-login-pty.js +289 -48
- package/dist/setup-login-pty.js.map +1 -1
- package/dist/setup-login-runner-support.d.ts +12 -0
- package/dist/setup-login-runner-support.d.ts.map +1 -0
- package/dist/setup-login-runner-support.js +65 -0
- package/dist/setup-login-runner-support.js.map +1 -0
- package/dist/setup-login-runner.d.ts +3 -0
- package/dist/setup-login-runner.d.ts.map +1 -1
- package/dist/setup-login-runner.js +133 -116
- package/dist/setup-login-runner.js.map +1 -1
- package/dist/setup-runner-outcome.d.ts +10 -0
- package/dist/setup-runner-outcome.d.ts.map +1 -0
- package/dist/setup-runner-outcome.js +49 -0
- package/dist/setup-runner-outcome.js.map +1 -0
- package/dist/thread-execution-workspace.d.ts +11 -6
- package/dist/thread-execution-workspace.d.ts.map +1 -1
- package/dist/thread-execution-workspace.js +52 -6
- package/dist/thread-execution-workspace.js.map +1 -1
- package/package.json +24 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-job-control-services.d.ts","sourceRoot":"","sources":["../src/setup-job-control-services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAO7D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEhE,2FAA2F;AAC3F,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,eAAe;IAEpE,cAAc,UAAgB;QAC5B,OAAO,EAAE,OAAO,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;KAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcD,aAAa,WAAiB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIrC,cAAc,UAAgB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACrC,aAAa,UAAgB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACpC,iBAAiB,UAAgB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACxC,cAAc,UAAgB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAExC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { preflightSetupJobCreateRequest } from "./setup-job-support.js";
|
|
2
|
+
import { assertSetupLoginAdmission, projectSetupLoginCapability, } from "./setup-login-capability.js";
|
|
3
|
+
/** Thin Control API bindings over setup-job admission and durable lifecycle operations. */
|
|
4
|
+
export function setupJobControlServices(setupJobs) {
|
|
5
|
+
return {
|
|
6
|
+
createSetupJob: async (input) => {
|
|
7
|
+
// No helper/vendor probe and no bootstrap/durable mutation can precede
|
|
8
|
+
// request, named-profile, required-profile, and D13 validation.
|
|
9
|
+
const request = preflightSetupJobCreateRequest(input.request);
|
|
10
|
+
const capability = await projectSetupLoginCapability(request.harness, {
|
|
11
|
+
transport: request.transport,
|
|
12
|
+
loginFlow: request.loginFlow,
|
|
13
|
+
});
|
|
14
|
+
assertSetupLoginAdmission(capability);
|
|
15
|
+
return setupJobs().create(request, {
|
|
16
|
+
key: input.idempotencyKey,
|
|
17
|
+
client: input.clientId,
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
listSetupJobs: async (input) => {
|
|
21
|
+
const jobs = setupJobs();
|
|
22
|
+
return { jobs: jobs.list(input) };
|
|
23
|
+
},
|
|
24
|
+
setupJobStatus: async (input) => setupJobs().status(input),
|
|
25
|
+
setupJobSnapshot: async (input) => setupJobs().snapshot(input),
|
|
26
|
+
setupJobEvents: async (input) => setupJobs().events(input),
|
|
27
|
+
cancelSetupJob: async (input) => setupJobs().cancel(input),
|
|
28
|
+
setupJobInput: async (input) => setupJobs().input(input),
|
|
29
|
+
reconcileSetupJob: async (input) => setupJobs().reconcile(input),
|
|
30
|
+
extendSetupJob: async (input) => setupJobs().extend(input),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=setup-job-control-services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-job-control-services.js","sourceRoot":"","sources":["../src/setup-job-control-services.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AAIrC,2FAA2F;AAC3F,MAAM,UAAU,uBAAuB,CAAC,SAAgC;IACtE,OAAO;QACL,cAAc,EAAE,KAAK,EAAE,KAItB,EAAE,EAAE;YACH,uEAAuE;YACvE,gEAAgE;YAChE,MAAM,OAAO,GAAG,8BAA8B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC9D,MAAM,UAAU,GAAG,MA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 +238,7 @@ export declare class SetupJobStore {
|
|
|
238
238
|
commandStarted: boolean;
|
|
239
239
|
exitCode: number | null;
|
|
240
240
|
signal: string | null;
|
|
241
|
-
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
|
|
241
|
+
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | "terminal_transport_failed" | "terminal_transport_probe_failed" | "terminal_transport_unavailable" | "terminal_transport_unsupported" | undefined;
|
|
242
242
|
finishedAt: string;
|
|
243
243
|
} | undefined;
|
|
244
244
|
terminationReconciliation?: {
|
|
@@ -435,7 +435,7 @@ export declare class SetupJobStore {
|
|
|
435
435
|
commandStarted: boolean;
|
|
436
436
|
exitCode: number | null;
|
|
437
437
|
signal: string | null;
|
|
438
|
-
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
|
|
438
|
+
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | "terminal_transport_failed" | "terminal_transport_probe_failed" | "terminal_transport_unavailable" | "terminal_transport_unsupported" | undefined;
|
|
439
439
|
finishedAt: string;
|
|
440
440
|
} | undefined;
|
|
441
441
|
terminationReconciliation?: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HarnessAdapter, type ProcessGroupHandle } from "@claudexor/core";
|
|
2
|
-
import { ControlHarnessSetupHarness, type ControlSetupJob, type CredentialProfileStatus } from "@claudexor/schema";
|
|
2
|
+
import { ControlHarnessSetupHarness, type ControlSetupJob, type ControlSetupJobCreateRequest as ControlSetupJobCreateRequestValue, type CredentialProfileStatus, type EffectiveCredentialProfilePolicy } from "@claudexor/schema";
|
|
3
3
|
import type { SetupLoginRunnerState } from "./setup-login-protocol.js";
|
|
4
4
|
/** Where a harness's DEFAULT (unnamed) login lands, for the harnesses whose
|
|
5
5
|
* default store Claudexor owns. Absent = the vendor keeps its own default
|
|
@@ -10,15 +10,17 @@ export type SetupProfile = {
|
|
|
10
10
|
note: string;
|
|
11
11
|
};
|
|
12
12
|
export declare const SETUP_PROFILES: Record<ControlHarnessSetupHarness, SetupProfile>;
|
|
13
|
+
export interface ResolvedSetupProfileBinding {
|
|
14
|
+
profileId: string;
|
|
15
|
+
configDir: string;
|
|
16
|
+
credentialPolicy: EffectiveCredentialProfilePolicy;
|
|
17
|
+
}
|
|
13
18
|
/**
|
|
14
19
|
* Resolve an INV-135 profile-targeted login request to its canonical scoped
|
|
15
20
|
* config dir. Typed 400s: an unknown/disabled/secret-ref profile must refuse
|
|
16
21
|
* at create time, never open a Terminal login into the wrong store.
|
|
17
22
|
*/
|
|
18
|
-
export declare function resolveProfileBinding(harness: ControlHarnessSetupHarness, profileId: string | undefined):
|
|
19
|
-
profileId: string;
|
|
20
|
-
configDir: string;
|
|
21
|
-
} | null;
|
|
23
|
+
export declare function resolveProfileBinding(harness: ControlHarnessSetupHarness, profileId: string | undefined, platform?: NodeJS.Platform): ResolvedSetupProfileBinding | null;
|
|
22
24
|
/**
|
|
23
25
|
* The login-request binding under the unified account model (K.4): an explicit
|
|
24
26
|
* profileId resolves as before; a profile-less LOGIN request is the bootstrap
|
|
@@ -32,17 +34,25 @@ export declare function resolveProfileBinding(harness: ControlHarnessSetupHarnes
|
|
|
32
34
|
* env-overridden native home outside the owned root, never blocks the login;
|
|
33
35
|
* the startup migration registers the row after the login lands).
|
|
34
36
|
*/
|
|
35
|
-
export declare function resolveLoginProfileBinding(harness: ControlHarnessSetupHarness, action: string, requestedProfileId: string | undefined):
|
|
36
|
-
profileId: string;
|
|
37
|
-
configDir: string;
|
|
38
|
-
} | null;
|
|
37
|
+
export declare function resolveLoginProfileBinding(harness: ControlHarnessSetupHarness, action: string, requestedProfileId: string | undefined, platform?: NodeJS.Platform): ResolvedSetupProfileBinding | null;
|
|
39
38
|
/**
|
|
40
|
-
* A harness with no default
|
|
41
|
-
*
|
|
42
|
-
* from
|
|
43
|
-
*
|
|
39
|
+
* A harness with no default binding store (agy — owner decision Л-4) can only
|
|
40
|
+
* start login under a named binding. Refusing at CREATE time keeps the runner
|
|
41
|
+
* from targeting vendor state/login artifacts at the daemon's own HOME; the
|
|
42
|
+
* effective platform policy separately owns credential custody. The caller
|
|
43
|
+
* gets a 400 instead of an opaque spawn failure.
|
|
44
44
|
*/
|
|
45
45
|
export declare function assertDefaultLoginAllowed(harness: string, hasProfile: boolean): void;
|
|
46
|
+
/**
|
|
47
|
+
* Mutation-free setup admission. Request shape, named-profile binding,
|
|
48
|
+
* required-profile policy and the current cardinality invariant are resolved
|
|
49
|
+
* before any terminal helper probe or bootstrap-row creation. The durable
|
|
50
|
+
* manager repeats the binding while creating the single job; this first pass
|
|
51
|
+
* exists to keep rejected requests at zero probe and zero mutation.
|
|
52
|
+
*/
|
|
53
|
+
export declare function preflightSetupJobCreateRequest(input: unknown, platform?: NodeJS.Platform): ControlSetupJobCreateRequestValue;
|
|
54
|
+
/** Durable, user-facing custody statement for a profile-targeted setup job. */
|
|
55
|
+
export declare function setupProfileBindingMessage(harness: string, binding: ResolvedSetupProfileBinding): string;
|
|
46
56
|
/**
|
|
47
57
|
* Whether a login's deadline may be pushed out. A deadline that IS the
|
|
48
58
|
* vendor's own window cannot be: publishing a later one would promise fifteen
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-job-support.d.ts","sourceRoot":"","sources":["../src/setup-job-support.ts"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"setup-job-support.d.ts","sourceRoot":"","sources":["../src/setup-job-support.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EACL,0BAA0B,EAE1B,KAAK,eAAe,EACpB,KAAK,4BAA4B,IAAI,iCAAiC,EACtE,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EAGtC,MAAM,mBAAmB,CAAC;AAU3B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAIvE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AM,GAAG,MAAM,CAEhD"}
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
7
7
|
import { dirname, resolve } from "node:path";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
|
-
import { parseProcessGroupHandle, } from "@claudexor/core";
|
|
9
|
+
import { credentialProfilePolicyProblem, credentialProfilePolicyState, parseProcessGroupHandle, } from "@claudexor/core";
|
|
10
10
|
import { loadConfig } from "@claudexor/config";
|
|
11
11
|
import { defaultNativeClaudeConfigDir } from "@claudexor/harness-claude";
|
|
12
12
|
import { defaultNativeCodexHome } from "@claudexor/harness-codex";
|
|
13
|
-
import { ControlHarnessSetupHarness, harnessHasDefaultCredentialStore, harnessSupportsBootstrapLogin, } from "@claudexor/schema";
|
|
13
|
+
import { ControlHarnessSetupHarness, ControlSetupJobCreateRequest, harnessHasDefaultCredentialStore, harnessSupportsBootstrapLogin, } from "@claudexor/schema";
|
|
14
14
|
import { noProjectRepoRoot } from "@claudexor/util";
|
|
15
15
|
import { ensureBootstrapProfile } from "./profile-registration.js";
|
|
16
|
+
import { buildRegistry } from "./registry.js";
|
|
16
17
|
import { canonicalProfileLoginDir, configDirLoginHarnessList, isConfigDirLoginHarness, } from "./config-dir-login-harnesses.js";
|
|
17
18
|
import { ACTIVE_SETUP_STATES } from "./setup-job-store.js";
|
|
18
19
|
const NO_PROJECT_ROOT = noProjectRepoRoot();
|
|
@@ -38,7 +39,7 @@ export const SETUP_PROFILES = {
|
|
|
38
39
|
},
|
|
39
40
|
agy: {
|
|
40
41
|
guideUrl: "https://antigravity.google/docs/cli/install",
|
|
41
|
-
note: "Antigravity sign-in always targets one named
|
|
42
|
+
note: "Antigravity sign-in always targets one named Claudexor binding. Credential custody depends on the host platform and is stated below.",
|
|
42
43
|
},
|
|
43
44
|
};
|
|
44
45
|
/**
|
|
@@ -46,13 +47,21 @@ export const SETUP_PROFILES = {
|
|
|
46
47
|
* config dir. Typed 400s: an unknown/disabled/secret-ref profile must refuse
|
|
47
48
|
* at create time, never open a Terminal login into the wrong store.
|
|
48
49
|
*/
|
|
49
|
-
export function resolveProfileBinding(harness, profileId) {
|
|
50
|
+
export function resolveProfileBinding(harness, profileId, platform = process.platform) {
|
|
51
|
+
const registry = loadConfig(NO_PROJECT_ROOT).global.credential_profiles;
|
|
52
|
+
const policyState = credentialProfilePolicyState({
|
|
53
|
+
adapter: buildRegistry({ includeFakes: false }).get(harness),
|
|
54
|
+
registry,
|
|
55
|
+
platform,
|
|
56
|
+
});
|
|
57
|
+
if (policyState.ambiguous)
|
|
58
|
+
throw credentialProfilePolicyProblem(policyState, "credential_profile_ambiguous");
|
|
50
59
|
if (!profileId)
|
|
51
60
|
return null;
|
|
52
61
|
if (!isConfigDirLoginHarness(harness)) {
|
|
53
62
|
throw Object.assign(new Error(`harness "${harness}" has no isolated config-dir login; only ${configDirLoginHarnessList()} support profile logins`), { status: 400 });
|
|
54
63
|
}
|
|
55
|
-
const profile =
|
|
64
|
+
const profile = registry.find((entry) => entry.harness_id === harness && entry.profile_id === profileId);
|
|
56
65
|
if (!profile) {
|
|
57
66
|
throw Object.assign(new Error(`no credential profile "${profileId}" for harness "${harness}" — register it first (POST /v2/credential-profiles or \`claudexor profiles add\`)`), { status: 400 });
|
|
58
67
|
}
|
|
@@ -67,6 +76,7 @@ export function resolveProfileBinding(harness, profileId) {
|
|
|
67
76
|
return {
|
|
68
77
|
profileId,
|
|
69
78
|
configDir: canonicalProfileLoginDir(harness, profile.isolation_locator ?? ""),
|
|
79
|
+
credentialPolicy: policyState.policy,
|
|
70
80
|
};
|
|
71
81
|
}
|
|
72
82
|
/**
|
|
@@ -82,12 +92,12 @@ export function resolveProfileBinding(harness, profileId) {
|
|
|
82
92
|
* env-overridden native home outside the owned root, never blocks the login;
|
|
83
93
|
* the startup migration registers the row after the login lands).
|
|
84
94
|
*/
|
|
85
|
-
export function resolveLoginProfileBinding(harness, action, requestedProfileId) {
|
|
86
|
-
const explicit = resolveProfileBinding(harness, requestedProfileId);
|
|
95
|
+
export function resolveLoginProfileBinding(harness, action, requestedProfileId, platform = process.platform) {
|
|
96
|
+
const explicit = resolveProfileBinding(harness, requestedProfileId, platform);
|
|
87
97
|
if (explicit || action !== "login" || !harnessSupportsBootstrapLogin(harness))
|
|
88
98
|
return explicit;
|
|
89
99
|
if (!harnessHasDefaultCredentialStore(harness)) {
|
|
90
|
-
return resolveProfileBinding(harness, ensureBootstrapProfile(harness).profile_id);
|
|
100
|
+
return resolveProfileBinding(harness, ensureBootstrapProfile(harness).profile_id, platform);
|
|
91
101
|
}
|
|
92
102
|
try {
|
|
93
103
|
ensureBootstrapProfile(harness);
|
|
@@ -98,15 +108,47 @@ export function resolveLoginProfileBinding(harness, action, requestedProfileId)
|
|
|
98
108
|
return null;
|
|
99
109
|
}
|
|
100
110
|
/**
|
|
101
|
-
* A harness with no default
|
|
102
|
-
*
|
|
103
|
-
* from
|
|
104
|
-
*
|
|
111
|
+
* A harness with no default binding store (agy — owner decision Л-4) can only
|
|
112
|
+
* start login under a named binding. Refusing at CREATE time keeps the runner
|
|
113
|
+
* from targeting vendor state/login artifacts at the daemon's own HOME; the
|
|
114
|
+
* effective platform policy separately owns credential custody. The caller
|
|
115
|
+
* gets a 400 instead of an opaque spawn failure.
|
|
105
116
|
*/
|
|
106
117
|
export function assertDefaultLoginAllowed(harness, hasProfile) {
|
|
107
118
|
if (hasProfile || harnessHasDefaultCredentialStore(harness))
|
|
108
119
|
return;
|
|
109
|
-
throw Object.assign(new Error(`harness "${harness}" has no default credential store: sign in from a named account (add one first, then start the login from it)`), {
|
|
120
|
+
throw Object.assign(new Error(`harness "${harness}" has no default credential store: sign in from a named account (add one first, then start the login from it)`), {
|
|
121
|
+
status: 400,
|
|
122
|
+
code: "credential_profile_required",
|
|
123
|
+
retryable: false,
|
|
124
|
+
fieldErrors: {
|
|
125
|
+
"/profileId": ["A named credential profile is required for this harness."],
|
|
126
|
+
},
|
|
127
|
+
requiredActions: ["add_named_account"],
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Mutation-free setup admission. Request shape, named-profile binding,
|
|
132
|
+
* required-profile policy and the current cardinality invariant are resolved
|
|
133
|
+
* before any terminal helper probe or bootstrap-row creation. The durable
|
|
134
|
+
* manager repeats the binding while creating the single job; this first pass
|
|
135
|
+
* exists to keep rejected requests at zero probe and zero mutation.
|
|
136
|
+
*/
|
|
137
|
+
export function preflightSetupJobCreateRequest(input, platform = process.platform) {
|
|
138
|
+
const request = ControlSetupJobCreateRequest.parse(input);
|
|
139
|
+
const explicitBinding = resolveProfileBinding(request.harness, request.profileId, platform);
|
|
140
|
+
const canBootstrap = request.action === "login" &&
|
|
141
|
+
request.profileId === undefined &&
|
|
142
|
+
harnessSupportsBootstrapLogin(request.harness);
|
|
143
|
+
assertDefaultLoginAllowed(request.harness, explicitBinding !== null || canBootstrap);
|
|
144
|
+
return request;
|
|
145
|
+
}
|
|
146
|
+
/** Durable, user-facing custody statement for a profile-targeted setup job. */
|
|
147
|
+
export function setupProfileBindingMessage(harness, binding) {
|
|
148
|
+
if (binding.credentialPolicy.identity_scope === "os_user") {
|
|
149
|
+
return `This login targets the Claudexor binding "${binding.profileId}". Its folder scopes ${harness} state, while the vendor credential is shared by the current OS user; it is not a separate per-folder identity, and removing the binding does not sign out the vendor account.`;
|
|
150
|
+
}
|
|
151
|
+
return `This login targets the scoped Claudexor profile "${binding.profileId}"; the default vendor store is not touched.`;
|
|
110
152
|
}
|
|
111
153
|
/**
|
|
112
154
|
* Whether a login's deadline may be pushed out. A deadline that IS the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-job-support.js","sourceRoot":"","sources":["../src/setup-job-support.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa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ACtD,IAAI,CAAC,GAAG,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,CAAC;QACH,OAAO,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,GAAoB,EACpB,KAA4B;IAE5B,OAAO,CACL,GAAG,CAAC,SAAS,EAAE,WAAW,KAAK,KAAK,CAAC,WAAW;QAChD,GAAG,CAAC,SAAS,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;QACnD,GAAG,CAAC,SAAS,CAAC,cAAc,KAAK,KAAK,CAAC,cAAc;QACrD,GAAG,CAAC,SAAS,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;QAC7C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,CAAC,CAClF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;AAC/C,CAAC"}
|
package/dist/setup-jobs.d.ts
CHANGED
|
@@ -235,7 +235,7 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
|
|
|
235
235
|
commandStarted: boolean;
|
|
236
236
|
exitCode: number | null;
|
|
237
237
|
signal: string | null;
|
|
238
|
-
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
|
|
238
|
+
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | "terminal_transport_failed" | "terminal_transport_probe_failed" | "terminal_transport_unavailable" | "terminal_transport_unsupported" | undefined;
|
|
239
239
|
finishedAt: string;
|
|
240
240
|
} | undefined;
|
|
241
241
|
terminationReconciliation?: {
|
|
@@ -421,7 +421,7 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
|
|
|
421
421
|
commandStarted: boolean;
|
|
422
422
|
exitCode: number | null;
|
|
423
423
|
signal: string | null;
|
|
424
|
-
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
|
|
424
|
+
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | "terminal_transport_failed" | "terminal_transport_probe_failed" | "terminal_transport_unavailable" | "terminal_transport_unsupported" | undefined;
|
|
425
425
|
finishedAt: string;
|
|
426
426
|
} | undefined;
|
|
427
427
|
terminationReconciliation?: {
|
|
@@ -622,7 +622,7 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
|
|
|
622
622
|
commandStarted: boolean;
|
|
623
623
|
exitCode: number | null;
|
|
624
624
|
signal: string | null;
|
|
625
|
-
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
|
|
625
|
+
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | "terminal_transport_failed" | "terminal_transport_probe_failed" | "terminal_transport_unavailable" | "terminal_transport_unsupported" | undefined;
|
|
626
626
|
finishedAt: string;
|
|
627
627
|
} | undefined;
|
|
628
628
|
terminationReconciliation?: {
|
|
@@ -814,7 +814,7 @@ export declare function createSetupJobManager(opts?: SetupJobManagerOptions): {
|
|
|
814
814
|
commandStarted: boolean;
|
|
815
815
|
exitCode: number | null;
|
|
816
816
|
signal: string | null;
|
|
817
|
-
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | undefined;
|
|
817
|
+
errorCode?: "device_auth_unsupported" | "permit_timeout" | "spawn_failed" | "terminal_transport_failed" | "terminal_transport_probe_failed" | "terminal_transport_unavailable" | "terminal_transport_unsupported" | undefined;
|
|
818
818
|
finishedAt: string;
|
|
819
819
|
} | undefined;
|
|
820
820
|
terminationReconciliation?: {
|
package/dist/setup-jobs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-jobs.d.ts","sourceRoot":"","sources":["../src/setup-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,EAEL,qCAAqC,EAGtC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAE/B,KAAK,uBAAuB,EAE5B,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC/B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"setup-jobs.d.ts","sourceRoot":"","sources":["../src/setup-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,EAEL,qCAAqC,EAGtC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAE/B,KAAK,uBAAuB,EAE5B,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC/B,MAAM,mBAAmB,CAAC;AAmB3B,OAAO,EAAuB,aAAa,EAAyB,MAAM,sBAAsB,CAAC;AAqCjG,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,eAAe,CAAC,EAAE,CAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE;QAAE,KAAK,EAAE,IAAI,CAAC;QAAC,cAAc,EAAE,cAAc,CAAC;QAAC,WAAW,EAAE,WAAW,CAAA;KAAE,KAC5E,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACzC;;yCAEqC;IACrC,sBAAsB,CAAC,EAAE,CACvB,OAAO,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBASD,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC;qBAOrC,OAAO,GAAG,eAAe;iBAyB7B,OAAO,GAAG,eAAe;kBAMxB,OAAO,GAAG,eAAe;;;EAmC1C"}
|
package/dist/setup-jobs.js
CHANGED
|
@@ -7,15 +7,16 @@ import { daemonDir } from "@claudexor/daemon";
|
|
|
7
7
|
import { ControlSetupJobCreateRequest, SetupNativeCommandReceipt, } from "@claudexor/schema";
|
|
8
8
|
import { noProjectRepoRoot } from "@claudexor/util";
|
|
9
9
|
import * as NativeLogin from "./native-login.js";
|
|
10
|
-
import { SETUP_PROFILES, processGroupFromJob, profileDoctorProbe, DEFAULT_STORE_OF, assertDefaultLoginAllowed, assertSetupJobExtendable, resolveLoginProfileBinding, resolveSetupLoginRunnerPath, shellQuote, stateMatchesDurableExecution, waitWithAbort, withAbortAndTimeout, } from "./setup-job-support.js";
|
|
10
|
+
import { SETUP_PROFILES, processGroupFromJob, profileDoctorProbe, DEFAULT_STORE_OF, assertDefaultLoginAllowed, assertSetupJobExtendable, resolveLoginProfileBinding, resolveSetupLoginRunnerPath, setupProfileBindingMessage, shellQuote, stateMatchesDurableExecution, waitWithAbort, withAbortAndTimeout, } from "./setup-job-support.js";
|
|
11
11
|
import { buildGateway } from "./registry.js";
|
|
12
12
|
import { ACTIVE_SETUP_STATES, SetupJobStore, TERMINAL_SETUP_STATES } from "./setup-job-store.js";
|
|
13
13
|
import { SETUP_LOGIN_PROTOCOL_VERSION, atomicPrivateJson, captureExecutableEvidence, commandDigest, readLoginManifest, readRunnerResult, readRunnerState, sealLoginManifest, verifyExecutableEvidence, } from "./setup-login-protocol.js";
|
|
14
14
|
import { SetupSupervisor } from "./setup-supervisor.js";
|
|
15
15
|
import { createDeviceCodeDisclosureWatcher } from "./setup-device-code-disclosure.js";
|
|
16
|
-
import { awaitingSetupUserMessage,
|
|
16
|
+
import { awaitingSetupUserMessage, deviceCodeRejectionRemedy, clientPtyWaitingPatch, isDeviceCodeSetupJob, projectSetupDeviceCode, removeSetupDeviceCodeSidecar, setupTransportConflict, } from "./setup-client-pty.js";
|
|
17
17
|
import { persistSetupLoginPermit, setupLoginDeadlines } from "./setup-login-permit.js";
|
|
18
18
|
import { graceVerifyAfterDeadline, isUrlDisclosureLoginMode, submitSetupLoginInput, } from "./setup-login-completion.js";
|
|
19
|
+
import { setupRunnerFailureOutcome } from "./setup-runner-outcome.js";
|
|
19
20
|
const NO_PROJECT_ROOT = noProjectRepoRoot();
|
|
20
21
|
const LOGIN_EXTENSION_MS = 15 * 60_000;
|
|
21
22
|
export function createSetupJobManager(opts = {}) {
|
|
@@ -438,14 +439,9 @@ export function createSetupJobManager(opts = {}) {
|
|
|
438
439
|
return;
|
|
439
440
|
}
|
|
440
441
|
job = persistNativeCommandOutcome(jobId, result);
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
return;
|
|
445
|
-
}
|
|
446
|
-
finish(jobId, "failed", "launch_failed", result.errorCode === "permit_timeout"
|
|
447
|
-
? `${job.harness} login worker timed out before a durable execution permit was issued.`
|
|
448
|
-
: `${job.harness} login command could not be spawned after authorization.`);
|
|
442
|
+
const runnerFailure = setupRunnerFailureOutcome(job.harness, result, platform);
|
|
443
|
+
if (runnerFailure) {
|
|
444
|
+
finish(jobId, ...runnerFailure);
|
|
449
445
|
return;
|
|
450
446
|
}
|
|
451
447
|
if (result.exitCode === 0 && result.signal === null) {
|
|
@@ -691,6 +687,7 @@ export function createSetupJobManager(opts = {}) {
|
|
|
691
687
|
}
|
|
692
688
|
function startObservableLogin(job, spec, profileConfigDir) {
|
|
693
689
|
const deviceCode = spec.loginMode === "device_code";
|
|
690
|
+
const clientPty = job.transport === "client_pty";
|
|
694
691
|
// Daemon-hosted modes never touch Terminal and run on any posix platform;
|
|
695
692
|
// only the legacy Terminal handoff (codex browser_redirect) is macOS-only.
|
|
696
693
|
const daemonHosted = deviceCode || isUrlDisclosureLoginMode(spec.loginMode);
|
|
@@ -730,24 +727,28 @@ export function createSetupJobManager(opts = {}) {
|
|
|
730
727
|
args: [...spec.args],
|
|
731
728
|
cwd: paths.dir,
|
|
732
729
|
...(targetConfigDir ? { profileConfigDir: targetConfigDir } : {}),
|
|
733
|
-
//
|
|
734
|
-
//
|
|
735
|
-
//
|
|
736
|
-
//
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
730
|
+
// These fields describe DAEMON-owned disclosure/control only. A
|
|
731
|
+
// client_pty manifest is an external-attach command contract: attach
|
|
732
|
+
// runs the vendor in the already attached terminal with inherited
|
|
733
|
+
// stdio, so it must not contain sidecars, login modes, or a PTY helper.
|
|
734
|
+
...(!clientPty
|
|
735
|
+
? {
|
|
736
|
+
deviceCodePath: paths.runnerDeviceCode,
|
|
737
|
+
...(deviceCode
|
|
738
|
+
? { loginMode: "device_code", appServerFlow: spec.appServerFlow }
|
|
739
|
+
: isUrlDisclosureLoginMode(spec.loginMode)
|
|
740
|
+
? {
|
|
741
|
+
loginMode: spec.loginMode,
|
|
742
|
+
...(spec.loginMode === "url_disclosure_with_input"
|
|
743
|
+
? {
|
|
744
|
+
inputPath: paths.runnerInput,
|
|
745
|
+
...(spec.ptyStdin ? { ptyStdin: true } : {}),
|
|
746
|
+
}
|
|
747
|
+
: {}),
|
|
748
|
+
}
|
|
748
749
|
: {}),
|
|
749
|
-
|
|
750
|
-
|
|
750
|
+
}
|
|
751
|
+
: {}),
|
|
751
752
|
statePath: paths.runnerState,
|
|
752
753
|
resultPath: paths.runnerResult,
|
|
753
754
|
permitPath: paths.runnerPermit,
|
|
@@ -757,6 +758,26 @@ export function createSetupJobManager(opts = {}) {
|
|
|
757
758
|
commandDigest: authorizedCommandDigest,
|
|
758
759
|
});
|
|
759
760
|
atomicPrivateJson(paths.manifest, manifest);
|
|
761
|
+
// External attach is a real transport, not a daemon-hosted login with a
|
|
762
|
+
// second terminal layered on top. Seal and wait before any runner spawn.
|
|
763
|
+
if (clientPty) {
|
|
764
|
+
const authorization = {
|
|
765
|
+
executionId,
|
|
766
|
+
executable,
|
|
767
|
+
args: [...spec.args],
|
|
768
|
+
commandDigest: authorizedCommandDigest,
|
|
769
|
+
manifestDigest: manifest.manifestDigest,
|
|
770
|
+
};
|
|
771
|
+
const waiting = update(job.jobId, clientPtyWaitingPatch({
|
|
772
|
+
job,
|
|
773
|
+
deadlineAt: loginDeadlineAt,
|
|
774
|
+
startedAt: iso(),
|
|
775
|
+
command: spec.displayCommand,
|
|
776
|
+
authorization,
|
|
777
|
+
}));
|
|
778
|
+
log(job.jobId, `client_pty attach prepared: ${paths.manifest}`);
|
|
779
|
+
return waiting;
|
|
780
|
+
}
|
|
760
781
|
if (daemonHosted) {
|
|
761
782
|
// D-17 primary flow: launch the app-server runner DETACHED (no Terminal,
|
|
762
783
|
// no login.command script). The runner survives daemon restart exactly
|
|
@@ -802,24 +823,6 @@ export function createSetupJobManager(opts = {}) {
|
|
|
802
823
|
runner.unref();
|
|
803
824
|
return waiting;
|
|
804
825
|
}
|
|
805
|
-
if (job.transport === "client_pty") {
|
|
806
|
-
const authorization = {
|
|
807
|
-
executionId,
|
|
808
|
-
executable,
|
|
809
|
-
args: [...spec.args],
|
|
810
|
-
commandDigest: authorizedCommandDigest,
|
|
811
|
-
manifestDigest: manifest.manifestDigest,
|
|
812
|
-
};
|
|
813
|
-
const waiting = update(job.jobId, clientPtyWaitingPatch({
|
|
814
|
-
job,
|
|
815
|
-
deadlineAt: loginDeadlineAt,
|
|
816
|
-
startedAt: iso(),
|
|
817
|
-
command: spec.displayCommand,
|
|
818
|
-
authorization,
|
|
819
|
-
}));
|
|
820
|
-
log(job.jobId, `client_pty attach prepared: ${paths.manifest}`);
|
|
821
|
-
return waiting;
|
|
822
|
-
}
|
|
823
826
|
// External-risk disclosure (v3.0.3, Bible): a browser-based OpenAI
|
|
824
827
|
// sign-in completed in a browser holding ANOTHER account's session can
|
|
825
828
|
// revoke sibling sessions (incl. the ChatGPT desktop app) server-side.
|
|
@@ -918,7 +921,7 @@ export function createSetupJobManager(opts = {}) {
|
|
|
918
921
|
create(input, idempotency) {
|
|
919
922
|
const request = ControlSetupJobCreateRequest.parse(input);
|
|
920
923
|
const { harness, action } = request;
|
|
921
|
-
const profileBinding = resolveLoginProfileBinding(harness, action, request.profileId);
|
|
924
|
+
const profileBinding = resolveLoginProfileBinding(harness, action, request.profileId, platform);
|
|
922
925
|
assertDefaultLoginAllowed(harness, profileBinding !== null);
|
|
923
926
|
const binding = idempotency ? { ...idempotency, request } : undefined;
|
|
924
927
|
const prior = binding ? store.resolveCreate(binding) : null;
|
|
@@ -996,7 +999,7 @@ export function createSetupJobManager(opts = {}) {
|
|
|
996
999
|
command: null,
|
|
997
1000
|
guideUrl: profile.guideUrl,
|
|
998
1001
|
message: profileBinding
|
|
999
|
-
? `${profile.note}
|
|
1002
|
+
? `${profile.note} ${setupProfileBindingMessage(harness, profileBinding)}`
|
|
1000
1003
|
: `${profile.note} The required same-harness smoke may consume quota; incremental billing is unknown.`,
|
|
1001
1004
|
createdAt: iso(),
|
|
1002
1005
|
startedAt: null,
|