@dailephd/my-frontend-observer 0.9.1 → 0.10.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +17 -9
  3. package/dist/application/visualChangeAgentHandoffService.d.ts +28 -0
  4. package/dist/application/visualChangeAgentHandoffService.js +111 -0
  5. package/dist/application/visualChangeAgentHandoffService.js.map +1 -0
  6. package/dist/application/visualChangeProjectWorkflowService.d.ts +95 -0
  7. package/dist/application/visualChangeProjectWorkflowService.js +376 -0
  8. package/dist/application/visualChangeProjectWorkflowService.js.map +1 -0
  9. package/dist/application/visualChangeReviewService.d.ts +50 -0
  10. package/dist/application/visualChangeReviewService.js +69 -0
  11. package/dist/application/visualChangeReviewService.js.map +1 -0
  12. package/dist/application/visualChangeWorkflowPersistenceService.d.ts +26 -0
  13. package/dist/application/visualChangeWorkflowPersistenceService.js +15 -0
  14. package/dist/application/visualChangeWorkflowPersistenceService.js.map +1 -0
  15. package/dist/artifacts/visualChangeWorkflowArtifactReader.d.ts +9 -0
  16. package/dist/artifacts/visualChangeWorkflowArtifactReader.js +47 -0
  17. package/dist/artifacts/visualChangeWorkflowArtifactReader.js.map +1 -0
  18. package/dist/artifacts/visualChangeWorkflowArtifactWriter.d.ts +20 -0
  19. package/dist/artifacts/visualChangeWorkflowArtifactWriter.js +41 -0
  20. package/dist/artifacts/visualChangeWorkflowArtifactWriter.js.map +1 -0
  21. package/dist/cli.js +510 -508
  22. package/dist/cli.js.map +1 -1
  23. package/dist/domain/visualChangeAgentHandoff.d.ts +82 -0
  24. package/dist/domain/visualChangeAgentHandoff.js +80 -0
  25. package/dist/domain/visualChangeAgentHandoff.js.map +1 -0
  26. package/dist/domain/visualChangeAgentHandoffSerialization.d.ts +2 -0
  27. package/dist/domain/visualChangeAgentHandoffSerialization.js +11 -0
  28. package/dist/domain/visualChangeAgentHandoffSerialization.js.map +1 -0
  29. package/dist/domain/visualChangeCycle.d.ts +8 -0
  30. package/dist/domain/visualChangeCycle.js +7 -0
  31. package/dist/domain/visualChangeCycle.js.map +1 -0
  32. package/dist/domain/visualChangeWorkflow.d.ts +125 -0
  33. package/dist/domain/visualChangeWorkflow.js +109 -0
  34. package/dist/domain/visualChangeWorkflow.js.map +1 -0
  35. package/dist/domain/visualChangeWorkflowIdentity.d.ts +5 -0
  36. package/dist/domain/visualChangeWorkflowIdentity.js +24 -0
  37. package/dist/domain/visualChangeWorkflowIdentity.js.map +1 -0
  38. package/dist/index.d.ts +21 -1
  39. package/dist/index.js +12 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/projectWorkflow/projectPaths.d.ts +3 -0
  42. package/dist/projectWorkflow/projectPaths.js +7 -0
  43. package/dist/projectWorkflow/projectPaths.js.map +1 -1
  44. package/dist/viewer/assets/index-DglJ6f28.css +1 -0
  45. package/dist/viewer/assets/index-DsODREY5.js +9 -0
  46. package/dist/viewer/index.html +2 -2
  47. package/dist/viewer/sw.js +1 -1
  48. package/dist/viewerServer/evidence/classify.d.ts +3 -1
  49. package/dist/viewerServer/evidence/classify.js +10 -0
  50. package/dist/viewerServer/evidence/classify.js.map +1 -1
  51. package/dist/viewerServer/evidence/handles.js +1 -0
  52. package/dist/viewerServer/evidence/handles.js.map +1 -1
  53. package/dist/viewerServer/evidence/projection.d.ts +5 -0
  54. package/dist/viewerServer/evidence/projection.js +19 -0
  55. package/dist/viewerServer/evidence/projection.js.map +1 -1
  56. package/dist/viewerServer/evidence/visualChangeWorkflowView.d.ts +31 -0
  57. package/dist/viewerServer/evidence/visualChangeWorkflowView.js +36 -0
  58. package/dist/viewerServer/evidence/visualChangeWorkflowView.js.map +1 -0
  59. package/dist/viewerServer/httpServer.js +323 -1
  60. package/dist/viewerServer/httpServer.js.map +1 -1
  61. package/dist/viewerServer/referenceApproval.d.ts +22 -0
  62. package/dist/viewerServer/referenceApproval.js +42 -0
  63. package/dist/viewerServer/referenceApproval.js.map +1 -0
  64. package/dist/viewerServer/referenceVisualChangeAuthoring.d.ts +28 -0
  65. package/dist/viewerServer/referenceVisualChangeAuthoring.js +134 -0
  66. package/dist/viewerServer/referenceVisualChangeAuthoring.js.map +1 -0
  67. package/dist/viewerServer/runtimeVisualChangeAuthoring.d.ts +33 -0
  68. package/dist/viewerServer/runtimeVisualChangeAuthoring.js +81 -0
  69. package/dist/viewerServer/runtimeVisualChangeAuthoring.js.map +1 -0
  70. package/dist/viewerServer/visualChangeAuthoring.d.ts +46 -0
  71. package/dist/viewerServer/visualChangeAuthoring.js +63 -0
  72. package/dist/viewerServer/visualChangeAuthoring.js.map +1 -0
  73. package/dist/viewerServer/visualChangeHandoff.d.ts +23 -0
  74. package/dist/viewerServer/visualChangeHandoff.js +31 -0
  75. package/dist/viewerServer/visualChangeHandoff.js.map +1 -0
  76. package/dist/viewerServer/visualChangeReview.d.ts +30 -0
  77. package/dist/viewerServer/visualChangeReview.js +46 -0
  78. package/dist/viewerServer/visualChangeReview.js.map +1 -0
  79. package/docs/ARCHITECTURE.md +17 -5
  80. package/docs/CI_CD.md +12 -1
  81. package/docs/COMMANDS.md +18 -4
  82. package/docs/CONTRACTS.md +38 -4
  83. package/docs/CURRENT_STATE.md +23 -9
  84. package/docs/PROJECT_OVERVIEW.md +21 -16
  85. package/docs/QUICKSTART.md +7 -3
  86. package/docs/RELEASE.md +15 -12
  87. package/docs/ROADMAP.md +6 -5
  88. package/docs/SECURITY.md +25 -3
  89. package/docs/WORKFLOWS.md +28 -2
  90. package/docs/plans/v0.10-implementation-plan.md +1509 -0
  91. package/docs/reports/v0.10-batch1-visual-change-workflow-foundation.md +102 -0
  92. package/docs/reports/v0.10-batch2-project-composition-check-recording.md +103 -0
  93. package/docs/reports/v0.10-batch3-viewer-visual-change-workspace.md +93 -0
  94. package/docs/reports/v0.10-batch4-actual-frontend-entry.md +59 -0
  95. package/docs/reports/v0.10-batch5-reference-driven-entry.md +238 -0
  96. package/docs/reports/v0.10-batch6-coding-agent-handoff.md +85 -0
  97. package/docs/reports/v0.10-batch7-correction-review-acceptance.md +145 -0
  98. package/docs/reports/v0.10-batch8-integrated-acceptance.md +109 -0
  99. package/docs/reports/v0.10-implementation-completeness-documentation-reconciliation.md +344 -0
  100. package/docs/reports/v0.10-pre-release-readiness.md +120 -0
  101. package/docs/reports/v0.10-release-preparation.md +70 -0
  102. package/package.json +1 -1
  103. package/dist/viewer/assets/index-BN41MI7m.css +0 -1
  104. package/dist/viewer/assets/index-CkKXnlrI.js +0 -9
