@alsdd/t3-import 0.0.0-stage → 0.1.2-alsd.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 (108) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/LICENSE +21 -0
  3. package/README.md +149 -2
  4. package/assets/fork-demo.gif +0 -0
  5. package/assets/fork-demo.png +0 -0
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.js +506 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/core/checkpoint.d.ts +25 -0
  10. package/dist/core/checkpoint.js +82 -0
  11. package/dist/core/checkpoint.js.map +1 -0
  12. package/dist/core/errors.d.ts +12 -0
  13. package/dist/core/errors.js +17 -0
  14. package/dist/core/errors.js.map +1 -0
  15. package/dist/core/jsonl.d.ts +9 -0
  16. package/dist/core/jsonl.js +72 -0
  17. package/dist/core/jsonl.js.map +1 -0
  18. package/dist/core/providers.d.ts +6 -0
  19. package/dist/core/providers.js +17 -0
  20. package/dist/core/providers.js.map +1 -0
  21. package/dist/core/types.d.ts +247 -0
  22. package/dist/core/types.js +4 -0
  23. package/dist/core/types.js.map +1 -0
  24. package/dist/core/util.d.ts +14 -0
  25. package/dist/core/util.js +61 -0
  26. package/dist/core/util.js.map +1 -0
  27. package/dist/sources/claude.d.ts +6 -0
  28. package/dist/sources/claude.js +576 -0
  29. package/dist/sources/claude.js.map +1 -0
  30. package/dist/sources/codex.d.ts +11 -0
  31. package/dist/sources/codex.js +599 -0
  32. package/dist/sources/codex.js.map +1 -0
  33. package/dist/sources/codexAppServer.d.ts +24 -0
  34. package/dist/sources/codexAppServer.js +190 -0
  35. package/dist/sources/codexAppServer.js.map +1 -0
  36. package/dist/sources/files.d.ts +1 -0
  37. package/dist/sources/files.js +25 -0
  38. package/dist/sources/files.js.map +1 -0
  39. package/dist/sources/index.d.ts +3 -0
  40. package/dist/sources/index.js +15 -0
  41. package/dist/sources/index.js.map +1 -0
  42. package/dist/sources/opencode.d.ts +6 -0
  43. package/dist/sources/opencode.js +443 -0
  44. package/dist/sources/opencode.js.map +1 -0
  45. package/dist/target/cache.d.ts +14 -0
  46. package/dist/target/cache.js +155 -0
  47. package/dist/target/cache.js.map +1 -0
  48. package/dist/target/config.d.ts +22 -0
  49. package/dist/target/config.js +90 -0
  50. package/dist/target/config.js.map +1 -0
  51. package/dist/target/destination.d.ts +21 -0
  52. package/dist/target/destination.js +77 -0
  53. package/dist/target/destination.js.map +1 -0
  54. package/dist/target/importer.d.ts +86 -0
  55. package/dist/target/importer.js +597 -0
  56. package/dist/target/importer.js.map +1 -0
  57. package/dist/target/launch.d.ts +6 -0
  58. package/dist/target/launch.js +77 -0
  59. package/dist/target/launch.js.map +1 -0
  60. package/dist/target/ledger.d.ts +35 -0
  61. package/dist/target/ledger.js +174 -0
  62. package/dist/target/ledger.js.map +1 -0
  63. package/dist/target/reconciliation.d.ts +60 -0
  64. package/dist/target/reconciliation.js +259 -0
  65. package/dist/target/reconciliation.js.map +1 -0
  66. package/dist/target/replace.d.ts +9 -0
  67. package/dist/target/replace.js +341 -0
  68. package/dist/target/replace.js.map +1 -0
  69. package/dist/target/runtimeActivity.d.ts +10 -0
  70. package/dist/target/runtimeActivity.js +197 -0
  71. package/dist/target/runtimeActivity.js.map +1 -0
  72. package/dist/target/runtimeControl.d.ts +32 -0
  73. package/dist/target/runtimeControl.js +195 -0
  74. package/dist/target/runtimeControl.js.map +1 -0
  75. package/dist/target/schema.d.ts +23 -0
  76. package/dist/target/schema.js +123 -0
  77. package/dist/target/schema.js.map +1 -0
  78. package/dist/target/sync.d.ts +34 -0
  79. package/dist/target/sync.js +879 -0
  80. package/dist/target/sync.js.map +1 -0
  81. package/dist/target/syncAll.d.ts +4 -0
  82. package/dist/target/syncAll.js +98 -0
  83. package/dist/target/syncAll.js.map +1 -0
  84. package/dist/target/v2.d.ts +18 -0
  85. package/dist/target/v2.js +267 -0
  86. package/dist/target/v2.js.map +1 -0
  87. package/dist/target/v2Profiles.d.ts +5 -0
  88. package/dist/target/v2Profiles.js +14 -0
  89. package/dist/target/v2Profiles.js.map +1 -0
  90. package/dist/tui.d.ts +52 -0
  91. package/dist/tui.js +590 -0
  92. package/dist/tui.js.map +1 -0
  93. package/package.json +95 -4
  94. package/vendor/t3-v010/LICENSE +21 -0
  95. package/vendor/t3-v010/THIRD-PARTY-NOTICES.txt +2274 -0
  96. package/vendor/t3-v010/reference.json +6 -0
  97. package/vendor/t3-v010/runtime.mjs +60364 -0
  98. package/vendor/t3-v010/schema-columns.json +568 -0
  99. package/vendor/t3-v011/LICENSE +21 -0
  100. package/vendor/t3-v011/THIRD-PARTY-NOTICES.txt +2274 -0
  101. package/vendor/t3-v011/reference.json +6 -0
  102. package/vendor/t3-v011/runtime.mjs +60993 -0
  103. package/vendor/t3-v011/schema-columns.json +526 -0
  104. package/vendor/t3-v012/LICENSE +21 -0
  105. package/vendor/t3-v012/THIRD-PARTY-NOTICES.txt +2274 -0
  106. package/vendor/t3-v012/reference.json +6 -0
  107. package/vendor/t3-v012/runtime.mjs +61395 -0
  108. package/vendor/t3-v012/schema-columns.json +526 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ ## 0.1.2-alsd.1
