@halcyonlabs/app 0.47.0-halcyon.483 → 0.47.0-halcyon.484

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/dist/index.d.ts CHANGED
@@ -191,10 +191,10 @@ declare const uiPreferenceDefinitions: {
191
191
  }>>;
192
192
  readonly "sidebar.threadGrouping.environment": UiPreferenceDefinition<z$1.ZodUnion<readonly [z$1.ZodLiteral<"auto">, z$1.ZodBoolean]>>;
193
193
  readonly "sidebar.chronologicalSort": UiPreferenceDefinition<z$1.ZodEnum<{
194
+ none: "none";
194
195
  updated: "updated";
195
196
  created: "created";
196
197
  alpha: "alpha";
197
- none: "none";
198
198
  }>>;
199
199
  readonly "sidebar.sortDirection": UiPreferenceDefinition<z$1.ZodEnum<{
200
200
  default: "default";
@@ -628,8 +628,8 @@ declare const hostSchema: z$1.ZodObject<{
628
628
  }, z$1.core.$strip>>;
629
629
  }, z$1.core.$strip>;
630
630
  maxPermissionMode: z$1.ZodEnum<{
631
- full: "full";
632
631
  auto: "auto";
632
+ full: "full";
633
633
  "accept-edits": "accept-edits";
634
634
  }>;
635
635
  delivery: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
@@ -3008,8 +3008,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3008
3008
  }>;
3009
3009
  name: z$1.ZodString;
3010
3010
  source: z$1.ZodEnum<{
3011
- command: "command";
3012
3011
  skill: "skill";
3012
+ command: "command";
3013
3013
  }>;
3014
3014
  origin: z$1.ZodEnum<{
3015
3015
  user: "user";
@@ -3098,8 +3098,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3098
3098
  }>;
3099
3099
  name: z$1.ZodString;
3100
3100
  source: z$1.ZodEnum<{
3101
- command: "command";
3102
3101
  skill: "skill";
3102
+ command: "command";
3103
3103
  }>;
