intentdna 1.7.4 → 1.8.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/.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 +6 -1
- package/dist/cli/commands/run.js +95 -26
- 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 +719 -42
- 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 +6 -0
- package/dist/hooks/cli.js +168 -12
- 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 +120 -34
- 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/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 +20 -0
- 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/hooks/state.js
CHANGED
|
@@ -13,6 +13,8 @@ import { readFile, writeFile, rename, mkdir, appendFile, unlink, readdir, stat }
|
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { join, dirname } from "node:path";
|
|
15
15
|
import { CASCADE_LAYER_NAMES, RUNTIME_DECISION_EVENT_SCHEMA_VERSION } from "../governance/index.js";
|
|
16
|
+
// ── Types ──────────────────────────────────────────────────
|
|
17
|
+
export const EVIDENCE_CAPTURE_SCHEMA_VERSION = "intentdna.evidence_capture.v1";
|
|
16
18
|
// ── Constants ──────────────────────────────────────────────
|
|
17
19
|
const WORKFLOW_FILE = "workflow.json";
|
|
18
20
|
const DEFAULT_STALENESS_MS = 2 * 60 * 60 * 1000; // 2 hours
|
|
@@ -408,6 +410,7 @@ export async function appendVerifierResult(projectDir, result, sessionId) {
|
|
|
408
410
|
}
|
|
409
411
|
const TRACE_DIR = "trace";
|
|
410
412
|
const RUNTIME_DECISION_DIR = "runtime-decisions";
|
|
413
|
+
const EVIDENCE_CAPTURE_DIR = join("evidence", "capture");
|
|
411
414
|
const MAX_TRACE_SIZE = 10 * 1024 * 1024; // 10MB
|
|
412
415
|
const TRACE_RETENTION_DAYS = 7;
|
|
413
416
|
/**
|
|
@@ -475,15 +478,135 @@ function datedJsonlFileName(prefix, date) {
|
|
|
475
478
|
function decisionFileName(date) {
|
|
476
479
|
return datedJsonlFileName("runtime-decision", date);
|
|
477
480
|
}
|
|
481
|
+
function evidenceCaptureFileName(date) {
|
|
482
|
+
return `${date}.jsonl`;
|
|
483
|
+
}
|
|
484
|
+
function privacyDigest(domain, value) {
|
|
485
|
+
const material = value && value.trim().length > 0 ? value : "unknown";
|
|
486
|
+
return createHash("sha256")
|
|
487
|
+
.update(`intentdna.privacy.${domain}\0${material}`)
|
|
488
|
+
.digest("hex");
|
|
489
|
+
}
|
|
490
|
+
const OPAQUE_REFERENCE = /^(?:(?:[a-z][a-z0-9:-]*:)?sha256:[a-f0-9]{64}|[a-f0-9]{8}-[a-f0-9]{4}-[1-8][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12})$/i;
|
|
491
|
+
const PROJECTED_REFERENCE = /^intentdna-[a-z0-9-]+:sha256:[a-f0-9]{64}$/i;
|
|
492
|
+
const RUNTIME_EVIDENCE_REF_TYPES = new Set(["trace", "audit", "artifact", "verifier", "handoff", "legacy", "unknown", "unsupported"]);
|
|
493
|
+
const CAPTURE_EVIDENCE_REF_TYPES = new Set([...RUNTIME_EVIDENCE_REF_TYPES, "runtime_decision_event", "completion_check", "git_commit"]);
|
|
494
|
+
function projectedValue(domain, value) {
|
|
495
|
+
const material = value && value.trim().length > 0 ? value : "unknown";
|
|
496
|
+
if (material === "unknown" || material === "unsupported")
|
|
497
|
+
return material;
|
|
498
|
+
if (material.startsWith(`intentdna-${domain}:sha256:`) && PROJECTED_REFERENCE.test(material))
|
|
499
|
+
return material;
|
|
500
|
+
return `intentdna-${domain}:sha256:${privacyDigest(domain, material)}`;
|
|
501
|
+
}
|
|
502
|
+
function projectedSessionDirName(sessionId) {
|
|
503
|
+
return `session-sha256-${privacyDigest("session-dir", sessionId)}`;
|
|
504
|
+
}
|
|
505
|
+
function projectedRuntimeEvidenceRef(ref) {
|
|
506
|
+
const type = RUNTIME_EVIDENCE_REF_TYPES.has(ref.type) ? ref.type : "unknown";
|
|
507
|
+
return {
|
|
508
|
+
type,
|
|
509
|
+
ref: OPAQUE_REFERENCE.test(ref.ref) ? ref.ref : projectedValue(`c4-evidence-ref-${type}`, ref.ref),
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
function projectedCaptureEvidenceRef(ref) {
|
|
513
|
+
const type = CAPTURE_EVIDENCE_REF_TYPES.has(ref.type) ? ref.type : "unknown";
|
|
514
|
+
if (type === "runtime_decision_event" || OPAQUE_REFERENCE.test(ref.ref))
|
|
515
|
+
return { type, ref: ref.ref };
|
|
516
|
+
return {
|
|
517
|
+
type,
|
|
518
|
+
ref: projectedValue(`c5-evidence-ref-${type}`, ref.ref),
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
function dateFromIso(value) {
|
|
522
|
+
return typeof value === "string" && /^\d{4}-\d{2}-\d{2}T/.test(value)
|
|
523
|
+
? value.slice(0, 10)
|
|
524
|
+
: new Date().toISOString().slice(0, 10);
|
|
525
|
+
}
|
|
526
|
+
function redactEvidenceCaptureText(value) {
|
|
527
|
+
return value
|
|
528
|
+
.replace(/(authorization:\s*Bearer\s+)[^\s'"]+/gi, "$1<redacted>")
|
|
529
|
+
.replace(/((?:INTENTDNA_API_TOKEN|INTENTDNA_SUPABASE_USER_JWT|SUPABASE_ACCESS_TOKEN|SUPABASE_SERVICE_ROLE_KEY|INTENTDNA_TOKEN_PEPPER|SUPABASE_SECRET_KEYS)=)(?:"[^"]*"|'[^']*'|[^\s'"]+)/gi, "$1<redacted>")
|
|
530
|
+
.replace(/idna_[A-Za-z0-9_-]+/g, "idna_<redacted>")
|
|
531
|
+
.replace(/sbp_[A-Za-z0-9_-]+/g, "sbp_<redacted>")
|
|
532
|
+
.replace(/eyJ[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+){2}/g, "<jwt-redacted>");
|
|
533
|
+
}
|
|
534
|
+
function redactEvidenceCaptureEvent(event) {
|
|
535
|
+
return {
|
|
536
|
+
...event,
|
|
537
|
+
project_root: projectedValue("c5-project-root", event.project_root),
|
|
538
|
+
run_id: projectedValue("c5-run-id", event.run_id),
|
|
539
|
+
summary: projectedValue("c5-summary", redactEvidenceCaptureText(event.summary)),
|
|
540
|
+
command: event.command ? projectedValue("c5-command", redactEvidenceCaptureText(event.command)) : undefined,
|
|
541
|
+
retry: event.retry ? { ...event.retry, reason: projectedValue("c5-retry-reason", redactEvidenceCaptureText(event.retry.reason)) } : undefined,
|
|
542
|
+
manual_intervention: event.manual_intervention
|
|
543
|
+
? { ...event.manual_intervention, reason: projectedValue("c5-manual-reason", redactEvidenceCaptureText(event.manual_intervention.reason)) }
|
|
544
|
+
: undefined,
|
|
545
|
+
evidence_refs: event.evidence_refs?.map(projectedCaptureEvidenceRef),
|
|
546
|
+
redaction: "intentdna.c5.persistent_projection.v1",
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
function projectRuntimeDecisionEventForDisk(event) {
|
|
550
|
+
return {
|
|
551
|
+
...event,
|
|
552
|
+
org_id: projectedValue("c4-org-id", event.org_id),
|
|
553
|
+
team_id: projectedValue("c4-team-id", event.team_id),
|
|
554
|
+
user_id: projectedValue("c4-user-id", event.user_id),
|
|
555
|
+
project_id: projectedValue("c4-project-id", event.project_id),
|
|
556
|
+
agent_id: projectedValue("c4-agent-id", event.agent_id),
|
|
557
|
+
agent_role: projectedValue("c4-agent-role", event.agent_role),
|
|
558
|
+
agent_type: projectedValue("c4-agent-type", event.agent_type),
|
|
559
|
+
session_agent: projectedValue("c4-session-agent", event.session_agent),
|
|
560
|
+
cascade_layers: Object.fromEntries(CASCADE_LAYER_NAMES.map((layer) => {
|
|
561
|
+
const entry = event.cascade_layers[layer];
|
|
562
|
+
return [layer, {
|
|
563
|
+
...entry,
|
|
564
|
+
source_ref: projectedValue(`c4-cascade-${layer}-source-ref`, entry.source_ref),
|
|
565
|
+
}];
|
|
566
|
+
})),
|
|
567
|
+
winning_constraint: {
|
|
568
|
+
...event.winning_constraint,
|
|
569
|
+
provenance_reason: projectedValue("c4-winning-provenance-reason", event.winning_constraint.provenance_reason),
|
|
570
|
+
},
|
|
571
|
+
decision_reason: projectedValue("c4-decision-reason", event.decision_reason),
|
|
572
|
+
harness_runtime_context: {
|
|
573
|
+
...event.harness_runtime_context,
|
|
574
|
+
agent_id: projectedValue("c4-agent-id", event.harness_runtime_context.agent_id),
|
|
575
|
+
agent_role: projectedValue("c4-agent-role", event.harness_runtime_context.agent_role),
|
|
576
|
+
agent_type: projectedValue("c4-agent-type", event.harness_runtime_context.agent_type),
|
|
577
|
+
session_agent: projectedValue("c4-session-agent", event.harness_runtime_context.session_agent),
|
|
578
|
+
},
|
|
579
|
+
session_id: projectedValue("c4-session-id", event.session_id),
|
|
580
|
+
run_id: projectedValue("c4-run-id", event.run_id),
|
|
581
|
+
step_id: projectedValue("c4-step-id", event.step_id),
|
|
582
|
+
tool_name: projectedValue("c4-tool-name", event.tool_name),
|
|
583
|
+
resource_ref: projectedValue("c4-resource-ref", event.resource_ref),
|
|
584
|
+
evidence_refs: event.evidence_refs.map(projectedRuntimeEvidenceRef),
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
export async function appendEvidenceCaptureEvent(projectDir, event) {
|
|
588
|
+
try {
|
|
589
|
+
const sanitized = redactEvidenceCaptureEvent(event);
|
|
590
|
+
const line = JSON.stringify(sanitized) + "\n";
|
|
591
|
+
const date = dateFromIso(sanitized.captured_at);
|
|
592
|
+
const captureDir = join(projectDir, ".dna", EVIDENCE_CAPTURE_DIR);
|
|
593
|
+
await mkdir(captureDir, { recursive: true });
|
|
594
|
+
await appendFile(join(captureDir, evidenceCaptureFileName(date)), line, "utf-8");
|
|
595
|
+
}
|
|
596
|
+
catch {
|
|
597
|
+
// Fail-open: evidence capture write failure never affects hook execution
|
|
598
|
+
}
|
|
599
|
+
}
|
|
478
600
|
export async function appendRuntimeDecisionEvent(projectDir, event, sessionId) {
|
|
479
601
|
try {
|
|
480
|
-
const
|
|
602
|
+
const projected = projectRuntimeDecisionEventForDisk(event);
|
|
603
|
+
const line = JSON.stringify(projected) + "\n";
|
|
481
604
|
const date = new Date().toISOString().slice(0, 10);
|
|
482
605
|
const globalDir = join(projectDir, ".dna", "state", RUNTIME_DECISION_DIR);
|
|
483
606
|
await mkdir(globalDir, { recursive: true });
|
|
484
607
|
await appendFile(join(globalDir, decisionFileName(date)), line, "utf-8");
|
|
485
608
|
if (sessionId) {
|
|
486
|
-
const sessionDir = resolveStateDir(projectDir, sessionId);
|
|
609
|
+
const sessionDir = resolveStateDir(projectDir, projectedSessionDirName(sessionId));
|
|
487
610
|
await mkdir(sessionDir, { recursive: true });
|
|
488
611
|
await appendFile(join(sessionDir, "runtime-decisions.jsonl"), line, "utf-8");
|
|
489
612
|
}
|
|
@@ -572,6 +695,7 @@ function normalizeRuntimeDecisionEvent(value) {
|
|
|
572
695
|
export async function readRuntimeDecisionEvents(projectDir, days = 1, sessionId) {
|
|
573
696
|
const entries = [];
|
|
574
697
|
if (sessionId) {
|
|
698
|
+
entries.push(...await readRuntimeDecisionFile(join(resolveStateDir(projectDir, projectedSessionDirName(sessionId)), "runtime-decisions.jsonl")));
|
|
575
699
|
entries.push(...await readRuntimeDecisionFile(join(resolveStateDir(projectDir, sessionId), "runtime-decisions.jsonl")));
|
|
576
700
|
}
|
|
577
701
|
else {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/mcp/tools-state.js
CHANGED
|
@@ -104,6 +104,7 @@ export function createStateTools(projectDir) {
|
|
|
104
104
|
type: "object",
|
|
105
105
|
properties: {
|
|
106
106
|
workflow: { type: "string", description: "Workflow name" },
|
|
107
|
+
workflow_asset: { type: "string", description: "Workflow asset id/name for local evidence attribution" },
|
|
107
108
|
current_step: { type: "string", description: "Current step ID" },
|
|
108
109
|
current_role: { type: "string", description: "Current role name" },
|
|
109
110
|
iteration: { type: "number", description: "Current iteration number" },
|
|
@@ -119,6 +120,7 @@ export function createStateTools(projectDir) {
|
|
|
119
120
|
const existing = await readWorkflowState(projectDir, sessionId, 0);
|
|
120
121
|
const state = {
|
|
121
122
|
active: typeof args.active === "boolean" ? args.active : true,
|
|
123
|
+
workflow_asset: typeof args.workflow_asset === "string" ? args.workflow_asset : existing?.workflow_asset,
|
|
122
124
|
workflow: String(args.workflow),
|
|
123
125
|
current_step: String(args.current_step),
|
|
124
126
|
current_role: String(args.current_role),
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type WorkflowAssetSummary } from "../assets/index.js";
|
|
2
|
+
export interface OrganizationProjectAssetBinding {
|
|
3
|
+
asset: string;
|
|
4
|
+
status: "planned" | "active" | "paused";
|
|
5
|
+
}
|
|
6
|
+
export type OrganizationProjectAssetStatus = OrganizationProjectAssetBinding["status"];
|
|
7
|
+
export interface OrganizationProject {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
path: string;
|
|
11
|
+
assets: OrganizationProjectAssetBinding[];
|
|
12
|
+
syncTargets: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface OrganizationProfile {
|
|
15
|
+
schema_version: "intentdna.organization.v1";
|
|
16
|
+
organization: {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
projects: OrganizationProject[];
|
|
21
|
+
}
|
|
22
|
+
export interface OrganizationProjectReview {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
path: string;
|
|
26
|
+
configuredAssets: string[];
|
|
27
|
+
plannedAssets: string[];
|
|
28
|
+
missingAssets: string[];
|
|
29
|
+
syncTargets: string[];
|
|
30
|
+
assetGates: OrganizationProjectAssetGate[];
|
|
31
|
+
}
|
|
32
|
+
export interface OrganizationProjectAssetReviewRef {
|
|
33
|
+
label: string;
|
|
34
|
+
path: string;
|
|
35
|
+
kind: "doc" | "dogfood" | "reference";
|
|
36
|
+
description?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface OrganizationProjectAssetReviewEvidence {
|
|
39
|
+
mode: "local_asset_diff_review_evidence";
|
|
40
|
+
authority: "manager_review_handoff_only";
|
|
41
|
+
receiptCommand: string;
|
|
42
|
+
receiptPathHint: string;
|
|
43
|
+
boundaries: string[];
|
|
44
|
+
}
|
|
45
|
+
export interface OrganizationReview {
|
|
46
|
+
profilePath: string;
|
|
47
|
+
profile: OrganizationProfile;
|
|
48
|
+
totals: {
|
|
49
|
+
projects: number;
|
|
50
|
+
declaredAssets: number;
|
|
51
|
+
configuredAssets: number;
|
|
52
|
+
missingAssets: number;
|
|
53
|
+
syncTargets: number;
|
|
54
|
+
dogfoodEvidenceModules: number;
|
|
55
|
+
dogfoodEvidencePass: number;
|
|
56
|
+
dogfoodEvidenceRemaining: number;
|
|
57
|
+
};
|
|
58
|
+
projects: OrganizationProjectReview[];
|
|
59
|
+
nextActions: string[];
|
|
60
|
+
}
|
|
61
|
+
export interface OrganizationProjectAssetGate {
|
|
62
|
+
asset: string;
|
|
63
|
+
assetVersion?: string;
|
|
64
|
+
contentHash?: string;
|
|
65
|
+
evidencePosture: WorkflowAssetSummary["status"]["evidencePosture"] | "unknown";
|
|
66
|
+
reviewRefs: OrganizationProjectAssetReviewRef[];
|
|
67
|
+
reviewEvidence: OrganizationProjectAssetReviewEvidence[];
|
|
68
|
+
reviewCommand: string;
|
|
69
|
+
bindingStatus: OrganizationProjectAssetStatus;
|
|
70
|
+
configured: boolean;
|
|
71
|
+
configurationPosture: "configured" | "available" | "missing";
|
|
72
|
+
syncTargets: string[];
|
|
73
|
+
evidenceGate: "open" | "clear" | "unknown";
|
|
74
|
+
syncReady: boolean;
|
|
75
|
+
nextCommand: string;
|
|
76
|
+
reason: string;
|
|
77
|
+
}
|
|
78
|
+
export interface OrganizationBindResult {
|
|
79
|
+
path: string;
|
|
80
|
+
profile: OrganizationProfile;
|
|
81
|
+
yaml: string;
|
|
82
|
+
projectId: string;
|
|
83
|
+
asset: string;
|
|
84
|
+
status: OrganizationProjectAssetBinding["status"];
|
|
85
|
+
addedAsset: boolean;
|
|
86
|
+
addedSyncTargets: string[];
|
|
87
|
+
guidance: {
|
|
88
|
+
bindingEffect: string;
|
|
89
|
+
reviewCommand: string;
|
|
90
|
+
rolloutCommand: string;
|
|
91
|
+
replacementBoundary: string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export declare function readOrganizationProfile(options?: {
|
|
95
|
+
projectDir?: string;
|
|
96
|
+
}): Promise<{
|
|
97
|
+
path: string;
|
|
98
|
+
profile?: OrganizationProfile;
|
|
99
|
+
}>;
|
|
100
|
+
export declare function createOrganizationProfile(input: {
|
|
101
|
+
orgName: string;
|
|
102
|
+
projectName?: string;
|
|
103
|
+
asset?: string;
|
|
104
|
+
syncTarget?: string;
|
|
105
|
+
projectDir?: string;
|
|
106
|
+
}): Promise<{
|
|
107
|
+
path: string;
|
|
108
|
+
profile: OrganizationProfile;
|
|
109
|
+
yaml: string;
|
|
110
|
+
}>;
|
|
111
|
+
export declare function isOrganizationAssetStatus(value: string): value is OrganizationProjectAssetStatus;
|
|
112
|
+
export declare function bindOrganizationAsset(input: {
|
|
113
|
+
asset: string;
|
|
114
|
+
project?: string;
|
|
115
|
+
status?: string;
|
|
116
|
+
syncTarget?: string;
|
|
117
|
+
projectDir?: string;
|
|
118
|
+
}): Promise<OrganizationBindResult | undefined>;
|
|
119
|
+
export declare function reviewOrganization(options?: {
|
|
120
|
+
projectDir?: string;
|
|
121
|
+
}): Promise<OrganizationReview | undefined>;
|