@dailephd/my-frontend-observer 0.8.1 → 0.9.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 (107) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +107 -7
  3. package/dist/application/projectWorkflowService.d.ts +18 -1
  4. package/dist/application/projectWorkflowService.js +40 -2
  5. package/dist/application/projectWorkflowService.js.map +1 -1
  6. package/dist/application/visualAnnotationContractPromotionService.d.ts +41 -0
  7. package/dist/application/visualAnnotationContractPromotionService.js +143 -0
  8. package/dist/application/visualAnnotationContractPromotionService.js.map +1 -0
  9. package/dist/application/visualAnnotationPersistenceService.d.ts +34 -0
  10. package/dist/application/visualAnnotationPersistenceService.js +68 -0
  11. package/dist/application/visualAnnotationPersistenceService.js.map +1 -0
  12. package/dist/application/visualAnnotationReferenceMaterializationService.d.ts +53 -0
  13. package/dist/application/visualAnnotationReferenceMaterializationService.js +194 -0
  14. package/dist/application/visualAnnotationReferenceMaterializationService.js.map +1 -0
  15. package/dist/artifacts/visualAnnotationArtifactReader.d.ts +19 -0
  16. package/dist/artifacts/visualAnnotationArtifactReader.js +66 -0
  17. package/dist/artifacts/visualAnnotationArtifactReader.js.map +1 -0
  18. package/dist/artifacts/visualAnnotationArtifactWriter.d.ts +42 -0
  19. package/dist/artifacts/visualAnnotationArtifactWriter.js +85 -0
  20. package/dist/artifacts/visualAnnotationArtifactWriter.js.map +1 -0
  21. package/dist/cli.js +464 -454
  22. package/dist/cli.js.map +1 -1
  23. package/dist/domain/visualAnnotation.d.ts +217 -0
  24. package/dist/domain/visualAnnotation.js +584 -0
  25. package/dist/domain/visualAnnotation.js.map +1 -0
  26. package/dist/domain/visualAnnotationIdentity.d.ts +17 -0
  27. package/dist/domain/visualAnnotationIdentity.js +47 -0
  28. package/dist/domain/visualAnnotationIdentity.js.map +1 -0
  29. package/dist/index.d.ts +11 -0
  30. package/dist/index.js +6 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/projectWorkflow/projectPaths.d.ts +9 -0
  33. package/dist/projectWorkflow/projectPaths.js +21 -0
  34. package/dist/projectWorkflow/projectPaths.js.map +1 -1
  35. package/dist/viewer/assets/{index-CN_yb9Uf.css → index-BN41MI7m.css} +1 -1
  36. package/dist/viewer/assets/index-CkKXnlrI.js +9 -0
  37. package/dist/viewer/index.html +2 -2
  38. package/dist/viewer/sw.js +1 -1
  39. package/dist/viewerServer/annotationAuthoring.d.ts +64 -0
  40. package/dist/viewerServer/annotationAuthoring.js +230 -0
  41. package/dist/viewerServer/annotationAuthoring.js.map +1 -0
  42. package/dist/viewerServer/annotationContractPromotion.d.ts +51 -0
  43. package/dist/viewerServer/annotationContractPromotion.js +105 -0
  44. package/dist/viewerServer/annotationContractPromotion.js.map +1 -0
  45. package/dist/viewerServer/annotationReferenceMaterialization.d.ts +40 -0
  46. package/dist/viewerServer/annotationReferenceMaterialization.js +91 -0
  47. package/dist/viewerServer/annotationReferenceMaterialization.js.map +1 -0
  48. package/dist/viewerServer/authoringSecurity.d.ts +59 -0
  49. package/dist/viewerServer/authoringSecurity.js +112 -0
  50. package/dist/viewerServer/authoringSecurity.js.map +1 -0
  51. package/dist/viewerServer/evidence/annotationView.d.ts +28 -0
  52. package/dist/viewerServer/evidence/annotationView.js +43 -0
  53. package/dist/viewerServer/evidence/annotationView.js.map +1 -0
  54. package/dist/viewerServer/evidence/classify.d.ts +3 -1
  55. package/dist/viewerServer/evidence/classify.js +12 -0
  56. package/dist/viewerServer/evidence/classify.js.map +1 -1
  57. package/dist/viewerServer/evidence/discovery.d.ts +2 -0
  58. package/dist/viewerServer/evidence/discovery.js +6 -0
  59. package/dist/viewerServer/evidence/discovery.js.map +1 -1
  60. package/dist/viewerServer/evidence/handles.js +1 -0
  61. package/dist/viewerServer/evidence/handles.js.map +1 -1
  62. package/dist/viewerServer/evidence/index.d.ts +29 -0
  63. package/dist/viewerServer/evidence/index.js +43 -1
  64. package/dist/viewerServer/evidence/index.js.map +1 -1
  65. package/dist/viewerServer/evidence/mediaResolver.d.ts +1 -1
  66. package/dist/viewerServer/evidence/mediaResolver.js +28 -2
  67. package/dist/viewerServer/evidence/mediaResolver.js.map +1 -1
  68. package/dist/viewerServer/evidence/projection.d.ts +5 -1
  69. package/dist/viewerServer/evidence/projection.js +19 -0
  70. package/dist/viewerServer/evidence/projection.js.map +1 -1
  71. package/dist/viewerServer/httpServer.d.ts +13 -2
  72. package/dist/viewerServer/httpServer.js +278 -4
  73. package/dist/viewerServer/httpServer.js.map +1 -1
  74. package/dist/viewerServer/viewerService.d.ts +8 -0
  75. package/dist/viewerServer/viewerService.js +38 -2
  76. package/dist/viewerServer/viewerService.js.map +1 -1
  77. package/docs/ARCHITECTURE.md +108 -21
  78. package/docs/CI_CD.md +57 -1
  79. package/docs/COMMANDS.md +44 -4
  80. package/docs/CONTRACTS.md +78 -8
  81. package/docs/CURRENT_STATE.md +157 -35
  82. package/docs/DEVELOPMENT.md +8 -3
  83. package/docs/PROJECT_DESCRIPTION.md +4 -1
  84. package/docs/PROJECT_MILESTONES.md +4 -0
  85. package/docs/PROJECT_OVERVIEW.md +41 -17
  86. package/docs/QUICKSTART.md +52 -39
  87. package/docs/RELEASE.md +16 -11
  88. package/docs/ROADMAP.md +406 -66
  89. package/docs/SECURITY.md +71 -14
  90. package/docs/WORKFLOWS.md +151 -23
  91. package/docs/plans/v0.9-implementation-plan.md +1529 -0
  92. package/docs/reports/v0.9-architecture-retrieval.md +567 -0
  93. package/docs/reports/v0.9-batch1-visual-annotation-foundation.md +351 -0
  94. package/docs/reports/v0.9-batch2-viewer-annotation-authoring-boundary.md +438 -0
  95. package/docs/reports/v0.9-batch3-runtime-screenshot-annotation-authoring.md +412 -0
  96. package/docs/reports/v0.9-batch4-external-reference-annotation-authoring.md +452 -0
  97. package/docs/reports/v0.9-batch5-runtime-intent-contract-promotion.md +535 -0
  98. package/docs/reports/v0.9-batch6-reference-materialization.md +514 -0
  99. package/docs/reports/v0.9-batch7-integrated-acceptance.md +644 -0
  100. package/docs/reports/v0.9-demo-foundation.md +589 -0
  101. package/docs/reports/v0.9-final-pre-release-readiness.md +209 -0
  102. package/docs/reports/v0.9-final-readiness-corrections.md +530 -0
  103. package/docs/reports/v0.9-pre-release-readiness.md +170 -0
  104. package/docs/reports/v0.9-tutorial-end-to-end-acceptance.md +980 -0
  105. package/docs/reports/v0.9-tutorial-integration.md +731 -0
  106. package/package.json +2 -2
  107. package/dist/viewer/assets/index-D98S1_2d.js +0 -9
