@andrestobelem/clone 0.1.3 → 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 (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -23
  3. package/app.js +645 -0
  4. package/bin/clone.js +11 -230
  5. package/dist/actors.js +49 -0
  6. package/dist/actors.js.map +1 -0
  7. package/dist/automations.js +57 -0
  8. package/dist/automations.js.map +1 -0
  9. package/dist/cli.js +565 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/database.js +62 -0
  12. package/dist/database.js.map +1 -0
  13. package/dist/errors.js +46 -0
  14. package/dist/errors.js.map +1 -0
  15. package/dist/issues.js +264 -0
  16. package/dist/issues.js.map +1 -0
  17. package/dist/paths.js +42 -0
  18. package/dist/paths.js.map +1 -0
  19. package/dist/projects.js +134 -0
  20. package/dist/projects.js.map +1 -0
  21. package/dist/recurring.js +45 -0
  22. package/dist/recurring.js.map +1 -0
  23. package/dist/schema.js +52 -0
  24. package/dist/schema.js.map +1 -0
  25. package/dist/seed.js +498 -0
  26. package/dist/seed.js.map +1 -0
  27. package/dist/server.js +232 -0
  28. package/dist/server.js.map +1 -0
  29. package/dist/sync.js +625 -0
  30. package/dist/sync.js.map +1 -0
  31. package/dist/teams.js +77 -0
  32. package/dist/teams.js.map +1 -0
  33. package/dist/time.js +4 -0
  34. package/dist/time.js.map +1 -0
  35. package/dist/types.js +2 -0
  36. package/dist/types.js.map +1 -0
  37. package/dist/validation.js +254 -0
  38. package/dist/validation.js.map +1 -0
  39. package/dist/workspace-helpers.js +75 -0
  40. package/dist/workspace-helpers.js.map +1 -0
  41. package/dist/workspace-mutations.js +160 -0
  42. package/dist/workspace-mutations.js.map +1 -0
  43. package/dist/workspace-reads.js +62 -0
  44. package/dist/workspace-reads.js.map +1 -0
  45. package/dist/workspace.js +8 -0
  46. package/dist/workspace.js.map +1 -0
  47. package/index.html +73 -0
  48. package/package.json +33 -4
  49. package/styles.css +108 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrés Tobelem
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,28 +1,26 @@
1
1
  # Clone
2
2
 
3
- Run a local issue and project workspace without installing Python.
3
+ A local application for issues, projects, and team planning, inspired by Linear. The browser UI, CLI, and scheduler use the same TypeScript actions and SQLite database. People and external agents have actor identities.
4
4
 
5
5
  Website: <https://clone.andrestobelem.dev>
6
6
 
7
+ ## Run with npx
8
+
9
+ Node.js 24.15 or later is the only requirement.
10
+
7
11
  ```sh
8
12
  npx @andrestobelem/clone
9
13
  ```
10
14
 
11
- Clone stores its database, attachments, snapshots, and backups in the operating system's user data directory. The server listens on `127.0.0.1` and opens `http://127.0.0.1:4173`.
15
+ The command downloads the npm package, creates an empty workspace on the first run, starts Clone on `127.0.0.1`, and opens the browser. Stop it with Ctrl+C. Later runs use the same records from the operating system's user data directory.
12
16
 
13
- ## Commands
17
+ Use another port or keep the browser closed when needed:
14
18
 
15
19
  ```sh
16
- npx @andrestobelem/clone start --port 5000
17
- npx @andrestobelem/clone --local
18
- npx @andrestobelem/clone --data-dir ./project-data
19
- npx @andrestobelem/clone teams list --json
20
- npx @andrestobelem/clone --help
20
+ npx @andrestobelem/clone start --port 5000 --no-open
21
21
  ```
22
22
 
23
- Use `--no-open` with `start` to keep the browser closed. Set `CLONE_DATA_DIR` to select another data directory.
24
-
25
- ## Use one workspace per repository
23
+ ### Use one workspace per repository
26
24
 
27
25
  Open a terminal in the repository that the workspace belongs to. Then run:
28
26
 
@@ -38,26 +36,156 @@ Add the directory to that repository's `.gitignore` unless you have a specific b
38
36
  .clone/
39
37
  ```
40
38
 
41
- Always run the command from the same repository to reopen that workspace. `--local` does not copy or move records from the operating system's user data directory. `--data-dir PATH` selects an explicit directory.
39
+ Always run the command from the same repository to reopen that workspace. `--local` does not copy or move records from the operating system's user data directory. Use `--data-dir PATH` when the data must be in another location.
40
+
41
+ The npm package is scoped because the unscoped `clone` name belongs to another package. The installed executable is still named `clone`.
42
42
 
43
- ## Agent skill
43
+ ### Install the agent skill
44
44
 
45
- Install the shared Clone skill for Codex and Claude Code:
45
+ Open the repository where the agents will use Clone. Install the shared `clone-workspace` skill for Codex and Claude Code:
46
46
 
47
47
  ```sh
48
48
  npx skills add andrestobelem/clone --skill clone-workspace --agent codex claude-code -y
49
49
  ```
50
50
 
51
- The skill gives each agent a stable actor identity and a verified workflow for reads, writes, and synchronization recovery.
51
+ The installer creates `.agents/skills/clone-workspace` for Codex, `.claude/skills/clone-workspace` for Claude Code, and `skills-lock.json` for updates. Both agents use the same skill source.
52
+
53
+ Start Clone with global storage or repository-local storage:
54
+
55
+ ```sh
56
+ npx @andrestobelem/clone
57
+ npx @andrestobelem/clone --local
58
+ ```
59
+
60
+ Then ask the agent to use Clone:
61
+
62
+ ```text
63
+ Use Clone to create an issue for the login error.
64
+ ```
65
+
66
+ The skill selects the correct storage, registers `codex` or `claude` as a stable actor, reads related records before a write, verifies the result, and recovers synchronization errors. Invoke it explicitly as `$clone-workspace` when needed. Update installed skills with `npx skills update clone-workspace`.
67
+
68
+ The canonical skill source is [`.agents/skills/clone-workspace`](.agents/skills/clone-workspace/SKILL.md). Claude Code uses the same source through `.claude/skills/clone-workspace`.
69
+
70
+ ### Data locations
71
+
72
+ Clone stores global workspace records outside the package and outside the current directory:
73
+
74
+ | System | Workspace data |
75
+ | --- | --- |
76
+ | macOS | `~/Library/Application Support/Clone/` |
77
+ | Linux | `$XDG_DATA_HOME/clone/` or `~/.local/share/clone/` |
78
+ | Windows | `%APPDATA%\Clone\` |
79
+
80
+ The workspace data directory contains `workspace.sqlite3`, snapshots, attachments, and backups. Use `--data-dir PATH` to select another directory.
81
+
82
+ ## Run from the repository
83
+
84
+ - Node.js 24.15 or later.
85
+ - A current browser with JavaScript enabled.
86
+
87
+ Install the pinned dependencies with `npm ci`. Keep the server on the default loopback address. The application has no authentication.
88
+
89
+ For personal use with no demo records, open a terminal in this directory and run:
90
+
91
+ ```sh
92
+ npm start
93
+ ```
94
+
95
+ The command builds the TypeScript source and creates an empty workspace on the first
96
+ run. Open [http://127.0.0.1:4173](http://127.0.0.1:4173), then create a team.
97
+ Run the same command for each later session. Stop with Ctrl+C.
98
+ Your database, snapshots, attachments, and backups stay in `data/clone/`.
99
+ Keep this directory to keep your records.
100
+ The recurring issue scheduler runs while the server is running.
101
+
102
+ Build the npm package from a clean commit:
103
+
104
+ ```sh
105
+ npm pack
106
+ ```
107
+
108
+ The command writes `andrestobelem-clone-VERSION.tgz`. The package contains no workspace records.
109
+
110
+ ## Publish a release
111
+
112
+ A `vVERSION` tag runs the release workflow. It checks and packs the application, then adds the npm tarball and its SHA-256 checksum to a GitHub release. The tag and root `package.json` version must match.
113
+
114
+ Published versions are available on [npm](https://www.npmjs.com/package/@andrestobelem/clone) and in [GitHub Releases](https://github.com/andrestobelem/clone/releases).
52
115
 
53
- ## Data locations
116
+ For a new release, update the version in `package.json`, commit the change, and push the matching `vVERSION` tag. The workflow publishes npm only when trusted publishing is configured and the `NPM_PUBLISH_ENABLED` repository variable is `true`.
117
+
118
+ Until trusted publishing is enabled, publish npm after the GitHub release succeeds:
119
+
120
+ ```sh
121
+ npm publish --access public --provenance=false
122
+ ```
54
123
 
55
- | System | Workspace data | Downloaded executable cache |
56
- | --- | --- | --- |
57
- | macOS | `~/Library/Application Support/Clone/` | `~/Library/Caches/Clone/` |
58
- | Linux | `$XDG_DATA_HOME/clone/` or `~/.local/share/clone/` | `$XDG_CACHE_HOME/clone/` or `~/.cache/clone/` |
59
- | Windows | `%APPDATA%\Clone\` | `%LOCALAPPDATA%\Clone\cache\` |
124
+ Do not set `NPM_PUBLISH_ENABLED` before npm trusted publishing is configured for repository `andrestobelem/clone` and workflow `release.yml`. The workflow skips npm without blocking the GitHub release while the variable is absent.
60
125
 
61
- The workspace data directory contains `workspace.sqlite3`, snapshots, attachments, and backups. Set `CLONE_CACHE_DIR` to select another executable cache.
126
+ Test a package without publishing it:
127
+
128
+ ```sh
129
+ npm pack --dry-run
130
+ ```
131
+
132
+ ## Create a separate workspace
133
+
134
+ Use another database path to keep test or demo records separate from your workspace:
135
+
136
+ ```sh
137
+ node bin/clone.js --db /tmp/clone-demo/workspace.sqlite3 init --demo
138
+ node bin/clone.js --db /tmp/clone-demo/workspace.sqlite3 serve
139
+ ```
140
+
141
+ Choose an unused directory. Omit `--demo` to create an empty workspace. Create a team in the UI or CLI before you add issues. `init` rejects existing storage. The default `start` command creates empty storage when needed.
142
+
143
+ ## Included behavior
144
+
145
+ - Issues: workflow statuses, priorities, actor assignment, labels, comments, activity, attachments, relations, sub-issues, and archive/restore.
146
+ - Projects: linked teams, actor participation, milestones, dependencies, progress, updates, and archive/restore.
147
+ - Planning: cycles, triage, saved views, search, list and board layouts, filters, grouping, and sorting.
148
+ - Workspace: team management, read-only human rosters, Inbox actions, local preferences, issue JSON import, and UI JSON export.
149
+ - Automation: local recurring issues and rules for issue creation, update, and completion.
150
+ - Storage: SQLite plus complete Git snapshots, conflict checks, backups, migration, and interrupted-operation recovery.
151
+
152
+ The application has one local workspace. It does not provide hosted collaboration, sign-in, enforced roles, external notifications, GitHub/Slack connections, document authoring, reviews, member invitations, or agent chat. Actor IDs record who performed an action; they do not authenticate the caller. See [the product specification](SPEC.md) for behavior and limits.
153
+
154
+ ## CLI and agent access
155
+
156
+ ```sh
157
+ npx @andrestobelem/clone --help
158
+ npx @andrestobelem/clone describe
159
+ npx @andrestobelem/clone teams list --json
160
+ npx @andrestobelem/clone agents list --all --json
161
+ ```
162
+
163
+ Register each external agent once with a stable key. Use its returned actor ID on writes. Follow the [Agent CLI guide](docs/AGENTS.md) for registration and recovery. See the [CLI reference](docs/CLI.md) for commands, payloads, and the Git workflow.
164
+
165
+ SQLite, attachment storage, recovery files, and backups remain local. The selected snapshot directory stores complete records and attachment bytes for Git. Review snapshot contents before committing them. UI JSON export contains application data but is not a complete backup.
166
+
167
+ ## Verify changes
168
+
169
+ ```sh
170
+ npm run check
171
+ ```
62
172
 
63
- Clone supports macOS on ARM64 and x64, Linux on ARM64 and x64, and Windows on x64.
173
+ Tests use temporary storage. They cover CLI/HTTP parity, validation, actors, concurrency, snapshots, migration, and recovery. See the [development guide](docs/DEVELOPMENT.md) for browser checks and documentation checks.
174
+
175
+ ## Documentation
176
+
177
+ - [Constitution](CONSTITUTION.md): binding product and engineering principles.
178
+ - [Mission](MISSION.md): the current purpose of Clone.
179
+ - [Vision](VISION.md): the future that Clone works toward.
180
+ - [Values](VALUES.md): standards for product and engineering choices.
181
+ - [Product specification](SPEC.md): current behavior and product limits.
182
+ - [Domain glossary](GLOSSARY.md): preferred product terms.
183
+ - [Architecture](docs/ARCHITECTURE.md): components, data flow, and storage.
184
+ - [HTTP API](docs/API.md): routes, payloads, validation, and errors.
185
+ - [CLI reference](docs/CLI.md): commands and synchronization.
186
+ - [Agent CLI guide](docs/AGENTS.md): identities and agent operations.
187
+ - [Development guide](docs/DEVELOPMENT.md): safe setup and verification.
188
+ - [Reference audit](docs/REFERENCE-AUDIT.md): source and limits of the original UI audit.
189
+ - [Mission, vision, and values research](docs/research/mission-vision-values.md): history, evidence, and application to Clone.
190
+
191
+ The repository uses the [MIT license](LICENSE).