opkg 0.6.1 → 0.7.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 +109 -186
- package/assets/openpackage_ascii_dark.png +0 -0
- package/assets/openpackage_ascii_light.png +0 -0
- package/dist/commands/add.js +34 -10
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/apply.js +16 -0
- package/dist/commands/apply.js.map +1 -0
- package/dist/commands/delete.js +1 -1
- package/dist/commands/delete.js.map +1 -1
- package/dist/commands/install.js +177 -8
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/list.js +2 -2
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/login.js +1 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.js +1 -1
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/new.js +125 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/commands/pack.js +7 -13
- package/dist/commands/pack.js.map +1 -1
- package/dist/commands/pull.js +1 -1
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.js +1 -1
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/remove.js +63 -0
- package/dist/commands/remove.js.map +1 -0
- package/dist/commands/save.js +11 -17
- package/dist/commands/save.js.map +1 -1
- package/dist/commands/set.js +33 -0
- package/dist/commands/set.js.map +1 -0
- package/dist/commands/show.js +16 -94
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/status.js +26 -701
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/uninstall.js +14 -427
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/constants/index.js +72 -16
- package/dist/constants/index.js.map +1 -1
- package/dist/core/add/add-conflict-handler.js +1 -8
- package/dist/core/add/add-conflict-handler.js.map +1 -1
- package/dist/core/add/add-pipeline.js +12 -10
- package/dist/core/add/add-pipeline.js.map +1 -1
- package/dist/core/add/add-to-source-pipeline.js +123 -0
- package/dist/core/add/add-to-source-pipeline.js.map +1 -0
- package/dist/core/add/package-index-updater.js +77 -78
- package/dist/core/add/package-index-updater.js.map +1 -1
- package/dist/core/add/platform-path-transformer.js +6 -4
- package/dist/core/add/platform-path-transformer.js.map +1 -1
- package/dist/core/add/source-collector.js +2 -3
- package/dist/core/add/source-collector.js.map +1 -1
- package/dist/core/apply/apply-pipeline.js +110 -0
- package/dist/core/apply/apply-pipeline.js.map +1 -0
- package/dist/core/dependency-resolver.js +263 -21
- package/dist/core/dependency-resolver.js.map +1 -1
- package/dist/core/discovery/file-discovery.js +1 -2
- package/dist/core/discovery/file-discovery.js.map +1 -1
- package/dist/core/discovery/platform-files-discovery.js +33 -18
- package/dist/core/discovery/platform-files-discovery.js.map +1 -1
- package/dist/core/flows/flow-executor.js +974 -0
- package/dist/core/flows/flow-executor.js.map +1 -0
- package/dist/core/flows/flow-inverter.js +442 -0
- package/dist/core/flows/flow-inverter.js.map +1 -0
- package/dist/core/flows/flow-key-extractor.js +101 -0
- package/dist/core/flows/flow-key-extractor.js.map +1 -0
- package/dist/core/flows/flow-key-mapper.js +382 -0
- package/dist/core/flows/flow-key-mapper.js.map +1 -0
- package/dist/core/flows/flow-transforms.js +632 -0
- package/dist/core/flows/flow-transforms.js.map +1 -0
- package/dist/core/flows/map-pipeline/context.js +73 -0
- package/dist/core/flows/map-pipeline/context.js.map +1 -0
- package/dist/core/flows/map-pipeline/index.js +156 -0
- package/dist/core/flows/map-pipeline/index.js.map +1 -0
- package/dist/core/flows/map-pipeline/operations/copy.js +104 -0
- package/dist/core/flows/map-pipeline/operations/copy.js.map +1 -0
- package/dist/core/flows/map-pipeline/operations/pipe.js +70 -0
- package/dist/core/flows/map-pipeline/operations/pipe.js.map +1 -0
- package/dist/core/flows/map-pipeline/operations/rename.js +102 -0
- package/dist/core/flows/map-pipeline/operations/rename.js.map +1 -0
- package/dist/core/flows/map-pipeline/operations/set.js +50 -0
- package/dist/core/flows/map-pipeline/operations/set.js.map +1 -0
- package/dist/core/flows/map-pipeline/operations/switch.js +79 -0
- package/dist/core/flows/map-pipeline/operations/switch.js.map +1 -0
- package/dist/core/flows/map-pipeline/operations/transform.js +543 -0
- package/dist/core/flows/map-pipeline/operations/transform.js.map +1 -0
- package/dist/core/flows/map-pipeline/operations/unset.js +65 -0
- package/dist/core/flows/map-pipeline/operations/unset.js.map +1 -0
- package/dist/core/flows/map-pipeline/types.js +8 -0
- package/dist/core/flows/map-pipeline/types.js.map +1 -0
- package/dist/core/flows/map-pipeline/utils.js +278 -0
- package/dist/core/flows/map-pipeline/utils.js.map +1 -0
- package/dist/core/flows/platform-converter.js +328 -0
- package/dist/core/flows/platform-converter.js.map +1 -0
- package/dist/core/flows/source-resolver.js +192 -0
- package/dist/core/flows/source-resolver.js.map +1 -0
- package/dist/core/flows/toml-domain-transforms.js +23 -0
- package/dist/core/flows/toml-domain-transforms.js.map +1 -0
- package/dist/core/install/bulk-install-pipeline.js +68 -7
- package/dist/core/install/bulk-install-pipeline.js.map +1 -1
- package/dist/core/install/canonical-plan.js +3 -3
- package/dist/core/install/canonical-plan.js.map +1 -1
- package/dist/core/install/dry-run.js +3 -3
- package/dist/core/install/dry-run.js.map +1 -1
- package/dist/core/install/flow-based-installer.js +1158 -0
- package/dist/core/install/flow-based-installer.js.map +1 -0
- package/dist/core/install/flow-workspace-tracker.js +111 -0
- package/dist/core/install/flow-workspace-tracker.js.map +1 -0
- package/dist/core/install/format-detector.js +228 -0
- package/dist/core/install/format-detector.js.map +1 -0
- package/dist/core/install/git-package-loader.js +20 -0
- package/dist/core/install/git-package-loader.js.map +1 -0
- package/dist/core/install/install-errors.js +1 -1
- package/dist/core/install/install-errors.js.map +1 -1
- package/dist/core/install/install-flow.js +34 -14
- package/dist/core/install/install-flow.js.map +1 -1
- package/dist/core/install/install-pipeline.js +52 -17
- package/dist/core/install/install-pipeline.js.map +1 -1
- package/dist/core/install/install-reporting.js +26 -8
- package/dist/core/install/install-reporting.js.map +1 -1
- package/dist/core/install/local-source-resolution.js +103 -0
- package/dist/core/install/local-source-resolution.js.map +1 -0
- package/dist/core/install/marketplace-handler.js +221 -0
- package/dist/core/install/marketplace-handler.js.map +1 -0
- package/dist/core/install/path-install-pipeline.js +241 -0
- package/dist/core/install/path-install-pipeline.js.map +1 -0
- package/dist/core/install/path-package-loader.js +116 -0
- package/dist/core/install/path-package-loader.js.map +1 -0
- package/dist/core/install/plugin-detector.js +72 -0
- package/dist/core/install/plugin-detector.js.map +1 -0
- package/dist/core/install/plugin-to-universal-converter.js +218 -0
- package/dist/core/install/plugin-to-universal-converter.js.map +1 -0
- package/dist/core/install/plugin-transformer.js +191 -0
- package/dist/core/install/plugin-transformer.js.map +1 -0
- package/dist/core/install/version-selection.js +1 -1
- package/dist/core/install/version-selection.js.map +1 -1
- package/dist/core/openpackage.js +40 -22
- package/dist/core/openpackage.js.map +1 -1
- package/dist/core/pack/pack-output.js +62 -0
- package/dist/core/pack/pack-output.js.map +1 -0
- package/dist/core/pack/pack-pipeline.js +186 -0
- package/dist/core/pack/pack-pipeline.js.map +1 -0
- package/dist/core/package-context.js +45 -70
- package/dist/core/package-context.js.map +1 -1
- package/dist/core/package-creation.js +203 -0
- package/dist/core/package-creation.js.map +1 -0
- package/dist/core/package.js +20 -6
- package/dist/core/package.js.map +1 -1
- package/dist/core/platforms.js +665 -209
- package/dist/core/platforms.js.map +1 -1
- package/dist/core/push/push-context.js +1 -1
- package/dist/core/push/push-context.js.map +1 -1
- package/dist/core/push/push-upload.js +2 -2
- package/dist/core/push/push-upload.js.map +1 -1
- package/dist/core/registry.js +6 -6
- package/dist/core/registry.js.map +1 -1
- package/dist/core/remote-pull.js +2 -2
- package/dist/core/remote-pull.js.map +1 -1
- package/dist/core/remove/removal-collector.js +52 -0
- package/dist/core/remove/removal-collector.js.map +1 -0
- package/dist/core/remove/removal-confirmation.js +39 -0
- package/dist/core/remove/removal-confirmation.js.map +1 -0
- package/dist/core/remove/remove-from-source-pipeline.js +173 -0
- package/dist/core/remove/remove-from-source-pipeline.js.map +1 -0
- package/dist/core/save/constants.js +3 -3
- package/dist/core/save/constants.js.map +1 -1
- package/dist/core/save/flow-based-saver.js +270 -0
- package/dist/core/save/flow-based-saver.js.map +1 -0
- package/dist/core/save/name-resolution.js +1 -1
- package/dist/core/save/name-resolution.js.map +1 -1
- package/dist/core/save/package-yml-generator.js +4 -5
- package/dist/core/save/package-yml-generator.js.map +1 -1
- package/dist/core/save/save-candidate-builder.js +215 -0
- package/dist/core/save/save-candidate-builder.js.map +1 -0
- package/dist/core/save/save-candidate-loader.js +12 -11
- package/dist/core/save/save-candidate-loader.js.map +1 -1
- package/dist/core/save/save-conflict-analyzer.js +150 -0
- package/dist/core/save/save-conflict-analyzer.js.map +1 -0
- package/dist/core/save/save-conflict-resolution.js +28 -14
- package/dist/core/save/save-conflict-resolution.js.map +1 -1
- package/dist/core/save/save-conflict-resolver.js +31 -275
- package/dist/core/save/save-conflict-resolver.js.map +1 -1
- package/dist/core/save/save-group-builder.js +52 -0
- package/dist/core/save/save-group-builder.js.map +1 -0
- package/dist/core/save/save-interactive-resolver.js +190 -0
- package/dist/core/save/save-interactive-resolver.js.map +1 -0
- package/dist/core/save/save-pipeline.js +58 -34
- package/dist/core/save/save-pipeline.js.map +1 -1
- package/dist/core/save/save-platform-handler.js +53 -0
- package/dist/core/save/save-platform-handler.js.map +1 -0
- package/dist/core/save/save-resolution-executor.js +145 -0
- package/dist/core/save/save-resolution-executor.js.map +1 -0
- package/dist/core/save/save-result-reporter.js +167 -0
- package/dist/core/save/save-result-reporter.js.map +1 -0
- package/dist/core/save/save-to-source-pipeline.js +154 -0
- package/dist/core/save/save-to-source-pipeline.js.map +1 -0
- package/dist/core/save/save-versioning.js +4 -4
- package/dist/core/save/save-versioning.js.map +1 -1
- package/dist/core/save/save-write-coordinator.js +204 -0
- package/dist/core/save/save-write-coordinator.js.map +1 -0
- package/dist/core/save/save-yml-resolution.js +28 -216
- package/dist/core/save/save-yml-resolution.js.map +1 -1
- package/dist/core/save/workspace-rename.js +7 -8
- package/dist/core/save/workspace-rename.js.map +1 -1
- package/dist/core/set/set-output.js +72 -0
- package/dist/core/set/set-output.js.map +1 -0
- package/dist/core/set/set-pipeline.js +361 -0
- package/dist/core/set/set-pipeline.js.map +1 -0
- package/dist/core/set/set-types.js +5 -0
- package/dist/core/set/set-types.js.map +1 -0
- package/dist/core/show/package-resolver.js +257 -0
- package/dist/core/show/package-resolver.js.map +1 -0
- package/dist/core/show/scope-discovery.js +165 -0
- package/dist/core/show/scope-discovery.js.map +1 -0
- package/dist/core/show/show-output.js +168 -0
- package/dist/core/show/show-output.js.map +1 -0
- package/dist/core/show/show-pipeline.js +113 -0
- package/dist/core/show/show-pipeline.js.map +1 -0
- package/dist/core/show/show-types.js +5 -0
- package/dist/core/show/show-types.js.map +1 -0
- package/dist/core/source-resolution/dependency-graph.js +104 -0
- package/dist/core/source-resolution/dependency-graph.js.map +1 -0
- package/dist/core/source-resolution/resolve-mutable-source.js +109 -0
- package/dist/core/source-resolution/resolve-mutable-source.js.map +1 -0
- package/dist/core/source-resolution/resolve-package-source.js +29 -0
- package/dist/core/source-resolution/resolve-package-source.js.map +1 -0
- package/dist/core/source-resolution/resolve-registry-version.js +35 -0
- package/dist/core/source-resolution/resolve-registry-version.js.map +1 -0
- package/dist/core/source-resolution/types.js.map +1 -0
- package/dist/core/status/status-file-discovery.js +23 -12
- package/dist/core/status/status-file-discovery.js.map +1 -1
- package/dist/core/status/status-pipeline.js +134 -0
- package/dist/core/status/status-pipeline.js.map +1 -0
- package/dist/core/sync/platform-sync-summary.js +27 -0
- package/dist/core/sync/platform-sync-summary.js.map +1 -0
- package/dist/core/uninstall/flow-aware-uninstaller.js +189 -0
- package/dist/core/uninstall/flow-aware-uninstaller.js.map +1 -0
- package/dist/core/uninstall/uninstall-file-discovery.js +11 -6
- package/dist/core/uninstall/uninstall-file-discovery.js.map +1 -1
- package/dist/core/uninstall/uninstall-pipeline.js +141 -0
- package/dist/core/uninstall/uninstall-pipeline.js.map +1 -0
- package/dist/core/universal-patterns.js +64 -0
- package/dist/core/universal-patterns.js.map +1 -0
- package/dist/index.js +99 -6
- package/dist/index.js.map +1 -1
- package/dist/types/flows.js +8 -0
- package/dist/types/flows.js.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/platform-flows.js +8 -0
- package/dist/types/platform-flows.js.map +1 -0
- package/dist/types/workspace-index.js +6 -0
- package/dist/types/workspace-index.js.map +1 -0
- package/dist/utils/custom-path-resolution.js +160 -0
- package/dist/utils/custom-path-resolution.js.map +1 -0
- package/dist/utils/dependency-coverage.js +1 -1
- package/dist/utils/dependency-coverage.js.map +1 -1
- package/dist/utils/file-processing.js +1 -1
- package/dist/utils/flow-index-installer.js +209 -0
- package/dist/utils/flow-index-installer.js.map +1 -0
- package/dist/utils/formatters.js +47 -1
- package/dist/utils/formatters.js.map +1 -1
- package/dist/utils/fs.js +17 -0
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/git-clone-registry.js +88 -0
- package/dist/utils/git-clone-registry.js.map +1 -0
- package/dist/utils/git-clone.js +69 -0
- package/dist/utils/git-clone.js.map +1 -0
- package/dist/utils/git-spec.js +96 -0
- package/dist/utils/git-spec.js.map +1 -0
- package/dist/utils/http-client.js +7 -0
- package/dist/utils/http-client.js.map +1 -1
- package/dist/utils/index-based-installer.js +356 -163
- package/dist/utils/index-based-installer.js.map +1 -1
- package/dist/utils/install-conflict-handler.js +2 -2
- package/dist/utils/install-conflict-handler.js.map +1 -1
- package/dist/utils/install-file-discovery.js +18 -13
- package/dist/utils/install-file-discovery.js.map +1 -1
- package/dist/utils/install-helpers.js +43 -20
- package/dist/utils/install-helpers.js.map +1 -1
- package/dist/utils/jsonc.js +23 -1
- package/dist/utils/jsonc.js.map +1 -1
- package/dist/utils/manifest-paths.js +1 -1
- package/dist/utils/manifest-paths.js.map +1 -1
- package/dist/utils/markdown-frontmatter.js +46 -0
- package/dist/utils/markdown-frontmatter.js.map +1 -1
- package/dist/utils/package-copy.js +5 -103
- package/dist/utils/package-copy.js.map +1 -1
- package/dist/utils/package-filters.js +9 -105
- package/dist/utils/package-filters.js.map +1 -1
- package/dist/utils/package-index-yml.js +27 -6
- package/dist/utils/package-index-yml.js.map +1 -1
- package/dist/utils/package-input.js +98 -0
- package/dist/utils/package-input.js.map +1 -0
- package/dist/utils/package-management.js +80 -28
- package/dist/utils/package-management.js.map +1 -1
- package/dist/utils/package-name-resolution.js +327 -0
- package/dist/utils/package-name-resolution.js.map +1 -0
- package/dist/utils/package-name.js +18 -16
- package/dist/utils/package-name.js.map +1 -1
- package/dist/utils/package-versioning.js +2 -33
- package/dist/utils/package-versioning.js.map +1 -1
- package/dist/utils/package-yml.js +19 -28
- package/dist/utils/package-yml.js.map +1 -1
- package/dist/utils/path-resolution.js +102 -0
- package/dist/utils/path-resolution.js.map +1 -0
- package/dist/utils/paths.js +6 -6
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/platform-file.js +36 -24
- package/dist/utils/platform-file.js.map +1 -1
- package/dist/utils/platform-mapper.js +222 -68
- package/dist/utils/platform-mapper.js.map +1 -1
- package/dist/utils/platform-root-files.js +44 -0
- package/dist/utils/platform-root-files.js.map +1 -0
- package/dist/utils/platform-utils.js +35 -54
- package/dist/utils/platform-utils.js.map +1 -1
- package/dist/utils/platform-yaml-merge.js +20 -140
- package/dist/utils/platform-yaml-merge.js.map +1 -1
- package/dist/utils/prompts.js +92 -7
- package/dist/utils/prompts.js.map +1 -1
- package/dist/utils/registry-entry-filter.js +50 -27
- package/dist/utils/registry-entry-filter.js.map +1 -1
- package/dist/utils/registry-paths.js +5 -4
- package/dist/utils/registry-paths.js.map +1 -1
- package/dist/utils/scope-resolution.js +156 -0
- package/dist/utils/scope-resolution.js.map +1 -0
- package/dist/utils/source-mutability.js +15 -0
- package/dist/utils/source-mutability.js.map +1 -0
- package/dist/utils/tarball.js +29 -4
- package/dist/utils/tarball.js.map +1 -1
- package/dist/utils/version-ranges.js +1 -32
- package/dist/utils/version-ranges.js.map +1 -1
- package/dist/utils/workspace-index-helpers.js +28 -0
- package/dist/utils/workspace-index-helpers.js.map +1 -0
- package/dist/utils/workspace-index-ownership.js +100 -0
- package/dist/utils/workspace-index-ownership.js.map +1 -0
- package/dist/utils/workspace-index-yml.js +173 -0
- package/dist/utils/workspace-index-yml.js.map +1 -0
- package/examples/custom-subdirs-platform.jsonc +157 -0
- package/package.json +7 -2
- package/platforms.jsonc +531 -84
- package/schemas/map-pipeline-v1.json +256 -0
- package/schemas/platforms-v1.json +400 -0
- package/specs/README.md +88 -0
- package/specs/add/README.md +166 -0
- package/specs/agents-claude.md +570 -0
- package/specs/agents-opencode.md +622 -0
- package/specs/apply/README.md +21 -0
- package/specs/apply/apply-behavior.md +58 -0
- package/specs/apply/apply-command.md +51 -0
- package/specs/apply/conflicts.md +41 -0
- package/specs/apply/index-effects.md +81 -0
- package/specs/architecture.md +107 -0
- package/specs/auth/README.md +17 -0
- package/specs/auth/auth-http-contract.md +25 -0
- package/specs/auth/cli/credentials.md +39 -0
- package/specs/auth/cli/login.md +32 -0
- package/specs/auth/cli/logout.md +16 -0
- package/specs/claude-mcp.md +1065 -0
- package/specs/claude-plugins-marketplace.md +363 -0
- package/specs/claude-plugins.md +413 -0
- package/specs/cli-options.md +52 -0
- package/specs/codex-mcp.md +114 -0
- package/specs/commands-overview.md +175 -0
- package/specs/directory-layout.md +95 -0
- package/specs/install/README.md +12 -4
- package/specs/install/git-sources.md +230 -0
- package/specs/install/install-behavior.md +483 -73
- package/specs/install/package-yml-canonical.md +67 -35
- package/specs/install/version-resolution.md +69 -115
- package/specs/new/README.md +769 -0
- package/specs/new/SUMMARY.md +310 -0
- package/specs/new/scope-behavior.md +793 -0
- package/specs/pack/README.md +77 -0
- package/specs/pack/package-name-resolution.md +330 -0
- package/specs/package/README.md +18 -17
- package/specs/package/nested-packages-and-parent-packages.md +32 -31
- package/specs/package/package-index-yml.md +95 -101
- package/specs/package/package-root-layout.md +64 -46
- package/specs/package/registry-payload-and-copy.md +50 -44
- package/specs/package/universal-content.md +33 -56
- package/specs/package-sources.md +248 -0
- package/specs/platforms/README.md +52 -0
- package/specs/platforms/configuration.md +571 -0
- package/specs/platforms/detection.md +552 -0
- package/specs/platforms/directory-layout.md +599 -0
- package/specs/platforms/examples.md +1146 -0
- package/specs/platforms/flow-reference.md +1240 -0
- package/specs/platforms/flows.md +1488 -0
- package/specs/platforms/map-pipeline.md +801 -0
- package/specs/platforms/overview.md +349 -0
- package/specs/platforms/specification.md +700 -0
- package/specs/platforms/troubleshooting.md +697 -0
- package/specs/platforms/universal-converter.md +520 -0
- package/specs/push/README.md +1 -0
- package/specs/push/push-behavior.md +11 -3
- package/specs/push/push-remote-upload.md +1 -1
- package/specs/push/push-scoping.md +1 -1
- package/specs/push/push-version-selection.md +1 -1
- package/specs/registry.md +111 -0
- package/specs/remove/README.md +257 -0
- package/specs/save/README.md +21 -17
- package/specs/save/save-conflict-resolution.md +205 -83
- package/specs/save/save-file-discovery.md +6 -4
- package/specs/save/save-frontmatter-overrides.md +11 -15
- package/specs/save/save-modes-inputs.md +9 -39
- package/specs/save/save-naming-scoping.md +4 -4
- package/specs/save/save-package-detection.md +13 -13
- package/specs/save/save-registry-sync.md +16 -106
- package/specs/save/save-versioning.md +80 -0
- package/specs/scope-management.md +92 -0
- package/specs/set/README.md +520 -0
- package/specs/set/set-behavior.md +563 -0
- package/specs/show/README.md +483 -0
- package/specs/show/show-remote.md +494 -0
- package/specs/status/README.md +38 -0
- package/specs/uninstall/README.md +231 -0
- package/dist/commands/duplicate.js +0 -69
- package/dist/commands/duplicate.js.map +0 -1
- package/dist/commands/init.js +0 -117
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/prune.js +0 -357
- package/dist/commands/prune.js.map +0 -1
- package/dist/commands/tui.js +0 -61
- package/dist/commands/tui.js.map +0 -1
- package/dist/core/install/index.js +0 -3
- package/dist/core/install/index.js.map +0 -1
- package/dist/core/push/push-single-file.js +0 -56
- package/dist/core/push/push-single-file.js.map +0 -1
- package/dist/core/save/package-detection.js +0 -147
- package/dist/core/save/package-detection.js.map +0 -1
- package/dist/core/save/save-single-file.js +0 -124
- package/dist/core/save/save-single-file.js.map +0 -1
- package/dist/core/token-store.js +0 -73
- package/dist/core/token-store.js.map +0 -1
- package/dist/tui/app.js +0 -95
- package/dist/tui/app.js.map +0 -1
- package/dist/tui/components/package-list.js +0 -73
- package/dist/tui/components/package-list.js.map +0 -1
- package/dist/tui/controller.js +0 -365
- package/dist/tui/controller.js.map +0 -1
- package/dist/tui/index.js +0 -12
- package/dist/tui/index.js.map +0 -1
- package/dist/tui/services/file-index.js +0 -64
- package/dist/tui/services/file-index.js.map +0 -1
- package/dist/tui/services/packages.js +0 -18
- package/dist/tui/services/packages.js.map +0 -1
- package/dist/tui/services/save.js +0 -21
- package/dist/tui/services/save.js.map +0 -1
- package/dist/tui/state/app-state.js +0 -15
- package/dist/tui/state/app-state.js.map +0 -1
- package/dist/tui/state.js +0 -17
- package/dist/tui/state.js.map +0 -1
- package/dist/tui/types.js.map +0 -1
- package/dist/tui/views/add-file-modal.js +0 -129
- package/dist/tui/views/add-file-modal.js.map +0 -1
- package/dist/tui/views/file-preview.js +0 -44
- package/dist/tui/views/file-preview.js.map +0 -1
- package/dist/tui/views/list-packages.js +0 -73
- package/dist/tui/views/list-packages.js.map +0 -1
- package/dist/tui/views/main-menu.js +0 -29
- package/dist/tui/views/main-menu.js.map +0 -1
- package/dist/tui/views/manage-view.js +0 -81
- package/dist/tui/views/manage-view.js.map +0 -1
- package/dist/tui/views/package-hub.js +0 -120
- package/dist/tui/views/package-hub.js.map +0 -1
- package/dist/tui/views/placeholder.js +0 -24
- package/dist/tui/views/placeholder.js.map +0 -1
- package/dist/utils/bun-bootstrap.js +0 -72
- package/dist/utils/bun-bootstrap.js.map +0 -1
- package/dist/utils/entity-id.js +0 -19
- package/dist/utils/entity-id.js.map +0 -1
- package/dist/utils/package-local-files.js +0 -5
- package/dist/utils/package-local-files.js.map +0 -1
- package/dist/utils/path-matching.js +0 -74
- package/dist/utils/path-matching.js.map +0 -1
- package/dist/utils/root-file-operations.js +0 -39
- package/dist/utils/root-file-operations.js.map +0 -1
- package/dist/utils/root-file-transformer.js +0 -27
- package/dist/utils/root-file-transformer.js.map +0 -1
- package/dist/utils/yaml-frontmatter.js +0 -25
- package/dist/utils/yaml-frontmatter.js.map +0 -1
- package/specs/auth/auth-device-flow.md +0 -70
- package/specs/login/login-device-flow.md +0 -70
- package/specs/platforms.md +0 -193
- package/specs/save-pack-versioning.md +0 -224
- package/specs/save-pack.md +0 -68
- /package/dist/{tui → core/source-resolution}/types.js +0 -0
|
@@ -2,145 +2,267 @@
|
|
|
2
2
|
|
|
3
3
|
#### 1. Overview
|
|
4
4
|
|
|
5
|
-
When multiple candidates exist for the same registry path, the pipeline must decide which content to
|
|
5
|
+
When multiple workspace candidates exist for the same registry path, the pipeline must decide which content to save. This document describes the conflict resolution rules for the **workspace → source** save flow.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
#### 2.
|
|
9
|
+
#### 2. Single-Direction Principle
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Save is a **unidirectional** operation: workspace content overwrites source content. There is no comparison or "merging" with existing source files. The only conflicts that need resolution are:
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
13
|
+
1. **Multiple workspace files mapping to the same registry path**
|
|
14
|
+
2. **Platform-specific vs. universal content selection**
|
|
15
|
+
|
|
16
|
+
The source file is only used for **optimization** (skip writes when content is identical) and **parity checking** (skip prompts when workspace matches source).
|
|
16
17
|
|
|
17
18
|
---
|
|
18
19
|
|
|
19
|
-
#### 3.
|
|
20
|
+
#### 3. Resolution Goals
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
For each group where multiple workspace candidates exist, the pipeline decides:
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
- Which workspace candidate becomes the **universal** package content
|
|
25
|
+
- Which workspace candidates should be saved as **platform-specific** variants
|
|
26
|
+
- Which candidates should be skipped (already at parity or user choice)
|
|
25
27
|
|
|
26
28
|
---
|
|
27
29
|
|
|
28
|
-
#### 4.
|
|
30
|
+
#### 4. Parity Checking
|
|
31
|
+
|
|
32
|
+
Before prompting, the pipeline checks if workspace files are already at parity with source:
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
##### Universal Parity
|
|
35
|
+
A workspace file is at **universal parity** if its content hash matches the universal source file.
|
|
31
36
|
|
|
32
|
-
#####
|
|
37
|
+
##### Platform-Specific Parity
|
|
38
|
+
A workspace file is at **platform-specific parity** if:
|
|
39
|
+
- It has a platform association (e.g., `cursor`, `claude`)
|
|
40
|
+
- Its content hash matches the corresponding platform-specific source file (e.g., `commands.cursor.md`)
|
|
33
41
|
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
42
|
+
##### Auto-Skipping
|
|
43
|
+
Files at parity are automatically skipped with a clear message:
|
|
44
|
+
- "Already matches universal - auto-skipping"
|
|
45
|
+
- "Already matches platform-specific file - auto-skipping"
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
This eliminates unnecessary prompts when files are already up-to-date.
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
- That candidate is used as the universal content for the root file.
|
|
49
|
+
---
|
|
43
50
|
|
|
44
|
-
|
|
51
|
+
#### 5. Conflict Types
|
|
45
52
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
- With `--force`:
|
|
50
|
-
- The local candidate always wins.
|
|
51
|
-
- Without `--force`:
|
|
52
|
-
- The user is prompted to choose which candidate should become the universal root content.
|
|
53
|
+
##### No Workspace Candidates
|
|
54
|
+
- No action needed
|
|
55
|
+
- Group is skipped entirely
|
|
53
56
|
|
|
54
|
-
#####
|
|
57
|
+
##### Single Workspace Candidate
|
|
58
|
+
- **If matches source (parity)**: Auto-skip (no write needed)
|
|
59
|
+
- **If differs from source**: Write to source automatically (no prompt)
|
|
55
60
|
|
|
56
|
-
|
|
57
|
-
-
|
|
61
|
+
##### Multiple Identical Workspace Candidates (Same Content Hash)
|
|
62
|
+
- **If all match source (parity)**: Auto-skip all
|
|
63
|
+
- **If differ from source**: Pick newest by mtime, write to source (no prompt)
|
|
64
|
+
|
|
65
|
+
##### Multiple Differing Workspace Candidates
|
|
66
|
+
- **With `--force` flag:**
|
|
67
|
+
- Auto-select newest by mtime (alphabetical tie-breaker if mtimes equal)
|
|
68
|
+
- Skip others
|
|
69
|
+
- No prompts
|
|
70
|
+
- **Without `--force`:**
|
|
71
|
+
- Interactive resolution (see below)
|
|
58
72
|
|
|
59
73
|
---
|
|
60
74
|
|
|
61
|
-
####
|
|
75
|
+
#### 6. Interactive Resolution Flow
|
|
62
76
|
|
|
63
|
-
|
|
77
|
+
When multiple differing workspace candidates exist, the user is prompted **once per file** in a single-step process:
|
|
64
78
|
|
|
65
|
-
#####
|
|
79
|
+
##### Step 1: Parity Filtering
|
|
80
|
+
For each candidate (ordered by mtime, newest first):
|
|
81
|
+
- Check universal parity → Auto-skip if matches
|
|
82
|
+
- Check platform-specific parity → Auto-skip if matches
|
|
83
|
+
- Continue to prompt if not at parity
|
|
66
84
|
|
|
67
|
-
|
|
68
|
-
|
|
85
|
+
##### Step 2: Per-File Prompts
|
|
86
|
+
For each remaining candidate:
|
|
69
87
|
|
|
70
|
-
|
|
88
|
+
**Before universal selected:**
|
|
89
|
+
- Options: `[Set as universal]` `[Mark as platform-specific]` `[Skip]`
|
|
71
90
|
|
|
72
|
-
|
|
73
|
-
|
|
91
|
+
**After universal selected:**
|
|
92
|
+
- Check if identical to selected universal → Auto-skip if matches
|
|
93
|
+
- Options: `[Mark as platform-specific]` `[Skip]`
|
|
74
94
|
|
|
75
|
-
#####
|
|
95
|
+
##### Step 3: Resolution
|
|
96
|
+
After all prompts:
|
|
97
|
+
- **Universal selected**: Write to `<registry-path>`
|
|
98
|
+
- **Platform-specific marked**: Write to `<registry-path>.<platform>.<ext>`
|
|
99
|
+
- **Skipped**: No action (neither written)
|
|
100
|
+
- **No universal selected**: Original universal file remains untouched, only platform-specific files written
|
|
76
101
|
|
|
77
|
-
|
|
78
|
-
- The group is skipped (no changes).
|
|
102
|
+
---
|
|
79
103
|
|
|
80
|
-
|
|
104
|
+
#### 7. Resolution Principles
|
|
81
105
|
|
|
82
|
-
|
|
106
|
+
The save flow ensures:
|
|
83
107
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- The local candidate wins even if workspace content is newer.
|
|
108
|
+
1. **Workspace always wins**: Source content is overwritten by workspace selections
|
|
109
|
+
2. **Smart filtering**: Files at parity are auto-skipped (no unnecessary prompts)
|
|
110
|
+
3. **Progressive disclosure**: Options simplify after universal is selected
|
|
111
|
+
4. **No data loss**: Skipped files remain in workspace, can be saved later
|
|
112
|
+
5. **Platform-aware**: Respects both universal and platform-specific parity
|
|
113
|
+
6. **User control**: User can skip individual files or mark as platform-specific
|
|
91
114
|
|
|
92
115
|
---
|
|
93
116
|
|
|
94
|
-
####
|
|
117
|
+
#### 8. Force Mode Behavior
|
|
118
|
+
|
|
119
|
+
With `--force` flag:
|
|
120
|
+
- Auto-selects newest workspace file by mtime
|
|
121
|
+
- **Tie-breaking**: If multiple files have same mtime, selects first alphabetically
|
|
122
|
+
- No prompts (fully automated)
|
|
123
|
+
- Transparent logging of selections and skipped files
|
|
124
|
+
- Does NOT auto-create platform-specific variants (only universal)
|
|
125
|
+
|
|
126
|
+
Example force mode output:
|
|
127
|
+
```
|
|
128
|
+
ℹ Force mode: Auto-selecting newest (.cursor/commands/test.md)
|
|
129
|
+
Skipping: .claude/commands/test.md (older)
|
|
130
|
+
Skipping: .opencode/commands/test.md (older)
|
|
131
|
+
|
|
132
|
+
✓ Saved my-pkg
|
|
133
|
+
Updated: commands/test.md
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Example with tie-breaking:
|
|
137
|
+
```
|
|
138
|
+
ℹ Force mode: Multiple files have same modification time (1/15/2024 10:30 AM)
|
|
139
|
+
Auto-selecting first alphabetically: .claude/commands/test.md
|
|
140
|
+
Tied files:
|
|
141
|
+
→ .claude/commands/test.md
|
|
142
|
+
.cursor/commands/test.md
|
|
143
|
+
Skipping: .cursor/commands/test.md (tied, not alphabetically first)
|
|
144
|
+
|
|
145
|
+
💡 Tip: If this wasn't the file you wanted, run without --force
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
#### 9. Edge Cases
|
|
151
|
+
|
|
152
|
+
##### No Universal Selected
|
|
153
|
+
If user skips all candidates or marks all as platform-specific:
|
|
154
|
+
- Original universal file remains **untouched**
|
|
155
|
+
- Only platform-specific files are written
|
|
156
|
+
- No confirmation prompt needed
|
|
95
157
|
|
|
96
|
-
|
|
158
|
+
##### All Files Skipped
|
|
159
|
+
If user skips all files (or all are at parity):
|
|
160
|
+
- No changes made
|
|
161
|
+
- No confirmation prompt needed
|
|
162
|
+
- Message: "No changes to `<path>`"
|
|
97
163
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
164
|
+
##### All Files at Parity
|
|
165
|
+
If all workspace files match source:
|
|
166
|
+
- All auto-skipped with clear messages
|
|
167
|
+
- No prompts shown
|
|
168
|
+
- Message: "No changes needed"
|
|
101
169
|
|
|
102
170
|
---
|
|
103
171
|
|
|
104
|
-
####
|
|
172
|
+
#### 10. Example Scenarios
|
|
105
173
|
|
|
106
|
-
|
|
174
|
+
##### Scenario A: Mixed Parity
|
|
175
|
+
```
|
|
176
|
+
Workspace:
|
|
177
|
+
.cursor/commands/test.md (hash: abc123) ← Matches universal
|
|
178
|
+
.claude/commands/test.md (hash: def456) ← Different!
|
|
107
179
|
|
|
108
|
-
|
|
180
|
+
Source:
|
|
181
|
+
commands/test.md (hash: abc123)
|
|
109
182
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
183
|
+
Interactive flow:
|
|
184
|
+
✓ .cursor/commands/test.md
|
|
185
|
+
Already matches universal - auto-skipping
|
|
113
186
|
|
|
114
|
-
|
|
187
|
+
.claude/commands/test.md (claude) [1/14/2024]
|
|
188
|
+
What should we do with this file?
|
|
189
|
+
> Mark as platform-specific
|
|
115
190
|
|
|
116
|
-
|
|
117
|
-
|
|
191
|
+
Result:
|
|
192
|
+
Created: commands.claude.md (platform-specific)
|
|
193
|
+
```
|
|
118
194
|
|
|
119
|
-
#####
|
|
195
|
+
##### Scenario B: Platform-Specific at Parity
|
|
196
|
+
```
|
|
197
|
+
Workspace:
|
|
198
|
+
.cursor/commands/test.md (hash: abc123) ← Different from universal
|
|
199
|
+
.claude/commands/test.md (hash: def456) ← Matches platform file!
|
|
120
200
|
|
|
121
|
-
|
|
201
|
+
Source:
|
|
202
|
+
commands/test.md (hash: xyz789)
|
|
203
|
+
commands.claude.md (hash: def456) ← Matches!
|
|
122
204
|
|
|
123
|
-
|
|
124
|
-
|
|
205
|
+
Interactive flow:
|
|
206
|
+
.cursor/commands/test.md (cursor) [1/15/2024]
|
|
207
|
+
What should we do with this file?
|
|
208
|
+
> Set as universal
|
|
209
|
+
|
|
210
|
+
✓ .claude/commands/test.md
|
|
211
|
+
Already matches platform-specific file - auto-skipping
|
|
212
|
+
|
|
213
|
+
Result:
|
|
214
|
+
Updated: commands/test.md (from cursor)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
##### Scenario C: One Edited, Others at Parity
|
|
218
|
+
```
|
|
219
|
+
Workspace:
|
|
220
|
+
.cursor/commands/test.md (hash: NEW123) ← User just edited
|
|
221
|
+
.claude/commands/test.md (hash: abc123) ← At parity
|
|
222
|
+
.opencode/commands/test.md (hash: abc123) ← At parity
|
|
223
|
+
|
|
224
|
+
Source:
|
|
225
|
+
commands/test.md (hash: abc123)
|
|
226
|
+
|
|
227
|
+
Interactive flow:
|
|
228
|
+
.cursor/commands/test.md (cursor) [1/15/2024 10:35 AM]
|
|
229
|
+
What should we do with this file?
|
|
230
|
+
> Set as universal
|
|
231
|
+
|
|
232
|
+
✓ .claude/commands/test.md
|
|
233
|
+
Already matches universal - auto-skipping
|
|
234
|
+
✓ .opencode/commands/test.md
|
|
235
|
+
Already matches universal - auto-skipping
|
|
236
|
+
|
|
237
|
+
Result:
|
|
238
|
+
Updated: commands/test.md (from cursor)
|
|
239
|
+
```
|
|
125
240
|
|
|
126
241
|
---
|
|
127
242
|
|
|
128
|
-
####
|
|
243
|
+
#### 11. Removed Behaviors
|
|
129
244
|
|
|
130
|
-
|
|
245
|
+
The following behaviors have been removed as they conflicted with single-direction flow:
|
|
131
246
|
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
247
|
+
- ❌ Comparing workspace mtime against source mtime for resolution
|
|
248
|
+
- ❌ Preferring source content when it's newer
|
|
249
|
+
- ❌ Prompting to choose between source and workspace versions
|
|
250
|
+
- ❌ "Local wins with --force" logic
|
|
251
|
+
- ❌ Two-phase prompt flow (platform marking + universal selection)
|
|
252
|
+
|
|
253
|
+
---
|
|
136
254
|
|
|
137
|
-
|
|
138
|
-
- Each marked platform‑specific workspace candidate is written to a platform‑specific markdown path (e.g. `yaml-test.qwen.md`) using the **full candidate content** (frontmatter + body).
|
|
139
|
-
- For root conflicts, only the section body is used (consistent with root handling elsewhere).
|
|
255
|
+
#### 12. Summary
|
|
140
256
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
257
|
+
| Situation | Behavior |
|
|
258
|
+
|-----------|----------|
|
|
259
|
+
| **Single workspace file** | Write if differs from source, skip if at parity |
|
|
260
|
+
| **Multiple identical** | Pick newest, write if differs from source |
|
|
261
|
+
| **Multiple differing + force** | Auto-select newest (alphabetical tie-breaker) |
|
|
262
|
+
| **Multiple differing + interactive** | Prompt per file (parity-filtered, single-step) |
|
|
263
|
+
| **File matches universal** | Auto-skip with message |
|
|
264
|
+
| **File matches platform-specific** | Auto-skip with message |
|
|
265
|
+
| **No universal selected** | Original untouched, only platform-specific written |
|
|
266
|
+
| **All skipped** | No changes, no confirmation |
|
|
146
267
|
|
|
268
|
+
The conflict resolution ensures a smooth, intuitive workflow that minimizes prompts while giving users full control over their content.
|
|
@@ -12,9 +12,11 @@ For each save/pack run, the pipeline considers up to four sets of candidates:
|
|
|
12
12
|
|
|
13
13
|
##### Local platform candidates
|
|
14
14
|
|
|
15
|
-
- Files already present in the **package
|
|
15
|
+
- Files already present in the **package root**:
|
|
16
|
+
- **Root package**: `<cwd>/` (universal subdirs, root files, `root/` direct copy)
|
|
17
|
+
- **Nested package**: `<cwd>/.openpackage/packages/<name>/`
|
|
16
18
|
- Excludes:
|
|
17
|
-
- Internal `
|
|
19
|
+
- Internal `openpackage.index.yml` metadata.
|
|
18
20
|
- Certain root marker files (e.g. the unified root agents file) that are handled specially.
|
|
19
21
|
- Only includes paths that are allowed by the registry path rules (e.g. skip internal or unsupported paths).
|
|
20
22
|
|
|
@@ -54,7 +56,7 @@ Each candidate includes:
|
|
|
54
56
|
|
|
55
57
|
#### 4. First Save vs Subsequent Saves
|
|
56
58
|
|
|
57
|
-
The behavior changes depending on whether the package already has an index (`
|
|
59
|
+
The behavior changes depending on whether the package already has an index (`openpackage.index.yml`) with file mapping information.
|
|
58
60
|
|
|
59
61
|
##### First save (no index present, or empty file mapping)
|
|
60
62
|
|
|
@@ -67,7 +69,7 @@ The behavior changes depending on whether the package already has an index (`pac
|
|
|
67
69
|
|
|
68
70
|
##### Subsequent saves (index present with file mappings)
|
|
69
71
|
|
|
70
|
-
- The pipeline uses `
|
|
72
|
+
- The pipeline uses `openpackage.index.yml` as a **filter** for which workspace paths are relevant:
|
|
71
73
|
- It builds a set of allowed registry paths and directories based on the index's `files` keys.
|
|
72
74
|
- Workspace candidates whose registry paths are outside this allowed set are ignored, except for root files that are deliberately allowed.
|
|
73
75
|
- It merges local and workspace candidates:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
### Save Pipeline – Frontmatter and
|
|
1
|
+
### Save Pipeline – Frontmatter and Inline Platform Overrides
|
|
2
2
|
|
|
3
3
|
#### 1. Overview
|
|
4
4
|
|
|
5
|
-
For markdown files, the pipeline manages **frontmatter** and platform‑specific overrides to keep shared metadata centralized while allowing platform-specific behavior.
|
|
5
|
+
For markdown files, the pipeline manages **frontmatter** and platform‑specific overrides to keep shared metadata centralized while allowing platform-specific behavior. Platform overrides now live **inline** inside the universal markdown frontmatter under `openpackage.<platform>` (ids/aliases); no separate `.yml` override files are written.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -26,25 +26,22 @@ For each platform:
|
|
|
26
26
|
|
|
27
27
|
- The per‑platform frontmatter is compared against the universal frontmatter.
|
|
28
28
|
- Only the **difference** per platform is treated as that platform's override, or omitted if empty.
|
|
29
|
-
- Platform overrides are
|
|
29
|
+
- Platform overrides are embedded **inline** under `openpackage.<platform>` (id/alias) in the universal frontmatter.
|
|
30
|
+
- During apply/install, the target platform’s block is deep‑merged onto the common frontmatter to produce the final frontmatter for that platform. Platform blocks are not emitted in the installed files.
|
|
30
31
|
|
|
31
32
|
---
|
|
32
33
|
|
|
33
34
|
#### 5. Conflicts with Existing Overrides
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- The pipeline compares existing and new frontmatter, taking modification times into account.
|
|
38
|
-
- Typically:
|
|
39
|
-
- If the newer change comes from the workspace, it is preferred by default.
|
|
40
|
-
- When there is a conflicting but not clearly newer override, the user may be prompted to choose between workspace and existing override content where appropriate.
|
|
36
|
+
All overrides are computed from workspace candidates (overwrite-derived). The universal frontmatter is rewritten to contain the shared keys plus per-platform blocks; no external override files are consulted or prompted for.
|
|
41
37
|
|
|
42
38
|
---
|
|
43
39
|
|
|
44
40
|
#### 6. Resulting Layout
|
|
45
41
|
|
|
46
|
-
- One universal markdown file with
|
|
47
|
-
-
|
|
42
|
+
- One universal markdown file with:
|
|
43
|
+
- Shared/common frontmatter keys
|
|
44
|
+
- Per‑platform blocks nested under `openpackage.<platform>` containing only the per‑platform differences
|
|
48
45
|
|
|
49
46
|
This scheme keeps:
|
|
50
47
|
|
|
@@ -60,15 +57,14 @@ After all conflicts and frontmatter merges are resolved, the pipeline reads the
|
|
|
60
57
|
|
|
61
58
|
##### Excluded
|
|
62
59
|
|
|
63
|
-
- `
|
|
60
|
+
- `openpackage.index.yml`.
|
|
64
61
|
- Internal files that are not considered part of the package content.
|
|
65
62
|
|
|
66
63
|
##### Included
|
|
67
64
|
|
|
68
65
|
- Paths allowed by the regular registry path rules.
|
|
69
66
|
- Root files (the unified root agents file and related root docs).
|
|
70
|
-
-
|
|
71
|
-
- Root‑level files adjacent to `package.yml` that are intended as part of the package.
|
|
67
|
+
- Root‑level files adjacent to `openpackage.yml` that are intended as part of the package.
|
|
72
68
|
|
|
73
69
|
---
|
|
74
70
|
|
|
@@ -77,5 +73,5 @@ After all conflicts and frontmatter merges are resolved, the pipeline reads the
|
|
|
77
73
|
The resulting list of files, with paths relative to the package directory, is what gets:
|
|
78
74
|
|
|
79
75
|
- Copied into the local registry under the computed version.
|
|
80
|
-
- Used to drive platform sync and any subsequent operations in the save pipeline.
|
|
76
|
+
- Used to drive optional platform apply/sync and any subsequent operations in the save pipeline.
|
|
81
77
|
|
|
@@ -1,55 +1,25 @@
|
|
|
1
|
-
### Save
|
|
1
|
+
### Save – Inputs and Flags
|
|
2
2
|
|
|
3
3
|
#### 1. Overview
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`opkg save` syncs workspace edits back to a package **source of truth** using the unified workspace index (`.openpackage/openpackage.index.yml`) as the mapping authority.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- `opkg pack` – promotes the current workspace state to a **stable** snapshot.
|
|
9
|
-
|
|
10
|
-
Both commands:
|
|
11
|
-
|
|
12
|
-
- Detect which package to operate on.
|
|
13
|
-
- Resolve the effective package name (including scoping and optional rename).
|
|
14
|
-
- Compute a target version (WIP vs stable) following `save-pack-versioning.md`.
|
|
15
|
-
- Select the set of files that belong to the package.
|
|
16
|
-
- Copy those files into the local registry.
|
|
17
|
-
- Clean up outdated WIP copies for the current workspace.
|
|
18
|
-
- Sync files to platform‑specific layouts (platform sync).
|
|
19
|
-
|
|
20
|
-
Versioning details are defined in `../save-pack-versioning.md`.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
#### 2. Modes
|
|
25
|
-
|
|
26
|
-
The pipeline runs in one of two **modes**:
|
|
27
|
-
|
|
28
|
-
##### WIP mode (`save`)
|
|
29
|
-
|
|
30
|
-
- Always produces a **WIP prerelease** version derived from the stable line in `package.yml`.
|
|
31
|
-
- May optionally auto‑bump `package.yml.version` to the next patch after a stable cycle, per `../save-pack-versioning.md`.
|
|
32
|
-
|
|
33
|
-
##### Stable mode (`pack`)
|
|
34
|
-
|
|
35
|
-
- Produces a **stable** version exactly equal to the current `package.yml.version`.
|
|
36
|
-
- Never mutates `package.yml.version`.
|
|
7
|
+
It does **not** create registry snapshots (that is `opkg pack`).
|
|
37
8
|
|
|
38
9
|
---
|
|
39
10
|
|
|
40
11
|
#### 3. Inputs
|
|
41
12
|
|
|
42
|
-
- **Working directory (`cwd`)** – establishes the workspace.
|
|
43
|
-
- **Package name argument (
|
|
44
|
-
- **Optional path argument
|
|
13
|
+
- **Working directory (`effective cwd` via shell dir or global `--cwd <dir>` flag)** – establishes the workspace root for file discovery, package detection, and saving (see [../cli-options.md]).
|
|
14
|
+
- **Package name argument (required)** – `save` requires a package name because it operates on mappings stored in the unified workspace index.
|
|
15
|
+
- **Optional path argument** – `opkg save <package> <path>` first runs the add pipeline for that path (copy-to-root for non-platform paths), then runs `save` for the package.
|
|
45
16
|
|
|
46
17
|
---
|
|
47
18
|
|
|
48
19
|
#### 4. Flags
|
|
49
20
|
|
|
50
21
|
- **`force`**
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
- **`
|
|
54
|
-
- **`platform-specific` (save only, when path is provided)** – forwarded to the add stage to generate platform-scoped variants for platform subdirectories.
|
|
22
|
+
- Auto-selects by latest mtime when conflicts occur (non-interactive resolution).
|
|
23
|
+
- **`platform-specific` (only when path is provided)** – forwarded to the add stage to generate platform-scoped variants for platform subdirectory inputs.
|
|
24
|
+
- **`apply` (only when path is provided)** – forwarded to the add stage to immediately apply after adding (sync platforms).
|
|
55
25
|
|
|
@@ -13,7 +13,7 @@ After the package context is known, the pipeline determines the **effective name
|
|
|
13
13
|
- The detected package config's `name` when no argument is provided.
|
|
14
14
|
- The pipeline **never accepts a version suffix** here:
|
|
15
15
|
- Any `name@version` input is rejected with a clear error.
|
|
16
|
-
- The error instructs the user to change the stable line in `
|
|
16
|
+
- The error instructs the user to change the stable line in `openpackage.yml` instead.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -67,7 +67,7 @@ At the end of this phase the pipeline knows:
|
|
|
67
67
|
|
|
68
68
|
When a rename is needed during `save` or `pack`, the workspace is updated so that **on‑disk layout matches the new name**.
|
|
69
69
|
|
|
70
|
-
##### `
|
|
70
|
+
##### `openpackage.yml`
|
|
71
71
|
|
|
72
72
|
- The package's `name` field is updated to the final name.
|
|
73
73
|
|
|
@@ -75,9 +75,9 @@ When a rename is needed during `save` or `pack`, the workspace is updated so tha
|
|
|
75
75
|
|
|
76
76
|
- Root files that contain package markers (e.g. sections in shared documentation) are updated so that markers reference the new name instead of the old one.
|
|
77
77
|
|
|
78
|
-
##### Root `
|
|
78
|
+
##### Root `openpackage.yml` dependencies
|
|
79
79
|
|
|
80
|
-
- The workspace's root `
|
|
80
|
+
- The workspace's root `openpackage.yml` (if present) updates any dependency entries that reference the old name to the new name in both `packages` and `dev-packages`.
|
|
81
81
|
|
|
82
82
|
##### Nested package directories
|
|
83
83
|
|
|
@@ -8,7 +8,7 @@ Before any name or version logic, the pipeline determines which package is being
|
|
|
8
8
|
|
|
9
9
|
#### 2. Core Rule
|
|
10
10
|
|
|
11
|
-
Any directory that contains
|
|
11
|
+
Any directory that contains `openpackage.yml` is considered a **valid package**.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -16,23 +16,23 @@ Any directory that contains `.openpackage/package.yml` is considered a **valid p
|
|
|
16
16
|
|
|
17
17
|
##### No package name argument
|
|
18
18
|
|
|
19
|
-
- Looks for
|
|
19
|
+
- Looks for `openpackage.yml` in the current directory.
|
|
20
20
|
- If found:
|
|
21
21
|
- Treats the current directory as the **root package**.
|
|
22
|
-
- Uses its `
|
|
22
|
+
- Uses its `openpackage.yml` as the configuration source.
|
|
23
23
|
- If not found:
|
|
24
24
|
- The pipeline **aborts** with a user‑friendly message describing:
|
|
25
|
-
- That no package was detected at `cwd
|
|
26
|
-
- That
|
|
25
|
+
- That no package was detected at effective `cwd` (shell dir or `--cwd <dir>`; see [../../cli-options.md]).
|
|
26
|
+
- That an `openpackage.yml` file is required.
|
|
27
27
|
- How to initialize a package or specify a name explicitly.
|
|
28
28
|
|
|
29
29
|
##### Package name argument provided
|
|
30
30
|
|
|
31
|
-
- First checks whether the **root package** (
|
|
31
|
+
- First checks whether the **root package** (`openpackage.yml` at `cwd`) has a matching `name`.
|
|
32
32
|
- If yes, the root is the target.
|
|
33
33
|
- Otherwise, looks under the **nested packages directory**:
|
|
34
|
-
- Direct directory match under `.openpackage/packages/<name>/
|
|
35
|
-
- If necessary, scans all nested package directories to find
|
|
34
|
+
- Direct directory match under `.openpackage/packages/<name>/openpackage.yml`.
|
|
35
|
+
- If necessary, scans all nested package directories to find an `openpackage.yml` whose `name` field equals the requested package name, even if the directory name differs.
|
|
36
36
|
- If no matching package is found:
|
|
37
37
|
- The pipeline **aborts** with a message explaining:
|
|
38
38
|
- The package name was not found.
|
|
@@ -46,11 +46,11 @@ Any directory that contains `.openpackage/package.yml` is considered a **valid p
|
|
|
46
46
|
Each detected package context includes:
|
|
47
47
|
|
|
48
48
|
- **Package directory** (logical package root for reporting).
|
|
49
|
-
- **Path to `
|
|
50
|
-
- **Package files directory** (`packageFilesDir` in code):
|
|
51
|
-
- For the **root package**: `<cwd
|
|
52
|
-
- For **nested packages**: `<cwd>/.openpackage/packages/<name
|
|
53
|
-
- Parsed `
|
|
49
|
+
- **Path to `openpackage.yml`** (authoritative manifest location).
|
|
50
|
+
- **Package files directory** (`packageFilesDir` in code; same as package root):
|
|
51
|
+
- For the **root package**: `<cwd>/`
|
|
52
|
+
- For **nested packages**: `<cwd>/.openpackage/packages/<name>/`
|
|
53
|
+
- Parsed `openpackage.yml` configuration.
|
|
54
54
|
- Whether it is the **root package** or **nested**.
|
|
55
55
|
- Whether the package's directory is the same as `cwd`.
|
|
56
56
|
|