intentdna 1.7.5 → 1.8.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/LICENSE +201 -0
- package/README.md +143 -194
- package/dist/assets/candidates.d.ts +124 -0
- package/dist/assets/candidates.js +1249 -0
- package/dist/assets/catalog.d.ts +101 -0
- package/dist/assets/catalog.js +311 -0
- package/dist/assets/evidence.d.ts +93 -0
- package/dist/assets/evidence.js +391 -0
- package/dist/assets/index.d.ts +4 -0
- package/dist/assets/index.js +4 -0
- package/dist/assets/metadata.d.ts +19 -0
- package/dist/assets/metadata.js +227 -0
- package/dist/cli/commands/assets.d.ts +65 -0
- package/dist/cli/commands/assets.js +2871 -0
- package/dist/cli/commands/auth.d.ts +322 -0
- package/dist/cli/commands/auth.js +1592 -0
- package/dist/cli/commands/cloud-auth-guidance.d.ts +2 -0
- package/dist/cli/commands/cloud-auth-guidance.js +4 -0
- package/dist/cli/commands/cloud.d.ts +1359 -0
- package/dist/cli/commands/cloud.js +8364 -0
- package/dist/cli/commands/evolve.js +18 -2
- package/dist/cli/commands/generate.js +25 -2
- package/dist/cli/commands/guard.d.ts +1 -1
- package/dist/cli/commands/guard.js +1 -1
- package/dist/cli/commands/guide.d.ts +15 -0
- package/dist/cli/commands/guide.js +1747 -0
- package/dist/cli/commands/init.d.ts +12 -0
- package/dist/cli/commands/init.js +95 -60
- package/dist/cli/commands/org.d.ts +16 -0
- package/dist/cli/commands/org.js +2393 -0
- package/dist/cli/commands/release.d.ts +59 -0
- package/dist/cli/commands/release.js +716 -0
- package/dist/cli/commands/report.d.ts +82 -0
- package/dist/cli/commands/report.js +1516 -0
- package/dist/cli/commands/run.d.ts +8 -1
- package/dist/cli/commands/run.js +129 -57
- package/dist/cli/commands/sync.d.ts +8 -1
- package/dist/cli/commands/sync.js +436 -141
- package/dist/cli/commands/templates.d.ts +64 -0
- package/dist/cli/commands/templates.js +2151 -1
- package/dist/cli/commands/workflow.d.ts +26 -0
- package/dist/cli/commands/workflow.js +3053 -0
- package/dist/cli/index.js +703 -36
- package/dist/compiler/cascade.js +4 -9
- package/dist/compiler/compile.js +1 -0
- package/dist/governance/evidence-capture-attribution.d.ts +12 -0
- package/dist/governance/evidence-capture-attribution.js +46 -0
- package/dist/governance/index.d.ts +2 -0
- package/dist/governance/index.js +1 -0
- package/dist/hooks/cli.d.ts +9 -0
- package/dist/hooks/cli.js +170 -411
- package/dist/hooks/enforce.d.ts +1 -0
- package/dist/hooks/protocol.d.ts +1 -1
- package/dist/hooks/protocol.js +1 -1
- package/dist/hooks/state.d.ts +41 -0
- package/dist/hooks/state.js +126 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/mcp/tools-state.js +2 -0
- package/dist/organization/index.d.ts +121 -0
- package/dist/organization/index.js +413 -0
- package/dist/runtime/claude-sync-target.d.ts +49 -0
- package/dist/runtime/claude-sync-target.js +280 -0
- package/dist/runtime/codex-adapter.d.ts +254 -0
- package/dist/runtime/codex-adapter.js +1204 -0
- package/dist/runtime/codex-sync-target.d.ts +33 -0
- package/dist/runtime/codex-sync-target.js +241 -0
- package/dist/runtime/index.d.ts +8 -0
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/output-artifact-registry.d.ts +1 -1
- package/dist/runtime/output-artifact-registry.js +2 -0
- package/dist/runtime/settings-adapter.d.ts +1 -1
- package/dist/runtime/settings-adapter.js +1 -1
- package/dist/runtime/skill-adapter.d.ts +5 -1
- package/dist/runtime/skill-adapter.js +164 -39
- package/dist/runtime/sync-artifact-registry.d.ts +99 -0
- package/dist/runtime/sync-artifact-registry.js +194 -0
- package/dist/runtime/sync-target-plan.d.ts +45 -0
- package/dist/runtime/sync-target-plan.js +19 -0
- package/dist/runtime/verifier.d.ts +51 -0
- package/dist/runtime/verifier.js +462 -0
- package/dist/schema/controller-registry.d.ts +8 -1
- package/dist/schema/controller-registry.js +8 -0
- package/dist/schema/types.d.ts +35 -23
- package/dist/schema/types.js +10 -1
- package/dist/schema/validate.js +22 -22
- package/dist/schema/validators/controllers.js +38 -20
- package/dist/schema/workflow-authoring-contract.d.ts +29 -0
- package/dist/schema/workflow-authoring-contract.js +109 -0
- package/dist/schema/yaml-parser.js +18 -0
- package/dist/templates/api-backend.dna.yaml +19 -0
- package/dist/templates/brainstorming-first.dna.yaml +19 -0
- package/dist/templates/code-cleanup.dna.yaml +19 -0
- package/dist/templates/code-review-pipeline.dna.yaml +18 -0
- package/dist/templates/documentation-writer.dna.yaml +19 -0
- package/dist/templates/flutter-behavior-lock.dna.yaml +19 -0
- package/dist/templates/flutter-refactoring-rescue.dna.yaml +19 -0
- package/dist/templates/flutter-rewrite-diagnosis-review.dna.yaml +210 -0
- package/dist/templates/flutter-rewrite-fix-review-loop.dna.yaml +260 -0
- package/dist/templates/flutter-rewrite-new.dna.yaml +506 -0
- package/dist/templates/flutter-rewrite.dna.yaml +100 -4
- package/dist/templates/frontend-quality.dna.yaml +19 -0
- package/dist/templates/full-pipeline.dna.yaml +20 -0
- package/dist/templates/marketplace.d.ts +92 -0
- package/dist/templates/marketplace.js +502 -0
- package/dist/templates/metadata.d.ts +25 -0
- package/dist/templates/metadata.js +136 -3
- package/dist/templates/mobile-dev.dna.yaml +19 -0
- package/dist/templates/multi-agent-handoff-coordination.dna.yaml +156 -0
- package/dist/templates/multi-perspective-review.dna.yaml +19 -0
- package/dist/templates/persistent-executor.dna.yaml +19 -0
- package/dist/templates/qa-loop.dna.yaml +18 -0
- package/dist/templates/release-evidence-gate.dna.yaml +131 -0
- package/dist/templates/requirements-gate.dna.yaml +19 -0
- package/dist/templates/research-orchestration.dna.yaml +19 -0
- package/dist/templates/root-cause-analysis.dna.yaml +19 -0
- package/dist/templates/safe-refactoring.dna.yaml +321 -0
- package/dist/templates/secure-dev.dna.yaml +19 -0
- package/dist/templates/subagent-parallel.dna.yaml +19 -0
- package/dist/templates/systematic-debugging.dna.yaml +19 -0
- package/dist/templates/tdd-strict.dna.yaml +19 -0
- package/dist/templates/ui-visual-regression-qa.dna.yaml +133 -0
- package/dist/templates/workflow-author.dna.yaml +302 -0
- package/dist/templates/workflow-blocked-scope-triage.dna.yaml +242 -0
- package/dist/templates/workflow-completion-audit.dna.yaml +254 -0
- package/dist/templates/workflow-cross-boundary-resource-approval.dna.yaml +249 -0
- package/dist/templates/workflow-evidence-review.dna.yaml +198 -0
- package/dist/templates/workflow-module-inventory.dna.yaml +257 -0
- package/dist/templates/workflow-runtime-smoke-review.dna.yaml +252 -0
- package/dist/templates/workflow-verification-command-routing.dna.yaml +278 -0
- package/dist/workflow/authoring-packet.d.ts +67 -0
- package/dist/workflow/authoring-packet.js +218 -0
- package/dist/workflow/draft.d.ts +159 -0
- package/dist/workflow/draft.js +800 -0
- package/dist/workflow/index.d.ts +3 -0
- package/dist/workflow/index.js +3 -0
- package/dist/workflow/suggestion-review.d.ts +65 -0
- package/dist/workflow/suggestion-review.js +245 -0
- package/package.json +1 -1
- package/spec/README.md +15 -48
- package/spec/codex-adapter-contract.md +176 -0
- package/spec/sync-target-plan.md +158 -0
- package/spec/workflow-capability-ir.md +153 -0
- package/spec/agent-dispatch-fix.md +0 -116
- package/spec/control-plane-convergence-handoff-2026-04-24.md +0 -432
- package/spec/flutter-rewrite-template-optimization.md +0 -301
- package/spec/foundation-hardening.md +0 -178
- package/spec/hooks-infra-harness-hardening.md +0 -741
- package/spec/multi-config.md +0 -172
- package/spec/parallel-isolation.md +0 -268
- package/spec/template-version-namespace-fix.md +0 -653
- package/spec/workflow-pipeline.md +0 -101
package/dist/compiler/cascade.js
CHANGED
|
@@ -109,15 +109,10 @@ function prefixRecordKeys(record, ns) {
|
|
|
109
109
|
function prefixController(controller, ns) {
|
|
110
110
|
return {
|
|
111
111
|
...controller,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
analysis_reviewer: `${ns}_${controller.roles.analysis_reviewer}`,
|
|
117
|
-
surgeon: `${ns}_${controller.roles.surgeon}`,
|
|
118
|
-
fix_reviewer: `${ns}_${controller.roles.fix_reviewer}`,
|
|
119
|
-
test_runner: `${ns}_${controller.roles.test_runner}`,
|
|
120
|
-
},
|
|
112
|
+
workflow: controller.workflow ? `${ns}_${controller.workflow}` : undefined,
|
|
113
|
+
diagnosis_workflow: controller.diagnosis_workflow ? `${ns}_${controller.diagnosis_workflow}` : undefined,
|
|
114
|
+
fix_workflow: controller.fix_workflow ? `${ns}_${controller.fix_workflow}` : undefined,
|
|
115
|
+
roles: Object.fromEntries(Object.entries(controller.roles).map(([roleKey, roleName]) => [roleKey, `${ns}_${roleName}`])),
|
|
121
116
|
};
|
|
122
117
|
}
|
|
123
118
|
function prefixLegibilityAssets(map, ns) {
|
package/dist/compiler/compile.js
CHANGED
|
@@ -384,6 +384,7 @@ export function compileDNA(activated, cascaded) {
|
|
|
384
384
|
workflowsIR.push({
|
|
385
385
|
workflow_name: wfKey,
|
|
386
386
|
namespace,
|
|
387
|
+
step_ids: (wf.steps ?? []).map((step) => step.id),
|
|
387
388
|
step_checkpoints: wfStepCheckpoints,
|
|
388
389
|
active_roles: activeRoles,
|
|
389
390
|
handoff_chain: handoffChain,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConstraintIR } from "../schema/types.js";
|
|
2
|
+
export interface EvidenceCaptureAttributionHint {
|
|
3
|
+
workflowAsset?: string;
|
|
4
|
+
workflowId?: string;
|
|
5
|
+
stepId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TrustedEvidenceCaptureAttribution {
|
|
8
|
+
workflowAsset: string;
|
|
9
|
+
workflowId: string;
|
|
10
|
+
stepId: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function trustedEvidenceCaptureAttribution(ir: ConstraintIR, hint: EvidenceCaptureAttributionHint): TrustedEvidenceCaptureAttribution;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const UNKNOWN_ATTRIBUTION = "unknown";
|
|
2
|
+
function canonicalWorkflowAsset(ir) {
|
|
3
|
+
const sourceIds = [...new Set(ir.source_dna_ids)]
|
|
4
|
+
.filter((sourceId) => sourceId.length > 0)
|
|
5
|
+
.filter((sourceId) => !sourceId.startsWith("species:"))
|
|
6
|
+
.filter((sourceId) => !sourceId.startsWith("enterprise:"));
|
|
7
|
+
return sourceIds.length === 1 ? sourceIds[0] : undefined;
|
|
8
|
+
}
|
|
9
|
+
function attributedWorkflow(ir, workflowId) {
|
|
10
|
+
if (workflowId) {
|
|
11
|
+
return ir.workflows_ir?.find((workflow) => workflow.workflow_name === workflowId);
|
|
12
|
+
}
|
|
13
|
+
return ir.workflows_ir?.length === 1 ? ir.workflows_ir[0] : undefined;
|
|
14
|
+
}
|
|
15
|
+
function workflowStepIds(ir, workflow) {
|
|
16
|
+
return new Set([
|
|
17
|
+
...(workflow.step_ids ?? []),
|
|
18
|
+
...workflow.step_checkpoints.map((checkpoint) => checkpoint.step_id),
|
|
19
|
+
...workflow.handoff_chain.map((handoff) => handoff.step_id),
|
|
20
|
+
...(workflow.step_enforce_rules ?? []).map((rule) => rule.step_id),
|
|
21
|
+
...(ir.verifier_specs ?? [])
|
|
22
|
+
.filter((spec) => spec.workflow_name === workflow.workflow_name)
|
|
23
|
+
.map((spec) => spec.step_id)
|
|
24
|
+
.filter((stepId) => typeof stepId === "string"),
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
export function trustedEvidenceCaptureAttribution(ir, hint) {
|
|
28
|
+
const workflow = attributedWorkflow(ir, hint.workflowId);
|
|
29
|
+
const invalidExplicitWorkflow = Boolean(hint.workflowId && !workflow);
|
|
30
|
+
if (invalidExplicitWorkflow) {
|
|
31
|
+
return {
|
|
32
|
+
workflowAsset: UNKNOWN_ATTRIBUTION,
|
|
33
|
+
workflowId: UNKNOWN_ATTRIBUTION,
|
|
34
|
+
stepId: UNKNOWN_ATTRIBUTION,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const canonicalAsset = canonicalWorkflowAsset(ir);
|
|
38
|
+
const workflowAsset = canonicalAsset
|
|
39
|
+
? hint.workflowAsset === canonicalAsset ? hint.workflowAsset : canonicalAsset
|
|
40
|
+
: UNKNOWN_ATTRIBUTION;
|
|
41
|
+
const workflowId = workflow?.workflow_name ?? UNKNOWN_ATTRIBUTION;
|
|
42
|
+
const stepId = workflow && hint.stepId && workflowStepIds(ir, workflow).has(hint.stepId)
|
|
43
|
+
? hint.stepId
|
|
44
|
+
: UNKNOWN_ATTRIBUTION;
|
|
45
|
+
return { workflowAsset, workflowId, stepId };
|
|
46
|
+
}
|
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type { AuditReport, RemoteDNAPolicy, PolicyContent, PolicyScope, PolicyUpdate, GovernanceConfig, GovernanceClient, GovernanceResponse, GovernanceSubscription, } from "./types.js";
|
|
7
7
|
export { CASCADE_LAYER_NAMES, RUNTIME_DECISION_EVENT_SCHEMA_VERSION, validateRuntimeDecisionEvent, } from "./runtime-decision-event.js";
|
|
8
|
+
export { trustedEvidenceCaptureAttribution } from "./evidence-capture-attribution.js";
|
|
9
|
+
export type { EvidenceCaptureAttributionHint, TrustedEvidenceCaptureAttribution, } from "./evidence-capture-attribution.js";
|
|
8
10
|
export type { CascadeDecisionTrace, CascadeLayerFingerprint, CascadeLayerName, CascadeLayers, EnforcementPoint, ExplicitPlaceholder, HarnessRuntimeContext, PolicyBundle, RuntimeDecision, RuntimeDecisionEvent, RuntimeDecisionEventValidationResult, RuntimeEvidenceRef, WinningConstraint, } from "./runtime-decision-event.js";
|
package/dist/governance/index.js
CHANGED
|
@@ -4,3 +4,4 @@
|
|
|
4
4
|
* Exports the v1.7.1 enterprise evidence contract plus reserved remote governance interfaces.
|
|
5
5
|
*/
|
|
6
6
|
export { CASCADE_LAYER_NAMES, RUNTIME_DECISION_EVENT_SCHEMA_VERSION, validateRuntimeDecisionEvent, } from "./runtime-decision-event.js";
|
|
7
|
+
export { trustedEvidenceCaptureAttribution } from "./evidence-capture-attribution.js";
|
package/dist/hooks/cli.d.ts
CHANGED
|
@@ -49,6 +49,9 @@ export interface RunHookEventOptions {
|
|
|
49
49
|
}
|
|
50
50
|
export declare function normalizeHookOutputForEvent(output: HookOutput, event: HookEvent): HookOutput;
|
|
51
51
|
export declare function runHookEvent(options: RunHookEventOptions): Promise<HookOutput>;
|
|
52
|
+
export declare function codexHookEventForInput(rawInput: Record<string, unknown>, args: string[]): unknown;
|
|
53
|
+
declare function inferWorkflowAssetFromIr(ir: ConstraintIR, workflowId?: string): string | undefined;
|
|
54
|
+
declare function runCodexHookWithLoadedIr(rawInput: Record<string, unknown>, projectDir: string, args: string[], ir: ConstraintIR): Promise<import("../runtime/codex-adapter.js").CodexHookRunnerResult>;
|
|
52
55
|
declare function recordProducedArtifacts(projectDir: string, ir: ConstraintIR, wfState: {
|
|
53
56
|
workflow: string;
|
|
54
57
|
current_step: string;
|
|
@@ -87,6 +90,8 @@ declare function finalizeAndResolveArtifactsForHook(projectDir: string, ir: Cons
|
|
|
87
90
|
export declare const recordProducedArtifactsForTest: typeof recordProducedArtifacts;
|
|
88
91
|
export declare const resolveWorkflowArtifactFactsForTest: typeof resolveWorkflowArtifactFacts;
|
|
89
92
|
export declare const readWorkflowStateForHookTest: typeof readWorkflowStateForHook;
|
|
93
|
+
export declare const runCodexHookWithLoadedIrForTest: typeof runCodexHookWithLoadedIr;
|
|
94
|
+
export declare const inferWorkflowAssetFromIrForTest: typeof inferWorkflowAssetFromIr;
|
|
90
95
|
export declare const resolveWorkflowArtifactFactsForHookTest: typeof resolveWorkflowArtifactFactsForHook;
|
|
91
96
|
export declare const finalizeAndResolveArtifactsForHookTest: typeof finalizeAndResolveArtifactsForHook;
|
|
92
97
|
export declare function appendStopVerifierWarnings(output: HookOutput, verifierResults: VerifierResultEntry[], currentStep?: string): HookOutput;
|
|
@@ -94,6 +99,8 @@ export declare function runVerifiersForTest(projectDir: string, ir: ConstraintIR
|
|
|
94
99
|
workflow: string;
|
|
95
100
|
current_step: string;
|
|
96
101
|
current_role: string;
|
|
102
|
+
inputs?: Record<string, string>;
|
|
103
|
+
resolved_variables?: Record<string, string>;
|
|
97
104
|
}, when: VerifierSpec["when"], sessionId?: string, options?: {
|
|
98
105
|
commandTimeoutMs?: number;
|
|
99
106
|
}): Promise<VerifierResultEntry[]>;
|
|
@@ -101,6 +108,8 @@ export declare function runStopVerifiersForTest(projectDir: string, ir: Constrai
|
|
|
101
108
|
workflow: string;
|
|
102
109
|
current_step: string;
|
|
103
110
|
current_role: string;
|
|
111
|
+
inputs?: Record<string, string>;
|
|
112
|
+
resolved_variables?: Record<string, string>;
|
|
104
113
|
}, sessionId?: string, options?: {
|
|
105
114
|
commandTimeoutMs?: number;
|
|
106
115
|
}): Promise<VerifierResultEntry[]>;
|