@rizom/ops 0.2.0-alpha.108 → 0.2.0-alpha.109
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/dist/brains-ops.js +111 -108
- package/dist/index.js +111 -108
- package/dist/load-registry.d.ts +4 -0
- package/dist/schema.d.ts +13 -0
- package/dist/secrets-encrypt.d.ts +3 -0
- package/package.json +1 -1
- package/templates/rover-pilot/.env.schema +5 -0
- package/templates/rover-pilot/deploy/scripts/decrypt-user-secrets.ts +1 -0
- package/templates/rover-pilot/docs/onboarding-checklist.md +1 -0
- package/templates/rover-pilot/docs/operator-playbook.md +30 -0
package/dist/load-registry.d.ts
CHANGED
|
@@ -32,6 +32,9 @@ export interface ResolvedSetupDelivery {
|
|
|
32
32
|
delivery: "email";
|
|
33
33
|
email: string;
|
|
34
34
|
}
|
|
35
|
+
export interface ResolvedAtprotoConfig {
|
|
36
|
+
identifier: string;
|
|
37
|
+
}
|
|
35
38
|
export interface ResolvedUserIdentity {
|
|
36
39
|
handle: string;
|
|
37
40
|
cohort: string;
|
|
@@ -45,6 +48,7 @@ export interface ResolvedUserIdentity {
|
|
|
45
48
|
effectiveAiApiKey: string;
|
|
46
49
|
effectiveGitSyncToken: string;
|
|
47
50
|
setup?: ResolvedSetupDelivery;
|
|
51
|
+
atproto?: ResolvedAtprotoConfig;
|
|
48
52
|
anchorProfile: ResolvedAnchorProfile;
|
|
49
53
|
snapshotStatus: SnapshotStatus;
|
|
50
54
|
}
|
package/dist/schema.d.ts
CHANGED
|
@@ -65,6 +65,13 @@ export declare const userSchema: z.ZodObject<{
|
|
|
65
65
|
email: string;
|
|
66
66
|
delivery: "email";
|
|
67
67
|
}>>;
|
|
68
|
+
atproto: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
identifier: z.ZodString;
|
|
70
|
+
}, "strict", z.ZodTypeAny, {
|
|
71
|
+
identifier: string;
|
|
72
|
+
}, {
|
|
73
|
+
identifier: string;
|
|
74
|
+
}>>;
|
|
68
75
|
anchorProfile: z.ZodOptional<z.ZodObject<{
|
|
69
76
|
name: z.ZodOptional<z.ZodString>;
|
|
70
77
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -119,6 +126,9 @@ export declare const userSchema: z.ZodObject<{
|
|
|
119
126
|
email: string;
|
|
120
127
|
delivery: "email";
|
|
121
128
|
} | undefined;
|
|
129
|
+
atproto?: {
|
|
130
|
+
identifier: string;
|
|
131
|
+
} | undefined;
|
|
122
132
|
anchorProfile?: {
|
|
123
133
|
name?: string | undefined;
|
|
124
134
|
email?: string | undefined;
|
|
@@ -143,6 +153,9 @@ export declare const userSchema: z.ZodObject<{
|
|
|
143
153
|
email: string;
|
|
144
154
|
delivery: "email";
|
|
145
155
|
} | undefined;
|
|
156
|
+
atproto?: {
|
|
157
|
+
identifier: string;
|
|
158
|
+
} | undefined;
|
|
146
159
|
anchorProfile?: {
|
|
147
160
|
name?: string | undefined;
|
|
148
161
|
email?: string | undefined;
|
|
@@ -3,14 +3,17 @@ declare const encryptedUserSecretsSchema: z.ZodObject<{
|
|
|
3
3
|
gitSyncToken: z.ZodOptional<z.ZodString>;
|
|
4
4
|
discordBotToken: z.ZodOptional<z.ZodString>;
|
|
5
5
|
aiApiKey: z.ZodOptional<z.ZodString>;
|
|
6
|
+
atprotoAppPassword: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, "strict", z.ZodTypeAny, {
|
|
7
8
|
aiApiKey?: string | undefined;
|
|
8
9
|
gitSyncToken?: string | undefined;
|
|
9
10
|
discordBotToken?: string | undefined;
|
|
11
|
+
atprotoAppPassword?: string | undefined;
|
|
10
12
|
}, {
|
|
11
13
|
aiApiKey?: string | undefined;
|
|
12
14
|
gitSyncToken?: string | undefined;
|
|
13
15
|
discordBotToken?: string | undefined;
|
|
16
|
+
atprotoAppPassword?: string | undefined;
|
|
14
17
|
}>;
|
|
15
18
|
export type EncryptedUserSecrets = z.infer<typeof encryptedUserSecretsSchema>;
|
|
16
19
|
export interface SecretsEncryptOptions {
|
package/package.json
CHANGED
|
@@ -25,6 +25,11 @@ CONTENT_REPO_ADMIN_TOKEN=
|
|
|
25
25
|
# @sensitive
|
|
26
26
|
DISCORD_BOT_TOKEN=
|
|
27
27
|
|
|
28
|
+
# AT Protocol publishing/discovery (optional, per-user)
|
|
29
|
+
# Comes from the decrypted users/<handle>.secrets.yaml.age file when configured.
|
|
30
|
+
# @sensitive
|
|
31
|
+
ATPROTO_APP_PASSWORD=
|
|
32
|
+
|
|
28
33
|
# Setup email delivery (optional, shared)
|
|
29
34
|
# Used when a user file declares setup.delivery: email.
|
|
30
35
|
# @sensitive
|
|
@@ -21,6 +21,7 @@ const pilot = parseFlatYaml(readFileSync("pilot.yaml", "utf8"));
|
|
|
21
21
|
writeGitHubEnv("AI_API_KEY", secrets["aiApiKey"] ?? "");
|
|
22
22
|
writeGitHubEnv("GIT_SYNC_TOKEN", secrets["gitSyncToken"] ?? "");
|
|
23
23
|
writeGitHubEnv("DISCORD_BOT_TOKEN", secrets["discordBotToken"] ?? "");
|
|
24
|
+
writeGitHubEnv("ATPROTO_APP_PASSWORD", secrets["atprotoAppPassword"] ?? "");
|
|
24
25
|
|
|
25
26
|
writeGitHubOutput(
|
|
26
27
|
"shared_ai_api_key_secret_name",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
- the command creates `users/<handle>.yaml`, `users/<handle>.secrets.yaml`, and the cohort membership without duplicating existing entries.
|
|
14
14
|
5. Edit the generated user file if the anchor profile needs richer metadata.
|
|
15
15
|
- For browser/CMS-first onboarding, add `setup.delivery: email` and `setup.email` to the user file.
|
|
16
|
+
- For ATProto publishing, add `atproto.identifier` to the user file; put only `atprotoAppPassword` in the per-user secrets file.
|
|
16
17
|
- Ensure `SETUP_EMAIL_API_KEY` and `SETUP_EMAIL_FROM` exist as GitHub Secrets before deploying any email-setup user.
|
|
17
18
|
6. Run `bunx brains-ops render <repo>`.
|
|
18
19
|
7. Run `bunx brains-ops ssh-key:bootstrap <repo> --push-to gh`.
|
|
@@ -151,6 +151,36 @@ Notes:
|
|
|
151
151
|
- The auth service owns setup email dedupe. It should not resend for the same persisted setup token after restart, but should retry failed delivery and resend after token rotation.
|
|
152
152
|
- `SETUP_EMAIL_FROM` is not marked required because fleets without email setup can omit it, but it is required for users with `setup.delivery: email`.
|
|
153
153
|
|
|
154
|
+
## AT Protocol smoke/config checklist
|
|
155
|
+
|
|
156
|
+
Use this when enabling AT Protocol publishing for a single pilot user.
|
|
157
|
+
|
|
158
|
+
1. Add the public PDS identifier to the user file:
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
atproto:
|
|
162
|
+
identifier: rizom-test.bsky.social
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
2. Put the app password in `users/<handle>.secrets.yaml`:
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
atprotoAppPassword: <app-password>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
3. Encrypt the per-user secret payload:
|
|
172
|
+
- `bunx brains-ops secrets:encrypt . <handle>`
|
|
173
|
+
4. Reconcile/deploy the user or cohort:
|
|
174
|
+
- `bunx brains-ops onboard . <handle>`
|
|
175
|
+
- or `bunx brains-ops reconcile-cohort . <cohort>`
|
|
176
|
+
5. Verify the generated `users/<handle>/brain.yaml` contains `plugins.atproto.identifier` and `appPassword: ${ATPROTO_APP_PASSWORD}`.
|
|
177
|
+
|
|
178
|
+
Notes:
|
|
179
|
+
|
|
180
|
+
- The ATProto identifier is public instance config and belongs in `users/<handle>.yaml`.
|
|
181
|
+
- The ATProto app password is secret and belongs only in the encrypted per-user secret payload.
|
|
182
|
+
- For smoke deployments, pin only the smoke cohort/user to the released brain version that contains ATProto support.
|
|
183
|
+
|
|
154
184
|
## Discord bot token checklist
|
|
155
185
|
|
|
156
186
|
Use this when enabling Discord for a pilot user.
|