project-tiny-context-harness 0.8.16 → 0.11.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/README.md +119 -41
- package/assets/README.md +184 -55
- package/assets/README.zh-CN.md +114 -40
- package/assets/agents/AGENTS_CORE.md +2 -2
- package/assets/context_templates/context.toml +6 -1
- package/assets/context_templates/screen-contract.md +16 -0
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_helpers.cs +301 -0
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_run.cs +197 -0
- package/assets/runtime/windows-job-supervisor/formal_process_supervisor_native_types.cs +215 -0
- package/assets/runtime/windows-job-supervisor/windows_job_process_supervisor.ps1 +117 -0
- package/assets/skills/context_development_engineer/SKILL.md +16 -30
- package/assets/skills/context_development_engineer/references/engineering-design-reasoning.md +93 -0
- package/assets/skills/context_surface_contract/SKILL.md +13 -2
- package/assets/skills/context_uiux_design/SKILL.md +7 -3
- package/assets/skills/context_uiux_design/references/task-uiux-analysis.md +82 -0
- package/assets/skills/design-resource-authoring/SKILL.md +18 -9
- package/assets/skills/design-resource-authoring/references/authority-delta-assessment.md +52 -0
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +22 -6
- package/assets/skills/design-resource-authoring/references/formal-selected-web-app-handoff.md +26 -8
- package/assets/skills/design-resource-authoring/references/implementation-feasibility.md +111 -0
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +45 -7
- package/assets/skills/design-resource-authoring/references/recovery-and-writeback.md +7 -1
- package/assets/skills/design-resource-authoring/references/resource-selection.md +115 -3
- package/assets/skills/design-system-authoring/SKILL.md +23 -17
- package/assets/skills/design-system-authoring/references/authority-adoption.md +19 -9
- package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +4 -0
- package/assets/skills/long-task-workflow/SKILL.md +6 -6
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +10 -4
- package/assets/skills/long-task-workflow/references/contract-authoring.md +5 -5
- package/assets/skills/long-task-workflow/references/evidence-design.md +14 -3
- package/assets/skills/long-task-workflow/references/source-authoring.md +11 -8
- package/assets/tools/context_rules.json +53 -0
- package/assets/tools/validate_context.py +302 -77
- package/dist/cli.js +2 -1
- package/dist/commands/context-create.d.ts +1 -0
- package/dist/commands/context-create.js +90 -0
- package/dist/commands/context-inspect.d.ts +1 -0
- package/dist/commands/context-inspect.js +98 -0
- package/dist/commands/context-move.d.ts +1 -0
- package/dist/commands/context-move.js +78 -0
- package/dist/commands/context-register.d.ts +1 -0
- package/dist/commands/context-register.js +110 -0
- package/dist/commands/context-transaction.d.ts +1 -0
- package/dist/commands/context-transaction.js +84 -0
- package/dist/commands/context.d.ts +1 -0
- package/dist/commands/context.js +36 -0
- package/dist/commands/design-authority-delta.d.ts +1 -0
- package/dist/commands/design-authority-delta.js +53 -0
- package/dist/commands/design-authority.d.ts +1 -0
- package/dist/commands/design-authority.js +104 -0
- package/dist/commands/design-resource.js +17 -3
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +61 -3
- package/dist/commands/index.js +19 -2
- package/dist/commands/long-task-authoring.js +20 -2
- package/dist/commands/long-task-workdir.d.ts +2 -0
- package/dist/commands/long-task-workdir.js +23 -0
- package/dist/commands/long-task.js +75 -6
- package/dist/commands/route.d.ts +15 -0
- package/dist/commands/route.js +142 -0
- package/dist/index.d.ts +3 -13
- package/dist/index.js +3 -12
- package/dist/lib/cli-exit.d.ts +14 -0
- package/dist/lib/cli-exit.js +19 -0
- package/dist/lib/context-catalog/catalog-default-footprint.d.ts +3 -0
- package/dist/lib/context-catalog/catalog-default-footprint.js +53 -0
- package/dist/lib/context-catalog/catalog-diagnostics.d.ts +9 -0
- package/dist/lib/context-catalog/catalog-diagnostics.js +34 -0
- package/dist/lib/context-catalog/catalog-discovery.d.ts +7 -0
- package/dist/lib/context-catalog/catalog-discovery.js +81 -0
- package/dist/lib/context-catalog/catalog-load.d.ts +8 -0
- package/dist/lib/context-catalog/catalog-load.js +187 -0
- package/dist/lib/context-catalog/catalog-path-validation.d.ts +7 -0
- package/dist/lib/context-catalog/catalog-path-validation.js +62 -0
- package/dist/lib/context-catalog/catalog-paths.d.ts +11 -0
- package/dist/lib/context-catalog/catalog-paths.js +41 -0
- package/dist/lib/context-catalog/catalog-portable-contract.d.ts +15 -0
- package/dist/lib/context-catalog/catalog-portable-contract.js +68 -0
- package/dist/lib/context-catalog/catalog-staged-path-safety.d.ts +1 -0
- package/dist/lib/context-catalog/catalog-staged-path-safety.js +36 -0
- package/dist/lib/context-catalog/catalog-types.d.ts +40 -0
- package/dist/lib/context-catalog/catalog-types.js +1 -0
- package/dist/lib/context-catalog/catalog-validation.d.ts +9 -0
- package/dist/lib/context-catalog/catalog-validation.js +148 -0
- package/dist/lib/context-create/context-create-path.d.ts +2 -0
- package/dist/lib/context-create/context-create-path.js +30 -0
- package/dist/lib/context-create/context-create-template.d.ts +2 -0
- package/dist/lib/context-create/context-create-template.js +95 -0
- package/dist/lib/context-create/context-create-types.d.ts +28 -0
- package/dist/lib/context-create/context-create-types.js +1 -0
- package/dist/lib/context-create/context-create-write.d.ts +1 -0
- package/dist/lib/context-create/context-create-write.js +85 -0
- package/dist/lib/context-create/context-create.d.ts +2 -0
- package/dist/lib/context-create/context-create.js +84 -0
- package/dist/lib/context-default-footprint.d.ts +2 -3
- package/dist/lib/context-default-footprint.js +49 -57
- package/dist/lib/context-doctor/context-doctor-types.d.ts +16 -0
- package/dist/lib/context-doctor/context-doctor-types.js +15 -0
- package/dist/lib/context-doctor/context-doctor.d.ts +2 -0
- package/dist/lib/context-doctor/context-doctor.js +130 -0
- package/dist/lib/context-graph-snapshot.d.ts +5 -0
- package/dist/lib/context-graph-snapshot.js +46 -25
- package/dist/lib/context-inspect/context-inspect-projection.d.ts +9 -0
- package/dist/lib/context-inspect/context-inspect-projection.js +49 -0
- package/dist/lib/context-inspect/context-inspect-render.d.ts +2 -0
- package/dist/lib/context-inspect/context-inspect-render.js +29 -0
- package/dist/lib/context-inspect/context-inspect-types.d.ts +43 -0
- package/dist/lib/context-inspect/context-inspect-types.js +1 -0
- package/dist/lib/context-inspect/context-inspect.d.ts +2 -0
- package/dist/lib/context-inspect/context-inspect.js +104 -0
- package/dist/lib/context-manifest-schema.d.ts +1 -1
- package/dist/lib/context-manifest-schema.js +4 -20
- package/dist/lib/context-markdown/context-markdown-analysis.d.ts +15 -0
- package/dist/lib/context-markdown/context-markdown-analysis.js +245 -0
- package/dist/lib/context-markdown/context-markdown-extract.d.ts +7 -0
- package/dist/lib/context-markdown/context-markdown-extract.js +114 -0
- package/dist/lib/context-markdown/context-markdown-types.d.ts +57 -0
- package/dist/lib/context-markdown/context-markdown-types.js +1 -0
- package/dist/lib/context-move/context-move-input.d.ts +8 -0
- package/dist/lib/context-move/context-move-input.js +17 -0
- package/dist/lib/context-move/context-move-literal-scan.d.ts +20 -0
- package/dist/lib/context-move/context-move-literal-scan.js +213 -0
- package/dist/lib/context-move/context-move-live-validation.d.ts +3 -0
- package/dist/lib/context-move/context-move-live-validation.js +56 -0
- package/dist/lib/context-move/context-move-markdown-plan.d.ts +22 -0
- package/dist/lib/context-move/context-move-markdown-plan.js +39 -0
- package/dist/lib/context-move/context-move-projection.d.ts +3 -0
- package/dist/lib/context-move/context-move-projection.js +11 -0
- package/dist/lib/context-move/context-move-reference-validation.d.ts +11 -0
- package/dist/lib/context-move/context-move-reference-validation.js +64 -0
- package/dist/lib/context-move/context-move-render.d.ts +2 -0
- package/dist/lib/context-move/context-move-render.js +24 -0
- package/dist/lib/context-move/context-move-support.d.ts +10 -0
- package/dist/lib/context-move/context-move-support.js +88 -0
- package/dist/lib/context-move/context-move-transaction-plan.d.ts +24 -0
- package/dist/lib/context-move/context-move-transaction-plan.js +108 -0
- package/dist/lib/context-move/context-move-types.d.ts +74 -0
- package/dist/lib/context-move/context-move-types.js +1 -0
- package/dist/lib/context-move/context-move.d.ts +8 -0
- package/dist/lib/context-move/context-move.js +180 -0
- package/dist/lib/context-mutation/manifest-lossless-patch.d.ts +28 -0
- package/dist/lib/context-mutation/manifest-lossless-patch.js +208 -0
- package/dist/lib/context-mutation/markdown-link-patch.d.ts +34 -0
- package/dist/lib/context-mutation/markdown-link-patch.js +143 -0
- package/dist/lib/context-mutation/markdown-link-spans.d.ts +10 -0
- package/dist/lib/context-mutation/markdown-link-spans.js +179 -0
- package/dist/lib/context-mutation/mutation-cas.d.ts +13 -0
- package/dist/lib/context-mutation/mutation-cas.js +365 -0
- package/dist/lib/context-mutation/mutation-command-support.d.ts +12 -0
- package/dist/lib/context-mutation/mutation-command-support.js +57 -0
- package/dist/lib/context-mutation/mutation-commit.d.ts +12 -0
- package/dist/lib/context-mutation/mutation-commit.js +89 -0
- package/dist/lib/context-mutation/mutation-directories.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-directories.js +56 -0
- package/dist/lib/context-mutation/mutation-file-state.d.ts +14 -0
- package/dist/lib/context-mutation/mutation-file-state.js +137 -0
- package/dist/lib/context-mutation/mutation-journal-file-validation.d.ts +1 -0
- package/dist/lib/context-mutation/mutation-journal-file-validation.js +106 -0
- package/dist/lib/context-mutation/mutation-journal-io.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-journal-io.js +55 -0
- package/dist/lib/context-mutation/mutation-journal-storage.d.ts +18 -0
- package/dist/lib/context-mutation/mutation-journal-storage.js +283 -0
- package/dist/lib/context-mutation/mutation-journal-validation-support.d.ts +16 -0
- package/dist/lib/context-mutation/mutation-journal-validation-support.js +140 -0
- package/dist/lib/context-mutation/mutation-journal-validation.d.ts +3 -0
- package/dist/lib/context-mutation/mutation-journal-validation.js +177 -0
- package/dist/lib/context-mutation/mutation-journal.d.ts +8 -0
- package/dist/lib/context-mutation/mutation-journal.js +111 -0
- package/dist/lib/context-mutation/mutation-live-validation.d.ts +3 -0
- package/dist/lib/context-mutation/mutation-live-validation.js +51 -0
- package/dist/lib/context-mutation/mutation-long-task-guard.d.ts +6 -0
- package/dist/lib/context-mutation/mutation-long-task-guard.js +57 -0
- package/dist/lib/context-mutation/mutation-recovery.d.ts +4 -0
- package/dist/lib/context-mutation/mutation-recovery.js +189 -0
- package/dist/lib/context-mutation/mutation-staged-fs.d.ts +5 -0
- package/dist/lib/context-mutation/mutation-staged-fs.js +56 -0
- package/dist/lib/context-mutation/mutation-types.d.ts +103 -0
- package/dist/lib/context-mutation/mutation-types.js +1 -0
- package/dist/lib/context-register/context-register-input.d.ts +11 -0
- package/dist/lib/context-register/context-register-input.js +43 -0
- package/dist/lib/context-register/context-register-render.d.ts +2 -0
- package/dist/lib/context-register/context-register-render.js +21 -0
- package/dist/lib/context-register/context-register-support.d.ts +6 -0
- package/dist/lib/context-register/context-register-support.js +46 -0
- package/dist/lib/context-register/context-register-types.d.ts +46 -0
- package/dist/lib/context-register/context-register-types.js +1 -0
- package/dist/lib/context-register/context-register.d.ts +8 -0
- package/dist/lib/context-register/context-register.js +155 -0
- package/dist/lib/context-router/context-route-budget.d.ts +15 -0
- package/dist/lib/context-router/context-route-budget.js +14 -0
- package/dist/lib/context-router/context-route-candidates.d.ts +15 -0
- package/dist/lib/context-router/context-route-candidates.js +112 -0
- package/dist/lib/context-router/context-route-order.d.ts +6 -0
- package/dist/lib/context-router/context-route-order.js +53 -0
- package/dist/lib/context-router/context-route-paths.d.ts +16 -0
- package/dist/lib/context-router/context-route-paths.js +109 -0
- package/dist/lib/context-router/context-route-render.d.ts +2 -0
- package/dist/lib/context-router/context-route-render.js +32 -0
- package/dist/lib/context-router/context-route-scan.d.ts +18 -0
- package/dist/lib/context-router/context-route-scan.js +156 -0
- package/dist/lib/context-router/context-route-selection.d.ts +16 -0
- package/dist/lib/context-router/context-route-selection.js +72 -0
- package/dist/lib/context-router/context-route-terms.d.ts +13 -0
- package/dist/lib/context-router/context-route-terms.js +202 -0
- package/dist/lib/context-router/context-route-types.d.ts +101 -0
- package/dist/lib/context-router/context-route-types.js +1 -0
- package/dist/lib/context-router/context-route.d.ts +2 -0
- package/dist/lib/context-router/context-route.js +127 -0
- package/dist/lib/context-units-migration.d.ts +13 -0
- package/dist/lib/context-units-migration.js +217 -0
- package/dist/lib/design-authority-binding.d.ts +7 -0
- package/dist/lib/design-authority-binding.js +96 -0
- package/dist/lib/design-authority-closure.d.ts +3 -0
- package/dist/lib/design-authority-closure.js +201 -0
- package/dist/lib/design-authority-delta-codec-primitives.d.ts +10 -0
- package/dist/lib/design-authority-delta-codec-primitives.js +58 -0
- package/dist/lib/design-authority-delta-codec.d.ts +2 -0
- package/dist/lib/design-authority-delta-codec.js +193 -0
- package/dist/lib/design-authority-delta-types.d.ts +65 -0
- package/dist/lib/design-authority-delta-types.js +6 -0
- package/dist/lib/design-authority-delta-validation.d.ts +2 -0
- package/dist/lib/design-authority-delta-validation.js +16 -0
- package/dist/lib/design-authority-digest.d.ts +8 -0
- package/dist/lib/design-authority-digest.js +36 -0
- package/dist/lib/design-authority-files.d.ts +9 -0
- package/dist/lib/design-authority-files.js +62 -0
- package/dist/lib/design-authority-format.d.ts +2 -0
- package/dist/lib/design-authority-format.js +93 -0
- package/dist/lib/design-authority-links.d.ts +10 -0
- package/dist/lib/design-authority-links.js +137 -0
- package/dist/lib/design-authority-manifest.d.ts +4 -0
- package/dist/lib/design-authority-manifest.js +144 -0
- package/dist/lib/design-authority-tokens.d.ts +9 -0
- package/dist/lib/design-authority-tokens.js +45 -0
- package/dist/lib/design-authority-types.d.ts +80 -0
- package/dist/lib/design-authority-types.js +23 -0
- package/dist/lib/design-md-tool-adapter.d.ts +9 -0
- package/dist/lib/design-md-tool-adapter.js +152 -0
- package/dist/lib/design-md-tool-normalization.d.ts +7 -0
- package/dist/lib/design-md-tool-normalization.js +78 -0
- package/dist/lib/design-md-tool-types.d.ts +99 -0
- package/dist/lib/design-md-tool-types.js +8 -0
- package/dist/lib/design-resource-handoff-bundle.js +5 -0
- package/dist/lib/design-resource-handoff-input-types.d.ts +1 -1
- package/dist/lib/design-resource-handoff-manifest-projection.js +4 -0
- package/dist/lib/design-resource-handoff-set-integrity.js +1 -0
- package/dist/lib/design-resource-handoff-shape.js +18 -2
- package/dist/lib/design-resource-handoff-types.d.ts +8 -0
- package/dist/lib/design-resource-handoff-validation.js +24 -0
- package/dist/lib/design-resource-implementation-feasibility-model.d.ts +35 -0
- package/dist/lib/design-resource-implementation-feasibility-model.js +62 -0
- package/dist/lib/design-resource-implementation-feasibility-shape-sections.d.ts +43 -0
- package/dist/lib/design-resource-implementation-feasibility-shape-sections.js +142 -0
- package/dist/lib/design-resource-implementation-feasibility-shape.d.ts +4 -0
- package/dist/lib/design-resource-implementation-feasibility-shape.js +154 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision-projection.d.ts +24 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision-projection.js +106 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision.d.ts +21 -0
- package/dist/lib/design-resource-implementation-feasibility-source-decision.js +75 -0
- package/dist/lib/design-resource-implementation-feasibility-types.d.ts +135 -0
- package/dist/lib/design-resource-implementation-feasibility-types.js +37 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-cells.d.ts +5 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-cells.js +125 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-document.d.ts +4 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-document.js +167 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-facts.d.ts +3 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-facts.js +76 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-realizations.d.ts +8 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-realizations.js +76 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-support.d.ts +10 -0
- package/dist/lib/design-resource-implementation-feasibility-validation-support.js +75 -0
- package/dist/lib/design-resource-implementation-feasibility-validation.d.ts +3 -0
- package/dist/lib/design-resource-implementation-feasibility-validation.js +138 -0
- package/dist/lib/design-resource-recovery-current.js +22 -0
- package/dist/lib/design-resource-recovery-shape.js +64 -7
- package/dist/lib/design-resource-recovery-types.d.ts +4 -1
- package/dist/lib/design-resource-symbolic-fact-shape.js +9 -1
- package/dist/lib/design-resource-symbolic-fact-types.d.ts +8 -0
- package/dist/lib/design-resource-symbolic-fact-validation.js +25 -0
- package/dist/lib/doctor.d.ts +2 -1
- package/dist/lib/doctor.js +29 -1
- package/dist/lib/fs.js +1 -1
- package/dist/lib/long-task-acceptance-reachability-claims.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-claims.js +279 -0
- package/dist/lib/long-task-acceptance-reachability-design.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-design.js +96 -0
- package/dist/lib/long-task-acceptance-reachability-external.d.ts +9 -0
- package/dist/lib/long-task-acceptance-reachability-external.js +123 -0
- package/dist/lib/long-task-acceptance-reachability-helpers.d.ts +64 -0
- package/dist/lib/long-task-acceptance-reachability-helpers.js +473 -0
- package/dist/lib/long-task-acceptance-reachability-semantic.d.ts +2 -0
- package/dist/lib/long-task-acceptance-reachability-semantic.js +122 -0
- package/dist/lib/long-task-acceptance-reachability-types.d.ts +91 -0
- package/dist/lib/long-task-acceptance-reachability-types.js +1 -0
- package/dist/lib/long-task-acceptance-reachability.d.ts +4 -0
- package/dist/lib/long-task-acceptance-reachability.js +115 -0
- package/dist/lib/long-task-activation-validation.d.ts +6 -0
- package/dist/lib/long-task-activation-validation.js +96 -23
- package/dist/lib/long-task-active-authority-lock-context.d.ts +4 -0
- package/dist/lib/long-task-active-authority-lock-context.js +29 -0
- package/dist/lib/long-task-applicability-identity.d.ts +25 -0
- package/dist/lib/long-task-applicability-identity.js +60 -0
- package/dist/lib/long-task-authoring-preflight-diagnostics.js +8 -0
- package/dist/lib/long-task-authoring-preflight-types.d.ts +2 -0
- package/dist/lib/long-task-authoring-preflight-types.js +9 -0
- package/dist/lib/long-task-authoring-preflight.js +18 -2
- package/dist/lib/long-task-authority-material-diff.js +4 -0
- package/dist/lib/long-task-authority-materials.js +19 -0
- package/dist/lib/long-task-authority-policy.d.ts +3 -0
- package/dist/lib/long-task-authority-policy.js +3 -0
- package/dist/lib/long-task-authority-revision-details.js +2 -1
- package/dist/lib/long-task-authority-types.d.ts +2 -0
- package/dist/lib/long-task-authority.js +2 -0
- package/dist/lib/long-task-check-runner.js +3 -296
- package/dist/lib/long-task-check-shape.js +6 -1
- package/dist/lib/long-task-claim-definitions.js +1 -3
- package/dist/lib/long-task-claim-semantic-proof-floor.d.ts +3 -0
- package/dist/lib/long-task-claim-semantic-proof-floor.js +78 -0
- package/dist/lib/long-task-claims.d.ts +0 -18
- package/dist/lib/long-task-claims.js +15 -14
- package/dist/lib/long-task-command-process.d.ts +9 -0
- package/dist/lib/long-task-command-process.js +178 -0
- package/dist/lib/long-task-compact-authoring.js +3 -0
- package/dist/lib/long-task-compact-projections.js +10 -0
- package/dist/lib/long-task-complete-delivery-evidence-types.d.ts +38 -0
- package/dist/lib/long-task-complete-delivery-evidence-types.js +1 -0
- package/dist/lib/long-task-completion-types.d.ts +109 -0
- package/dist/lib/long-task-completion-types.js +1 -0
- package/dist/lib/long-task-conformance-policy.d.ts +2 -1
- package/dist/lib/long-task-conformance-policy.js +11 -4
- package/dist/lib/long-task-context-authority-topology.js +6 -4
- package/dist/lib/long-task-contract-types.d.ts +52 -1
- package/dist/lib/long-task-counterfactual-sandbox.d.ts +7 -1
- package/dist/lib/long-task-counterfactual-sandbox.js +86 -6
- package/dist/lib/long-task-delivery-compiler-preflight.d.ts +24 -0
- package/dist/lib/long-task-delivery-compiler-preflight.js +32 -0
- package/dist/lib/long-task-delivery-compiler.d.ts +1 -0
- package/dist/lib/long-task-delivery-compiler.js +59 -44
- package/dist/lib/long-task-delivery-parser.d.ts +3 -0
- package/dist/lib/long-task-delivery-parser.js +26 -8
- package/dist/lib/long-task-delivery-types.d.ts +2 -0
- package/dist/lib/long-task-delivery-types.js +2 -0
- package/dist/lib/long-task-delivery-validation.d.ts +11 -3
- package/dist/lib/long-task-delivery-validation.js +23 -8
- package/dist/lib/long-task-design-feasibility-binding-owners.d.ts +6 -0
- package/dist/lib/long-task-design-feasibility-binding-owners.js +52 -0
- package/dist/lib/long-task-design-feasibility-binding.d.ts +14 -0
- package/dist/lib/long-task-design-feasibility-binding.js +114 -0
- package/dist/lib/long-task-design-feasibility-source-closure.d.ts +11 -0
- package/dist/lib/long-task-design-feasibility-source-closure.js +87 -0
- package/dist/lib/long-task-design-obligation.d.ts +50 -0
- package/dist/lib/long-task-design-obligation.js +99 -0
- package/dist/lib/long-task-design-resource-handoff.d.ts +5 -3
- package/dist/lib/long-task-design-resource-handoff.js +64 -4
- package/dist/lib/long-task-design-resource-method-binding.js +20 -2
- package/dist/lib/long-task-effective-external-takeover.d.ts +15 -0
- package/dist/lib/long-task-effective-external-takeover.js +109 -0
- package/dist/lib/long-task-effective-external-ui-takeover.d.ts +5 -0
- package/dist/lib/long-task-effective-external-ui-takeover.js +117 -0
- package/dist/lib/long-task-evidence-capability-codec.js +91 -0
- package/dist/lib/long-task-evidence-capability-runtime.js +62 -14
- package/dist/lib/long-task-evidence-capability-types.d.ts +3 -2
- package/dist/lib/long-task-evidence-v2.d.ts +6 -1
- package/dist/lib/long-task-evidence-v2.js +253 -170
- package/dist/lib/long-task-execution-observation.d.ts +7 -0
- package/dist/lib/long-task-execution-observation.js +21 -4
- package/dist/lib/long-task-expected-authority.d.ts +4 -0
- package/dist/lib/long-task-expected-authority.js +126 -0
- package/dist/lib/long-task-external-confirmation-artifacts.d.ts +9 -0
- package/dist/lib/long-task-external-confirmation-artifacts.js +138 -0
- package/dist/lib/long-task-external-confirmation-attestation.d.ts +20 -0
- package/dist/lib/long-task-external-confirmation-attestation.js +115 -0
- package/dist/lib/long-task-external-confirmation-challenge.d.ts +23 -0
- package/dist/lib/long-task-external-confirmation-challenge.js +164 -0
- package/dist/lib/long-task-external-confirmation-context.d.ts +14 -0
- package/dist/lib/long-task-external-confirmation-context.js +53 -0
- package/dist/lib/long-task-external-confirmation-evaluation.d.ts +11 -0
- package/dist/lib/long-task-external-confirmation-evaluation.js +454 -0
- package/dist/lib/long-task-external-confirmation-expected.d.ts +8 -0
- package/dist/lib/long-task-external-confirmation-expected.js +200 -0
- package/dist/lib/long-task-external-confirmation-identity.d.ts +10 -0
- package/dist/lib/long-task-external-confirmation-identity.js +77 -0
- package/dist/lib/long-task-external-confirmation-plan.d.ts +25 -0
- package/dist/lib/long-task-external-confirmation-plan.js +148 -0
- package/dist/lib/long-task-external-confirmation-preparation.d.ts +4 -0
- package/dist/lib/long-task-external-confirmation-preparation.js +100 -0
- package/dist/lib/long-task-external-confirmation-shape.d.ts +8 -0
- package/dist/lib/long-task-external-confirmation-shape.js +387 -0
- package/dist/lib/long-task-external-confirmation-state.d.ts +10 -0
- package/dist/lib/long-task-external-confirmation-state.js +109 -0
- package/dist/lib/long-task-external-confirmation-types.d.ts +195 -0
- package/dist/lib/long-task-external-confirmation-types.js +1 -0
- package/dist/lib/long-task-final-integrity.d.ts +2 -0
- package/dist/lib/long-task-final-integrity.js +21 -10
- package/dist/lib/long-task-final-v2.d.ts +7 -2
- package/dist/lib/long-task-final-v2.js +179 -55
- package/dist/lib/long-task-finalization-identity.d.ts +27 -0
- package/dist/lib/long-task-finalization-identity.js +58 -0
- package/dist/lib/long-task-finding-context.d.ts +1 -1
- package/dist/lib/long-task-finding-context.js +139 -13
- package/dist/lib/long-task-freshness.d.ts +27 -0
- package/dist/lib/long-task-freshness.js +129 -6
- package/dist/lib/long-task-git.js +3 -3
- package/dist/lib/long-task-material-input-closure.d.ts +3 -0
- package/dist/lib/long-task-material-input-closure.js +92 -0
- package/dist/lib/long-task-obligation-authority-resolution.d.ts +12 -0
- package/dist/lib/long-task-obligation-authority-resolution.js +57 -0
- package/dist/lib/long-task-obligation-semantic-identity.d.ts +16 -0
- package/dist/lib/long-task-obligation-semantic-identity.js +116 -0
- package/dist/lib/long-task-observation-authority.d.ts +11 -0
- package/dist/lib/long-task-observation-authority.js +137 -6
- package/dist/lib/long-task-process-table.d.ts +9 -0
- package/dist/lib/long-task-process-table.js +87 -0
- package/dist/lib/long-task-process-tree.d.ts +8 -0
- package/dist/lib/long-task-process-tree.js +108 -0
- package/dist/lib/long-task-proof-adequacy.d.ts +12 -0
- package/dist/lib/long-task-proof-adequacy.js +57 -0
- package/dist/lib/long-task-proof-capability-floor.d.ts +6 -0
- package/dist/lib/long-task-proof-capability-floor.js +137 -0
- package/dist/lib/long-task-protected-files.d.ts +1 -1
- package/dist/lib/long-task-protected-files.js +1 -1
- package/dist/lib/long-task-repair-frontier-checks.d.ts +8 -0
- package/dist/lib/long-task-repair-frontier-checks.js +93 -0
- package/dist/lib/long-task-repair-frontier-groups.d.ts +2 -0
- package/dist/lib/long-task-repair-frontier-groups.js +64 -0
- package/dist/lib/long-task-repair-frontier-utils.d.ts +6 -0
- package/dist/lib/long-task-repair-frontier-utils.js +27 -0
- package/dist/lib/long-task-repair-frontier.d.ts +14 -0
- package/dist/lib/long-task-repair-frontier.js +132 -0
- package/dist/lib/long-task-risk.d.ts +3 -2
- package/dist/lib/long-task-risk.js +73 -24
- package/dist/lib/long-task-root-shape.js +148 -8
- package/dist/lib/long-task-runner-freeze.d.ts +2 -1
- package/dist/lib/long-task-runner-freeze.js +23 -8
- package/dist/lib/long-task-runtime-types.d.ts +34 -40
- package/dist/lib/long-task-semantic-assurance-policy.js +2 -11
- package/dist/lib/long-task-semantic-contract-types.d.ts +2 -1
- package/dist/lib/long-task-semantic-drift-migration.js +48 -2
- package/dist/lib/long-task-semantic-fact-binding-types.d.ts +20 -0
- package/dist/lib/long-task-semantic-fact-closure.d.ts +5 -1
- package/dist/lib/long-task-semantic-fact-closure.js +33 -5
- package/dist/lib/long-task-semantic-fact-contract-closure.js +176 -1
- package/dist/lib/long-task-semantic-fact-contract-proofs.js +18 -1
- package/dist/lib/long-task-semantic-fact-input-closure.d.ts +16 -2
- package/dist/lib/long-task-semantic-fact-input-closure.js +138 -15
- package/dist/lib/long-task-semantic-fact-provenance-closure.js +1 -1
- package/dist/lib/long-task-semantic-fact-shape.d.ts +2 -1
- package/dist/lib/long-task-semantic-fact-shape.js +35 -1
- package/dist/lib/long-task-semantic-proof-adequacy.d.ts +2 -0
- package/dist/lib/long-task-semantic-proof-adequacy.js +19 -0
- package/dist/lib/long-task-semantic-proof-profile.d.ts +5 -0
- package/dist/lib/long-task-semantic-proof-profile.js +187 -0
- package/dist/lib/long-task-shape-primitives.d.ts +1 -1
- package/dist/lib/long-task-shape-primitives.js +5 -0
- package/dist/lib/long-task-source-anchors.d.ts +10 -0
- package/dist/lib/long-task-source-anchors.js +102 -0
- package/dist/lib/long-task-source-authority-types.d.ts +46 -0
- package/dist/lib/long-task-source-claim-validation.js +36 -0
- package/dist/lib/long-task-source-conservation-facts.d.ts +8 -0
- package/dist/lib/long-task-source-conservation-facts.js +57 -0
- package/dist/lib/long-task-source-conservation-types.d.ts +34 -0
- package/dist/lib/long-task-source-conservation-types.js +1 -0
- package/dist/lib/long-task-source-conservation.d.ts +7 -0
- package/dist/lib/long-task-source-conservation.js +110 -0
- package/dist/lib/long-task-source-fragments.d.ts +6 -0
- package/dist/lib/long-task-source-fragments.js +219 -0
- package/dist/lib/long-task-source-projection-resolution.d.ts +5 -0
- package/dist/lib/long-task-source-projection-resolution.js +57 -0
- package/dist/lib/long-task-source-projection-validation.d.ts +17 -0
- package/dist/lib/long-task-source-projection-validation.js +154 -0
- package/dist/lib/long-task-source-shape.js +14 -6
- package/dist/lib/long-task-source-supersession.d.ts +5 -0
- package/dist/lib/long-task-source-supersession.js +138 -0
- package/dist/lib/long-task-stage-policy.d.ts +7 -2
- package/dist/lib/long-task-stage-policy.js +67 -23
- package/dist/lib/long-task-state.d.ts +18 -4
- package/dist/lib/long-task-state.js +319 -33
- package/dist/lib/long-task-static-observation-freeze.js +4 -3
- package/dist/lib/long-task-status-projection.d.ts +3 -1
- package/dist/lib/long-task-status-projection.js +44 -13
- package/dist/lib/long-task-status-v2.d.ts +10 -6
- package/dist/lib/long-task-status-v2.js +70 -58
- package/dist/lib/long-task-target-policy.d.ts +8 -3
- package/dist/lib/long-task-target-policy.js +40 -9
- package/dist/lib/long-task-terminal-finalization.d.ts +12 -0
- package/dist/lib/long-task-terminal-finalization.js +190 -0
- package/dist/lib/long-task-ui-design-policy.js +15 -4
- package/dist/lib/long-task-ui-surface-policy.d.ts +2 -1
- package/dist/lib/long-task-ui-surface-policy.js +7 -4
- package/dist/lib/long-task-ui-surface-validation.d.ts +3 -1
- package/dist/lib/long-task-ui-surface-validation.js +2 -2
- package/dist/lib/long-task-verifier-counterfactuals.d.ts +11 -0
- package/dist/lib/long-task-verifier-counterfactuals.js +96 -0
- package/dist/lib/long-task-verifier-execution.d.ts +9 -0
- package/dist/lib/long-task-verifier-execution.js +67 -0
- package/dist/lib/long-task-verifier-identity.js +16 -5
- package/dist/lib/long-task-verifier-v2.js +52 -65
- package/dist/lib/long-task-windows-job-supervisor-helper.d.ts +1 -0
- package/dist/lib/long-task-windows-job-supervisor-helper.js +104 -0
- package/dist/lib/long-task-windows-job-supervisor-protocol.d.ts +28 -0
- package/dist/lib/long-task-windows-job-supervisor-protocol.js +124 -0
- package/dist/lib/long-task-windows-job-supervisor-result.d.ts +11 -0
- package/dist/lib/long-task-windows-job-supervisor-result.js +152 -0
- package/dist/lib/long-task-windows-job-supervisor.d.ts +2 -0
- package/dist/lib/long-task-windows-job-supervisor.js +126 -0
- package/dist/lib/long-task-workspace-scope.d.ts +1 -0
- package/dist/lib/long-task-workspace-scope.js +4 -1
- package/dist/lib/long-task-workspace.d.ts +1 -0
- package/dist/lib/long-task-workspace.js +10 -0
- package/dist/lib/migrations.js +43 -2
- package/dist/lib/repository-path-safety.d.ts +3 -0
- package/dist/lib/repository-path-safety.js +39 -3
- package/dist/lib/semantic-fact-input-shape.d.ts +7 -2
- package/dist/lib/semantic-fact-input-shape.js +25 -1
- package/dist/lib/semantic-fact-inventory-types.d.ts +8 -2
- package/dist/lib/semantic-fact-policy-census.d.ts +1 -1
- package/dist/lib/semantic-fact-policy-census.js +5 -2
- package/dist/lib/semantic-fact-policy.d.ts +1 -1
- package/dist/lib/semantic-fact-policy.js +2 -2
- package/dist/lib/semantic-fact-proof-shape.d.ts +1 -1
- package/dist/lib/semantic-fact-property-shape.d.ts +1 -1
- package/dist/lib/validators.d.ts +3 -0
- package/dist/lib/validators.js +45 -157
- package/dist/public-api-core.d.ts +12 -0
- package/dist/public-api-core.js +12 -0
- package/dist/public-api-long-task.d.ts +10 -0
- package/dist/public-api-long-task.js +10 -0
- package/dist/public-types.d.ts +6 -1
- package/dist/schemas/design-authority-delta-assessment-v1.schema.json +191 -0
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +166 -2
- package/dist/schemas/long-task-external-confirmation-record-v1.schema.json +155 -0
- package/dist/schemas/long-task-external-confirmation-record-v2.schema.json +209 -0
- package/migrations/README.md +99 -0
- package/package.json +7 -5
- package/source-mappings.yaml +18 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { captureMutationFileState } from "../context-mutation/mutation-cas.js";
|
|
2
|
+
import { resolveCatalogFile } from "../context-catalog/catalog-paths.js";
|
|
3
|
+
import { assertMutationCatalogValid, assertNoUnfinishedContextMutation, decodeMutationUtf8, loadMutationCatalog, mutationCatalogFailure, mutationIoFailure, mutationMessage, mutationStateBytes, } from "../context-mutation/mutation-command-support.js";
|
|
4
|
+
import { executeContextMutationPlan } from "../context-mutation/mutation-commit.js";
|
|
5
|
+
import { assertContextMutationOutsideActiveLongTask, contextMutationAffectedPaths, } from "../context-mutation/mutation-long-task-guard.js";
|
|
6
|
+
import { replaceContextManifestPath, } from "../context-mutation/manifest-lossless-patch.js";
|
|
7
|
+
import { contextFootprintState, stagedFileOverrides, } from "../context-mutation/mutation-staged-fs.js";
|
|
8
|
+
import { validateContextContentForRole } from "../validators.js";
|
|
9
|
+
import { normalizeContextMoveInput } from "./context-move-input.js";
|
|
10
|
+
import { scanStagedRepositoryForContextPath } from "./context-move-literal-scan.js";
|
|
11
|
+
import { planContextMoveMarkdown } from "./context-move-markdown-plan.js";
|
|
12
|
+
import { contextMoveFootprintDiff } from "./context-move-projection.js";
|
|
13
|
+
import { validateStagedContextMoveReferences } from "./context-move-reference-validation.js";
|
|
14
|
+
import { assertContextMoveEndpoints, assertStagedContextMoveOwner, missingContextMoveDirectories, readContextMoveMarkdown, } from "./context-move-support.js";
|
|
15
|
+
import { buildContextMoveTransactionPlan } from "./context-move-transaction-plan.js";
|
|
16
|
+
import { CliCommandError } from "../cli-exit.js";
|
|
17
|
+
const MANIFEST_PATH = "project_context/context.toml";
|
|
18
|
+
export async function moveContext(input) {
|
|
19
|
+
const planned = await planContextMove(input);
|
|
20
|
+
if (!input.apply)
|
|
21
|
+
return planned.result;
|
|
22
|
+
// Preserve the established fail-fast diagnostic before evaluating a
|
|
23
|
+
// potentially inapplicable move. executeContextMutationPlan repeats this
|
|
24
|
+
// guard while holding the shared Authority interlock to close the race.
|
|
25
|
+
await assertContextMutationOutsideActiveLongTask(input.project_root, contextMutationAffectedPaths(planned.plan));
|
|
26
|
+
if (!planned.result.can_apply)
|
|
27
|
+
mutationCatalogFailure("context move cannot apply until every reported unresolved reference and scan limit is cleared");
|
|
28
|
+
try {
|
|
29
|
+
await executeContextMutationPlan(input.project_root, planned.plan);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (error instanceof CliCommandError)
|
|
33
|
+
throw error;
|
|
34
|
+
mutationIoFailure(`context move transaction stopped: ${mutationMessage(error)}; inspect recovery with ty-context context transaction status`, error);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
...planned.result,
|
|
38
|
+
applied: true,
|
|
39
|
+
transaction: { ...planned.result.transaction, state: "committed" },
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export async function planContextMove(input) {
|
|
43
|
+
const normalized = normalizeContextMoveInput(input);
|
|
44
|
+
await assertNoUnfinishedContextMutation(input.project_root);
|
|
45
|
+
const beforeCatalog = await loadMutationCatalog(input.project_root);
|
|
46
|
+
assertMutationCatalogValid(beforeCatalog, "context move requires a valid Catalog");
|
|
47
|
+
const owner = assertContextMoveEndpoints(beforeCatalog, normalized.from_path, normalized.to_path);
|
|
48
|
+
const sourceFile = resolveCatalogFile(beforeCatalog, normalized.from_path);
|
|
49
|
+
if (!sourceFile)
|
|
50
|
+
mutationIoFailure(`context move source is missing: ${normalized.from_path}`);
|
|
51
|
+
const directories = await missingContextMoveDirectories(input.project_root, normalized.to_path);
|
|
52
|
+
const markdown = await readContextMoveMarkdown(input.project_root, beforeCatalog);
|
|
53
|
+
const markdownPlan = planContextMoveMarkdown({
|
|
54
|
+
files: markdown,
|
|
55
|
+
...normalized,
|
|
56
|
+
from_physical_path: sourceFile.physical_path,
|
|
57
|
+
to_physical_path: normalized.to_path,
|
|
58
|
+
});
|
|
59
|
+
const sourceBefore = await captureMutationFileState(input.project_root, sourceFile.physical_path);
|
|
60
|
+
if (!sourceBefore.exists || sourceBefore.mode === null)
|
|
61
|
+
mutationIoFailure(`context move source is missing: ${normalized.from_path}`);
|
|
62
|
+
const sourceText = decodeMutationUtf8(mutationStateBytes(sourceBefore), normalized.from_path);
|
|
63
|
+
if (sourceText !== markdown.get(normalized.from_path)?.content)
|
|
64
|
+
mutationIoFailure("Context source changed while planning move");
|
|
65
|
+
const manifestBefore = await captureMutationFileState(input.project_root, MANIFEST_PATH);
|
|
66
|
+
if (!manifestBefore.exists || manifestBefore.mode === null)
|
|
67
|
+
mutationCatalogFailure("project_context/context.toml is missing");
|
|
68
|
+
const manifestText = decodeMutationUtf8(mutationStateBytes(manifestBefore), MANIFEST_PATH);
|
|
69
|
+
if (manifestText !== beforeCatalog.manifest_content)
|
|
70
|
+
mutationIoFailure("Context Catalog changed while planning move");
|
|
71
|
+
const manifestPatch = patchManifest(manifestText, normalized.from_path, normalized.to_path);
|
|
72
|
+
const targetBytes = Buffer.from(markdownPlan.target_content, "utf8");
|
|
73
|
+
const manifestBytes = Buffer.from(manifestPatch.content, "utf8");
|
|
74
|
+
const overrides = stagedFileOverrides([
|
|
75
|
+
[normalized.from_path, null],
|
|
76
|
+
[normalized.to_path, targetBytes],
|
|
77
|
+
[MANIFEST_PATH, manifestBytes],
|
|
78
|
+
...[...markdownPlan.updated_context_files].map(([file, content]) => [file, Buffer.from(content, "utf8")]),
|
|
79
|
+
]);
|
|
80
|
+
const directorySet = new Set(directories);
|
|
81
|
+
const afterCatalog = await loadMutationCatalog(input.project_root, overrides, directorySet);
|
|
82
|
+
assertMutationCatalogValid(afterCatalog, "staged Context move is invalid");
|
|
83
|
+
assertStagedContextMoveOwner(afterCatalog, owner, normalized.from_path, normalized.to_path);
|
|
84
|
+
const recoveryErrors = validateContextContentForRole(input.project_root, normalized.to_path, markdownPlan.target_content, owner.role);
|
|
85
|
+
if (recoveryErrors.length)
|
|
86
|
+
mutationCatalogFailure(`moved Context is not recoverable: ${recoveryErrors.join("; ")}`);
|
|
87
|
+
const referenceIssues = await validateStagedContextMoveReferences({
|
|
88
|
+
repository: input.project_root,
|
|
89
|
+
before_catalog: beforeCatalog,
|
|
90
|
+
after_catalog: afterCatalog,
|
|
91
|
+
file_overrides: overrides,
|
|
92
|
+
...normalized,
|
|
93
|
+
});
|
|
94
|
+
const scan = await scanStagedRepositoryForContextPath({
|
|
95
|
+
repository: input.project_root,
|
|
96
|
+
logical_context_path: normalized.from_path,
|
|
97
|
+
physical_context_path: sourceFile.physical_path,
|
|
98
|
+
file_overrides: overrides,
|
|
99
|
+
});
|
|
100
|
+
const built = await buildContextMoveTransactionPlan({
|
|
101
|
+
repository: input.project_root,
|
|
102
|
+
owner,
|
|
103
|
+
normalized,
|
|
104
|
+
directories,
|
|
105
|
+
source_before: sourceBefore,
|
|
106
|
+
source_physical_path: sourceFile.physical_path,
|
|
107
|
+
manifest_before: manifestBefore,
|
|
108
|
+
manifest_bytes: manifestBytes,
|
|
109
|
+
target_bytes: targetBytes,
|
|
110
|
+
updated_files: markdownPlan.updated_context_files,
|
|
111
|
+
before_catalog: beforeCatalog,
|
|
112
|
+
after_catalog: afterCatalog,
|
|
113
|
+
reference_issues: referenceIssues,
|
|
114
|
+
});
|
|
115
|
+
const beforeFootprint = contextFootprintState(beforeCatalog);
|
|
116
|
+
const afterFootprint = contextFootprintState(afterCatalog);
|
|
117
|
+
const canApply = scan.complete && scan.matches.length === 0;
|
|
118
|
+
return {
|
|
119
|
+
plan: built.plan,
|
|
120
|
+
result: {
|
|
121
|
+
schema_version: 1,
|
|
122
|
+
operation: "move",
|
|
123
|
+
applied: false,
|
|
124
|
+
can_apply: canApply,
|
|
125
|
+
...normalized,
|
|
126
|
+
owner: {
|
|
127
|
+
source: owner.source,
|
|
128
|
+
role: owner.role,
|
|
129
|
+
read_policy: owner.read_policy ?? null,
|
|
130
|
+
},
|
|
131
|
+
directories_created: directories,
|
|
132
|
+
files: built.projections,
|
|
133
|
+
manifest: {
|
|
134
|
+
path: MANIFEST_PATH,
|
|
135
|
+
replacements: manifestPatch.replacements.map((entry) => ({
|
|
136
|
+
kind: entry.kind,
|
|
137
|
+
previous_literal: entry.previous_literal,
|
|
138
|
+
next_literal: entry.next_literal,
|
|
139
|
+
})),
|
|
140
|
+
},
|
|
141
|
+
links: {
|
|
142
|
+
files_changed: [
|
|
143
|
+
...new Set(markdownPlan.references_updated.map((entry) => entry.source_path)),
|
|
144
|
+
],
|
|
145
|
+
references_updated: markdownPlan.references_updated,
|
|
146
|
+
},
|
|
147
|
+
unresolved: scan.matches,
|
|
148
|
+
scan: {
|
|
149
|
+
complete: scan.complete,
|
|
150
|
+
files_scanned: scan.files_scanned,
|
|
151
|
+
bytes_scanned: scan.bytes_scanned,
|
|
152
|
+
limits_exceeded: scan.limits_exceeded,
|
|
153
|
+
},
|
|
154
|
+
default_footprint: contextMoveFootprintDiff(beforeFootprint, afterFootprint),
|
|
155
|
+
catalog: {
|
|
156
|
+
before_identity: built.plan.catalog_before_identity,
|
|
157
|
+
after_identity: built.plan.catalog_after_identity,
|
|
158
|
+
},
|
|
159
|
+
diagnostics: [
|
|
160
|
+
...afterCatalog.diagnostics
|
|
161
|
+
.filter((entry) => entry.severity === "warning")
|
|
162
|
+
.map((entry) => entry.message),
|
|
163
|
+
...scan.limits_exceeded.map((entry) => `move scan incomplete: ${entry}`),
|
|
164
|
+
],
|
|
165
|
+
transaction: {
|
|
166
|
+
id: built.plan.transaction_id,
|
|
167
|
+
state: "dry-run",
|
|
168
|
+
journal_present: false,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function patchManifest(content, from, to) {
|
|
174
|
+
try {
|
|
175
|
+
return replaceContextManifestPath(content, from, to);
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
mutationCatalogFailure(`Manifest cannot be patched losslessly: ${mutationMessage(error)}`, error);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ContextRole } from "../context-catalog/catalog-portable-contract.js";
|
|
2
|
+
export interface ManifestContextBlockInput {
|
|
3
|
+
path: string;
|
|
4
|
+
role: ContextRole;
|
|
5
|
+
read_policy: string;
|
|
6
|
+
read_when?: string;
|
|
7
|
+
triggers?: string[];
|
|
8
|
+
default_children?: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface ManifestAppendResult {
|
|
11
|
+
content: string;
|
|
12
|
+
inserted_block: string;
|
|
13
|
+
line_ending: "lf" | "crlf";
|
|
14
|
+
}
|
|
15
|
+
export interface ManifestPathReplacementResult {
|
|
16
|
+
content: string;
|
|
17
|
+
previous_literal: string;
|
|
18
|
+
next_literal: string;
|
|
19
|
+
range: [number, number];
|
|
20
|
+
replacements: Array<{
|
|
21
|
+
kind: "owner" | "default_child";
|
|
22
|
+
previous_literal: string;
|
|
23
|
+
next_literal: string;
|
|
24
|
+
range: [number, number];
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export declare function appendContextManifestBlock(manifestContent: string, input: ManifestContextBlockInput): ManifestAppendResult;
|
|
28
|
+
export declare function replaceContextManifestPath(manifestContent: string, fromPathInput: string, toPathInput: string): ManifestPathReplacementResult;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { getStaticTOMLValue, parseTOML } from "toml-eslint-parser";
|
|
2
|
+
import { normalizeContextPath } from "../context-catalog/catalog-paths.js";
|
|
3
|
+
export function appendContextManifestBlock(manifestContent, input) {
|
|
4
|
+
parseManifest(manifestContent);
|
|
5
|
+
const eol = manifestLineEnding(manifestContent);
|
|
6
|
+
const block = renderContextBlock(input, eol);
|
|
7
|
+
const separator = appendSeparator(manifestContent, eol);
|
|
8
|
+
const content = `${manifestContent}${separator}${block}`;
|
|
9
|
+
parseManifest(content);
|
|
10
|
+
return {
|
|
11
|
+
content,
|
|
12
|
+
inserted_block: block,
|
|
13
|
+
line_ending: eol === "\r\n" ? "crlf" : "lf",
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function replaceContextManifestPath(manifestContent, fromPathInput, toPathInput) {
|
|
17
|
+
const ast = parseManifest(manifestContent);
|
|
18
|
+
const fromPath = normalizeContextPath(fromPathInput);
|
|
19
|
+
const toPath = normalizeContextPath(toPathInput);
|
|
20
|
+
const owners = [];
|
|
21
|
+
const children = [];
|
|
22
|
+
for (const node of ast.body[0].body) {
|
|
23
|
+
if (node.type !== "TOMLTable" ||
|
|
24
|
+
node.kind !== "array" ||
|
|
25
|
+
node.key.keys.length !== 1)
|
|
26
|
+
continue;
|
|
27
|
+
const table = getStaticTOMLValue(node.key)[0];
|
|
28
|
+
if (table !== "context" && table !== "areas")
|
|
29
|
+
continue;
|
|
30
|
+
const ownerKey = table === "context" ? "path" : "context";
|
|
31
|
+
const ownerValues = node.body.filter((entry) => staticKey(entry) === ownerKey);
|
|
32
|
+
if (ownerValues.length !== 1)
|
|
33
|
+
invalid(`${table}_owner_path_key_not_unique`);
|
|
34
|
+
collectExactString(ownerValues[0].value, fromPath, owners);
|
|
35
|
+
if (table !== "context")
|
|
36
|
+
continue;
|
|
37
|
+
for (const entry of node.body) {
|
|
38
|
+
if (staticKey(entry) !== "default_children")
|
|
39
|
+
continue;
|
|
40
|
+
if (entry.value.type !== "TOMLArray")
|
|
41
|
+
invalid("default_children_array_required");
|
|
42
|
+
for (const element of entry.value.elements)
|
|
43
|
+
collectExactString(element, fromPath, children);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (owners.length === 0)
|
|
47
|
+
invalid(`context_path_not_found:${fromPath}`);
|
|
48
|
+
if (owners.length !== 1)
|
|
49
|
+
invalid(`context_path_ambiguous:${fromPath}`);
|
|
50
|
+
const values = [
|
|
51
|
+
...owners.map((value) => ({ kind: "owner", value })),
|
|
52
|
+
...children.map((value) => ({ kind: "default_child", value })),
|
|
53
|
+
];
|
|
54
|
+
for (const { value } of values)
|
|
55
|
+
if (value.style !== "basic" || value.multiline)
|
|
56
|
+
invalid(`context_path_literal_unsupported:${fromPath}`);
|
|
57
|
+
const nextLiteral = tomlBasicString(toPath);
|
|
58
|
+
const replacements = values.map(({ kind, value }) => ({
|
|
59
|
+
kind,
|
|
60
|
+
previous_literal: manifestContent.slice(value.range[0], value.range[1]),
|
|
61
|
+
next_literal: nextLiteral,
|
|
62
|
+
range: [value.range[0], value.range[1]],
|
|
63
|
+
}));
|
|
64
|
+
let content = manifestContent;
|
|
65
|
+
for (const replacement of [...replacements].sort((left, right) => right.range[0] - left.range[0]))
|
|
66
|
+
content = `${content.slice(0, replacement.range[0])}${replacement.next_literal}${content.slice(replacement.range[1])}`;
|
|
67
|
+
const reparsed = parseManifest(content);
|
|
68
|
+
if (!manifestHasExactOwnerPath(reparsed, toPath) ||
|
|
69
|
+
manifestHasExactManifestPath(reparsed, fromPath))
|
|
70
|
+
invalid(`context_path_replacement_unverified:${toPath}`);
|
|
71
|
+
const primary = replacements.find((entry) => entry.kind === "owner");
|
|
72
|
+
return {
|
|
73
|
+
content,
|
|
74
|
+
previous_literal: primary.previous_literal,
|
|
75
|
+
next_literal: nextLiteral,
|
|
76
|
+
range: primary.range,
|
|
77
|
+
replacements,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function staticKey(entry) {
|
|
81
|
+
return entry.key.keys.length === 1
|
|
82
|
+
? getStaticTOMLValue(entry.key)[0]
|
|
83
|
+
: undefined;
|
|
84
|
+
}
|
|
85
|
+
function collectExactString(value, expected, output) {
|
|
86
|
+
if (value.type === "TOMLValue" &&
|
|
87
|
+
value.kind === "string" &&
|
|
88
|
+
normalizeContextPath(value.value) === expected)
|
|
89
|
+
output.push(value);
|
|
90
|
+
}
|
|
91
|
+
function renderContextBlock(input, eol) {
|
|
92
|
+
const lines = [
|
|
93
|
+
"[[context]]",
|
|
94
|
+
`path = ${tomlBasicString(input.path)}`,
|
|
95
|
+
`role = ${tomlBasicString(input.role)}`,
|
|
96
|
+
`read_policy = ${tomlBasicString(input.read_policy)}`,
|
|
97
|
+
];
|
|
98
|
+
if (input.read_when)
|
|
99
|
+
lines.push(`read_when = ${tomlBasicString(input.read_when)}`);
|
|
100
|
+
if (input.triggers?.length)
|
|
101
|
+
lines.push(`triggers = ${tomlStringArray(input.triggers)}`);
|
|
102
|
+
if (input.default_children?.length)
|
|
103
|
+
lines.push(`default_children = ${tomlStringArray(input.default_children)}`);
|
|
104
|
+
return `${lines.join(eol)}${eol}`;
|
|
105
|
+
}
|
|
106
|
+
function parseManifest(content) {
|
|
107
|
+
if (content.charCodeAt(0) === 0xfeff)
|
|
108
|
+
invalid("bom_not_allowed");
|
|
109
|
+
try {
|
|
110
|
+
return parseTOML(content, { tomlVersion: "1.0" });
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
invalid(`parse_failed:${message(error)}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function manifestLineEnding(content) {
|
|
117
|
+
const withoutCrLf = content.replaceAll("\r\n", "");
|
|
118
|
+
if (withoutCrLf.includes("\r"))
|
|
119
|
+
invalid("bare_cr_not_supported");
|
|
120
|
+
if (content.includes("\r\n") && withoutCrLf.includes("\n"))
|
|
121
|
+
invalid("mixed_line_endings_not_supported");
|
|
122
|
+
return content.includes("\r\n") ? "\r\n" : "\n";
|
|
123
|
+
}
|
|
124
|
+
function appendSeparator(content, eol) {
|
|
125
|
+
if (content.length === 0)
|
|
126
|
+
return "";
|
|
127
|
+
if (content.endsWith(`${eol}${eol}`))
|
|
128
|
+
return "";
|
|
129
|
+
if (content.endsWith(eol))
|
|
130
|
+
return eol;
|
|
131
|
+
return `${eol}${eol}`;
|
|
132
|
+
}
|
|
133
|
+
function tomlStringArray(values) {
|
|
134
|
+
return `[${values.map(tomlBasicString).join(", ")}]`;
|
|
135
|
+
}
|
|
136
|
+
function tomlBasicString(value) {
|
|
137
|
+
let result = '"';
|
|
138
|
+
for (const character of value) {
|
|
139
|
+
const codePoint = character.codePointAt(0);
|
|
140
|
+
if (character === "\\")
|
|
141
|
+
result += "\\\\";
|
|
142
|
+
else if (character === '"')
|
|
143
|
+
result += '\\"';
|
|
144
|
+
else if (character === "\b")
|
|
145
|
+
result += "\\b";
|
|
146
|
+
else if (character === "\t")
|
|
147
|
+
result += "\\t";
|
|
148
|
+
else if (character === "\n")
|
|
149
|
+
result += "\\n";
|
|
150
|
+
else if (character === "\f")
|
|
151
|
+
result += "\\f";
|
|
152
|
+
else if (character === "\r")
|
|
153
|
+
result += "\\r";
|
|
154
|
+
else if (codePoint < 0x20 || codePoint === 0x7f)
|
|
155
|
+
result += `\\u${codePoint.toString(16).padStart(4, "0")}`;
|
|
156
|
+
else
|
|
157
|
+
result += character;
|
|
158
|
+
}
|
|
159
|
+
return `${result}"`;
|
|
160
|
+
}
|
|
161
|
+
function manifestHasExactOwnerPath(ast, expected) {
|
|
162
|
+
return ast.body[0].body.some((node) => {
|
|
163
|
+
if (node.type !== "TOMLTable" ||
|
|
164
|
+
node.kind !== "array" ||
|
|
165
|
+
node.key.keys.length !== 1 ||
|
|
166
|
+
!["context", "areas"].includes(String(getStaticTOMLValue(node.key)[0])))
|
|
167
|
+
return false;
|
|
168
|
+
const table = getStaticTOMLValue(node.key)[0];
|
|
169
|
+
const key = table === "context" ? "path" : "context";
|
|
170
|
+
return node.body.some((entry) => entry.key.keys.length === 1 &&
|
|
171
|
+
getStaticTOMLValue(entry.key)[0] === key &&
|
|
172
|
+
entry.value.type === "TOMLValue" &&
|
|
173
|
+
entry.value.kind === "string" &&
|
|
174
|
+
normalizeContextPath(entry.value.value) === expected);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
function manifestHasExactManifestPath(ast, expected) {
|
|
178
|
+
for (const node of ast.body[0].body) {
|
|
179
|
+
if (node.type !== "TOMLTable" ||
|
|
180
|
+
node.kind !== "array" ||
|
|
181
|
+
node.key.keys.length !== 1)
|
|
182
|
+
continue;
|
|
183
|
+
const table = getStaticTOMLValue(node.key)[0];
|
|
184
|
+
if (table !== "context" && table !== "areas")
|
|
185
|
+
continue;
|
|
186
|
+
for (const entry of node.body) {
|
|
187
|
+
const key = staticKey(entry);
|
|
188
|
+
if ((key === (table === "context" ? "path" : "context") ||
|
|
189
|
+
(table === "context" && key === "default_children")) &&
|
|
190
|
+
containsExactString(entry.value, expected))
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
function containsExactString(value, expected) {
|
|
197
|
+
if (value.type === "TOMLArray")
|
|
198
|
+
return value.elements.some((element) => containsExactString(element, expected));
|
|
199
|
+
return (value.type === "TOMLValue" &&
|
|
200
|
+
value.kind === "string" &&
|
|
201
|
+
normalizeContextPath(value.value) === expected);
|
|
202
|
+
}
|
|
203
|
+
function invalid(reason) {
|
|
204
|
+
throw new Error(`context_manifest_patch_invalid:${reason}`);
|
|
205
|
+
}
|
|
206
|
+
function message(error) {
|
|
207
|
+
return error instanceof Error ? error.message : String(error);
|
|
208
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type MarkdownDestinationKind } from "./markdown-link-spans.js";
|
|
2
|
+
export interface MarkdownLinkChange {
|
|
3
|
+
kind: MarkdownDestinationKind;
|
|
4
|
+
line: number;
|
|
5
|
+
column: number;
|
|
6
|
+
previous_destination: string;
|
|
7
|
+
next_destination: string;
|
|
8
|
+
target_before: string;
|
|
9
|
+
target_after: string;
|
|
10
|
+
range: [number, number];
|
|
11
|
+
}
|
|
12
|
+
export interface MarkdownLocalReference {
|
|
13
|
+
kind: MarkdownDestinationKind;
|
|
14
|
+
line: number;
|
|
15
|
+
column: number;
|
|
16
|
+
destination: string;
|
|
17
|
+
target_path: string | null;
|
|
18
|
+
status: "local" | "invalid" | "outside";
|
|
19
|
+
detail?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface MarkdownLinkPatchResult {
|
|
22
|
+
content: string;
|
|
23
|
+
changes: MarkdownLinkChange[];
|
|
24
|
+
references: MarkdownLocalReference[];
|
|
25
|
+
}
|
|
26
|
+
export declare function patchMarkdownLinksForContextMove(input: {
|
|
27
|
+
content: string;
|
|
28
|
+
source_path: string;
|
|
29
|
+
source_physical_path: string;
|
|
30
|
+
from_path: string;
|
|
31
|
+
from_physical_path: string;
|
|
32
|
+
to_path: string;
|
|
33
|
+
to_physical_path: string;
|
|
34
|
+
}): MarkdownLinkPatchResult;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { markdownDestinationSpans, } from "./markdown-link-spans.js";
|
|
3
|
+
export function patchMarkdownLinksForContextMove(input) {
|
|
4
|
+
const changes = [];
|
|
5
|
+
const references = [];
|
|
6
|
+
for (const span of markdownDestinationSpans(input.content)) {
|
|
7
|
+
const resolved = resolveLocalDestination(span.destination, input.source_path, input.source_physical_path);
|
|
8
|
+
if (resolved.status === "ignored")
|
|
9
|
+
continue;
|
|
10
|
+
if (resolved.status !== "local") {
|
|
11
|
+
references.push({
|
|
12
|
+
kind: span.kind,
|
|
13
|
+
line: span.line,
|
|
14
|
+
column: span.column,
|
|
15
|
+
destination: span.destination,
|
|
16
|
+
target_path: null,
|
|
17
|
+
status: resolved.status,
|
|
18
|
+
detail: resolved.detail,
|
|
19
|
+
});
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
references.push({
|
|
23
|
+
kind: span.kind,
|
|
24
|
+
line: span.line,
|
|
25
|
+
column: span.column,
|
|
26
|
+
destination: span.destination,
|
|
27
|
+
target_path: resolved.target_path,
|
|
28
|
+
status: "local",
|
|
29
|
+
});
|
|
30
|
+
const sourceMoves = input.source_path === input.from_path;
|
|
31
|
+
if (sourceMoves && input.source_physical_path !== input.from_physical_path)
|
|
32
|
+
throw new Error("context_move_source_physical_path_mismatch");
|
|
33
|
+
const targetMoves = resolved.target_path === input.from_path;
|
|
34
|
+
if (!targetMoves && !(sourceMoves && resolved.style === "relative"))
|
|
35
|
+
continue;
|
|
36
|
+
const targetAfter = targetMoves ? input.to_path : resolved.target_path;
|
|
37
|
+
const sourcePhysicalAfter = sourceMoves
|
|
38
|
+
? input.to_physical_path
|
|
39
|
+
: input.source_physical_path;
|
|
40
|
+
const targetPhysicalAfter = targetMoves
|
|
41
|
+
? input.to_physical_path
|
|
42
|
+
: resolved.physical_target_path;
|
|
43
|
+
const next = renderDestination(resolved, sourcePhysicalAfter, targetPhysicalAfter);
|
|
44
|
+
if (next === span.destination)
|
|
45
|
+
continue;
|
|
46
|
+
changes.push({
|
|
47
|
+
kind: span.kind,
|
|
48
|
+
line: span.line,
|
|
49
|
+
column: span.column,
|
|
50
|
+
previous_destination: span.destination,
|
|
51
|
+
next_destination: next,
|
|
52
|
+
target_before: resolved.target_path,
|
|
53
|
+
target_after: targetAfter,
|
|
54
|
+
range: [span.start, span.end],
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
let content = input.content;
|
|
58
|
+
for (const change of [...changes].sort((left, right) => right.range[0] - left.range[0]))
|
|
59
|
+
content = `${content.slice(0, change.range[0])}${change.next_destination}${content.slice(change.range[1])}`;
|
|
60
|
+
return { content, changes, references };
|
|
61
|
+
}
|
|
62
|
+
function resolveLocalDestination(destination, sourcePath, sourcePhysicalPath) {
|
|
63
|
+
if (!destination ||
|
|
64
|
+
destination.startsWith("#") ||
|
|
65
|
+
destination.startsWith("//") ||
|
|
66
|
+
/^[A-Za-z][A-Za-z0-9+.-]*:/u.test(destination))
|
|
67
|
+
return { status: "ignored" };
|
|
68
|
+
const boundary = firstBoundary(destination);
|
|
69
|
+
const rawPath = destination.slice(0, boundary);
|
|
70
|
+
const suffix = destination.slice(boundary);
|
|
71
|
+
const windows = rawPath.includes("\\") && !rawPath.includes("/");
|
|
72
|
+
const markdownDecoded = windows
|
|
73
|
+
? rawPath.replaceAll("\\", "/")
|
|
74
|
+
: rawPath.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/gu, "$1");
|
|
75
|
+
let decoded;
|
|
76
|
+
try {
|
|
77
|
+
decoded = decodeURIComponent(markdownDecoded).replaceAll("\\", "/");
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return { status: "invalid", detail: "invalid URL encoding" };
|
|
81
|
+
}
|
|
82
|
+
const style = decoded.startsWith("/")
|
|
83
|
+
? "root"
|
|
84
|
+
: decoded.startsWith("project_context/")
|
|
85
|
+
? "repository"
|
|
86
|
+
: "relative";
|
|
87
|
+
const logicalCandidate = style === "root"
|
|
88
|
+
? decoded.slice(1)
|
|
89
|
+
: style === "repository"
|
|
90
|
+
? decoded
|
|
91
|
+
: path.posix.join(path.posix.dirname(sourcePath), decoded);
|
|
92
|
+
const physicalCandidate = style === "root"
|
|
93
|
+
? decoded.slice(1)
|
|
94
|
+
: style === "repository"
|
|
95
|
+
? decoded
|
|
96
|
+
: path.posix.join(path.posix.dirname(sourcePhysicalPath), decoded);
|
|
97
|
+
const normalized = path.posix.normalize(logicalCandidate).normalize("NFC");
|
|
98
|
+
const physicalNormalized = path.posix.normalize(physicalCandidate);
|
|
99
|
+
if (!normalized ||
|
|
100
|
+
normalized === ".." ||
|
|
101
|
+
normalized.startsWith("../") ||
|
|
102
|
+
path.posix.isAbsolute(normalized))
|
|
103
|
+
return { status: "outside", detail: "destination escapes repository" };
|
|
104
|
+
if (!physicalNormalized ||
|
|
105
|
+
physicalNormalized === ".." ||
|
|
106
|
+
physicalNormalized.startsWith("../") ||
|
|
107
|
+
path.posix.isAbsolute(physicalNormalized))
|
|
108
|
+
return { status: "outside", detail: "destination escapes repository" };
|
|
109
|
+
return {
|
|
110
|
+
status: "local",
|
|
111
|
+
target_path: normalized,
|
|
112
|
+
physical_target_path: physicalNormalized,
|
|
113
|
+
style,
|
|
114
|
+
suffix,
|
|
115
|
+
encoded: /%[0-9A-Fa-f]{2}/u.test(rawPath),
|
|
116
|
+
windows,
|
|
117
|
+
explicit_dot: decoded.startsWith("./"),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function renderDestination(original, sourcePhysicalAfter, targetPhysicalAfter) {
|
|
121
|
+
let rendered = original.style === "root"
|
|
122
|
+
? `/${targetPhysicalAfter}`
|
|
123
|
+
: original.style === "repository"
|
|
124
|
+
? targetPhysicalAfter
|
|
125
|
+
: path.posix.relative(path.posix.dirname(sourcePhysicalAfter), targetPhysicalAfter);
|
|
126
|
+
if (!rendered)
|
|
127
|
+
rendered = path.posix.basename(targetPhysicalAfter);
|
|
128
|
+
if (original.explicit_dot &&
|
|
129
|
+
original.style === "relative" &&
|
|
130
|
+
!rendered.startsWith("."))
|
|
131
|
+
rendered = `./${rendered}`;
|
|
132
|
+
if (original.encoded || /[\s<>()]/u.test(rendered))
|
|
133
|
+
rendered = rendered.split("/").map(encodeURIComponent).join("/");
|
|
134
|
+
if (original.windows)
|
|
135
|
+
rendered = rendered.replaceAll("/", "\\");
|
|
136
|
+
return `${rendered}${original.suffix}`;
|
|
137
|
+
}
|
|
138
|
+
function firstBoundary(value) {
|
|
139
|
+
const hash = value.indexOf("#");
|
|
140
|
+
const query = value.indexOf("?");
|
|
141
|
+
const candidates = [hash, query].filter((entry) => entry >= 0);
|
|
142
|
+
return candidates.length ? Math.min(...candidates) : value.length;
|
|
143
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type MarkdownDestinationKind = "inline" | "image" | "definition" | "angle";
|
|
2
|
+
export interface MarkdownDestinationSpan {
|
|
3
|
+
kind: MarkdownDestinationKind;
|
|
4
|
+
destination: string;
|
|
5
|
+
start: number;
|
|
6
|
+
end: number;
|
|
7
|
+
line: number;
|
|
8
|
+
column: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function markdownDestinationSpans(content: string): MarkdownDestinationSpan[];
|