package/docs/WORKFLOWS.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Workflows
2
2
 
3
+ Cross-repository composition is centralized in [my-dev-kit's ecosystem guide](https://github.com/dailephd/my-dev-kit/blob/main/docs/ECOSYSTEM_DEVELOPMENT_WORKFLOWS.md), especially the [command-surface compatibility map](https://github.com/dailephd/my-dev-kit/blob/main/docs/ECOSYSTEM_DEVELOPMENT_WORKFLOWS.md#915-command-surface-compatibility-map). That map covers static-to-runtime correlation, Lab tutorial/reference handoffs, Orchestrator consumption, and combinations that are deliberately not direct artifact pipes.
4
+
3
5
  ## Project and coding-agent workflow
4
6
 
5
7
  ```text
@@ -30,13 +32,13 @@ install dependencies (npm install; npx playwright install chromium)
30
32
  → validate documentation (npm run check:docs)
31
33
  ```
32
34
 
33
- ## Current observation workflow (published and current in 0.7.0)
35
+ ## Current observation workflow (supported in 0.9.0)
34
36
 
35
- The real `observe` workflow remains part of the published
36
- `my-frontend-observer@0.7.0` package. Its browser-observation behavior was
37
- established in earlier releases and remains unchanged by v0.6/v0.7. It accepts target
38
- configuration through either of two input paths, plus one optional runtime
39
- scroll scenario:
37
+ The real `observe` workflow remains supported in the current published
38
+ `my-frontend-observer@0.9.0` package. Its browser-observation behavior was
39
+ established in earlier releases; later project/viewer releases compose it
40
+ rather than replacing it. It accepts target configuration through either of
41
+ two input paths, plus one optional runtime scroll scenario:
40
42
 
41
43
  ```text
42
44
  CLI arguments (--url, --viewport, --output, --timeout, exactly one of:
@@ -83,10 +85,10 @@ temporary consumer directory outside the repository, on Windows, Linux, and
83
85
  macOS (`scripts/ci/runPackedObservationSmoke.mjs`) - the same workflow,
84
86
  independent of the source checkout.
85
87
 
86
- ## Current comparison workflow (published and current in 0.7.0)
88
+ ## Current comparison workflow (supported in 0.9.0)
87
89
 
88
90
  **Current status: shipped originally as part of
89
- `my-frontend-observer@0.4.0` and unchanged through `0.7.0`.** This is a
91
+ `my-frontend-observer@0.4.0` and remains supported in `0.9.0`.** This is a
90
92
  separate workflow from the observation workflow above - it consumes two
91
93
  already-persisted observation artifacts rather than producing one, and it
92
94
  never launches a browser:
@@ -132,10 +134,10 @@ fixture (`scripts/dev/builtCliCompareSmoke.mjs`), and packed-tarball
132
134
  validation of the installed `compare` command
133
135
  (`scripts/ci/runPackedObservationSmoke.mjs` - see `docs/CI_CD.md`).
134
136
 
135
- ## Current frontend contract workflow (published and current in 0.7.0)
137
+ ## Current frontend contract workflow (supported in 0.9.0)
136
138
 
137
- This text/config-driven workflow shipped in `0.5.0` and remains current in
138
- `0.7.0`. It is layered downstream of the two workflows above - it does not
139
+ This text/config-driven workflow shipped in `0.5.0` and remains supported in
140
+ `0.9.0`. It is layered downstream of the two workflows above - it does not
139
141
  replace them. The complete v0.7 coding-agent workflow (the external-reference
140
142
  evidence foundation and end-to-end correction loop) is layered on top of
141
143
  it - see "Current external-reference foundation workflow" and "Current
@@ -560,11 +562,134 @@ started with. See `docs/COMMANDS.md#view` for the full flag reference and
560
562
  `docs/ARCHITECTURE.md` "v0.8 Batch 1" through "v0.8 Batch 8" for the
561
563
  implementation record.
562
564
 
563
- ## Future workflows (v0.9–v0.10)
565
+ ## Current visual annotation workflow (released in 0.9.0)
566
+
567
+ v0.9 visual annotation is released in `@dailephd/my-frontend-observer@0.9.0`.
568
+ Authoring works only in the
569
+ project-aware viewer (`my-frontend-observer view` inside an initialized
570
+ project). `view --root <root>` inspects the same evidence read-only.
571
+
572
+ ### Runtime visual flow
573
+
574
+ ```text
575
+ project-aware view
576
+ → select a runtime observation
577
+ → draw a point, rectangle, line, arrow, or note (runtime CSS pixels)
578
+ → explicitly associate a runtime target or canonical runtime relationship
579
+ → choose candidate intent (inspect, move, resize, remove, or preserve)
580
+ → explicitly confirm the intent
581
+ → save an immutable VisualAnnotationArtifact
582
+ → select confirmed supported intent (move, resize, or preserve)
583
+ → promote into a normal canonical PerChangeContract
584
+ → optionally, explicitly activate that contract for project check
585
+ → existing check and the existing contract evaluator produce the verdict
586
+ ```
587
+
588
+ Notes and `inspect` intent stay informational. A free mark with no explicit
589
+ association never becomes a target association or a contract clause.
590
+ Confirmed `remove` intent is saved but cannot be promoted, because the current
591
+ contract vocabulary has no target-absent primitive. The promotion categories
592
+ are the existing requested, expected-dependent, protected, and preserved
593
+ categories. `unexpected` stays evaluator-derived.
594
+
595
+ ### Reference visual flow
596
+
597
+ ```text
598
+ project-aware view
599
+ → select an imported or approved external reference
600
+ → draw marks (reference-image pixels)
601
+ → explicitly associate a reference region or canonical region relationship
602
+ → choose a candidate region create or refine, or a candidate reference
603
+ requirement (region-property, region-relationship, or region-measurement)
604
+ → explicitly confirm the intent
605
+ → save an immutable VisualAnnotationArtifact
606
+ → select confirmed materializable items
607
+ → materialize a new imported external-reference revision that supersedes the
608
+ source reference
609
+ → explicit approval stays separate (the existing approve-reference command)
610
+ ```
611
+
612
+ Informational and asset-sensitive intent is never materialized. The source
613
+ reference and its image are never changed. The new revision reuses the exact
614
+ source image bytes, keeps the source regions, requirements, applicability, and
615
+ label, and is never approved automatically. Project reference acceptance is
616
+ not changed.
617
+
618
+ ### Revisions and missing sources
619
+
620
+ Editing a saved annotation and saving again creates a child revision that
621
+ supersedes its parent. Saving another child from a stale parent fails with a
622
+ conflict and keeps the draft. If a saved annotation's source evidence
623
+ disappears, the annotation stays inspectable and its source is reported as
624
+ `unavailable`. No replacement source is guessed.
625
+
626
+ v0.10 correction orchestration (automatic coding-agent runs, rerender loops,
627
+ and automatic approvals) is not implemented.
628
+
629
+ ## Developer tutorial-generation workflow (v0.9 demo, not a product command)
564
630
 
565
- The still-future sequence on top of the v0.7/v0.8 foundation above preserves
566
- the current engines and lets later graphical interfaces consume rather than
567
- invent the reference model:
631
+ This is a contributor workflow for producing the v0.9 tutorial videos. It is
632
+ not part of the product, and Observer has no `tutorial` command.
633
+
634
+ ```text
635
+ Observer demo and scenario (examples/v09-demo/)
636
+ ↓
637
+ generate TutorialTargetContractV1 (generate-tutorial-target.mjs)
638
+ ↓
639
+ my-dev-kit-lab tutorial validate
640
+ ↓
641
+ my-dev-kit-lab tutorial run
642
+ ↓
643
+ disposable target (prepared through canonical Observer commands)
644
+ ↓
645
+ WebM + screenshots + SRT/VTT + Markdown + manifest
646
+ ```
647
+
648
+ Ownership boundary:
649
+
650
+ 1. Observer owns the demo application, the four scenario files, the
651
+ target-contract generator, and the prepare command. Prepare builds each
652
+ disposable project only through the canonical Observer CLI: `init`,
653
+ `capture baseline`, `approve-baseline`, `save-change-contract`,
654
+ `import-reference`, and `approve-reference`, as the scenario needs.
655
+ 2. `@dailephd/my-dev-kit-lab@0.4.9` owns everything tutorial-specific: scenario
656
+ validation, process lifecycle, the browser session, the cursor, callouts,
657
+ video recording, subtitles, Markdown, and the tutorial manifest. It is an
658
+ external tool run through `npx`, not an Observer dependency.
659
+ 3. The tutorial drives the ordinary project-aware viewer through real pointer,
660
+ keyboard and select input. Native `<select>` values are chosen with the
661
+ lab's `select-option` action, which names the HTML option value, so no step
662
+ depends on how a platform steps a dropdown. Correctness is proved by reading
663
+ the canonical evidence the run wrote into the disposable target, not by the
664
+ video.
665
+
666
+ Steps:
667
+
668
+ ```powershell
669
+ npm run build
670
+ node examples/v09-demo/scripts/generate-tutorial-target.mjs `
671
+ --scenario observer-v09-runtime-contract `
672
+ --out .my-dev-kit-workflow/adhoc/target-contract.json
673
+ npx --yes @dailephd/my-dev-kit-lab@0.4.9 tutorial validate `
674
+ --scenario examples/v09-demo/tutorials/02-runtime-intent-contract.json `
675
+ --target-contract .my-dev-kit-workflow/adhoc/target-contract.json --json
676
+ npx --yes @dailephd/my-dev-kit-lab@0.4.9 tutorial run `
677
+ --scenario examples/v09-demo/tutorials/02-runtime-intent-contract.json `
678
+ --target-contract .my-dev-kit-workflow/adhoc/target-contract.json `
679
+ --out <run directory outside the repository> --json
680
+ ```
681
+
682
+ Generate the contract immediately before each run, because its loopback ports
683
+ are only known to be free when they are chosen. Send `--out` outside the
684
+ repository. The run result's `status` must be `passed` and its
685
+ `cleanupErrors` must be empty. The demo and scenarios are not in the npm
686
+ package. See `examples/v09-demo/README.md` for details and maintenance notes.
687
+
688
+ ## Visual workflow progression (v0.9 implemented, v0.10 future)
689
+
690
+ The sequence on top of the v0.7/v0.8 foundation above preserves the current
691
+ engines and lets graphical interfaces consume rather than invent the reference
692
+ model. v0.9 is released as `0.9.0`. v0.10 is still future:
568
693
 
569
694
  ```text
570
695
  stable targets and bounded runtime behavior
@@ -582,6 +707,7 @@ stable targets and bounded runtime behavior
582
707
  → v0.8 interactive viewer with reference/candidate inspection (released as
583
708
  package version `0.8.0` - see "Current interactive viewer workflow" above)
584
709
  → v0.9 structured visual annotation on runtime screenshots and references
710
+ (released as `0.9.0` - see "Current visual annotation workflow" above)
585
711
  → v0.10 full visual human–LLM workflow with both actual-frontend-driven and
586
712
  reference-driven entry modes
587
713
  ```
@@ -629,14 +755,16 @@ than fabricated visual failures.
629
755
 
630
756
  The v0.7 coding-agent workflow and reference foundation are released as
631
757
  part of this repository and work without the v0.8 viewer or v0.9
632
- annotation system. v0.8, implemented in the current repository (not yet
633
- released), consumes the v0.7 reference/evaluation model exactly as
634
- required - it does not create a second UI-only one (see "Current
635
- interactive viewer workflow" above). v0.9 remains future and must preserve
636
- the same constraint when implemented.
637
- # v0.8.1 release workflow
638
-
639
- The published package is `@dailephd/my-frontend-observer@0.8.1`; install it
758
+ annotation system. v0.8, released as `0.8.0`, consumes the v0.7
759
+ reference/evaluation model exactly as required - it does not create a second
760
+ UI-only one (see "Current interactive viewer workflow" above). v0.9,
761
+ released as `0.9.0`, preserves the same constraint: promotion and
762
+ materialization go through the existing canonical contract and
763
+ external-reference services.
764
+
765
+ ## Current release workflow
766
+
767
+ The published package is `@dailephd/my-frontend-observer@0.9.0`; install it
640
768
  with npm and use the `my-frontend-observer` CLI. The ordinary workflow is
641
769
  `init`, `capture baseline`, `check baseline`, then `view`. Existing sections
642
770
  below retain the historical low-level and viewer workflows for compatibility.