@hasna/machines 0.0.32 → 0.0.34

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 CHANGED
@@ -30,8 +30,8 @@ Endpoints on `127.0.0.1` only:
30
30
  ```bash
31
31
  machines manifest init
32
32
  machines manifest bootstrap
33
- machines manifest add --id spark01 --platform linux --workspace-path ~/workspace
34
- machines manifest add --id apple03 --platform macos --workspace-path ~/Workspace --app ghostty:cask
33
+ machines manifest add --id linux-dev-01 --platform linux --workspace-path ~/workspace
34
+ machines manifest add --id mac-lab-01 --platform macos --workspace-path ~/Workspace --app ghostty:cask
35
35
  machines manifest validate
36
36
  machines manifest list
37
37
  ```
@@ -39,11 +39,11 @@ machines manifest list
39
39
  ## Provision and reconcile
40
40
 
41
41
  ```bash
42
- machines setup --machine spark01 --json
43
- machines setup --machine spark01 --apply --yes
44
- machines sync --machine spark01 --json
45
- machines sync --machine spark01 --apply --yes
46
- machines doctor --machine spark01
42
+ machines setup --machine linux-dev-01 --json
43
+ machines setup --machine linux-dev-01 --apply --yes
44
+ machines sync --machine linux-dev-01 --json
45
+ machines sync --machine linux-dev-01 --apply --yes
46
+ machines doctor --machine linux-dev-01
47
47
  machines self-test
48
48
  ```
49
49
 
