atris 3.56.2 → 3.56.3

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.
@@ -11,6 +11,15 @@ function isBoundBusinessWorkspace(cwd = process.cwd()) {
11
11
  && fs.existsSync(path.join(root, 'atris'));
12
12
  }
13
13
 
14
+ // A backend-provisioned agent workspace (personal cloud computer) carries a
15
+ // placed scoped key at .atris/agent-token.json. That key is an explicit grant
16
+ // scoped server-side, which is stronger than the --account opt-in flag, so the
17
+ // workspace counts as bound. Scratch folders never have a placed key.
18
+ function isProvisionedAgentWorkspace(cwd = process.cwd()) {
19
+ const root = path.resolve(cwd);
20
+ return fs.existsSync(path.join(root, '.atris', 'agent-token.json'));
21
+ }
22
+
14
23
  function isHelpArg(arg) {
15
24
  return arg === '--help' || arg === '-h' || arg === 'help';
16
25
  }
@@ -32,7 +41,7 @@ function requireAccountBound(args = [], options = {}) {
32
41
  if (list.some(isHelpArg)) {
33
42
  return { ok: true, args: list, help: true };
34
43
  }
35
- if (isBoundBusinessWorkspace(cwd)) {
44
+ if (isBoundBusinessWorkspace(cwd) || isProvisionedAgentWorkspace(cwd)) {
36
45
  return { ok: true, args: list.filter((arg) => arg !== '--account'), bound: true };
37
46
  }
38
47
  if (list.includes('--account')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atris",
3
- "version": "3.56.2",
3
+ "version": "3.56.3",
4
4
  "description": "you say what you want in plain words. atris builds it, checks it, and shows you proof.",
5
5
  "main": "bin/atris.js",
6
6
  "bin": {