@halcyonlabs/app 0.47.0-halcyon.164 → 0.47.0-halcyon.166

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/bb.js CHANGED
@@ -15863,6 +15863,7 @@ var appSourceOriginSchema = external_exports.enum(["official", "fork", "none"]);
15863
15863
 
15864
15864
  // ../config/src/cli-command.ts
15865
15865
  var CLI_LAUNCHER_ENV_NAME = "BB_CLI_LAUNCHER";
15866
+ var CLI_REEXEC_ENV_NAME = "BB_CLI_REEXEC";
15866
15867
 
15867
15868
  // ../config/src/strings.ts
15868
15869
  function toOptionalString(value) {
@@ -16861,16 +16862,21 @@ function resolveBundledCliLaunch(args) {
16861
16862
  return args.platform === "win32" && win32.extname(args.cliOverride) === "" ? { command: args.nodePath, args: [args.cliOverride, ...args.args] } : { command: args.cliOverride, args: args.args };
16862
16863
  }
16863
16864
  async function runBundledCliCommand(args) {
16865
+ const cliOverride = args.env[CLI_REEXEC_ENV_NAME] === "1" ? null : toOptionalString(args.env.BB_CLI) ?? null;
16864
16866
  const launch = resolveBundledCliLaunch({
16865
16867
  args: args.args,
16866
16868
  bundledCliPath: join4(args.context.daemonBundleDir, "bb"),
16867
- cliOverride: toOptionalString(args.env.BB_CLI) ?? null,
16869
+ cliOverride,
16868
16870
  nodePath: process.execPath,
16869
16871
  platform: process.platform
16870
16872
  });
16873
+ const env = createCliEnv({ context: args.context, env: args.env });
16874
+ if (cliOverride !== null) {
16875
+ env[CLI_REEXEC_ENV_NAME] = "1";
16876
+ }
16871
16877
  const childProcess = spawn(launch.command, launch.args, {
16872
16878
  cwd: process.cwd(),
16873
- env: createCliEnv({ context: args.context, env: args.env }),
16879
+ env,
16874
16880
  stdio: "inherit"
16875
16881
  });
16876
16882
  return toExitCode(await waitForProcessExit(childProcess));
package/dist/index.d.ts CHANGED
@@ -7336,8 +7336,8 @@ declare const hostDaemonCommandRegistry: {
7336
7336
  providerInstallation: z$1.ZodBoolean;
7337
7337
  supportsServiceTier: z$1.ZodBoolean;
7338
7338
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
7339
- auto: "auto";
7340
7339
  "accept-edits": "accept-edits";
7340
+ auto: "auto";
7341
7341
  full: "full";
7342
7342
  }>>;
7343
7343
  supportsThreadArchive: z$1.ZodBoolean;
@@ -7363,16 +7363,16 @@ declare const hostDaemonCommandRegistry: {
7363
7363
  permissionScope: z$1.ZodLiteral<"workspace">;
7364
7364
  approvalReviewer: z$1.ZodLiteral<"user">;
7365
7365
  permissionEscalation: z$1.ZodEnum<{
7366
- deny: "deny";
7367
7366
  ask: "ask";
7367
+ deny: "deny";
7368
7368
  }>;
7369
7369
  }, z$1.core.$strip>, z$1.ZodObject<{
7370
7370
  permissionMode: z$1.ZodLiteral<"auto">;
7371
7371
  permissionScope: z$1.ZodLiteral<"workspace">;
7372
7372
  approvalReviewer: z$1.ZodLiteral<"automatic">;
7373
7373
  permissionEscalation: z$1.ZodEnum<{
7374
- deny: "deny";
7375
7374
  ask: "ask";
7375
+ deny: "deny";
7376
7376
  }>;
7377
7377
  }, z$1.core.$strip>, z$1.ZodObject<{
7378
7378
  permissionMode: z$1.ZodLiteral<"full">;
@@ -7485,8 +7485,8 @@ declare const hostDaemonCommandRegistry: {
7485
7485
  providerInstallation: z$1.ZodBoolean;
7486
7486
  supportsServiceTier: z$1.ZodBoolean;
7487
7487
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
7488
- auto: "auto";
7489
7488
  "accept-edits": "accept-edits";
7489
+ auto: "auto";
7490
7490
  full: "full";
7491
7491
  }>>;
7492
7492
  supportsThreadArchive: z$1.ZodBoolean;
@@ -7512,16 +7512,16 @@ declare const hostDaemonCommandRegistry: {
7512
7512
  permissionScope: z$1.ZodLiteral<"workspace">;
7513
7513
  approvalReviewer: z$1.ZodLiteral<"user">;
7514
7514
  permissionEscalation: z$1.ZodEnum<{
7515
- deny: "deny";
7516
7515
  ask: "ask";
7516
+ deny: "deny";
7517
7517
  }>;
7518
7518
  }, z$1.core.$strip>, z$1.ZodObject<{
7519
7519
  permissionMode: z$1.ZodLiteral<"auto">;
7520
7520
  permissionScope: z$1.ZodLiteral<"workspace">;
7521
7521
  approvalReviewer: z$1.ZodLiteral<"automatic">;
7522
7522
  permissionEscalation: z$1.ZodEnum<{
7523
- deny: "deny";
7524
7523
  ask: "ask";
7524
+ deny: "deny";
7525
7525
  }>;
7526
7526
  }, z$1.core.$strip>, z$1.ZodObject<{
7527
7527
  permissionMode: z$1.ZodLiteral<"full">;
@@ -7657,8 +7657,8 @@ declare const hostDaemonCommandRegistry: {
7657
7657
  }>;
7658
7658
  origin: z$1.ZodEnum<{
7659
7659
  builtin: "builtin";
7660
- user: "user";
7661
7660
  project: "project";
7661
+ user: "user";
7662
7662
  }>;
7663
7663
  label: z$1.ZodString;
7664
7664
  argumentHint: z$1.ZodNullable<z$1.ZodString>;
@@ -7747,8 +7747,8 @@ declare const hostDaemonCommandRegistry: {
7747
7747
  }>;
7748
7748
  origin: z$1.ZodEnum<{
7749
7749
  builtin: "builtin";
7750
- user: "user";
7751
7750
  project: "project";
7751
+ user: "user";
7752
7752
  }>;
7753
7753
  label: z$1.ZodString;
7754
7754
  argumentHint: z$1.ZodNullable<z$1.ZodString>;
@@ -7850,8 +7850,8 @@ declare const hostDaemonCommandRegistry: {
7850
7850
  }>;
7851
7851
  origin: z$1.ZodEnum<{
7852
7852
  builtin: "builtin";
7853
- user: "user";
7854
7853
  project: "project";
7854
+ user: "user";
7855
7855
  }>;
7856
7856
  label: z$1.ZodString;
7857
7857
  argumentHint: z$1.ZodNullable<z$1.ZodString>;
@@ -7940,8 +7940,8 @@ declare const hostDaemonCommandRegistry: {
7940
7940
  }>;
7941
7941
  origin: z$1.ZodEnum<{
7942
7942
  builtin: "builtin";
7943
- user: "user";
7944
7943
  project: "project";
7944
+ user: "user";
7945
7945
  }>;
7946
7946
  label: z$1.ZodString;
7947
7947
  argumentHint: z$1.ZodNullable<z$1.ZodString>;
@@ -7995,16 +7995,16 @@ declare const hostDaemonCommandRegistry: {
7995
7995
  permissionScope: z$1.ZodLiteral<"workspace">;
7996
7996
  approvalReviewer: z$1.ZodLiteral<"user">;
7997
7997
  permissionEscalation: z$1.ZodEnum<{
7998
- deny: "deny";
7999
7998
  ask: "ask";
7999
+ deny: "deny";
8000
8000
  }>;
8001
8001
  }, z$1.core.$strip>, z$1.ZodObject<{
8002
8002
  permissionMode: z$1.ZodLiteral<"auto">;
8003
8003
  permissionScope: z$1.ZodLiteral<"workspace">;
8004
8004
  approvalReviewer: z$1.ZodLiteral<"automatic">;
8005
8005
  permissionEscalation: z$1.ZodEnum<{
8006
- deny: "deny";
8007
8006
  ask: "ask";
8007
+ deny: "deny";
8008
8008
  }>;
8009
8009
  }, z$1.core.$strip>, z$1.ZodObject<{
8010
8010
  permissionMode: z$1.ZodLiteral<"full">;
@@ -8023,8 +8023,8 @@ declare const hostDaemonCommandRegistry: {
8023
8023
  providerInstallation: z$1.ZodBoolean;
8024
8024
  supportsServiceTier: z$1.ZodBoolean;
8025
8025
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
8026
- auto: "auto";
8027
8026
  "accept-edits": "accept-edits";
8027
+ auto: "auto";
8028
8028
  full: "full";
8029
8029
  }>>;
8030
8030
  supportsThreadArchive: z$1.ZodBoolean;
@@ -8042,9 +8042,6 @@ declare const hostDaemonCommandRegistry: {
8042
8042
  workspaceContext: z$1.ZodObject<{
8043
8043
  workspacePath: z$1.ZodString;
8044
8044
  }, z$1.core.$strip>;
8045
- projectId: z$1.ZodString;
8046
- providerThreadId: z$1.ZodString;
8047
- providerId: z$1.ZodString;
8048
8045
  bridgeLaunch: z$1.ZodObject<{
8049
8046
  pluginId: z$1.ZodString;
8050
8047
  source: z$1.ZodObject<{
@@ -8056,8 +8053,8 @@ declare const hostDaemonCommandRegistry: {
8056
8053
  providerInstallation: z$1.ZodBoolean;
8057
8054
  supportsServiceTier: z$1.ZodBoolean;
8058
8055
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
8059
- auto: "auto";
8060
8056
  "accept-edits": "accept-edits";
8057
+ auto: "auto";
8061
8058
  full: "full";
8062
8059
  }>>;
8063
8060
  supportsThreadArchive: z$1.ZodBoolean;
@@ -8075,6 +8072,8 @@ declare const hostDaemonCommandRegistry: {
8075
8072
  replace: "replace";
8076
8073
  append: "append";
8077
8074
  }>;
8075
+ projectId: z$1.ZodString;
8076
+ providerId: z$1.ZodString;
8078
8077
  instructions: z$1.ZodString;
8079
8078
  dynamicTools: z$1.ZodArray<z$1.ZodObject<{
8080
8079
  name: z$1.ZodString;
@@ -8150,6 +8149,7 @@ declare const hostDaemonCommandRegistry: {
8150
8149
  sourceRootPath: z$1.ZodString;
8151
8150
  skillFilePath: z$1.ZodString;
8152
8151
  }, z$1.core.$strict>], "kind">>;
8152
+ providerThreadId: z$1.ZodString;
8153
8153
  }, z$1.core.$strict>;
8154
8154
  target: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
8155
8155
  mode: z$1.ZodLiteral<"start">;
@@ -8211,16 +8211,16 @@ declare const hostDaemonCommandRegistry: {
8211
8211
  permissionScope: z$1.ZodLiteral<"workspace">;
8212
8212
  approvalReviewer: z$1.ZodLiteral<"user">;
8213
8213
  permissionEscalation: z$1.ZodEnum<{
8214
- deny: "deny";
8215
8214
  ask: "ask";
8215
+ deny: "deny";
8216
8216
  }>;
8217
8217
  }, z$1.core.$strip>, z$1.ZodObject<{
8218
8218
  permissionMode: z$1.ZodLiteral<"auto">;
8219
8219
  permissionScope: z$1.ZodLiteral<"workspace">;
8220
8220
  approvalReviewer: z$1.ZodLiteral<"automatic">;
8221
8221
  permissionEscalation: z$1.ZodEnum<{
8222
- deny: "deny";
8223
8222
  ask: "ask";
8223
+ deny: "deny";
8224
8224
  }>;
8225
8225
  }, z$1.core.$strip>, z$1.ZodObject<{
8226
8226
  permissionMode: z$1.ZodLiteral<"full">;
@@ -8239,8 +8239,8 @@ declare const hostDaemonCommandRegistry: {
8239
8239
  providerInstallation: z$1.ZodBoolean;
8240
8240
  supportsServiceTier: z$1.ZodBoolean;
8241
8241
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
8242
- auto: "auto";
8243
8242
  "accept-edits": "accept-edits";
8243
+ auto: "auto";
8244
8244
  full: "full";
8245
8245
  }>>;
8246
8246
  supportsThreadArchive: z$1.ZodBoolean;
@@ -8258,9 +8258,6 @@ declare const hostDaemonCommandRegistry: {
8258
8258
  workspaceContext: z$1.ZodObject<{
8259
8259
  workspacePath: z$1.ZodString;
8260
8260
  }, z$1.core.$strip>;
8261
- projectId: z$1.ZodString;
8262
- providerThreadId: z$1.ZodString;
8263
- providerId: z$1.ZodString;
8264
8261
  bridgeLaunch: z$1.ZodObject<{
8265
8262
  pluginId: z$1.ZodString;
8266
8263
  source: z$1.ZodObject<{
@@ -8272,8 +8269,8 @@ declare const hostDaemonCommandRegistry: {
8272
8269
  providerInstallation: z$1.ZodBoolean;
8273
8270
  supportsServiceTier: z$1.ZodBoolean;
8274
8271
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
8275
- auto: "auto";
8276
8272
  "accept-edits": "accept-edits";
8273
+ auto: "auto";
8277
8274
  full: "full";
8278
8275
  }>>;
8279
8276
  supportsThreadArchive: z$1.ZodBoolean;
@@ -8291,6 +8288,8 @@ declare const hostDaemonCommandRegistry: {
8291
8288
  replace: "replace";
8292
8289
  append: "append";
8293
8290
  }>;
8291
+ projectId: z$1.ZodString;
8292
+ providerId: z$1.ZodString;
8294
8293
  instructions: z$1.ZodString;
8295
8294
  dynamicTools: z$1.ZodArray<z$1.ZodObject<{
8296
8295
  name: z$1.ZodString;
@@ -8366,6 +8365,7 @@ declare const hostDaemonCommandRegistry: {
8366
8365
  sourceRootPath: z$1.ZodString;
8367
8366
  skillFilePath: z$1.ZodString;
8368
8367
  }, z$1.core.$strict>], "kind">>;
8368
+ providerThreadId: z$1.ZodString;
8369
8369
  }, z$1.core.$strict>;
8370
8370
  }, z$1.core.$strict>, z$1.ZodObject<{
8371
8371
  cleared: z$1.ZodBoolean;
@@ -8404,8 +8404,8 @@ declare const hostDaemonCommandRegistry: {
8404
8404
  providerInstallation: z$1.ZodBoolean;
8405
8405
  supportsServiceTier: z$1.ZodBoolean;
8406
8406
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
8407
- auto: "auto";
8408
8407
  "accept-edits": "accept-edits";
8408
+ auto: "auto";
8409
8409
  full: "full";
8410
8410
  }>>;
8411
8411
  supportsThreadArchive: z$1.ZodBoolean;
@@ -8437,8 +8437,8 @@ declare const hostDaemonCommandRegistry: {
8437
8437
  providerInstallation: z$1.ZodBoolean;
8438
8438
  supportsServiceTier: z$1.ZodBoolean;
8439
8439
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
8440
- auto: "auto";
8441
8440
  "accept-edits": "accept-edits";
8441
+ auto: "auto";
8442
8442
  full: "full";
8443
8443
  }>>;
8444
8444
  supportsThreadArchive: z$1.ZodBoolean;
@@ -8820,8 +8820,8 @@ declare const hostDaemonCommandRegistry: {
8820
8820
  skills: z$1.ZodArray<z$1.ZodObject<{
8821
8821
  path: z$1.ZodString;
8822
8822
  origin: z$1.ZodEnum<{
8823
- user: "user";
8824
8823
  project: "project";
8824
+ user: "user";
8825
8825
  }>;
8826
8826
  recursive: z$1.ZodBoolean;
8827
8827
  ancestors: z$1.ZodBoolean;
@@ -8839,8 +8839,8 @@ declare const hostDaemonCommandRegistry: {
8839
8839
  commands: z$1.ZodArray<z$1.ZodObject<{
8840
8840
  path: z$1.ZodString;
8841
8841
  origin: z$1.ZodEnum<{
8842
- user: "user";
8843
8842
  project: "project";
8843
+ user: "user";
8844
8844
  }>;
8845
8845
  recursive: z$1.ZodBoolean;
8846
8846
  ancestors: z$1.ZodBoolean;
@@ -8865,8 +8865,8 @@ declare const hostDaemonCommandRegistry: {
8865
8865
  skill: "skill";
8866
8866
  }>;
8867
8867
  origin: z$1.ZodEnum<{
8868
- user: "user";
8869
8868
  project: "project";
8869
+ user: "user";
8870
8870
  }>;
8871
8871
  description: z$1.ZodNullable<z$1.ZodString>;
8872
8872
  argumentHint: z$1.ZodNullable<z$1.ZodString>;
@@ -8913,8 +8913,8 @@ declare const hostDaemonCommandRegistry: {
8913
8913
  skills: z$1.ZodArray<z$1.ZodObject<{
8914
8914
  path: z$1.ZodString;
8915
8915
  origin: z$1.ZodEnum<{
8916
- user: "user";
8917
8916
  project: "project";
8917
+ user: "user";
8918
8918
  }>;
8919
8919
  recursive: z$1.ZodBoolean;
8920
8920
  ancestors: z$1.ZodBoolean;
@@ -8932,8 +8932,8 @@ declare const hostDaemonCommandRegistry: {
8932
8932
  commands: z$1.ZodArray<z$1.ZodObject<{
8933
8933
  path: z$1.ZodString;
8934
8934
  origin: z$1.ZodEnum<{
8935
- user: "user";
8936
8935
  project: "project";
8936
+ user: "user";
8937
8937
  }>;
8938
8938
  recursive: z$1.ZodBoolean;
8939
8939
  ancestors: z$1.ZodBoolean;
@@ -8959,14 +8959,14 @@ declare const hostDaemonCommandRegistry: {
8959
8959
  realPath: z$1.ZodString;
8960
8960
  contentSha256: z$1.ZodString;
8961
8961
  rootKind: z$1.ZodEnum<{
8962
- plugin: "plugin";
8963
8962
  "shared-user": "shared-user";
8964
8963
  "shared-project": "shared-project";
8964
+ plugin: "plugin";
8965
8965
  "bb-project": "bb-project";
8966
+ "provider-user": "provider-user";
8967
+ "provider-project": "provider-project";
8966
8968
  "bb-data-dir": "bb-data-dir";
8967
8969
  "bb-builtin": "bb-builtin";
8968
- "provider-project": "provider-project";
8969
- "provider-user": "provider-user";
8970
8970
  }>;
8971
8971
  linked: z$1.ZodBoolean;
8972
8972
  }, z$1.core.$strip>>;
@@ -9020,14 +9020,14 @@ declare const hostDaemonCommandRegistry: {
9020
9020
  realPath: z$1.ZodString;
9021
9021
  contentSha256: z$1.ZodString;
9022
9022
  rootKind: z$1.ZodEnum<{
9023
- plugin: "plugin";
9024
9023
  "shared-user": "shared-user";
9025
9024
  "shared-project": "shared-project";
9025
+ plugin: "plugin";
9026
9026
  "bb-project": "bb-project";
9027
+ "provider-user": "provider-user";
9028
+ "provider-project": "provider-project";
9027
9029
  "bb-data-dir": "bb-data-dir";
9028
9030
  "bb-builtin": "bb-builtin";
9029
- "provider-project": "provider-project";
9030
- "provider-user": "provider-user";
9031
9031
  }>;
9032
9032
  linked: z$1.ZodBoolean;
9033
9033
  }, z$1.core.$strip>>;
@@ -9035,10 +9035,10 @@ declare const hostDaemonCommandRegistry: {
9035
9035
  "host.delete_skill": HostDaemonCommandDescriptor<"host.delete_skill", z$1.ZodObject<{
9036
9036
  type: z$1.ZodLiteral<"host.delete_skill">;
9037
9037
  scope: z$1.ZodEnum<{
9038
+ "bb-user": "bb-user";
9038
9039
  "bb-project": "bb-project";
9039
- "provider-project": "provider-project";
9040
9040
  "provider-user": "provider-user";
9041
- "bb-user": "bb-user";
9041
+ "provider-project": "provider-project";
9042
9042
  }>;
9043
9043
  name: z$1.ZodString;
9044
9044
  cwd: z$1.ZodNullable<z$1.ZodString>;
@@ -9049,8 +9049,8 @@ declare const hostDaemonCommandRegistry: {
9049
9049
  "host.write_skill": HostDaemonCommandDescriptor<"host.write_skill", z$1.ZodObject<{
9050
9050
  type: z$1.ZodLiteral<"host.write_skill">;
9051
9051
  scope: z$1.ZodEnum<{
9052
- "bb-project": "bb-project";
9053
9052
  "bb-user": "bb-user";
9053
+ "bb-project": "bb-project";
9054
9054
  }>;
9055
9055
  name: z$1.ZodString;
9056
9056
  cwd: z$1.ZodNullable<z$1.ZodString>;
@@ -9147,8 +9147,8 @@ declare const hostDaemonCommandRegistry: {
9147
9147
  selectedBranch: z$1.ZodOptional<z$1.ZodString>;
9148
9148
  limit: z$1.ZodNumber;
9149
9149
  remoteRefresh: z$1.ZodEnum<{
9150
- background: "background";
9151
9150
  none: "none";
9151
+ background: "background";
9152
9152
  }>;
9153
9153
  }, z$1.core.$strict>, z$1.ZodObject<{
9154
9154
  branches: z$1.ZodArray<z$1.ZodString>;
@@ -9269,8 +9269,8 @@ declare const hostDaemonCommandRegistry: {
9269
9269
  providerInstallation: z$1.ZodBoolean;
9270
9270
  supportsServiceTier: z$1.ZodBoolean;
9271
9271
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
9272
- auto: "auto";
9273
9272
  "accept-edits": "accept-edits";
9273
+ auto: "auto";
9274
9274
  full: "full";
9275
9275
  }>>;
9276
9276
  supportsThreadArchive: z$1.ZodBoolean;
@@ -9399,8 +9399,8 @@ declare const hostDaemonCommandRegistry: {
9399
9399
  providerInstallation: z$1.ZodBoolean;
9400
9400
  supportsServiceTier: z$1.ZodBoolean;
9401
9401
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
9402
- auto: "auto";
9403
9402
  "accept-edits": "accept-edits";
9403
+ auto: "auto";
9404
9404
  full: "full";
9405
9405
  }>>;
9406
9406
  supportsThreadArchive: z$1.ZodBoolean;
@@ -9436,8 +9436,8 @@ declare const hostDaemonCommandRegistry: {
9436
9436
  providerInstallation: z$1.ZodBoolean;
9437
9437
  supportsServiceTier: z$1.ZodBoolean;
9438
9438
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
9439
- auto: "auto";
9440
9439
  "accept-edits": "accept-edits";
9440
+ auto: "auto";
9441
9441
  full: "full";
9442
9442
  }>>;
9443
9443
  supportsThreadArchive: z$1.ZodBoolean;
@@ -9490,8 +9490,8 @@ declare const hostDaemonCommandRegistry: {
9490
9490
  providerInstallation: z$1.ZodBoolean;
9491
9491
  supportsServiceTier: z$1.ZodBoolean;
9492
9492
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
9493
- auto: "auto";
9494
9493
  "accept-edits": "accept-edits";
9494
+ auto: "auto";
9495
9495
  full: "full";
9496
9496
  }>>;
9497
9497
  supportsThreadArchive: z$1.ZodBoolean;
@@ -9551,8 +9551,8 @@ declare const hostDaemonCommandRegistry: {
9551
9551
  providerInstallation: z$1.ZodBoolean;
9552
9552
  supportsServiceTier: z$1.ZodBoolean;
9553
9553
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
9554
- auto: "auto";
9555
9554
  "accept-edits": "accept-edits";
9555
+ auto: "auto";
9556
9556
  full: "full";
9557
9557
  }>>;
9558
9558
  supportsThreadArchive: z$1.ZodBoolean;
@@ -9605,8 +9605,8 @@ declare const hostDaemonCommandRegistry: {
9605
9605
  providerInstallation: z$1.ZodBoolean;
9606
9606
  supportsServiceTier: z$1.ZodBoolean;
9607
9607
  permissionModes: z$1.ZodArray<z$1.ZodEnum<{
9608
- auto: "auto";
9609
9608
  "accept-edits": "accept-edits";
9609
+ auto: "auto";
9610
9610
  full: "full";
9611
9611
  }>>;
9612
9612
  supportsThreadArchive: z$1.ZodBoolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halcyonlabs/app",
3
- "version": "0.47.0-halcyon.164",
3
+ "version": "0.47.0-halcyon.166",
4
4
  "description": "bb app launcher for npx",
5
5
  "keywords": [
6
6
  "bb",
@@ -1 +1 @@
1
- 1b42e0abd8791857f7ba0c8016f768e436f0edbd
1
+ bc333d0047f776cc8e4ce4a8c75d7c3d04d41d6c
@@ -48563,6 +48563,9 @@ function claimQueuedThreadMessageGroup(db, notifier, id3, policy) {
48563
48563
  if (!existing || isQueuedThreadMessageClaimed(existing)) {
48564
48564
  return null;
48565
48565
  }
48566
+ if (policy.kind === "automatic" && hasClaimedQueuedThreadMessages(tx, existing.threadId)) {
48567
+ return null;
48568
+ }
48566
48569
  const queuedMessages = listQueuedThreadMessages(tx, existing.threadId);
48567
48570
  const group = partitionQueuedMessageGroups(queuedMessages).find(
48568
48571
  (rows) => rows.some((row) => row.id === id3)
@@ -48598,6 +48601,9 @@ function claimQueuedThreadMessageGroup(db, notifier, id3, policy) {
48598
48601
  function claimNextQueuedThreadMessageGroup(db, notifier, threadId, isGroupEligible) {
48599
48602
  const claimedQueuedMessages = db.transaction(
48600
48603
  (tx) => {
48604
+ if (hasClaimedQueuedThreadMessages(tx, threadId)) {
48605
+ return null;
48606
+ }
48601
48607
  const queuedMessages = listQueuedThreadMessages(tx, threadId);
48602
48608
  const pauseOrdinaryMessages = isThreadQueueAutoSendPaused(tx, threadId);
48603
48609
  const now2 = Date.now();
@@ -70719,6 +70725,7 @@ var init_src10 = __esm({
70719
70725
  "use strict";
70720
70726
  init_rejected_assistant_reply();
70721
70727
  init_timeline_noise_events();
70728
+ init_tool_call_parsing();
70722
70729
  init_build_thread_timeline();
70723
70730
  init_active_prompt_mode_extraction();
70724
70731
  init_goal_snapshot_extraction();
@@ -71443,7 +71450,7 @@ function deferRowContent(row) {
71443
71450
  }
71444
71451
  switch (row.workKind) {
71445
71452
  case "command": {
71446
- if (row.output.length + row.command.length <= TIMELINE_DEFERRED_CONTENT_MIN_CHARS) {
71453
+ if (row.output.length + row.command.length <= TIMELINE_DEFERRED_CONTENT_MIN_CHARS || parseSentThreadMessage(row) !== null) {
71447
71454
  return row;
71448
71455
  }
71449
71456
  const { outputPreview: _outputPreview, ...rest } = row;
@@ -71497,6 +71504,7 @@ var init_timeline_deferred_content = __esm({
71497
71504
  "src/services/threads/timeline-deferred-content.ts"() {
71498
71505
  "use strict";
71499
71506
  init_src6();
71507
+ init_src10();
71500
71508
  TIMELINE_DEFERRED_CONTENT_MIN_CHARS = 1e3;
71501
71509
  TIMELINE_DEFERRED_COMMAND_PREFIX_CHARS = 300;
71502
71510
  }
@@ -89056,9 +89064,15 @@ function buildParentSystemThreadMention(args) {
89056
89064
  }
89057
89065
  function queueActiveParentSystemMessageInTransaction(tx, args) {
89058
89066
  const currentThread = getThread(tx, args.thread.id);
89059
- if (!currentThread || currentThread.environmentId !== args.environment.id || currentThread.status !== "active" || currentThread.archivedAt !== null || currentThread.deletedAt !== null) {
89067
+ if (!currentThread || currentThread.environmentId !== args.environment.id || currentThread.archivedAt !== null || currentThread.deletedAt !== null) {
89060
89068
  return null;
89061
89069
  }
89070
+ if (currentThread.status !== "active") {
89071
+ throw new ParentSystemMessageStateChangedError();
89072
+ }
89073
+ if (isManualCompactionActive({ db: tx }, currentThread)) {
89074
+ throw new ParentSystemMessageCompactionActiveError();
89075
+ }
89062
89076
  const expectedSteerTurnId2 = getActiveTurnId({ db: tx }, args.thread.id);
89063
89077
  const request2 = appendClientTurnEventInTransaction(tx, {
89064
89078
  ...parentSystemTurnRequestFields(args),
@@ -89189,7 +89203,11 @@ async function queueReadyParentSystemMessage(deps, args) {
89189
89203
  });
89190
89204
  const activeThread = deps.db.transaction(
89191
89205
  (tx) => {
89192
- ensureThreadCanStartRequest(args.thread);
89206
+ const currentThread = getThread(tx, args.thread.id);
89207
+ if (!currentThread || currentThread.environmentId !== args.environment.id || currentThread.status !== args.thread.status || currentThread.archivedAt !== null || currentThread.deletedAt !== null) {
89208
+ throw new ParentSystemMessageStateChangedError();
89209
+ }
89210
+ ensureThreadCanStartRequest(currentThread);
89193
89211
  appendPreparedClientTurnRequestedEventWithNotificationInTransaction(tx, {
89194
89212
  ...parentSystemTurnRequestFields(args),
89195
89213
  target: { kind: "new-turn" },
@@ -89253,7 +89271,7 @@ async function queueParentSystemMessage(deps, args) {
89253
89271
  });
89254
89272
  } catch (error3) {
89255
89273
  hostUnavailable = isHostUnavailableApiError(error3);
89256
- if (!(error3 instanceof ThreadContextClearInProgressError) && !hostUnavailable) {
89274
+ if (!(error3 instanceof ThreadContextClearInProgressError) && !(error3 instanceof ParentSystemMessageCompactionActiveError) && !hostUnavailable) {
89257
89275
  throw error3;
89258
89276
  }
89259
89277
  }
@@ -89305,6 +89323,24 @@ async function deliverParentSystemMessage(deps, args) {
89305
89323
  );
89306
89324
  }
89307
89325
  async function deliverParentSystemMessageWithContextGuard(deps, args) {
89326
+ while (true) {
89327
+ const parentThread = getThread(deps.db, args.parentThread.id);
89328
+ if (!parentThread || parentThread.archivedAt !== null || parentThread.deletedAt !== null) {
89329
+ return false;
89330
+ }
89331
+ try {
89332
+ return await attemptParentSystemMessageDelivery(deps, {
89333
+ ...args,
89334
+ parentThread
89335
+ });
89336
+ } catch (error3) {
89337
+ if (!(error3 instanceof ParentSystemMessageStateChangedError)) {
89338
+ throw error3;
89339
+ }
89340
+ }
89341
+ }
89342
+ }
89343
+ async function attemptParentSystemMessageDelivery(deps, args) {
89308
89344
  const { parentThread } = args;
89309
89345
  const { environment } = requireThreadEnvironment(deps.db, parentThread.id);
89310
89346
  const execution = await buildExecutionOptions(
@@ -89339,7 +89375,7 @@ async function deliverParentSystemMessageWithContextGuard(deps, args) {
89339
89375
  systemMessageSubject: args.systemMessageSubject
89340
89376
  });
89341
89377
  }
89342
- var PARENT_SYSTEM_MESSAGE_SOURCE;
89378
+ var PARENT_SYSTEM_MESSAGE_SOURCE, ParentSystemMessageStateChangedError, ParentSystemMessageCompactionActiveError;
89343
89379
  var init_parent_system_messages = __esm({
89344
89380
  "src/services/threads/parent-system-messages.ts"() {
89345
89381
  "use strict";
@@ -89360,6 +89396,10 @@ var init_parent_system_messages = __esm({
89360
89396
  init_thread_context_mutation_guard();
89361
89397
  init_queued_message_dispatch();
89362
89398
  PARENT_SYSTEM_MESSAGE_SOURCE = "tell";
89399
+ ParentSystemMessageStateChangedError = class extends Error {
89400
+ };
89401
+ ParentSystemMessageCompactionActiveError = class extends Error {
89402
+ };
89363
89403
  }
89364
89404
  });
89365
89405
 
@@ -104605,7 +104645,7 @@ async function sendQueuedMessage(deps, args) {
104605
104645
  );
104606
104646
  } catch (error3) {
104607
104647
  releaseQueuedMessageClaims(deps, queuedMessages);
104608
- if (isQueuedMessageAutoSendPausedError(error3) || error3 instanceof ThreadContextClearInProgressError) {
104648
+ if (isQueuedMessageAutoSendPausedError(error3) || error3 instanceof ThreadContextClearInProgressError || error3 instanceof ParentSystemMessageCompactionActiveError) {
104609
104649
  return toThreadQueuedMessage(queuedMessages[0]);
104610
104650
  }
104611
104651
  throw error3;
@@ -104662,7 +104702,7 @@ async function sendNextQueuedMessageIfPresent(deps, args) {
104662
104702
  );
104663
104703
  } catch (error3) {
104664
104704
  releaseQueuedMessageClaims(deps, nextQueuedMessages);
104665
- if (isQueuedMessageClaimLostError(error3) || isQueuedMessageAutoSendPausedError(error3) || error3 instanceof ThreadContextClearInProgressError) {
104705
+ if (isQueuedMessageClaimLostError(error3) || isQueuedMessageAutoSendPausedError(error3) || error3 instanceof ThreadContextClearInProgressError || error3 instanceof ParentSystemMessageCompactionActiveError) {
104666
104706
  return false;
104667
104707
  }
104668
104708
  if (!isCommandTimeoutError(error3)) {