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

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
@@ -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
- skill: "skill";
3012
3011
  command: "command";
3012
+ skill: "skill";
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
- skill: "skill";
3102
3101
  command: "command";
3102
+ skill: "skill";
3103
3103
  }>;
3104
3104
  origin: z$1.ZodEnum<{
3105
3105
  user: "user";
@@ -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
- skill: "skill";
4020
4019
  command: "command";
4020
+ skill: "skill";
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
- skill: "skill";
4085
4084
  command: "command";
4085
+ skill: "skill";
4086
4086
  }>;
4087
4087
  origin: z$1.ZodEnum<{
4088
4088
  user: "user";
@@ -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
- skill: "skill";
4397
4396
  command: "command";
4397
+ skill: "skill";
4398
4398
  }>;
4399
4399
  origin: z$1.ZodEnum<{
4400
4400
  user: "user";
@@ -6131,8 +6131,8 @@ declare const hostDaemonCommandRegistry: {
6131
6131
  skillFilePath: z$1.ZodString;
6132
6132
  }, z$1.core.$strict>], "kind">>;
6133
6133
  instructionMode: z$1.ZodEnum<{
6134
- replace: "replace";
6135
6134
  append: "append";
6135
+ replace: "replace";
6136
6136
  }>;
6137
6137
  type: z$1.ZodLiteral<"thread.rewind.prepare">;
6138
6138
  leaseId: z$1.ZodString;
@@ -6280,8 +6280,8 @@ declare const hostDaemonCommandRegistry: {
6280
6280
  skillFilePath: z$1.ZodString;
6281
6281
  }, z$1.core.$strict>], "kind">>;
6282
6282
  instructionMode: z$1.ZodEnum<{
6283
- replace: "replace";
6284
6283
  append: "append";
6284
+ replace: "replace";
6285
6285
  }>;
6286
6286
  type: z$1.ZodLiteral<"thread.start">;
6287
6287
  requestId: z$1.ZodString;
@@ -6744,8 +6744,8 @@ declare const hostDaemonCommandRegistry: {
6744
6744
  envPassthrough: z$1.ZodArray<z$1.ZodString>;
6745
6745
  }, z$1.core.$strict>;
6746
6746
  instructionMode: z$1.ZodEnum<{
6747
- replace: "replace";
6748
6747
  append: "append";
6748
+ replace: "replace";
6749
6749
  }>;
6750
6750
  projectId: z$1.ZodString;
6751
6751
  providerId: z$1.ZodString;
@@ -6960,8 +6960,8 @@ declare const hostDaemonCommandRegistry: {
6960
6960
  envPassthrough: z$1.ZodArray<z$1.ZodString>;
6961
6961
  }, z$1.core.$strict>;
6962
6962
  instructionMode: z$1.ZodEnum<{
6963
- replace: "replace";
6964
6963
  append: "append";
6964
+ replace: "replace";
6965
6965
  }>;
6966
6966
  projectId: z$1.ZodString;
6967
6967
  providerId: 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;
7865
7866
  contentEncoding: z$1.ZodEnum<{
7866
7867
  base64: "base64";
7867
7868
  utf8: "utf8";
7868
7869
  }>;
7869
- sha256: z$1.ZodString;
7870
- sizeBytes: z$1.ZodNumber;
7871
- path: z$1.ZodString;
7872
7870
  mimeType: z$1.ZodOptional<z$1.ZodString>;
