@bitkyc08/opencodex 2.11.1 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/ocx.mjs +4 -0
- package/gui/dist/assets/index-BNVYzdn0.css +1 -0
- package/gui/dist/assets/index-Cw1_mxO8.js +70 -0
- package/gui/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/adapters/command-code.ts +94 -5
- package/src/adapters/cursor/live-transport.ts +14 -1
- package/src/adapters/google-tool-schema.ts +80 -15
- package/src/adapters/google.ts +24 -7
- package/src/adapters/openai-chat.ts +233 -305
- package/src/adapters/openai-responses.ts +62 -0
- package/src/adapters/tool-catalog-nudge.ts +2 -11
- package/src/claude/outbound.ts +42 -14
- package/src/cli/claude.ts +61 -9
- package/src/cli/codex-shim-autorestore.ts +2 -0
- package/src/cli/codex-shim-readiness.ts +8 -1
- package/src/cli/config-command.ts +4 -1
- package/src/cli/doctor.ts +10 -0
- package/src/cli/help.ts +15 -0
- package/src/cli/index.ts +27 -11
- package/src/cli/lab.ts +367 -0
- package/src/cli/provider.ts +9 -1
- package/src/clients/config-export.ts +100 -3
- package/src/codex/app-server-processes.ts +11 -8
- package/src/codex/auth-api.ts +92 -28
- package/src/codex/auth-collision.ts +5 -3
- package/src/codex/catalog/metadata.ts +7 -3
- package/src/codex/catalog/provider-fetch.ts +191 -47
- package/src/codex/catalog.ts +2 -2
- package/src/codex/history-job.ts +83 -18
- package/src/codex/history-migration-guardian.ts +9 -16
- package/src/codex/history-provider.ts +178 -1
- package/src/codex/history-transition.ts +5 -5
- package/src/codex/history-worker.ts +22 -2
- package/src/codex/native-profile-store.ts +1 -1
- package/src/codex/plan.ts +15 -0
- package/src/codex/quota.ts +6 -6
- package/src/codex/routing.ts +3 -3
- package/src/codex/subagent-model-fallback.ts +246 -22
- package/src/codex/user-identity.ts +63 -12
- package/src/config.ts +265 -32
- package/src/images/loop.ts +3 -1
- package/src/images/plan.ts +23 -13
- package/src/integrations/omp-yaml-source.ts +225 -0
- package/src/integrations/ownership.ts +5 -5
- package/src/integrations/state.ts +45 -6
- package/src/integrations/writer.ts +38 -3
- package/src/lab/artifacts/sanitize.ts +586 -0
- package/src/lab/artifacts/secure-fs.ts +475 -0
- package/src/lab/artifacts/store.ts +310 -0
- package/src/lab/conformance/assertion.ts +325 -0
- package/src/lab/conformance/digest.ts +22 -0
- package/src/lab/conformance/executor.ts +741 -0
- package/src/lab/conformance/fixture-provider.ts +27 -0
- package/src/lab/conformance/fixtures/live-v1-cases.json +175 -0
- package/src/lab/conformance/fixtures/protocol-v1-cases.json +461 -0
- package/src/lab/conformance/harness-budget.ts +47 -0
- package/src/lab/conformance/index.ts +5 -0
- package/src/lab/conformance/jcs.ts +24 -0
- package/src/lab/conformance/json-pointer.ts +39 -0
- package/src/lab/conformance/manifest.ts +180 -0
- package/src/lab/conformance/mcp-stub.ts +179 -0
- package/src/lab/conformance/negative-controls.ts +160 -0
- package/src/lab/conformance/observation.ts +355 -0
- package/src/lab/conformance/runner.ts +57 -0
- package/src/lab/conformance/sse-normalize.ts +59 -0
- package/src/lab/conformance/suite-manifest.ts +78 -0
- package/src/lab/conformance/types.ts +191 -0
- package/src/lab/constants.ts +126 -0
- package/src/lab/digest.ts +64 -0
- package/src/lab/events/errors.ts +9 -0
- package/src/lab/events/limits.ts +117 -0
- package/src/lab/events/types.ts +228 -0
- package/src/lab/events/validate.ts +780 -0
- package/src/lab/index.ts +36 -0
- package/src/lab/ledger/artifact-refs.ts +127 -0
- package/src/lab/ledger/invalidation.ts +136 -0
- package/src/lab/ledger/purge.ts +241 -0
- package/src/lab/ledger/store.ts +263 -0
- package/src/lab/live/credential-lease.ts +53 -0
- package/src/lab/live/destination.ts +155 -0
- package/src/lab/live/executor.ts +311 -0
- package/src/lab/live/inert-tools.ts +56 -0
- package/src/lab/live/manifest.ts +85 -0
- package/src/lab/live/mcp-loopback.ts +57 -0
- package/src/lab/live/runner.ts +19 -0
- package/src/lab/live/sandbox.ts +61 -0
- package/src/lab/live/suite-manifest.ts +41 -0
- package/src/lab/live/transport.ts +116 -0
- package/src/lab/live/types.ts +197 -0
- package/src/lab/observe/from-conformance.ts +344 -0
- package/src/lab/observe/from-live.ts +103 -0
- package/src/lab/paths.ts +65 -0
- package/src/lab/projection/rebuild.ts +477 -0
- package/src/lab/projection/schema.ts +122 -0
- package/src/lab/projection/verdicts.ts +438 -0
- package/src/lab/projection/verification.ts +332 -0
- package/src/lab/query/catalog.ts +72 -0
- package/src/lab/query/connection.ts +107 -0
- package/src/lab/query/constants.ts +4 -0
- package/src/lab/query/cursor.ts +132 -0
- package/src/lab/query/dto-map.ts +277 -0
- package/src/lab/query/errors.ts +22 -0
- package/src/lab/query/index.ts +34 -0
- package/src/lab/query/queries.ts +444 -0
- package/src/lab/query/types.ts +266 -0
- package/src/lab/subject/behavior-fingerprint.ts +77 -0
- package/src/lab/subject/installation-salt.ts +81 -0
- package/src/lab/subject/route-subject.ts +73 -0
- package/src/lib/bounded-body.ts +104 -0
- package/src/lib/lab-live-execution-authority.ts +13 -0
- package/src/lib/lab-live-host.ts +30 -0
- package/src/lib/lab-live-pinned-sender.ts +45 -0
- package/src/lib/pinned-http.ts +36 -7
- package/src/oauth/index.ts +20 -1
- package/src/oauth/local-token-detect.ts +11 -2
- package/src/oauth/login-cli.ts +38 -4
- package/src/providers/alibaba-region-migration.ts +1 -1
- package/src/providers/codex-capacity.ts +7 -4
- package/src/providers/command-code-efforts.ts +5 -2
- package/src/providers/derive.ts +105 -0
- package/src/providers/label.ts +1 -1
- package/src/providers/openai-tiers.ts +59 -3
- package/src/providers/opencode-zen-rate-limit.ts +102 -0
- package/src/providers/quota.ts +67 -21
- package/src/providers/registry.ts +118 -5
- package/src/router.ts +15 -1
- package/src/routing/analytics.ts +8 -7
- package/src/routing/evaluator.ts +51 -5
- package/src/routing/profile.ts +10 -1
- package/src/routing/trace.ts +42 -6
- package/src/server/auth-cors.ts +15 -0
- package/src/server/background-lifecycle.ts +169 -0
- package/src/server/chat-completions.ts +18 -3
- package/src/server/claude-messages.ts +1 -0
- package/src/server/images.ts +78 -11
- package/src/server/index.ts +72 -18
- package/src/server/lifecycle.ts +6 -0
- package/src/server/live.ts +5 -1
- package/src/server/management/agent-settings-routes.ts +41 -24
- package/src/server/management/body.ts +6 -0
- package/src/server/management/config-routes.ts +51 -8
- package/src/server/management/lab-routes.ts +388 -0
- package/src/server/management/logs-usage-routes.ts +19 -1
- package/src/server/management/model-rows.ts +25 -11
- package/src/server/management/native-integration-routes.ts +3 -3
- package/src/server/management/provider-routes.ts +5 -0
- package/src/server/management/shared.ts +8 -1
- package/src/server/management/usage-summary-cache.ts +2 -0
- package/src/server/management/vision-sidecar-options.ts +125 -0
- package/src/server/management-api.ts +2 -0
- package/src/server/request-decompress.ts +106 -5
- package/src/server/responses/collaboration.ts +4 -1
- package/src/server/responses/core.ts +117 -31
- package/src/server/responses-json-events.ts +50 -12
- package/src/server/search.ts +23 -7
- package/src/server/ws-bridge.ts +3 -1
- package/src/service.ts +40 -20
- package/src/types.ts +74 -0
- package/src/update/job.ts +10 -2
- package/src/usage/cost.ts +0 -0
- package/src/usage/expected-prices.ts +9 -0
- package/src/usage/log.ts +9 -9
- package/src/usage/user-cost-overlay-reconciler.ts +313 -0
- package/src/usage/user-cost-overlays.ts +314 -0
- package/src/vision/describe.ts +2 -2
- package/src/vision/eligibility.ts +229 -0
- package/src/vision/index.ts +20 -2
- package/src/web-search/executor.ts +2 -2
- package/src/web-search/index.ts +4 -2
- package/src/web-search/loop.ts +3 -1
- package/src/web-search/parse.ts +72 -3
- package/gui/dist/assets/index-BA1dgo4q.css +0 -1
- package/gui/dist/assets/index-DDZpgzKk.js +0 -70
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ArtifactClass,
|
|
3
|
+
ClaimPolarity,
|
|
4
|
+
ClaimSourceKind,
|
|
5
|
+
EvidenceLayer,
|
|
6
|
+
ExecutionMode,
|
|
7
|
+
InvalidationReason,
|
|
8
|
+
LabEventKind,
|
|
9
|
+
ObservationOutcome,
|
|
10
|
+
PurgeAction,
|
|
11
|
+
} from "../constants";
|
|
12
|
+
|
|
13
|
+
export interface LabProducer {
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ProtocolSubjectV1 {
|
|
19
|
+
subjectSchemaVersion: 1;
|
|
20
|
+
subjectKind: "protocol";
|
|
21
|
+
opencodexCompatibilityVersion: string;
|
|
22
|
+
effectiveAdapter: string;
|
|
23
|
+
inboundProtocol: string;
|
|
24
|
+
upstreamProtocol: string;
|
|
25
|
+
surface: string;
|
|
26
|
+
behaviorFingerprint: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface RouteDependencyV1 {
|
|
30
|
+
role: string;
|
|
31
|
+
providerId: string;
|
|
32
|
+
providerInstanceFingerprint: string;
|
|
33
|
+
clientModelId: string;
|
|
34
|
+
upstreamModelId: string;
|
|
35
|
+
effectiveAdapter: string;
|
|
36
|
+
upstreamProtocol: string;
|
|
37
|
+
endpointFingerprint: string;
|
|
38
|
+
behaviorFingerprint: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface RouteSubjectV1 {
|
|
42
|
+
subjectSchemaVersion: 1;
|
|
43
|
+
subjectKind: "route";
|
|
44
|
+
providerId: string;
|
|
45
|
+
providerInstanceFingerprint: string;
|
|
46
|
+
clientModelId: string;
|
|
47
|
+
upstreamModelId: string;
|
|
48
|
+
effectiveAdapter: string;
|
|
49
|
+
inboundProtocol: string;
|
|
50
|
+
upstreamProtocol: string;
|
|
51
|
+
surface: string;
|
|
52
|
+
opencodexCompatibilityVersion: string;
|
|
53
|
+
behaviorFingerprint: string;
|
|
54
|
+
endpointFingerprint: string;
|
|
55
|
+
dependencies: RouteDependencyV1[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface TaskSubjectV1 {
|
|
59
|
+
subjectSchemaVersion: 1;
|
|
60
|
+
subjectKind: "task";
|
|
61
|
+
routeSubject: RouteSubjectV1;
|
|
62
|
+
taskClassId: string;
|
|
63
|
+
taskClassVersion: string;
|
|
64
|
+
taskFixtureDigest: string;
|
|
65
|
+
verifierManifestDigest: string;
|
|
66
|
+
fabricCompatibilityVersion: string;
|
|
67
|
+
sandboxProfileDigest: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type EvidenceSubjectV1 = ProtocolSubjectV1 | RouteSubjectV1 | TaskSubjectV1;
|
|
71
|
+
|
|
72
|
+
export interface ArtifactRefV1 {
|
|
73
|
+
digest: string;
|
|
74
|
+
mediaType: string;
|
|
75
|
+
byteCount: number;
|
|
76
|
+
redactionPolicy: string;
|
|
77
|
+
/** Digest-derived relative name only (e.g. `<sha256>.bin`). */
|
|
78
|
+
relativePath: string;
|
|
79
|
+
artifactClass: ArtifactClass;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface AssertionRecordV1 {
|
|
83
|
+
id: string;
|
|
84
|
+
operator: string;
|
|
85
|
+
required: boolean;
|
|
86
|
+
passed: boolean;
|
|
87
|
+
expectedSummary: string;
|
|
88
|
+
observedSummary: string;
|
|
89
|
+
reason?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface FailureRecordV1 {
|
|
93
|
+
class: string;
|
|
94
|
+
code: string;
|
|
95
|
+
retryable: boolean;
|
|
96
|
+
attribution: "opencodex" | "route" | "environment" | "harness";
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface LabEventBase {
|
|
100
|
+
schemaVersion: number;
|
|
101
|
+
eventId: string;
|
|
102
|
+
eventKind: LabEventKind;
|
|
103
|
+
recordedAt: number;
|
|
104
|
+
producer: string;
|
|
105
|
+
producerVersion: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface ObservationEvent extends LabEventBase {
|
|
109
|
+
eventKind: "observation";
|
|
110
|
+
evidenceLayer: EvidenceLayer;
|
|
111
|
+
scenarioId: string;
|
|
112
|
+
scenarioVersion: string;
|
|
113
|
+
scenarioManifestDigest: string;
|
|
114
|
+
suiteId: string;
|
|
115
|
+
suiteVersion: string;
|
|
116
|
+
suiteManifestDigest: string;
|
|
117
|
+
fixtureDigests: string[];
|
|
118
|
+
subject: EvidenceSubjectV1;
|
|
119
|
+
subjectId: string;
|
|
120
|
+
startedAt: number;
|
|
121
|
+
completedAt: number;
|
|
122
|
+
executionMode: ExecutionMode;
|
|
123
|
+
attempt: number;
|
|
124
|
+
limits: Record<string, number | null>;
|
|
125
|
+
outcome: ObservationOutcome;
|
|
126
|
+
assertions: AssertionRecordV1[];
|
|
127
|
+
failure?: FailureRecordV1;
|
|
128
|
+
expectedFailure?: Record<string, unknown>;
|
|
129
|
+
environment: Record<string, unknown>;
|
|
130
|
+
artifactRefs: ArtifactRefV1[];
|
|
131
|
+
sourceRefs?: string[];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface ClaimSnapshotEvent extends LabEventBase {
|
|
135
|
+
eventKind: "claim_snapshot";
|
|
136
|
+
evidenceLayer: "live_route_compatibility";
|
|
137
|
+
subject: RouteSubjectV1;
|
|
138
|
+
subjectId: string;
|
|
139
|
+
capability: string;
|
|
140
|
+
polarity: ClaimPolarity;
|
|
141
|
+
sourceManifestDigest: string;
|
|
142
|
+
sourceEventIds: string[];
|
|
143
|
+
supersedes: string[];
|
|
144
|
+
effectiveAt: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface InvalidationEvent extends LabEventBase {
|
|
148
|
+
eventKind: "invalidation";
|
|
149
|
+
targetEventIds: string[];
|
|
150
|
+
reason: InvalidationReason;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface PurgeTombstoneEvent extends LabEventBase {
|
|
154
|
+
eventKind: "purge_tombstone";
|
|
155
|
+
targetEventIds: string[];
|
|
156
|
+
targetArtifactDigests: string[];
|
|
157
|
+
reason: "sensitive_evidence";
|
|
158
|
+
purgeActions: PurgeAction[];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type LabEvent =
|
|
162
|
+
| ObservationEvent
|
|
163
|
+
| ClaimSnapshotEvent
|
|
164
|
+
| InvalidationEvent
|
|
165
|
+
| PurgeTombstoneEvent;
|
|
166
|
+
|
|
167
|
+
export type ClaimCapabilityFactsV1 = {
|
|
168
|
+
contextWindow?: number;
|
|
169
|
+
inputModalities?: string[];
|
|
170
|
+
reasoningEfforts?: string[];
|
|
171
|
+
catalogCapabilityNames?: string[];
|
|
172
|
+
serviceTier?: string[];
|
|
173
|
+
toolCapable?: boolean;
|
|
174
|
+
parallelToolCalls?: boolean;
|
|
175
|
+
endpointLocality?: "local" | "private" | "unknown";
|
|
176
|
+
canonicalOpenAiForward?: boolean;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export interface ClaimSourceV1 {
|
|
180
|
+
kind: ClaimSourceKind;
|
|
181
|
+
revision: string | null;
|
|
182
|
+
facts: ClaimCapabilityFactsV1;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface RouteCapabilityEvidenceV1 {
|
|
186
|
+
contextWindow?: number;
|
|
187
|
+
tools?: boolean | "unknown";
|
|
188
|
+
image?: boolean | "unknown";
|
|
189
|
+
structuredOutput?: boolean | "unknown";
|
|
190
|
+
reasoningEfforts?: string[];
|
|
191
|
+
serviceTier?: string | "unknown";
|
|
192
|
+
localOnly?: boolean | "unknown";
|
|
193
|
+
remoteAllowed?: boolean | "unknown";
|
|
194
|
+
encryptedCodexTasks?: boolean | "unknown";
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface ClaimSourceManifestV1 {
|
|
198
|
+
schemaVersion: 1;
|
|
199
|
+
subjectId: string;
|
|
200
|
+
providerId: string;
|
|
201
|
+
clientModelId: string;
|
|
202
|
+
capability: string;
|
|
203
|
+
sources: ClaimSourceV1[];
|
|
204
|
+
resolvedEvidence: RouteCapabilityEvidenceV1;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface LedgerCorruption {
|
|
208
|
+
kind:
|
|
209
|
+
| "malformed_line"
|
|
210
|
+
| "partial_line"
|
|
211
|
+
| "duplicate_event"
|
|
212
|
+
| "invalid_event"
|
|
213
|
+
| "invalid_reference"
|
|
214
|
+
| "missing_artifact"
|
|
215
|
+
| "artifact_mismatch"
|
|
216
|
+
| "claim_corruption"
|
|
217
|
+
| "empty_ledger";
|
|
218
|
+
lineNumber?: number;
|
|
219
|
+
eventId?: string;
|
|
220
|
+
detail: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface ReplayResult {
|
|
224
|
+
events: LabEvent[];
|
|
225
|
+
corruptions: LedgerCorruption[];
|
|
226
|
+
validLineCount: number;
|
|
227
|
+
totalLineCount: number;
|
|
228
|
+
}
|