impel-cli 0.17.11 → 0.17.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impel-cli",
3
- "version": "0.17.11",
3
+ "version": "0.17.12",
4
4
  "description": "Prepare isolated Claude and Codex workspaces for every accessible Impel tenant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -6,6 +6,7 @@ import {
6
6
  ensureTenantSelection,
7
7
  PAT_SCOPE_TASKS,
8
8
  PRODUCT_ACCESS_GATEWAY,
9
+ PRODUCT_ACCESS_IDENTITY,
9
10
  PRODUCT_ACCESS_WORKSPACE,
10
11
  } from "../tenants.js";
11
12
 
@@ -85,6 +86,9 @@ async function requestJson({ flags, path, query, method = "GET", body }) {
85
86
  if (selected.productAccess === PRODUCT_ACCESS_GATEWAY) {
86
87
  fail("impel tasks: Gateway members do not have workspace task access.");
87
88
  }
89
+ if (selected.productAccess === PRODUCT_ACCESS_IDENTITY) {
90
+ fail("impel tasks: Identity members do not have workspace task access.");
91
+ }
88
92
  if (selected.productAccess !== PRODUCT_ACCESS_WORKSPACE) {
89
93
  fail("impel tasks: the control plane did not return a live Workspace entitlement; retry after it is upgraded.");
90
94
  }
package/src/tenants.js CHANGED
@@ -7,11 +7,19 @@ import {
7
7
 
8
8
  export const TENANT_CREDENTIAL_PREFIX = "impel_tenant_";
9
9
  export const PRODUCT_ACCESS_WORKSPACE = "workspace";
10
+ export const PRODUCT_ACCESS_IDENTITY = "identity";
10
11
  export const PRODUCT_ACCESS_GATEWAY = "gateway";
11
12
  export const PAT_SCOPE_CLAUDE = "claude-code-gateway";
12
13
  export const PAT_SCOPE_CODEX = "codex-gateway";
13
14
  export const PAT_SCOPE_TASKS = "tasks";
14
- const PRODUCT_ACCESS_VALUES = new Set([PRODUCT_ACCESS_WORKSPACE, PRODUCT_ACCESS_GATEWAY]);
15
+ // Additive entitlement hierarchy: Gateway < Identity + Gateway < Workspace.
16
+ // Identity and Gateway members share the same gateway scopes and neither can
17
+ // authorize workspace tasks; only Workspace members do.
18
+ const PRODUCT_ACCESS_VALUES = new Set([
19
+ PRODUCT_ACCESS_WORKSPACE,
20
+ PRODUCT_ACCESS_IDENTITY,
21
+ PRODUCT_ACCESS_GATEWAY,
22
+ ]);
15
23
  const PROVIDER_SCOPE = Object.freeze({ claude: PAT_SCOPE_CLAUDE, codex: PAT_SCOPE_CODEX });
16
24
  const TENANT_ID_RE = /^[A-Za-z0-9_.-]{1,128}$/u;
17
25
  const PAT_SCOPE_RE = /^[a-z0-9][a-z0-9:._-]{0,63}$/u;
@@ -27,6 +35,7 @@ export function normalizeProductAccess(value, { allowMissing = false } = {}) {
27
35
 
28
36
  export function productAccessLabel(value) {
29
37
  if (value === PRODUCT_ACCESS_WORKSPACE) return "Workspace member";
38
+ if (value === PRODUCT_ACCESS_IDENTITY) return "Identity + Gateway member";
30
39
  if (value === PRODUCT_ACCESS_GATEWAY) return "Gateway member";
31
40
  return "Unknown";
32
41
  }