@eir-labs/coltrane 0.4.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/LICENSE +201 -0
- package/README.md +85 -0
- package/agents/anticipation-mapper.json +34 -0
- package/agents/claim-amender.json +34 -0
- package/agents/claim-architect.json +34 -0
- package/agents/claim-rewriter.json +32 -0
- package/agents/delivery-finalizer.json +40 -0
- package/agents/diamond-cutter.json +33 -0
- package/agents/disclosure-analyst.json +26 -0
- package/agents/domain-explorer.json +37 -0
- package/agents/e2e-runner.json +34 -0
- package/agents/e2e-suite-judge.json +26 -0
- package/agents/event-clusterer.json +29 -0
- package/agents/novelty-searcher.json +40 -0
- package/agents/patent-browser-scout.json +49 -0
- package/agents/patent-examiner.json +36 -0
- package/agents/phase_agents/claim-rewriter.md +44 -0
- package/agents/phase_agents/delivery-finalizer.md +30 -0
- package/agents/phase_agents/diamond-cutter.md +47 -0
- package/agents/phase_agents/domain-explorer.md +27 -0
- package/agents/phase_agents/novelty-searcher.md +50 -0
- package/agents/phase_agents/problem-definer.md +32 -0
- package/agents/phase_agents/solution-developer.md +26 -0
- package/agents/phase_agents/verdict-judger.md +70 -0
- package/agents/players/audience-modeler.md +40 -0
- package/agents/players/chain-audit-keeper.md +41 -0
- package/agents/players/illumination-reviewer.md +42 -0
- package/agents/players/methodology-cadence-keeper.md +42 -0
- package/agents/players/substrate-edge-keeper.md +45 -0
- package/agents/prior-art-scout.json +45 -0
- package/agents/problem-definer.json +35 -0
- package/agents/seeds/steve_seed_a.json +12 -0
- package/agents/seeds/steve_seed_b.json +12 -0
- package/agents/seeds/steve_seed_c.json +12 -0
- package/agents/seeds/steve_seed_d.json +12 -0
- package/agents/sensor.json +22 -0
- package/agents/solution-developer.json +35 -0
- package/agents/source-walker.json +38 -0
- package/agents/spec-drafter.json +31 -0
- package/agents/sub_thread_soft_judge.json +26 -0
- package/agents/sub_thread_trace_sensor.json +22 -0
- package/agents/summarizer.json +25 -0
- package/agents/synthesis-writer.json +29 -0
- package/agents/triage-judge.json +39 -0
- package/agents/user_flow_judge.json +26 -0
- package/agents/user_flow_sensor.json +22 -0
- package/agents/verdict-judger.json +39 -0
- package/core_types/artifact.json +17 -0
- package/core_types/interpretation.json +16 -0
- package/core_types/judgment.json +16 -0
- package/core_types/plan.json +16 -0
- package/core_types/signal.json +16 -0
- package/core_types/verdict.json +27 -0
- package/dist/src/access_grant.d.ts +46 -0
- package/dist/src/access_grant.js +76 -0
- package/dist/src/access_grant.js.map +1 -0
- package/dist/src/acoustics.d.ts +9 -0
- package/dist/src/acoustics.js +65 -0
- package/dist/src/acoustics.js.map +1 -0
- package/dist/src/agent_profile.d.ts +36 -0
- package/dist/src/agent_profile.js +57 -0
- package/dist/src/agent_profile.js.map +1 -0
- package/dist/src/bifrost_invoker.d.ts +33 -0
- package/dist/src/bifrost_invoker.js +85 -0
- package/dist/src/bifrost_invoker.js.map +1 -0
- package/dist/src/canonical_core_types.d.ts +2 -0
- package/dist/src/canonical_core_types.js +111 -0
- package/dist/src/canonical_core_types.js.map +1 -0
- package/dist/src/canonical_form.d.ts +55 -0
- package/dist/src/canonical_form.js +93 -0
- package/dist/src/canonical_form.js.map +1 -0
- package/dist/src/charter.d.ts +37 -0
- package/dist/src/charter.js +86 -0
- package/dist/src/charter.js.map +1 -0
- package/dist/src/circle_of_fifths.d.ts +27 -0
- package/dist/src/circle_of_fifths.js +78 -0
- package/dist/src/circle_of_fifths.js.map +1 -0
- package/dist/src/claude_invoker.d.ts +102 -0
- package/dist/src/claude_invoker.js +760 -0
- package/dist/src/claude_invoker.js.map +1 -0
- package/dist/src/coltrane_profile.d.ts +87 -0
- package/dist/src/coltrane_profile.js +132 -0
- package/dist/src/coltrane_profile.js.map +1 -0
- package/dist/src/composition.d.ts +57 -0
- package/dist/src/composition.js +447 -0
- package/dist/src/composition.js.map +1 -0
- package/dist/src/core_types.d.ts +6 -0
- package/dist/src/core_types.js +25 -0
- package/dist/src/core_types.js.map +1 -0
- package/dist/src/document_factory.d.ts +89 -0
- package/dist/src/document_factory.js +176 -0
- package/dist/src/document_factory.js.map +1 -0
- package/dist/src/genome_schema.d.ts +512 -0
- package/dist/src/genome_schema.js +168 -0
- package/dist/src/genome_schema.js.map +1 -0
- package/dist/src/genome_writer.d.ts +67 -0
- package/dist/src/genome_writer.js +179 -0
- package/dist/src/genome_writer.js.map +1 -0
- package/dist/src/gig_song.d.ts +29 -0
- package/dist/src/gig_song.js +56 -0
- package/dist/src/gig_song.js.map +1 -0
- package/dist/src/gig_tracker.d.ts +54 -0
- package/dist/src/gig_tracker.js +109 -0
- package/dist/src/gig_tracker.js.map +1 -0
- package/dist/src/harmonic_validation.d.ts +11 -0
- package/dist/src/harmonic_validation.js +35 -0
- package/dist/src/harmonic_validation.js.map +1 -0
- package/dist/src/hooks.d.ts +27 -0
- package/dist/src/hooks.js +2 -0
- package/dist/src/hooks.js.map +1 -0
- package/dist/src/index.d.ts +36 -0
- package/dist/src/index.js +37 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/jsong.d.ts +47 -0
- package/dist/src/jsong.js +130 -0
- package/dist/src/jsong.js.map +1 -0
- package/dist/src/judges/user_flow_judge.d.ts +89 -0
- package/dist/src/judges/user_flow_judge.js +200 -0
- package/dist/src/judges/user_flow_judge.js.map +1 -0
- package/dist/src/learner.d.ts +37 -0
- package/dist/src/learner.js +30 -0
- package/dist/src/learner.js.map +1 -0
- package/dist/src/ledger.d.ts +225 -0
- package/dist/src/ledger.js +306 -0
- package/dist/src/ledger.js.map +1 -0
- package/dist/src/loader.d.ts +87 -0
- package/dist/src/loader.js +504 -0
- package/dist/src/loader.js.map +1 -0
- package/dist/src/mcp.d.ts +23 -0
- package/dist/src/mcp.js +125 -0
- package/dist/src/mcp.js.map +1 -0
- package/dist/src/modulation_path.d.ts +42 -0
- package/dist/src/modulation_path.js +60 -0
- package/dist/src/modulation_path.js.map +1 -0
- package/dist/src/output_validation.d.ts +19 -0
- package/dist/src/output_validation.js +51 -0
- package/dist/src/output_validation.js.map +1 -0
- package/dist/src/outputs.d.ts +125 -0
- package/dist/src/outputs.js +452 -0
- package/dist/src/outputs.js.map +1 -0
- package/dist/src/overtones.d.ts +42 -0
- package/dist/src/overtones.js +98 -0
- package/dist/src/overtones.js.map +1 -0
- package/dist/src/player_to_claude_code.d.ts +17 -0
- package/dist/src/player_to_claude_code.js +141 -0
- package/dist/src/player_to_claude_code.js.map +1 -0
- package/dist/src/playwright_cage.d.ts +28 -0
- package/dist/src/playwright_cage.js +47 -0
- package/dist/src/playwright_cage.js.map +1 -0
- package/dist/src/polyphony.d.ts +46 -0
- package/dist/src/polyphony.js +91 -0
- package/dist/src/polyphony.js.map +1 -0
- package/dist/src/portfolio.d.ts +52 -0
- package/dist/src/portfolio.js +186 -0
- package/dist/src/portfolio.js.map +1 -0
- package/dist/src/pricing.d.ts +23 -0
- package/dist/src/pricing.js +16 -0
- package/dist/src/pricing.js.map +1 -0
- package/dist/src/registry.d.ts +46 -0
- package/dist/src/registry.js +199 -0
- package/dist/src/registry.js.map +1 -0
- package/dist/src/runtime.d.ts +304 -0
- package/dist/src/runtime.js +1099 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/server.d.ts +88 -0
- package/dist/src/server.js +1692 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/server_entry.d.ts +2 -0
- package/dist/src/server_entry.js +40 -0
- package/dist/src/server_entry.js.map +1 -0
- package/dist/src/server_relay.d.ts +82 -0
- package/dist/src/server_relay.js +341 -0
- package/dist/src/server_relay.js.map +1 -0
- package/dist/src/simulate.d.ts +60 -0
- package/dist/src/simulate.js +72 -0
- package/dist/src/simulate.js.map +1 -0
- package/dist/src/skill_runner.mjs +34 -0
- package/dist/src/skill_subprocess.d.ts +65 -0
- package/dist/src/skill_subprocess.js +132 -0
- package/dist/src/skill_subprocess.js.map +1 -0
- package/dist/src/skills.d.ts +85 -0
- package/dist/src/skills.js +258 -0
- package/dist/src/skills.js.map +1 -0
- package/dist/src/subthread_recorder.d.ts +68 -0
- package/dist/src/subthread_recorder.js +166 -0
- package/dist/src/subthread_recorder.js.map +1 -0
- package/dist/src/tensor_read.d.ts +38 -0
- package/dist/src/tensor_read.js +60 -0
- package/dist/src/tensor_read.js.map +1 -0
- package/dist/src/test_honest_broker.d.ts +34 -0
- package/dist/src/test_honest_broker.js +155 -0
- package/dist/src/test_honest_broker.js.map +1 -0
- package/dist/src/test_topology.d.ts +22 -0
- package/dist/src/test_topology.js +137 -0
- package/dist/src/test_topology.js.map +1 -0
- package/dist/src/tones.d.ts +20 -0
- package/dist/src/tones.js +81 -0
- package/dist/src/tones.js.map +1 -0
- package/dist/src/tool_providers.d.ts +45 -0
- package/dist/src/tool_providers.js +104 -0
- package/dist/src/tool_providers.js.map +1 -0
- package/dist/src/type_versioning.d.ts +23 -0
- package/dist/src/type_versioning.js +31 -0
- package/dist/src/type_versioning.js.map +1 -0
- package/dist/src/version.d.ts +28 -0
- package/dist/src/version.js +86 -0
- package/dist/src/version.js.map +1 -0
- package/domain_types/claim-draft.json +34 -0
- package/domain_types/coverage-report.json +31 -0
- package/domain_types/draft-agent-profile.json +31 -0
- package/domain_types/draft-domain-type.json +28 -0
- package/domain_types/draft-standard.json +46 -0
- package/domain_types/e2e-observation.json +32 -0
- package/domain_types/e2e-report.json +30 -0
- package/domain_types/e2e-target.json +26 -0
- package/domain_types/e2e-verdict.json +26 -0
- package/domain_types/examine-round-record.json +40 -0
- package/domain_types/examiner-rejection.json +28 -0
- package/domain_types/failure-modes.json +31 -0
- package/domain_types/invention-analysis.json +34 -0
- package/domain_types/invention-spec.json +34 -0
- package/domain_types/novelty-analysis.json +28 -0
- package/domain_types/novelty-verdict.json +35 -0
- package/domain_types/parsed-conversation-trace.json +38 -0
- package/domain_types/pattern-extraction.json +62 -0
- package/domain_types/prior-art-hit.json +50 -0
- package/domain_types/project-charter.json +71 -0
- package/domain_types/provisional-draft.json +34 -0
- package/domain_types/raw-note.json +19 -0
- package/domain_types/repo-survey.json +28 -0
- package/domain_types/seeding-verdict.json +70 -0
- package/domain_types/soft-verdict.json +55 -0
- package/domain_types/summary.json +19 -0
- package/domain_types/triage-verdict.json +59 -0
- package/domain_types/user-flow-transcript.json +43 -0
- package/domain_types/user-flow-verdict.json +60 -0
- package/domain_types/verdict-record.json +39 -0
- package/package.json +82 -0
- package/skills/citation-verify/fixtures/basic.json +14 -0
- package/skills/citation-verify/meta.json +10 -0
- package/skills/citation-verify/skill.mjs +26 -0
- package/skills/claim-element-decompose/fixtures/basic.json +11 -0
- package/skills/claim-element-decompose/meta.json +10 -0
- package/skills/claim-element-decompose/skill.mjs +14 -0
- package/skills/diamond-cutting-discipline/fixtures/basic.json +13 -0
- package/skills/diamond-cutting-discipline/meta.json +19 -0
- package/skills/diamond-cutting-discipline/skill.md +46 -0
- package/skills/element-mapping-matrix/fixtures/basic.json +13 -0
- package/skills/element-mapping-matrix/meta.json +10 -0
- package/skills/element-mapping-matrix/skill.mjs +20 -0
- package/skills/number-adder/fixtures/basic.json +9 -0
- package/skills/number-adder/meta.json +10 -0
- package/skills/number-adder/skill.mjs +12 -0
- package/skills/patent-fetch/fixtures/parse.json +18 -0
- package/skills/patent-fetch/meta.json +11 -0
- package/skills/patent-fetch/skill.mjs +34 -0
- package/skills/query-expand/fixtures/basic.json +14 -0
- package/skills/query-expand/meta.json +10 -0
- package/skills/query-expand/skill.mjs +29 -0
- package/skills/run-vitest-band/fixtures/basic.json +9 -0
- package/skills/run-vitest-band/meta.json +18 -0
- package/skills/run-vitest-band/skill.mjs +22 -0
- package/skills/statutory-checklist/fixtures/basic.json +16 -0
- package/skills/statutory-checklist/meta.json +10 -0
- package/skills/statutory-checklist/skill.mjs +25 -0
- package/skills/summarize-tight/fixtures/basic.json +13 -0
- package/skills/summarize-tight/meta.json +20 -0
- package/skills/summarize-tight/skill.md +1 -0
- package/skills/verdict-gate/fixtures/basic.json +9 -0
- package/skills/verdict-gate/meta.json +10 -0
- package/skills/verdict-gate/skill.mjs +82 -0
- package/standards/e2e-suite-v0.json +44 -0
- package/standards/patent-triage-v0.json +98 -0
- package/standards/patent-triage-v1.json +84 -0
- package/standards/seed-from-local-repos-v0.json +115 -0
- package/standards/sub_thread_invocation.json +50 -0
- package/standards/summarize.json +40 -0
- package/standards/synthesis-walk-v0.json +108 -0
- package/standards/user_flow_correctness.json +57 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "Judgment",
|
|
3
|
+
"primitive": "JUDGE",
|
|
4
|
+
"description": "Evaluation against criteria",
|
|
5
|
+
"schema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string" },
|
|
9
|
+
"input_refs": { "type": "array", "items": { "type": "string" } },
|
|
10
|
+
"criteria": { "type": "array", "minItems": 1 },
|
|
11
|
+
"verdicts": { "type": "array" },
|
|
12
|
+
"reasoning_chain": { "type": "array" }
|
|
13
|
+
},
|
|
14
|
+
"required": ["id", "input_refs", "criteria", "verdicts", "reasoning_chain"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "Plan",
|
|
3
|
+
"primitive": "PLAN",
|
|
4
|
+
"description": "Sequenced actions with dependencies",
|
|
5
|
+
"schema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string" },
|
|
9
|
+
"input_refs": { "type": "array", "items": { "type": "string" } },
|
|
10
|
+
"objective": { "type": "string" },
|
|
11
|
+
"steps": { "type": "array", "minItems": 1 },
|
|
12
|
+
"budget": { "type": "number" }
|
|
13
|
+
},
|
|
14
|
+
"required": ["id", "input_refs", "objective", "steps", "budget"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "Signal",
|
|
3
|
+
"primitive": "SENSE",
|
|
4
|
+
"description": "Raw acquired data from a source",
|
|
5
|
+
"schema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string" },
|
|
9
|
+
"source": { "type": "string", "minLength": 1 },
|
|
10
|
+
"data": { "type": "object" },
|
|
11
|
+
"completeness": { "type": "number" },
|
|
12
|
+
"acquisition_cost": { "type": "number" }
|
|
13
|
+
},
|
|
14
|
+
"required": ["id", "source", "data", "completeness", "acquisition_cost"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "Verdict",
|
|
3
|
+
"primitive": "VERIFY",
|
|
4
|
+
"description": "Pass/fail with evidence",
|
|
5
|
+
"schema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string" },
|
|
9
|
+
"target_ref": { "type": "string" },
|
|
10
|
+
"pass": { "type": "boolean" },
|
|
11
|
+
"checks": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"method": { "type": "string" },
|
|
18
|
+
"target_ref": { "type": "string" },
|
|
19
|
+
"result": { "type": "string" }
|
|
20
|
+
},
|
|
21
|
+
"required": ["method"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["id", "target_ref", "pass", "checks"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type ResourceType = "repo" | "environment" | "database" | "api" | "email" | "crm" | "calendar" | "social" | "analytics";
|
|
2
|
+
export interface AccessGrant {
|
|
3
|
+
id: string;
|
|
4
|
+
company_id: string;
|
|
5
|
+
resource_type: ResourceType;
|
|
6
|
+
resource_uri: string;
|
|
7
|
+
permissions: {
|
|
8
|
+
read: boolean;
|
|
9
|
+
write: boolean;
|
|
10
|
+
execute: boolean;
|
|
11
|
+
deploy: boolean;
|
|
12
|
+
};
|
|
13
|
+
scope: {
|
|
14
|
+
branches: readonly string[];
|
|
15
|
+
paths: readonly string[];
|
|
16
|
+
excluded_paths: readonly string[];
|
|
17
|
+
max_files_per_patch: number;
|
|
18
|
+
max_lines_per_patch: number;
|
|
19
|
+
};
|
|
20
|
+
expires_at: string;
|
|
21
|
+
requires_pr: boolean;
|
|
22
|
+
requires_human_review: boolean;
|
|
23
|
+
auto_revert_on_failure: boolean;
|
|
24
|
+
}
|
|
25
|
+
export type Phase = "SENSE" | "INTERPRET" | "JUDGE" | "PLAN" | "CREATE" | "VERIFY";
|
|
26
|
+
export interface TTLResult {
|
|
27
|
+
valid: boolean;
|
|
28
|
+
reason?: string;
|
|
29
|
+
remaining_ms?: number;
|
|
30
|
+
}
|
|
31
|
+
export declare function checkGrantTTL(grant: AccessGrant, nowMs: number): TTLResult;
|
|
32
|
+
export interface PlanCheck {
|
|
33
|
+
files: readonly string[];
|
|
34
|
+
lines_changed: number;
|
|
35
|
+
}
|
|
36
|
+
export interface PlanResult {
|
|
37
|
+
valid: boolean;
|
|
38
|
+
reason?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function validatePlanAgainstGrant(plan: PlanCheck, grant: AccessGrant): PlanResult;
|
|
41
|
+
export interface ExposeQuery {
|
|
42
|
+
phase: Phase;
|
|
43
|
+
agent_allowed: readonly string[];
|
|
44
|
+
grant: AccessGrant;
|
|
45
|
+
}
|
|
46
|
+
export declare function exposedTools(q: ExposeQuery): string[];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export function checkGrantTTL(grant, nowMs) {
|
|
2
|
+
const expiry = Date.parse(grant.expires_at);
|
|
3
|
+
if (expiry <= nowMs) {
|
|
4
|
+
return { valid: false, reason: `grant expired at ${grant.expires_at}` };
|
|
5
|
+
}
|
|
6
|
+
return { valid: true, remaining_ms: expiry - nowMs };
|
|
7
|
+
}
|
|
8
|
+
function matchesGlob(pattern, path) {
|
|
9
|
+
const re = new RegExp("^" +
|
|
10
|
+
pattern
|
|
11
|
+
.split("/")
|
|
12
|
+
.map((seg) => (seg === "**" ? ".*" : seg.replace(/\*/g, "[^/]*")))
|
|
13
|
+
.join("/") +
|
|
14
|
+
"$");
|
|
15
|
+
return re.test(path);
|
|
16
|
+
}
|
|
17
|
+
export function validatePlanAgainstGrant(plan, grant) {
|
|
18
|
+
if (plan.files.length > grant.scope.max_files_per_patch) {
|
|
19
|
+
return {
|
|
20
|
+
valid: false,
|
|
21
|
+
reason: `plan exceeds max_files_per_patch (${plan.files.length} > ${grant.scope.max_files_per_patch})`,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (plan.lines_changed > grant.scope.max_lines_per_patch) {
|
|
25
|
+
return {
|
|
26
|
+
valid: false,
|
|
27
|
+
reason: `plan exceeds max_lines_per_patch (${plan.lines_changed} > ${grant.scope.max_lines_per_patch})`,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
for (const f of plan.files) {
|
|
31
|
+
for (const ex of grant.scope.excluded_paths) {
|
|
32
|
+
if (matchesGlob(ex, f) || f === ex) {
|
|
33
|
+
return { valid: false, reason: `file ${f} matches excluded path ${ex}` };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const inScope = grant.scope.paths.some((p) => matchesGlob(p, f));
|
|
37
|
+
if (!inScope) {
|
|
38
|
+
return { valid: false, reason: `file ${f} is outside grant scope paths` };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return { valid: true };
|
|
42
|
+
}
|
|
43
|
+
const READ_TOOLS = new Set([
|
|
44
|
+
"url_scan",
|
|
45
|
+
"file_read",
|
|
46
|
+
"type_browse",
|
|
47
|
+
"output_query",
|
|
48
|
+
"type_resolve",
|
|
49
|
+
"charter_read",
|
|
50
|
+
]);
|
|
51
|
+
const WRITE_TOOLS = new Set(["file_write", "shell_exec"]);
|
|
52
|
+
const DEPLOY_TOOLS = new Set(["deploy"]);
|
|
53
|
+
const READ_PHASES = new Set(["SENSE", "INTERPRET", "JUDGE", "PLAN"]);
|
|
54
|
+
const WRITE_PHASES = new Set(["CREATE"]);
|
|
55
|
+
export function exposedTools(q) {
|
|
56
|
+
const result = [];
|
|
57
|
+
for (const tool of q.agent_allowed) {
|
|
58
|
+
if (DEPLOY_TOOLS.has(tool) && !q.grant.permissions.deploy)
|
|
59
|
+
continue;
|
|
60
|
+
if (WRITE_TOOLS.has(tool)) {
|
|
61
|
+
if (!WRITE_PHASES.has(q.phase))
|
|
62
|
+
continue;
|
|
63
|
+
if (!q.grant.permissions.write)
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (READ_TOOLS.has(tool)) {
|
|
67
|
+
if (!q.grant.permissions.read)
|
|
68
|
+
continue;
|
|
69
|
+
if (!READ_PHASES.has(q.phase) && !WRITE_PHASES.has(q.phase))
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
result.push(tool);
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=access_grant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access_grant.js","sourceRoot":"","sources":["../../src/access_grant.ts"],"names":[],"mappings":"AA2CA,MAAM,UAAU,aAAa,CAAC,KAAkB,EAAE,KAAa;IAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;QACpB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC;IAC1E,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,EAAE,CAAC;AACvD,CAAC;AAYD,SAAS,WAAW,CAAC,OAAe,EAAE,IAAY;IAChD,MAAM,EAAE,GAAG,IAAI,MAAM,CACnB,GAAG;QACD,OAAO;a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K;gBAAE,SAAS;QAC3C,CAAC;QACD,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI;gBAAE,SAAS;YACxC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;gBAAE,SAAS;QACxE,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const JUST_RATIOS: Readonly<Record<string, readonly [number, number]>>;
|
|
2
|
+
export declare function ratioCents(ratio: readonly [number, number]): number;
|
|
3
|
+
export declare function temperedCents(semitones: number): number;
|
|
4
|
+
export declare function comma(interval: string): number;
|
|
5
|
+
export declare function ratioConsonance(ratio: readonly [number, number]): number;
|
|
6
|
+
export declare function nearestJust(cents: number): {
|
|
7
|
+
interval: string;
|
|
8
|
+
deviationCents: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Acoustics depth — the layer beneath 12-TET (the overtones module). Where overtones.ts uses
|
|
2
|
+
// equal-temperament's 12 buckets, this carries JUST INTONATION (the pure integer ratios the
|
|
3
|
+
// harmonic series actually produces), the COMMA (the cents gap between just and tempered —
|
|
4
|
+
// what equal-temperament smears to make all 12 keys playable), and MICROTONAL reads
|
|
5
|
+
// (continuous cents, never bucketed). Consonance is returned as a number — a feature, never
|
|
6
|
+
// a boolean verdict.
|
|
7
|
+
// 5-limit just intonation: interval name → [numerator, denominator] of the pure ratio.
|
|
8
|
+
export const JUST_RATIOS = {
|
|
9
|
+
unison: [1, 1],
|
|
10
|
+
minor2: [16, 15],
|
|
11
|
+
major2: [9, 8],
|
|
12
|
+
minor3: [6, 5],
|
|
13
|
+
major3: [5, 4],
|
|
14
|
+
perfect4: [4, 3],
|
|
15
|
+
tritone: [45, 32],
|
|
16
|
+
perfect5: [3, 2],
|
|
17
|
+
minor6: [8, 5],
|
|
18
|
+
major6: [5, 3],
|
|
19
|
+
minor7: [9, 5],
|
|
20
|
+
major7: [15, 8],
|
|
21
|
+
octave: [2, 1],
|
|
22
|
+
};
|
|
23
|
+
// semitone distance for each named interval — the 12-TET position to compare against.
|
|
24
|
+
const SEMITONES = {
|
|
25
|
+
unison: 0, minor2: 1, major2: 2, minor3: 3, major3: 4, perfect4: 5,
|
|
26
|
+
tritone: 6, perfect5: 7, minor6: 8, major6: 9, minor7: 10, major7: 11, octave: 12,
|
|
27
|
+
};
|
|
28
|
+
// cents of a pure ratio: 1200 * log2(n/d).
|
|
29
|
+
export function ratioCents(ratio) {
|
|
30
|
+
return 1200 * Math.log2(ratio[0] / ratio[1]);
|
|
31
|
+
}
|
|
32
|
+
// cents of an equal-tempered interval: 100 cents per semitone, exactly.
|
|
33
|
+
export function temperedCents(semitones) {
|
|
34
|
+
return 100 * semitones;
|
|
35
|
+
}
|
|
36
|
+
// the comma: how far the JUST interval sits from its TEMPERED neighbor, in cents.
|
|
37
|
+
// positive = just is sharper than tempered. (perfect5 ≈ +1.96; major3 ≈ -13.69, the
|
|
38
|
+
// syntonic comma equal-temperament spends to keep every key playable.)
|
|
39
|
+
export function comma(interval) {
|
|
40
|
+
const ratio = JUST_RATIOS[interval];
|
|
41
|
+
const semis = SEMITONES[interval];
|
|
42
|
+
if (ratio === undefined || semis === undefined)
|
|
43
|
+
return NaN;
|
|
44
|
+
return ratioCents(ratio) - temperedCents(semis);
|
|
45
|
+
}
|
|
46
|
+
// consonance of a ratio as a number — simpler ratio = more consonant (1 / Tenney-ish height).
|
|
47
|
+
// octave > fifth > fourth > thirds > tritone. a feature, not a verdict.
|
|
48
|
+
export function ratioConsonance(ratio) {
|
|
49
|
+
return 1 / (Math.log2(ratio[0] * ratio[1]) + 1);
|
|
50
|
+
}
|
|
51
|
+
// microtonal read: given a continuous cents value (0..1200), the nearest just interval and
|
|
52
|
+
// the signed deviation in cents — the continuous pitch is preserved, not snapped to 12.
|
|
53
|
+
export function nearestJust(cents) {
|
|
54
|
+
let best = "unison";
|
|
55
|
+
let bestAbs = Infinity;
|
|
56
|
+
for (const name of Object.keys(JUST_RATIOS)) {
|
|
57
|
+
const dev = cents - ratioCents(JUST_RATIOS[name]);
|
|
58
|
+
if (Math.abs(dev) < bestAbs) {
|
|
59
|
+
bestAbs = Math.abs(dev);
|
|
60
|
+
best = name;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return { interval: best, deviationCents: cents - ratioCents(JUST_RATIOS[best]) };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=acoustics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acoustics.js","sourceRoot":"","sources":["../../src/acoustics.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,4FAA4F;AAC5F,2FAA2F;AAC3F,oFAAoF;AACpF,4FAA4F;AAC5F,qBAAqB;AAErB,uFAAuF;AACvF,MAAM,CAAC,MAAM,WAAW,GAAwD;IAC9E,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IAChB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,MAAM,EAAE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C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,2FAA2F;AAC3F,wFAAwF;AACxF,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,IAAI,IAAI,GAAG,QAAQ,CAAC;IACpB,IAAI,OAAO,GAAG,QAAQ,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5C,MAAM,GAAG,GAAG,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAE,CAAC,CAAC;QACnD,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,EAAE,CAAC;YAC5B,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAE,CAAC,EAAE,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Primitive } from "./core_types.js";
|
|
2
|
+
import type { ModelTier } from "./pricing.js";
|
|
3
|
+
export type ProfileSpace = "creative" | "harmonic" | "permissions";
|
|
4
|
+
export type DepthProfile = "skim" | "quick" | "standard" | "deep";
|
|
5
|
+
export type AgentStatus = "draft" | "review" | "approved" | "active" | "retired";
|
|
6
|
+
export interface AgentPermissions {
|
|
7
|
+
allowed_tools: readonly string[];
|
|
8
|
+
disallowed_tools: readonly string[];
|
|
9
|
+
model_tier: ModelTier;
|
|
10
|
+
max_tool_calls: number;
|
|
11
|
+
max_token_budget: number;
|
|
12
|
+
can_write_outputs: boolean;
|
|
13
|
+
can_trigger_standards: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface AgentProfile {
|
|
16
|
+
slug: string;
|
|
17
|
+
version: number;
|
|
18
|
+
status: AgentStatus;
|
|
19
|
+
parent_version?: number | null;
|
|
20
|
+
primitives: readonly Primitive[];
|
|
21
|
+
input_types: readonly string[];
|
|
22
|
+
output_types: readonly string[];
|
|
23
|
+
domain: string;
|
|
24
|
+
identity: string;
|
|
25
|
+
method: string;
|
|
26
|
+
constraints: readonly string[];
|
|
27
|
+
depth_profile: DepthProfile;
|
|
28
|
+
permissions: AgentPermissions;
|
|
29
|
+
}
|
|
30
|
+
export interface AgentChangeResult {
|
|
31
|
+
space: ProfileSpace;
|
|
32
|
+
approval_required: boolean;
|
|
33
|
+
type_check_passed?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function evolveProfile(base: AgentProfile, changes: Partial<Pick<AgentProfile, "identity" | "method" | "constraints">>): AgentProfile;
|
|
36
|
+
export declare function proposeAgentChange(base: AgentProfile, next: AgentProfile): AgentChangeResult;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const CREATIVE_FIELDS = [
|
|
2
|
+
"identity",
|
|
3
|
+
"method",
|
|
4
|
+
"constraints",
|
|
5
|
+
];
|
|
6
|
+
const HARMONIC_FIELDS = [
|
|
7
|
+
"primitives",
|
|
8
|
+
"input_types",
|
|
9
|
+
"output_types",
|
|
10
|
+
"domain",
|
|
11
|
+
"depth_profile",
|
|
12
|
+
];
|
|
13
|
+
function eq(a, b) {
|
|
14
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
15
|
+
}
|
|
16
|
+
// The faithful og evolveAgent: produce the next version of a profile from
|
|
17
|
+
// CREATIVE-space changes only (identity / method / constraints). version+1,
|
|
18
|
+
// status reset to draft, parent_version threaded so the immutable lineage chain
|
|
19
|
+
// reconstructs (old versions survive — nothing mutates in place).
|
|
20
|
+
//
|
|
21
|
+
// Harmonic (primitives/types/domain) and permissions are creative-only BY
|
|
22
|
+
// CONSTRUCTION here: only the three creative fields are read from `changes`, so
|
|
23
|
+
// harmonic/permissions can't be expressed through evolve at all — they require a
|
|
24
|
+
// proposal / human approval via proposeAgentChange. The three-space rule, enforced
|
|
25
|
+
// by what this function structurally cannot touch.
|
|
26
|
+
export function evolveProfile(base, changes) {
|
|
27
|
+
return {
|
|
28
|
+
...base, // harmonic fields + permissions carried unchanged — evolve can't touch them
|
|
29
|
+
identity: changes.identity ?? base.identity,
|
|
30
|
+
method: changes.method ?? base.method,
|
|
31
|
+
constraints: changes.constraints ?? base.constraints,
|
|
32
|
+
version: base.version + 1,
|
|
33
|
+
parent_version: base.version,
|
|
34
|
+
status: "draft",
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function proposeAgentChange(base, next) {
|
|
38
|
+
if (!eq(base.permissions, next.permissions)) {
|
|
39
|
+
return { space: "permissions", approval_required: true };
|
|
40
|
+
}
|
|
41
|
+
for (const f of HARMONIC_FIELDS) {
|
|
42
|
+
if (!eq(base[f], next[f])) {
|
|
43
|
+
return {
|
|
44
|
+
space: "harmonic",
|
|
45
|
+
approval_required: false,
|
|
46
|
+
type_check_passed: true,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
for (const f of CREATIVE_FIELDS) {
|
|
51
|
+
if (!eq(base[f], next[f])) {
|
|
52
|
+
return { space: "creative", approval_required: false };
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return { space: "creative", approval_required: false };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=agent_profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent_profile.js","sourceRoot":"","sources":["../../src/agent_profile.ts"],"names":[],"mappings":"AAqCA,MAAM,eAAe,GAAoC;IACvD,UAAU;IACV,QAAQ;IACR,aAAa;CACd,CAAC;AAEF,MAAM,eAAe,GAAoC;IACvD,YAAY;IACZ,aAAa;IACb,cAAc;IACd,QAAQ;IACR,eAAe;CAChB,CAAC;AAQF,SAAS,EAAE,CAAC,CAAU,EAAE,CAA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AI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC;QACzD,CAAC;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AgentInvoker } from "./runtime.js";
|
|
2
|
+
import type { Registry } from "./registry.js";
|
|
3
|
+
import type { ModelTier } from "./pricing.js";
|
|
4
|
+
export declare const DEFAULT_BIFROST_TIMEOUT_MS = 60000;
|
|
5
|
+
export interface BifrostInvokerOptions {
|
|
6
|
+
/** Bifrost base URL, e.g. https://bifrost.example — /v1/generate is appended. */
|
|
7
|
+
url: string;
|
|
8
|
+
/** The deployment's device token (rides in the request body, Bifrost-style). */
|
|
9
|
+
deviceToken: string;
|
|
10
|
+
/** Resolves each output type's JSON schema into the prompt (same as Claude invoker). */
|
|
11
|
+
registry?: Registry | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* ModelTier → Bifrost tier-string mapping. Bifrost tier names are
|
|
14
|
+
* deployment-defined passthroughs (context.override_tier), so no names are
|
|
15
|
+
* hardcoded here. An unmapped tier omits override_tier — Bifrost's own
|
|
16
|
+
* default (economy-class) routing applies.
|
|
17
|
+
*/
|
|
18
|
+
tierMap?: Partial<Record<ModelTier, string>> | undefined;
|
|
19
|
+
/** Per-invocation token budget sent to Bifrost. Default 700 (Bifrost's own default). */
|
|
20
|
+
maxTokens?: number | undefined;
|
|
21
|
+
timeoutMs?: number | undefined;
|
|
22
|
+
/** Injectable transport (tests). Default: global fetch. */
|
|
23
|
+
fetchFn?: typeof fetch | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Build an AgentInvoker backed by Bifrost /v1/generate. Wire shape mirrors the
|
|
27
|
+
* canonical client: body {query, messages, budget:{tokens,usd,ms}, context:
|
|
28
|
+
* {intent, target_seam, override_tier}, device_token} → {kind, body, cost}.
|
|
29
|
+
* Bifrost's `cost` is surfaced through ctx.onEvent as a `result` event shaped
|
|
30
|
+
* like the CLI's stream-json result, so runGig's usage accounting (#195) folds
|
|
31
|
+
* Bifrost spend into GigResult.usage with no runtime changes.
|
|
32
|
+
*/
|
|
33
|
+
export declare function makeBifrostInvoker(opts: BifrostInvokerOptions): AgentInvoker;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { buildPrompt, extractJson, extractOptionsForChair } from "./claude_invoker.js";
|
|
2
|
+
// One model invocation's wall-clock bound. Far below the Claude invoker's 10min
|
|
3
|
+
// chair bound: this path is a single completion, not a tool-using child.
|
|
4
|
+
export const DEFAULT_BIFROST_TIMEOUT_MS = 60_000;
|
|
5
|
+
/**
|
|
6
|
+
* Build an AgentInvoker backed by Bifrost /v1/generate. Wire shape mirrors the
|
|
7
|
+
* canonical client: body {query, messages, budget:{tokens,usd,ms}, context:
|
|
8
|
+
* {intent, target_seam, override_tier}, device_token} → {kind, body, cost}.
|
|
9
|
+
* Bifrost's `cost` is surfaced through ctx.onEvent as a `result` event shaped
|
|
10
|
+
* like the CLI's stream-json result, so runGig's usage accounting (#195) folds
|
|
11
|
+
* Bifrost spend into GigResult.usage with no runtime changes.
|
|
12
|
+
*/
|
|
13
|
+
export function makeBifrostInvoker(opts) {
|
|
14
|
+
const doFetch = opts.fetchFn ?? fetch;
|
|
15
|
+
const timeoutMs = opts.timeoutMs ?? DEFAULT_BIFROST_TIMEOUT_MS;
|
|
16
|
+
const maxTokens = opts.maxTokens ?? 700;
|
|
17
|
+
const endpoint = `${opts.url.replace(/\/$/, "")}/v1/generate`;
|
|
18
|
+
return async (ctx) => {
|
|
19
|
+
// Same schema-into-prompt resolution as the Claude invoker (#174 subset rules).
|
|
20
|
+
const types = opts.registry?.listTypes() ?? [];
|
|
21
|
+
const schemaOf = (slug) => types.find((t) => t.slug === slug)?.schema;
|
|
22
|
+
const sealTypes = ctx.output_types?.length ? ctx.output_types : ctx.agent.output_types;
|
|
23
|
+
const schema = schemaOf(sealTypes[0]);
|
|
24
|
+
const outputSchemas = sealTypes.length > 1
|
|
25
|
+
? Object.fromEntries(sealTypes.map((t) => [t, schemaOf(t)]))
|
|
26
|
+
: undefined;
|
|
27
|
+
const prompt = buildPrompt(ctx, schema, outputSchemas);
|
|
28
|
+
const overrideTier = ctx.agent.model_tier ? opts.tierMap?.[ctx.agent.model_tier] : undefined;
|
|
29
|
+
const query = `coltrane chair "${ctx.agent.slug}" (${ctx.phase})`;
|
|
30
|
+
const body = {
|
|
31
|
+
query,
|
|
32
|
+
messages: [{ role: "user", content: prompt }],
|
|
33
|
+
budget: { tokens: maxTokens, usd: 0.05, ms: timeoutMs },
|
|
34
|
+
// context.query is REQUIRED by /v1/generate (422 without it), mirroring the
|
|
35
|
+
// canonical client, which repeats the top-level query inside context.
|
|
36
|
+
context: {
|
|
37
|
+
query,
|
|
38
|
+
intent: "coltrane",
|
|
39
|
+
target_seam: "generate",
|
|
40
|
+
...(overrideTier ? { override_tier: overrideTier } : {}),
|
|
41
|
+
},
|
|
42
|
+
device_token: opts.deviceToken,
|
|
43
|
+
};
|
|
44
|
+
const controller = new AbortController();
|
|
45
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
46
|
+
let reply;
|
|
47
|
+
try {
|
|
48
|
+
const res = await doFetch(endpoint, {
|
|
49
|
+
method: "POST",
|
|
50
|
+
headers: { "content-type": "application/json" },
|
|
51
|
+
body: JSON.stringify(body),
|
|
52
|
+
signal: controller.signal,
|
|
53
|
+
});
|
|
54
|
+
if (!res.ok) {
|
|
55
|
+
const text = await res.text().catch(() => "");
|
|
56
|
+
throw new Error(`bifrost /v1/generate ${res.status}: ${text.slice(0, 300)}`);
|
|
57
|
+
}
|
|
58
|
+
reply = (await res.json());
|
|
59
|
+
}
|
|
60
|
+
finally {
|
|
61
|
+
clearTimeout(timer);
|
|
62
|
+
}
|
|
63
|
+
// Surface Bifrost spend through the same event shape as the CLI's stream-json
|
|
64
|
+
// `result`, so the runtime's usage accounting folds it in untouched. Bifrost
|
|
65
|
+
// cost shapes vary by deployment ({usd} | number | absent) — normalize to usd.
|
|
66
|
+
//
|
|
67
|
+
// #235 — this used to emit `usage: { input_tokens: 0, output_tokens: 0 }` unconditionally
|
|
68
|
+
// and default an absent cost to 0. Both are fabrications: /v1/generate reports no token
|
|
69
|
+
// counts at all, and a reply with no cost means "not reported", not "free". Folded as fact
|
|
70
|
+
// they turned the one number in this system that is supposed to be settled truth into a
|
|
71
|
+
// confident zero. Report only what Bifrost actually said; an empty result event is read by
|
|
72
|
+
// the runtime as an UNATTRIBUTED invocation, which is exactly what it is.
|
|
73
|
+
const cost = reply.cost;
|
|
74
|
+
const usd = typeof cost === "number" ? cost
|
|
75
|
+
: cost && typeof cost === "object" && typeof cost["usd"] === "number" ? cost["usd"]
|
|
76
|
+
: undefined;
|
|
77
|
+
ctx.onEvent?.({ type: "result", raw: { ...(usd !== undefined ? { total_cost_usd: usd } : {}) } });
|
|
78
|
+
const text = typeof reply.body === "string" ? reply.body : JSON.stringify(reply.body ?? "");
|
|
79
|
+
// #221 policy 5 — same key signal as the Claude invoker. The schema is already resolved
|
|
80
|
+
// above; without this the Bifrost port would share the fixed extractor's behaviour but
|
|
81
|
+
// none of its disambiguation.
|
|
82
|
+
return extractJson(text, extractOptionsForChair(sealTypes, schema));
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=bifrost_invoker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bifrost_invoker.js","sourceRoot":"","sources":["../../src/bifrost_invoker.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAEvF,gFAAgF;AAChF,yEAAyE;AACzE,MAAM,CAAC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AE,CAAC,CAAC;QAC5F,wFAAwF;QACxF,uFAAuF;QACvF,8BAA8B;QAC9B,OAAO,WAAW,CAAC,IAAI,EAAE,sBAAsB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACtE,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export const CANONICAL_CORE_TYPES = [
|
|
2
|
+
{
|
|
3
|
+
slug: "Signal",
|
|
4
|
+
primitive: "SENSE",
|
|
5
|
+
description: "Raw acquired data from a source",
|
|
6
|
+
schema: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
id: { type: "string" },
|
|
10
|
+
source: { type: "string", minLength: 1 },
|
|
11
|
+
data: { type: "object" },
|
|
12
|
+
completeness: { type: "number" },
|
|
13
|
+
acquisition_cost: { type: "number" },
|
|
14
|
+
},
|
|
15
|
+
required: ["id", "source", "data", "completeness", "acquisition_cost"],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
slug: "Interpretation",
|
|
20
|
+
primitive: "INTERPRET",
|
|
21
|
+
description: "Meaning extracted from signals",
|
|
22
|
+
schema: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {
|
|
25
|
+
id: { type: "string" },
|
|
26
|
+
input_refs: { type: "array", items: { type: "string" } },
|
|
27
|
+
frame: { type: "string" },
|
|
28
|
+
claims: { type: "array", minItems: 1 },
|
|
29
|
+
confidence: { type: "number" },
|
|
30
|
+
},
|
|
31
|
+
required: ["id", "input_refs", "frame", "claims", "confidence"],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
slug: "Judgment",
|
|
36
|
+
primitive: "JUDGE",
|
|
37
|
+
description: "Evaluation against criteria",
|
|
38
|
+
schema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
id: { type: "string" },
|
|
42
|
+
input_refs: { type: "array", items: { type: "string" } },
|
|
43
|
+
criteria: { type: "array", minItems: 1 },
|
|
44
|
+
verdicts: { type: "array" },
|
|
45
|
+
reasoning_chain: { type: "array" },
|
|
46
|
+
},
|
|
47
|
+
required: ["id", "input_refs", "criteria", "verdicts", "reasoning_chain"],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
slug: "Plan",
|
|
52
|
+
primitive: "PLAN",
|
|
53
|
+
description: "Sequenced actions with dependencies",
|
|
54
|
+
schema: {
|
|
55
|
+
type: "object",
|
|
56
|
+
properties: {
|
|
57
|
+
id: { type: "string" },
|
|
58
|
+
input_refs: { type: "array", items: { type: "string" } },
|
|
59
|
+
objective: { type: "string" },
|
|
60
|
+
steps: { type: "array", minItems: 1 },
|
|
61
|
+
budget: { type: "number" },
|
|
62
|
+
},
|
|
63
|
+
required: ["id", "input_refs", "objective", "steps", "budget"],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
slug: "Artifact",
|
|
68
|
+
primitive: "CREATE",
|
|
69
|
+
description: "Novel created thing",
|
|
70
|
+
schema: {
|
|
71
|
+
type: "object",
|
|
72
|
+
properties: {
|
|
73
|
+
id: { type: "string" },
|
|
74
|
+
input_refs: { type: "array", items: { type: "string" } },
|
|
75
|
+
artifact_type: { type: "string" },
|
|
76
|
+
format: { type: "string" },
|
|
77
|
+
content: {},
|
|
78
|
+
validation_criteria: { type: "array", minItems: 1 },
|
|
79
|
+
},
|
|
80
|
+
required: ["id", "input_refs", "artifact_type", "format", "content", "validation_criteria"],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
slug: "Verdict",
|
|
85
|
+
primitive: "VERIFY",
|
|
86
|
+
description: "Pass/fail with evidence",
|
|
87
|
+
schema: {
|
|
88
|
+
type: "object",
|
|
89
|
+
properties: {
|
|
90
|
+
id: { type: "string" },
|
|
91
|
+
target_ref: { type: "string" },
|
|
92
|
+
pass: { type: "boolean" },
|
|
93
|
+
checks: {
|
|
94
|
+
type: "array",
|
|
95
|
+
minItems: 1,
|
|
96
|
+
items: {
|
|
97
|
+
type: "object",
|
|
98
|
+
properties: {
|
|
99
|
+
method: { type: "string" },
|
|
100
|
+
target_ref: { type: "string" },
|
|
101
|
+
result: { type: "string" },
|
|
102
|
+
},
|
|
103
|
+
required: ["method"],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
required: ["id", "target_ref", "pass", "checks"],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
//# sourceMappingURL=canonical_core_types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical_core_types.js","sourceRoot":"","sources":["../../src/canonical_core_types.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,oBAAoB,GAA8B;IAC7D;QACE,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,OAAO;QAClB,WAAW,EAAE,iCAAiC;QAC9C,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACtB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;gBACxC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACxB,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAChC,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACrC;YACD,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,kBAAkB,CAAC;SACvE;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,WAAW;QACtB,WAAW,EAAE,gCAAgC;QAC7C,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACtB,U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