3104
3104
  origin: z$1.ZodEnum<{
3105
3105
  user: "user";
@@ -3176,8 +3176,8 @@ declare const threadEventSchema: z$1.ZodUnion<readonly [z$1.ZodIntersection<z$1.
3176
3176
  }>;
3177
3177
  permissionMode: z$1.ZodEnum<{
3178
3178
  readonly: "readonly";
3179
- full: "full";
3180
3179
  auto: "auto";
3180
+ full: "full";
3181
3181
  "accept-edits": "accept-edits";
3182
3182
  "workspace-write": "workspace-write";
3183
3183
  }>;
@@ -3975,8 +3975,8 @@ type ReasoningLevel = z$1.infer<typeof reasoningLevelSchema>;
3975
3975
  declare const serviceTierSchema: z$1.ZodString;
3976
3976
  type ServiceTier = z$1.infer<typeof serviceTierSchema>;
3977
3977
  declare const permissionModeSchema: z$1.ZodEnum<{
3978
- full: "full";
3979
3978
  auto: "auto";
3979
+ full: "full";
3980
3980
  "accept-edits": "accept-edits";
3981
3981
  }>;
3982
3982
  type PermissionMode = z$1.infer<typeof permissionModeSchema>;
@@ -4016,8 +4016,8 @@ declare const promptTextMentionSchema: z$1.ZodObject<{
4016
4016
  }>;
4017
4017
  name: z$1.ZodString;
4018
4018
  source: z$1.ZodEnum<{
4019
- command: "command";
4020
4019
  skill: "skill";
4020
+ command: "command";
4021
4021
  }>;
4022
4022
  origin: z$1.ZodEnum<{
4023
4023
  user: "user";
@@ -4081,8 +4081,8 @@ declare const promptInputSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
4081
4081
  }>;
4082
4082
  name: z$1.ZodString;
4083
4083
  source: z$1.ZodEnum<{
4084
- command: "command";
4085
4084
  skill: "skill";
4085
+ command: "command";
4086
4086
  }>;
4087
4087
  origin: z$1.ZodEnum<{
4088
4088
  user: "user";
@@ -4145,8 +4145,8 @@ declare const resolvedThreadExecutionOptionsSchema: z$1.ZodObject<{
4145
4145
  serviceTier: z$1.ZodString;
4146
4146
  reasoningLevel: z$1.ZodString;
4147
4147
  permissionMode: z$1.ZodEnum<{
4148
- full: "full";
4149
4148
  auto: "auto";
4149
+ full: "full";
4150
4150
  "accept-edits": "accept-edits";
4151
4151
  }>;
4152
4152
  source: z$1.ZodEnum<{
@@ -4162,8 +4162,8 @@ declare const projectExecutionDefaultsSchema: z$1.ZodObject<{
4162
4162
  serviceTier: z$1.ZodString;
4163
4163
  reasoningLevel: z$1.ZodString;
4164
4164
  permissionMode: z$1.ZodEnum<{
4165
- full: "full";
4166
4165
  auto: "auto";
4166
+ full: "full";
4167
4167
  "accept-edits": "accept-edits";
4168
4168
  }>;
4169
4169
  }, z$1.core.$strip>;
@@ -4203,8 +4203,8 @@ declare const providerInfoSchema: z$1.ZodObject<{
4203
4203
  supportsFork: z$1.ZodBoolean;
4204
4204
  supportsSessionRewind: z$1.ZodBoolean;
4205
4205
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
4206
- full: "full";
4207
4206
  auto: "auto";
4207
+ full: "full";
4208
4208
  "accept-edits": "accept-edits";
4209
4209
  }>>;
4210
4210
  modelCatalogScope: z$1.ZodEnum<{
@@ -4393,8 +4393,8 @@ declare const threadQueuedMessageSchema: z$1.ZodObject<{
4393
4393
  }>;
4394
4394
  name: z$1.ZodString;
4395
4395
  source: z$1.ZodEnum<{
4396
- command: "command";
4397
4396
  skill: "skill";
4397
+ command: "command";
4398
4398
  }>;
4399
4399
  origin: z$1.ZodEnum<{
4400
4400
  user: "user";
@@ -4444,8 +4444,8 @@ declare const threadQueuedMessageSchema: z$1.ZodObject<{
4444
4444
  model: z$1.ZodString;
4445
4445
  reasoningLevel: z$1.ZodString;
4446
4446
  permissionMode: z$1.ZodEnum<{
4447
- full: "full";
4448
4447
  auto: "auto";
4448
+ full: "full";
4449
4449
  "accept-edits": "accept-edits";
4450
4450
  }>;
4451
4451
  serviceTier: z$1.ZodString;
@@ -7862,14 +7862,14 @@ declare const hostDaemonCommandRegistry: {
7862
7862
  modifiedAtMs: z$1.ZodOptional<z$1.ZodNumber>;
7863
7863
  sha256: z$1.ZodString;
7864
7864
  }, z$1.core.$strip>, z$1.ZodObject<{
7865
- path: z$1.ZodString;
7866
7865
  contentEncoding: z$1.ZodEnum<{
7867
7866
  base64: "base64";
7868
7867
  utf8: "utf8";
7869
7868
  }>;
7870
- mimeType: z$1.ZodOptional<z$1.ZodString>;
7871
- sizeBytes: z$1.ZodNumber;
7872
7869
  sha256: z$1.ZodString;
7870
+ sizeBytes: z$1.ZodNumber;
7871
+ path: z$1.ZodString;
7872
+ mimeType: z$1.ZodOptional<z$1.ZodString>;
7873
7873
  modifiedAtMs: z$1.ZodOptional<z$1.ZodNumber>;
7874
7874
  notModified: z$1.ZodLiteral<true>;
7875
7875
  }, z$1.core.$strip>]>, "onlineRpc", true>;
@@ -8133,11 +8133,11 @@ declare const hostDaemonCommandRegistry: {
8133
8133
  supported: z$1.ZodLiteral<true>;
8134
8134
  health: z$1.ZodObject<{
8135
8135
  status: z$1.ZodEnum<{
8136
+ ready: "ready";
8136
8137
  unknown: "unknown";
8137
8138
  not_installed: "not_installed";
8138
8139
  unauthenticated: "unauthenticated";
8139
8140
  expired: "expired";
8140
- ready: "ready";
8141
8141
  unsupported_version: "unsupported_version";
8142
8142
  }>;
8143
8143
  statusMessage: z$1.ZodNullable<z$1.ZodString>;
@@ -8633,8 +8633,8 @@ declare const hostDaemonCommandRegistry: {
8633
8633
  message: z$1.ZodNullable<z$1.ZodString>;
8634
8634
  state: z$1.ZodNullable<z$1.ZodEnum<{
8635
8635
  pending: "pending";
8636
- ready: "ready";
8637
8636
  activating: "activating";
8637
+ ready: "ready";
8638
8638
  }>>;
8639
8639
  }, z$1.core.$strict>, "onlineRpc", true>;
8640
8640
  "server_move.prepare": HostDaemonCommandDescriptor<"server_move.prepare", z$1.ZodObject<{
@@ -16553,17 +16553,17 @@ declare const threadTimelineResponseSchema: z$1.ZodObject<{
16553
16553
  timeUsedSeconds: z$1.ZodNumber;
16554
16554
  }, z$1.core.$strip>>;
16555
16555
  providerCommands: z$1.ZodNullable<z$1.ZodArray<z$1.ZodObject<{
16556
- source: z$1.ZodEnum<{
16557
- command: "command";
16558
- skill: "skill";
16559
- }>;
16560
- name: z$1.ZodString;
16561
16556
  origin: z$1.ZodEnum<{
16562
16557
  project: "project";
16563
16558
  builtin: "builtin";
16564
16559
  user: "user";
16565
16560
  }>;
16566
16561
  description: z$1.ZodNullable<z$1.ZodString>;
16562
+ source: z$1.ZodEnum<{
16563
+ command: "command";
16564
+ skill: "skill";
16565
+ }>;
16566
+ name: z$1.ZodString;
16567
16567
  argumentHint: z$1.ZodNullable<z$1.ZodString>;
16568
16568
  }, z$1.core.$strip>>>;
16569
16569
  sessionOptions: z$1.ZodNullable<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
@@ -24041,10 +24041,10 @@ declare function createApiClient(baseUrl: string, options?: PublicApiClientOptio
24041
24041
  timeUsedSeconds: number;
24042
24042
  } | null;
24043
24043
  providerCommands: {
24044
- source: "command" | "skill";
24045
- name: string;
24046
24044
  origin: "project" | "builtin" | "user";
24047
24045
  description: string | null;
24046
+ source: "command" | "skill";
24047
+ name: string;
24048
24048
  argumentHint: string | null;
24049
24049
  }[] | null;
24050
24050
  sessionOptions: ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halcyonlabs/app",
3
- "version": "0.47.0-halcyon.483",
3
+ "version": "0.47.0-halcyon.484",
4
4
  "description": "bb app launcher for npx",
5
5
  "keywords": [
6
6
  "bb",
@@ -105,7 +105,7 @@
105
105
  "node": "^22.19.0 || ^24.0.0 || ^26.0.0"
106
106
  },
107
107
  "moonletRelease": {
108
- "summary": "Reap descendants when verification commands finish (#505)"
108
+ "summary": "Preserve source during stopped-turn output cleanup (#497)"
109
109
  },
110
110
  "license": "SEE LICENSE IN LICENSE"
111
111
  }
@@ -1,15 +1,15 @@
1
1
  {
2
- "commit": "23a611c3b39a77c21704d545ce150be1b6cab19a",
2
+ "commit": "f13912d1b9e9dbd15cbb466bef71463a2c20acf1",
3
3
  "file": "orbit-deploy",
4
4
  "platform": "linux-x64",
5
5
  "provenance": {
6
- "artifactId": 14765519060,
7
- "artifactName": "linux-bundle-23a611c3b39a77c21704d545ce150be1b6cab19a",
6
+ "artifactId": 14775961441,
7
+ "artifactName": "linux-bundle-f13912d1b9e9dbd15cbb466bef71463a2c20acf1",
8
8
  "repository": "matt0x6F/personalassistant",
9
- "runId": 45049470118,
9
+ "runId": 45075327448,
10
10
  "workflow": ".github/workflows/moonlet-linux-bundle.yml"
11
11
  },
12
12
  "schema": 1,
13
- "sha256": "fdb065612229efb65ac293f8aa197879448d2ee8bc48a8be16aea331f7fb7a9f",
14
- "size": 3293920
13
+ "sha256": "fe2b276c682ef92d975b67d2ae105b6003ebcf02fa6d372a83025cc87e41d080",
14
+ "size": 3306208
15
15
  }
@@ -1 +1 @@
1
- 23a611c3b39a77c21704d545ce150be1b6cab19a
1
+ f13912d1b9e9dbd15cbb466bef71463a2c20acf1
@@ -1 +1 @@
1
- {"repository":"matt0x6F/personalassistant","revision":"23a611c3b39a77c21704d545ce150be1b6cab19a"}
1
+ {"repository":"matt0x6F/personalassistant","revision":"f13912d1b9e9dbd15cbb466bef71463a2c20acf1"}
@@ -208,9 +208,41 @@ question for the owner's approval; neither enables the other.
208
208
  export npm_config_cache="$PWD/.orbit-build/npm-cache"
209
209
  export npm_config_store_dir="$PWD/.orbit-build/pnpm-store"
210
210
  export XDG_CACHE_HOME="$PWD/.orbit-build/cache"
211
- mkdir -p "$HOME" "$TMPDIR" "$CARGO_HOME" "$CARGO_TARGET_DIR" "$npm_config_cache" "$npm_config_store_dir" "$XDG_CACHE_HOME"
211
+ python3 - <<'ORBIT_BUILD_CACHES'
212
+ import os
213
+ from contextlib import ExitStack
214
+ with ExitStack() as handles:
215
+ def directory(parent, name):
216
+ try:
217
+ os.mkdir(name, mode=0o700, dir_fd=parent)
218
+ created = True
219
+ except FileExistsError:
220
+ created = False
221
+ fd = os.open(name, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=parent)
222
+ handles.callback(os.close, fd)
223
+ return fd, created
224
+ root = os.open(".", os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW)
225
+ handles.callback(os.close, root)
226
+ build, _ = directory(root, ".orbit-build")
227
+ directory(build, "home")
228
+ cargo, _ = directory(build, "cargo-home")
229
+ for parent, name in [(build, name) for name in ["tmp", "cargo-target", "npm-cache", "pnpm-store", "cache"]] + [(cargo, "registry"), (cargo, "git"), (root, "node_modules")]:
230
+ cache, created = directory(parent, name)
231
+ if created:
232
+ fd = os.open("CACHEDIR.TAG", os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o600, dir_fd=cache)
233
+ with os.fdopen(fd, "w") as tag:
234
+ info = os.fstat(cache)
235
+ tag.write(f"Signature: 8a477f597d28d172789f06886806bc55\n# Orbit generated cache v1: {info.st_dev}:{info.st_ino}\n")
236
+ ORBIT_BUILD_CACHES
212
237
  ```
213
238
 
239
+ This marks only newly created cache directories with an explicit disposable-cache
240
+ declaration bound to its device and inode. Generic cache tags alone do not
241
+ prove origin. Existing unproved directories are kept; never add a tag afterward
242
+ merely because a folder has a familiar name. Keep source, notes, patches and
243
+ unique results outside declared caches. Enclosing tracked, staged or untracked
244
+ source still blocks cleanup, and declared results always stay.
245
+
214
246
  Keep `.orbit-build/` out of commits, and use it only for regenerable files. Keep
215
247
  logs and anything you will deliver as a result elsewhere in your work folder.
216
248
  These are local development files, never an installation on the station. A cache write denied under your home folder means the
@@ -377,6 +377,58 @@ const BUILD_CACHES = [
377
377
  "home/.rustup",
378
378
  ];
379
379
 
380
+ function cacheDeclaration(path) {
381
+ let descriptor;
382
+ try {
383
+ const tag = join(path, "CACHEDIR.TAG");
384
+ descriptor = openSync(tag, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
385
+ const info = fstatSync(descriptor, { bigint: true });
386
+ if (!info.isFile() || info.nlink !== 1n || info.uid !== BigInt(process.getuid()) || info.size > 65536n) return false;
387
+ const found = Buffer.alloc(Number(info.size));
388
+ if (readSync(descriptor, found, 0, found.length, 0) !== found.length) return false;
389
+ const named = lstatSync(tag, { bigint: true });
390
+ if (named.ino !== info.ino || named.dev !== info.dev || named.size !== info.size) return false;
391
+ const text = found.toString("utf8");
392
+ const directory = lstatSync(path, { bigint: true });
393
+ const origin = `# Orbit generated cache v1: ${directory.dev}:${directory.ino}`;
394
+ return text.startsWith("Signature: 8a477f597d28d172789f06886806bc55") && text.split(/\r?\n/u).includes(origin);
395
+ } catch {
396
+ return false;
397
+ } finally {
398
+ if (descriptor !== undefined) closeSync(descriptor);
399
+ }
400
+ }
401
+
402
+ function sourceInCache(path, device, budget, depth = 0) {
403
+ if (depth > 128 || --budget.remaining < 0) return true;
404
+ const entries = readdirSync(path, { withFileTypes: true });
405
+ const protectedNames = new Set([".git", ".hg", ".svn", "logs", "_logs", "results", ".agents", ".aws", ".codex", ".claude"]);
406
+ if (entries.some((entry) => protectedNames.has(entry.name) || entry.name.endsWith(".log"))) return true;
407
+ if (entries.some((entry) => entry.name === "HEAD") && entries.some((entry) => ["objects", "refs", "reftable", "packed-refs", "commondir", "config"].includes(entry.name))) return true;
408
+ for (const entry of entries) {
409
+ if (--budget.remaining < 0) return true;
410
+ const child = join(path, entry.name);
411
+ const info = lstatSync(child, { bigint: true });
412
+ if (info.dev !== device || info.uid !== BigInt(process.getuid())) return true;
413
+ if (info.isDirectory() && sourceInCache(child, device, budget, depth + 1)) return true;
414
+ if (!info.isDirectory() && !info.isFile() && !info.isSymbolicLink() && !info.isFIFO() && !info.isSocket()) return true;
415
+ }
416
+ return false;
417
+ }
418
+
419
+ function disposableCache(job, path) {
420
+ if (!safeLocalPath(job, path) || !cacheDeclaration(path)) return false;
421
+ try {
422
+ const before = lstatSync(path, { bigint: true });
423
+ if (!before.isDirectory() || before.isSymbolicLink() || before.uid !== BigInt(process.getuid())) return false;
424
+ if (sourceInCache(path, before.dev, { remaining: 2_000_000 })) return false;
425
+ const after = lstatSync(path, { bigint: true });
426
+ return after.isDirectory() && after.ino === before.ino && after.dev === before.dev && safeLocalPath(job, path);
427
+ } catch {
428
+ return false;
429
+ }
430
+ }
431
+
380
432
  export function rebuildableFolders(top) {
381
433
  const job = jobRoot(top);
382
434
  if (!job) return null;
@@ -390,14 +442,17 @@ export function rebuildableFolders(top) {
390
442
  for (const output of PACKAGE_OUTPUTS) folders.add(join(checkout, dir, output));
391
443
  }
392
444
  for (const output of ["packages/templates/src/generated", "packages/plugin-build/src/generated"]) folders.add(join(checkout, output));
393
- const sourceFiles = must(top, "ls-files", "-z")
445
+ const sourceFiles = must(top, "ls-files", "--cached", "--others", "--exclude-standard", "-z")
394
446
  .split("\0")
395
447
  .filter(Boolean)
396
448
  .map((file) => join(checkout, file));
449
+ const retained = retainedPaths(top, []);
397
450
  return {
398
451
  job,
399
452
  folders: [...folders]
400
- .filter((folder) => existsSync(join(job, folder)) && !sourceFiles.some((file) => file === folder || file.startsWith(`${folder}/`)))
453
+ .filter((folder) => !sourceFiles.some((file) => file === folder || file.startsWith(`${folder}/`)))
454
+ .filter((folder) => !retained.some((saved) => pathsOverlap(join(job, folder), saved)))
455
+ .filter((folder) => disposableCache(job, join(job, folder)))
401
456
  .sort(),
402
457
  };
403
458
  }
@@ -561,7 +616,7 @@ export function cleanupBuildOutputs(top, keep = []) {
561
616
  const removed = [];
562
617
  for (const folder of found.folders) {
563
618
  const path = join(found.job, folder);
564
- if (!existsSync(path) || !safeLocalPath(found.job, path)) continue;
619
+ if (!existsSync(path) || !disposableCache(found.job, path)) continue;
565
620
  if (protectedFiles.some((saved) => pathsOverlap(path, saved))) continue;
566
621
  rmSync(path, { recursive: true, force: true });
567
622
  removed.push(folder);