@claudexor/schema 1.0.1 → 2.1.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/agent-capabilities.d.ts +102 -30
- package/dist/agent-capabilities.d.ts.map +1 -1
- package/dist/agent-capabilities.js +49 -18
- package/dist/agent-capabilities.js.map +1 -1
- package/dist/apply-eligibility.d.ts.map +1 -1
- package/dist/apply-eligibility.js +22 -6
- package/dist/apply-eligibility.js.map +1 -1
- package/dist/attachment.d.ts +117 -52
- package/dist/attachment.d.ts.map +1 -1
- package/dist/attachment.js +60 -45
- package/dist/attachment.js.map +1 -1
- package/dist/auth.d.ts +1444 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +371 -0
- package/dist/auth.js.map +1 -0
- package/dist/budget.d.ts +147 -18
- package/dist/budget.d.ts.map +1 -1
- package/dist/budget.js +80 -22
- package/dist/budget.js.map +1 -1
- package/dist/config.d.ts +829 -135
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +195 -41
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +6 -6
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +31 -7
- package/dist/context.js.map +1 -1
- package/dist/control-gc.d.ts +185 -0
- package/dist/control-gc.d.ts.map +1 -0
- package/dist/control-gc.js +81 -0
- package/dist/control-gc.js.map +1 -0
- package/dist/control-operation-responses.d.ts +1298 -0
- package/dist/control-operation-responses.d.ts.map +1 -0
- package/dist/control-operation-responses.js +35 -0
- package/dist/control-operation-responses.js.map +1 -0
- package/dist/control-run-detail.d.ts +556 -247
- package/dist/control-run-detail.d.ts.map +1 -1
- package/dist/control-run-detail.js +72 -17
- package/dist/control-run-detail.js.map +1 -1
- package/dist/control-run-retry.d.ts +88 -0
- package/dist/control-run-retry.d.ts.map +1 -0
- package/dist/control-run-retry.js +40 -0
- package/dist/control-run-retry.js.map +1 -0
- package/dist/control-run-scope.d.ts +25 -0
- package/dist/control-run-scope.d.ts.map +1 -0
- package/dist/control-run-scope.js +22 -0
- package/dist/control-run-scope.js.map +1 -0
- package/dist/control-secret.d.ts +90 -0
- package/dist/control-secret.d.ts.map +1 -0
- package/dist/control-secret.js +35 -0
- package/dist/control-secret.js.map +1 -0
- package/dist/control-spec.d.ts +592 -0
- package/dist/control-spec.d.ts.map +1 -0
- package/dist/control-spec.js +85 -0
- package/dist/control-spec.js.map +1 -0
- package/dist/control-thread-apply.d.ts +175 -0
- package/dist/control-thread-apply.d.ts.map +1 -0
- package/dist/control-thread-apply.js +31 -0
- package/dist/control-thread-apply.js.map +1 -0
- package/dist/control-trust.d.ts +74 -10
- package/dist/control-trust.d.ts.map +1 -1
- package/dist/control-trust.js +31 -11
- package/dist/control-trust.js.map +1 -1
- package/dist/control.d.ts +1688 -1334
- package/dist/control.d.ts.map +1 -1
- package/dist/control.js +592 -333
- package/dist/control.js.map +1 -1
- package/dist/credential-profile.d.ts +454 -0
- package/dist/credential-profile.d.ts.map +1 -0
- package/dist/credential-profile.js +140 -0
- package/dist/credential-profile.js.map +1 -0
- package/dist/decision.d.ts +10 -10
- package/dist/decision.d.ts.map +1 -1
- package/dist/decision.js +62 -15
- package/dist/decision.js.map +1 -1
- package/dist/delivery.d.ts +99 -0
- package/dist/delivery.d.ts.map +1 -0
- package/dist/delivery.js +19 -0
- package/dist/delivery.js.map +1 -0
- package/dist/events.d.ts +41 -4
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +47 -4
- package/dist/events.js.map +1 -1
- package/dist/gate.d.ts +5 -5
- package/dist/gate.d.ts.map +1 -1
- package/dist/gate.js +25 -5
- package/dist/gate.js.map +1 -1
- package/dist/harness.d.ts +775 -237
- package/dist/harness.d.ts.map +1 -1
- package/dist/harness.js +314 -111
- package/dist/harness.js.map +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/operation.d.ts +185 -0
- package/dist/operation.d.ts.map +1 -0
- package/dist/operation.js +50 -0
- package/dist/operation.js.map +1 -0
- package/dist/orchestrate.d.ts +150 -22
- package/dist/orchestrate.d.ts.map +1 -1
- package/dist/orchestrate.js +117 -7
- package/dist/orchestrate.js.map +1 -1
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +4 -1
- package/dist/primitives.js.map +1 -1
- package/dist/problem.d.ts +29 -0
- package/dist/problem.d.ts.map +1 -0
- package/dist/problem.js +17 -0
- package/dist/problem.js.map +1 -0
- package/dist/project.d.ts +97 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +27 -0
- package/dist/project.js.map +1 -0
- package/dist/quota.d.ts +269 -0
- package/dist/quota.d.ts.map +1 -0
- package/dist/quota.js +58 -0
- package/dist/quota.js.map +1 -0
- package/dist/raw.d.ts +195 -0
- package/dist/raw.d.ts.map +1 -0
- package/dist/raw.js +58 -0
- package/dist/raw.js.map +1 -0
- package/dist/readiness.d.ts +596 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +87 -0
- package/dist/readiness.js.map +1 -0
- package/dist/recovery.d.ts +515 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +93 -0
- package/dist/recovery.js.map +1 -0
- package/dist/request-requirements.d.ts +36 -0
- package/dist/request-requirements.d.ts.map +1 -0
- package/dist/request-requirements.js +29 -0
- package/dist/request-requirements.js.map +1 -0
- package/dist/review.d.ts +26 -26
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +50 -10
- package/dist/review.js.map +1 -1
- package/dist/route.d.ts +13 -13
- package/dist/route.d.ts.map +1 -1
- package/dist/route.js +19 -4
- package/dist/route.js.map +1 -1
- package/dist/setup.d.ts +9811 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +475 -0
- package/dist/setup.js.map +1 -0
- package/dist/spec.d.ts +178 -61
- package/dist/spec.d.ts.map +1 -1
- package/dist/spec.js +69 -16
- package/dist/spec.js.map +1 -1
- package/dist/surface-run-controls.d.ts.map +1 -1
- package/dist/surface-run-controls.js +25 -21
- package/dist/surface-run-controls.js.map +1 -1
- package/dist/task.d.ts +1657 -60
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js +144 -18
- package/dist/task.js.map +1 -1
- package/dist/telemetry.d.ts +487 -72
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +194 -16
- package/dist/telemetry.js.map +1 -1
- package/dist/thread.d.ts +89 -51
- package/dist/thread.d.ts.map +1 -1
- package/dist/thread.js +56 -11
- package/dist/thread.js.map +1 -1
- package/dist/tool-ref.d.ts +45 -0
- package/dist/tool-ref.d.ts.map +1 -0
- package/dist/tool-ref.js +45 -0
- package/dist/tool-ref.js.map +1 -0
- package/dist/workproduct.d.ts +3 -3
- package/dist/workproduct.d.ts.map +1 -1
- package/dist/workproduct.js.map +1 -1
- package/dist/workspace.d.ts +3 -3
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +12 -3
- package/dist/workspace.js.map +1 -1
- package/generated/AgentCapabilityCatalog.schema.json +53 -11
- package/generated/BudgetLease.schema.json +55 -6
- package/generated/BudgetObservation.schema.json +44 -7
- package/generated/ConformanceReport.schema.json +49 -0
- package/generated/ControlApplyCheckResponse.schema.json +34 -0
- package/generated/ControlArtifactListResponse.schema.json +57 -0
- package/generated/ControlAuthReadinessRefreshRequest.schema.json +38 -0
- package/generated/ControlAuthReadinessRefreshResponse.schema.json +85 -0
- package/generated/ControlCredentialProfileCreateRequest.schema.json +32 -0
- package/generated/ControlCredentialProfileCreateResponse.schema.json +142 -0
- package/generated/ControlCredentialProfileDeleteResponse.schema.json +107 -0
- package/generated/ControlCredentialProfilesResponse.schema.json +155 -0
- package/generated/ControlDeliveryResponse.schema.json +136 -0
- package/generated/ControlGcReceipt.schema.json +170 -0
- package/generated/ControlGcRequest.schema.json +18 -0
- package/generated/ControlHandshakeRequest.schema.json +26 -0
- package/generated/ControlHandshakeResponse.schema.json +30 -0
- package/generated/ControlHarnessListResponse.schema.json +198 -14
- package/generated/ControlHarnessModelsResponse.schema.json +19 -0
- package/generated/ControlHarnessSettingsPatch.schema.json +9 -12
- package/generated/ControlJournalEvent.schema.json +42 -0
- package/generated/ControlJournalExportReceipt.schema.json +49 -0
- package/generated/ControlJournalInspection.schema.json +149 -0
- package/generated/ControlJournalQuarantineReceipt.schema.json +55 -0
- package/generated/ControlJournalQuarantineRequest.schema.json +24 -0
- package/generated/ControlJournalValidation.schema.json +181 -0
- package/generated/ControlOperationCatalog.schema.json +128 -0
- package/generated/ControlOperationDescriptor.schema.json +110 -0
- package/generated/ControlProblem.schema.json +59 -0
- package/generated/ControlProject.schema.json +42 -0
- package/generated/ControlProjectListResponse.schema.json +54 -0
- package/generated/ControlProjectRegisterRequest.schema.json +19 -0
- package/generated/ControlProjectRelinkRequest.schema.json +19 -0
- package/generated/ControlQueuedRunInfo.schema.json +4 -2
- package/generated/ControlQuotaResponse.schema.json +177 -0
- package/generated/ControlResource.schema.json +59 -0
- package/generated/ControlRunAgainDraft.schema.json +539 -0
- package/generated/ControlRunDetail.schema.json +373 -34
- package/generated/ControlRunListResponse.schema.json +968 -0
- package/generated/ControlRunRetryResponse.schema.json +54 -0
- package/generated/ControlRunStartRequest.schema.json +123 -55
- package/generated/ControlRunStartResponse.schema.json +78 -0
- package/generated/ControlRunSummary.schema.json +312 -21
- package/generated/ControlSecretListResponse.schema.json +8 -14
- package/generated/ControlSecretMutationResponse.schema.json +32 -0
- package/generated/ControlSecretSetRequest.schema.json +27 -0
- package/generated/ControlSettingsSnapshot.schema.json +128 -44
- package/generated/ControlSettingsUpdateRequest.schema.json +119 -40
- package/generated/ControlSetupJob.schema.json +770 -64
- package/generated/ControlSetupJobCreateRequest.schema.json +16 -13
- package/generated/ControlSetupJobEvent.schema.json +869 -5
- package/generated/ControlSetupJobListFilter.schema.json +35 -0
- package/generated/ControlSetupJobListResponse.schema.json +770 -64
- package/generated/ControlSetupJobSnapshot.schema.json +878 -0
- package/generated/ControlSpecAnswersRequest.schema.json +74 -0
- package/generated/ControlSpecQuestionsRequest.schema.json +128 -2
- package/generated/ControlSpecSession.schema.json +249 -0
- package/generated/ControlSpecSessionListResponse.schema.json +261 -0
- package/generated/ControlThread.schema.json +36 -6
- package/generated/ControlThreadApplyResponse.schema.json +139 -0
- package/generated/ControlThreadCreateRequest.schema.json +6 -2
- package/generated/ControlThreadDetail.schema.json +64 -12
- package/generated/ControlThreadListResponse.schema.json +36 -6
- package/generated/ControlThreadTurnRequest.schema.json +413 -0
- package/generated/ControlThreadTurnResponse.schema.json +73 -0
- package/generated/ControlThreadUpdateRequest.schema.json +12 -1
- package/generated/ControlTrustListResponse.schema.json +6 -0
- package/generated/ControlTrustState.schema.json +6 -0
- package/generated/ControlTrustUpdateRequest.schema.json +65 -3
- package/generated/ControlUploadCreateRequest.schema.json +37 -0
- package/generated/ControlUploadFinalizeRequest.schema.json +17 -0
- package/generated/ControlUploadStatus.schema.json +40 -0
- package/generated/CredentialProfile.schema.json +78 -0
- package/generated/CredentialProfileStatus.schema.json +61 -0
- package/generated/DecisionRecord.schema.json +6 -3
- package/generated/GlobalConfig.schema.json +238 -55
- package/generated/HarnessEvent.schema.json +259 -11
- package/generated/HarnessManifest.schema.json +96 -14
- package/generated/HarnessModel.schema.json +19 -0
- package/generated/HarnessStatusDto.schema.json +198 -14
- package/generated/OrchestrateContract.schema.json +32 -6
- package/generated/OrchestratePlan.schema.json +20 -0
- package/generated/OrchestratePlanProgress.schema.json +61 -0
- package/generated/PaidBudget.schema.json +42 -0
- package/generated/Project.schema.json +45 -0
- package/generated/ProjectConfig.schema.json +45 -18
- package/generated/RawContextPacket.schema.json +184 -0
- package/generated/RawGitPatchEnvelope.schema.json +70 -0
- package/generated/RunEvent.schema.json +3 -0
- package/generated/RunTelemetry.schema.json +280 -0
- package/generated/SecretMetadata.schema.json +4 -7
- package/generated/Session.schema.json +14 -0
- package/generated/SpecPack.schema.json +118 -7
- package/generated/TaskContract.schema.json +224 -30
- package/generated/TestCommandInvocation.schema.json +45 -0
- package/generated/Thread.schema.json +74 -6
- package/generated/ThreadHeadPing.schema.json +40 -0
- package/generated/ThreadTurn.schema.json +24 -11
- package/generated/TrustConfig.schema.json +77 -0
- package/package.json +3 -2
- package/generated/ControlSetupJobConfirmRequest.schema.json +0 -18
- package/generated/ControlSpecFreezeRequest.schema.json +0 -83
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { namespacedSecretRefBase } from "@claudexor/util";
|
|
3
|
+
import { Id, IsoTimestamp } from "./primitives.js";
|
|
4
|
+
import { AuthAvailability, AuthVerification } from "./auth.js";
|
|
5
|
+
/**
|
|
6
|
+
* The credential transport a profile isolates (INV-135). `config_dir_login` is
|
|
7
|
+
* a vendor-owned login living in a Claudexor-scoped config dir (claude
|
|
8
|
+
* CLAUDE_CONFIG_DIR / codex CODEX_HOME); `oauth_token` and `api_key` are
|
|
9
|
+
* secret-store references. The default vendor dirs (~/.claude, native codex
|
|
10
|
+
* home) are NEVER a profile's isolation locator — profiles are additive.
|
|
11
|
+
*/
|
|
12
|
+
export const CredentialKind = z
|
|
13
|
+
.enum(["config_dir_login", "oauth_token", "api_key"])
|
|
14
|
+
.describe("Credential transport a profile isolates: a scoped vendor config-dir login, a stored OAuth token, or a stored API key.");
|
|
15
|
+
/**
|
|
16
|
+
* Durable, NON-SECRET registry entry for one credential identity of one
|
|
17
|
+
* harness (INV-135). Secret material never lives here: `config_dir_login`
|
|
18
|
+
* points at a vendor-owned directory, token/key kinds point at a namespaced
|
|
19
|
+
* secret-store name. Readiness is intentionally NOT durable — it is the
|
|
20
|
+
* doctor's `CredentialProfileStatus` projection.
|
|
21
|
+
*/
|
|
22
|
+
export const CredentialProfile = z
|
|
23
|
+
.object({
|
|
24
|
+
profile_id: Id.describe("Stable user-chosen profile identifier (unique per harness)."),
|
|
25
|
+
harness_id: Id.describe("Harness family this profile belongs to."),
|
|
26
|
+
display_name: z.string().min(1).describe("Human label shown wherever the profile appears."),
|
|
27
|
+
credential_kind: CredentialKind,
|
|
28
|
+
isolation_locator: z
|
|
29
|
+
.string()
|
|
30
|
+
.nullable()
|
|
31
|
+
.default(null)
|
|
32
|
+
.describe("Canonical absolute config-dir path for config_dir_login profiles; null for secret-ref kinds."),
|
|
33
|
+
secret_ref: z
|
|
34
|
+
.string()
|
|
35
|
+
.nullable()
|
|
36
|
+
.default(null)
|
|
37
|
+
.describe("Namespaced secret-store name (e.g. claude_oauth:work) for oauth_token/api_key profiles; null for config_dir_login."),
|
|
38
|
+
enabled: z.boolean().default(true).describe("Disabled profiles are never routable."),
|
|
39
|
+
created_at: IsoTimestamp.nullable()
|
|
40
|
+
.default(null)
|
|
41
|
+
.describe("When the profile was registered; null for hand-written config entries."),
|
|
42
|
+
})
|
|
43
|
+
.strict()
|
|
44
|
+
.superRefine((profile, ctx) => {
|
|
45
|
+
if (profile.credential_kind === "config_dir_login") {
|
|
46
|
+
if (!profile.isolation_locator)
|
|
47
|
+
ctx.addIssue({
|
|
48
|
+
code: "custom",
|
|
49
|
+
message: "config_dir_login profiles require isolation_locator (the scoped config dir)",
|
|
50
|
+
});
|
|
51
|
+
if (profile.secret_ref)
|
|
52
|
+
ctx.addIssue({
|
|
53
|
+
code: "custom",
|
|
54
|
+
message: "config_dir_login profiles must not carry secret_ref",
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
if (!profile.secret_ref)
|
|
59
|
+
ctx.addIssue({
|
|
60
|
+
code: "custom",
|
|
61
|
+
message: `${profile.credential_kind} profiles require secret_ref`,
|
|
62
|
+
});
|
|
63
|
+
// Release wave round-15 #5: a profile's ref must be NAMESPACED
|
|
64
|
+
// (`base:profile`). A bare engine-default slot (e.g. "anthropic") would
|
|
65
|
+
// silently alias the default credential — profiles are ADDITIVE.
|
|
66
|
+
else if (namespacedSecretRefBase(profile.secret_ref) === null)
|
|
67
|
+
ctx.addIssue({
|
|
68
|
+
code: "custom",
|
|
69
|
+
message: `secret_ref "${profile.secret_ref}" must be a namespaced managed slot (base:profile, e.g. claude_oauth:work); bare engine-default slots would alias the default credential`,
|
|
70
|
+
});
|
|
71
|
+
if (profile.isolation_locator)
|
|
72
|
+
ctx.addIssue({
|
|
73
|
+
code: "custom",
|
|
74
|
+
message: `${profile.credential_kind} profiles must not carry isolation_locator`,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
.describe("Durable non-secret registry entry for one credential identity of one harness; secret material lives in the vendor dir or the secret store, never here.");
|
|
79
|
+
/**
|
|
80
|
+
* Doctor-owned readiness projection for one profile — deliberately separate
|
|
81
|
+
* from the durable registry entry so stored config never asserts liveness.
|
|
82
|
+
*/
|
|
83
|
+
export const CredentialProfileStatus = z
|
|
84
|
+
.object({
|
|
85
|
+
profile_id: Id,
|
|
86
|
+
harness_id: Id,
|
|
87
|
+
availability: AuthAvailability,
|
|
88
|
+
verification: AuthVerification,
|
|
89
|
+
detail: z.string().optional().describe("Redacted human-readable probe evidence."),
|
|
90
|
+
last_verified_at: IsoTimestamp.nullable()
|
|
91
|
+
.default(null)
|
|
92
|
+
.describe("When a probe last verified this profile; null = never verified."),
|
|
93
|
+
})
|
|
94
|
+
.strict()
|
|
95
|
+
.describe("Doctor-owned readiness projection for one credential profile; never durable config.");
|
|
96
|
+
/** Control response: every registered profile with its doctor projection. */
|
|
97
|
+
export const ControlCredentialProfilesResponse = z
|
|
98
|
+
.object({
|
|
99
|
+
profiles: z
|
|
100
|
+
.array(z.object({ profile: CredentialProfile, status: CredentialProfileStatus }).strict())
|
|
101
|
+
.describe("Every registered credential profile paired with its doctor readiness projection."),
|
|
102
|
+
})
|
|
103
|
+
.strict()
|
|
104
|
+
.describe("Credential-profile registry listing with per-profile doctor readiness.");
|
|
105
|
+
/** Register a config-dir login profile (claude/codex) from a UI surface —
|
|
106
|
+
* the same ONE locked registration owner `claudexor profiles add` uses. */
|
|
107
|
+
export const ControlCredentialProfileCreateRequest = z
|
|
108
|
+
.object({
|
|
109
|
+
harnessId: Id.describe("Harness family (claude | codex) for the config-dir login profile."),
|
|
110
|
+
profileId: Id.describe("New profile id (bounded slug, unique per harness)."),
|
|
111
|
+
displayName: z
|
|
112
|
+
.string()
|
|
113
|
+
.min(1)
|
|
114
|
+
.optional()
|
|
115
|
+
.describe("Human label shown wherever the account appears; defaults to the id."),
|
|
116
|
+
})
|
|
117
|
+
.strict()
|
|
118
|
+
.describe("Request body for POST /credential-profiles.");
|
|
119
|
+
/** DELETE /credential-profiles/:harness/:id — removes the registry entry and
|
|
120
|
+
* the profile's OWN credential material (its scoped login dir, or its
|
|
121
|
+
* namespaced secret). The default vendor store is untouchable by design. */
|
|
122
|
+
export const ControlCredentialProfileDeleteResponse = z
|
|
123
|
+
.object({
|
|
124
|
+
profile: CredentialProfile.describe("The removed registry entry."),
|
|
125
|
+
removed: z.literal(true),
|
|
126
|
+
credentialCleanup: z
|
|
127
|
+
.enum(["config_dir_removed", "secret_deleted", "none"])
|
|
128
|
+
.describe("What credential material was deleted alongside the registry entry."),
|
|
129
|
+
cleanupWarning: z
|
|
130
|
+
.string()
|
|
131
|
+
.optional()
|
|
132
|
+
.describe("Present when the registry entry was removed but cleanup failed (orphan left)."),
|
|
133
|
+
})
|
|
134
|
+
.strict()
|
|
135
|
+
.describe("Receipt for a credential-profile removal.");
|
|
136
|
+
export const ControlCredentialProfileCreateResponse = z
|
|
137
|
+
.object({ profile: CredentialProfile, status: CredentialProfileStatus })
|
|
138
|
+
.strict()
|
|
139
|
+
.describe("The registered profile with its initial doctor readiness projection.");
|
|
140
|
+
//# sourceMappingURL=credential-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-profile.js","sourceRoot":"","sources":["../src/credential-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,YAAY,EAA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M,EAAE;KACR,QAAQ,CAAC,2CAA2C,CAAC,CAAC;AAKzD,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC;KACpD,MAAM,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC;KACvE,MAAM,EAAE;KACR,QAAQ,CAAC,sEAAsE,CAAC,CAAC"}
|
package/dist/decision.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const PairwiseComparison: z.ZodObject<{
|
|
|
28
28
|
}>;
|
|
29
29
|
}>;
|
|
30
30
|
export type PairwiseComparison = z.infer<typeof PairwiseComparison>;
|
|
31
|
-
export declare const RunStatus: z.ZodEnum<["success", "no_op", "ungated", "review_not_run", "blocked", "
|
|
31
|
+
export declare const RunStatus: z.ZodEnum<["success", "no_op", "ungated", "review_not_run", "blocked", "failed", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress", "cancelled"]>;
|
|
32
32
|
export type RunStatus = z.infer<typeof RunStatus>;
|
|
33
33
|
export declare const ApplyRecommendation: z.ZodEnum<["apply", "inspect", "continue", "split_task", "human_review"]>;
|
|
34
34
|
export type ApplyRecommendation = z.infer<typeof ApplyRecommendation>;
|
|
@@ -63,9 +63,9 @@ export declare const FinalVerifyRecord: z.ZodObject<{
|
|
|
63
63
|
/** Typed reason when attempted=false (e.g. no_patch, no_base_sha) or a failure detail. */
|
|
64
64
|
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
65
65
|
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
reason: string | null;
|
|
66
67
|
duration_ms: number | null;
|
|
67
68
|
base_sha: string | null;
|
|
68
|
-
reason: string | null;
|
|
69
69
|
attempted: boolean;
|
|
70
70
|
applied_cleanly: boolean | null;
|
|
71
71
|
gates_passed: boolean | null;
|
|
@@ -75,9 +75,9 @@ export declare const FinalVerifyRecord: z.ZodObject<{
|
|
|
75
75
|
}[];
|
|
76
76
|
}, {
|
|
77
77
|
attempted: boolean;
|
|
78
|
+
reason?: string | null | undefined;
|
|
78
79
|
duration_ms?: number | null | undefined;
|
|
79
80
|
base_sha?: string | null | undefined;
|
|
80
|
-
reason?: string | null | undefined;
|
|
81
81
|
applied_cleanly?: boolean | null | undefined;
|
|
82
82
|
gates_passed?: boolean | null | undefined;
|
|
83
83
|
gates?: {
|
|
@@ -88,7 +88,7 @@ export declare const FinalVerifyRecord: z.ZodObject<{
|
|
|
88
88
|
export type FinalVerifyRecord = z.infer<typeof FinalVerifyRecord>;
|
|
89
89
|
export declare const DecisionRecord: z.ZodObject<{
|
|
90
90
|
winner: z.ZodNullable<z.ZodString>;
|
|
91
|
-
status: z.ZodEnum<["success", "no_op", "ungated", "review_not_run", "blocked", "
|
|
91
|
+
status: z.ZodEnum<["success", "no_op", "ungated", "review_not_run", "blocked", "failed", "interrupted_unknown", "cost_unverifiable", "exhausted_overshoot", "exhausted", "not_converged", "stuck_no_progress", "cancelled"]>;
|
|
92
92
|
outcome: z.ZodDefault<z.ZodEnum<["ready", "no_op", "ungated", "review_not_run", "blocked"]>>;
|
|
93
93
|
why_winner: z.ZodDefault<z.ZodString>;
|
|
94
94
|
why_not_others: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -127,9 +127,9 @@ export declare const DecisionRecord: z.ZodObject<{
|
|
|
127
127
|
/** Typed reason when attempted=false (e.g. no_patch, no_base_sha) or a failure detail. */
|
|
128
128
|
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
129
129
|
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
reason: string | null;
|
|
130
131
|
duration_ms: number | null;
|
|
131
132
|
base_sha: string | null;
|
|
132
|
-
reason: string | null;
|
|
133
133
|
attempted: boolean;
|
|
134
134
|
applied_cleanly: boolean | null;
|
|
135
135
|
gates_passed: boolean | null;
|
|
@@ -139,9 +139,9 @@ export declare const DecisionRecord: z.ZodObject<{
|
|
|
139
139
|
}[];
|
|
140
140
|
}, {
|
|
141
141
|
attempted: boolean;
|
|
142
|
+
reason?: string | null | undefined;
|
|
142
143
|
duration_ms?: number | null | undefined;
|
|
143
144
|
base_sha?: string | null | undefined;
|
|
144
|
-
reason?: string | null | undefined;
|
|
145
145
|
applied_cleanly?: boolean | null | undefined;
|
|
146
146
|
gates_passed?: boolean | null | undefined;
|
|
147
147
|
gates?: {
|
|
@@ -150,7 +150,7 @@ export declare const DecisionRecord: z.ZodObject<{
|
|
|
150
150
|
}[] | undefined;
|
|
151
151
|
}>>>;
|
|
152
152
|
}, "strip", z.ZodTypeAny, {
|
|
153
|
-
status: "cancelled" | "success" | "no_op" | "ungated" | "review_not_run" | "blocked" | "
|
|
153
|
+
status: "failed" | "cancelled" | "interrupted_unknown" | "success" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress";
|
|
154
154
|
winner: string | null;
|
|
155
155
|
outcome: "ready" | "no_op" | "ungated" | "review_not_run" | "blocked";
|
|
156
156
|
why_winner: string;
|
|
@@ -165,9 +165,9 @@ export declare const DecisionRecord: z.ZodObject<{
|
|
|
165
165
|
apply_recommendation: "apply" | "inspect" | "continue" | "split_task" | "human_review";
|
|
166
166
|
verification_basis: "none" | "cross_family_review" | "both";
|
|
167
167
|
final_verify: {
|
|
168
|
+
reason: string | null;
|
|
168
169
|
duration_ms: number | null;
|
|
169
170
|
base_sha: string | null;
|
|
170
|
-
reason: string | null;
|
|
171
171
|
attempted: boolean;
|
|
172
172
|
applied_cleanly: boolean | null;
|
|
173
173
|
gates_passed: boolean | null;
|
|
@@ -177,7 +177,7 @@ export declare const DecisionRecord: z.ZodObject<{
|
|
|
177
177
|
}[];
|
|
178
178
|
} | null;
|
|
179
179
|
}, {
|
|
180
|
-
status: "cancelled" | "success" | "no_op" | "ungated" | "review_not_run" | "blocked" | "
|
|
180
|
+
status: "failed" | "cancelled" | "interrupted_unknown" | "success" | "no_op" | "ungated" | "review_not_run" | "blocked" | "cost_unverifiable" | "exhausted_overshoot" | "exhausted" | "not_converged" | "stuck_no_progress";
|
|
181
181
|
winner: string | null;
|
|
182
182
|
outcome?: "ready" | "no_op" | "ungated" | "review_not_run" | "blocked" | undefined;
|
|
183
183
|
why_winner?: string | undefined;
|
|
@@ -193,9 +193,9 @@ export declare const DecisionRecord: z.ZodObject<{
|
|
|
193
193
|
verification_basis?: "none" | "cross_family_review" | "both" | undefined;
|
|
194
194
|
final_verify?: {
|
|
195
195
|
attempted: boolean;
|
|
196
|
+
reason?: string | null | undefined;
|
|
196
197
|
duration_ms?: number | null | undefined;
|
|
197
198
|
base_sha?: string | null | undefined;
|
|
198
|
-
reason?: string | null | undefined;
|
|
199
199
|
applied_cleanly?: boolean | null | undefined;
|
|
200
200
|
gates_passed?: boolean | null | undefined;
|
|
201
201
|
gates?: {
|
package/dist/decision.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision.d.ts","sourceRoot":"","sources":["../src/decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAciD,CAAC;AACjF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"decision.d.ts","sourceRoot":"","sources":["../src/decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAciD,CAAC;AACjF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,SAAS,sNAkBnB,CAAC;AACJ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,mBAAmB,2EAI7B,CAAC;AACJ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe,uEAIzB,CAAC;AACJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAS9D,eAAO,MAAM,iBAAiB,oDAI3B,CAAC;AACJ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;IAG1B,8EAA8E;;;;;;;;;;;;;;;IAgC9E,0FAA0F;;;;;;;;;;;;;;;;;;;;;;;;EAW3F,CAAC;AACJ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;QA9CvB,8EAA8E;;;;;;;;;;;;;;;QAgC9E,0FAA0F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkE3F,CAAC;AACJ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
package/dist/decision.js
CHANGED
|
@@ -19,13 +19,16 @@ export const RunStatus = z
|
|
|
19
19
|
"ungated",
|
|
20
20
|
"review_not_run",
|
|
21
21
|
"blocked",
|
|
22
|
-
"not_converged",
|
|
23
|
-
"stuck_no_progress",
|
|
24
22
|
"failed",
|
|
23
|
+
"interrupted_unknown",
|
|
24
|
+
"cost_unverifiable",
|
|
25
|
+
"exhausted_overshoot",
|
|
25
26
|
"exhausted",
|
|
27
|
+
"not_converged",
|
|
28
|
+
"stuck_no_progress",
|
|
26
29
|
"cancelled",
|
|
27
30
|
])
|
|
28
|
-
.describe("Terminal status of a run
|
|
31
|
+
.describe("Terminal status of a run, including truthful blocked, interrupted-unknown, cost-unverifiable, overshoot, exhaustion, non-convergence, failure, and cancellation outcomes.");
|
|
29
32
|
export const ApplyRecommendation = z
|
|
30
33
|
.enum(["apply", "inspect", "continue", "split_task", "human_review"])
|
|
31
34
|
.describe("Recommended next action for the run's work product: apply it, inspect first, continue working, split the task, or get human review.");
|
|
@@ -53,16 +56,41 @@ export const FinalVerifyRecord = z
|
|
|
53
56
|
.object({
|
|
54
57
|
attempted: z.boolean().describe("Whether the final verify was attempted."),
|
|
55
58
|
/** Base the verify tree was created from (the winner envelope's base_sha). */
|
|
56
|
-
base_sha: z
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
base_sha: z
|
|
60
|
+
.string()
|
|
61
|
+
.nullable()
|
|
62
|
+
.default(null)
|
|
63
|
+
.describe("Base SHA the verify tree was created from (the winner envelope's base)."),
|
|
64
|
+
applied_cleanly: z
|
|
65
|
+
.boolean()
|
|
66
|
+
.nullable()
|
|
67
|
+
.default(null)
|
|
68
|
+
.describe("Whether the patch applied cleanly onto the fresh tree; null when not attempted."),
|
|
69
|
+
gates_passed: z
|
|
70
|
+
.boolean()
|
|
71
|
+
.nullable()
|
|
72
|
+
.default(null)
|
|
73
|
+
.describe("Whether the re-run deterministic gates passed; null when not attempted."),
|
|
59
74
|
gates: z
|
|
60
|
-
.array(z.object({
|
|
75
|
+
.array(z.object({
|
|
76
|
+
id: z.string().describe("Gate id."),
|
|
77
|
+
status: z.string().describe("Gate status."),
|
|
78
|
+
}))
|
|
61
79
|
.default([])
|
|
62
80
|
.describe("Per-gate re-run results."),
|
|
63
|
-
duration_ms: z
|
|
81
|
+
duration_ms: z
|
|
82
|
+
.number()
|
|
83
|
+
.int()
|
|
84
|
+
.nonnegative()
|
|
85
|
+
.nullable()
|
|
86
|
+
.default(null)
|
|
87
|
+
.describe("How long the verify took, in milliseconds."),
|
|
64
88
|
/** Typed reason when attempted=false (e.g. no_patch, no_base_sha) or a failure detail. */
|
|
65
|
-
reason: z
|
|
89
|
+
reason: z
|
|
90
|
+
.string()
|
|
91
|
+
.nullable()
|
|
92
|
+
.default(null)
|
|
93
|
+
.describe("Typed reason when attempted=false (e.g. no_patch, no_base_sha) or a failure detail."),
|
|
66
94
|
})
|
|
67
95
|
.describe("FinalVerifier record: the winner's patch was applied onto a fresh worktree at the candidate's own base SHA and the deterministic gates were re-run there; no model involvement.");
|
|
68
96
|
export const DecisionRecord = z
|
|
@@ -71,16 +99,35 @@ export const DecisionRecord = z
|
|
|
71
99
|
status: RunStatus,
|
|
72
100
|
outcome: DecisionOutcome.default("blocked"),
|
|
73
101
|
why_winner: z.string().default("").describe("Why the winner was chosen."),
|
|
74
|
-
why_not_others: z
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
102
|
+
why_not_others: z
|
|
103
|
+
.record(z.string(), z.string())
|
|
104
|
+
.default({})
|
|
105
|
+
.describe("Per-candidate reasons the others lost, keyed by candidate id."),
|
|
106
|
+
accepted_risks: z
|
|
107
|
+
.array(z.string())
|
|
108
|
+
.default([])
|
|
109
|
+
.describe("Risks explicitly accepted in the decision."),
|
|
110
|
+
final_checks: z
|
|
111
|
+
.array(z.string())
|
|
112
|
+
.default([])
|
|
113
|
+
.describe("Final checks performed before the decision."),
|
|
114
|
+
evidence_facts: z
|
|
115
|
+
.array(z.string())
|
|
116
|
+
.default([])
|
|
117
|
+
.describe("Evidence facts the decision rests on."),
|
|
78
118
|
budget_summary: z
|
|
79
119
|
.object({
|
|
80
120
|
// Total settled spend. `estimated` is true when any of it is token-derived
|
|
81
121
|
// (e.g. codex) rather than natively reported — never present an estimate as exact.
|
|
82
|
-
spend_usd: z
|
|
83
|
-
|
|
122
|
+
spend_usd: z
|
|
123
|
+
.number()
|
|
124
|
+
.nullable()
|
|
125
|
+
.default(null)
|
|
126
|
+
.describe("Total settled spend in USD; null when unknown."),
|
|
127
|
+
estimated: z
|
|
128
|
+
.boolean()
|
|
129
|
+
.default(false)
|
|
130
|
+
.describe("True when any of the spend is token-derived rather than natively reported."),
|
|
84
131
|
})
|
|
85
132
|
.default({ spend_usd: null, estimated: false })
|
|
86
133
|
.describe("Settled spend for the run; estimates are disclosed, never presented as exact."),
|
package/dist/decision.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision.js","sourceRoot":"","sources":["../src/decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IAC9D,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC/D,QAAQ,EAAE,CAAC;SACR,MAAM,CACL,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,6CAA6C,CAAC;QACzF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;KACxE,CAAC,CACH;SACA,QAAQ,CAAC,iDAAiD,CAAC;CAC/D,CAAC;KACD,QAAQ,CAAC,mEAAmE,CAAC,CAAC;AAGjF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC;KACvB,IAAI,CAAC;IACJ,SAAS;IACT,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,SAAS;IACT,
|
|
1
|
+
{"version":3,"file":"decision.js","sourceRoot":"","sources":["../src/decision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MA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R,QAAQ,EAAE;aACV,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CAAC,gDAAgD,CAAC;QAC7D,SAAS,EAAE,CAAC;aACT,OAAO,EAAE;aACT,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CAAC,4EAA4E,CAAC;KAC1F,CAAC;SACD,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;SAC9C,QAAQ,CAAC,+EAA+E,CAAC;IAC5F,oBAAoB,EAAE,mBAAmB,CAAC,OAAO,CAAC,SAAS,CAAC;IAC5D,2EAA2E;IAC3E,8EAA8E;IAC9E,kBAAkB,EAAE,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC;IACrD,sEAAsE;IACtE,kEAAkE;IAClE,YAAY,EAAE,iBAAiB,CAAC,QAAQ,EAAE;SACvC,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACP,oHAAoH,CACrH;CACJ,CAAC;KACD,QAAQ,CACP,2HAA2H,CAC5H,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Immutable evidence for one DeliveryService attempt, shared by every apply surface. */
|
|
3
|
+
export declare const DeliveryReceipt: z.ZodObject<{
|
|
4
|
+
mode: z.ZodEnum<["artifact_only", "apply", "branch", "commit", "pr"]>;
|
|
5
|
+
applied: z.ZodBoolean;
|
|
6
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
7
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
8
|
+
prUrl: z.ZodOptional<z.ZodString>;
|
|
9
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
10
|
+
treeMutated: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
refused: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
finalVerify: z.ZodObject<{
|
|
13
|
+
attempted: z.ZodBoolean;
|
|
14
|
+
base_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
applied_cleanly: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
16
|
+
gates_passed: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
17
|
+
gates: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
status: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
status: string;
|
|
22
|
+
id: string;
|
|
23
|
+
}, {
|
|
24
|
+
status: string;
|
|
25
|
+
id: string;
|
|
26
|
+
}>, "many">>;
|
|
27
|
+
duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
28
|
+
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
reason: string | null;
|
|
31
|
+
duration_ms: number | null;
|
|
32
|
+
base_sha: string | null;
|
|
33
|
+
attempted: boolean;
|
|
34
|
+
applied_cleanly: boolean | null;
|
|
35
|
+
gates_passed: boolean | null;
|
|
36
|
+
gates: {
|
|
37
|
+
status: string;
|
|
38
|
+
id: string;
|
|
39
|
+
}[];
|
|
40
|
+
}, {
|
|
41
|
+
attempted: boolean;
|
|
42
|
+
reason?: string | null | undefined;
|
|
43
|
+
duration_ms?: number | null | undefined;
|
|
44
|
+
base_sha?: string | null | undefined;
|
|
45
|
+
applied_cleanly?: boolean | null | undefined;
|
|
46
|
+
gates_passed?: boolean | null | undefined;
|
|
47
|
+
gates?: {
|
|
48
|
+
status: string;
|
|
49
|
+
id: string;
|
|
50
|
+
}[] | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
targetPreimageSha: z.ZodString;
|
|
53
|
+
}, "strict", z.ZodTypeAny, {
|
|
54
|
+
mode: "apply" | "commit" | "branch" | "pr" | "artifact_only";
|
|
55
|
+
applied: boolean;
|
|
56
|
+
finalVerify: {
|
|
57
|
+
reason: string | null;
|
|
58
|
+
duration_ms: number | null;
|
|
59
|
+
base_sha: string | null;
|
|
60
|
+
attempted: boolean;
|
|
61
|
+
applied_cleanly: boolean | null;
|
|
62
|
+
gates_passed: boolean | null;
|
|
63
|
+
gates: {
|
|
64
|
+
status: string;
|
|
65
|
+
id: string;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
targetPreimageSha: string;
|
|
69
|
+
detail?: string | undefined;
|
|
70
|
+
commit?: string | undefined;
|
|
71
|
+
branch?: string | undefined;
|
|
72
|
+
prUrl?: string | undefined;
|
|
73
|
+
treeMutated?: boolean | undefined;
|
|
74
|
+
refused?: boolean | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
mode: "apply" | "commit" | "branch" | "pr" | "artifact_only";
|
|
77
|
+
applied: boolean;
|
|
78
|
+
finalVerify: {
|
|
79
|
+
attempted: boolean;
|
|
80
|
+
reason?: string | null | undefined;
|
|
81
|
+
duration_ms?: number | null | undefined;
|
|
82
|
+
base_sha?: string | null | undefined;
|
|
83
|
+
applied_cleanly?: boolean | null | undefined;
|
|
84
|
+
gates_passed?: boolean | null | undefined;
|
|
85
|
+
gates?: {
|
|
86
|
+
status: string;
|
|
87
|
+
id: string;
|
|
88
|
+
}[] | undefined;
|
|
89
|
+
};
|
|
90
|
+
targetPreimageSha: string;
|
|
91
|
+
detail?: string | undefined;
|
|
92
|
+
commit?: string | undefined;
|
|
93
|
+
branch?: string | undefined;
|
|
94
|
+
prUrl?: string | undefined;
|
|
95
|
+
treeMutated?: boolean | undefined;
|
|
96
|
+
refused?: boolean | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
export type DeliveryReceipt = z.infer<typeof DeliveryReceipt>;
|
|
99
|
+
//# sourceMappingURL=delivery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yFAAyF;AACzF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc6C,CAAC;AAC1E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/delivery.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { FinalVerifyRecord } from "./decision.js";
|
|
3
|
+
/** Immutable evidence for one DeliveryService attempt, shared by every apply surface. */
|
|
4
|
+
export const DeliveryReceipt = z
|
|
5
|
+
.object({
|
|
6
|
+
mode: z.enum(["artifact_only", "apply", "branch", "commit", "pr"]),
|
|
7
|
+
applied: z.boolean(),
|
|
8
|
+
branch: z.string().optional(),
|
|
9
|
+
commit: z.string().optional(),
|
|
10
|
+
prUrl: z.string().optional(),
|
|
11
|
+
detail: z.string().optional(),
|
|
12
|
+
treeMutated: z.boolean().optional(),
|
|
13
|
+
refused: z.boolean().optional(),
|
|
14
|
+
finalVerify: FinalVerifyRecord.describe("Fresh verifier evidence for this delivery attempt."),
|
|
15
|
+
targetPreimageSha: z.string().describe("Target snapshot verified immediately before delivery."),
|
|
16
|
+
})
|
|
17
|
+
.strict()
|
|
18
|
+
.describe("Immutable receipt for a freshly verified delivery attempt.");
|
|
19
|
+
//# sourceMappingURL=delivery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,yFAAyF;AACzF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAClE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,WAAW,EAAE,iBAAiB,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IAC7F,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;CAChG,CAAC;KACD,MAAM,EAAE;KACR,QAAQ,CAAC,4DAA4D,CAAC,CAAC"}
|
package/dist/events.d.ts
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ControlJournalEvent: z.ZodObject<{
|
|
3
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
4
|
+
cursor: z.ZodString;
|
|
5
|
+
partition: z.ZodString;
|
|
6
|
+
type: z.ZodString;
|
|
7
|
+
observedAt: z.ZodString;
|
|
8
|
+
payload: z.ZodUnknown;
|
|
9
|
+
}, "strict", z.ZodTypeAny, {
|
|
10
|
+
type: string;
|
|
11
|
+
cursor: string;
|
|
12
|
+
observedAt: string;
|
|
13
|
+
schemaVersion: 1;
|
|
14
|
+
partition: string;
|
|
15
|
+
payload?: unknown;
|
|
16
|
+
}, {
|
|
17
|
+
type: string;
|
|
18
|
+
cursor: string;
|
|
19
|
+
observedAt: string;
|
|
20
|
+
schemaVersion: 1;
|
|
21
|
+
partition: string;
|
|
22
|
+
payload?: unknown;
|
|
23
|
+
}>;
|
|
24
|
+
export type ControlJournalEvent = z.infer<typeof ControlJournalEvent>;
|
|
25
|
+
export declare const ThreadHeadPing: z.ZodObject<{
|
|
26
|
+
thread_id: z.ZodString;
|
|
27
|
+
project_id: z.ZodNullable<z.ZodString>;
|
|
28
|
+
revision: z.ZodNumber;
|
|
29
|
+
}, "strict", z.ZodTypeAny, {
|
|
30
|
+
thread_id: string;
|
|
31
|
+
project_id: string | null;
|
|
32
|
+
revision: number;
|
|
33
|
+
}, {
|
|
34
|
+
thread_id: string;
|
|
35
|
+
project_id: string | null;
|
|
36
|
+
revision: number;
|
|
37
|
+
}>;
|
|
38
|
+
export type ThreadHeadPing = z.infer<typeof ThreadHeadPing>;
|
|
39
|
+
export declare const RunEventType: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.transient.exhausted", "route.fallback.auth_switched", "session.rebound", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "budget.quota_pressure", "output.ready", "gate.started", "gate.completed", "review.started", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "orchestrate.subrun.started", "orchestrate.step.done", "orchestrate.step.blocked", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed"]>;
|
|
3
40
|
export type RunEventType = z.infer<typeof RunEventType>;
|
|
4
41
|
/**
|
|
5
42
|
* Typed payload for `route.fallback.*` events. The orchestrator validates this
|
|
@@ -47,10 +84,10 @@ export declare const RunEvent: z.ZodObject<{
|
|
|
47
84
|
/** Thread this run is a turn of, when any. Lets the global event multiplex
|
|
48
85
|
* route live progress to a chat surface without a reverse job lookup. */
|
|
49
86
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
50
|
-
type: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "budget.lease.created", "budget.observation", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.transient.exhausted", "route.fallback.auth_switched", "session.rebound", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "budget.quota_pressure", "output.ready", "gate.started", "gate.completed", "review.started", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "orchestrate.subrun.started", "orchestrate.step.done", "orchestrate.step.blocked", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed"]>;
|
|
87
|
+
type: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.transient.exhausted", "route.fallback.auth_switched", "session.rebound", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "budget.quota_pressure", "output.ready", "gate.started", "gate.completed", "review.started", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "orchestrate.subrun.started", "orchestrate.step.done", "orchestrate.step.blocked", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed"]>;
|
|
51
88
|
payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
52
89
|
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "budget.lease.created" | "budget.observation" | "policy.web.upgraded" | "harness.started" | "harness.event" | "harness.completed" | "route.fallback.started" | "route.fallback.completed" | "route.fallback.exhausted" | "route.transient.detected" | "route.transient.retry_scheduled" | "route.transient.exhausted" | "route.fallback.auth_switched" | "session.rebound" | "interaction.requested" | "interaction.answered" | "interaction.timeout" | "interaction.answer_discarded" | "plan.progress" | "budget.quota_pressure" | "output.ready" | "gate.started" | "gate.completed" | "review.started" | "reviewer.started" | "reviewer.first_event" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.timed_out" | "reviewer.failed" | "finding.revalidated" | "synthesis.started" | "arbitration.completed" | "work_product.emitted" | "work_product.adopted" | "orchestrate.subrun.started" | "orchestrate.step.done" | "orchestrate.step.blocked" | "control.requested" | "control.applied" | "control.rejected" | "run.blocked" | "run.completed" | "run.failed";
|
|
90
|
+
type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "budget.lease.created" | "budget.observation" | "budget.cash" | "policy.web.upgraded" | "harness.started" | "harness.event" | "harness.completed" | "route.fallback.started" | "route.fallback.completed" | "route.fallback.exhausted" | "route.transient.detected" | "route.transient.retry_scheduled" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.transient.exhausted" | "route.fallback.auth_switched" | "session.rebound" | "interaction.requested" | "interaction.answered" | "interaction.timeout" | "interaction.answer_discarded" | "plan.progress" | "budget.quota_pressure" | "output.ready" | "gate.started" | "gate.completed" | "review.started" | "reviewer.started" | "reviewer.first_event" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.timed_out" | "reviewer.failed" | "finding.revalidated" | "synthesis.started" | "arbitration.completed" | "work_product.emitted" | "work_product.adopted" | "orchestrate.subrun.started" | "orchestrate.step.done" | "orchestrate.step.blocked" | "control.requested" | "control.applied" | "control.rejected" | "run.blocked" | "run.completed" | "run.failed";
|
|
54
91
|
ts: string;
|
|
55
92
|
payload: Record<string, unknown>;
|
|
56
93
|
run_id: string;
|
|
@@ -58,7 +95,7 @@ export declare const RunEvent: z.ZodObject<{
|
|
|
58
95
|
thread_id?: string | undefined;
|
|
59
96
|
seq?: number | undefined;
|
|
60
97
|
}, {
|
|
61
|
-
type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "budget.lease.created" | "budget.observation" | "policy.web.upgraded" | "harness.started" | "harness.event" | "harness.completed" | "route.fallback.started" | "route.fallback.completed" | "route.fallback.exhausted" | "route.transient.detected" | "route.transient.retry_scheduled" | "route.transient.exhausted" | "route.fallback.auth_switched" | "session.rebound" | "interaction.requested" | "interaction.answered" | "interaction.timeout" | "interaction.answer_discarded" | "plan.progress" | "budget.quota_pressure" | "output.ready" | "gate.started" | "gate.completed" | "review.started" | "reviewer.started" | "reviewer.first_event" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.timed_out" | "reviewer.failed" | "finding.revalidated" | "synthesis.started" | "arbitration.completed" | "work_product.emitted" | "work_product.adopted" | "orchestrate.subrun.started" | "orchestrate.step.done" | "orchestrate.step.blocked" | "control.requested" | "control.applied" | "control.rejected" | "run.blocked" | "run.completed" | "run.failed";
|
|
98
|
+
type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "budget.lease.created" | "budget.observation" | "budget.cash" | "policy.web.upgraded" | "harness.started" | "harness.event" | "harness.completed" | "route.fallback.started" | "route.fallback.completed" | "route.fallback.exhausted" | "route.transient.detected" | "route.transient.retry_scheduled" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.transient.exhausted" | "route.fallback.auth_switched" | "session.rebound" | "interaction.requested" | "interaction.answered" | "interaction.timeout" | "interaction.answer_discarded" | "plan.progress" | "budget.quota_pressure" | "output.ready" | "gate.started" | "gate.completed" | "review.started" | "reviewer.started" | "reviewer.first_event" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.timed_out" | "reviewer.failed" | "finding.revalidated" | "synthesis.started" | "arbitration.completed" | "work_product.emitted" | "work_product.adopted" | "orchestrate.subrun.started" | "orchestrate.step.done" | "orchestrate.step.blocked" | "control.requested" | "control.applied" | "control.rejected" | "run.blocked" | "run.completed" | "run.failed";
|
|
62
99
|
ts: string;
|
|
63
100
|
run_id: string;
|
|
64
101
|
task_id: string;
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAU4C,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,cAAc;;;;;;;;;;;;EAoBxB,CAAC;AACJ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,YAAY,+pCAkEtB,CAAC;AACJ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;EAoB9B,CAAC;AACJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,iDAAiD;AACjD,eAAO,MAAM,QAAQ;IAEjB;;;;OAIG;;;;;IAYH;6EACyE;;;;;;;;;;;;;;;;;;;;EAKO,CAAC;AACrF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|