@papillon6814/copi 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/LICENSE.unicode +39 -0
  2. package/README.md +57 -5
  3. package/dist/native/rename-exclusive-arm64 +0 -0
  4. package/dist/native/rename-exclusive-arm64.manifest.json +12 -0
  5. package/dist/src/apply.d.ts +9 -0
  6. package/dist/src/apply.js +110 -9
  7. package/dist/src/catalog.d.ts +21 -4
  8. package/dist/src/catalog.js +265 -133
  9. package/dist/src/cli.d.ts +2 -1
  10. package/dist/src/cli.js +73 -3
  11. package/dist/src/groups.js +8 -3
  12. package/dist/src/inspect.d.ts +3 -1
  13. package/dist/src/inspect.js +16 -6
  14. package/dist/src/instruction-reference.d.ts +6 -0
  15. package/dist/src/instruction-reference.js +21 -0
  16. package/dist/src/manage.d.ts +2 -0
  17. package/dist/src/manage.js +329 -0
  18. package/dist/src/migrate.d.ts +25 -0
  19. package/dist/src/migrate.js +171 -0
  20. package/dist/src/migration-backup.d.ts +22 -0
  21. package/dist/src/migration-backup.js +403 -0
  22. package/dist/src/migration-inventory.d.ts +9 -0
  23. package/dist/src/migration-inventory.js +237 -0
  24. package/dist/src/migration-resolution.d.ts +28 -0
  25. package/dist/src/migration-resolution.js +1618 -0
  26. package/dist/src/migration.d.ts +49 -0
  27. package/dist/src/migration.js +1004 -0
  28. package/dist/src/names.d.ts +11 -0
  29. package/dist/src/names.js +40 -0
  30. package/dist/src/native-placement.d.ts +16 -0
  31. package/dist/src/native-placement.js +557 -0
  32. package/dist/src/refresh.d.ts +20 -0
  33. package/dist/src/refresh.js +143 -0
  34. package/dist/src/resource-mutations.d.ts +45 -0
  35. package/dist/src/resource-mutations.js +225 -0
  36. package/dist/src/source-content.d.ts +4 -0
  37. package/dist/src/source-content.js +208 -0
  38. package/dist/src/storage-journal.d.ts +111 -0
  39. package/dist/src/storage-journal.js +613 -0
  40. package/dist/src/storage-root-lease.d.ts +7 -0
  41. package/dist/src/storage-root-lease.js +92 -0
  42. package/dist/src/storage-transaction.d.ts +100 -0
  43. package/dist/src/storage-transaction.js +3951 -0
  44. package/dist/src/terminal-editor.d.ts +8 -0
  45. package/dist/src/terminal-editor.js +391 -0
  46. package/dist/src/types.d.ts +18 -2
  47. package/dist/src/unicode-case-folding-data.d.ts +1 -0
  48. package/dist/src/unicode-case-folding-data.js +1596 -0
  49. package/dist/src/unicode-case-folding.d.ts +2 -0
  50. package/dist/src/unicode-case-folding.js +9 -0
  51. package/dist/src/wizard.d.ts +12 -3
  52. package/dist/src/wizard.js +287 -19
  53. package/package.json +5 -3
@@ -0,0 +1,49 @@
1
+ import type { ChangeApproval } from "./resource-mutations.ts";
2
+ export type MigrationStatus = "ready" | "blocked" | "already-v2";
3
+ export type MigrationSelection = "sources" | "items";
4
+ export interface MigrationViewItem {
5
+ readonly id: string;
6
+ readonly name: string;
7
+ readonly target: string;
8
+ readonly selection: MigrationSelection;
9
+ }
10
+ export interface MigrationMaskedDiff {
11
+ readonly path: string;
12
+ readonly summary: string;
13
+ }
14
+ export interface MigrationWarning {
15
+ readonly code: string;
16
+ readonly message: string;
17
+ readonly path?: string;
18
+ }
19
+ export interface MigrationView {
20
+ readonly reviewId: string;
21
+ readonly status: MigrationStatus;
22
+ readonly items: readonly MigrationViewItem[];
23
+ readonly conflicts: readonly string[];
24
+ readonly preservedPaths: readonly string[];
25
+ readonly maskedDiffs: readonly MigrationMaskedDiff[];
26
+ readonly sensitivePaths: readonly string[];
27
+ readonly warnings: readonly MigrationWarning[];
28
+ }
29
+ declare const preparedMigrationBrand: unique symbol;
30
+ export interface PreparedMigration {
31
+ readonly [preparedMigrationBrand]: true;
32
+ readonly reviewId: string;
33
+ }
34
+ /** Result shape shared by migration and post-switch resolution commits. */
35
+ export interface MigrationResult {
36
+ readonly catalogVersion: 2;
37
+ readonly backupDir: string | null;
38
+ readonly preservedPaths: readonly string[];
39
+ }
40
+ export type MigrationPreviewCheckpoint = "after-tree-scan";
41
+ /** @internal A deterministic seam for tests that change the filesystem while a preview is open. */
42
+ export declare function setMigrationPreviewCheckpointForTests(callback: ((point: MigrationPreviewCheckpoint, root: string) => void | Promise<void>) | undefined): void;
43
+ export declare function prepareMigration(libraryDir: string): Promise<PreparedMigration>;
44
+ export declare function readMigration(plan: PreparedMigration): MigrationView;
45
+ /** @internal Validates the storage adapter's request without exposing fixed migration buffers. */
46
+ export declare function assertPreparedMigrationRequest(plan: PreparedMigration, value: unknown): Promise<void>;
47
+ export declare function commitMigration(plan: PreparedMigration, approval: ChangeApproval): Promise<MigrationResult>;
48
+ export { prepareMigrationResolution, readMigrationResolution, commitMigrationResolution } from "./migration-resolution.ts";
49
+ export type { PreparedMigrationResolution, MigrationResolutionStatus, MigrationResolutionView } from "./migration-resolution.ts";