@roarkanalytics/cli 0.31.1 → 0.32.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.32.1](https://github.com/roarkhq/cli-roark-analytics/compare/v0.32.0...v0.32.1) (2026-09-30)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **auth:** `auth status` reports the project a user credential already falls back to ([#81](https://github.com/roarkhq/cli-roark-analytics/issues/81)) ([4274667](https://github.com/roarkhq/cli-roark-analytics/commit/427466763aac7cf8144c455d3a2c78c1ba91ae03))
9
+
10
+ ## [0.32.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.31.1...v0.32.0) (2026-09-29)
11
+
12
+
13
+ ### Features
14
+
15
+ * **cli:** cli update ([#79](https://github.com/roarkhq/cli-roark-analytics/issues/79)) ([9147caa](https://github.com/roarkhq/cli-roark-analytics/commit/9147caab0016324dd5307014257ca497e32aaaac))
16
+
3
17
  ## [0.31.1](https://github.com/roarkhq/cli-roark-analytics/compare/v0.31.0...v0.31.1) (2026-09-29)
4
18
 
5
19
 
package/README.md CHANGED
@@ -40,28 +40,6 @@ a stored or environment credential to it. Pass `--allow-project-base-url` (or se
40
40
  `ROARK_ALLOW_PROJECT_BASE_URL`) once you have read the file, or `--token` to send a
41
41
  different credential.
42
42
 
43
- ## Choose a project
44
-
45
- `auth login` gives you a credential that acts as you, and it can reach every project
46
- you belong to. So commands need to know which project they act on. The login writes
47
- the project you picked on the consent screen, and after that there is nothing to do:
48
-
49
- ```sh
50
- roark config set project <project-id> # change it
51
- roark config get project # see it
52
- roark agent list --project <id> # just this once
53
- export ROARK_PROJECT_ID="..." # or for a shell
54
- ```
55
-
56
- Precedence is the usual one: `--project`, then `ROARK_PROJECT_ID`, then `.roark.json`,
57
- then the user config. Committing `{"project": "..."}` in a repository's `.roark.json`
58
- is the intended way to pin a checkout to one project, and unlike `baseURL` it needs no
59
- opt-in: a project id chooses which of your own projects you act on, it cannot send your
60
- credential anywhere new.
61
-
62
- If you authenticate with a **project API key** instead, the key already names its
63
- project and all of this is ignored.
64
-
65
43
  ## Usage
66
44
 
67
45
  Commands read noun before verb, and the verb is one of `list`, `get`, `create`,
package/commands.js CHANGED
@@ -1796,7 +1796,7 @@ exports.COMMANDS = [
1796
1796
  httpMethod: 'post',
1797
1797
  httpPath: '/v1/config/apply',
1798
1798
  summary: 'Apply a config bundle',
1799
- description: 'Reconcile a config-as-code bundle into the project. Submit the full desired set of resources; resources already managed by config are updated, new ones created, and (unless prune is false) config-managed resources absent from the bundle are deleted. Identity is by name — no ids in the bundle.',
1799
+ description: 'Reconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped resources (agents, personas, flows, collectors, metrics, ...). With an ORGANIZATION API key, submit `kind: project` resources, each optionally carrying its members and its own nested `resources`. Submit the full desired set; managed resources are updated, new ones created, and (unless prune is false) managed resources absent from the bundle are deleted. Identity is by name.',
1800
1800
  positionals: [],
1801
1801
  flags: [
1802
1802
  {
@@ -1830,7 +1830,7 @@ exports.COMMANDS = [
1830
1830
  httpMethod: 'post',
1831
1831
  httpPath: '/v1/config/diff',
1832
1832
  summary: 'Diff a config bundle',
1833
- description: 'Dry run for a config-as-code apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Submit the full desired set of resources; identity is by name — no ids in the bundle. Run this before apply to preview what would change.',
1833
+ description: 'Dry run for an apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Works for both project and organization keys.',
1834
1834
  positionals: [],
1835
1835
  flags: [
1836
1836
  {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@roarkanalytics/cli",
3
- "version": "0.31.1",
3
+ "version": "0.32.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@roarkanalytics/cli",
9
- "version": "0.31.1",
9
+ "version": "0.32.1",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@roarkanalytics/sdk": "^4.15.0",
@@ -21,9 +21,9 @@
21
21
  }
22
22
  },
23
23
  "node_modules/@roarkanalytics/sdk": {
24
- "version": "4.15.0",
25
- "resolved": "https://registry.npmjs.org/@roarkanalytics/sdk/-/sdk-4.15.0.tgz",
26
- "integrity": "sha512-H5bHFILsMVMUG7+6yi3gO4JrAvvoFPLn82zZp0tS1A6UugH/hzQgwuMFSkjbJCl29p9GcVjAFhLDaZa7845gmA==",
24
+ "version": "4.18.0",
25
+ "resolved": "https://registry.npmjs.org/@roarkanalytics/sdk/-/sdk-4.18.0.tgz",
26
+ "integrity": "sha512-+s6s6Owxqe/Mvh6/7TkNbYcVtsrdjYYciRrpinTSURliSnM+T63XWZW0lkEuIvn4d+Y/BTbNDtRtP14aCpw72A==",
27
27
  "license": "Apache-2.0"
28
28
  },
29
29
  "node_modules/commander": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roarkanalytics/cli",
3
- "version": "0.31.1",
3
+ "version": "0.32.1",
4
4
  "description": "The official command line interface for the Roark API",
5
5
  "author": "Roark <james@roark.ai>",
6
6
  "type": "commonjs",
@@ -58,7 +58,12 @@ const describeCredential = async (clientFor) => {
58
58
  };
59
59
  try {
60
60
  const me = (await client.get(AUTH_DESCRIBE_PATH));
61
- return { kind: 'live', scope: me.data?.tokenScope, email: me.data?.user?.email ?? null };
61
+ return {
62
+ kind: 'live',
63
+ scope: me.data?.tokenScope,
64
+ email: me.data?.user?.email ?? null,
65
+ ...(me.data?.defaultProject?.id ? { defaultProject: me.data.defaultProject.id } : {}),
66
+ };
62
67
  }
63
68
  catch (error) {
64
69
  if (error.status !== 404)
@@ -275,10 +280,19 @@ const registerAuthCommands = (root, binaryName, clientFor) => {
275
280
  if (state.scope === 'USER') {
276
281
  // A user credential reaches every project you belong to, so which one it acts on is part
277
282
  // of the answer, not a detail.
283
+ //
284
+ // Three cases, not two. A locally configured project wins; failing that the credential's
285
+ // own default is what the API will use, and saying "commands will fail" there would be
286
+ // plainly wrong (they succeed). Only a credential with neither is actually stuck.
278
287
  const project = (0, config_1.loadConfig)().project;
279
- (0, output_1.write)((0, output_1.paint)(project ?
288
+ const message = project ?
280
289
  `Acting on project ${project}. Change it with \`${binaryName} config set project <id>\`.`
281
- : `No project selected: commands will fail until you set one with \`${binaryName} config set project <id>\`.`, 'dim', color), process.stderr);
290
+ : state.defaultProject ?
291
+ `Acting on project ${state.defaultProject}, the default stored on this credential. ` +
292
+ `Override it with \`${binaryName} config set project <id>\`.`
293
+ : `No project selected, and this credential has no default: project commands will fail until ` +
294
+ `you run \`${binaryName} config set project <id>\`. \`${binaryName} project list\` shows the ids.`;
295
+ (0, output_1.write)((0, output_1.paint)(message, 'dim', color), process.stderr);
282
296
  }
283
297
  }
284
298
  if (fromEnv && stored) {
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.31.1";
1
+ export declare const version = "0.32.1";
package/version.js CHANGED
@@ -10,4 +10,4 @@ exports.version = void 0;
10
10
  //
11
11
  // Do not edit: an edit here is overwritten, and the published number is whatever
12
12
  // package.json says.
13
- exports.version = '0.31.1'; // x-release-please-version
13
+ exports.version = '0.32.1'; // x-release-please-version