package/CHANGELOG.md CHANGED
@@ -2,7 +2,15 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- Future development.
5
+ ## 0.10.0 - 2026-09-23
6
+
7
+ Shipped the full Visual Change workflow in the project-aware Viewer. People
8
+ can start from an actual frontend or approved reference, confirm and explicitly
9
+ activate scope, and prepare a bounded coding-agent handoff. Immutable check
10
+ attempts support correction; human acceptance requires the latest canonical
11
+ check to PASS, while governance remains separate. Installed-package and Viewer
12
+ support are included. Security and PWA boundaries remain intact: Observer does
13
+ not edit source or grant automatic approval.
6
14
 
7
15
  ## 0.9.1 - 2026-09-21
8
16
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # my-frontend-observer
2
2
 
3
- ## Common project workflow (v0.9.1)
3
+ ## Common project workflow (v0.10.0)
4
4
 
5
5
  ```powershell
6
6
  my-frontend-observer init --url http://127.0.0.1:3000 --target app=#app
@@ -17,21 +17,29 @@ my-frontend-observer view
17
17
  `1`, `2`, or `3` for `PASS`, `FAIL`, `REVIEW_REQUIRED`, or `BLOCKED`.
18
18
  Canonical hashes remain available in viewer details and persisted provenance,
19
19
  but are not normal workflow command inputs. The existing low-level commands
20
- remain supported. v0.9.1 is the current published release.
20
+ remain supported. v0.10.0 is the current release.
21
21
 
22
- v0.9.1 is a maintenance release that hardens independent PWA security-gate
23
- validation without changing production PWA behavior.
22
+ v0.10.0 completes the Visual Change workflow described below.
24
23
 
25
24
  `my-frontend-observer` is the local-first rendered browser/runtime evidence
26
25
  producer in the my-dev-kit ecosystem. Its durable product purpose is defined
27
26
  in [docs/PROJECT_DESCRIPTION.md](docs/PROJECT_DESCRIPTION.md). Whole-ecosystem
28
27
  composition is documented in the [my-dev-kit ecosystem guide](https://github.com/dailephd/my-dev-kit/blob/main/docs/ECOSYSTEM_DEVELOPMENT_WORKFLOWS.md), including the [command-surface compatibility map](https://github.com/dailephd/my-dev-kit/blob/main/docs/ECOSYSTEM_DEVELOPMENT_WORKFLOWS.md#915-command-surface-compatibility-map).
29
28
 
29
+ From a project-aware `view` session, a human can begin from an actual runtime
30
+ capture
31
+ or an approved reference, explicitly confirm structured visual intent, create
32
+ and activate a frozen workflow, prepare a bounded handoff, let an external
33
+ actor edit source, run the canonical `check <baseline> --json`, request another
34
+ correction or accept the latest PASS, and optionally record separately created
35
+ governance results. Observer never edits source, and acceptance never silently
36
+ approves a baseline or reference.
37
+
30
38
  ## Current status
31
39
 
32
- `v0.9.1`, PWA Hard-Gate Isolation and Reproducible Security Acceptance, is the
33
- current published release. It preserves the `v0.9.0` Human Visual Annotation
34
- and Design-Intent Capture release and builds on `v0.8.1`, Project Workflow CLI and
40
+ `v0.10.0`, Full Visual Human–LLM Frontend Change Workflow, is the current
41
+ release. It preserves the `v0.9.1` PWA hard-gate isolation and the `v0.9.0`
42
+ Human Visual Annotation and Design-Intent Capture releases and builds on `v0.8.1`, Project Workflow CLI and
35
43
  Human-Readable Evidence Aliases, `v0.8.0`, Interactive Local Observation
36
44
  Viewer, and `v0.7.0`, End-to-End Coding-Agent Frontend Change
37
45
  Review, `v0.6.0`, Bounded Agent Context and Native my-dev-kit Ecosystem
@@ -349,8 +357,8 @@ Planning authorities:
349
357
  intent and responsibility boundaries.
350
358
  - [Project Milestones](docs/PROJECT_MILESTONES.md): complete ordered capability
351
359
  design and cross-milestone rules.
352
- - [ROADMAP](docs/ROADMAP.md): version-level requirements; v0.1-v0.9.1 are
353
- released; v0.10 remains future.
360
+ - [ROADMAP](docs/ROADMAP.md): version-level requirements; v0.1-v0.10 are
361
+ released.
354
362
  - [Current State](docs/CURRENT_STATE.md): retained scaffold and release state.
355
363
 
356
364
  No sibling ecosystem repository is a runtime dependency of the retained
@@ -0,0 +1,28 @@
1
+ import type { BoundedAgentContextArtifact } from '../domain/boundedAgentContext.js';
2
+ import type { VisualChangeAgentHandoff, VisualChangeExternalCoordination } from '../domain/visualChangeAgentHandoff.js';
3
+ export type PrepareVisualChangeAgentHandoffFailureCode = 'workflow-invalid' | 'workflow-inactive' | 'workflow-restored' | 'acceptance-drift' | 'baseline-drift' | 'evidence-unavailable' | 'reference-not-evaluable' | 'unsupported-context' | 'context-mismatch' | 'bounded-context-failed' | 'invalid-handoff' | 'review-required' | 'workflow-accepted' | 'workflow-abandoned';
4
+ export type PrepareVisualChangeAgentHandoffResult = {
5
+ ok: true;
6
+ handoff: VisualChangeAgentHandoff;
7
+ } | {
8
+ ok: false;
9
+ code: PrepareVisualChangeAgentHandoffFailureCode;
10
+ reason: string;
11
+ };
12
+ export interface PrepareVisualChangeAgentHandoffInput {
13
+ projectRoot: string;
14
+ workflowManifestPath: string;
15
+ context: {
16
+ status: 'none';
17
+ } | {
18
+ status: 'unsupported-version';
19
+ foundSchemaVersion: string;
20
+ } | {
21
+ status: 'valid';
22
+ artifact: BoundedAgentContextArtifact;
23
+ };
24
+ generatedAt: string;
25
+ producerVersion: string;
26
+ coordination?: VisualChangeExternalCoordination;
27
+ }
28
+ export declare function prepareVisualChangeAgentHandoff(input: PrepareVisualChangeAgentHandoffInput): Promise<PrepareVisualChangeAgentHandoffResult>;
@@ -0,0 +1,111 @@
1
+ import path from 'node:path';
2
+ import { readObservationArtifact } from '../artifacts/artifactReader.js';
3
+ import { readExternalReferenceArtifact } from '../artifacts/externalReferenceArtifactReader.js';
4
+ import { readPerChangeContract, readPersistentBaselineContract } from '../artifacts/frontendContractArtifactReader.js';
5
+ import { projectBoundedAgentContext } from '../domain/boundedAgentContextProjection.js';
6
+ import { evaluateReferenceCandidateFidelity } from '../domain/externalReferenceFidelity.js';
7
+ import { prepareReferenceCorrection } from '../domain/referenceCorrectionWorkflow.js';
8
+ import { VISUAL_CHANGE_AGENT_HANDOFF_KIND, VISUAL_CHANGE_AGENT_HANDOFF_VERSION, isValidVisualChangeAgentHandoff } from '../domain/visualChangeAgentHandoff.js';
9
+ import { resolveContainedAcceptancePath } from '../projectWorkflow/checkAcceptance.js';
10
+ import { prepareActiveVisualChangeWorkflow, readProjectVisualChangeCycle } from './visualChangeProjectWorkflowService.js';
11
+ const fail = (code, reason) => ({ ok: false, code, reason });
12
+ function manifest(projectRoot, portable) { const resolved = resolveContainedAcceptancePath(projectRoot, portable); return resolved.ok ? path.join(resolved.path, 'manifest.json') : undefined; }
13
+ function contextCoherent(context, scope) {
14
+ if (!context.sources.observationIds.includes(scope.baselineObservation.observationId))
15
+ return false;
16
+ if (scope.entryMode === 'actual-frontend')
17
+ return (context.sources.baselineContractId === undefined || context.sources.baselineContractId === scope.baselineContract.baselineId) && (context.sources.changeContractId === undefined || context.sources.changeContractId === scope.changeContract.contractId);
18
+ return (context.sources.baselineContractId === undefined || context.sources.baselineContractId === scope.baselineContract?.baselineId) && (context.sources.referenceId === undefined || context.sources.referenceId === scope.approvedReference.referenceId) && (context.sources.referenceRequestId === undefined || context.sources.referenceRequestId === scope.approvedReference.referenceRequestId);
19
+ }
20
+ export async function prepareVisualChangeAgentHandoff(input) {
21
+ const preflight = await readProjectVisualChangeCycle(input.projectRoot, input.workflowManifestPath);
22
+ if (!preflight.ok)
23
+ return fail('workflow-invalid', preflight.reason);
24
+ if (preflight.cycle === 'review-required')
25
+ return fail('review-required', 'the latest attempt requires explicit human review before another handoff');
26
+ if (preflight.cycle === 'accepted')
27
+ return fail('workflow-accepted', 'accepted workflow is terminal');
28
+ if (preflight.cycle === 'abandoned')
29
+ return fail('workflow-abandoned', 'abandoned workflow is terminal');
30
+ const ready = await prepareActiveVisualChangeWorkflow(input.projectRoot, input.workflowManifestPath);
31
+ if (!ready.ok) {
32
+ const mapping = { 'activation-not-configured': 'workflow-inactive', 'activation-already-restored': 'workflow-restored', 'acceptance-drift': 'acceptance-drift', 'baseline-drift': 'baseline-drift', 'workflow-invalid': 'workflow-invalid', 'workflow-reference-invalid': 'evidence-unavailable' };
33
+ return fail(mapping[ready.code] ?? 'evidence-unavailable', ready.reason);
34
+ }
35
+ if (input.context.status === 'unsupported-version')
36
+ return fail('unsupported-context', `supplemental context schema ${input.context.foundSchemaVersion} is unsupported`);
37
+ const { projectRoot, workflow, config, baselineAlias } = ready.context;
38
+ const scope = workflow.scope;
39
+ const baselinePath = manifest(projectRoot, scope.baselineObservation.artifactPath);
40
+ const baselineRead = baselinePath === undefined ? undefined : await readObservationArtifact(baselinePath);
41
+ if (baselineRead === undefined || !baselineRead.ok)
42
+ return fail('evidence-unavailable', 'frozen baseline observation is unavailable');
43
+ const observation = baselineRead.artifact;
44
+ let baselineContract;
45
+ if (scope.baselineContract !== undefined) {
46
+ const file = manifest(projectRoot, scope.baselineContract.artifactPath);
47
+ const read = file === undefined ? undefined : await readPersistentBaselineContract(file);
48
+ if (read === undefined || !read.ok)
49
+ return fail('evidence-unavailable', 'frozen baseline contract is unavailable');
50
+ baselineContract = read.contract;
51
+ }
52
+ let activeChangeContract;
53
+ if (config.acceptance?.contract !== undefined) {
54
+ const file = manifest(projectRoot, config.acceptance.contract.changeArtifact);
55
+ const read = file === undefined ? undefined : await readPerChangeContract(file);
56
+ if (read === undefined || !read.ok)
57
+ return fail('evidence-unavailable', 'active change contract is unavailable');
58
+ activeChangeContract = read.contract;
59
+ }
60
+ let confirmedScope;
61
+ let primary;
62
+ let trace;
63
+ if (scope.entryMode === 'actual-frontend') {
64
+ if (baselineContract === undefined)
65
+ return fail('evidence-unavailable', 'actual workflow baseline contract is unavailable');
66
+ const changeFile = manifest(projectRoot, scope.changeContract.artifactPath);
67
+ const changeRead = changeFile === undefined ? undefined : await readPerChangeContract(changeFile);
68
+ if (changeRead === undefined || !changeRead.ok)
69
+ return fail('evidence-unavailable', 'frozen change contract is unavailable');
70
+ confirmedScope = { entryMode: 'actual-frontend', annotationId: scope.annotationId, baselineObservation: { observationId: observation.observationId, requestId: observation.requestId }, baselineContract: { baselineId: baselineContract.baselineId, clauses: baselineContract.clauses }, changeContract: { contractId: changeRead.contract.contractId, contractRequestId: changeRead.contract.contractRequestId, clauses: changeRead.contract.clauses } };
71
+ const projected = projectBoundedAgentContext({ generatedAt: input.generatedAt, producerVersion: input.producerVersion, projectionProfile: 'frontend-change-review', observation, baseline: baselineContract, change: changeRead.contract, focusTargetIds: [] });
72
+ if (!projected.ok)
73
+ return fail('bounded-context-failed', projected.reason);
74
+ primary = projected.artifact;
75
+ }
76
+ else {
77
+ const referenceFile = manifest(projectRoot, scope.approvedReference.artifactPath);
78
+ const referenceRead = referenceFile === undefined ? undefined : await readExternalReferenceArtifact(referenceFile);
79
+ if (referenceRead === undefined || !referenceRead.ok)
80
+ return fail('evidence-unavailable', 'approved reference is unavailable');
81
+ const reference = referenceRead.artifact;
82
+ const fidelityResult = evaluateReferenceCandidateFidelity(reference, observation, scope.bindings);
83
+ if (!fidelityResult.ok || fidelityResult.evaluation.state === 'not-evaluated')
84
+ return fail('reference-not-evaluable', fidelityResult.ok ? 'canonical reference fidelity is not evaluated' : fidelityResult.reason);
85
+ const coherentBaseline = baselineContract !== undefined && baselineContract.sourceObservation.observationId === observation.observationId ? baselineContract : undefined;
86
+ if (baselineContract !== undefined && coherentBaseline === undefined)
87
+ trace = { status: 'not-applicable', reason: 'baseline-contract-source-mismatch' };
88
+ else if (coherentBaseline !== undefined && activeChangeContract !== undefined) {
89
+ const correction = prepareReferenceCorrection({ reference, baselineObservation: observation, currentObservation: observation, baselineContract: coherentBaseline, changeContract: activeChangeContract, bindingDeclarations: scope.bindings, generatedAt: input.generatedAt, producerVersion: input.producerVersion, projectionProfile: 'frontend-change-review' });
90
+ if (!correction.ok)
91
+ return fail('reference-not-evaluable', correction.reason);
92
+ if (correction.status !== 'handoff-ready')
93
+ return fail('reference-not-evaluable', 'canonical reference correction is blocked');
94
+ trace = { status: 'available', reviewRequestId: correction.reviewRequestId };
95
+ }
96
+ else
97
+ trace = { status: 'not-applicable', reason: 'project-contract-context-not-configured' };
98
+ const projected = projectBoundedAgentContext({ generatedAt: input.generatedAt, producerVersion: input.producerVersion, projectionProfile: 'frontend-change-review', observation, fidelity: fidelityResult.evaluation, focusTargetIds: [...new Set(scope.bindings.map((binding) => binding.runtimeTarget))], ...(coherentBaseline === undefined ? {} : { baseline: coherentBaseline }), ...(activeChangeContract === undefined ? {} : { change: activeChangeContract }) });
99
+ if (!projected.ok)
100
+ return fail('bounded-context-failed', projected.reason);
101
+ primary = projected.artifact;
102
+ confirmedScope = { entryMode: 'reference', annotationId: scope.annotationId, baselineObservation: { observationId: observation.observationId, requestId: observation.requestId }, approvedReference: { referenceId: reference.referenceId, referenceRequestId: reference.referenceRequestId, requirements: reference.requirements ?? [] }, bindings: scope.bindings, ...(coherentBaseline === undefined ? {} : { baselineContract: { baselineId: coherentBaseline.baselineId, clauses: coherentBaseline.clauses } }), ...(activeChangeContract === undefined ? {} : { activeChangeContract: { contractId: activeChangeContract.contractId, contractRequestId: activeChangeContract.contractRequestId, clauses: activeChangeContract.clauses } }) };
103
+ }
104
+ const supplemental = input.context.status === 'valid' ? input.context.artifact : undefined;
105
+ if (supplemental !== undefined && !contextCoherent(supplemental, confirmedScope))
106
+ return fail('context-mismatch', 'supplemental context does not match the frozen workflow evidence');
107
+ const verificationPlan = ['Edit target source outside Observer.', `Run my-frontend-observer check ${baselineAlias} --json.`, 'The check captures a fresh current observation and evaluates active contracts.', 'A machine PASS still requires later explicit human review/acceptance.', ...(scope.entryMode === 'reference' ? ['The same approved reference and explicit bindings are re-evaluated.', 'Reference fidelity does not override active frontend-contract failures.'] : [])];
108
+ const handoff = { handoffKind: VISUAL_CHANGE_AGENT_HANDOFF_KIND, handoffVersion: VISUAL_CHANGE_AGENT_HANDOFF_VERSION, visualChangeRequestId: workflow.visualChangeRequestId, visualChangeWorkflowId: workflow.visualChangeWorkflowId, entryMode: scope.entryMode, confirmedScope, boundedAgentContext: primary, ...(supplemental === undefined ? {} : { supplementalContext: supplemental }), ...(trace === undefined ? {} : { referenceCorrection: trace }), verificationPlan, expectedPostEditCheck: { command: 'check', baselineAlias, json: true }, ...(input.coordination === undefined ? {} : { externalCoordination: input.coordination }) };
109
+ return isValidVisualChangeAgentHandoff(handoff) ? { ok: true, handoff } : fail('invalid-handoff', 'constructed handoff failed canonical validation');
110
+ }
111
+ //# sourceMappingURL=visualChangeAgentHandoffService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visualChangeAgentHandoffService.js","sourceRoot":"","sources":["../../src/application/visualChangeAgentHandoffService.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAEvH,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,kCAAkC,EAAE,MAAM,wCAAwC,CAAC;AAE5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAEtF,OAAO,EAAE,gCAAgC,EAAE,mCAAmC,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAC/J,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAM1H,MAAM,IAAI,GAAG,CAAC,IAAgD,EAAE,MAAc,EAAyC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AACxJ,SAAS,QAAQ,CAAC,WAAmB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,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC;IAC9oB,OAAO,+BAA+B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,iDAAiD,CAAC,CAAC;AACvJ,CAAC"}
@@ -0,0 +1,95 @@
1
+ import type { VisualChangeActivationRecord, VisualChangeAttemptRecord, VisualChangeCheckSnapshot, VisualChangeScope, VisualChangeWorkflowArtifact } from '../domain/visualChangeWorkflow.js';
2
+ import type { CheckWorkflowResult } from '../projectWorkflow/checkResult.js';
3
+ import type { FrontendObserverProjectConfig } from '../projectWorkflow/projectConfig.js';
4
+ import { checkProject } from './projectCheckService.js';
5
+ import { persistVisualChangeWorkflow, type PersistVisualChangeWorkflowOptions } from './visualChangeWorkflowPersistenceService.js';
6
+ export type VisualChangeProjectWorkflowFailureCode = 'project-config-invalid' | 'workflow-invalid' | 'workflow-reference-invalid' | 'activation-not-configured' | 'activation-already-restored' | 'baseline-drift' | 'acceptance-drift' | 'check-scope-mismatch' | 'candidate-not-produced' | 'duplicate-attempt' | 'attempt-limit-reached' | 'project-config-write-failure' | 'workflow-persistence-failure' | 'partial-state-failure' | 'review-required' | 'workflow-accepted' | 'workflow-abandoned';
7
+ export interface VisualChangeProjectWorkflowFailure {
8
+ ok: false;
9
+ code: VisualChangeProjectWorkflowFailureCode;
10
+ reason: string;
11
+ check?: CheckWorkflowResult;
12
+ }
13
+ type Persist = typeof persistVisualChangeWorkflow;
14
+ type Check = typeof checkProject;
15
+ export interface VisualChangeProjectWorkflowDependencies {
16
+ persist: Persist;
17
+ check: Check;
18
+ atomicWrite(file: string, text: string): Promise<void>;
19
+ now(): string;
20
+ }
21
+ export interface CreateProjectVisualChangeWorkflowInput {
22
+ projectRoot: string;
23
+ scope: VisualChangeScope;
24
+ createdAt?: string;
25
+ dependencies?: Partial<VisualChangeProjectWorkflowDependencies>;
26
+ }
27
+ export type CreateProjectVisualChangeWorkflowResult = Awaited<ReturnType<Persist>> | VisualChangeProjectWorkflowFailure;
28
+ export declare function createProjectVisualChangeWorkflow(input: CreateProjectVisualChangeWorkflowInput): Promise<CreateProjectVisualChangeWorkflowResult>;
29
+ export declare function persistProjectVisualChangeWorkflowRevision(projectRoot: string, source: VisualChangeWorkflowArtifact, options: Omit<PersistVisualChangeWorkflowOptions, 'scope' | 'outputLocation' | 'cwd' | 'supersedesVisualChangeWorkflowId'>): Promise<import("./visualChangeWorkflowPersistenceService.js").ApplicationPersistVisualChangeWorkflowResult>;
30
+ export interface ProjectVisualChangeMutationInput {
31
+ projectRoot: string;
32
+ workflowManifestPath: string;
33
+ dependencies?: Partial<VisualChangeProjectWorkflowDependencies>;
34
+ }
35
+ export declare function activateProjectVisualChangeWorkflow(input: ProjectVisualChangeMutationInput): Promise<{
36
+ ok: true;
37
+ visualChangeRequestId: string;
38
+ visualChangeWorkflowId: string;
39
+ artifactRoot: string;
40
+ manifestPath: string;
41
+ bindingsPath?: string;
42
+ } | VisualChangeProjectWorkflowFailure>;
43
+ export declare function restoreProjectVisualChangeWorkflowAcceptance(input: ProjectVisualChangeMutationInput): Promise<{
44
+ ok: true;
45
+ visualChangeRequestId: string;
46
+ visualChangeWorkflowId: string;
47
+ artifactRoot: string;
48
+ manifestPath: string;
49
+ bindingsPath?: string;
50
+ } | VisualChangeProjectWorkflowFailure>;
51
+ export interface VerifiedVisualChangeAcceptance {
52
+ activeBaselineContractId?: string;
53
+ activeChangeContractId?: string;
54
+ }
55
+ export declare function projectVisualChangeCheckSnapshot(result: CheckWorkflowResult & {
56
+ baseline: NonNullable<CheckWorkflowResult['baseline']>;
57
+ candidate: NonNullable<CheckWorkflowResult['candidate']>;
58
+ }, verified: VerifiedVisualChangeAcceptance): VisualChangeCheckSnapshot;
59
+ export interface RunProjectVisualChangeCheckInput extends ProjectVisualChangeMutationInput {
60
+ coordination?: VisualChangeAttemptRecord['coordination'];
61
+ }
62
+ export interface ActiveVisualChangeWorkflowContext {
63
+ projectRoot: string;
64
+ workflow: VisualChangeWorkflowArtifact & {
65
+ activation: VisualChangeActivationRecord;
66
+ };
67
+ workflowManifestPath: string;
68
+ config: FrontendObserverProjectConfig;
69
+ baselineAlias: string;
70
+ verifiedContractIds: {
71
+ baselineId?: string;
72
+ changeId?: string;
73
+ };
74
+ }
75
+ export declare function readProjectVisualChangeCycle(projectRootInput: string, workflowManifestPath: string): Promise<VisualChangeProjectWorkflowFailure | {
76
+ ok: true;
77
+ workflow: VisualChangeWorkflowArtifact;
78
+ cycle: import("../domain/visualChangeCycle.js").VisualChangeCycleState;
79
+ }>;
80
+ /** One readiness owner for canonical check recording and on-demand handoff preparation. */
81
+ export declare function prepareActiveVisualChangeWorkflow(projectRootInput: string, workflowManifestPath: string): Promise<{
82
+ ok: true;
83
+ context: ActiveVisualChangeWorkflowContext;
84
+ } | VisualChangeProjectWorkflowFailure>;
85
+ export declare function runProjectVisualChangeCheck(input: RunProjectVisualChangeCheckInput): Promise<VisualChangeProjectWorkflowFailure | {
86
+ check: CheckWorkflowResult;
87
+ attempt: VisualChangeAttemptRecord;
88
+ ok: true;
89
+ visualChangeRequestId: string;
90
+ visualChangeWorkflowId: string;
91
+ artifactRoot: string;
92
+ manifestPath: string;
93
+ bindingsPath?: string;
94
+ }>;
95
+ export {};