@rizom/ops 0.2.0-alpha.22 → 0.2.0-alpha.221
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/README.md +3 -1
- package/dist/brains-ops.js +229 -283
- package/dist/cert-bootstrap.d.ts +3 -1
- package/dist/content-repo-ref.d.ts +10 -0
- package/dist/content-repo.d.ts +1 -0
- package/dist/deploy.js +99 -166
- package/dist/entries/deploy.d.ts +3 -2
- package/dist/images.d.ts +76 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +268 -281
- package/dist/load-registry.d.ts +25 -2
- package/dist/observed-status.d.ts +1 -1
- package/dist/origin-ca.d.ts +1 -1
- package/dist/parse-args.d.ts +3 -0
- package/dist/preview-domain.d.ts +9 -0
- package/dist/push-secrets.d.ts +2 -9
- package/dist/push-target.d.ts +1 -2
- package/dist/run-command.d.ts +1 -1
- package/dist/run-subprocess.d.ts +1 -6
- package/dist/schema.d.ts +64 -155
- package/dist/secrets-encrypt.d.ts +5 -13
- package/dist/ssh-key-bootstrap.d.ts +1 -26
- package/dist/user-add.d.ts +15 -0
- package/dist/verify-user.d.ts +19 -0
- package/package.json +45 -42
- package/templates/rover-pilot/.env.schema +17 -3
- package/templates/rover-pilot/.github/workflows/build.yml +64 -17
- package/templates/rover-pilot/.github/workflows/deploy.yml +128 -61
- package/templates/rover-pilot/.github/workflows/reconcile.yml +21 -1
- package/templates/rover-pilot/README.md +5 -3
- package/templates/rover-pilot/deploy/scripts/decrypt-user-secrets.ts +78 -24
- package/templates/rover-pilot/deploy/scripts/helpers.ts +3 -0
- package/templates/rover-pilot/deploy/scripts/resolve-deploy-handles.ts +12 -3
- package/templates/rover-pilot/deploy/scripts/resolve-missing-images.ts +13 -0
- package/templates/rover-pilot/deploy/scripts/resolve-user-config.ts +44 -9
- package/templates/rover-pilot/deploy/scripts/sync-content-repo.ts +51 -47
- package/templates/rover-pilot/deploy/scripts/update-dns.ts +14 -4
- package/templates/rover-pilot/deploy/scripts/validate-secrets.ts +1 -1
- package/templates/rover-pilot/docs/onboarding-checklist.md +33 -13
- package/templates/rover-pilot/docs/operator-playbook.md +183 -10
- package/templates/rover-pilot/docs/user-onboarding.md +67 -332
- package/templates/rover-pilot/pilot.yaml +1 -1
- package/templates/rover-pilot/.kamal/hooks/pre-deploy +0 -9
- package/templates/rover-pilot/deploy/Dockerfile +0 -30
- package/templates/rover-pilot/deploy/kamal/deploy.yml +0 -40
package/dist/load-registry.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export interface ResolvedCohort {
|
|
|
14
14
|
presetOverride?: PilotPreset;
|
|
15
15
|
aiApiKeyOverride?: string;
|
|
16
16
|
gitSyncTokenOverride?: string;
|
|
17
|
-
mcpAuthTokenOverride?: string;
|
|
18
17
|
}
|
|
19
18
|
export interface ResolvedAnchorProfileSocialLink {
|
|
20
19
|
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
@@ -29,6 +28,25 @@ export interface ResolvedAnchorProfile {
|
|
|
29
28
|
story?: string;
|
|
30
29
|
socialLinks?: ResolvedAnchorProfileSocialLink[];
|
|
31
30
|
}
|
|
31
|
+
export interface ResolvedSetupDelivery {
|
|
32
|
+
delivery: "email";
|
|
33
|
+
email: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ResolvedAtprotoConfig {
|
|
36
|
+
identifier: string;
|
|
37
|
+
/** Owner account DID served at /.well-known/atproto-did for handle verification. */
|
|
38
|
+
accountDid?: string | undefined;
|
|
39
|
+
/** Whether this account publishes the canonical ai.rizom.brain.* schemas. */
|
|
40
|
+
lexiconAuthority?: boolean | undefined;
|
|
41
|
+
}
|
|
42
|
+
export interface ResolvedPlaybooksConfig {
|
|
43
|
+
onboarding?: boolean | undefined;
|
|
44
|
+
}
|
|
45
|
+
export interface ResolvedSiteOverride {
|
|
46
|
+
package: string;
|
|
47
|
+
version: string;
|
|
48
|
+
theme?: string | undefined;
|
|
49
|
+
}
|
|
32
50
|
export interface ResolvedUserIdentity {
|
|
33
51
|
handle: string;
|
|
34
52
|
cohort: string;
|
|
@@ -36,12 +54,17 @@ export interface ResolvedUserIdentity {
|
|
|
36
54
|
model: "rover";
|
|
37
55
|
preset: PilotPreset;
|
|
38
56
|
domain: string;
|
|
57
|
+
cloudflareZoneId?: string | undefined;
|
|
39
58
|
contentRepo: string;
|
|
59
|
+
addOverride?: string[];
|
|
60
|
+
siteOverride?: ResolvedSiteOverride;
|
|
40
61
|
discordEnabled: boolean;
|
|
41
62
|
discordAnchorUserId?: string;
|
|
42
63
|
effectiveAiApiKey: string;
|
|
43
64
|
effectiveGitSyncToken: string;
|
|
44
|
-
|
|
65
|
+
setup?: ResolvedSetupDelivery;
|
|
66
|
+
atproto?: ResolvedAtprotoConfig;
|
|
67
|
+
playbooks?: ResolvedPlaybooksConfig;
|
|
45
68
|
anchorProfile: ResolvedAnchorProfile;
|
|
46
69
|
snapshotStatus: SnapshotStatus;
|
|
47
70
|
}
|
package/dist/origin-ca.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createOriginCertificateRequest, generateOriginKeyPair, issueCloudflareOriginCertificate, setCloudflareZoneSslStrict, type CloudflareOriginCaResult, type FetchLike, type OriginCertificateRequest, type OriginKeyPair, } from "@brains/
|
|
1
|
+
export { createOriginCertificateRequest, generateOriginKeyPair, issueCloudflareOriginCertificate, setCloudflareZoneSslStrict, type CloudflareOriginCaResult, type FetchLike, type OriginCertificateRequest, type OriginKeyPair, } from "@brains/deploy-support/origin-ca";
|
package/dist/parse-args.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export interface ParsedArgs {
|
|
|
6
6
|
version?: boolean | undefined;
|
|
7
7
|
dryRun?: boolean | undefined;
|
|
8
8
|
pushTo?: string | undefined;
|
|
9
|
+
cohort?: string | undefined;
|
|
10
|
+
anchorId?: string | undefined;
|
|
11
|
+
handle?: string | undefined;
|
|
9
12
|
};
|
|
10
13
|
}
|
|
11
14
|
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PreviewDomainOptions {
|
|
2
|
+
sharedDomain?: string | undefined;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Public operator-facing wrapper around the runtime's preview-domain rule.
|
|
6
|
+
* Keeping deploy resolution on this function prevents DNS, proxy, and runtime
|
|
7
|
+
* metadata from drifting onto different host shapes.
|
|
8
|
+
*/
|
|
9
|
+
export declare function derivePreviewDomain(domain: string, options?: PreviewDomainOptions): string;
|
package/dist/push-secrets.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type SecretPair = readonly [name: string, value: string];
|
|
4
|
-
export interface PushSecretsOptions {
|
|
5
|
-
runCommand?: RunCommand | undefined;
|
|
6
|
-
logger?: ((message: string) => void) | undefined;
|
|
7
|
-
}
|
|
8
|
-
export declare function pushSecretsToBackend(_target: PushTarget, secrets: readonly SecretPair[], options?: PushSecretsOptions): Promise<void>;
|
|
9
|
-
export { normalizePushTarget };
|
|
1
|
+
export { pushSecretsToBackend, type PushSecretsOptions, type SecretPair, } from "@brains/deploy-support/push-secrets";
|
|
2
|
+
export { normalizePushTarget } from "@brains/deploy-support/push-target";
|
package/dist/push-target.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export type PushTarget
|
|
2
|
-
export declare function normalizePushTarget(value?: string): PushTarget | undefined;
|
|
1
|
+
export { normalizePushTarget, type PushTarget, } from "@brains/deploy-support/push-target";
|
package/dist/run-command.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FetchLike } from "@brains/
|
|
1
|
+
import type { FetchLike } from "@brains/deploy-support/origin-ca";
|
|
2
2
|
import type { LoadPilotRegistryOptions } from "./load-registry";
|
|
3
3
|
import { type LookupHost } from "./observed-status";
|
|
4
4
|
import type { ParsedArgs } from "./parse-args";
|
package/dist/run-subprocess.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export type RunCommand
|
|
2
|
-
stdin?: string;
|
|
3
|
-
env?: NodeJS.ProcessEnv;
|
|
4
|
-
cwd?: string;
|
|
5
|
-
}) => Promise<void>;
|
|
6
|
-
export declare const runSubprocess: RunCommand;
|
|
1
|
+
export { runSubprocess, type RunCommand, } from "@brains/deploy-support/run-subprocess";
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { z } from "@brains/utils";
|
|
2
|
-
export declare const presetSchema: z.ZodEnum<
|
|
1
|
+
import { z } from "@brains/utils/zod";
|
|
2
|
+
export declare const presetSchema: z.ZodEnum<{
|
|
3
|
+
core: "core";
|
|
4
|
+
default: "default";
|
|
5
|
+
pro: "pro";
|
|
6
|
+
}>;
|
|
3
7
|
export declare const exactVersionSchema: z.ZodString;
|
|
4
8
|
export declare const handleSchema: z.ZodString;
|
|
5
9
|
export declare const secretNameSchema: z.ZodString;
|
|
@@ -11,173 +15,78 @@ export declare const pilotSchema: z.ZodObject<{
|
|
|
11
15
|
githubOrg: z.ZodString;
|
|
12
16
|
contentRepoPrefix: z.ZodString;
|
|
13
17
|
domainSuffix: z.ZodString;
|
|
14
|
-
preset:
|
|
18
|
+
preset: typeof presetSchema;
|
|
15
19
|
aiApiKey: z.ZodString;
|
|
16
20
|
gitSyncToken: z.ZodString;
|
|
17
|
-
|
|
21
|
+
contentRepoAdminToken: z.ZodString;
|
|
18
22
|
agePublicKey: z.ZodString;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
23
|
+
}>;
|
|
24
|
+
declare const anchorProfileSocialLinkSchema: z.ZodObject<{
|
|
25
|
+
platform: z.ZodEnum<{
|
|
26
|
+
github: "github";
|
|
27
|
+
instagram: "instagram";
|
|
28
|
+
linkedin: "linkedin";
|
|
29
|
+
email: "email";
|
|
30
|
+
website: "website";
|
|
31
|
+
}>;
|
|
32
|
+
url: z.ZodString;
|
|
33
|
+
label: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}>;
|
|
35
|
+
declare const anchorProfileSchema: z.ZodObject<{
|
|
36
|
+
name: z.ZodOptional<z.ZodString>;
|
|
37
|
+
description: z.ZodOptional<z.ZodString>;
|
|
38
|
+
website: z.ZodOptional<z.ZodString>;
|
|
39
|
+
email: z.ZodOptional<z.ZodString>;
|
|
40
|
+
story: z.ZodOptional<z.ZodString>;
|
|
41
|
+
socialLinks: z.ZodOptional<z.ZodArray<typeof anchorProfileSocialLinkSchema>>;
|
|
42
|
+
}>;
|
|
43
|
+
declare const setupDeliverySchema: z.ZodObject<{
|
|
44
|
+
delivery: z.ZodLiteral<"email">;
|
|
45
|
+
email: z.ZodString;
|
|
46
|
+
}>;
|
|
47
|
+
declare const atprotoSchema: z.ZodObject<{
|
|
48
|
+
identifier: z.ZodString;
|
|
49
|
+
accountDid: z.ZodOptional<z.ZodString>;
|
|
50
|
+
lexiconAuthority: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
}>;
|
|
52
|
+
declare const siteOverrideSchema: z.ZodObject<{
|
|
53
|
+
package: z.ZodString;
|
|
54
|
+
version: z.ZodOptional<typeof exactVersionSchema>;
|
|
55
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}>;
|
|
57
|
+
declare const playbooksSchema: z.ZodObject<{
|
|
58
|
+
onboarding: z.ZodOptional<z.ZodBoolean>;
|
|
43
59
|
}>;
|
|
44
60
|
export declare const userSchema: z.ZodObject<{
|
|
45
61
|
handle: z.ZodString;
|
|
46
62
|
discord: z.ZodObject<{
|
|
47
63
|
enabled: z.ZodBoolean;
|
|
48
64
|
anchorUserId: z.ZodOptional<z.ZodString>;
|
|
49
|
-
}, "strict", z.ZodTypeAny, {
|
|
50
|
-
enabled: boolean;
|
|
51
|
-
anchorUserId?: string | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
enabled: boolean;
|
|
54
|
-
anchorUserId?: string | undefined;
|
|
55
65
|
}>;
|
|
56
66
|
aiApiKeyOverride: z.ZodOptional<z.ZodString>;
|
|
57
67
|
gitSyncTokenOverride: z.ZodOptional<z.ZodString>;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
url: z.ZodString;
|
|
68
|
-
label: z.ZodOptional<z.ZodString>;
|
|
69
|
-
}, "strict", z.ZodTypeAny, {
|
|
70
|
-
url: string;
|
|
71
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
72
|
-
label?: string | undefined;
|
|
73
|
-
}, {
|
|
74
|
-
url: string;
|
|
75
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
76
|
-
label?: string | undefined;
|
|
77
|
-
}>, "many">>;
|
|
78
|
-
}, "strict", z.ZodTypeAny, {
|
|
79
|
-
name?: string | undefined;
|
|
80
|
-
email?: string | undefined;
|
|
81
|
-
website?: string | undefined;
|
|
82
|
-
description?: string | undefined;
|
|
83
|
-
story?: string | undefined;
|
|
84
|
-
socialLinks?: {
|
|
85
|
-
url: string;
|
|
86
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
87
|
-
label?: string | undefined;
|
|
88
|
-
}[] | undefined;
|
|
89
|
-
}, {
|
|
90
|
-
name?: string | undefined;
|
|
91
|
-
email?: string | undefined;
|
|
92
|
-
website?: string | undefined;
|
|
93
|
-
description?: string | undefined;
|
|
94
|
-
story?: string | undefined;
|
|
95
|
-
socialLinks?: {
|
|
96
|
-
url: string;
|
|
97
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
98
|
-
label?: string | undefined;
|
|
99
|
-
}[] | undefined;
|
|
100
|
-
}>>;
|
|
101
|
-
}, "strict", z.ZodTypeAny, {
|
|
102
|
-
handle: string;
|
|
103
|
-
discord: {
|
|
104
|
-
enabled: boolean;
|
|
105
|
-
anchorUserId?: string | undefined;
|
|
106
|
-
};
|
|
107
|
-
aiApiKeyOverride?: string | undefined;
|
|
108
|
-
gitSyncTokenOverride?: string | undefined;
|
|
109
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
110
|
-
anchorProfile?: {
|
|
111
|
-
name?: string | undefined;
|
|
112
|
-
email?: string | undefined;
|
|
113
|
-
website?: string | undefined;
|
|
114
|
-
description?: string | undefined;
|
|
115
|
-
story?: string | undefined;
|
|
116
|
-
socialLinks?: {
|
|
117
|
-
url: string;
|
|
118
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
119
|
-
label?: string | undefined;
|
|
120
|
-
}[] | undefined;
|
|
121
|
-
} | undefined;
|
|
122
|
-
}, {
|
|
123
|
-
handle: string;
|
|
124
|
-
discord: {
|
|
125
|
-
enabled: boolean;
|
|
126
|
-
anchorUserId?: string | undefined;
|
|
127
|
-
};
|
|
128
|
-
aiApiKeyOverride?: string | undefined;
|
|
129
|
-
gitSyncTokenOverride?: string | undefined;
|
|
130
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
131
|
-
anchorProfile?: {
|
|
132
|
-
name?: string | undefined;
|
|
133
|
-
email?: string | undefined;
|
|
134
|
-
website?: string | undefined;
|
|
135
|
-
description?: string | undefined;
|
|
136
|
-
story?: string | undefined;
|
|
137
|
-
socialLinks?: {
|
|
138
|
-
url: string;
|
|
139
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
140
|
-
label?: string | undefined;
|
|
141
|
-
}[] | undefined;
|
|
142
|
-
} | undefined;
|
|
68
|
+
domainOverride: z.ZodOptional<z.ZodString>;
|
|
69
|
+
cloudflareZoneId: z.ZodOptional<z.ZodString>;
|
|
70
|
+
contentRepoOverride: z.ZodOptional<z.ZodString>;
|
|
71
|
+
addOverride: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
|
+
siteOverride: z.ZodOptional<typeof siteOverrideSchema>;
|
|
73
|
+
setup: z.ZodOptional<typeof setupDeliverySchema>;
|
|
74
|
+
atproto: z.ZodOptional<typeof atprotoSchema>;
|
|
75
|
+
playbooks: z.ZodOptional<typeof playbooksSchema>;
|
|
76
|
+
anchorProfile: z.ZodOptional<typeof anchorProfileSchema>;
|
|
143
77
|
}>;
|
|
144
|
-
export declare const cohortSchema: z.
|
|
145
|
-
members: z.ZodArray<z.ZodString
|
|
78
|
+
export declare const cohortSchema: z.ZodObject<{
|
|
79
|
+
members: z.ZodArray<z.ZodString>;
|
|
146
80
|
brainVersionOverride: z.ZodOptional<z.ZodString>;
|
|
147
|
-
presetOverride: z.ZodOptional<
|
|
81
|
+
presetOverride: z.ZodOptional<typeof presetSchema>;
|
|
148
82
|
aiApiKeyOverride: z.ZodOptional<z.ZodString>;
|
|
149
83
|
gitSyncTokenOverride: z.ZodOptional<z.ZodString>;
|
|
150
|
-
mcpAuthTokenOverride: z.ZodOptional<z.ZodString>;
|
|
151
|
-
}, "strict", z.ZodTypeAny, {
|
|
152
|
-
members: string[];
|
|
153
|
-
aiApiKeyOverride?: string | undefined;
|
|
154
|
-
gitSyncTokenOverride?: string | undefined;
|
|
155
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
156
|
-
brainVersionOverride?: string | undefined;
|
|
157
|
-
presetOverride?: "default" | "core" | "pro" | undefined;
|
|
158
|
-
}, {
|
|
159
|
-
members: string[];
|
|
160
|
-
aiApiKeyOverride?: string | undefined;
|
|
161
|
-
gitSyncTokenOverride?: string | undefined;
|
|
162
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
163
|
-
brainVersionOverride?: string | undefined;
|
|
164
|
-
presetOverride?: "default" | "core" | "pro" | undefined;
|
|
165
|
-
}>, {
|
|
166
|
-
members: string[];
|
|
167
|
-
aiApiKeyOverride?: string | undefined;
|
|
168
|
-
gitSyncTokenOverride?: string | undefined;
|
|
169
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
170
|
-
brainVersionOverride?: string | undefined;
|
|
171
|
-
presetOverride?: "default" | "core" | "pro" | undefined;
|
|
172
|
-
}, {
|
|
173
|
-
members: string[];
|
|
174
|
-
aiApiKeyOverride?: string | undefined;
|
|
175
|
-
gitSyncTokenOverride?: string | undefined;
|
|
176
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
177
|
-
brainVersionOverride?: string | undefined;
|
|
178
|
-
presetOverride?: "default" | "core" | "pro" | undefined;
|
|
179
84
|
}>;
|
|
180
|
-
export type PilotConfig = z.
|
|
181
|
-
export type
|
|
182
|
-
export type
|
|
183
|
-
export type
|
|
85
|
+
export type PilotConfig = z.output<typeof pilotSchema>;
|
|
86
|
+
export type PilotConfigInput = z.input<typeof pilotSchema>;
|
|
87
|
+
export type UserConfig = z.output<typeof userSchema>;
|
|
88
|
+
export type UserConfigInput = z.input<typeof userSchema>;
|
|
89
|
+
export type CohortConfig = z.output<typeof cohortSchema>;
|
|
90
|
+
export type CohortConfigInput = z.input<typeof cohortSchema>;
|
|
91
|
+
export type PilotPreset = z.output<typeof presetSchema>;
|
|
92
|
+
export {};
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import { z } from "@brains/utils";
|
|
1
|
+
import { z } from "@brains/utils/zod";
|
|
2
2
|
declare const encryptedUserSecretsSchema: z.ZodObject<{
|
|
3
3
|
gitSyncToken: z.ZodOptional<z.ZodString>;
|
|
4
|
-
mcpAuthToken: z.ZodOptional<z.ZodString>;
|
|
5
4
|
discordBotToken: z.ZodOptional<z.ZodString>;
|
|
6
5
|
aiApiKey: z.ZodOptional<z.ZodString>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
mcpAuthToken?: string | undefined;
|
|
11
|
-
discordBotToken?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
aiApiKey?: string | undefined;
|
|
14
|
-
gitSyncToken?: string | undefined;
|
|
15
|
-
mcpAuthToken?: string | undefined;
|
|
16
|
-
discordBotToken?: string | undefined;
|
|
6
|
+
atprotoAppPassword: z.ZodOptional<z.ZodString>;
|
|
7
|
+
certificatePem: z.ZodOptional<z.ZodString>;
|
|
8
|
+
privateKeyPem: z.ZodOptional<z.ZodString>;
|
|
17
9
|
}>;
|
|
18
|
-
export type EncryptedUserSecrets = z.
|
|
10
|
+
export type EncryptedUserSecrets = z.output<typeof encryptedUserSecretsSchema>;
|
|
19
11
|
export interface SecretsEncryptOptions {
|
|
20
12
|
env?: NodeJS.ProcessEnv | undefined;
|
|
21
13
|
logger?: ((message: string) => void) | undefined;
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { type RunCommand } from "./run-subprocess";
|
|
3
|
-
export interface SshKeyBootstrapOptions {
|
|
4
|
-
env?: NodeJS.ProcessEnv | undefined;
|
|
5
|
-
fetchImpl?: FetchLike | undefined;
|
|
6
|
-
logger?: (message: string) => void;
|
|
7
|
-
pushTo?: string | undefined;
|
|
8
|
-
runCommand?: RunCommand | undefined;
|
|
9
|
-
sshKeygen?: SshKeygen | undefined;
|
|
10
|
-
}
|
|
11
|
-
export interface SshKeyBootstrapResult {
|
|
12
|
-
createdHetznerKey: boolean;
|
|
13
|
-
createdLocalKey: boolean;
|
|
14
|
-
privateKeyPath: string;
|
|
15
|
-
publicKeyPath: string;
|
|
16
|
-
sshKeyName: string;
|
|
17
|
-
}
|
|
18
|
-
export interface SshKeygen {
|
|
19
|
-
createEd25519KeyPair: (privateKeyPath: string, comment: string) => void;
|
|
20
|
-
derivePublicKey: (privateKeyPath: string) => string;
|
|
21
|
-
}
|
|
22
|
-
export declare function runPilotSshKeyBootstrap(rootDir: string, options?: SshKeyBootstrapOptions): Promise<{
|
|
23
|
-
success: boolean;
|
|
24
|
-
message?: string;
|
|
25
|
-
}>;
|
|
26
|
-
export declare function bootstrapPilotSshKey(rootDir: string, options?: SshKeyBootstrapOptions): Promise<SshKeyBootstrapResult>;
|
|
1
|
+
export { bootstrapSshKey as bootstrapPilotSshKey, runSshKeyBootstrap as runPilotSshKeyBootstrap, type SshKeyBootstrapOptions, type SshKeyBootstrapResult, type SshKeygen, } from "@brains/deploy-support/ssh-key-bootstrap";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface AddPilotUserOptions {
|
|
2
|
+
cohort: string;
|
|
3
|
+
anchorId?: string | undefined;
|
|
4
|
+
}
|
|
5
|
+
export interface AddPilotUserResult {
|
|
6
|
+
handle: string;
|
|
7
|
+
cohort: string;
|
|
8
|
+
userPath: string;
|
|
9
|
+
secretsTemplatePath: string;
|
|
10
|
+
cohortPath: string;
|
|
11
|
+
createdUser: boolean;
|
|
12
|
+
createdSecretsTemplate: boolean;
|
|
13
|
+
addedToCohort: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function addPilotUser(rootDir: string, handle: string, options: AddPilotUserOptions): Promise<AddPilotUserResult>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FetchLike } from "@brains/deploy-support/origin-ca";
|
|
2
|
+
import { type ResolvedUser } from "./load-registry";
|
|
3
|
+
export interface VerifyPilotUserOptions {
|
|
4
|
+
fetchImpl?: FetchLike;
|
|
5
|
+
logger?: (message: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface FailedCheck {
|
|
8
|
+
name: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface VerifyPilotUserResult {
|
|
12
|
+
handle: string;
|
|
13
|
+
preset: ResolvedUser["preset"];
|
|
14
|
+
domain: string;
|
|
15
|
+
contentRepo: string;
|
|
16
|
+
checks: string[];
|
|
17
|
+
failedChecks: FailedCheck[];
|
|
18
|
+
}
|
|
19
|
+
export declare function verifyPilotUser(rootDir: string, handle: string, options?: VerifyPilotUserOptions): Promise<VerifyPilotUserResult>;
|
package/package.json
CHANGED
|
@@ -1,67 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rizom/ops",
|
|
3
|
+
"version": "0.2.0-alpha.221",
|
|
3
4
|
"description": "Operator CLI for managing private brain fleet registry repos",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"brains",
|
|
7
|
+
"ops",
|
|
8
|
+
"cli",
|
|
9
|
+
"deploy",
|
|
10
|
+
"fleet",
|
|
11
|
+
"operator"
|
|
12
|
+
],
|
|
13
|
+
"license": "Apache-2.0",
|
|
14
|
+
"author": "Yeehaa <yeehaa@rizom.ai> (https://rizom.ai)",
|
|
15
|
+
"bin": {
|
|
16
|
+
"brains-ops": "./dist/brains-ops.js"
|
|
17
|
+
},
|
|
18
|
+
"bugs": "https://github.com/rizom-ai/brains/issues",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"age-encryption": "^0.3.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@brains/deploy-support": "workspace:*",
|
|
24
|
+
"@brains/eslint-config": "workspace:*",
|
|
25
|
+
"@brains/site-composition": "workspace:*",
|
|
26
|
+
"@brains/typescript-config": "workspace:*",
|
|
27
|
+
"@brains/utils": "workspace:*",
|
|
28
|
+
"@types/bun": "^1.3.14",
|
|
29
|
+
"typescript": "^7.0.2"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"bun": ">=1.3.3"
|
|
6
33
|
},
|
|
7
|
-
"version": "0.2.0-alpha.22",
|
|
8
|
-
"type": "module",
|
|
9
34
|
"exports": {
|
|
10
35
|
".": {
|
|
11
36
|
"types": "./dist/index.d.ts",
|
|
12
37
|
"import": "./dist/index.js"
|
|
13
38
|
},
|
|
14
39
|
"./deploy": {
|
|
15
|
-
"bun": "./dist/deploy.js",
|
|
16
40
|
"types": "./dist/deploy.d.ts",
|
|
17
|
-
"import": "./dist/deploy.js"
|
|
41
|
+
"import": "./dist/deploy.js",
|
|
42
|
+
"bun": "./dist/deploy.js"
|
|
18
43
|
}
|
|
19
44
|
},
|
|
20
|
-
"main": "./dist/index.js",
|
|
21
|
-
"types": "./dist/index.d.ts",
|
|
22
|
-
"bin": {
|
|
23
|
-
"brains-ops": "./dist/brains-ops.js"
|
|
24
|
-
},
|
|
25
45
|
"files": [
|
|
26
46
|
"dist",
|
|
27
47
|
"templates"
|
|
28
48
|
],
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"lint": "eslint . --ext .ts",
|
|
34
|
-
"lint:fix": "eslint . --ext .ts --fix",
|
|
35
|
-
"test": "bun test --timeout 20000"
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"age-encryption": "^0.3.0"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@brains/eslint-config": "workspace:*",
|
|
42
|
-
"@brains/typescript-config": "workspace:*",
|
|
43
|
-
"@brains/utils": "workspace:*",
|
|
44
|
-
"@types/bun": "latest",
|
|
45
|
-
"typescript": "^5.3.3"
|
|
49
|
+
"homepage": "https://github.com/rizom-ai/brains/tree/main/packages/brains-ops#readme",
|
|
50
|
+
"main": "./dist/index.js",
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
46
53
|
},
|
|
47
54
|
"repository": {
|
|
48
55
|
"type": "git",
|
|
49
56
|
"url": "https://github.com/rizom-ai/brains.git",
|
|
50
57
|
"directory": "packages/brains-ops"
|
|
51
58
|
},
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "bun scripts/build.ts",
|
|
61
|
+
"lint": "eslint . --max-warnings 0",
|
|
62
|
+
"lint:fix": "eslint . --max-warnings 0 --fix",
|
|
63
|
+
"prepublishOnly": "bun scripts/build.ts",
|
|
64
|
+
"test": "bun run build && bun test --timeout 20000",
|
|
65
|
+
"test:smoke": "bun run build && RUN_SMOKE_TESTS=1 bun test --timeout 60000",
|
|
66
|
+
"typecheck": "tsc --noEmit"
|
|
58
67
|
},
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
"ops",
|
|
62
|
-
"cli",
|
|
63
|
-
"deploy",
|
|
64
|
-
"fleet",
|
|
65
|
-
"operator"
|
|
66
|
-
]
|
|
68
|
+
"type": "module",
|
|
69
|
+
"types": "./dist/index.d.ts"
|
|
67
70
|
}
|
|
@@ -14,16 +14,30 @@ AI_API_KEY=
|
|
|
14
14
|
# @required @sensitive
|
|
15
15
|
GIT_SYNC_TOKEN=
|
|
16
16
|
|
|
17
|
-
#
|
|
18
|
-
#
|
|
17
|
+
# Content repo administration
|
|
18
|
+
# Local/operator secret only. Used by brains-ops to create missing GitHub repos;
|
|
19
|
+
# do not deploy it into Rover runtime config.
|
|
19
20
|
# @required @sensitive
|
|
20
|
-
|
|
21
|
+
CONTENT_REPO_ADMIN_TOKEN=
|
|
21
22
|
|
|
22
23
|
# Discord (optional, per-user)
|
|
23
24
|
# Comes from the decrypted users/<handle>.secrets.yaml.age file when enabled.
|
|
24
25
|
# @sensitive
|
|
25
26
|
DISCORD_BOT_TOKEN=
|
|
26
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
|
+
|
|
33
|
+
# Setup email delivery (optional, shared)
|
|
34
|
+
# Used when a user file declares setup.delivery: email.
|
|
35
|
+
# @sensitive
|
|
36
|
+
SETUP_EMAIL_API_KEY=
|
|
37
|
+
|
|
38
|
+
# @sensitive
|
|
39
|
+
SETUP_EMAIL_FROM=
|
|
40
|
+
|
|
27
41
|
# ---- deploy/provision vars ----
|
|
28
42
|
|
|
29
43
|
# @required @sensitive
|