7871
+ sizeBytes: z$1.ZodNumber;
7872
+ sha256: 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>;
@@ -8134,10 +8134,10 @@ declare const hostDaemonCommandRegistry: {
8134
8134
  health: z$1.ZodObject<{
8135
8135
  status: z$1.ZodEnum<{
8136
8136
  unknown: "unknown";
8137
- ready: "ready";
8138
8137
  not_installed: "not_installed";
8139
8138
  unauthenticated: "unauthenticated";
8140
8139
  expired: "expired";
8140
+ ready: "ready";
8141
8141
  unsupported_version: "unsupported_version";
8142
8142
  }>;
8143
8143
  statusMessage: z$1.ZodNullable<z$1.ZodString>;
@@ -8185,9 +8185,9 @@ declare const hostDaemonCommandRegistry: {
8185
8185
  executablePath: z$1.ZodNullable<z$1.ZodString>;
8186
8186
  installed: z$1.ZodBoolean;
8187
8187
  installSource: z$1.ZodEnum<{
8188
+ external: "external";
8188
8189
  notInstalled: "notInstalled";
8189
8190
  npmGlobal: "npmGlobal";
8190
- external: "external";
8191
8191
  }>;
8192
8192
  currentVersion: z$1.ZodNullable<z$1.ZodString>;
8193
8193
  latestVersion: 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
- activating: "activating";
8637
8636
  ready: "ready";
8637
+ activating: "activating";
8638
8638
  }>>;
8639
8639
  }, z$1.core.$strict>, "onlineRpc", true>;
8640
8640
  "server_move.prepare": HostDaemonCommandDescriptor<"server_move.prepare", z$1.ZodObject<{
@@ -8736,9 +8736,9 @@ declare const providerCliStatusResponseSchema: z$1.ZodRecord<z$1.ZodString, z$1.
8736
8736
  executablePath: z$1.ZodNullable<z$1.ZodString>;
8737
8737
  installed: z$1.ZodBoolean;
8738
8738
  installSource: z$1.ZodEnum<{
8739
+ external: "external";
8739
8740
  notInstalled: "notInstalled";
8740
8741
  npmGlobal: "npmGlobal";
8741
- external: "external";
8742
8742
  }>;
8743
8743
  currentVersion: z$1.ZodNullable<z$1.ZodString>;
8744
8744
  latestVersion: z$1.ZodNullable<z$1.ZodString>;
@@ -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;
16556
16561
  origin: z$1.ZodEnum<{
16557
16562
  project: "project";
16558
16563
  builtin: "builtin";
16559
16564
  user: "user";
16560
16565
  }>;
16561
16566
  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
- origin: "project" | "builtin" | "user";
24045
- description: string | null;
24046
24044
  source: "command" | "skill";
24047
24045
  name: string;
24046
+ origin: "project" | "builtin" | "user";
24047
+ description: string | null;
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.481",
3
+ "version": "0.47.0-halcyon.483",
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": "feat(orbit): bootstrap automatic station delivery source (#506)"
108
+ "summary": "Reap descendants when verification commands finish (#505)"
109
109
  },
110
110
  "license": "SEE LICENSE IN LICENSE"
111
111
  }
@@ -1,12 +1,12 @@
1
1
  {
2
- "commit": "08dc855e36e334f7f2107f0b70c6074fd2e7063b",
2
+ "commit": "23a611c3b39a77c21704d545ce150be1b6cab19a",
3
3
  "file": "orbit-deploy",
4
4
  "platform": "linux-x64",
5
5
  "provenance": {
6
- "artifactId": 14751061357,
7
- "artifactName": "linux-bundle-08dc855e36e334f7f2107f0b70c6074fd2e7063b",
6
+ "artifactId": 14765519060,
7
+ "artifactName": "linux-bundle-23a611c3b39a77c21704d545ce150be1b6cab19a",
8
8
  "repository": "matt0x6F/personalassistant",
9
- "runId": 45011653956,
9
+ "runId": 45049470118,
10
10
  "workflow": ".github/workflows/moonlet-linux-bundle.yml"
11
11
  },
12
12
  "schema": 1,
@@ -1 +1 @@
1
- 08dc855e36e334f7f2107f0b70c6074fd2e7063b
1
+ 23a611c3b39a77c21704d545ce150be1b6cab19a
@@ -1 +1 @@
1
- {"repository":"matt0x6F/personalassistant","revision":"08dc855e36e334f7f2107f0b70c6074fd2e7063b"}
1
+ {"repository":"matt0x6F/personalassistant","revision":"23a611c3b39a77c21704d545ce150be1b6cab19a"}
@@ -20,6 +20,8 @@ export type CheckOutput = { current: string; folders: string[] };
20
20
  export declare function prepareCheckOutput(top: string): CheckOutput | null;
21
21
  export declare function cleanupCheckOutput(top: string, context: CheckOutput | null, keep?: string[]): string[];
22
22
 
23
- export declare function runAll(top: string, steps: (Step & { setup?: boolean })[], log: string, context?: CheckOutput | null, environment?: Record<string, string | undefined>): { ok: boolean; skipped: boolean; status: number | string | null; command: string }[];
23
+ export declare function runAll(top: string, steps: (Step & { setup?: boolean })[], log: string, context?: CheckOutput | null, environment?: Record<string, string | undefined>): { ok: boolean; skipped: boolean; status: number | string | null; command: string; output: string }[];
24
24
 
25
25
  export declare function activeBuildLease(env: Record<string, string | undefined>, queue?: string): boolean;
26
+
27
+ export declare function scopedCommand(program: string, args: string[]): { program: string; args: string[] };
@@ -246,6 +246,88 @@ function plan(top, base) {
246
246
  return { kind: "derived", changed, untracked, uncovered: [], ...derivedChecks(top) };
247
247
  }
248
248
 
249
+ const LINUX_CHECK_SCOPE = String.raw`import ctypes
250
+ import os
251
+ import signal
252
+ import subprocess
253
+ import sys
254
+ from pathlib import Path
255
+
256
+ PR_SET_CHILD_SUBREAPER = 36
257
+
258
+
259
+ class Interrupted(Exception):
260
+ def __init__(self, number):
261
+ self.number = number
262
+
263
+
264
+ def finish_children():
265
+ children = Path('/proc/self/task') / str(os.getpid()) / 'children'
266
+ while True:
267
+ try:
268
+ while os.waitpid(-1, os.WNOHANG)[0]:
269
+ pass
270
+ except ChildProcessError:
271
+ return
272
+ for pid in children.read_text().split():
273
+ try:
274
+ os.kill(int(pid), signal.SIGKILL)
275
+ except ProcessLookupError:
276
+ pass
277
+ try:
278
+ os.waitpid(-1, 0)
279
+ except ChildProcessError:
280
+ return
281
+
282
+
283
+ def main():
284
+ if sys.platform != 'linux' or len(sys.argv) < 2:
285
+ raise ValueError('Linux check command required')
286
+ libc = ctypes.CDLL(None, use_errno=True)
287
+ libc.prctl.argtypes = [ctypes.c_int, ctypes.c_ulong, ctypes.c_ulong, ctypes.c_ulong, ctypes.c_ulong]
288
+ libc.prctl.restype = ctypes.c_int
289
+ if libc.prctl(PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0) != 0:
290
+ raise OSError(ctypes.get_errno(), 'could not own check descendants')
291
+ signals = [signal.SIGTERM, signal.SIGINT, signal.SIGHUP]
292
+ child = None
293
+ received = None
294
+
295
+ def interrupted(number, _frame):
296
+ nonlocal received
297
+ received = number
298
+ if child is None:
299
+ raise Interrupted(number)
300
+ try:
301
+ child.send_signal(number)
302
+ except ProcessLookupError:
303
+ pass
304
+
305
+ for number in signals:
306
+ signal.signal(number, interrupted)
307
+ signal.signal(signal.SIGCHLD, signal.SIG_DFL)
308
+ result = 1
309
+ try:
310
+ child = subprocess.Popen(sys.argv[1:], close_fds=False)
311
+ result = child.wait()
312
+ except Interrupted as error:
313
+ result = 128 + error.number
314
+ finally:
315
+ for number in signals:
316
+ signal.signal(number, signal.SIG_IGN)
317
+ finish_children()
318
+ if received is not None and result == 0:
319
+ result = 128 + received
320
+ return result if result >= 0 else 128 - result
321
+
322
+
323
+ if __name__ == '__main__':
324
+ sys.exit(main())
325
+ `;
326
+
327
+ export function scopedCommand(program, args) {
328
+ return { program: "python3", args: ["-I", "-B", "-c", LINUX_CHECK_SCOPE, program, ...args] };
329
+ }
330
+
249
331
  export function runAll(top, steps, log, context, environment = process.env.BB_THREAD_ID ? buildEnvironment(top) : { ...process.env }) {
250
332
  const results = [];
251
333
  if (context) environment.TMPDIR = context.current;
@@ -257,15 +339,27 @@ export function runAll(top, steps, log, context, environment = process.env.BB_TH
257
339
  const started = Date.now();
258
340
  appendFileSync(log, `\n$ (cd ${step.cwd}) ${step.command}\n`);
259
341
  const queued = process.platform === "linux" && environment.BB_THREAD_ID && !covered && existsSync("/usr/local/orbit/bin/orbit-build");
260
- const program = queued ? "/usr/local/orbit/bin/orbit-build" : "bash";
261
- const args = queued ? ["--", "/bin/bash", "-c", step.command] : ["-c", step.command];
342
+ let program = queued ? "/usr/local/orbit/bin/orbit-build" : "bash";
343
+ let args = queued ? ["--", "/bin/bash", "-c", step.command] : ["-c", step.command];
344
+ if (process.platform === "linux") {
345
+ const scoped = scopedCommand(program, args);
346
+ program = scoped.program;
347
+ args = scoped.args;
348
+ }
262
349
  const result = spawnSync(program, args, { cwd: resolve(top, step.cwd), env: environment, stdio, encoding: "utf8", maxBuffer: 256 * 1024 * 1024 });
263
350
  const output = `${result.stdout ?? ""}${result.stderr ?? ""}${result.error ? `${result.error.message}\n` : ""}`;
264
351
  appendFileSync(log, output);
265
352
  const seconds = Math.round((Date.now() - started) / 1000);
266
- const skipped = !step.setup && result.status === NOT_HERE;
267
- results.push({ ...step, ok: result.status === 0 || skipped, skipped, status: result.status ?? result.signal, seconds, output });
268
- if (step.setup && result.status !== 0) break;
353
+ const skipped = !step.setup && !result.error && result.status === NOT_HERE;
354
+ results.push({
355
+ ...step,
356
+ ok: !result.error && (result.status === 0 || skipped),
357
+ skipped,
358
+ status: result.error ? (result.error.code ?? "spawn-error") : (result.status ?? result.signal),
359
+ seconds,
360
+ output,
361
+ });
362
+ if (step.setup && (result.error || result.status !== 0)) break;
269
363
  }
270
364
  return results;
271
365
  }