@@ -68,9 +68,9 @@ import {
68
68
  console.log(MACHINES_CONSUMER_CONTRACT.schema_version);
69
69
  const topology = discoverMachineTopology();
70
70
  const local = getLocalMachineTopology();
71
- const route = resolveMachineRoute("spark01");
71
+ const route = resolveMachineRoute("linux-dev-01");
72
72
  const workspace = resolveMachineWorkspace({
73
- machineId: "spark01",
73
+ machineId: "linux-dev-01",
74
74
  projectId: "open-knowledge",
75
75
  repoName: "open-knowledge",
76
76
  });
@@ -115,7 +115,7 @@ CLI and MCP expose the same topology view:
115
115
  ```bash
116
116
  machines topology --json
117
117
  machines topology --no-tailscale --json
118
- machines route --machine spark01 --json
118
+ machines route --machine linux-dev-01 --json
119
119
  ```
120
120
 
121
121
  ## Screen sharing
@@ -125,9 +125,9 @@ IP bookmarks. The route resolver picks the current LAN address or Tailscale name
125
125
  automatically, so it keeps working even when DHCP rotates a machine's IP.
126
126
 
127
127
  ```bash
128
- machines screen machine005 # open Screen Sharing.app → vnc://<user>@<live-route>
129
- machines screen machine005 --print # print the vnc:// URL instead of opening
130
- machines screen machine005 --json # full resolution detail (route, confidence, user)
128
+ machines screen demo-mac-01 # open Screen Sharing.app → vnc://<user>@<live-route>
129
+ machines screen demo-mac-01 --print # print the vnc:// URL instead of opening
130
+ machines screen demo-mac-01 --json # full resolution detail (route, confidence, user)
131
131
  machines screen --all # open every reachable machine
132
132
  machines screen --all --print # list resolved vnc:// URLs for the whole fleet
133
133
  machines screen-credentials --all --check-secret
@@ -138,18 +138,19 @@ Enable Remote Management / Screen Sharing on a fresh macOS machine over SSH
138
138
  Screen Sharing.app and Apple Remote Desktop):
139
139
 
140
140
  ```bash
141
- secrets set hasna/xyz/opensource/machines/prod/screen-machine005-vnc-password "$VNC_PASSWORD" --type password
142
- machines screen-enable --machine machine005 --user jo \
143
- --vnc-password-secret hasna/xyz/opensource/machines/prod/screen-machine005-vnc-password
144
- machines screen-enable --machine machine005 --user jo --print # show the SSH command, don't run it
141
+ secrets set machines/screen-sharing/screen-demo-mac-01-vnc-password "$VNC_PASSWORD" --type password
142
+ machines screen-enable --machine demo-mac-01 --user operator \
143
+ --vnc-password-secret machines/screen-sharing/screen-demo-mac-01-vnc-password
144
+ machines screen-enable --machine demo-mac-01 --user operator --print # show the SSH command, don't run it
145
145
  ```
146
146
 
147
147
  The legacy VNC protocol honors only the first 8 password characters. The
148
148
  password is read through the `secrets` CLI and piped over SSH stdin; it is not
149
149
  embedded in generated command text. If `--vnc-password-secret` is omitted,
150
150
  machines defaults to
151
- `hasna/xyz/opensource/machines/prod/screen-<machine>-vnc-password`. The user
152
- comes from the manifest (`metadata.user`) when present, or `--user`.
151
+ `machines/screen-sharing/screen-<machine>-vnc-password`, or the namespace set in
152
+ `HASNA_MACHINES_SCREEN_SECRET_NAMESPACE`. The user comes from the manifest
153
+ (`metadata.user`) when present, or `--user`.
153
154
  `screen-credentials` verifies the resolved user and secret key for a machine or
154
155
  the full fleet without printing secret values.
155
156
 
@@ -160,7 +161,7 @@ without importing the full machines app:
160
161
  import { resolveMachineWorkspace } from "@hasna/machines/consumer";
161
162
 
162
163
  const workspace = resolveMachineWorkspace({
163
- machineId: "spark01",
164
+ machineId: "linux-dev-01",
164
165
  projectId: "open-knowledge",
165
166
  repoName: "open-knowledge",
166
167
  });
@@ -175,8 +176,8 @@ diagnostics. It uses explicit manifest metadata first and deterministic
175
176
  workspace inference second; consumers can still pass manual overrides.
176
177
 
177
178
  ```bash
178
- machines workspace resolve --machine spark01 --project open-knowledge --repo open-knowledge --json
179
- machines workspace doctor --machine spark01 --project open-knowledge --repo open-knowledge --json
179
+ machines workspace resolve --machine linux-dev-01 --project open-knowledge --repo open-knowledge --json
180
+ machines workspace doctor --machine linux-dev-01 --project open-knowledge --repo open-knowledge --json
180
181
  ```
181
182
 
182
183
  `workspace resolve` and `workspace doctor` include JSON-friendly
@@ -191,8 +192,8 @@ repair the manifest metadata explicitly. The command previews changes by
191
192
  default and only writes when `--apply` is passed:
192
193
 
193
194
  ```bash
194
- machines workspace repair --machine spark01 --project open-knowledge --repo open-knowledge --json
195
- machines workspace repair --machine spark01 --project open-knowledge --repo open-knowledge --apply --json
195
+ machines workspace repair --machine linux-dev-01 --project open-knowledge --repo open-knowledge --json
196
+ machines workspace repair --machine linux-dev-01 --project open-knowledge --repo open-knowledge --apply --json
196
197
  ```
197
198
 
198
199
  ## Compatibility SDK
@@ -204,13 +205,13 @@ attempting app-level sync:
204
205
  import { checkMachineCompatibility } from "@hasna/machines/consumer";
205
206
 
206
207
  const report = checkMachineCompatibility({
207
- machineId: "spark01",
208
+ machineId: "linux-dev-01",
208
209
  commands: [{ command: "bun" }],
209
- packages: [{ name: "@hasna/knowledge", command: "knowledge", expectedVersion: "0.2.29" }],
210
+ packages: [{ name: "@example/knowledge", command: "knowledge", expectedVersion: "0.2.29" }],
210
211
  workspaces: [{
211
212
  label: "open-knowledge",
212
- path: "/home/hasna/workspace/hasna/opensource/open-knowledge",
213
- expectedPackageName: "@hasna/knowledge",
213
+ path: "/srv/workspaces/open-knowledge",
214
+ expectedPackageName: "@example/knowledge",
214
215
  expectedVersion: "0.2.29",
215
216
  }],
216
217
  });
@@ -224,16 +225,16 @@ back to its own local checks if `@hasna/machines` is not installed.
224
225
  CLI and MCP expose the same shape:
225
226
 
226
227
  ```bash
227
- machines compatibility --machine spark01 \
228
+ machines compatibility --machine linux-dev-01 \
228
229
  --command bun \
229
- --package @hasna/knowledge:knowledge:0.2.29 \
230
- --workspace open-knowledge=/home/hasna/workspace/hasna/opensource/open-knowledge:@hasna/knowledge:0.2.29 \
230
+ --package @example/knowledge:knowledge:0.2.29 \
231
+ --workspace open-knowledge=/srv/workspaces/open-knowledge:@example/knowledge:0.2.29 \
231
232
  --json
232
233
  ```
233
234
 
234
235
  ## Storage
235
236
 
236
- Machines stores runtime data locally in SQLite under the Hasna data directory and includes repo-owned PostgreSQL migrations for remote storage deployments.
237
+ Machines stores runtime data locally in SQLite under its data directory and includes repo-owned PostgreSQL migrations for remote storage deployments.
237
238
 
238
239
  ```bash
239
240
  machines storage status --json
@@ -252,30 +253,30 @@ target can be explicit or environment-backed:
252
253
 
253
254
  ```bash
254
255
  machines backup --bucket fleet-backups --prefix machines --json
255
- HASNA_MACHINES_S3_BUCKET=hasna-xyz-opensource-machines-prod machines backup --json
256
+ MACHINES_S3_BUCKET=fleet-backups machines backup --json
256
257
  ```
257
258
 
258
259
  `--bucket` and `--prefix` always win. Without `--bucket`, the backup command
259
260
  uses `HASNA_MACHINES_S3_BUCKET` or fallback `MACHINES_S3_BUCKET`; prefix uses
260
261
  `HASNA_MACHINES_S3_PREFIX`, fallback `MACHINES_S3_PREFIX`, or `machines`.
261
262
  This keeps the open-source CLI local/self-hosted by default while allowing
262
- Hasna deployments to route app-owned backups through canonical storage metadata.
263
+ deployments to route app-owned backups through explicit storage metadata.
263
264
 
264
265
  ## Applications and tooling
265
266
 
266
267
  ```bash
267
- machines apps list --machine apple03
268
- machines apps status --machine apple03
269
- machines apps diff --machine apple03
270
- machines apps plan --machine apple03 --json
271
- machines apps apply --machine apple03 --yes
272
-
273
- machines install-claude status --machine spark01
274
- machines install-claude diff --machine spark01
275
- machines install-claude plan --machine spark01 --tool claude codex --json
276
- machines install-claude apply --machine spark01 --tool claude codex --yes
277
-
278
- machines install-tailscale --machine apple03 --json
268
+ machines apps list --machine mac-lab-01
269
+ machines apps status --machine mac-lab-01
270
+ machines apps diff --machine mac-lab-01
271
+ machines apps plan --machine mac-lab-01 --json
272
+ machines apps apply --machine mac-lab-01 --yes
273
+
274
+ machines install-claude status --machine linux-dev-01
275
+ machines install-claude diff --machine linux-dev-01
276
+ machines install-claude plan --machine linux-dev-01 --tool claude codex --json
277
+ machines install-claude apply --machine linux-dev-01 --tool claude codex --yes
278
+
279
+ machines install-tailscale --machine mac-lab-01 --json
279
280
  ```
280
281
 
281
282
  ## Notifications
@@ -295,7 +296,7 @@ machines notifications dispatch --event manual.test --message "hello fleet"
295
296
  ## Runtime Events
296
297
 
297
298
  `machines runtime tmux-watch` probes tmux with `display-message` and emits shared
298
- Hasna events without sending keys, killing panes, or changing tmux state.
299
+ events without sending keys, killing panes, or changing tmux state.
299
300
 
300
301
  ```bash
301
302
  machines runtime tmux-watch %11 --once --json