@rizom/ops 0.2.0-alpha.45 → 0.2.0-alpha.451
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 +82 -1
- package/dist/age-key-bootstrap.d.ts +1 -1
- package/dist/brains-ops.js +736 -335
- package/dist/capability-bundle-migration.d.ts +22 -0
- package/dist/cert-bootstrap.d.ts +4 -2
- package/dist/content-repo-ref.d.ts +10 -0
- package/dist/content-repo.d.ts +1 -1
- package/dist/deploy.js +110 -166
- package/dist/directory-sync-stress-system.d.ts +75 -0
- package/dist/directory-sync-stress.d.ts +117 -0
- package/dist/entries/deploy.d.ts +4 -2
- package/dist/health-watchdog-smoke.d.ts +54 -0
- package/dist/image-inventory.d.ts +4 -0
- package/dist/image-types.d.ts +7 -0
- package/dist/images.d.ts +82 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +736 -323
- package/dist/legacy-pilot-migration.d.ts +11 -0
- package/dist/legacy-projection-job-recovery.d.ts +29 -0
- package/dist/load-registry.d.ts +61 -6
- package/dist/observed-status.d.ts +1 -1
- package/dist/parse-args.d.ts +2 -12
- package/dist/preview-domain.d.ts +9 -0
- package/dist/reconcile-dry-run.d.ts +9 -0
- package/dist/run-command.d.ts +20 -4
- package/dist/schema.d.ts +126 -163
- package/dist/secrets-encrypt.d.ts +7 -13
- package/dist/secrets-push.d.ts +1 -1
- package/dist/ssh-key-bootstrap.d.ts +1 -26
- package/dist/stage-legacy-crossover.d.ts +25 -0
- package/dist/stress-command.d.ts +14 -0
- package/dist/stress-git-checkout.d.ts +21 -0
- package/dist/stress-health-monitor.d.ts +46 -0
- package/dist/upgrade.d.ts +10 -0
- package/dist/user-offboard.d.ts +61 -0
- package/dist/verify-user.d.ts +22 -0
- package/package.json +50 -42
- package/templates/rover-pilot/.env.schema +20 -5
- package/templates/rover-pilot/.github/actions/varlock-env/action.yml +47 -0
- package/templates/rover-pilot/.github/workflows/build.yml +70 -17
- package/templates/rover-pilot/.github/workflows/deploy.yml +74 -57
- package/templates/rover-pilot/.github/workflows/directory-sync-stress.yml +119 -0
- package/templates/rover-pilot/.github/workflows/health-watchdog-smoke.yml +95 -0
- package/templates/rover-pilot/.github/workflows/offboard.yml +107 -0
- package/templates/rover-pilot/.github/workflows/reconcile.yml +10 -4
- package/templates/rover-pilot/.github/workflows/upgrade.yml +104 -0
- package/templates/rover-pilot/README.md +13 -5
- package/templates/rover-pilot/deploy/scripts/create-predeploy-backup.ts +936 -0
- package/templates/rover-pilot/deploy/scripts/decrypt-user-secrets.ts +80 -24
- package/templates/rover-pilot/deploy/scripts/helpers.ts +2 -0
- package/templates/rover-pilot/deploy/scripts/install-health-watchdog.ts +144 -0
- package/templates/rover-pilot/deploy/scripts/provision-server.ts +51 -21
- package/templates/rover-pilot/deploy/scripts/resolve-deploy-handles.ts +4 -0
- package/templates/rover-pilot/deploy/scripts/resolve-missing-images.ts +13 -0
- package/templates/rover-pilot/deploy/scripts/resolve-user-config.ts +40 -9
- package/templates/rover-pilot/deploy/scripts/sync-content-repo.ts +51 -47
- package/templates/rover-pilot/deploy/scripts/update-dns.ts +72 -16
- package/templates/rover-pilot/deploy/scripts/validate-secrets.ts +12 -1
- package/templates/rover-pilot/deploy/scripts/verify-runtime-image.ts +18 -0
- package/templates/rover-pilot/docs/canonical-crossover-record.md +107 -0
- package/templates/rover-pilot/docs/onboarding-checklist.md +23 -14
- package/templates/rover-pilot/docs/operator-playbook.md +357 -29
- package/templates/rover-pilot/docs/user-onboarding.md +48 -463
- package/templates/rover-pilot/package.json +1 -0
- package/templates/rover-pilot/pilot.yaml +6 -4
- package/dist/origin-ca.d.ts +0 -1
- package/dist/push-secrets.d.ts +0 -9
- package/dist/push-target.d.ts +0 -2
- package/dist/run-subprocess.d.ts +0 -6
- package/templates/rover-pilot/.kamal/hooks/pre-deploy +0 -9
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type CohortConfig, type PilotConfig } from "./schema";
|
|
2
|
+
/** Offline-only conversion. Active desired-state loading never calls this. */
|
|
3
|
+
export declare function migrateLegacyPilotConfig(input: unknown): PilotConfig;
|
|
4
|
+
/** Offline-only cohort conversion. */
|
|
5
|
+
export declare function migrateLegacyCohortConfig(input: unknown): CohortConfig;
|
|
6
|
+
/** Offline-only YAML rewrite that retains comments while changing the schema. */
|
|
7
|
+
export declare function migrateLegacyPilotYaml(input: string): string;
|
|
8
|
+
/** Offline-only cohort rewrite that retains comments while changing selection. */
|
|
9
|
+
export declare function migrateLegacyCohortYaml(input: string): string;
|
|
10
|
+
export declare function renderPilotConfig(config: PilotConfig): string;
|
|
11
|
+
export declare function renderCohortConfig(config: CohortConfig): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type JobInfo } from "@brains/job-queue";
|
|
2
|
+
import { z } from "@brains/utils/zod";
|
|
3
|
+
export declare const LEGACY_PROJECTION_JOB_TYPES: readonly ["conversation-memory:project", "skill:project", "swot:derive", "topic:project"];
|
|
4
|
+
export declare const legacyProjectionJobTypeSchema: z.ZodEnum<{
|
|
5
|
+
"conversation-memory:project": "conversation-memory:project";
|
|
6
|
+
"skill:project": "skill:project";
|
|
7
|
+
"swot:derive": "swot:derive";
|
|
8
|
+
"topic:project": "topic:project";
|
|
9
|
+
}>;
|
|
10
|
+
export type LegacyProjectionJobType = z.output<typeof legacyProjectionJobTypeSchema>;
|
|
11
|
+
export declare const LEGACY_PROJECTION_RETIREMENT_REASON = "Retired legacy projection job superseded by scheduler-owned projections";
|
|
12
|
+
export interface RetireLegacyProjectionJobOptions {
|
|
13
|
+
databasePath: string;
|
|
14
|
+
jobId: string;
|
|
15
|
+
jobType: LegacyProjectionJobType;
|
|
16
|
+
confirmation?: string | undefined;
|
|
17
|
+
dryRun?: boolean | undefined;
|
|
18
|
+
now?: (() => number) | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface RetireLegacyProjectionJobResult {
|
|
21
|
+
databasePath: string;
|
|
22
|
+
job: Pick<JobInfo, "id" | "type" | "status" | "retryCount" | "maxRetries" | "createdAt" | "startedAt" | "completedAt">;
|
|
23
|
+
retired: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Retire one exact pre-scheduler projection job after proving that no attempt
|
|
27
|
+
* owns it. This is deliberately not a general job cancellation API.
|
|
28
|
+
*/
|
|
29
|
+
export declare function retireLegacyProjectionJob(options: RetireLegacyProjectionJobOptions): Promise<RetireLegacyProjectionJobResult>;
|
package/dist/load-registry.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PilotConfig, type
|
|
1
|
+
import { type PilotConfig, type CanonicalBundleId, type UserConfig } from "./schema";
|
|
2
2
|
export type ExternalStatus = "unknown" | "ready" | "failed";
|
|
3
3
|
export type SnapshotStatus = "present" | "missing";
|
|
4
4
|
export interface ObservedUserStatus {
|
|
@@ -11,10 +11,11 @@ export interface ResolvedCohort {
|
|
|
11
11
|
id: string;
|
|
12
12
|
members: string[];
|
|
13
13
|
brainVersionOverride?: string;
|
|
14
|
-
|
|
14
|
+
bundlesOverride?: CanonicalBundleId[];
|
|
15
|
+
addOverride?: string[];
|
|
16
|
+
removeOverride?: string[];
|
|
15
17
|
aiApiKeyOverride?: string;
|
|
16
18
|
gitSyncTokenOverride?: string;
|
|
17
|
-
mcpAuthTokenOverride?: string;
|
|
18
19
|
}
|
|
19
20
|
export interface ResolvedAnchorProfileSocialLink {
|
|
20
21
|
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
@@ -29,19 +30,73 @@ export interface ResolvedAnchorProfile {
|
|
|
29
30
|
story?: string;
|
|
30
31
|
socialLinks?: ResolvedAnchorProfileSocialLink[];
|
|
31
32
|
}
|
|
33
|
+
export interface ResolvedSetupDelivery {
|
|
34
|
+
delivery: "email";
|
|
35
|
+
email: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ResolvedAtprotoJetstreamConfig {
|
|
38
|
+
enabled?: boolean | undefined;
|
|
39
|
+
endpoint?: string | undefined;
|
|
40
|
+
replayWindowSeconds?: number | undefined;
|
|
41
|
+
denyDids?: string[] | undefined;
|
|
42
|
+
denyDomains?: string[] | undefined;
|
|
43
|
+
skillKeywords?: string[] | undefined;
|
|
44
|
+
queueLimit?: number | undefined;
|
|
45
|
+
concurrency?: number | undefined;
|
|
46
|
+
perDidCooldownSeconds?: number | undefined;
|
|
47
|
+
fetchBudgetPerMinute?: number | undefined;
|
|
48
|
+
newAgentsPerHour?: number | undefined;
|
|
49
|
+
pendingCandidateCeiling?: number | undefined;
|
|
50
|
+
staleCandidateRetentionDays?: number | undefined;
|
|
51
|
+
requestTimeoutMs?: number | undefined;
|
|
52
|
+
maxResponseBytes?: number | undefined;
|
|
53
|
+
maxRedirects?: number | undefined;
|
|
54
|
+
retryAttempts?: number | undefined;
|
|
55
|
+
heartbeatIntervalHours?: number | undefined;
|
|
56
|
+
}
|
|
57
|
+
export interface ResolvedAtprotoConfig {
|
|
58
|
+
identifier: string;
|
|
59
|
+
/** Owner account DID served at /.well-known/atproto-did for handle verification. */
|
|
60
|
+
accountDid?: string | undefined;
|
|
61
|
+
/** Whether this account publishes the canonical ai.rizom.brain.* schemas. */
|
|
62
|
+
lexiconAuthority?: boolean | undefined;
|
|
63
|
+
/** Per-brain bounded Jetstream canary configuration. */
|
|
64
|
+
jetstream?: ResolvedAtprotoJetstreamConfig | undefined;
|
|
65
|
+
}
|
|
66
|
+
export interface ResolvedPlaybooksConfig {
|
|
67
|
+
onboarding?: boolean | undefined;
|
|
68
|
+
}
|
|
69
|
+
export interface ResolvedSiteOverride {
|
|
70
|
+
package: string;
|
|
71
|
+
version: string;
|
|
72
|
+
theme?: string | undefined;
|
|
73
|
+
themeVersion?: string | undefined;
|
|
74
|
+
}
|
|
32
75
|
export interface ResolvedUserIdentity {
|
|
33
76
|
handle: string;
|
|
34
77
|
cohort: string;
|
|
35
78
|
brainVersion: string;
|
|
36
|
-
|
|
37
|
-
|
|
79
|
+
bundleContract: PilotConfig["bundleContract"];
|
|
80
|
+
bundles: CanonicalBundleId[];
|
|
81
|
+
add: string[];
|
|
82
|
+
remove: string[];
|
|
38
83
|
domain: string;
|
|
84
|
+
cloudflareZoneId?: string | undefined;
|
|
39
85
|
contentRepo: string;
|
|
86
|
+
profileKind?: string | undefined;
|
|
87
|
+
embeddingEnabled?: boolean | undefined;
|
|
88
|
+
plugins?: UserConfig["plugins"];
|
|
89
|
+
topicExtractionEnabled?: boolean | undefined;
|
|
90
|
+
skillDerivationEnabled?: boolean | undefined;
|
|
91
|
+
swotDerivationEnabled?: boolean | undefined;
|
|
92
|
+
siteOverride?: ResolvedSiteOverride;
|
|
40
93
|
discordEnabled: boolean;
|
|
41
94
|
discordAnchorUserId?: string;
|
|
42
95
|
effectiveAiApiKey: string;
|
|
43
96
|
effectiveGitSyncToken: string;
|
|
44
|
-
|
|
97
|
+
setup?: ResolvedSetupDelivery;
|
|
98
|
+
atproto?: ResolvedAtprotoConfig;
|
|
99
|
+
playbooks?: ResolvedPlaybooksConfig;
|
|
45
100
|
anchorProfile: ResolvedAnchorProfile;
|
|
46
101
|
snapshotStatus: SnapshotStatus;
|
|
47
102
|
}
|
package/dist/parse-args.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
args: string[];
|
|
4
|
-
flags: {
|
|
5
|
-
help?: boolean | undefined;
|
|
6
|
-
version?: boolean | undefined;
|
|
7
|
-
dryRun?: boolean | undefined;
|
|
8
|
-
pushTo?: string | undefined;
|
|
9
|
-
cohort?: string | undefined;
|
|
10
|
-
anchorId?: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
1
|
+
import { type ParsedCliArgs } from "@brains/deploy-support/cli-kit";
|
|
2
|
+
export type ParsedArgs = ParsedCliArgs;
|
|
13
3
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ReconcileDryRunResult {
|
|
2
|
+
firstPassChangedFiles: string[];
|
|
3
|
+
secondPassChangedFiles: string[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Reconcile an isolated copy twice with external content-repo access disabled.
|
|
7
|
+
* The source repository is never written.
|
|
8
|
+
*/
|
|
9
|
+
export declare function dryRunReconcileAll(rootDir: string): Promise<ReconcileDryRunResult>;
|
package/dist/run-command.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { FetchLike } from "@brains/utils/
|
|
1
|
+
import type { FetchLike } from "@brains/utils/fetch-like";
|
|
2
|
+
import { type CommandDefinition, type FlagDefinitions, type ParsedCliArgs } from "@brains/deploy-support/cli-kit";
|
|
2
3
|
import type { LoadPilotRegistryOptions } from "./load-registry";
|
|
3
4
|
import { type LookupHost } from "./observed-status";
|
|
4
|
-
import type
|
|
5
|
-
import { type RunCommand as OpsRunCommand } from "./run-subprocess";
|
|
5
|
+
import { type RunCommand as OpsRunCommand } from "@brains/deploy-support/run-subprocess";
|
|
6
6
|
import { type SshKeygen } from "./ssh-key-bootstrap";
|
|
7
|
+
import type { PilotOffboardDriver } from "./user-offboard";
|
|
7
8
|
import type { UserRunner } from "./user-runner";
|
|
9
|
+
import type { cleanupDirectorySyncStress, runDeployedDirectorySyncStress, verifyDirectorySyncStressAccess } from "./directory-sync-stress-system";
|
|
10
|
+
import type { cleanupHealthWatchdogSmoke, runHealthWatchdogSmoke } from "./health-watchdog-smoke";
|
|
11
|
+
import type { retireLegacyProjectionJob } from "./legacy-projection-job-recovery";
|
|
8
12
|
export interface CommandResult {
|
|
9
13
|
success: boolean;
|
|
10
14
|
message?: string;
|
|
@@ -15,7 +19,19 @@ export interface CommandDependencies extends LoadPilotRegistryOptions {
|
|
|
15
19
|
logger?: ((message: string) => void) | undefined;
|
|
16
20
|
fetchImpl?: FetchLike | undefined;
|
|
17
21
|
lookupHost?: LookupHost | undefined;
|
|
22
|
+
verificationRetryAttempts?: number | undefined;
|
|
23
|
+
verificationRetryDelayMs?: number | undefined;
|
|
24
|
+
sleep?: ((delayMs: number) => Promise<void>) | undefined;
|
|
18
25
|
bootstrapRunCommand?: OpsRunCommand | undefined;
|
|
19
26
|
sshKeygen?: SshKeygen | undefined;
|
|
27
|
+
directorySyncStressRunner?: typeof runDeployedDirectorySyncStress | undefined;
|
|
28
|
+
directorySyncStressAccessRunner?: typeof verifyDirectorySyncStressAccess | undefined;
|
|
29
|
+
directorySyncStressCleanupRunner?: typeof cleanupDirectorySyncStress | undefined;
|
|
30
|
+
healthWatchdogSmokeRunner?: typeof runHealthWatchdogSmoke | undefined;
|
|
31
|
+
healthWatchdogSmokeCleanupRunner?: typeof cleanupHealthWatchdogSmoke | undefined;
|
|
32
|
+
legacyProjectionJobRecoveryRunner?: typeof retireLegacyProjectionJob | undefined;
|
|
33
|
+
pilotOffboardDriver?: PilotOffboardDriver | undefined;
|
|
20
34
|
}
|
|
21
|
-
export declare
|
|
35
|
+
export declare const globalFlags: FlagDefinitions;
|
|
36
|
+
export declare const commands: readonly CommandDefinition<CommandDependencies, CommandResult>[];
|
|
37
|
+
export declare function runCommand(parsed: ParsedCliArgs, dependencies?: CommandDependencies): Promise<CommandResult>;
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,186 +1,149 @@
|
|
|
1
|
-
import { z } from "@brains/utils";
|
|
2
|
-
export declare const presetSchema: z.ZodEnum<["core", "default", "pro"]>;
|
|
1
|
+
import { z } from "@brains/utils/zod";
|
|
3
2
|
export declare const exactVersionSchema: z.ZodString;
|
|
4
3
|
export declare const handleSchema: z.ZodString;
|
|
5
4
|
export declare const secretNameSchema: z.ZodString;
|
|
6
5
|
export declare const agePublicKeySchema: z.ZodString;
|
|
6
|
+
export declare const CAPABILITY_BUNDLE_CONTRACT: "capability-bundles-v1";
|
|
7
|
+
export declare const canonicalBundleIdSchema: z.ZodEnum<{
|
|
8
|
+
core: "core";
|
|
9
|
+
media: "media";
|
|
10
|
+
automation: "automation";
|
|
11
|
+
web: "web";
|
|
12
|
+
chat: "chat";
|
|
13
|
+
site: "site";
|
|
14
|
+
publishing: "publishing";
|
|
15
|
+
federation: "federation";
|
|
16
|
+
team: "team";
|
|
17
|
+
}>;
|
|
18
|
+
export type CanonicalBundleId = z.output<typeof canonicalBundleIdSchema>;
|
|
19
|
+
/**
|
|
20
|
+
* The profile kinds the runtime's profile plugin registers. A user config
|
|
21
|
+
* selecting anything else composes a brain that fails at boot, so reject it
|
|
22
|
+
* at parse time. Kept in lockstep with @brains/profile BUILT_IN_PROFILE_KINDS
|
|
23
|
+
* by a test. Collective/organization brains use "organization".
|
|
24
|
+
*/
|
|
25
|
+
export declare const PROFILE_KINDS: readonly ["professional", "team", "organization"];
|
|
26
|
+
export declare const profileKindSchema: z.ZodEnum<{
|
|
27
|
+
professional: "professional";
|
|
28
|
+
team: "team";
|
|
29
|
+
organization: "organization";
|
|
30
|
+
}>;
|
|
31
|
+
declare const canonicalBundlesSchema: z.ZodArray<typeof canonicalBundleIdSchema>;
|
|
32
|
+
declare const memberIdsSchema: z.ZodArray<z.ZodString>;
|
|
33
|
+
/** Sole active desired-state contract for the canonical brain. */
|
|
7
34
|
export declare const pilotSchema: z.ZodObject<{
|
|
8
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
9
35
|
brainVersion: z.ZodString;
|
|
10
|
-
|
|
36
|
+
bundleContract: z.ZodLiteral<typeof CAPABILITY_BUNDLE_CONTRACT>;
|
|
37
|
+
bundles: typeof canonicalBundlesSchema;
|
|
38
|
+
add: z.ZodOptional<typeof memberIdsSchema>;
|
|
39
|
+
remove: z.ZodOptional<typeof memberIdsSchema>;
|
|
11
40
|
githubOrg: z.ZodString;
|
|
12
41
|
contentRepoPrefix: z.ZodString;
|
|
13
42
|
domainSuffix: z.ZodString;
|
|
14
|
-
preset: z.ZodEnum<["core", "default", "pro"]>;
|
|
15
43
|
aiApiKey: z.ZodString;
|
|
16
44
|
gitSyncToken: z.ZodString;
|
|
17
45
|
contentRepoAdminToken: z.ZodString;
|
|
18
|
-
mcpAuthToken: z.ZodString;
|
|
19
46
|
agePublicKey: z.ZodString;
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
export type PilotConfig = z.output<typeof pilotSchema>;
|
|
49
|
+
export declare const cohortSchema: z.ZodObject<{
|
|
50
|
+
members: z.ZodArray<z.ZodString>;
|
|
51
|
+
brainVersionOverride: z.ZodOptional<z.ZodString>;
|
|
52
|
+
bundlesOverride: z.ZodOptional<typeof canonicalBundlesSchema>;
|
|
53
|
+
addOverride: z.ZodOptional<typeof memberIdsSchema>;
|
|
54
|
+
removeOverride: z.ZodOptional<typeof memberIdsSchema>;
|
|
55
|
+
aiApiKeyOverride: z.ZodOptional<z.ZodString>;
|
|
56
|
+
gitSyncTokenOverride: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
export type CohortConfig = z.output<typeof cohortSchema>;
|
|
59
|
+
declare const anchorProfileSocialLinkSchema: z.ZodObject<{
|
|
60
|
+
platform: z.ZodEnum<{
|
|
61
|
+
github: "github";
|
|
62
|
+
instagram: "instagram";
|
|
63
|
+
linkedin: "linkedin";
|
|
64
|
+
email: "email";
|
|
65
|
+
website: "website";
|
|
66
|
+
}>;
|
|
67
|
+
url: z.ZodString;
|
|
68
|
+
label: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}>;
|
|
70
|
+
declare const anchorProfileSchema: z.ZodObject<{
|
|
71
|
+
name: z.ZodOptional<z.ZodString>;
|
|
72
|
+
description: z.ZodOptional<z.ZodString>;
|
|
73
|
+
website: z.ZodOptional<z.ZodString>;
|
|
74
|
+
email: z.ZodOptional<z.ZodString>;
|
|
75
|
+
story: z.ZodOptional<z.ZodString>;
|
|
76
|
+
socialLinks: z.ZodOptional<z.ZodArray<typeof anchorProfileSocialLinkSchema>>;
|
|
77
|
+
}>;
|
|
78
|
+
declare const setupDeliverySchema: z.ZodObject<{
|
|
79
|
+
delivery: z.ZodLiteral<"email">;
|
|
80
|
+
email: z.ZodString;
|
|
46
81
|
}>;
|
|
82
|
+
declare const atprotoJetstreamSchema: z.ZodObject<{
|
|
83
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
85
|
+
replayWindowSeconds: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
denyDids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
denyDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
skillKeywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
queueLimit: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
perDidCooldownSeconds: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
fetchBudgetPerMinute: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
newAgentsPerHour: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
pendingCandidateCeiling: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
staleCandidateRetentionDays: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
maxRedirects: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
retryAttempts: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
heartbeatIntervalHours: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
}>;
|
|
102
|
+
declare const atprotoSchema: z.ZodObject<{
|
|
103
|
+
identifier: z.ZodString;
|
|
104
|
+
accountDid: z.ZodOptional<z.ZodString>;
|
|
105
|
+
lexiconAuthority: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
jetstream: z.ZodOptional<typeof atprotoJetstreamSchema>;
|
|
107
|
+
}>;
|
|
108
|
+
export declare const siteOverrideSchema: z.ZodObject<{
|
|
109
|
+
package: z.ZodString;
|
|
110
|
+
version: z.ZodString;
|
|
111
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
112
|
+
themeVersion: z.ZodOptional<z.ZodString>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
export type SiteOverrideConfig = z.output<typeof siteOverrideSchema>;
|
|
115
|
+
declare const playbooksSchema: z.ZodObject<{
|
|
116
|
+
onboarding: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
}>;
|
|
118
|
+
/** Config transport shape; plugin-owned schemas validate fields in the app. */
|
|
119
|
+
declare const userPluginsSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
47
120
|
export declare const userSchema: z.ZodObject<{
|
|
48
121
|
handle: z.ZodString;
|
|
49
122
|
discord: z.ZodObject<{
|
|
50
123
|
enabled: z.ZodBoolean;
|
|
51
124
|
anchorUserId: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, "strict", z.ZodTypeAny, {
|
|
53
|
-
enabled: boolean;
|
|
54
|
-
anchorUserId?: string | undefined;
|
|
55
|
-
}, {
|
|
56
|
-
enabled: boolean;
|
|
57
|
-
anchorUserId?: string | undefined;
|
|
58
125
|
}>;
|
|
59
126
|
aiApiKeyOverride: z.ZodOptional<z.ZodString>;
|
|
60
127
|
gitSyncTokenOverride: z.ZodOptional<z.ZodString>;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
url: string;
|
|
78
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
79
|
-
label?: string | undefined;
|
|
80
|
-
}>, "many">>;
|
|
81
|
-
}, "strict", z.ZodTypeAny, {
|
|
82
|
-
name?: string | undefined;
|
|
83
|
-
email?: string | undefined;
|
|
84
|
-
website?: string | undefined;
|
|
85
|
-
description?: string | undefined;
|
|
86
|
-
story?: string | undefined;
|
|
87
|
-
socialLinks?: {
|
|
88
|
-
url: string;
|
|
89
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
90
|
-
label?: string | undefined;
|
|
91
|
-
}[] | undefined;
|
|
92
|
-
}, {
|
|
93
|
-
name?: string | undefined;
|
|
94
|
-
email?: string | undefined;
|
|
95
|
-
website?: string | undefined;
|
|
96
|
-
description?: string | undefined;
|
|
97
|
-
story?: string | undefined;
|
|
98
|
-
socialLinks?: {
|
|
99
|
-
url: string;
|
|
100
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
101
|
-
label?: string | undefined;
|
|
102
|
-
}[] | undefined;
|
|
103
|
-
}>>;
|
|
104
|
-
}, "strict", z.ZodTypeAny, {
|
|
105
|
-
handle: string;
|
|
106
|
-
discord: {
|
|
107
|
-
enabled: boolean;
|
|
108
|
-
anchorUserId?: string | undefined;
|
|
109
|
-
};
|
|
110
|
-
aiApiKeyOverride?: string | undefined;
|
|
111
|
-
gitSyncTokenOverride?: string | undefined;
|
|
112
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
113
|
-
anchorProfile?: {
|
|
114
|
-
name?: string | undefined;
|
|
115
|
-
email?: string | undefined;
|
|
116
|
-
website?: string | undefined;
|
|
117
|
-
description?: string | undefined;
|
|
118
|
-
story?: string | undefined;
|
|
119
|
-
socialLinks?: {
|
|
120
|
-
url: string;
|
|
121
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
122
|
-
label?: string | undefined;
|
|
123
|
-
}[] | undefined;
|
|
124
|
-
} | undefined;
|
|
125
|
-
}, {
|
|
126
|
-
handle: string;
|
|
127
|
-
discord: {
|
|
128
|
-
enabled: boolean;
|
|
129
|
-
anchorUserId?: string | undefined;
|
|
130
|
-
};
|
|
131
|
-
aiApiKeyOverride?: string | undefined;
|
|
132
|
-
gitSyncTokenOverride?: string | undefined;
|
|
133
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
134
|
-
anchorProfile?: {
|
|
135
|
-
name?: string | undefined;
|
|
136
|
-
email?: string | undefined;
|
|
137
|
-
website?: string | undefined;
|
|
138
|
-
description?: string | undefined;
|
|
139
|
-
story?: string | undefined;
|
|
140
|
-
socialLinks?: {
|
|
141
|
-
url: string;
|
|
142
|
-
platform: "github" | "instagram" | "linkedin" | "email" | "website";
|
|
143
|
-
label?: string | undefined;
|
|
144
|
-
}[] | undefined;
|
|
145
|
-
} | undefined;
|
|
146
|
-
}>;
|
|
147
|
-
export declare const cohortSchema: z.ZodEffects<z.ZodObject<{
|
|
148
|
-
members: z.ZodArray<z.ZodString, "many">;
|
|
149
|
-
brainVersionOverride: z.ZodOptional<z.ZodString>;
|
|
150
|
-
presetOverride: z.ZodOptional<z.ZodEnum<["core", "default", "pro"]>>;
|
|
151
|
-
aiApiKeyOverride: z.ZodOptional<z.ZodString>;
|
|
152
|
-
gitSyncTokenOverride: z.ZodOptional<z.ZodString>;
|
|
153
|
-
mcpAuthTokenOverride: z.ZodOptional<z.ZodString>;
|
|
154
|
-
}, "strict", z.ZodTypeAny, {
|
|
155
|
-
members: string[];
|
|
156
|
-
aiApiKeyOverride?: string | undefined;
|
|
157
|
-
gitSyncTokenOverride?: string | undefined;
|
|
158
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
159
|
-
brainVersionOverride?: string | undefined;
|
|
160
|
-
presetOverride?: "default" | "core" | "pro" | undefined;
|
|
161
|
-
}, {
|
|
162
|
-
members: string[];
|
|
163
|
-
aiApiKeyOverride?: string | undefined;
|
|
164
|
-
gitSyncTokenOverride?: string | undefined;
|
|
165
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
166
|
-
brainVersionOverride?: string | undefined;
|
|
167
|
-
presetOverride?: "default" | "core" | "pro" | undefined;
|
|
168
|
-
}>, {
|
|
169
|
-
members: string[];
|
|
170
|
-
aiApiKeyOverride?: string | undefined;
|
|
171
|
-
gitSyncTokenOverride?: string | undefined;
|
|
172
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
173
|
-
brainVersionOverride?: string | undefined;
|
|
174
|
-
presetOverride?: "default" | "core" | "pro" | undefined;
|
|
175
|
-
}, {
|
|
176
|
-
members: string[];
|
|
177
|
-
aiApiKeyOverride?: string | undefined;
|
|
178
|
-
gitSyncTokenOverride?: string | undefined;
|
|
179
|
-
mcpAuthTokenOverride?: string | undefined;
|
|
180
|
-
brainVersionOverride?: string | undefined;
|
|
181
|
-
presetOverride?: "default" | "core" | "pro" | undefined;
|
|
128
|
+
domainOverride: z.ZodOptional<z.ZodString>;
|
|
129
|
+
cloudflareZoneId: z.ZodOptional<z.ZodString>;
|
|
130
|
+
contentRepoOverride: z.ZodOptional<z.ZodString>;
|
|
131
|
+
profileKind: z.ZodOptional<typeof profileKindSchema>;
|
|
132
|
+
plugins: z.ZodOptional<typeof userPluginsSchema>;
|
|
133
|
+
embeddingEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
+
topicExtractionEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
skillDerivationEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
swotDerivationEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
addOverride: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
removeOverride: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
siteOverride: z.ZodOptional<typeof siteOverrideSchema>;
|
|
140
|
+
setup: z.ZodOptional<typeof setupDeliverySchema>;
|
|
141
|
+
atproto: z.ZodOptional<typeof atprotoSchema>;
|
|
142
|
+
playbooks: z.ZodOptional<typeof playbooksSchema>;
|
|
143
|
+
anchorProfile: z.ZodOptional<typeof anchorProfileSchema>;
|
|
182
144
|
}>;
|
|
183
|
-
export type
|
|
184
|
-
export type UserConfig = z.
|
|
185
|
-
export type
|
|
186
|
-
export type
|
|
145
|
+
export type PilotConfigInput = z.input<typeof pilotSchema>;
|
|
146
|
+
export type UserConfig = z.output<typeof userSchema>;
|
|
147
|
+
export type UserConfigInput = z.input<typeof userSchema>;
|
|
148
|
+
export type CohortConfigInput = z.input<typeof cohortSchema>;
|
|
149
|
+
export {};
|
|
@@ -1,21 +1,15 @@
|
|
|
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>;
|
|
5
|
+
discordPublicKey: z.ZodOptional<z.ZodString>;
|
|
6
|
+
discordApplicationId: z.ZodOptional<z.ZodString>;
|
|
6
7
|
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;
|
|
8
|
+
atprotoAppPassword: z.ZodOptional<z.ZodString>;
|
|
9
|
+
certificatePem: z.ZodOptional<z.ZodString>;
|
|
10
|
+
privateKeyPem: z.ZodOptional<z.ZodString>;
|
|
17
11
|
}>;
|
|
18
|
-
export type EncryptedUserSecrets = z.
|
|
12
|
+
export type EncryptedUserSecrets = z.output<typeof encryptedUserSecretsSchema>;
|
|
19
13
|
export interface SecretsEncryptOptions {
|
|
20
14
|
env?: NodeJS.ProcessEnv | undefined;
|
|
21
15
|
logger?: ((message: string) => void) | undefined;
|
package/dist/secrets-push.d.ts
CHANGED
|
@@ -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,25 @@
|
|
|
1
|
+
import { z } from "@brains/utils/zod";
|
|
2
|
+
import { type CapabilityBundleReview } from "./capability-bundle-migration";
|
|
3
|
+
import { siteOverrideSchema } from "./schema";
|
|
4
|
+
export interface StagedCrossover {
|
|
5
|
+
outputDir: string;
|
|
6
|
+
changedFiles: string[];
|
|
7
|
+
}
|
|
8
|
+
declare const reviewedSitePinsSchema: z.ZodObject<{
|
|
9
|
+
sites: z.ZodRecord<z.ZodString, typeof siteOverrideSchema>;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
type ReviewedSitePinManifest = z.output<typeof reviewedSitePinsSchema>;
|
|
12
|
+
export type ReviewedSitePins = ReviewedSitePinManifest["sites"];
|
|
13
|
+
export interface StageLegacyCrossoverOptions {
|
|
14
|
+
sitePins?: ReviewedSitePins | undefined;
|
|
15
|
+
bundleReview?: CapabilityBundleReview | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare function parseReviewedSitePins(input: string): ReviewedSitePins;
|
|
18
|
+
export declare function loadReviewedSitePins(filePath: string): Promise<ReviewedSitePins>;
|
|
19
|
+
export declare function loadCapabilityBundleReview(filePath: string): Promise<CapabilityBundleReview>;
|
|
20
|
+
/**
|
|
21
|
+
* Build a complete review copy without mutating the source repository.
|
|
22
|
+
* This is offline migration tooling; active desired-state loading is canonical-only.
|
|
23
|
+
*/
|
|
24
|
+
export declare function stageLegacyCrossover(sourceDir: string, outputDir: string, options?: StageLegacyCrossoverOptions): Promise<StagedCrossover>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface StressCommandOptions {
|
|
2
|
+
cwd?: string;
|
|
3
|
+
env?: NodeJS.ProcessEnv;
|
|
4
|
+
stdin?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StressCommandResult {
|
|
7
|
+
exitCode: number;
|
|
8
|
+
stdout: string;
|
|
9
|
+
stderr: string;
|
|
10
|
+
}
|
|
11
|
+
export type StressCommandRunner = (command: string, args: readonly string[], options?: StressCommandOptions) => Promise<StressCommandResult>;
|
|
12
|
+
export declare const runStressCommand: StressCommandRunner;
|
|
13
|
+
export declare function requireCommand(runner: StressCommandRunner, command: string, args: readonly string[], options?: StressCommandOptions): Promise<StressCommandResult>;
|
|
14
|
+
export declare function commandError(command: string, args: readonly string[], result: StressCommandResult): Error;
|