4
+
5
+ - Read Codex `.jsonl.zst` rollouts directly, preserving content fingerprints and
6
+ preferring the matching plain rollout when both coexist.
7
+ - Validate T3 0.1.2 with the pinned official persistence runtime. It shares
8
+ migration 67 and identical schema DDL with 0.1.1; both releases remain covered.
9
+ - Align the npm engine constraint with the documented Node.js 22.21.1+/24+ support.
10
+ - Report persisted T3 activity and verified Linux systemd service ownership with
11
+ `runtime status`, including pending runs, approvals, background work and schedules.
12
+ - Offer explicit idle-service maintenance through the TUI or `--manage-runtime`.
13
+ Restore the same service after success, cancellation or error; refuse busy,
14
+ unknown or ambiguously managed instances.
15
+
16
+ ## 0.1.1-alsd.1
17
+
18
+ First release from the maintained `alsd4git/t3-import` fork. Package name:
19
+ `@alsdd/t3-import`; executable: `t3-import`. Version numbers follow the latest
20
+ supported T3 release plus an independent
21
+ fork revision. GitHub releases provide a tarball; npm publication uses the
22
+ default `latest` channel.
23
+
24
+ - Support T3 V1 migrations 40–54 and pinned T3 0.1.0/0.1.1 V2 migrations 62/67.
25
+ - Import and sync OpenCode 2.x sessions into T3, preserving native session identity,
26
+ working directory, model and variant.
27
+ - Safely adopt linked Codex/OpenCode conversations and sync across working folders.
28
+ - Select compatible destination projects in the CLI and TUI, including eligible
29
+ managed scratch folders.
30
+ - Explain sync states, conflicts, ignored active turns and source inspection errors.
31
+ - Report current bindings, historical V1 identities and verified V2 context handoffs.
32
+ - Validate packed installs, synthetic import/sync and idempotency across Windows,
33
+ macOS and Ubuntu on Node 22/24.
34
+ - Provide fork documentation and reproducible synthetic TUI captures.
35
+
36
+ Provider history flows into T3 only. Unknown database schemas fail closed. Existing
37
+ upstream PR branches remain unchanged; this release does not merge or rewrite them.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 t3-import contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,150 @@
1
- # Temporary Holding Version
1
+ # t3-import
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![CI](https://github.com/alsd4git/t3-import/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/alsd4git/t3-import/actions/workflows/ci.yml)
4
+ [![Release](https://img.shields.io/github/v/release/alsd4git/t3-import?include_prereleases)](https://github.com/alsd4git/t3-import/releases)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+
7
+ Import and sync local **Codex, Claude Code, and OpenCode** conversations into
8
+ [T3 Code](https://github.com/pingdotgg/t3code), with native session bindings for
9
+ continuation, interactive previews, and verified backups.
10
+
11
+ Maintained fork by [alsd4git](https://github.com/alsd4git), based on
12
+ [CarlosGtrz/t3-import](https://github.com/CarlosGtrz/t3-import). This repository's
13
+ `main` is the development and release base. Existing upstream pull requests stay
14
+ open on their original branches. This is an independent tool, unaffiliated with
15
+ T3 Code or its providers.
16
+
17
+ ## Compatibility
18
+
19
+ | T3 database | Supported migrations | Sources |
20
+ | --- | --- | --- |
21
+ | V1 | 40–54 | Codex, Claude Code |
22
+ | T3 0.1.0 / Orchestrator V2 | 62 | Codex, Claude Code, OpenCode |
23
+ | T3 0.1.1–0.1.2 / Orchestrator V2 | 67 | Codex, Claude Code, OpenCode |
24
+
25
+ Use **Node.js 22.21.1+ or 24+**. Unknown schemas, including intermediate V2
26
+ migrations, are refused. T3 owns database upgrades; the importer never migrates
27
+ your installation. OpenCode requires its 2.x SQLite session format.
28
+
29
+ Codex discovery and import read both `.jsonl` and Zstandard `.jsonl.zst`
30
+ rollouts directly. If both forms coexist, the plain rollout takes precedence.
31
+
32
+ History sync goes **from the provider into T3**. It is an explicit operation,
33
+ without a background watcher or reverse transcript writer. Continuing a bound
34
+ session from T3 uses the provider's native session. Titles remain separate from
35
+ transcript sync. See [compatibility and validation](docs/compatibility.md).
36
+
37
+ For a Linux T3 Connect server, `t3-import runtime status` reports persisted
38
+ activity and the owning service. The interactive importer offers to pause a
39
+ verified idle systemd service and restore it on exit. Scripts can opt in with
40
+ `--manage-runtime`. See [runtime maintenance](docs/runtime-maintenance.md).
41
+
42
+ ## Install
43
+
44
+ The fork package is named `@alsdd/t3-import`; the command remains `t3-import`.
45
+ Install the scoped npm package, or use the pinned GitHub release tarball below.
46
+ The upstream `@carlosgtrz/t3-import` package does not contain this fork's features.
47
+
48
+ ```sh
49
+ npm i -g @alsdd/t3-import --allow-scripts=better-sqlite3
50
+ t3-import --version
51
+ ```
52
+
53
+ For a pinned GitHub release without the npm registry:
54
+
55
+ ```sh
56
+ npm i -g --allow-scripts=better-sqlite3 https://github.com/alsd4git/t3-import/releases/download/v0.1.2-alsd.1/alsdd-t3-import-0.1.2-alsd.1.tgz
57
+ ```
58
+
59
+ Versions follow `<T3 version>-alsd.<revision>`. `0.1.2-alsd.1` targets T3 0.1.2
60
+ and retains the earlier compatibility shown above. npm installs the default
61
+ `latest` channel; no `@next` suffix is required.
62
+
63
+ The script approval allows the native SQLite dependency to install with recent
64
+ npm versions. Older npm versions may report the option as unknown; their normal
65
+ install-script behavior still applies.
66
+
67
+ To build from source:
68
+
69
+ ```sh
70
+ git clone https://github.com/alsd4git/t3-import.git
71
+ cd t3-import
72
+ npm ci
73
+ npm run build
74
+ node dist/cli.js
75
+ ```
76
+
77
+ ## Import and sync
78
+
79
+ Close T3 before importing, syncing, or replacing history. Every write creates a
80
+ verified database backup. Keep that backup and back up the external import ledger
81
+ separately when needed. See [storage and recovery](docs/usage.md#safety-and-storage).
82
+
83
+ Running `t3-import` opens the interactive flow. Choose a source and working folder,
84
+ review each conversation's status, select imports or safe updates, and confirm.
85
+ New imports offer compatible destination projects while preserving the source cwd.
86
+ Native "No project" is available only for eligible T3 scratch folders.
87
+
88
+ ![Synthetic OpenCode conversation selection in the fork's actual TUI](assets/fork-demo.png)
89
+
90
+ ```sh
91
+ t3-import # interactive import and sync
92
+ t3-import import --source opencode # start with OpenCode
93
+ t3-import sync --source codex # focused interactive sync
94
+ t3-import sync --source codex --all --dry-run --yes --summary
95
+ t3-import sync --source codex --all --yes --summary
96
+ t3-import links --json # read-only identity report
97
+ ```
98
+
99
+ `links` distinguishes current bindings, retained V1 identities and verified V2
100
+ context handoffs. It does not compare transcripts, rename threads, or establish
101
+ identity from similar titles. It can run while T3 is open, with provisional results.
102
+
103
+ The TUI explains pending additions, active turns, conflicts and unavailable
104
+ sources. Safe sync appends settled history only after verifying the existing
105
+ transcript prefix. Divergent or ambiguous histories need review. Exit code `7`
106
+ reports skipped reconciliation cases, even when other updates in the batch succeed.
107
+
108
+ ### Demo
109
+
110
+ ![Synthetic OpenCode import preview through source, selection, destination and review](assets/fork-demo.gif)
111
+
112
+ These captures use the actual TUI with synthetic conversations and an isolated
113
+ target. They stop at review before writing history.
114
+ [Reproduce the demo](docs/demo.md).
115
+
116
+ ## Documentation
117
+
118
+ - [Commands, destinations, safety and storage](docs/usage.md)
119
+ - [Compatibility, pinned runtimes and vendoring](docs/compatibility.md)
120
+ - [OpenCode and T3 0.1.1 validation](docs/v011-opencode-validation.md)
121
+ - [Native continuation test and its limits](docs/continuation-validation-2026-10-22.md)
122
+ - [Packed install and CI checks](docs/package-validation.md)
123
+ - [Fork history and release process](docs/fork-maintenance.md)
124
+ - [Changelog](CHANGELOG.md)
125
+
126
+ Optional title normalization can consume `links` evidence. The personal
127
+ [`codex-thread-normalizer` skill](https://github.com/alsd4git/my-skills/tree/main/skills/codex-thread-normalizer)
128
+ is maintained separately and is not required to use the importer.
129
+
130
+ ## Development
131
+
132
+ ```sh
133
+ npm ci
134
+ npm run typecheck
135
+ npm test
136
+ npm run build
137
+ npm run package:check
138
+ ```
139
+
140
+ CI checks Node 22/24 on Windows, macOS and Ubuntu. The package check installs a
141
+ tarball with independent dependencies, imports a synthetic conversation, appends
142
+ a turn, and verifies that repeated sync is a no-op. Additional pinned-runtime
143
+ checks and regeneration commands are described in the
144
+ [compatibility guide](docs/compatibility.md).
145
+
146
+ ## Credits and license
147
+
148
+ Originally created by CarlosGtrz; fork maintenance and extensions by Alessandro
149
+ Digilio and contributors. Licensed under [MIT](LICENSE). Bundled T3 runtimes retain
150
+ their licenses, source references and third-party notices under `vendor/`.
Binary file
Binary file
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};