anbaric 1.66.1 → 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
|
-
>
|
|
118
|
-
>
|
|
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:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anbaric",
|
|
3
|
-
"version": "1.
|
|
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.
|
|
28
|
-
"anbaric-data-store": "^1.
|
|
29
|
-
"anbaric-state-machine": "^1.
|
|
30
|
-
"anbaric-tsapi": "^1.
|
|
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
|
}
|