@planu/cli 5.3.26 → 5.3.28

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cli/commands/doctor.d.ts +4 -10
  3. package/dist/cli/commands/doctor.js +5 -31
  4. package/dist/cli/commands/inspect.js +2 -14
  5. package/dist/cli/commands/offline.d.ts +1 -2
  6. package/dist/cli/commands/offline.js +24 -41
  7. package/dist/config/release-policy.json +1 -79
  8. package/dist/engine/auto-updater/release-verifier.js +17 -35
  9. package/dist/engine/core-bridge.d.ts +6 -23
  10. package/dist/engine/core-bridge.js +35 -376
  11. package/dist/engine/execution/job-runtime.d.ts +0 -11
  12. package/dist/engine/execution/job-runtime.js +0 -23
  13. package/dist/engine/handoff-artifacts/io.js +1 -0
  14. package/dist/engine/handoff-artifacts/schemas.d.ts +46 -0
  15. package/dist/engine/handoff-artifacts/schemas.js +15 -0
  16. package/dist/engine/lifecycle-reconciliation.js +6 -5
  17. package/dist/engine/living-spec/annotation-parser.js +0 -14
  18. package/dist/engine/project-graph/native.js +2 -2
  19. package/dist/engine/sandbox/profiles/macos.sb +33 -0
  20. package/dist/engine/scan-project/module-discoverer.js +10 -53
  21. package/dist/engine/scope-boundaries/contradiction-checker.js +1 -1
  22. package/dist/engine/validation/validation-receipt.d.ts +5 -0
  23. package/dist/engine/validation/validation-receipt.js +9 -1
  24. package/dist/engine/validator/deep-code-checker.js +19 -26
  25. package/dist/engine/validator/validation-report-writer.d.ts +1 -0
  26. package/dist/engine/validator/validation-report-writer.js +3 -2
  27. package/dist/security/adapters/macos-keychain.d.ts +5 -3
  28. package/dist/security/adapters/macos-keychain.js +46 -20
  29. package/dist/tools/create-spec/autopilot-analyzer.d.ts +1 -1
  30. package/dist/tools/create-spec/autopilot-analyzer.js +2 -2
  31. package/dist/tools/create-spec/relevance-scorer.d.ts +1 -1
  32. package/dist/tools/create-spec/relevance-scorer.js +1 -17
  33. package/dist/tools/create-spec.js +1 -1
  34. package/dist/tools/update-status/dod-gates.d.ts +1 -0
  35. package/dist/tools/update-status/dod-gates.js +123 -4
  36. package/dist/types/atomic-upgrade.d.ts +0 -2
  37. package/dist/types/core-bridge.d.ts +0 -108
  38. package/dist/types/core-bridge.js +1 -1
  39. package/dist/types/durable-job.d.ts +0 -40
  40. package/dist/types/handoff-artifacts.d.ts +17 -1
  41. package/dist/types/security.d.ts +0 -5
  42. package/dist/types/transition-log.d.ts +1 -1
  43. package/package.json +7 -43
  44. package/planu-plugin.json +1 -1
  45. package/dist/config/native-release-public-key.pem +0 -3
  46. package/dist/config/native-targets.json +0 -87
  47. package/dist/engine/execution/job-executor.d.ts +0 -16
  48. package/dist/engine/execution/job-executor.js +0 -140
  49. package/dist/engine/execution/native-relevance-scorer.d.ts +0 -6
  50. package/dist/engine/execution/native-relevance-scorer.js +0 -64
  51. package/dist/engine/execution/native-worker-dispatch.d.ts +0 -3
  52. package/dist/engine/execution/native-worker-dispatch.js +0 -46
  53. package/dist/engine/execution/native-worker-protocol.d.ts +0 -6
  54. package/dist/engine/execution/native-worker-protocol.js +0 -33
  55. package/dist/engine/execution/native-worker-runtime.d.ts +0 -4
  56. package/dist/engine/execution/native-worker-runtime.js +0 -177
  57. package/dist/engine/execution/native-worker-thread.d.ts +0 -2
  58. package/dist/engine/execution/native-worker-thread.js +0 -66
  59. package/dist/engine/macos-keychain-native-port.d.ts +0 -10
  60. package/dist/engine/macos-keychain-native-port.js +0 -64
  61. package/dist/engine/native-capability-policy.d.ts +0 -4
  62. package/dist/engine/native-capability-policy.js +0 -24
  63. package/dist/engine/native-platform.d.ts +0 -3
  64. package/dist/engine/native-platform.js +0 -44
  65. package/dist/engine/native-runtime-handshake.d.ts +0 -20
  66. package/dist/engine/native-runtime-handshake.js +0 -230
  67. package/dist/engine/planu-core.darwin-arm64.node.manifest.json +0 -39
  68. package/dist/engine/planu-core.darwin-arm64.node.sbom.json +0 -1310
  69. package/dist/engine/planu-core.darwin-x64.node.manifest.json +0 -39
  70. package/dist/engine/planu-core.darwin-x64.node.sbom.json +0 -1310
  71. package/dist/engine/planu-core.linux-arm64-gnu.node.manifest.json +0 -38
  72. package/dist/engine/planu-core.linux-arm64-gnu.node.sbom.json +0 -1310
  73. package/dist/engine/planu-core.linux-arm64-musl.node.manifest.json +0 -38
  74. package/dist/engine/planu-core.linux-arm64-musl.node.sbom.json +0 -1310
  75. package/dist/engine/planu-core.linux-x64-gnu.node.manifest.json +0 -38
  76. package/dist/engine/planu-core.linux-x64-gnu.node.sbom.json +0 -1310
  77. package/dist/engine/planu-core.linux-x64-musl.node.manifest.json +0 -38
  78. package/dist/engine/planu-core.linux-x64-musl.node.sbom.json +0 -1310
  79. package/dist/engine/planu-core.win32-arm64-msvc.node.manifest.json +0 -38
  80. package/dist/engine/planu-core.win32-arm64-msvc.node.sbom.json +0 -1310
  81. package/dist/engine/planu-core.win32-x64-msvc.node.manifest.json +0 -38
  82. package/dist/engine/planu-core.win32-x64-msvc.node.sbom.json +0 -1310
  83. package/dist/types/native-worker.d.ts +0 -48
  84. package/dist/types/native-worker.js +0 -2
  85. package/planu-native.json +0 -82
