@asteroidai/cli 1.9.547 → 1.9.555

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
@@ -923,7 +923,7 @@ var COMMANDS = [
923
923
  command: "custom-environment delete",
924
924
  tool: "custom_environment_delete",
925
925
  title: "Delete custom environment",
926
- description: "Delete a custom environment. Refused while a workflow's published or head version selects it through `settings.default_environment_id`: the environment's `usedBy` lists them, and the error names up to five and counts the rest. Point them at another environment first. Also refused while warm members exist: set `warmPool.targetSize` to 0 first and wait for them to retire.",
926
+ description: "Delete a custom environment. Refused while a workflow's published or head version selects it through `settings.default_environment_id` (the environment's `usedBy`), while a schedule names it in `customEnvironmentId`, enabled or not (`usedBySchedules`), or while a scheduled execution or batch item that names it can still start: pending, awaiting capacity, or in a paused batch (`usedByScheduledExecutions`). The error names up to five of each kind and counts the rest. Point them at another environment, or cancel the scheduled executions, first. Also refused while warm members exist: set `warmPool.targetSize` to 0 first and wait for them to retire.",
927
927
  method: "DELETE",
928
928
  path: "/agents/v2/custom-environments/{customEnvironmentId}",
929
929
  args: [
@@ -2591,7 +2591,7 @@ var COMMANDS = [
2591
2591
  command: "insight-rule create",
2592
2592
  tool: "insight_rule_create",
2593
2593
  title: "Create insight rule",
2594
- description: "Create an insight rule. `match` is a CEL expression over one finished execution, read as `execution` (`status`, `outcome`, `outputNodeId`, `cancelReason`, `duration` in seconds, `scriptFailures` with `nodeId`, `nodeName`, `scriptFilepath`, `actionId`, `error`) and the rule's `params`. `fire` is one of three patterns: `rate` (a share of executions), `count` (a number of executions) or `trend` (a rise against the period before). Set `workflowId` for one workflow, or omit it for every workflow. Run `insight_rule_validate` first: it checks the rule and shows on which of the last 14 days it would have fired. The rule opens at /insights?tab=rules&rule=<id>.",
2594
+ description: "Create an insight rule. `match` is a CEL expression over one finished execution, read as `execution` (`status`, `outcome`, `outputNodeId`, `cancelReason`, `duration` in seconds, `scriptFailures` with `nodeId`, `nodeName`, `scriptFilepath`, `actionId`, `error`) and `params`. `fire` reads `window` (the last `lookbackSeconds`) and `baseline` (the `baselineSeconds` before it), each with `total`, `matched`, `rate` and `avg.duration`, and `params`. Put thresholds in `params`, each with a type (`number`, `percent` as a fraction, `text`, `list`): for example `fire` `window.rate >= params.minRate && window.total >= params.minExecutions` with `minRate` percent 0.2 and `minExecutions` number 10. Set `workflowId` for one workflow, or omit it for every workflow. Run `insight_rule_validate` first: it checks the rule and shows on which of the last 14 days it would have fired. The rule opens at /insights?tab=rules&rule=<id>.",
2595
2595
  method: "POST",
2596
2596
  path: "/astro/v2/insight-rules",
2597
2597
  args: [],
@@ -2628,20 +2628,35 @@ var COMMANDS = [
2628
2628
  type: "string",
2629
2629
  required: true
2630
2630
  },
2631
+ {
2632
+ name: "fire",
2633
+ flag: "fire",
2634
+ type: "string",
2635
+ required: true,
2636
+ description: "CEL over `window`, `baseline` and `params`. When the rule fires."
2637
+ },
2638
+ {
2639
+ name: "lookbackSeconds",
2640
+ flag: "lookback-seconds",
2641
+ type: "integer",
2642
+ required: true,
2643
+ description: "How far back `window` reaches, in seconds."
2644
+ },
2645
+ {
2646
+ name: "baselineSeconds",
2647
+ flag: "baseline-seconds",
2648
+ type: "integer",
2649
+ required: false,
2650
+ description: "How far back `baseline` reaches before the window, in seconds. 0 leaves `baseline` empty."
2651
+ },
2631
2652
  {
2632
2653
  name: "params",
2633
2654
  flag: "params",
2634
2655
  type: "json",
2635
2656
  required: false,
2657
+ description: "The values `match` and `fire` read as `params.<name>`, each with its type.",
2636
2658
  record: "json"
2637
2659
  },
2638
- {
2639
- name: "fire",
2640
- flag: "fire",
2641
- type: "json",
2642
- required: true,
2643
- description: "When a rule fires, discriminated by `pattern`."
2644
- },
2645
2660
  {
2646
2661
  name: "enabled",
2647
2662
  flag: "enabled",
@@ -2698,7 +2713,7 @@ var COMMANDS = [
2698
2713
  command: "insight-rule list",
2699
2714
  tool: "insight_rules_list",
2700
2715
  title: "List insight rules",
2701
- description: "List an organization's insight rules. A rule watches finished executions: `match` is a CEL expression that picks the executions that count, and `fire` says how many must count before Astro investigates and records an insight. A rule with `presetKey` is maintained by Asteroid.",
2716
+ description: "List an organization's insight rules. A rule watches finished executions: `match` is a CEL expression that picks the executions that count, and `fire`, also CEL, says when Astro investigates and records an insight. A rule with `presetKey` is maintained by Asteroid.",
2702
2717
  method: "GET",
2703
2718
  path: "/astro/v2/insight-rules",
2704
2719
  args: [],
@@ -2724,7 +2739,7 @@ var COMMANDS = [
2724
2739
  command: "insight-rule update",
2725
2740
  tool: "insight_rule_update",
2726
2741
  title: "Update insight rule",
2727
- description: "Change an insight rule. Send only the fields to change. A rule with `presetKey` takes every field but `match`. Run `insight_rule_validate` before you change `match` or `fire`.",
2742
+ description: "Change an insight rule. Send only the fields to change. A rule with `presetKey` keeps its `match`, its `fire` and its params' names and types. Run `insight_rule_validate` before you change `match` or `fire`.",
2728
2743
  method: "PATCH",
2729
2744
  path: "/astro/v2/insight-rules/{ruleId}",
2730
2745
  args: [
@@ -2762,18 +2777,33 @@ var COMMANDS = [
2762
2777
  required: false
2763
2778
  },
2764
2779
  {
2765
- name: "params",
2766
- flag: "params",
2767
- type: "json",
2780
+ name: "fire",
2781
+ flag: "fire",
2782
+ type: "string",
2768
2783
  required: false,
2769
- record: "json"
2784
+ description: "CEL over `window`, `baseline` and `params`. When the rule fires."
2770
2785
  },
2771
2786
  {
2772
- name: "fire",
2773
- flag: "fire",
2787
+ name: "lookbackSeconds",
2788
+ flag: "lookback-seconds",
2789
+ type: "integer",
2790
+ required: false,
2791
+ description: "How far back `window` reaches, in seconds."
2792
+ },
2793
+ {
2794
+ name: "baselineSeconds",
2795
+ flag: "baseline-seconds",
2796
+ type: "integer",
2797
+ required: false,
2798
+ description: "How far back `baseline` reaches before the window, in seconds. 0 leaves `baseline` empty."
2799
+ },
2800
+ {
2801
+ name: "params",
2802
+ flag: "params",
2774
2803
  type: "json",
2775
2804
  required: false,
2776
- description: "When a rule fires, discriminated by `pattern`."
2805
+ description: "The values `match` and `fire` read as `params.<name>`, each with its type.",
2806
+ record: "json"
2777
2807
  },
2778
2808
  {
2779
2809
  name: "enabled",
@@ -2790,7 +2820,7 @@ var COMMANDS = [
2790
2820
  command: "insight-rule validate",
2791
2821
  tool: "insight_rule_validate",
2792
2822
  title: "Validate insight rule",
2793
- description: "Check an insight rule before it is saved, and test it against the last 14 days of executions. `valid` is false with an `error` when `match` does not parse, reads a name or field that does not exist, reads a param that `params` lacks, or when `fire` is out of range. When valid, `days` gives each day's finished executions, how many `match` counts, and whether the rule would have fired. Saves nothing.",
2823
+ description: "Check an insight rule before it is saved, and test it against the last 14 days of executions. `valid` is false with an `error` when `match` or `fire` does not parse, reads a name or field that does not exist, reads a param that `params` lacks, or does not give true or false, or when a param's value does not fit its type. When valid, `days` gives each day's finished executions, how many `match` counts, and whether the rule would have fired. Saves nothing.",
2794
2824
  method: "POST",
2795
2825
  path: "/astro/v2/insight-rules/validate",
2796
2826
  args: [],
@@ -2815,19 +2845,34 @@ var COMMANDS = [
2815
2845
  type: "string",
2816
2846
  required: true
2817
2847
  },
2848
+ {
2849
+ name: "fire",
2850
+ flag: "fire",
2851
+ type: "string",
2852
+ required: true,
2853
+ description: "CEL over `window`, `baseline` and `params`. When the rule fires."
2854
+ },
2855
+ {
2856
+ name: "lookbackSeconds",
2857
+ flag: "lookback-seconds",
2858
+ type: "integer",
2859
+ required: true,
2860
+ description: "How far back `window` reaches, in seconds."
2861
+ },
2862
+ {
2863
+ name: "baselineSeconds",
2864
+ flag: "baseline-seconds",
2865
+ type: "integer",
2866
+ required: false,
2867
+ description: "How far back `baseline` reaches before the window, in seconds. 0 leaves `baseline` empty."
2868
+ },
2818
2869
  {
2819
2870
  name: "params",
2820
2871
  flag: "params",
2821
2872
  type: "json",
2822
2873
  required: false,
2874
+ description: "The values `match` and `fire` read as `params.<name>`, each with its type.",
2823
2875
  record: "json"
2824
- },
2825
- {
2826
- name: "fire",
2827
- flag: "fire",
2828
- type: "json",
2829
- required: true,
2830
- description: "When a rule fires, discriminated by `pattern`."
2831
2876
  }
2832
2877
  ],
2833
2878
  files: [],
@@ -5262,7 +5307,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
5262
5307
  name: "name",
5263
5308
  flag: "name",
5264
5309
  type: "string",
5265
- required: true
5310
+ required: true,
5311
+ description: "A skill name: kebab-case, lowercase letters, digits and hyphens, starting with a letter or digit, at most 64 characters."
5266
5312
  }
5267
5313
  ],
5268
5314
  query: [
@@ -8832,7 +8878,7 @@ var ApiError = class extends Error {
8832
8878
  status;
8833
8879
  body;
8834
8880
  };
8835
- var VERSION = "1.9.547";
8881
+ var VERSION = "1.9.555";
8836
8882
  function problem(status, body, fallback) {
8837
8883
  if (body && typeof body === "object") {
8838
8884
  const record2 = body;
package/dist/core.js CHANGED
@@ -944,7 +944,7 @@ var COMMANDS = [
944
944
  command: "custom-environment delete",
945
945
  tool: "custom_environment_delete",
946
946
  title: "Delete custom environment",
947
- description: "Delete a custom environment. Refused while a workflow's published or head version selects it through `settings.default_environment_id`: the environment's `usedBy` lists them, and the error names up to five and counts the rest. Point them at another environment first. Also refused while warm members exist: set `warmPool.targetSize` to 0 first and wait for them to retire.",
947
+ description: "Delete a custom environment. Refused while a workflow's published or head version selects it through `settings.default_environment_id` (the environment's `usedBy`), while a schedule names it in `customEnvironmentId`, enabled or not (`usedBySchedules`), or while a scheduled execution or batch item that names it can still start: pending, awaiting capacity, or in a paused batch (`usedByScheduledExecutions`). The error names up to five of each kind and counts the rest. Point them at another environment, or cancel the scheduled executions, first. Also refused while warm members exist: set `warmPool.targetSize` to 0 first and wait for them to retire.",
948
948
  method: "DELETE",
949
949
  path: "/agents/v2/custom-environments/{customEnvironmentId}",
950
950
  args: [
@@ -2612,7 +2612,7 @@ var COMMANDS = [
2612
2612
  command: "insight-rule create",
2613
2613
  tool: "insight_rule_create",
2614
2614
  title: "Create insight rule",
2615
- description: "Create an insight rule. `match` is a CEL expression over one finished execution, read as `execution` (`status`, `outcome`, `outputNodeId`, `cancelReason`, `duration` in seconds, `scriptFailures` with `nodeId`, `nodeName`, `scriptFilepath`, `actionId`, `error`) and the rule's `params`. `fire` is one of three patterns: `rate` (a share of executions), `count` (a number of executions) or `trend` (a rise against the period before). Set `workflowId` for one workflow, or omit it for every workflow. Run `insight_rule_validate` first: it checks the rule and shows on which of the last 14 days it would have fired. The rule opens at /insights?tab=rules&rule=<id>.",
2615
+ description: "Create an insight rule. `match` is a CEL expression over one finished execution, read as `execution` (`status`, `outcome`, `outputNodeId`, `cancelReason`, `duration` in seconds, `scriptFailures` with `nodeId`, `nodeName`, `scriptFilepath`, `actionId`, `error`) and `params`. `fire` reads `window` (the last `lookbackSeconds`) and `baseline` (the `baselineSeconds` before it), each with `total`, `matched`, `rate` and `avg.duration`, and `params`. Put thresholds in `params`, each with a type (`number`, `percent` as a fraction, `text`, `list`): for example `fire` `window.rate >= params.minRate && window.total >= params.minExecutions` with `minRate` percent 0.2 and `minExecutions` number 10. Set `workflowId` for one workflow, or omit it for every workflow. Run `insight_rule_validate` first: it checks the rule and shows on which of the last 14 days it would have fired. The rule opens at /insights?tab=rules&rule=<id>.",
2616
2616
  method: "POST",
2617
2617
  path: "/astro/v2/insight-rules",
2618
2618
  args: [],
@@ -2649,20 +2649,35 @@ var COMMANDS = [
2649
2649
  type: "string",
2650
2650
  required: true
2651
2651
  },
2652
+ {
2653
+ name: "fire",
2654
+ flag: "fire",
2655
+ type: "string",
2656
+ required: true,
2657
+ description: "CEL over `window`, `baseline` and `params`. When the rule fires."
2658
+ },
2659
+ {
2660
+ name: "lookbackSeconds",
2661
+ flag: "lookback-seconds",
2662
+ type: "integer",
2663
+ required: true,
2664
+ description: "How far back `window` reaches, in seconds."
2665
+ },
2666
+ {
2667
+ name: "baselineSeconds",
2668
+ flag: "baseline-seconds",
2669
+ type: "integer",
2670
+ required: false,
2671
+ description: "How far back `baseline` reaches before the window, in seconds. 0 leaves `baseline` empty."
2672
+ },
2652
2673
  {
2653
2674
  name: "params",
2654
2675
  flag: "params",
2655
2676
  type: "json",
2656
2677
  required: false,
2678
+ description: "The values `match` and `fire` read as `params.<name>`, each with its type.",
2657
2679
  record: "json"
2658
2680
  },
2659
- {
2660
- name: "fire",
2661
- flag: "fire",
2662
- type: "json",
2663
- required: true,
2664
- description: "When a rule fires, discriminated by `pattern`."
2665
- },
2666
2681
  {
2667
2682
  name: "enabled",
2668
2683
  flag: "enabled",
@@ -2719,7 +2734,7 @@ var COMMANDS = [
2719
2734
  command: "insight-rule list",
2720
2735
  tool: "insight_rules_list",
2721
2736
  title: "List insight rules",
2722
- description: "List an organization's insight rules. A rule watches finished executions: `match` is a CEL expression that picks the executions that count, and `fire` says how many must count before Astro investigates and records an insight. A rule with `presetKey` is maintained by Asteroid.",
2737
+ description: "List an organization's insight rules. A rule watches finished executions: `match` is a CEL expression that picks the executions that count, and `fire`, also CEL, says when Astro investigates and records an insight. A rule with `presetKey` is maintained by Asteroid.",
2723
2738
  method: "GET",
2724
2739
  path: "/astro/v2/insight-rules",
2725
2740
  args: [],
@@ -2745,7 +2760,7 @@ var COMMANDS = [
2745
2760
  command: "insight-rule update",
2746
2761
  tool: "insight_rule_update",
2747
2762
  title: "Update insight rule",
2748
- description: "Change an insight rule. Send only the fields to change. A rule with `presetKey` takes every field but `match`. Run `insight_rule_validate` before you change `match` or `fire`.",
2763
+ description: "Change an insight rule. Send only the fields to change. A rule with `presetKey` keeps its `match`, its `fire` and its params' names and types. Run `insight_rule_validate` before you change `match` or `fire`.",
2749
2764
  method: "PATCH",
2750
2765
  path: "/astro/v2/insight-rules/{ruleId}",
2751
2766
  args: [
@@ -2783,18 +2798,33 @@ var COMMANDS = [
2783
2798
  required: false
2784
2799
  },
2785
2800
  {
2786
- name: "params",
2787
- flag: "params",
2788
- type: "json",
2801
+ name: "fire",
2802
+ flag: "fire",
2803
+ type: "string",
2789
2804
  required: false,
2790
- record: "json"
2805
+ description: "CEL over `window`, `baseline` and `params`. When the rule fires."
2791
2806
  },
2792
2807
  {
2793
- name: "fire",
2794
- flag: "fire",
2808
+ name: "lookbackSeconds",
2809
+ flag: "lookback-seconds",
2810
+ type: "integer",
2811
+ required: false,
2812
+ description: "How far back `window` reaches, in seconds."
2813
+ },
2814
+ {
2815
+ name: "baselineSeconds",
2816
+ flag: "baseline-seconds",
2817
+ type: "integer",
2818
+ required: false,
2819
+ description: "How far back `baseline` reaches before the window, in seconds. 0 leaves `baseline` empty."
2820
+ },
2821
+ {
2822
+ name: "params",
2823
+ flag: "params",
2795
2824
  type: "json",
2796
2825
  required: false,
2797
- description: "When a rule fires, discriminated by `pattern`."
2826
+ description: "The values `match` and `fire` read as `params.<name>`, each with its type.",
2827
+ record: "json"
2798
2828
  },
2799
2829
  {
2800
2830
  name: "enabled",
@@ -2811,7 +2841,7 @@ var COMMANDS = [
2811
2841
  command: "insight-rule validate",
2812
2842
  tool: "insight_rule_validate",
2813
2843
  title: "Validate insight rule",
2814
- description: "Check an insight rule before it is saved, and test it against the last 14 days of executions. `valid` is false with an `error` when `match` does not parse, reads a name or field that does not exist, reads a param that `params` lacks, or when `fire` is out of range. When valid, `days` gives each day's finished executions, how many `match` counts, and whether the rule would have fired. Saves nothing.",
2844
+ description: "Check an insight rule before it is saved, and test it against the last 14 days of executions. `valid` is false with an `error` when `match` or `fire` does not parse, reads a name or field that does not exist, reads a param that `params` lacks, or does not give true or false, or when a param's value does not fit its type. When valid, `days` gives each day's finished executions, how many `match` counts, and whether the rule would have fired. Saves nothing.",
2815
2845
  method: "POST",
2816
2846
  path: "/astro/v2/insight-rules/validate",
2817
2847
  args: [],
@@ -2836,19 +2866,34 @@ var COMMANDS = [
2836
2866
  type: "string",
2837
2867
  required: true
2838
2868
  },
2869
+ {
2870
+ name: "fire",
2871
+ flag: "fire",
2872
+ type: "string",
2873
+ required: true,
2874
+ description: "CEL over `window`, `baseline` and `params`. When the rule fires."
2875
+ },
2876
+ {
2877
+ name: "lookbackSeconds",
2878
+ flag: "lookback-seconds",
2879
+ type: "integer",
2880
+ required: true,
2881
+ description: "How far back `window` reaches, in seconds."
2882
+ },
2883
+ {
2884
+ name: "baselineSeconds",
2885
+ flag: "baseline-seconds",
2886
+ type: "integer",
2887
+ required: false,
2888
+ description: "How far back `baseline` reaches before the window, in seconds. 0 leaves `baseline` empty."
2889
+ },
2839
2890
  {
2840
2891
  name: "params",
2841
2892
  flag: "params",
2842
2893
  type: "json",
2843
2894
  required: false,
2895
+ description: "The values `match` and `fire` read as `params.<name>`, each with its type.",
2844
2896
  record: "json"
2845
- },
2846
- {
2847
- name: "fire",
2848
- flag: "fire",
2849
- type: "json",
2850
- required: true,
2851
- description: "When a rule fires, discriminated by `pattern`."
2852
2897
  }
2853
2898
  ],
2854
2899
  files: [],
@@ -5283,7 +5328,8 @@ Omitting customEnvironmentId on its own means "leave unchanged".`
5283
5328
  name: "name",
5284
5329
  flag: "name",
5285
5330
  type: "string",
5286
- required: true
5331
+ required: true,
5332
+ description: "A skill name: kebab-case, lowercase letters, digits and hyphens, starting with a letter or digit, at most 64 characters."
5287
5333
  }
5288
5334
  ],
5289
5335
  query: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteroidai/cli",
3
- "version": "1.9.547",
3
+ "version": "1.9.555",
4
4
  "description": "The asteroid command-line interface for the Asteroid platform.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -35,8 +35,8 @@
35
35
  "tsx": "^4.23.12",
36
36
  "typescript": "5.9.3",
37
37
  "vitest": "^4.1.11",
38
- "@workspace/typescript-config": "0.0.0",
39
- "@asteroid/workflow-files": "0.1.0"
38
+ "@asteroid/workflow-files": "0.1.0",
39
+ "@workspace/typescript-config": "0.0.0"
40
40
  },
41
41
  "scripts": {
42
42
  "generate": "tsx scripts/generate.ts && pnpm exec oxfmt src/generated/commands.ts",