@get-bb/plugin-sdk 0.6.141 → 0.6.144

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.
@@ -10090,6 +10090,15 @@ declare const systemProvidersQuerySchema: z$1.ZodObject<{
10090
10090
  hostId: z$1.ZodOptional<z$1.ZodString>;
10091
10091
  }, z$1.core.$strip>;
10092
10092
  type SystemProvidersQuery = z$1.infer<typeof systemProvidersQuerySchema>;
10093
+ declare const systemProviderStatesQuerySchema: z$1.ZodObject<{
10094
+ capability: z$1.ZodOptional<z$1.ZodEnum<{
10095
+ usage: "usage";
10096
+ }>>;
10097
+ environmentId: z$1.ZodOptional<z$1.ZodString>;
10098
+ hostId: z$1.ZodOptional<z$1.ZodString>;
10099
+ providerId: z$1.ZodOptional<z$1.ZodString>;
10100
+ }, z$1.core.$strip>;
10101
+ type SystemProviderStatesQuery = z$1.infer<typeof systemProviderStatesQuerySchema>;
10093
10102
  declare const systemExecutionOptionsQuerySchema: z$1.ZodObject<{
10094
10103
  environmentId: z$1.ZodOptional<z$1.ZodString>;
10095
10104
  hostId: z$1.ZodOptional<z$1.ZodString>;
@@ -10248,6 +10257,7 @@ declare const recordTelemetryEventRequestSchema: z$1.ZodDiscriminatedUnion<[z$1.
10248
10257
  }, z$1.core.$strict>, z$1.ZodObject<{
10249
10258
  name: z$1.ZodLiteral<"onboarding_operation">;
10250
10259
  properties: z$1.ZodObject<{
10260
+ duration_ms: z$1.ZodOptional<z$1.ZodNumber>;
10251
10261
  entry: z$1.ZodEnum<{
10252
10262
  first_run: "first_run";
10253
10263
  replay: "replay";
@@ -13313,6 +13323,7 @@ type SendMessageRequest = z$1.infer<typeof sendMessageRequestSchema>;
13313
13323
  */
13314
13324
  declare const sendMessageResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
13315
13325
  delivery: z$1.ZodLiteral<"sent">;
13326
+ messageSequence: z$1.ZodNullable<z$1.ZodNumber>;
13316
13327
  ok: z$1.ZodLiteral<true>;
13317
13328
  }, z$1.core.$strip>, z$1.ZodObject<{
13318
13329
  delivery: z$1.ZodLiteral<"queued">;
@@ -18740,7 +18751,7 @@ type SystemUpdateGeneralSettingsResult = AppSettings & {
18740
18751
  };
18741
18752
  type SystemUpdateKeyboardSettingsResult = AppKeybindingOverrides;
18742
18753
  type SystemUsageLimitsResult = ProviderUsageResponse;
18743
- interface SystemProviderStatesArgs extends SystemProvidersQuery {
18754
+ interface SystemProviderStatesArgs extends SystemProviderStatesQuery {
18744
18755
  signal?: AbortSignal;
18745
18756
  }
18746
18757
  type SystemProviderStatesResult = SystemProviderStatesResponse;
@@ -10305,6 +10305,15 @@ declare const systemProvidersQuerySchema: z$1.ZodObject<{
10305
10305
  hostId: z$1.ZodOptional<z$1.ZodString>;
10306
10306
  }, z$1.core.$strip>;
10307
10307
  type SystemProvidersQuery = z$1.infer<typeof systemProvidersQuerySchema>;
10308
+ declare const systemProviderStatesQuerySchema: z$1.ZodObject<{
10309
+ capability: z$1.ZodOptional<z$1.ZodEnum<{
10310
+ usage: "usage";
10311
+ }>>;
10312
+ environmentId: z$1.ZodOptional<z$1.ZodString>;
10313
+ hostId: z$1.ZodOptional<z$1.ZodString>;
10314
+ providerId: z$1.ZodOptional<z$1.ZodString>;
10315
+ }, z$1.core.$strip>;
10316
+ type SystemProviderStatesQuery = z$1.infer<typeof systemProviderStatesQuerySchema>;
10308
10317
  declare const systemExecutionOptionsQuerySchema: z$1.ZodObject<{
10309
10318
  environmentId: z$1.ZodOptional<z$1.ZodString>;
10310
10319
  hostId: z$1.ZodOptional<z$1.ZodString>;
@@ -10463,6 +10472,7 @@ declare const recordTelemetryEventRequestSchema: z$1.ZodDiscriminatedUnion<[z$1.
10463
10472
  }, z$1.core.$strict>, z$1.ZodObject<{
10464
10473
  name: z$1.ZodLiteral<"onboarding_operation">;
10465
10474
  properties: z$1.ZodObject<{
10475
+ duration_ms: z$1.ZodOptional<z$1.ZodNumber>;
10466
10476
  entry: z$1.ZodEnum<{
10467
10477
  first_run: "first_run";
10468
10478
  replay: "replay";
@@ -13529,6 +13539,7 @@ type SendMessageRequest = z$1.infer<typeof sendMessageRequestSchema>;
13529
13539
  */
13530
13540
  declare const sendMessageResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
13531
13541
  delivery: z$1.ZodLiteral<"sent">;
13542
+ messageSequence: z$1.ZodNullable<z$1.ZodNumber>;
13532
13543
  ok: z$1.ZodLiteral<true>;
13533
13544
  }, z$1.core.$strip>, z$1.ZodObject<{
13534
13545
  delivery: z$1.ZodLiteral<"queued">;
@@ -18967,7 +18978,7 @@ type SystemUpdateGeneralSettingsResult = AppSettings & {
18967
18978
  };
18968
18979
  type SystemUpdateKeyboardSettingsResult = AppKeybindingOverrides;
18969
18980
  type SystemUsageLimitsResult = ProviderUsageResponse;
18970
- interface SystemProviderStatesArgs extends SystemProvidersQuery {
18981
+ interface SystemProviderStatesArgs extends SystemProviderStatesQuery {
18971
18982
  signal?: AbortSignal;
18972
18983
  }
18973
18984
  type SystemProviderStatesResult = SystemProviderStatesResponse;
package/dist/host.js CHANGED
@@ -1656,6 +1656,28 @@ async function listLsofProcessCwds() {
1656
1656
  }
1657
1657
  return results;
1658
1658
  }
1659
+ var runningProcessCwdScan = null;
1660
+ var queuedProcessCwdScan = null;
1661
+ function startProcessCwdScan() {
1662
+ const scan = (process.platform === "linux" ? listLinuxProcessCwds() : listLsofProcessCwds()).finally(() => {
1663
+ if (runningProcessCwdScan === scan) runningProcessCwdScan = null;
1664
+ });
1665
+ runningProcessCwdScan = scan;
1666
+ return scan;
1667
+ }
1668
+ function scanProcessCwds() {
1669
+ if (queuedProcessCwdScan !== null) return queuedProcessCwdScan;
1670
+ if (runningProcessCwdScan === null) return startProcessCwdScan();
1671
+ const queued = runningProcessCwdScan.then(
1672
+ () => void 0,
1673
+ () => void 0
1674
+ ).then(() => {
1675
+ queuedProcessCwdScan = null;
1676
+ return startProcessCwdScan();
1677
+ });
1678
+ queuedProcessCwdScan = queued;
1679
+ return queued;
1680
+ }
1659
1681
  async function resolveSweepDirectory(directory) {
1660
1682
  const resolved = resolve(directory);
1661
1683
  let ancestor = dirname2(resolved);
@@ -1690,7 +1712,7 @@ async function listProcessesWithCwdUnder(args) {
1690
1712
  if (directories.length === 0) {
1691
1713
  return [];
1692
1714
  }
1693
- const all = process.platform === "linux" ? await listLinuxProcessCwds() : await listLsofProcessCwds();
1715
+ const all = await scanProcessCwds();
1694
1716
  return all.filter(
1695
1717
  (entry) => entry.pid !== process.pid && directories.some(
1696
1718
  (directory) => isPathUnderDirectory(entry.cwd, directory)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-bb/plugin-sdk",
3
- "version": "0.6.141",
3
+ "version": "0.6.144",
4
4
  "homepage": "https://github.com/get-bb/bb#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/get-bb/bb/issues"