@@ -12,11 +12,12 @@ import { addLesson, getLessons } from '../../storage/lessons-store.js';
12
12
  import { dispatchFeedbackEvent } from '../learn.js';
13
13
  import { auditDeps } from '../../engine/dep-auditor/index.js';
14
14
  import { withEscalation } from '../../engine/escalator/with-escalation.js';
15
- import { writeImplementationReviewReport } from '../../engine/validator/validation-report-writer.js';
15
+ import { AUTOMATED_VALIDATOR_AGENT, writeImplementationReviewReport, } from '../../engine/validator/validation-report-writer.js';
16
16
  import { formatKeyValue } from '../output-formatter.js';
17
17
  import { reportClassifiedDegradation } from '../../errors/classified-degradation.js';
18
18
  import { verifyCurrentDoneReceipt } from './done-receipt-verifier.js';
19
19
  import { projectDataDir } from '../../storage/base-store.js';
20
+ import { readTransitionLog } from '../../storage/transition-log.js';
20
21
  import { ValidationReportV1Schema } from '../../engine/handoff-artifacts/schemas.js';
21
22
  export { completedJobPublishesReceipt } from './done-receipt-verifier.js';
22
23
  /**
@@ -447,10 +448,10 @@ async function checkDoneReviewDigest(specId, projectId, implementationReviewDige
447
448
  !parsed.data.passed ||
448
449
  parsed.data.gates.some((gate) => !gate.passed) ||
449
450
  parsed.data.minimalityReport?.blocked === true ||
450
- parsed.data.reviewer.kind !== 'implementation-review-agent' ||
451
- parsed.data.reviewer.agent !== 'planu-implementation-reviewer' ||
451
+ parsed.data.reviewer.kind !== 'automation' ||
452
+ parsed.data.reviewer.agent !== AUTOMATED_VALIDATOR_AGENT ||
452
453
  parsed.data.reviewer.verdict !== 'approved') {
453
- return doneReviewDigestError(specId, 'DONE_REVIEW_REPORT_UNSAFE', 'The validation report schema or independent reviewer evidence is invalid.');
454
+ return doneReviewDigestError(specId, 'DONE_REVIEW_REPORT_UNSAFE', 'The validation report schema or automated validator evidence is invalid.');
454
455
  }
455
456
  return null;
456
457
  }
@@ -616,6 +617,116 @@ export async function checkSpecReviewGate(specId, projectId, _forceApprove) {
616
617
  });
617
618
  }
618
619
  }
620
+ export async function checkImplementationReviewGate(specId, projectId, _force) {
621
+ try {
622
+ const { readArtifact } = await import('../../engine/handoff-artifacts/io.js');
623
+ const result = await readArtifact({ projectId, specId, kind: 'implementation_review' });
624
+ if (!result.ok) {
625
+ const firstErr = result.errors[0];
626
+ return implementationReviewGateError({
627
+ specId,
628
+ error: firstErr?.code === 'ARTIFACT_NOT_FOUND'
629
+ ? 'implementation_review_missing'
630
+ : 'implementation_review_invalid',
631
+ message: firstErr?.code === 'ARTIFACT_NOT_FOUND'
632
+ ? 'No implementation review exists for this spec. An independent planu-implementation-reviewer must review the implementation and write its own evidence before done.'
633
+ : 'Implementation review evidence is malformed or uses an obsolete schema.',
634
+ blockers: [],
635
+ fixHint: firstErr?.code === 'ARTIFACT_NOT_FOUND'
636
+ ? 'Have planu-implementation-reviewer write implementation_review.json (ImplementationReviewV1) into the handoff store, then retry update_status(done).'
637
+ : 'Have planu-implementation-reviewer rewrite implementation_review.json as valid ImplementationReviewV1 evidence, then retry done.',
638
+ });
639
+ }
640
+ const review = result.payload;
641
+ if (isLifecycleStubBody(specId, review.body)) {
642
+ return implementationReviewGateError({
643
+ specId,
644
+ error: 'implementation_review_stub',
645
+ message: 'Implementation review evidence is a lifecycle-generated stub, not evidence from a real reviewer.',
646
+ blockers: [],
647
+ fixHint: 'Replace the stub with genuine planu-implementation-reviewer evidence in the handoff store, then retry done.',
648
+ });
649
+ }
650
+ if (review.verdict !== 'approved' || review.reviewer.verdict !== 'approved') {
651
+ return implementationReviewGateError({
652
+ specId,
653
+ error: 'implementation_review_changes_requested',
654
+ message: 'Implementation reviewer requested changes. Done is blocked until the review passes.',
655
+ blockers: review.blockers,
656
+ fixHint: 'Resolve the implementation review blockers and have planu-implementation-reviewer write updated evidence, then retry done.',
657
+ });
658
+ }
659
+ if (review.reviewer.kind !== 'implementation-review-agent' ||
660
+ review.reviewer.agent !== 'planu-implementation-reviewer') {
661
+ return implementationReviewGateError({
662
+ specId,
663
+ error: 'implementation_review_wrong_reviewer',
664
+ message: 'Done requires the recognized independent implementation reviewer identity.',
665
+ blockers: [
666
+ `Reviewer was ${review.reviewer.agent}. Expected planu-implementation-reviewer.`,
667
+ ],
668
+ fixHint: 'Have planu-implementation-reviewer (with the recognized identity) write the review artifact, then retry done.',
669
+ });
670
+ }
671
+ const implementerActor = await findImplementingActor(specId, projectId);
672
+ if (implementerActor !== undefined && implementerActor === review.reviewer.agent) {
673
+ return implementationReviewGateError({
674
+ specId,
675
+ error: 'implementation_review_self_review',
676
+ message: 'The implementation reviewer must be a different identity from the implementer. Self-review is blocked.',
677
+ blockers: [`Implementer and reviewer share the identity "${implementerActor}".`],
678
+ fixHint: 'Have a different, independent agent write the implementation review evidence, then retry done.',
679
+ });
680
+ }
681
+ return null;
682
+ }
683
+ catch (err) {
684
+ /* reliability-optional: IMPLEMENTATION_REVIEW_GATE_READ — typed gate error blocks done */
685
+ reportClassifiedDegradation('IMPLEMENTATION_REVIEW_GATE_READ', err);
686
+ return implementationReviewGateError({
687
+ specId,
688
+ error: 'implementation_review_unreadable',
689
+ message: `Could not read implementation review evidence: ${err instanceof Error ? err.message : String(err)}`,
690
+ blockers: [],
691
+ fixHint: 'Fix the artifact store issue so implementation_review.json is readable, then retry update_status(done).',
692
+ });
693
+ }
694
+ }
695
+ async function findImplementingActor(specId, projectId) {
696
+ const entries = await readTransitionLog(projectId, specId);
697
+ for (let i = entries.length - 1; i >= 0; i--) {
698
+ const entry = entries[i];
699
+ if (entry?.to === 'implementing' && entry.actor) {
700
+ return entry.actor;
701
+ }
702
+ }
703
+ return undefined;
704
+ }
705
+ function implementationReviewGateError(args) {
706
+ const artifactPath = `external Planu project data: handoffs/${args.specId}/implementation_review.json`;
707
+ return {
708
+ content: [
709
+ {
710
+ type: 'text',
711
+ text: formatKeyValue({
712
+ error: args.error,
713
+ message: args.message,
714
+ artifactPath,
715
+ blockers: args.blockers.length,
716
+ firstBlocker: args.blockers[0],
717
+ fixHint: args.fixHint,
718
+ }, 'Implementation review gate failed'),
719
+ },
720
+ ],
721
+ isError: true,
722
+ structuredContent: {
723
+ error: args.error,
724
+ code: 422,
725
+ context: { specId: args.specId, artifactPath, blockers: args.blockers },
726
+ fixHint: args.fixHint,
727
+ },
728
+ };
729
+ }
619
730
  function validationReportGateError(args) {
620
731
  const artifactPath = `external Planu project data: handoffs/${args.specId}/validation-report.json`;
621
732
  return {
@@ -673,6 +784,14 @@ function specReviewGateError(args) {
673
784
  */
674
785
  export async function checkDoneGates(spec, specId, projectId, projectPath, _force, _forceReason = 'No force reason provided', verifyReceipt = verifyCurrentDoneReceipt, implementationReviewDigest) {
675
786
  try {
787
+ const reviewGateError = await checkImplementationReviewGate(specId, projectId, _force);
788
+ if (reviewGateError) {
789
+ return {
790
+ blocked: reviewGateError,
791
+ forcedBypassWarning: null,
792
+ freshnessLease: null,
793
+ };
794
+ }
676
795
  if (implementationReviewDigest !== undefined) {
677
796
  const digestError = await checkDoneReviewDigest(specId, projectId, implementationReviewDigest);
678
797
  if (digestError) {
@@ -21,9 +21,7 @@ export interface UpgradeJournal {
21
21
  export interface ReleaseVerificationReport {
22
22
  version: string;
23
23
  cliPackage: string;
24
- nativePackage: string;
25
24
  cliVerified: true;
26
- nativeVerified: true;
27
25
  mcpSmokeVerified: true;
28
26
  canaryVerified: true;
29
27
  verifiedAt: string;
@@ -1,4 +1,3 @@
1
- import type { SpecAnnotation } from './living-spec/annotations.js';
2
1
  export type { SpecAnnotation } from './living-spec/annotations.js';
3
2
  export interface FileHash {
4
3
  path: string;
@@ -9,79 +8,6 @@ export interface FileMetadata {
9
8
  mtime: number;
10
9
  size: number;
11
10
  }
12
- /** Versioned contract returned by a native runtime before it may execute work. */
13
- export interface NativeRuntimeHandshake {
14
- engineVersion: string;
15
- buildId: string;
16
- protocolAbi: number;
17
- capabilityAbi: number;
18
- nodeApiAbi: number;
19
- capabilities: string[];
20
- storageSchemaMin: number;
21
- storageSchemaMax: number;
22
- target: string;
23
- }
24
- /** Externally generated release metadata stored next to the native artifact. */
25
- export interface NativeArtifactManifest extends NativeRuntimeHandshake {
26
- schemaVersion: 2;
27
- cliVersion: string;
28
- artifactSha256: string;
29
- platform: NodeJS.Platform;
30
- arch: string;
31
- libc: 'glibc' | 'musl' | null;
32
- sbom: {
33
- format: 'CycloneDX-1.5';
34
- path: string;
35
- sha256: string;
36
- };
37
- provenance: {
38
- builder: string;
39
- sourceCommit: string;
40
- sourceTreeDirty: boolean;
41
- sourceDateEpoch: number;
42
- rustToolchain: string;
43
- zigVersion: string | null;
44
- };
45
- signature: {
46
- algorithm: 'Ed25519';
47
- keyId: string;
48
- value: string;
49
- };
50
- }
51
- export interface NativeRuntimeCompatibility {
52
- compatible: boolean;
53
- reasons: string[];
54
- handshake: NativeRuntimeHandshake | null;
55
- }
56
- export type NativeFallbackClass = 'optimization' | 'correctness-critical';
57
- export type NativeFallbackMode = 'typescript-visible-degradation' | 'fail-closed';
58
- export interface NativeCapabilityPolicy {
59
- readonly capability: string;
60
- readonly classification: NativeFallbackClass;
61
- readonly fallback: NativeFallbackMode;
62
- readonly parityContract: string;
63
- }
64
- export interface NativeCapabilityDiagnostic {
65
- capability: string;
66
- state: 'available' | 'degraded' | 'unavailable';
67
- fallback: NativeFallbackMode;
68
- }
69
- export interface NativeLoadDiagnostic {
70
- attempted: string[];
71
- errors: string[];
72
- loaded?: string;
73
- artifactSha256?: string;
74
- origin?: 'local' | 'package';
75
- compatibility?: NativeRuntimeCompatibility;
76
- rejectedOverrides?: string[];
77
- capabilities?: NativeCapabilityDiagnostic[];
78
- executionScope?: 'isolated-worker-and-keychain-port';
79
- }
80
- export interface NativePlatformInfo {
81
- platform: NodeJS.Platform;
82
- arch: string;
83
- libc: 'glibc' | 'musl' | null;
84
- }
85
11
  export interface DriftResult {
86
12
  foundKeywords: string[];
87
13
  fileCount: number;
@@ -207,38 +133,4 @@ export interface ProjectGraphNeighborRs {
207
133
  edgeId: string;
208
134
  relation: string;
209
135
  }
210
- export interface PlanuCore {
211
- /** Mandatory for runtimes loaded by the versioned bridge. */
212
- planuRuntimeHandshake?(): NativeRuntimeHandshake;
213
- hashProjectPath(projectPath: string): string;
214
- isSafeProjectId(projectId: string): boolean;
215
- getProjectDataPath(baseDir: string, project_id: string): string | null;
216
- scanAndHashFiles(rootPath: string): FileHash[];
217
- scanProjectMetadata(rootPath: string): FileMetadata[];
218
- scanSpecAnnotations(rootPath: string): SpecAnnotation[];
219
- checkAcCoverage(filePaths: string[], keywords: string[]): string[];
220
- fastDetectDriftParallel(rootPath: string, keywords: string[]): DriftResult;
221
- fastFindDuplicateBlocks(paths: string[], minLines: number): DuplicateRawBlockRs[];
222
- fastFindPatterns(rootPath: string, patterns: string[], extensions: string[], exclude: string[]): FastGrepMatch[];
223
- fastFindFilesByName(rootPath: string, names: string[]): string[];
224
- fastFindFilesByExt(rootPath: string, extensions: string[]): string[];
225
- fastReadFiles(paths: string[]): FileContent[];
226
- fastScanSpecs(rootPath: string): SpecBriefRs[];
227
- fastVerifyGapsChain(filePath: string): GapsLogChainResultRs;
228
- fastAppendGapEntry(filePath: string, id: string, timestamp: string, specId: string, description: string, severity: string, affectedSpecs: string[]): string;
229
- fastCosineSimilarity(v1: number[], v2: number[]): number;
230
- fastHnswSearchFlat(query: number[], nodes: VectorNode[], topK: number): NativeVectorSearchResult[];
231
- fastHmacSign(secret: string, data: string): string;
232
- fastHmacVerify(secret: string, data: string, signature: string): boolean;
233
- macosKeychainSet?(account: string, secret: Buffer): Promise<void>;
234
- macosKeychainGet?(account: string): Promise<Buffer | null>;
235
- macosKeychainDelete?(account: string): Promise<void>;
236
- scanProjectGraphSources?(rootPath: string, limits: ResolvedProjectGraphLimitsRs): ProjectGraphSourceFileRs[];
237
- extractTsRelations?(rootPath: string, paths: string[], limits: ResolvedProjectGraphLimitsRs): TsRelationRs[];
238
- queryAffectedNodes?(seed: string, edges: GraphEdgeInputRs[], relationFilter: string[], limits: ResolvedProjectGraphLimitsRs): AffectedNodeRs[];
239
- queryAffectedNodesCompact?(seed: string, edges: CompactGraphEdgesRs, relationFilter: string[], limits: ResolvedProjectGraphLimitsRs): AffectedNodeRs[];
240
- queryShortestPath?(from: string, to: string, edges: GraphEdgeInputRs[], relationFilter: string[], limits: ResolvedProjectGraphLimitsRs): ShortestPathResultRs;
241
- selectCompactGraphSlice?(seeds: string[], nodes: GraphNodeInputRs[], edges: GraphEdgeInputRs[], limits: ResolvedProjectGraphLimitsRs): CompactGraphSliceRs;
242
- selectCompactGraphSliceCompact?(seeds: string[], nodeIds: string[], edges: CompactGraphEdgesRs, limits: ResolvedProjectGraphLimitsRs): CompactGraphSliceRs;
243
- }
244
136
  //# sourceMappingURL=core-bridge.d.ts.map
@@ -1,3 +1,3 @@
1
- // src/types/core-bridge.ts — Types for the native Rust engine
1
+ // src/types/core-bridge.ts — Types for the TypeScript fallback engine
2
2
  export {};
3
3
  //# sourceMappingURL=core-bridge.js.map
@@ -1,5 +1,3 @@
1
- import type { DurableJobRecord } from '../storage/runtime-db.js';
2
- import type { NativeWorkerCall, NativeWorkerOperation } from './native-worker.js';
3
1
  import type { ValidationArtifactDigests, ValidationFreshnessLease } from './validation-receipt.js';
4
2
  export interface DurableJobIdentity {
5
3
  readonly operationId: string;
@@ -15,13 +13,6 @@ export interface WatchJobInput extends DurableJobIdentity {
15
13
  export interface DurableJobRuntimeOptions {
16
14
  readonly databasePath?: string;
17
15
  }
18
- export interface NativeDurableJobPayload {
19
- readonly kind: 'native-worker';
20
- readonly operation: NativeWorkerOperation;
21
- readonly payload: Readonly<Record<string, unknown>>;
22
- readonly deadlineAt: number;
23
- readonly cancellationId?: string;
24
- }
25
16
  export interface ValidateDurableJobPayload {
26
17
  readonly kind: 'validate';
27
18
  readonly schemaVersion: 2;
@@ -44,35 +35,4 @@ export interface ValidateDurableJobPayload {
44
35
  readonly freshnessLease?: ValidationFreshnessLease;
45
36
  readonly specPath: string;
46
37
  }
47
- export type NativeWorkerRunner = (call: NativeWorkerCall) => Promise<unknown>;
48
- export interface DurableJobExecutorOptions {
49
- readonly runtime: {
50
- list(projectId: string, workspaceId?: string): readonly DurableJobRecord[];
51
- claim(input: DurableJobIdentity & {
52
- readonly workerId: string;
53
- readonly leaseMs: number;
54
- }): DurableJobRecord | undefined;
55
- renew(input: DurableJobIdentity & {
56
- readonly workerId: string;
57
- readonly leaseMs: number;
58
- readonly fencingToken: number;
59
- }): boolean;
60
- get(input: DurableJobIdentity): DurableJobRecord;
61
- complete(input: DurableJobIdentity & {
62
- readonly workerId: string;
63
- readonly fencingToken: number;
64
- readonly result: unknown;
65
- }): DurableJobRecord;
66
- fail(input: DurableJobIdentity & {
67
- readonly workerId: string;
68
- readonly fencingToken: number;
69
- readonly error: string;
70
- }): DurableJobRecord;
71
- };
72
- readonly workerId: string;
73
- readonly leaseMs?: number;
74
- readonly heartbeatMs?: number;
75
- readonly maxConcurrency?: number;
76
- readonly runNative?: NativeWorkerRunner;
77
- }
78
38
  //# sourceMappingURL=durable-job.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { Spec } from './spec/core.js';
2
2
  /** Artifact kinds produced/consumed by each role transition */
3
- export type ArtifactKind = 'intake' | 'spec.lock' | 'review_feedback' | 'implementation-report' | 'validation-report';
3
+ export type ArtifactKind = 'intake' | 'spec.lock' | 'review_feedback' | 'implementation-report' | 'validation-report' | 'implementation_review';
4
4
  /** Triagier → Elicitor: describes the intent to be elaborated */
5
5
  export interface IntakeV1 {
6
6
  schema_version: string;
@@ -39,6 +39,21 @@ export interface ReviewFeedbackV1 {
39
39
  body: string;
40
40
  reviewedAt: string;
41
41
  }
42
+ /** Independent reviewer → Planner: evidence that an implementation review actually happened */
43
+ export interface ImplementationReviewV1 {
44
+ schema_version: string;
45
+ specId: string;
46
+ verdict: 'approved' | 'changes-requested';
47
+ reviewer: {
48
+ kind: 'implementation-review-agent' | 'human';
49
+ agent: string;
50
+ verdict: 'approved' | 'changes-requested';
51
+ };
52
+ blockers: string[];
53
+ suggestions: string[];
54
+ body: string;
55
+ reviewedAt: string;
56
+ }
42
57
  /** Implementer → Validator: result of implementation run */
43
58
  export interface ImplementationReportV1 {
44
59
  schema_version: string;
@@ -125,6 +140,7 @@ export interface ArtifactPayloadMap {
125
140
  review_feedback: ReviewFeedbackV1;
126
141
  'implementation-report': ImplementationReportV1;
127
142
  'validation-report': ValidationReportV1;
143
+ implementation_review: ImplementationReviewV1;
128
144
  }
129
145
  export type ArtifactPayload<K extends ArtifactKind> = ArtifactPayloadMap[K];
130
146
  import type { MinimalImplementationReport } from './minimal-implementation-gate.js';
@@ -97,11 +97,6 @@ export interface SecurityPatternsConfig {
97
97
  complianceCriteria: Record<string, string[]>;
98
98
  }
99
99
  export type SecretStoreKind = 'macos-keychain' | 'linux-secret-service' | 'windows-credential-manager' | 'environment';
100
- export interface MacOSKeychainNativePort {
101
- set(account: string, secret: Buffer): Promise<void>;
102
- get(account: string): Promise<Buffer | null>;
103
- delete(account: string): Promise<void>;
104
- }
105
100
  export type MacOSKeychainOperation = 'get' | 'set' | 'delete';
106
101
  export interface MacOSKeychainPendingOperation {
107
102
  readonly fence: number;
@@ -1,5 +1,5 @@
1
1
  /** Event types recorded in the transition log. */
2
- export type TransitionEventType = 'transitioned_to_terminal' | 'frontmatter_resealed' | 'reopen' | 'terminal_drift_detected' | 'transition' | 'handoff.intake' | 'handoff.spec.lock' | 'handoff.review_feedback' | 'handoff.implementation-report' | 'handoff.validation-report' | 'retro_audit' | 'tdd_red_locked' | 'tdd_green_achieved' | 'status_reconciled' | 'housekeeping' | 'ghost_spec_quarantined';
2
+ export type TransitionEventType = 'transitioned_to_terminal' | 'frontmatter_resealed' | 'reopen' | 'terminal_drift_detected' | 'transition' | 'handoff.intake' | 'handoff.spec.lock' | 'handoff.review_feedback' | 'handoff.implementation-report' | 'handoff.validation-report' | 'handoff.implementation_review' | 'retro_audit' | 'tdd_red_locked' | 'tdd_green_achieved' | 'status_reconciled' | 'housekeeping' | 'ghost_spec_quarantined';
3
3
  /** SPEC-734: Outcome of a gate execution in a transition. */
4
4
  export type GateOutcome = 'pass' | 'fail' | 'skip' | 'forced';
5
5
  /** SPEC-734: Result of verifying the hash chain integrity of a project's transition log. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "5.3.26",
4
- "description": "Planu — MCP Server for Spec Driven Development with native Rust acceleration for hot paths. Cross-platform (Linux/macOS/Windows, x64/arm64, glibc/musl).",
3
+ "version": "5.3.28",
4
+ "description": "Planu — MCP Server for Spec Driven Development. Cross-platform (Linux/macOS/Windows, x64/arm64).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -11,57 +11,25 @@
11
11
  "files": [
12
12
  "dist/",
13
13
  "!dist/**/*.map",
14
- "!dist/engine/*.node",
15
14
  "scripts/lib/pending-release-file.mjs",
16
15
  "scripts/lib/portable-paths.mjs",
17
16
  "src/i18n/messages/",
18
- "planu-native.json",
19
17
  "planu-plugin.json",
20
18
  "README.md",
21
19
  "CHANGELOG.md",
22
20
  "LICENSE"
23
21
  ],
24
- "napi": {
25
- "binaryName": "planu-core",
26
- "targets": [
27
- "aarch64-apple-darwin",
28
- "x86_64-apple-darwin",
29
- "aarch64-unknown-linux-gnu",
30
- "aarch64-unknown-linux-musl",
31
- "x86_64-unknown-linux-gnu",
32
- "x86_64-unknown-linux-musl",
33
- "aarch64-pc-windows-msvc",
34
- "x86_64-pc-windows-msvc"
35
- ],
36
- "packageName": "@planu/core"
37
- },
38
- "optionalDependencies": {
39
- "@planu/core-darwin-arm64": "5.3.26",
40
- "@planu/core-darwin-x64": "5.3.26",
41
- "@planu/core-linux-arm64-gnu": "5.3.26",
42
- "@planu/core-linux-arm64-musl": "5.3.26",
43
- "@planu/core-linux-x64-gnu": "5.3.26",
44
- "@planu/core-linux-x64-musl": "5.3.26",
45
- "@planu/core-win32-arm64-msvc": "5.3.26",
46
- "@planu/core-win32-x64-msvc": "5.3.26"
47
- },
48
22
  "engines": {
49
23
  "node": ">=24.0.0"
50
24
  },
51
25
  "packageManager": "pnpm@11.9.0+sha512.bd682d5d03fe525ef7c9fd6780c6884d1e756ac4c9c9fe00c538782824310dcf90e3ddc4f53835f06dfaebd5085e41855e0bcbb3b60de2ac5bbab89e5036f03b",
52
26
  "scripts": {
53
- "build:rust": "bash scripts/build-rust-local.sh --host",
54
- "build:rust:all": "bash scripts/build-rust-local.sh --all",
55
- "build:rust:check-tools": "bash scripts/build-rust-local.sh --check-tools",
56
- "check:native-version-parity": "node scripts/check-native-version-parity.mjs",
57
- "check:release-authorities": "node scripts/check-release-authorities.mjs",
58
27
  "check:commercial-surfaces": "node scripts/check-commercial-surfaces.mjs",
59
28
  "check:tool-registration": "bash scripts/check-tool-registration.sh",
60
29
  "generate:host-tool-registry": "node scripts/generate-host-tool-registry.mjs",
61
30
  "release:local": "bash scripts/release-local.sh",
62
- "release:local:all": "bash scripts/release-local.sh --all",
63
- "release:publish": "bash scripts/release-local.sh --all --publish",
64
- "build": "pnpm clean && pnpm build:rust && pnpm build:ts",
31
+ "release:publish": "bash scripts/release-local.sh --publish",
32
+ "build": "pnpm clean && pnpm build:ts",
65
33
  "build:ts": "pnpm clean && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node scripts/copy-runtime-assets.mjs",
66
34
  "build:obfuscated": "pnpm build && node scripts/obfuscate.mjs",
67
35
  "dev": "tsc --watch",
@@ -85,12 +53,9 @@
85
53
  "test:website:browser": "playwright test --config playwright.website.config.ts",
86
54
  "test:website:lighthouse": "lhci autorun --config=.lighthouserc.cjs",
87
55
  "test:website:lighthouse:production": "PLANU_LIGHTHOUSE_PRODUCTION=1 lhci autorun --config=.lighthouserc.cjs",
88
- "native:project-graph:e2e": "PLANU_NATIVE_E2E=1 vitest run tests/integration/native-project-graph-e2e.test.ts",
89
- "native:project-graph:benchmark": "node scripts/benchmark-native-performance.mjs --operation project_graph_query --samples 30 --warmups 5 --project-path . --spec-id SPEC-1119 --json",
90
- "benchmark:execution-kernel": "pnpm build && node scripts/benchmark-execution-kernel.mjs",
91
- "check": "pnpm typecheck && pnpm lint:gate && pnpm format:check && pnpm check:destructive-ops && pnpm check:release-authorities && pnpm check:commercial-surfaces && pnpm check:tool-registration && pnpm check:public-privacy && pnpm check:website-proof && pnpm check:donation-assets && pnpm check:website-public-assets",
56
+ "check": "pnpm typecheck && pnpm lint:gate && pnpm format:check && pnpm check:destructive-ops && pnpm check:commercial-surfaces && pnpm check:tool-registration && pnpm check:public-privacy && pnpm check:website-proof && pnpm check:donation-assets && pnpm check:website-public-assets",
92
57
  "check:destructive-ops": "bash scripts/check-no-automatic-destructive-ops.sh",
93
- "check:strict": "pnpm check && pnpm generate:host-tool-registry -- --check && pnpm check:native-version-parity && pnpm check:environment-schema && pnpm audit:hardcodes && pnpm audit:deadcode && pnpm audit:circular && pnpm audit:types && pnpm audit:security && pnpm audit:i18n",
58
+ "check:strict": "pnpm check && pnpm generate:host-tool-registry -- --check && pnpm check:environment-schema && pnpm audit:hardcodes && pnpm audit:deadcode && pnpm audit:circular && pnpm audit:types && pnpm audit:security && pnpm audit:i18n",
94
59
  "check:preflight": "pnpm typecheck && pnpm lint:gate && pnpm format:check && node scripts/check-public-privacy.mjs && node scripts/check-preflight.mjs",
95
60
  "check:reliability": "node scripts/check-reliability-policies.mjs",
96
61
  "check:environment-schema": "node scripts/check-environment-schema.mjs",
@@ -98,7 +63,7 @@
98
63
  "test:migrations": "vitest run tests/storage/corruption-contract.test.ts tests/integration/runtime-storage.test.ts tests/integration/canonical-storage-migration.test.ts",
99
64
  "test:fault-injection": "vitest run tests/engine/auto-updater/atomic-upgrade.test.ts tests/integration/durable-job-runtime.test.ts tests/integration/idempotent-operations.test.ts",
100
65
  "check:website-public-assets": "node scripts/check-website-public-assets.mjs",
101
- "check:public-privacy": "node scripts/check-public-privacy.mjs && node scripts/check-native-signing-privacy.mjs",
66
+ "check:public-privacy": "node scripts/check-public-privacy.mjs",
102
67
  "check:readme-parity": "node scripts/check-readme-parity.mjs --package-root .",
103
68
  "privacy:prepublish": "node scripts/check-prepublish-privacy.mjs --package-root .",
104
69
  "generate:website-proof": "node scripts/generate-website-proof.mjs",
@@ -176,7 +141,6 @@
176
141
  "@commitlint/config-conventional": "^21.2.0",
177
142
  "@eslint/js": "^10.0.1",
178
143
  "@lhci/cli": "0.15.1",
179
- "@napi-rs/cli": "3.8.2",
180
144
  "@noble/hashes": "2.2.0",
181
145
  "@playwright/test": "1.62.1",
182
146
  "@scure/base": "2.2.0",
package/planu-plugin.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dev.planu.cli",
3
3
  "displayName": "Planu — Spec Driven Development",
4
4
  "description": "Manage software specs, estimations, and autonomous SDD workflows. Language-agnostic MCP server for Claude Code.",
5
- "version": "5.3.26",
5
+ "version": "5.3.28",
6
6
  "icon": "assets/plugin/icon.svg",
7
7
  "command": ["npx", "@planu/cli@latest"],
8
8
  "packageName": "@planu/cli",
@@ -1,3 +0,0 @@
1
- -----BEGIN PUBLIC KEY-----
2
- MCowBQYDK2VwAyEAxEphEcoGPysItgE7nFfqo8pDvXOlNcKKt0KkJ3wiqz4=
3
- -----END PUBLIC KEY-----
@@ -1,87 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "binaryName": "planu-core",
4
- "packageScope": "@planu/core",
5
- "targets": [
6
- {
7
- "directory": "darwin-arm64",
8
- "package": "@planu/core-darwin-arm64",
9
- "rustTarget": "aarch64-apple-darwin",
10
- "runtimeTarget": "darwin-arm64",
11
- "platform": "darwin",
12
- "arch": "arm64",
13
- "libc": null,
14
- "runner": "macos-15"
15
- },
16
- {
17
- "directory": "darwin-x64",
18
- "package": "@planu/core-darwin-x64",
19
- "rustTarget": "x86_64-apple-darwin",
20
- "runtimeTarget": "darwin-x64",
21
- "platform": "darwin",
22
- "arch": "x64",
23
- "libc": null,
24
- "runner": "macos-15-intel"
25
- },
26
- {
27
- "directory": "linux-arm64-gnu",
28
- "package": "@planu/core-linux-arm64-gnu",
29
- "rustTarget": "aarch64-unknown-linux-gnu",
30
- "runtimeTarget": "linux-arm64-glibc",
31
- "platform": "linux",
32
- "arch": "arm64",
33
- "libc": "glibc",
34
- "runner": "ubuntu-24.04-arm"
35
- },
36
- {
37
- "directory": "linux-arm64-musl",
38
- "package": "@planu/core-linux-arm64-musl",
39
- "rustTarget": "aarch64-unknown-linux-musl",
40
- "runtimeTarget": "linux-arm64-musl",
41
- "platform": "linux",
42
- "arch": "arm64",
43
- "libc": "musl",
44
- "runner": "ubuntu-24.04-arm"
45
- },
46
- {
47
- "directory": "linux-x64-gnu",
48
- "package": "@planu/core-linux-x64-gnu",
49
- "rustTarget": "x86_64-unknown-linux-gnu",
50
- "runtimeTarget": "linux-x64-glibc",
51
- "platform": "linux",
52
- "arch": "x64",
53
- "libc": "glibc",
54
- "runner": "ubuntu-24.04"
55
- },
56
- {
57
- "directory": "linux-x64-musl",
58
- "package": "@planu/core-linux-x64-musl",
59
- "rustTarget": "x86_64-unknown-linux-musl",
60
- "runtimeTarget": "linux-x64-musl",
61
- "platform": "linux",
62
- "arch": "x64",
63
- "libc": "musl",
64
- "runner": "ubuntu-24.04"
65
- },
66
- {
67
- "directory": "win32-arm64-msvc",
68
- "package": "@planu/core-win32-arm64-msvc",
69
- "rustTarget": "aarch64-pc-windows-msvc",
70
- "runtimeTarget": "win32-arm64",
71
- "platform": "win32",
72
- "arch": "arm64",
73
- "libc": null,
74
- "runner": "windows-11-arm"
75
- },
76
- {
77
- "directory": "win32-x64-msvc",
78
- "package": "@planu/core-win32-x64-msvc",
79
- "rustTarget": "x86_64-pc-windows-msvc",
80
- "runtimeTarget": "win32-x64",
81
- "platform": "win32",
82
- "arch": "x64",
83
- "libc": null,
84
- "runner": "windows-2025"
85
- }
86
- ]
87
- }
@@ -1,16 +0,0 @@
1
- import type { DurableJobExecutorOptions } from '../../types/durable-job.js';
2
- import type { DurableJobRecord } from '../../storage/runtime-db.js';
3
- /** Claims and executes allowlisted native jobs while preserving lease and cancellation fencing. */
4
- export declare class DurableJobExecutor {
5
- private readonly runtime;
6
- private readonly workerId;
7
- private readonly leaseMs;
8
- private readonly heartbeatMs;
9
- private readonly maxConcurrency;
10
- private readonly runNative;
11
- constructor(options: DurableJobExecutorOptions);
12
- /** Execute one bounded batch. Jobs not claimed by this worker remain untouched. */
13
- runOnce(projectId: string, workspaceId?: string): Promise<readonly DurableJobRecord[]>;
14
- private execute;
15
- }
16
- //# sourceMappingURL=job-executor.d.ts.map