anbaric 1.66.0 → 1.67.0

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/docs/api/cli.md CHANGED
@@ -62,6 +62,18 @@ anbaric app status link-media-brief # a different app, from anywhere
62
62
  | `anbaric jobs kill <job-id>` | Kill a job so it stops progressing. |
63
63
  | `anbaric jobs kill-old <age>` | Kill jobs not updated within `<age>` (e.g. `24h`, `7d`; units `s`/`m`/`h`/`d`/`w`). Prompts unless `--yes`. |
64
64
 
65
+ ## Secrets
66
+
67
+ Scoped to the app you are in (or `--app <name>`). Values go in and never come
68
+ out: the platform refuses to read a secret back to a person, so the way to check
69
+ one is to set it again.
70
+
71
+ | Command | Purpose |
72
+ | --- | --- |
73
+ | `anbaric secrets list` | The names of the app's secrets. |
74
+ | `anbaric secrets set <name>` | Set or replace a secret. The value is prompted for without echo, or read whole from stdin (`echo "$KEY" \| anbaric secrets set openai-key`) — never passed on the command line. |
75
+ | `anbaric secrets delete <name>` | Remove a secret. |
76
+
65
77
  ## Flags
66
78
 
67
79
  Every command accepts these; they supply the answers a prompt would otherwise
@@ -114,8 +114,11 @@ For a provider none of them covers, implement an `Agent.Client` (a class with a
114
114
  `generate(request)` method) and pass it to a plain `Agent`. See the [API
115
115
  reference](../api/actors-and-agents.md#agents-and-ai) for the client contract.
116
116
 
117
- > Keep model API keys in the [secret store](documents-and-secrets.md), not in
118
- > source. Locally you can read them from the environment as above.
117
+ > Read model API keys from the [secret store](documents-and-secrets.md) rather
118
+ > than the environment directly - `apiKey: await secrets.retrieve("openai-key", actor)`.
119
+ > Locally that falls back to `OPENAI_KEY` in your shell, so the examples above
120
+ > run on a laptop as written; deployed, set it once with
121
+ > `anbaric secrets set openai-key` and the same line reads the real store.
119
122
 
120
123
  ## Next
121
124
 
@@ -58,6 +58,19 @@ Use the secret store for third-party API keys and other credentials your app
58
58
  needs at runtime. Retrieving an unknown name throws `No secret found with name
59
59
  "..."`.
60
60
 
61
+ **Locally, the environment is the backstop.** With no platform behind it, a
62
+ secret that was never written resolves from the environment under its name
63
+ upper-cased: `retrieve("openai-key")` reads `OPENAI_KEY`, `retrieve("stripe.secret")`
64
+ reads `STRIPE_SECRET`. So the line that reads a key from the store on the
65
+ platform reads it from a shell variable on your laptop, unchanged.
66
+
67
+ **Deployed, you set secrets once and the app reads them.** There is no
68
+ environment fallback on the platform. Set a secret from the app's directory with
69
+ `anbaric secrets set openai-key` (the value is prompted for, or piped on stdin -
70
+ never on the command line), from the console's **Secrets** page, or with the
71
+ `anbaric_secret_set` tool in Claude Code. Values can be set and replaced but
72
+ never read back: `anbaric secrets list` and the console show names only.
73
+
61
74
  ## Choosing an implementation
62
75
 
63
76
  You don't — the factories do, from the environment:
@@ -59,7 +59,18 @@ foot of the page or the bottom of the nav. It's an attribution, not a feature:
59
59
  small type, a muted tint, the ident (its Asriel Ink is near enough black) at
60
60
  text height, and nothing that draws the eye away from the app's own UI.
61
61
 
62
- With the design system, it's one component:
62
+ With the design system's left rail you get it for free: `AppNav` **without an
63
+ `account`** is the app variant, and puts the attribution at the foot of the rail.
64
+ Don't pass an account in an app — the account menu is the console's; an app has
65
+ no identity to show there and ends up displaying raw OAuth ids and empty menus.
66
+
67
+ ```tsx
68
+ import { AppNav } from '@anbaric/design-system/components/AppNav'
69
+
70
+ <AppNav items={[{ label: 'Orders', value: 'orders', icon: 'receipt_long' }]} active={page} onChange={setPage} />
71
+ ```
72
+
73
+ Without the rail, it's one component at the foot of the page:
63
74
 
64
75
  ```tsx
65
76
  import { BuiltWithAnbaric } from '@anbaric/design-system/components/BuiltWithAnbaric'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anbaric",
3
- "version": "1.66.0",
3
+ "version": "1.67.0",
4
4
  "description": "Everything needed to write an Anbaric app: state machines, jobs, document and secret stores, local in-memory implementations and the Anbaric Cloud clients",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,9 +24,9 @@
24
24
  "prepublishOnly": "npm run build"
25
25
  },
26
26
  "dependencies": {
27
- "anbaric-impl-cloud": "^1.66.0",
28
- "anbaric-data-store": "^1.66.0",
29
- "anbaric-state-machine": "^1.66.0",
30
- "anbaric-tsapi": "^1.66.0"
27
+ "anbaric-impl-cloud": "^1.67.0",
28
+ "anbaric-data-store": "^1.67.0",
29
+ "anbaric-state-machine": "^1.67.0",
30
+ "anbaric-tsapi": "^1.67.0"
31
31
  }
32
32
  }