@asteroidai/cli 1.9.529 → 1.9.530

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/asteroid.js CHANGED
@@ -334,6 +334,32 @@ var COMMANDS = [
334
334
  readOnly: true,
335
335
  destructive: false
336
336
  },
337
+ {
338
+ command: "billing reward list",
339
+ tool: "billing_credit_rewards_list",
340
+ title: "List credit rewards",
341
+ description: "List the organization's credit rewards: one-time free credit it earns from a milestone. `state` is `locked` (not earned, or not open to the organization), `claimable` or `claimed`. The user claims a `claimable` reward in the platform app.",
342
+ method: "GET",
343
+ path: "/billing/v2/credit-rewards",
344
+ args: [],
345
+ query: [
346
+ {
347
+ name: "pageSize",
348
+ flag: "page-size",
349
+ type: "integer",
350
+ required: false
351
+ },
352
+ {
353
+ name: "page",
354
+ flag: "page",
355
+ type: "integer",
356
+ required: false
357
+ }
358
+ ],
359
+ binary: false,
360
+ readOnly: true,
361
+ destructive: false
362
+ },
337
363
  {
338
364
  command: "billing subscription",
339
365
  tool: "billing_subscription_get",
@@ -590,15 +616,15 @@ var COMMANDS = [
590
616
  flag: "base",
591
617
  type: "json",
592
618
  required: true,
593
- description: "The base machine: a browser, or a Linux / Windows OS environment. For non-staff callers, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; staff may name any snapshot. Omit it for the default image.",
619
+ description: "The base machine: a browser, or a Linux, Windows or Citrix desktop, sent as `os` with `osType` or as the desktop type. For non-staff callers, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; staff may name any snapshot. Omit it for the default image.",
594
620
  fields: [
595
621
  {
596
622
  name: "type",
597
623
  flag: "type",
598
624
  type: "string",
599
625
  required: false,
600
- description: "Type of execution environment",
601
- enum: ["browser", "os"]
626
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
627
+ enum: ["browser", "os", "linux", "windows", "citrix"]
602
628
  },
603
629
  {
604
630
  name: "config",
@@ -1001,15 +1027,15 @@ var COMMANDS = [
1001
1027
  flag: "base",
1002
1028
  type: "json",
1003
1029
  required: true,
1004
- description: "The base machine: a browser, or a Linux / Windows OS environment. For non-staff callers, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; staff may name any snapshot. Omit it for the default image.",
1030
+ description: "The base machine: a browser, or a Linux, Windows or Citrix desktop, sent as `os` with `osType` or as the desktop type. For non-staff callers, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; staff may name any snapshot. Omit it for the default image.",
1005
1031
  fields: [
1006
1032
  {
1007
1033
  name: "type",
1008
1034
  flag: "type",
1009
1035
  type: "string",
1010
1036
  required: false,
1011
- description: "Type of execution environment",
1012
- enum: ["browser", "os"]
1037
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
1038
+ enum: ["browser", "os", "linux", "windows", "citrix"]
1013
1039
  },
1014
1040
  {
1015
1041
  name: "config",
@@ -2887,7 +2913,7 @@ var COMMANDS = [
2887
2913
  query: [],
2888
2914
  binary: false,
2889
2915
  readOnly: false,
2890
- destructive: false,
2916
+ destructive: true,
2891
2917
  body: {
2892
2918
  required: true,
2893
2919
  contentType: "application/json",
@@ -3987,7 +4013,7 @@ var COMMANDS = [
3987
4013
  query: [],
3988
4014
  binary: false,
3989
4015
  readOnly: false,
3990
- destructive: false,
4016
+ destructive: true,
3991
4017
  body: {
3992
4018
  required: true,
3993
4019
  contentType: "application/json",
@@ -4934,7 +4960,7 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
4934
4960
  query: [],
4935
4961
  binary: false,
4936
4962
  readOnly: false,
4937
- destructive: false,
4963
+ destructive: true,
4938
4964
  body: {
4939
4965
  required: true,
4940
4966
  contentType: "application/json",
@@ -5489,8 +5515,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
5489
5515
  flag: "type",
5490
5516
  type: "string",
5491
5517
  required: false,
5492
- description: "Type of execution environment",
5493
- enum: ["browser", "os"]
5518
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
5519
+ enum: ["browser", "os", "linux", "windows", "citrix"]
5494
5520
  },
5495
5521
  {
5496
5522
  name: "config",
@@ -6711,8 +6737,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
6711
6737
  flag: "type",
6712
6738
  type: "string",
6713
6739
  required: false,
6714
- description: "Type of execution environment",
6715
- enum: ["browser", "os"]
6740
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
6741
+ enum: ["browser", "os", "linux", "windows", "citrix"]
6716
6742
  },
6717
6743
  {
6718
6744
  name: "config",
@@ -6845,8 +6871,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
6845
6871
  flag: "type",
6846
6872
  type: "string",
6847
6873
  required: false,
6848
- description: "Type of execution environment",
6849
- enum: ["browser", "os"]
6874
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
6875
+ enum: ["browser", "os", "linux", "windows", "citrix"]
6850
6876
  },
6851
6877
  {
6852
6878
  name: "config",
@@ -7335,8 +7361,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
7335
7361
  flag: "type",
7336
7362
  type: "string",
7337
7363
  required: false,
7338
- description: "Type of execution environment",
7339
- enum: ["browser", "os"]
7364
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
7365
+ enum: ["browser", "os", "linux", "windows", "citrix"]
7340
7366
  },
7341
7367
  {
7342
7368
  name: "config",
@@ -7445,7 +7471,7 @@ var SYNC_COMMANDS = [
7445
7471
  command: "execution pull",
7446
7472
  tool: "execution_pull",
7447
7473
  title: "Pull an execution to disk",
7448
- description: "Write an execution to `<workflow-name>/executions/<id>/`: summary.json, activities.md (the step-by-step log), and the files the run produced.",
7474
+ description: "Write an execution to `<workflow-name>/executions/<id>/`: summary.json, activities.md (the step-by-step log), the files the run produced, and the browser recorder's block signals and interaction logs (`debug/signals/`, `debug/interactions/`) when you can see debug files.",
7449
7475
  readOnly: true,
7450
7476
  args: [executionId],
7451
7477
  query: [
@@ -8559,7 +8585,7 @@ var ApiError = class extends Error {
8559
8585
  status;
8560
8586
  body;
8561
8587
  };
8562
- var VERSION = "1.9.529";
8588
+ var VERSION = "1.9.530";
8563
8589
  function problem(status, body, fallback) {
8564
8590
  if (body && typeof body === "object") {
8565
8591
  const record2 = body;
@@ -9898,7 +9924,13 @@ function formatActivitiesMarkdown(activities, status, createdAt) {
9898
9924
  }
9899
9925
 
9900
9926
  // src/sync/execution-pull.ts
9901
- var DIRECTORIES = ["workspace", "downloads", "shared"];
9927
+ var DIRECTORIES = ["workspace", "downloads", "shared", "debug"];
9928
+ var DEBUG_FOLDERS = ["signals/", "interactions/"];
9929
+ function pulled(file) {
9930
+ if (file.directory !== "debug") return true;
9931
+ const inDirectory = pathInDirectory(file);
9932
+ return DEBUG_FOLDERS.some((folder) => inDirectory.startsWith(folder));
9933
+ }
9902
9934
  function relativeFilePath(file) {
9903
9935
  return `${file.directory}/${pathInDirectory(file)}`.replace(
9904
9936
  /^workspace\/\.execution-context\//,
@@ -9949,7 +9981,9 @@ async function listFiles(sync, executionId2) {
9949
9981
  const listing = await sync.remote.json(
9950
9982
  get(`/agents/v2/executions/${pathId(executionId2)}/files`)
9951
9983
  );
9952
- return DIRECTORIES.flatMap((name) => listing.directories[name] ?? []);
9984
+ return DIRECTORIES.flatMap((name) => listing.directories[name] ?? []).filter(
9985
+ pulled
9986
+ );
9953
9987
  }
9954
9988
  async function download(sync, executionId2, file) {
9955
9989
  const path = `/agents/v2/executions/${pathId(executionId2)}/files/${pathId(file.id)}/signed-url`;
@@ -10157,7 +10191,7 @@ async function pullInsights(sync, options = {}) {
10157
10191
  get(`/astro/v2/insights/${pathId(options.insightId)}`)
10158
10192
  )
10159
10193
  ] : await listInsights(sync, options.workflowId);
10160
- const pulled = [];
10194
+ const pulled2 = [];
10161
10195
  for (const [insight, stem] of assignStems(
10162
10196
  await stemOwners(sync, dir),
10163
10197
  insights
@@ -10176,9 +10210,9 @@ async function pullInsights(sync, options = {}) {
10176
10210
  );
10177
10211
  await sync.files.write(path, Buffer.from(text3, "utf8"));
10178
10212
  const { id, name, type, status } = insight;
10179
- pulled.push({ id, name, type, status, path });
10213
+ pulled2.push({ id, name, type, status, path });
10180
10214
  }
10181
- return { dir, insights: pulled };
10215
+ return { dir, insights: pulled2 };
10182
10216
  }
10183
10217
  function formatInsightPull(result) {
10184
10218
  const count = result.insights.length;
package/dist/core.js CHANGED
@@ -355,6 +355,32 @@ var COMMANDS = [
355
355
  readOnly: true,
356
356
  destructive: false
357
357
  },
358
+ {
359
+ command: "billing reward list",
360
+ tool: "billing_credit_rewards_list",
361
+ title: "List credit rewards",
362
+ description: "List the organization's credit rewards: one-time free credit it earns from a milestone. `state` is `locked` (not earned, or not open to the organization), `claimable` or `claimed`. The user claims a `claimable` reward in the platform app.",
363
+ method: "GET",
364
+ path: "/billing/v2/credit-rewards",
365
+ args: [],
366
+ query: [
367
+ {
368
+ name: "pageSize",
369
+ flag: "page-size",
370
+ type: "integer",
371
+ required: false
372
+ },
373
+ {
374
+ name: "page",
375
+ flag: "page",
376
+ type: "integer",
377
+ required: false
378
+ }
379
+ ],
380
+ binary: false,
381
+ readOnly: true,
382
+ destructive: false
383
+ },
358
384
  {
359
385
  command: "billing subscription",
360
386
  tool: "billing_subscription_get",
@@ -611,15 +637,15 @@ var COMMANDS = [
611
637
  flag: "base",
612
638
  type: "json",
613
639
  required: true,
614
- description: "The base machine: a browser, or a Linux / Windows OS environment. For non-staff callers, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; staff may name any snapshot. Omit it for the default image.",
640
+ description: "The base machine: a browser, or a Linux, Windows or Citrix desktop, sent as `os` with `osType` or as the desktop type. For non-staff callers, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; staff may name any snapshot. Omit it for the default image.",
615
641
  fields: [
616
642
  {
617
643
  name: "type",
618
644
  flag: "type",
619
645
  type: "string",
620
646
  required: false,
621
- description: "Type of execution environment",
622
- enum: ["browser", "os"]
647
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
648
+ enum: ["browser", "os", "linux", "windows", "citrix"]
623
649
  },
624
650
  {
625
651
  name: "config",
@@ -1022,15 +1048,15 @@ var COMMANDS = [
1022
1048
  flag: "base",
1023
1049
  type: "json",
1024
1050
  required: true,
1025
- description: "The base machine: a browser, or a Linux / Windows OS environment. For non-staff callers, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; staff may name any snapshot. Omit it for the default image.",
1051
+ description: "The base machine: a browser, or a Linux, Windows or Citrix desktop, sent as `os` with `osType` or as the desktop type. For non-staff callers, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; staff may name any snapshot. Omit it for the default image.",
1026
1052
  fields: [
1027
1053
  {
1028
1054
  name: "type",
1029
1055
  flag: "type",
1030
1056
  type: "string",
1031
1057
  required: false,
1032
- description: "Type of execution environment",
1033
- enum: ["browser", "os"]
1058
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
1059
+ enum: ["browser", "os", "linux", "windows", "citrix"]
1034
1060
  },
1035
1061
  {
1036
1062
  name: "config",
@@ -2908,7 +2934,7 @@ var COMMANDS = [
2908
2934
  query: [],
2909
2935
  binary: false,
2910
2936
  readOnly: false,
2911
- destructive: false,
2937
+ destructive: true,
2912
2938
  body: {
2913
2939
  required: true,
2914
2940
  contentType: "application/json",
@@ -4008,7 +4034,7 @@ var COMMANDS = [
4008
4034
  query: [],
4009
4035
  binary: false,
4010
4036
  readOnly: false,
4011
- destructive: false,
4037
+ destructive: true,
4012
4038
  body: {
4013
4039
  required: true,
4014
4040
  contentType: "application/json",
@@ -4955,7 +4981,7 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
4955
4981
  query: [],
4956
4982
  binary: false,
4957
4983
  readOnly: false,
4958
- destructive: false,
4984
+ destructive: true,
4959
4985
  body: {
4960
4986
  required: true,
4961
4987
  contentType: "application/json",
@@ -5510,8 +5536,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
5510
5536
  flag: "type",
5511
5537
  type: "string",
5512
5538
  required: false,
5513
- description: "Type of execution environment",
5514
- enum: ["browser", "os"]
5539
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
5540
+ enum: ["browser", "os", "linux", "windows", "citrix"]
5515
5541
  },
5516
5542
  {
5517
5543
  name: "config",
@@ -6732,8 +6758,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
6732
6758
  flag: "type",
6733
6759
  type: "string",
6734
6760
  required: false,
6735
- description: "Type of execution environment",
6736
- enum: ["browser", "os"]
6761
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
6762
+ enum: ["browser", "os", "linux", "windows", "citrix"]
6737
6763
  },
6738
6764
  {
6739
6765
  name: "config",
@@ -6866,8 +6892,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
6866
6892
  flag: "type",
6867
6893
  type: "string",
6868
6894
  required: false,
6869
- description: "Type of execution environment",
6870
- enum: ["browser", "os"]
6895
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
6896
+ enum: ["browser", "os", "linux", "windows", "citrix"]
6871
6897
  },
6872
6898
  {
6873
6899
  name: "config",
@@ -7356,8 +7382,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
7356
7382
  flag: "type",
7357
7383
  type: "string",
7358
7384
  required: false,
7359
- description: "Type of execution environment",
7360
- enum: ["browser", "os"]
7385
+ description: "The machine an environment boots: a browser, or a desktop by its operating system. Responses return `browser` or `os` for now. Requests may send either `os` with `config.osType`, or the desktop value itself.",
7386
+ enum: ["browser", "os", "linux", "windows", "citrix"]
7361
7387
  },
7362
7388
  {
7363
7389
  name: "config",
@@ -8184,7 +8210,7 @@ var SYNC_COMMANDS = [
8184
8210
  command: "execution pull",
8185
8211
  tool: "execution_pull",
8186
8212
  title: "Pull an execution to disk",
8187
- description: "Write an execution to `<workflow-name>/executions/<id>/`: summary.json, activities.md (the step-by-step log), and the files the run produced.",
8213
+ description: "Write an execution to `<workflow-name>/executions/<id>/`: summary.json, activities.md (the step-by-step log), the files the run produced, and the browser recorder's block signals and interaction logs (`debug/signals/`, `debug/interactions/`) when you can see debug files.",
8188
8214
  readOnly: true,
8189
8215
  args: [executionId],
8190
8216
  query: [
@@ -8458,7 +8484,13 @@ function matchesGlob(path, pattern) {
8458
8484
  }
8459
8485
 
8460
8486
  // src/sync/execution-pull.ts
8461
- var DIRECTORIES = ["workspace", "downloads", "shared"];
8487
+ var DIRECTORIES = ["workspace", "downloads", "shared", "debug"];
8488
+ var DEBUG_FOLDERS = ["signals/", "interactions/"];
8489
+ function pulled(file) {
8490
+ if (file.directory !== "debug") return true;
8491
+ const inDirectory = pathInDirectory(file);
8492
+ return DEBUG_FOLDERS.some((folder) => inDirectory.startsWith(folder));
8493
+ }
8462
8494
  function relativeFilePath(file) {
8463
8495
  return `${file.directory}/${pathInDirectory(file)}`.replace(
8464
8496
  /^workspace\/\.execution-context\//,
@@ -8509,7 +8541,9 @@ async function listFiles(sync, executionId2) {
8509
8541
  const listing = await sync.remote.json(
8510
8542
  get(`/agents/v2/executions/${pathId(executionId2)}/files`)
8511
8543
  );
8512
- return DIRECTORIES.flatMap((name) => listing.directories[name] ?? []);
8544
+ return DIRECTORIES.flatMap((name) => listing.directories[name] ?? []).filter(
8545
+ pulled
8546
+ );
8513
8547
  }
8514
8548
  async function download(sync, executionId2, file) {
8515
8549
  const path = `/agents/v2/executions/${pathId(executionId2)}/files/${pathId(file.id)}/signed-url`;
@@ -8717,7 +8751,7 @@ async function pullInsights(sync, options = {}) {
8717
8751
  get(`/astro/v2/insights/${pathId(options.insightId)}`)
8718
8752
  )
8719
8753
  ] : await listInsights(sync, options.workflowId);
8720
- const pulled = [];
8754
+ const pulled2 = [];
8721
8755
  for (const [insight, stem] of assignStems(
8722
8756
  await stemOwners(sync, dir),
8723
8757
  insights
@@ -8736,9 +8770,9 @@ async function pullInsights(sync, options = {}) {
8736
8770
  );
8737
8771
  await sync.files.write(path, Buffer.from(text2, "utf8"));
8738
8772
  const { id, name, type, status } = insight;
8739
- pulled.push({ id, name, type, status, path });
8773
+ pulled2.push({ id, name, type, status, path });
8740
8774
  }
8741
- return { dir, insights: pulled };
8775
+ return { dir, insights: pulled2 };
8742
8776
  }
8743
8777
  function formatInsightPull(result) {
8744
8778
  const count = result.insights.length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteroidai/cli",
3
- "version": "1.9.529",
3
+ "version": "1.9.530",
4
4
  "description": "The asteroid command-line interface for the Asteroid platform.",
5
5
  "type": "module",
6
6
  "license": "MIT",