@kontourai/flow-agents 3.1.0 → 3.3.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/.github/workflows/ci.yml +16 -0
- package/CHANGELOG.md +30 -0
- package/build/src/cli/assignment-provider.d.ts +45 -0
- package/build/src/cli/assignment-provider.js +107 -13
- package/build/src/cli/workflow-artifact-cleanup-audit.js +418 -11
- package/build/src/cli/workflow-sidecar.d.ts +238 -4
- package/build/src/cli/workflow-sidecar.js +875 -14
- package/build/src/tools/validate-source-tree.js +3 -2
- package/context/contracts/artifact-contract.md +16 -2
- package/context/contracts/assignment-provider-contract.md +1 -1
- package/context/contracts/execution-contract.md +78 -0
- package/context/scripts/hooks/config-protection.js +11 -4
- package/context/scripts/hooks/stop-goal-fit.js +259 -4
- package/context/scripts/hooks/workflow-steering.js +73 -1
- package/docs/adr/0022-fail-closed-delivery-reconciliation-with-governed-exemptions.md +111 -0
- package/docs/coordination-guide.md +370 -0
- package/docs/decisions/agent-coordination.md +26 -9
- package/docs/decisions/index.md +2 -2
- package/docs/decisions/trust-reconcile.md +42 -9
- package/docs/fixture-ownership.md +3 -2
- package/docs/index.md +4 -0
- package/docs/integrations/flow-agents-console.md +108 -0
- package/docs/integrations/index.md +4 -0
- package/docs/workflow-artifact-lifecycle.md +38 -1
- package/evals/ci/antigaming-suite.sh +1 -0
- package/evals/ci/run-baseline.sh +8 -0
- package/evals/fixtures/reconcile-preflight/disputed-critique-unsuperseded.json +48 -0
- package/evals/fixtures/reconcile-preflight/standalone-disputed-session-local.json +59 -0
- package/evals/integration/test_checkpoint_signing.sh +14 -5
- package/evals/integration/test_ci_actor_identity.sh +221 -0
- package/evals/integration/test_fixture_retirement_audit.sh +2 -2
- package/evals/integration/test_gate_lockdown.sh +36 -0
- package/evals/integration/test_model_routing_escalation.sh +145 -0
- package/evals/integration/test_publish_delivery.sh +73 -8
- package/evals/integration/test_reconcile_preflight.sh +304 -0
- package/evals/integration/test_stop_hook_release.sh +552 -0
- package/evals/integration/test_takeover_protocol.sh +340 -0
- package/evals/integration/test_trust_reconcile_negatives.sh +261 -0
- package/evals/integration/test_verify_hold.sh +910 -0
- package/evals/integration/test_veritas_governance_kit.sh +257 -0
- package/evals/integration/test_workflow_artifact_cleanup_audit.sh +575 -3
- package/evals/run.sh +14 -0
- package/evals/static/test_model_routing_hints.sh +107 -0
- package/kits/builder/skills/builder-shape/SKILL.md +10 -0
- package/kits/builder/skills/continue-work/SKILL.md +2 -0
- package/kits/builder/skills/deliver/SKILL.md +125 -11
- package/kits/builder/skills/design-probe/SKILL.md +10 -0
- package/kits/builder/skills/execute-plan/SKILL.md +13 -0
- package/kits/builder/skills/fix-bug/SKILL.md +17 -0
- package/kits/builder/skills/idea-to-backlog/SKILL.md +10 -0
- package/kits/builder/skills/plan-work/SKILL.md +9 -0
- package/kits/builder/skills/pull-work/SKILL.md +22 -2
- package/kits/builder/skills/review-work/SKILL.md +11 -0
- package/kits/builder/skills/tdd-workflow/SKILL.md +17 -0
- package/kits/builder/skills/verify-work/SKILL.md +11 -0
- package/kits/knowledge/adapters/default-store/index.js +56 -15
- package/kits/knowledge/adapters/flow-runner/index.js +912 -16
- package/kits/knowledge/adapters/obsidian-store/index.js +29 -11
- package/kits/knowledge/adapters/shared/codec.js +124 -0
- package/kits/knowledge/docs/store-contract.md +405 -3
- package/kits/knowledge/evals/audit-freshness/suite.test.js +92 -1
- package/kits/knowledge/evals/consolidate-incremental/suite.test.js +494 -0
- package/kits/knowledge/evals/consolidation/suite.test.js +1 -1
- package/kits/knowledge/evals/contract-suite/suite.test.js +36 -0
- package/kits/knowledge/evals/freshness/suite.test.js +339 -0
- package/kits/knowledge/evals/inbound-references/suite.test.js +351 -0
- package/kits/knowledge/evals/retirement/suite.test.js +1 -1
- package/kits/knowledge/evals/supersede-propagation/suite.test.js +384 -0
- package/kits/veritas-governance/docs/README.md +81 -3
- package/kits/veritas-governance/fixtures/exemption/approved.trust-bundle.json +74 -0
- package/kits/veritas-governance/fixtures/exemption/not-approved.trust-bundle.json +74 -0
- package/kits/veritas-governance/flows/exemption-issuance.flow.json +35 -0
- package/kits/veritas-governance/kit.json +5 -0
- package/package.json +1 -1
- package/schemas/workflow-handoff.schema.json +6 -0
- package/scripts/ci/mint-attestation.js +33 -6
- package/scripts/ci/trust-reconcile.js +222 -279
- package/scripts/hooks/config-protection.js +11 -4
- package/scripts/hooks/lib/actor-identity.js +82 -0
- package/scripts/hooks/stop-goal-fit.js +259 -4
- package/scripts/hooks/workflow-steering.js +73 -1
- package/scripts/lib/reconcile-shape.js +381 -0
- package/src/cli/assignment-provider.ts +122 -13
- package/src/cli/workflow-artifact-cleanup-audit.ts +483 -10
- package/src/cli/workflow-sidecar.ts +965 -14
- package/src/tools/validate-source-tree.ts +3 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "veritas-governance.exemption-issuance",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"steps": [
|
|
5
|
+
{ "id": "request", "next": "issue" },
|
|
6
|
+
{ "id": "issue", "next": null }
|
|
7
|
+
],
|
|
8
|
+
"gates": {
|
|
9
|
+
"human-approval-gate": {
|
|
10
|
+
"step": "issue",
|
|
11
|
+
"expects": [
|
|
12
|
+
{
|
|
13
|
+
"id": "exemption-approval",
|
|
14
|
+
"kind": "trust.bundle",
|
|
15
|
+
"required": true,
|
|
16
|
+
"description": "A human maintainer has approved this delivery-scope exemption from Trust Reconcile's bundle-required enforcement (ADR 0022 §1/§2), recorded as a verified no-agent-delivery-exemption-approval trust.bundle claim.",
|
|
17
|
+
"explore_hint": "A human approver authors a Hachure trust.bundle carrying a no-agent-delivery-exemption-approval / delivery-scope claim with status verified, then `flow attach-evidence <run> --gate human-approval-gate --file <bundle> --bundle`.",
|
|
18
|
+
"bundle_claim": {
|
|
19
|
+
"claimType": "no-agent-delivery-exemption-approval",
|
|
20
|
+
"subjectType": "delivery-scope",
|
|
21
|
+
"accepted_statuses": ["verified"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"on_route_back": {
|
|
26
|
+
"missing_evidence": "issue",
|
|
27
|
+
"default": "issue"
|
|
28
|
+
},
|
|
29
|
+
"route_back_policy": {
|
|
30
|
+
"max_attempts": 3,
|
|
31
|
+
"on_exceeded": "block"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
"id": "veritas-governance.readiness-check",
|
|
9
9
|
"path": "flows/readiness-check.flow.json",
|
|
10
10
|
"description": "Single-gate agentless flow: requires a verified software-readiness-verdict trust.bundle claim (projected from `veritas readiness --check evidence --working-tree`) before the gate-check step can pass. CI-callable, K0."
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "veritas-governance.exemption-issuance",
|
|
14
|
+
"path": "flows/exemption-issuance.flow.json",
|
|
15
|
+
"description": "Agentless K0 flow issuing a delivery/DECLARED no-agent-delivery exemption (ADR 0022 §2/§3): step request -> gate human-approval-gate (requires a verified no-agent-delivery-exemption-approval trust.bundle claim, satisfiable only by a human-authored approval bundle by convention -- see docs/README.md) -> step issue, which appends the approved entry to delivery/DECLARED. CI-callable."
|
|
11
16
|
}
|
|
12
17
|
],
|
|
13
18
|
"docs": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kontourai/flow-agents",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Flow Agents — a Kontour product that applies Flow and Veritas discipline as a portable process layer inside the agent tools you already use: Claude Code, Codex, Kiro, opencode, pi, and GitHub Actions — with framework adapters (AWS Strands preview) on the same policy-engine contract.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -104,23 +104,50 @@ function loadCiResults(repoRoot) {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Discover the delivery trust.bundle across the flat and per-session (#379) layouts.
|
|
109
|
+
* Prefers the flat `delivery/trust.bundle` (back-compat), then `delivery/<slug>/trust.bundle`
|
|
110
|
+
* for each immediate subdirectory (sorted). Returns the first existing path, or null.
|
|
111
|
+
* This mirrors scripts/ci/trust-reconcile.js resolveDeliveryCandidates() precedence so the
|
|
112
|
+
* attestation subject binds to the same bundle the reconciler read. best-effort — a missing
|
|
113
|
+
* or unreadable delivery/ yields null.
|
|
114
|
+
*/
|
|
115
|
+
function discoverDeliveryBundle(repoRoot) {
|
|
116
|
+
const deliveryRoot = path.join(repoRoot, 'delivery');
|
|
117
|
+
const flat = path.join(deliveryRoot, 'trust.bundle');
|
|
118
|
+
if (fs.existsSync(flat)) return flat;
|
|
119
|
+
let entries = [];
|
|
120
|
+
try {
|
|
121
|
+
entries = fs.readdirSync(deliveryRoot, { withFileTypes: true });
|
|
122
|
+
} catch {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
const subdirs = entries.filter((e) => e.isDirectory()).map((e) => e.name).sort();
|
|
126
|
+
for (const name of subdirs) {
|
|
127
|
+
const candidate = path.join(deliveryRoot, name, 'trust.bundle');
|
|
128
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
129
|
+
}
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
|
|
107
133
|
/**
|
|
108
134
|
* Determine the subject artifact for the in-toto statement.
|
|
109
135
|
*
|
|
110
|
-
* If delivery
|
|
111
|
-
* Otherwise synthesize a results artifact from the predicate
|
|
136
|
+
* If a delivery trust.bundle is present (flat or per-session, #379), use it as the subject
|
|
137
|
+
* (sha256 of its bytes). Otherwise synthesize a results artifact from the predicate.
|
|
112
138
|
*
|
|
113
139
|
* @param {object} predicate — the predicate that will appear in the statement
|
|
114
140
|
* @param {string} repoRoot
|
|
115
141
|
* @returns {{ subjectName: string, subjectDigest: string, fromBundle: boolean }}
|
|
116
142
|
*/
|
|
117
143
|
function resolveSubject(predicate, repoRoot) {
|
|
118
|
-
const bundlePath =
|
|
119
|
-
if (
|
|
144
|
+
const bundlePath = discoverDeliveryBundle(repoRoot);
|
|
145
|
+
if (bundlePath) {
|
|
120
146
|
const bundleBytes = fs.readFileSync(bundlePath);
|
|
121
147
|
const digest = sha256hex(bundleBytes);
|
|
122
|
-
|
|
123
|
-
|
|
148
|
+
const rel = path.relative(repoRoot, bundlePath);
|
|
149
|
+
process.stdout.write(`[mint-attestation] subject: ${rel} sha256=${digest.slice(0, 16)}...\n`);
|
|
150
|
+
return { subjectName: rel, subjectDigest: digest, fromBundle: true };
|
|
124
151
|
}
|
|
125
152
|
|
|
126
153
|
// No bundle present: synthesize subject from predicate JSON (self-attesting the results).
|