engineering-behavior-observatory 0.2.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/LICENSE +202 -0
- package/README.md +151 -0
- package/contracts/codex-app-server-0.150.1/manifest.json +25 -0
- package/contracts/codex-app-server-0.150.1/schema/InitializeParams.json +84 -0
- package/contracts/codex-app-server-0.150.1/schema/JSONRPCMessage.json +137 -0
- package/contracts/codex-app-server-0.150.1/schema/v2/ThreadReadParams.json +17 -0
- package/contracts/codex-app-server-0.150.1/schema/v2/ThreadTokenUsageUpdatedNotification.json +82 -0
- package/contracts/codex-app-server-0.150.1/schema/v2/TurnInterruptParams.json +17 -0
- package/contracts/codex-app-server-0.150.1/types/AskForApproval.ts +5 -0
- package/contracts/codex-app-server-0.150.1/types/ClientNotification.ts +5 -0
- package/contracts/codex-app-server-0.150.1/types/SandboxMode.ts +5 -0
- package/contracts/codex-app-server-0.150.1/types/ThreadReadParams.ts +9 -0
- package/contracts/codex-app-server-0.150.1/types/TokenUsageBreakdown.ts +5 -0
- package/contracts/codex-app-server-0.150.1/types/TurnInterruptParams.ts +5 -0
- package/contracts/codex-app-server-0.153.4/manifest.json +27 -0
- package/contracts/codex-app-server-0.153.4/schema/JSONRPCMessage.json +137 -0
- package/contracts/codex-app-server-0.153.4/schema/v1/InitializeParams.json +84 -0
- package/contracts/codex-app-server-0.153.4/schema/v2/ThreadReadParams.json +17 -0
- package/contracts/codex-app-server-0.153.4/schema/v2/ThreadStartParams.json +515 -0
- package/contracts/codex-app-server-0.153.4/schema/v2/ThreadTokenUsageUpdatedNotification.json +82 -0
- package/contracts/codex-app-server-0.153.4/schema/v2/TurnInterruptParams.json +17 -0
- package/contracts/codex-app-server-0.153.4/schema/v2/TurnStartParams.json +921 -0
- package/contracts/codex-app-server-0.153.4/types/AskForApproval.ts +5 -0
- package/contracts/codex-app-server-0.153.4/types/ClientNotification.ts +5 -0
- package/contracts/codex-app-server-0.153.4/types/SandboxMode.ts +5 -0
- package/contracts/codex-app-server-0.153.4/types/ThreadReadParams.ts +12 -0
- package/contracts/codex-app-server-0.153.4/types/TokenUsageBreakdown.ts +5 -0
- package/contracts/codex-app-server-0.153.4/types/TurnInterruptParams.ts +5 -0
- package/contracts/openhands-agent-server-v1.44.1.json +65 -0
- package/contracts/openhands-agent-server-v1.46.0.json +46 -0
- package/dist/contracts/codex-app-server-0.153.4/types/AskForApproval.d.ts +9 -0
- package/dist/contracts/codex-app-server-0.153.4/types/AskForApproval.js +2 -0
- package/dist/contracts/codex-app-server-0.153.4/types/ClientNotification.d.ts +3 -0
- package/dist/contracts/codex-app-server-0.153.4/types/ClientNotification.js +2 -0
- package/dist/contracts/codex-app-server-0.153.4/types/SandboxMode.d.ts +1 -0
- package/dist/contracts/codex-app-server-0.153.4/types/SandboxMode.js +2 -0
- package/dist/contracts/codex-app-server-0.153.4/types/ThreadReadParams.d.ts +10 -0
- package/dist/contracts/codex-app-server-0.153.4/types/ThreadReadParams.js +2 -0
- package/dist/contracts/codex-app-server-0.153.4/types/TokenUsageBreakdown.d.ts +8 -0
- package/dist/contracts/codex-app-server-0.153.4/types/TokenUsageBreakdown.js +2 -0
- package/dist/contracts/codex-app-server-0.153.4/types/TurnInterruptParams.d.ts +4 -0
- package/dist/contracts/codex-app-server-0.153.4/types/TurnInterruptParams.js +2 -0
- package/dist/src/agent-sdk-normalizer.d.ts +22 -0
- package/dist/src/agent-sdk-normalizer.js +995 -0
- package/dist/src/agent-sdk-run.d.ts +31 -0
- package/dist/src/agent-sdk-run.js +242 -0
- package/dist/src/agent-sdk-runner.d.ts +96 -0
- package/dist/src/agent-sdk-runner.js +407 -0
- package/dist/src/agent-sdk.d.ts +294 -0
- package/dist/src/agent-sdk.js +644 -0
- package/dist/src/aggregation.d.ts +183 -0
- package/dist/src/aggregation.js +513 -0
- package/dist/src/artifacts.d.ts +36 -0
- package/dist/src/artifacts.js +1372 -0
- package/dist/src/atlas-grafana.d.ts +377 -0
- package/dist/src/atlas-grafana.js +47 -0
- package/dist/src/atlas-html.d.ts +2 -0
- package/dist/src/atlas-html.js +34 -0
- package/dist/src/atlas.d.ts +130 -0
- package/dist/src/atlas.js +235 -0
- package/dist/src/behavior-assertions.d.ts +95 -0
- package/dist/src/behavior-assertions.js +154 -0
- package/dist/src/cli.d.ts +5 -0
- package/dist/src/cli.js +957 -0
- package/dist/src/codex-judge.d.ts +44 -0
- package/dist/src/codex-judge.js +214 -0
- package/dist/src/codex-run.d.ts +114 -0
- package/dist/src/codex-run.js +519 -0
- package/dist/src/codex.d.ts +187 -0
- package/dist/src/codex.js +1028 -0
- package/dist/src/contracts.d.ts +155 -0
- package/dist/src/contracts.js +866 -0
- package/dist/src/corpus.d.ts +67 -0
- package/dist/src/corpus.js +540 -0
- package/dist/src/cursor-sdk-runner.d.ts +81 -0
- package/dist/src/cursor-sdk-runner.js +362 -0
- package/dist/src/cursor-sdk.d.ts +81 -0
- package/dist/src/cursor-sdk.js +1078 -0
- package/dist/src/deepseek-adapter.d.ts +152 -0
- package/dist/src/deepseek-adapter.js +777 -0
- package/dist/src/exports.d.ts +69 -0
- package/dist/src/exports.js +966 -0
- package/dist/src/human-calibration.d.ts +167 -0
- package/dist/src/human-calibration.js +618 -0
- package/dist/src/index.d.ts +71 -0
- package/dist/src/index.js +38 -0
- package/dist/src/lifecycle.d.ts +196 -0
- package/dist/src/lifecycle.js +1889 -0
- package/dist/src/normalization-integrity.d.ts +128 -0
- package/dist/src/normalization-integrity.js +429 -0
- package/dist/src/openhands-run.d.ts +36 -0
- package/dist/src/openhands-run.js +415 -0
- package/dist/src/openhands.d.ts +130 -0
- package/dist/src/openhands.js +859 -0
- package/dist/src/pi.d.ts +203 -0
- package/dist/src/pi.js +1345 -0
- package/dist/src/process-protocol.d.ts +245 -0
- package/dist/src/process-protocol.js +1261 -0
- package/dist/src/retained-evidence.d.ts +12 -0
- package/dist/src/retained-evidence.js +201 -0
- package/dist/src/run-bundles.d.ts +193 -0
- package/dist/src/run-bundles.js +993 -0
- package/dist/src/scheduler.d.ts +109 -0
- package/dist/src/scheduler.js +1080 -0
- package/dist/src/semantic-judge.d.ts +194 -0
- package/dist/src/semantic-judge.js +875 -0
- package/dist/src/structural-observations.d.ts +124 -0
- package/dist/src/structural-observations.js +671 -0
- package/dist/src/task-packets.d.ts +115 -0
- package/dist/src/task-packets.js +683 -0
- package/dist/src/uniform-events.d.ts +120 -0
- package/dist/src/uniform-events.js +158 -0
- package/dist/src/verifiers.d.ts +116 -0
- package/dist/src/verifiers.js +819 -0
- package/dist/src/workspaces.d.ts +56 -0
- package/dist/src/workspaces.js +1314 -0
- package/docs/README.md +60 -0
- package/docs/development/README.md +71 -0
- package/docs/development/documentation-sync.md +58 -0
- package/docs/development/extension-contracts.md +307 -0
- package/docs/evaluation/README.md +48 -0
- package/docs/evaluation/aggregation.md +112 -0
- package/docs/evaluation/behavior-assertions.md +45 -0
- package/docs/evaluation/human-calibration.md +170 -0
- package/docs/evaluation/normalization-integrity.md +80 -0
- package/docs/evaluation/semantic-judge.md +188 -0
- package/docs/evaluation/structural-observations.md +84 -0
- package/docs/evaluation/uniform-events.md +131 -0
- package/docs/guides/atlas.md +144 -0
- package/docs/guides/evidence-and-sharing.md +100 -0
- package/docs/guides/operator-guide.md +424 -0
- package/docs/guides/quickstart.md +152 -0
- package/docs/guides/telemetry.md +66 -0
- package/docs/harnesses/README.md +31 -0
- package/docs/harnesses/claude-agent-sdk.md +61 -0
- package/docs/harnesses/codex-harness.md +174 -0
- package/docs/harnesses/cursor-sdk.md +149 -0
- package/docs/harnesses/deepseek-harness.md +134 -0
- package/docs/harnesses/openhands-agent-server.md +153 -0
- package/docs/harnesses/pi-sdk.md +66 -0
- package/docs/reference/README.md +19 -0
- package/docs/reference/agent-sdk-operational-runner.md +118 -0
- package/docs/reference/cli.md +114 -0
- package/docs/reference/contracts.md +222 -0
- package/docs/reference/run-bundle-contract.md +354 -0
- package/docs/reference/run-lifecycle.md +54 -0
- package/examples/cursor-sdk/README.md +11 -0
- package/examples/cursor-sdk/capture-profile.json +1 -0
- package/examples/cursor-sdk/harness.json +1 -0
- package/examples/cursor-sdk/model.json +1 -0
- package/examples/cursor-sdk/native-limits.json +1 -0
- package/examples/cursor-sdk/native-tool-policy.json +1 -0
- package/ontology/behavior-categories.v1.json +46 -0
- package/package.json +66 -0
- package/release/0.1.0/KNOWN_LIMITATIONS.md +35 -0
- package/release/0.1.0/README.md +46 -0
- package/release/0.1.0/reproducibility.json +61 -0
- package/release/0.2.0/KNOWN_LIMITATIONS.md +40 -0
- package/release/0.2.0/README.md +42 -0
- package/release/0.2.0/reproducibility.json +73 -0
- package/release/0.2.1/KNOWN_LIMITATIONS.md +18 -0
- package/release/0.2.1/README.md +63 -0
- package/release/0.2.1/reproducibility.json +73 -0
- package/release/README.md +13 -0
- package/schemas/aggregation.v1.json +293 -0
- package/schemas/behavior-assertions.v1.json +220 -0
- package/schemas/deepseek-runtime-composition.v1.schema.json +122 -0
- package/schemas/experiment.v1.schema.json +188 -0
- package/schemas/human-calibration.v1.json +336 -0
- package/schemas/normalization-integrity.v1.json +302 -0
- package/schemas/run-bundles/v1.json +1040 -0
- package/schemas/run-queue.v1.schema.json +206 -0
- package/schemas/semantic-judge.v1.json +380 -0
- package/schemas/structural-observations.v1.json +131 -0
- package/schemas/task-packet-freeze.v1.schema.json +106 -0
- package/schemas/task-packet.v1.schema.json +234 -0
- package/schemas/uniform-events/v1.json +289 -0
- package/scripts/atlas-grafana.sh +18 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { query as claudeQuery, type EffortLevel } from "@anthropic-ai/claude-agent-sdk";
|
|
2
|
+
import { type BehaviorAssertion } from "./behavior-assertions.js";
|
|
3
|
+
import { type CodexReasoningEffort } from "./codex.js";
|
|
4
|
+
import { type StructuralObservationSet } from "./structural-observations.js";
|
|
5
|
+
import type { NativeEvidenceReference, NormalizationInput, UniformEvent } from "./uniform-events.js";
|
|
6
|
+
type DigestString = `sha256:${string}`;
|
|
7
|
+
type JsonRecord = Record<string, unknown>;
|
|
8
|
+
export declare const SEMANTIC_JUDGE_PROMPT_VERSION = "1.0.0";
|
|
9
|
+
export declare const CLAUDE_SEMANTIC_JUDGE_BACKEND_ID = "claude-agent-sdk";
|
|
10
|
+
export type SemanticJudgeRequest = {
|
|
11
|
+
schemaVersion: "ebo.semantic-judge-request/v1";
|
|
12
|
+
id: string;
|
|
13
|
+
behavior: {
|
|
14
|
+
vocabularyVersion: string;
|
|
15
|
+
categoryId: string;
|
|
16
|
+
dimensionId: string;
|
|
17
|
+
};
|
|
18
|
+
rubric: {
|
|
19
|
+
id: string;
|
|
20
|
+
version: string;
|
|
21
|
+
instructions: string;
|
|
22
|
+
};
|
|
23
|
+
evaluator: {
|
|
24
|
+
provider: "anthropic" | "openai";
|
|
25
|
+
model: string;
|
|
26
|
+
effort: EffortLevel | CodexReasoningEffort;
|
|
27
|
+
backend?: "claude-agent-sdk" | "codex-app-server";
|
|
28
|
+
executable?: string;
|
|
29
|
+
};
|
|
30
|
+
selection: {
|
|
31
|
+
eventIds: readonly string[];
|
|
32
|
+
structuralObservationIds: readonly string[];
|
|
33
|
+
includeOutcomeObservations: boolean;
|
|
34
|
+
};
|
|
35
|
+
limits: {
|
|
36
|
+
maxEvidenceItems: number;
|
|
37
|
+
maxRecordChars: number;
|
|
38
|
+
maxInputChars: number;
|
|
39
|
+
maxOutputChars: number;
|
|
40
|
+
maxCitations: number;
|
|
41
|
+
maxWallClockMs: number;
|
|
42
|
+
maxTurns: number;
|
|
43
|
+
maxBudgetUsd?: number;
|
|
44
|
+
};
|
|
45
|
+
blinding: {
|
|
46
|
+
evaluatedModelIdentity: "redact" | "retain";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type SemanticJudgeEvidenceItem = {
|
|
50
|
+
kind: "event" | "structural-observation";
|
|
51
|
+
id: string;
|
|
52
|
+
citation?: {
|
|
53
|
+
eventId: string;
|
|
54
|
+
nativeReference: NativeEvidenceReference;
|
|
55
|
+
};
|
|
56
|
+
content: string;
|
|
57
|
+
truncated: boolean;
|
|
58
|
+
};
|
|
59
|
+
export type SemanticJudgeInput = {
|
|
60
|
+
schemaVersion: "ebo.semantic-judge-input/v1";
|
|
61
|
+
promptVersion: typeof SEMANTIC_JUDGE_PROMPT_VERSION;
|
|
62
|
+
runId: string;
|
|
63
|
+
attemptId: string;
|
|
64
|
+
dataset: {
|
|
65
|
+
schemaVersion: "ebo.normalized-dataset/v1";
|
|
66
|
+
digest: DigestString;
|
|
67
|
+
};
|
|
68
|
+
behavior: SemanticJudgeRequest["behavior"];
|
|
69
|
+
rubric: SemanticJudgeRequest["rubric"];
|
|
70
|
+
selection: {
|
|
71
|
+
requestedEventIds: readonly string[];
|
|
72
|
+
requestedStructuralObservationIds: readonly string[];
|
|
73
|
+
includedEventIds: readonly string[];
|
|
74
|
+
includedStructuralObservationIds: readonly string[];
|
|
75
|
+
omitted: readonly string[];
|
|
76
|
+
truncated: readonly string[];
|
|
77
|
+
};
|
|
78
|
+
blinding: {
|
|
79
|
+
evaluatedModelIdentity: "redacted" | "retained";
|
|
80
|
+
redactionCount: number;
|
|
81
|
+
sourceIdentityPreserved: true;
|
|
82
|
+
residualClues: readonly string[];
|
|
83
|
+
};
|
|
84
|
+
limits: Pick<SemanticJudgeRequest["limits"], "maxEvidenceItems" | "maxRecordChars" | "maxInputChars" | "maxCitations">;
|
|
85
|
+
evidence: readonly SemanticJudgeEvidenceItem[];
|
|
86
|
+
};
|
|
87
|
+
export type SemanticJudgeUsage = {
|
|
88
|
+
totalCostUsd: number;
|
|
89
|
+
numTurns: number;
|
|
90
|
+
mainLoop: unknown;
|
|
91
|
+
byModel: unknown;
|
|
92
|
+
};
|
|
93
|
+
export type SemanticJudgeBackendResult = {
|
|
94
|
+
status: "completed";
|
|
95
|
+
response: unknown;
|
|
96
|
+
raw: unknown;
|
|
97
|
+
rawModelResponse?: unknown;
|
|
98
|
+
timing?: {
|
|
99
|
+
durationMs: number;
|
|
100
|
+
durationApiMs: number;
|
|
101
|
+
};
|
|
102
|
+
usage?: SemanticJudgeUsage;
|
|
103
|
+
} | {
|
|
104
|
+
status: "failed";
|
|
105
|
+
kind: "provider" | "timeout" | "interrupted";
|
|
106
|
+
message: string;
|
|
107
|
+
raw?: unknown;
|
|
108
|
+
rawModelResponse?: unknown;
|
|
109
|
+
timing?: {
|
|
110
|
+
durationMs: number;
|
|
111
|
+
durationApiMs: number;
|
|
112
|
+
};
|
|
113
|
+
usage?: SemanticJudgeUsage;
|
|
114
|
+
};
|
|
115
|
+
export type SemanticJudgeBackend = {
|
|
116
|
+
id: "claude-agent-sdk" | "codex-app-server";
|
|
117
|
+
version: string;
|
|
118
|
+
run: (prompt: string, request: SemanticJudgeRequest, signal?: AbortSignal) => Promise<SemanticJudgeBackendResult>;
|
|
119
|
+
};
|
|
120
|
+
type RecordReference = {
|
|
121
|
+
path: string;
|
|
122
|
+
digest: DigestString;
|
|
123
|
+
sharingClass: "restricted";
|
|
124
|
+
truncated?: boolean;
|
|
125
|
+
};
|
|
126
|
+
type Availability<Value> = {
|
|
127
|
+
status: "available";
|
|
128
|
+
value: Value;
|
|
129
|
+
} | {
|
|
130
|
+
status: "unavailable";
|
|
131
|
+
reason: string;
|
|
132
|
+
};
|
|
133
|
+
export type SemanticJudgmentRecord = {
|
|
134
|
+
schemaVersion: "ebo.semantic-judgment/v1";
|
|
135
|
+
id: string;
|
|
136
|
+
runId: string;
|
|
137
|
+
attemptId: string;
|
|
138
|
+
createdAt: string;
|
|
139
|
+
status: "proposed" | "failed";
|
|
140
|
+
input: RecordReference & {
|
|
141
|
+
digest: DigestString;
|
|
142
|
+
};
|
|
143
|
+
evaluator: {
|
|
144
|
+
provider: "anthropic" | "openai";
|
|
145
|
+
model: string;
|
|
146
|
+
effort: EffortLevel | CodexReasoningEffort;
|
|
147
|
+
backend: {
|
|
148
|
+
id: "claude-agent-sdk" | "codex-app-server";
|
|
149
|
+
version: string;
|
|
150
|
+
};
|
|
151
|
+
environment: {
|
|
152
|
+
parentPreserved: boolean;
|
|
153
|
+
modelEffortOverrides: "removed";
|
|
154
|
+
ambientTelemetry: "removed";
|
|
155
|
+
removedKeys: readonly string[];
|
|
156
|
+
mode?: "replace";
|
|
157
|
+
allowedKeys?: readonly string[];
|
|
158
|
+
authentication?: "existing-auth-json-only";
|
|
159
|
+
};
|
|
160
|
+
limits: SemanticJudgeRequest["limits"];
|
|
161
|
+
};
|
|
162
|
+
rawResponse?: RecordReference;
|
|
163
|
+
rawModelResponse?: RecordReference;
|
|
164
|
+
parse: {
|
|
165
|
+
status: "valid";
|
|
166
|
+
} | {
|
|
167
|
+
status: "failed";
|
|
168
|
+
kind: string;
|
|
169
|
+
message: string;
|
|
170
|
+
};
|
|
171
|
+
timing: Availability<{
|
|
172
|
+
durationMs: number;
|
|
173
|
+
durationApiMs: number;
|
|
174
|
+
}>;
|
|
175
|
+
usage: Availability<SemanticJudgeUsage>;
|
|
176
|
+
assertion?: RecordReference & {
|
|
177
|
+
id: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
export type RunAgentSdkSemanticJudgeOptions = {
|
|
181
|
+
bundleRoot: string;
|
|
182
|
+
observations: StructuralObservationSet;
|
|
183
|
+
request: SemanticJudgeRequest;
|
|
184
|
+
outputRoot: string;
|
|
185
|
+
backend?: SemanticJudgeBackend;
|
|
186
|
+
now?: () => string;
|
|
187
|
+
signal?: AbortSignal;
|
|
188
|
+
};
|
|
189
|
+
export declare function runAgentSdkSemanticJudge(options: RunAgentSdkSemanticJudgeOptions): Promise<SemanticJudgmentRecord>;
|
|
190
|
+
export declare function runClaudeAgentSdkSemanticJudge(prompt: string, request: SemanticJudgeRequest, queryFunction?: typeof claudeQuery, signal?: AbortSignal): Promise<SemanticJudgeBackendResult>;
|
|
191
|
+
export declare function packageSemanticJudgeInput(events: readonly UniformEvent[], capture: NormalizationInput<unknown>, observations: StructuralObservationSet, request: SemanticJudgeRequest, datasetDigest: DigestString, evaluatedModelId: string): SemanticJudgeInput;
|
|
192
|
+
export declare function parseSemanticJudgeResponse(value: unknown, request: SemanticJudgeRequest, input: SemanticJudgeInput, evaluatorVersion?: string): BehaviorAssertion;
|
|
193
|
+
export declare function semanticJudgeResponseSchema(maxCitations: number): JsonRecord;
|
|
194
|
+
export {};
|