@domino-sdk/relay-cli 0.1.0 → 0.3.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/cli/doctor.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { dirname, join, resolve } from "node:path";
3
- import { access } from "node:fs/promises";
3
+ import { createHash } from "node:crypto";
4
+ import { access, readFile } from "node:fs/promises";
4
5
  import { inspectAgentSkills } from "./agents.mjs";
5
6
  import { request } from "./connection.mjs";
6
7
 
@@ -18,6 +19,54 @@ export async function diagnose({ project, connection, options }) {
18
19
  },
19
20
  );
20
21
 
22
+ const versions = {
23
+ cli: JSON.parse(
24
+ await readFile(new URL("../package.json", import.meta.url), "utf8"),
25
+ ).version,
26
+ };
27
+ let starterRecorded = false;
28
+ try {
29
+ const release = JSON.parse(
30
+ await readFile(join(root, ".domino/release.json"), "utf8"),
31
+ );
32
+ starterRecorded = true;
33
+ for (const pkg of release.packages) {
34
+ if (!/^\.domino\/[a-z]+\.tgz$/.test(pkg.archive))
35
+ throw new Error("Unexpected starter archive path.");
36
+ const digest = createHash("sha256")
37
+ .update(await readFile(join(root, pkg.archive)))
38
+ .digest("hex");
39
+ if (digest !== pkg.sha256 || pkg.version === "0.0.0")
40
+ throw new Error(
41
+ "Starter package integrity or version check failed. Restore the verified starter archives.",
42
+ );
43
+ versions[pkg.name] = pkg.version;
44
+ }
45
+ const lockfile = createHash("sha256")
46
+ .update(await readFile(join(root, "pnpm-lock.yaml")))
47
+ .digest("hex");
48
+ checks.push({
49
+ id: "starter-integrity",
50
+ status: "ok",
51
+ message: "Starter archives match their recorded versions and hashes.",
52
+ sourceCommit: release.sourceCommit,
53
+ modifiedSource: release.dirty,
54
+ });
55
+ if (lockfile !== release.lockfileSha256)
56
+ checks.push({
57
+ id: "starter-lockfile",
58
+ status: "warning",
59
+ message:
60
+ "Dependencies have changed since the starter was verified. Run the app checks and verify a participant action.",
61
+ });
62
+ } catch (error) {
63
+ if (error.code !== "ENOENT" || starterRecorded)
64
+ checks.push({
65
+ id: "starter-integrity",
66
+ status: "error",
67
+ message: error.message,
68
+ });
69
+ }
21
70
  const agents = await inspectAgentSkills(root);
22
71
  checks.push(
23
72
  Object.values(agents).some((status) =>
@@ -84,7 +133,7 @@ export async function diagnose({ project, connection, options }) {
84
133
  });
85
134
  }
86
135
  }
87
- if (project.config.app) {
136
+ if (project.config.app && options.offline) {
88
137
  for (const dependency of [
89
138
  "@domino-sdk/relay-runtime/package.json",
90
139
  "wrangler/package.json",
@@ -111,6 +160,10 @@ export async function diagnose({ project, connection, options }) {
111
160
  }
112
161
 
113
162
  let remoteAccess = "not-checked";
163
+ let readiness = {
164
+ development: { status: "not-checked" },
165
+ staging: "not-checked",
166
+ };
114
167
  if (options.remote && project) {
115
168
  try {
116
169
  const value = await request(connection, "/access");
@@ -129,8 +182,36 @@ export async function diagnose({ project, connection, options }) {
129
182
  id: "remote-access",
130
183
  status: "ok",
131
184
  message:
132
- "Management API verified project access. This does not verify participant sign-in or publication permission.",
185
+ "Management API verified project access. This does not verify participant sign-in or publication permission. Management credentials cannot issue participant sessions. Existing-login integration requires a dedicated server key and createParticipantBackend; run domino capabilities identity-exchange.",
133
186
  });
187
+ const preflight = await request(connection, "/preflight");
188
+ readiness = {
189
+ development: preflight.development,
190
+ staging: preflight.staging,
191
+ identity: preflight.identity ?? { exchange: "unknown" },
192
+ };
193
+ if (project.config.app)
194
+ checks.push({
195
+ id: "shared-preview",
196
+ status:
197
+ preflight.development?.status === "configured" ? "ok" : "error",
198
+ message:
199
+ preflight.development?.status === "configured"
200
+ ? "Shared development hosting is configured. Run domino dev to verify the public connection."
201
+ : "A Domino operator must configure shared development hosting before domino dev can start.",
202
+ missing: preflight.development?.missing ?? [],
203
+ });
204
+ checks.push(
205
+ ...preflight.checks.map((check) =>
206
+ !project.config.app &&
207
+ ["cloud-builds", "repository", "hosted-test-auth"].includes(
208
+ check.id,
209
+ ) &&
210
+ check.status === "error"
211
+ ? { ...check, status: "warning" }
212
+ : check,
213
+ ),
214
+ );
134
215
  } catch (error) {
135
216
  remoteAccess = "failed";
136
217
  checks.push({
@@ -143,9 +224,16 @@ export async function diagnose({ project, connection, options }) {
143
224
  }
144
225
  return {
145
226
  directory: root,
227
+ versions,
146
228
  healthy: checks.every((check) => check.status !== "error"),
147
- scope: connection,
229
+ scope: {
230
+ apiUrl: connection.apiUrl,
231
+ organization: connection.organization,
232
+ project: connection.project,
233
+ environment: connection.environment,
234
+ },
148
235
  agents,
236
+ readiness,
149
237
  remoteAccess,
150
238
  preview: project?.config.app
151
239
  ? "static-app-configured"
@@ -21,10 +21,14 @@ Choose the reference that matches the task:
21
21
  - For integration into an existing codebase, read [existing apps](references/existing-app.md).
22
22
  - For quest definitions, reusable types, collections, or publication, read [authoring](references/authoring.md).
23
23
 
24
- If no CLI is installed, use the project's documented package installation path. The current SDK and CLI are private packages distributed with standalone starter archives. Do not invent a public npm install command. Report the missing distribution if no package source is available.
24
+ Before designing referrals, rankings, milestones, or rewards for another participant, run `domino capabilities --json`. Read `domino capabilities <id> --json` for the support boundary. Treat an unlisted capability as unknown and inspect its contract before promising it.
25
+
26
+ For browser integration and submission recovery, read [participant API](references/participant-api.md). For referral campaigns, read [referrals](references/referrals.md). For startup, staging, or version failures, read [troubleshooting](references/troubleshooting.md).
27
+
28
+ If no CLI is installed, install `@domino-sdk/relay-cli` and `@domino-sdk/relay` through the app's package manager. Starter archives pin the packages they were verified with; retain their lockfile and `.domino/release.json` when diagnosing compatibility.
25
29
 
26
30
  ## Verify the result
27
31
 
28
32
  Run the app's checks and exercise the requested participant action through the running app. Verify the resulting progress or completion state. Keep fixture-provider results distinct from real external verification.
29
33
 
30
- Return the working preview or local URL, what participant action you verified, and any remaining launch dependency. A successful build, installed skill, or healthy doctor result is not proof of participant behavior. Live publication requires human review in Console; hosted staging is a simulation.
34
+ Return the working preview or local URL, what participant action you verified, and any remaining launch dependency. A successful build, installed skill, or healthy doctor result is not proof of participant behavior. Live publication requires human review in Console; hosted staging uses test data and real sign-in.
@@ -12,8 +12,10 @@ Add the SDK to the package that owns the authored modules using the app's packag
12
12
 
13
13
  For participant UI, inspect the installed `@domino-sdk/relay` and `@domino-sdk/relay/browser` exports. Use the supplied quest controllers for submissions, recovery, and changed rules. Keep stable quest IDs and collection slots. Participants explicitly review changed rules before resubmitting.
14
14
 
15
- Keep the application's existing login. Map its authenticated user through a supported trusted backend identity integration. Determine the server credential and allowed project scope before implementing that exchange. Browser-provided user IDs are not verified identities. Management tokens belong only on trusted servers or in CLI credentials, never browser bundles.
15
+ Keep the application's existing login using `createParticipantBackend` on its server. Read [participant authentication and routing](participant-api.md) for the complete route example. Implement `authenticate(request)` using the app's existing server session verifier and return its stable user ID. Never accept a user ID from browser input as proof of identity.
16
16
 
17
- For same-origin participant routing, inspect `@domino-sdk/relay/portal-proxy` and the app's server route conventions. Its proxy allowlist excludes management routes. Verify session transport, sign-in callbacks where relevant, and a participant action through that boundary. If production identity provisioning is unavailable, report that dependency explicitly and keep the demonstration scoped to test.
17
+ An organization administrator creates an identity integration in Console Settings, under "Use your app's login", for the selected project and environment. The user saves the shown key directly in the application's server secret settings as DOMINO_IDENTITY_KEY. The key is shown once; keep it out of agent chat, source control and browser bundles. CLI and personal management credentials cannot create these keys or substitute for them. Readiness requires the deployed API and SDK versions supporting `identity-exchange`; a legacy 404 is an upgrade issue.
18
+
19
+ Mount the adapter at `/relay/*` and use `createBrowserRelayClient({ baseUrl: "/relay" })`. Verify a signed-in session, one participant action, and that logging out of the application removes access. The adapter checks application authentication on every request and derives project scope from the integration key. No custom fetch wrapper or browser project headers are needed.
18
20
 
19
21
  Read [authoring](authoring.md) when adding quests or collection slots. Run the app's normal checks and development server. Use its existing preview deployment process when available. `domino deploy` publishes Domino behavior; it does not deploy the app. `domino stage` requires a supported Domino-hosted static repository, so it is not a general deployment command for existing apps.
@@ -6,7 +6,7 @@ For a failure after remote project creation, inspect the existing project's stat
6
6
 
7
7
  Install dependencies from the lockfile. The starter includes pinned SDK, CLI, and local-runtime archives in `.domino`; upgrade them through a platform package release rather than modifying their contents. Read CAMPAIGN.md for the owner's brief.
8
8
 
9
- Run `domino dev` for the isolated local runtime and participant app. Local preview identities and fixture providers simulate participation. Keep demonstration content separate from the owner's live catalog.
9
+ Run `domino dev` to start the app with hosted test data and real sign-in. Share its HTTPS preview URL. The CLI prepares the tunnel connector automatically. The URL goes offline when development stops; use `domino stage` for a preview that stays online. Use `domino dev --offline --review-mode fixture-pass` only when you explicitly need an isolated runtime with simulated photo verification. This is not evidence that an external action happened.
10
10
 
11
11
  Use `domino check` and the app's build script to verify source. Exercise the requested participant flow in the running app before staging.
12
12
 
@@ -14,4 +14,4 @@ When the task includes sharing a preview, commit the intended changes and push u
14
14
 
15
15
  If stage submission loses its response, repeat the printed commit and request ID. Use `domino builds --json` and `domino logs <build-id> --json` to recover progress after disconnecting. A failed build leaves the previous preview active. Report the URL returned for the successful build rather than constructing one.
16
16
 
17
- Cloud staging supports the starter's static app contract. It does not host arbitrary SSR or customer Worker code. Staging uses separate simulated participant data and does not prove live provider readiness. Hosted app live activation remains a separate platform milestone.
17
+ Cloud staging supports the starter's static app contract. It does not host arbitrary SSR or customer Worker code. New staging builds use the same project test data as development and real participant sign-in. Existing previews created before this update remain simulated until rebuilt. Test data does not imply that external provider operations are simulated. Hosted app live activation remains a separate platform milestone.
@@ -0,0 +1,64 @@
1
+ # Participant API
2
+
3
+ Create `createBrowserRelayClient({ baseUrl: "/relay" })` from `@domino-sdk/relay/browser`. The browser client uses cookies and durable submission recovery. The app's server must route `/relay` through the supported participant proxy. Management tokens are not participant credentials.
4
+
5
+ ## Sign in
6
+
7
+ Call `relay.auth.providers()` to discover configured providers and email availability. For OAuth, call `relay.auth.start(provider, "sign-in")` and navigate to its returned `url`. For email, call `emailStart(email)`, then `emailVerify(challenge, code)` using the returned challenge. `auth.session()` returns the current session or null. `auth.signOut()` clears the session.
8
+
9
+ Email codes and OAuth consent belong to the participant. Let the user complete sign-in in their browser, then verify the resulting session and action. When that has not happened, report sign-in as unverified.
10
+
11
+ ## Existing application login
12
+
13
+ Mount this handler on the application's **server** at `/relay/*`. Use the app's existing session verifier. Its subject must be a stable, non-recycled account ID, not an email or browser-submitted value.
14
+
15
+ ```ts
16
+ import { createParticipantBackend } from "@domino-sdk/relay/portal-proxy";
17
+ import { verifyAppSession } from "./your-existing-server-auth";
18
+
19
+ export const participant = createParticipantBackend({
20
+ baseUrl: "https://relay.domino.run",
21
+ origin: "https://app.example.com",
22
+ integrationKey: process.env.DOMINO_IDENTITY_KEY!,
23
+ authenticate: async (request) => {
24
+ const user = await verifyAppSession(request);
25
+ return user ? { subject: user.id } : null;
26
+ },
27
+ });
28
+ // Wire your framework's GET and POST /relay/* handlers to participant(request).
29
+ ```
30
+
31
+ A Console organization administrator selects the project and environment, opens Settings → Use your app's login, and registers the exact HTTPS application origin. Save the key directly in server secret settings. It is shown once and expires in 90 days. "Replace key" immediately disables the old key while preserving participant identities. "Disconnect" invalidates its sessions too. Recreating an integration creates a new identity namespace; rotate the existing integration to preserve identity continuity.
32
+
33
+ The adapter authenticates the app's session on every request. It exchanges the verified subject using the dedicated integration key, reuses a matching participant session, and keeps its token in a Secure, HttpOnly cookie. Account switching cannot reuse another user's participant session. Application logout removes access on the next request. Use the application's login/logout UI; this adapter does not expose Domino email or OAuth login flows or account linking.
34
+
35
+ The browser still uses `createBrowserRelayClient({ baseUrl: "/relay" })`. Requests must reach the server with the configured HTTPS origin. Mutation requests require the matching Origin and X-Relay-CSRF headers, supplied by the browser client. Never cache these responses.
36
+
37
+ `doctor --remote` checks management and hosting configuration, not the app's session verifier or integration key. Verify `auth.session()`, a participant action, and access after application logout. CLI credentials and personal management tokens are not identity integration keys.
38
+
39
+ ## Server routing and scope
40
+
41
+ The adapter uses `POST /v1/auth/exchange` with `{ subject, previousToken? }` and the integration key as a server bearer credential. Scope and the member role come from the registered integration, never from request input. It adds a server-only integration header when proxying participant requests. A plain exchange result is not a substitute for configuring that routing; use the adapter.
42
+
43
+ `https://console.domino.run/relay` proxies management requests only. Use the participant API origin for the adapter. The lower-level `proxyParticipant` remains available for deployments with preconfigured participant routing; it deliberately excludes browser Authorization and organization/project/environment selectors.
44
+
45
+ ## Display and complete quests
46
+
47
+ Use `relay.quests.observe(listener)` for the participant's experience. Render the observation's state; dispose the observer when the view unmounts. Read `relay.quests.experience()` for a single snapshot. Open a returned QuestView with `await relay.quests.open(view)`.
48
+
49
+ The controller's `kind` determines its input:
50
+
51
+ | Kind | Action |
52
+ | ------ | --------------------------------------------------------------------- |
53
+ | claim | `submit()` |
54
+ | photo | `submit(file)` with a File |
55
+ | quiz | `submit(answers)` with question IDs mapped to choice IDs |
56
+ | status | Observe only; staff and automatic actions are not participant buttons |
57
+
58
+ Submission results are `submitted` with an attempt, or `quest-updated` with `latest`, `originalDraft`, and a compatible `draft`. On quest-updated, show the new requirements and ask the participant to submit again. Submission receipt is not completion: verification or human review can still be pending.
59
+
60
+ ## Recover without duplicate actions
61
+
62
+ `controller.status()` returns `empty`, `needs-review`, `pending` with upload/claim stage, or `submitted` with attempt ID. `needs-review` means the saved draft needs the participant's review, not that a moderator is reviewing it. Use `resume()` to recover a saved operation after reload or a lost response. Use `relay.quests.retry(view)` only for a failed verification attempt. Do not invent a new submission to recover an uncertain response.
63
+
64
+ Use `relay.me.observeProgress(listener)` for balances, completion and rewards. Dispose observers on unmount. Sign-in changes clear old participant observations. Render 401 as a sign-in request, 403 as an access issue, and transient failures with a retry that preserves the saved draft. IndexedDB and Web Locks must be available for durable browser submissions.
@@ -0,0 +1,15 @@
1
+ # Build a referral campaign
2
+
3
+ Read `domino capabilities referrals --json` and `domino capabilities cross-participant-rewards --json` before committing to the reward design. Domino currently supports participant identity, quest completion, points for that participant, and human review. It does not implement referral attribution, inviter-targeted rewards, or queue ranking.
4
+
5
+ ## Supported division of work
6
+
7
+ Your application backend owns a referral record with `inviteCode`, `inviterMemberId`, `inviteeMemberId`, `project`, `environment`, `createdAt`, and `status`. Generate opaque invite codes server-side. Authenticate both participants through their own sessions. Resolve the invitee from the verified session, never a browser-supplied member ID. Reject self-referrals and enforce a unique invitee attribution within the campaign. Record the terms and time of attribution so retries cannot replace the inviter.
8
+
9
+ The participant app can capture an invite code from a landing URL and submit it to that backend after sign-in. Treat the captured code as a claim until validated. Your backend can present pending claims to a human reviewer. Keep attribution storage and review in the application until a supported Domino attribution contract exists.
10
+
11
+ Domino can independently reward the invitee for a supported quest, such as joining the campaign. A Domino quest reward cannot credit the inviter instead. If inviter rewards are mandatory, build and operate an application-owned reward ledger with idempotent grants, or defer that part of the campaign. Do not describe manual attribution as automatic verification. Quiz answers are constrained choice evidence, not a general arbitrary JSON submission API.
12
+
13
+ ## Verify with real people
14
+
15
+ Have two people sign in through the app and follow an invite. Verify the stored attribution, duplicate handling, and self-referral rejection. Check that the invitee's quest completion persists after refresh. Show the owner precisely which rewards Domino executes and which remain application-owned. A campaign is not complete if promised inviter rewards have no executor.
@@ -0,0 +1,13 @@
1
+ # Development and staging diagnostics
2
+
3
+ Start with `domino doctor --json`. Add `--remote` to verify project access, publication permission, hosting configuration and repository readiness. Configuration checks do not prove a successful build or real participant sign-in. If cloud hosting is missing, a Domino operator must configure it; changing quest code will not fix it.
4
+
5
+ `domino check` runs the app's checks and bundles authored entries. `domino deploy --preview --environment test --json` validates the effective deployment against the server without publishing. Test and live data are separate; test does not imply external provider requests are fake.
6
+
7
+ `domino stage` preflights hosting before inspecting the commit. If configured, commit and push the app, then stage the exact commit. Use `domino logs <build-id>` for build failures. Retry an uncertain build submission with the original request ID. Rebuilding cannot fix an unavailable hosting service.
8
+
9
+ For compatibility reports, include `domino --version`, `.domino/release.json`, the lockfile, the command and its error. Exclude credentials and private participant data. Install the starter with its frozen lockfile. `release.json` records package versions and archive hashes; matching version strings alone do not establish that locally modified packages match.
10
+
11
+ If development reports unknown catalog fields at `/releases/batch`, the CLI is using an obsolete startup contract. Upgrade to the corrected CLI. Complete deployment bundles belong at `/deployments/preview`, followed by `/deployments/publish` using the returned ID. Do not strip fields from a user's bundle as a permanent workaround.
12
+
13
+ For existing-login failures, read `domino capabilities identity-exchange` and `domino reference participant-api`. Use a dedicated `di_` identity integration key from Console Settings. A 401 means the key or participant session is invalid, expired, revoked, or belongs to another integration. A 400 rejects malformed input, including attempted scope or role overrides. A 429 asks the server to retry later. Older APIs return 404; upgrade the deployment. The Console `/relay` URL remains management-only. The user's application must use the participant API origin through `createParticipantBackend`.
package/cli.mjs CHANGED
@@ -15,6 +15,7 @@ import { registerApiCommand } from "./cli/commands/api.mjs";
15
15
  import { registerStagingCommands } from "./cli/commands/staging.mjs";
16
16
  import { registerHostingCommands } from "./cli/commands/hosting.mjs";
17
17
  import { registerAgentCommands } from "./cli/commands/agents.mjs";
18
+ import { registerDiscoveryCommands } from "./cli/commands/discovery.mjs";
18
19
  import { credentialHelper } from "./cli/git.mjs";
19
20
 
20
21
  const { version } = JSON.parse(
@@ -28,7 +29,9 @@ if (argv[0] === "credential-helper") {
28
29
  process.stdout.write(await credentialHelper(argv[1], input));
29
30
  process.exit(0);
30
31
  } catch {
31
- process.stderr.write("Domino Git authentication failed. Run domino login.\n");
32
+ process.stderr.write(
33
+ "Domino Git authentication failed. Run domino login.\n",
34
+ );
32
35
  process.exit(1);
33
36
  }
34
37
  }
@@ -94,6 +97,7 @@ registerApiCommand(program);
94
97
  registerHostingCommands(program);
95
98
  registerStagingCommands(program);
96
99
  registerAgentCommands(program);
100
+ registerDiscoveryCommands(program);
97
101
 
98
102
  try {
99
103
  await program.parseAsync(argv, { from: "user" });
package/dist/index.d.ts CHANGED
@@ -32,6 +32,10 @@ declare const stageRequestSchema: z.ZodObject<{
32
32
  requestId: z.ZodString;
33
33
  }, z.core.$strict>;
34
34
  declare const buildIdentitySchema: z.ZodObject<{
35
+ runtime: z.ZodDefault<z.ZodEnum<{
36
+ simulation: "simulation";
37
+ "hosted-test": "hosted-test";
38
+ }>>;
35
39
  id: z.ZodString;
36
40
  repository: z.ZodString;
37
41
  organization: z.ZodString;
@@ -79,6 +83,41 @@ declare const buildArtifactsSchema: z.ZodObject<{
79
83
  }, z.core.$strict>;
80
84
  type BuildArtifacts = z.infer<typeof buildArtifactsSchema>;
81
85
 
86
+ declare const developmentPreflightSchema: z.ZodObject<{
87
+ organization: z.ZodString;
88
+ project: z.ZodString;
89
+ environment: z.ZodEnum<{
90
+ test: "test";
91
+ live: "live";
92
+ }>;
93
+ identity: z.ZodOptional<z.ZodObject<{
94
+ exchange: z.ZodLiteral<"supported">;
95
+ activeIntegrations: z.ZodNumber;
96
+ }, z.core.$strip>>;
97
+ staging: z.ZodEnum<{
98
+ blocked: "blocked";
99
+ configured: "configured";
100
+ }>;
101
+ development: z.ZodObject<{
102
+ status: z.ZodEnum<{
103
+ blocked: "blocked";
104
+ configured: "configured";
105
+ }>;
106
+ missing: z.ZodArray<z.ZodString>;
107
+ authentication: z.ZodArray<z.ZodString>;
108
+ }, z.core.$strip>;
109
+ checks: z.ZodArray<z.ZodObject<{
110
+ id: z.ZodString;
111
+ status: z.ZodEnum<{
112
+ error: "error";
113
+ ok: "ok";
114
+ }>;
115
+ message: z.ZodString;
116
+ missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
+ issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
118
+ }, z.core.$strip>>;
119
+ }, z.core.$strip>;
120
+
82
121
  declare const environmentSchema: z.ZodEnum<{
83
122
  test: "test";
84
123
  live: "live";
@@ -99,7 +138,21 @@ declare const permissionSchema: z.ZodEnum<{
99
138
  }>;
100
139
  type Permission = z.infer<typeof permissionSchema>;
101
140
  declare const rolePermissions: Record<z.infer<typeof roleSchema>, Permission[]>;
141
+ declare const projectSetupSchema: z.ZodObject<{
142
+ mode: z.ZodEnum<{
143
+ new: "new";
144
+ existing: "existing";
145
+ }>;
146
+ brief: z.ZodString;
147
+ }, z.core.$strict>;
102
148
  declare const projectSchema: z.ZodObject<{
149
+ setup: z.ZodOptional<z.ZodObject<{
150
+ mode: z.ZodEnum<{
151
+ new: "new";
152
+ existing: "existing";
153
+ }>;
154
+ brief: z.ZodString;
155
+ }, z.core.$strict>>;
103
156
  id: z.ZodString;
104
157
  organization: z.ZodString;
105
158
  project: z.ZodString;
@@ -125,6 +178,13 @@ type Project = z.infer<typeof projectSchema>;
125
178
  declare const projectInputSchema: z.ZodObject<{
126
179
  project: z.ZodString;
127
180
  name: z.ZodString;
181
+ setup: z.ZodOptional<z.ZodObject<{
182
+ mode: z.ZodEnum<{
183
+ new: "new";
184
+ existing: "existing";
185
+ }>;
186
+ brief: z.ZodString;
187
+ }, z.core.$strict>>;
128
188
  }, z.core.$strict>;
129
189
  declare const grantSchema: z.ZodObject<{
130
190
  subject: z.ZodString;
@@ -144,6 +204,13 @@ declare const accessSchema: z.ZodObject<{
144
204
  admin: z.ZodBoolean;
145
205
  local: z.ZodBoolean;
146
206
  projects: z.ZodArray<z.ZodObject<{
207
+ setup: z.ZodOptional<z.ZodObject<{
208
+ mode: z.ZodEnum<{
209
+ new: "new";
210
+ existing: "existing";
211
+ }>;
212
+ brief: z.ZodString;
213
+ }, z.core.$strict>>;
147
214
  id: z.ZodString;
148
215
  organization: z.ZodString;
149
216
  project: z.ZodString;
@@ -365,8 +432,8 @@ declare const pageSchema: z.ZodObject<{
365
432
  none: "none";
366
433
  }>;
367
434
  actor: z.ZodOptional<z.ZodEnum<{
368
- member: "member";
369
435
  staff: "staff";
436
+ member: "member";
370
437
  }>>;
371
438
  }, z.core.$strict>, z.ZodObject<{
372
439
  kind: z.ZodLiteral<"automatic">;
@@ -554,7 +621,7 @@ declare const pageSchema: z.ZodObject<{
554
621
  trigger: {
555
622
  kind: "manual";
556
623
  input: "photo" | "quiz" | "none";
557
- actor?: "member" | "staff" | undefined;
624
+ actor?: "staff" | "member" | undefined;
558
625
  } | {
559
626
  kind: "automatic";
560
627
  };
@@ -935,8 +1002,8 @@ declare const memberDetailSchema: z.ZodObject<{
935
1002
  none: "none";
936
1003
  }>;
937
1004
  actor: z.ZodOptional<z.ZodEnum<{
938
- member: "member";
939
1005
  staff: "staff";
1006
+ member: "member";
940
1007
  }>>;
941
1008
  }, z.core.$strict>, z.ZodObject<{
942
1009
  kind: z.ZodLiteral<"automatic">;
@@ -1124,7 +1191,7 @@ declare const memberDetailSchema: z.ZodObject<{
1124
1191
  trigger: {
1125
1192
  kind: "manual";
1126
1193
  input: "photo" | "quiz" | "none";
1127
- actor?: "member" | "staff" | undefined;
1194
+ actor?: "staff" | "member" | undefined;
1128
1195
  } | {
1129
1196
  kind: "automatic";
1130
1197
  };
@@ -1396,8 +1463,8 @@ declare const memberDetailSchema: z.ZodObject<{
1396
1463
  none: "none";
1397
1464
  }>;
1398
1465
  actor: z.ZodOptional<z.ZodEnum<{
1399
- member: "member";
1400
1466
  staff: "staff";
1467
+ member: "member";
1401
1468
  }>>;
1402
1469
  }, z.core.$strict>, z.ZodObject<{
1403
1470
  kind: z.ZodLiteral<"automatic">;
@@ -1646,7 +1713,7 @@ declare function createManagementClient(options: {
1646
1713
  baseRevision: number;
1647
1714
  releases: ({
1648
1715
  quest: string;
1649
- runtimeVersion: 2 | 1;
1716
+ runtimeVersion: 1 | 2;
1650
1717
  title: string;
1651
1718
  presentation: {
1652
1719
  quiz?: {
@@ -2055,7 +2122,7 @@ declare function createManagementClient(options: {
2055
2122
  baseRevision: number;
2056
2123
  releases: ({
2057
2124
  quest: string;
2058
- runtimeVersion: 2 | 1;
2125
+ runtimeVersion: 1 | 2;
2059
2126
  title: string;
2060
2127
  presentation: {
2061
2128
  quiz?: {
@@ -2665,7 +2732,7 @@ declare function createManagementClient(options: {
2665
2732
  })[];
2666
2733
  releases: ({
2667
2734
  quest: string;
2668
- runtimeVersion: 2 | 1;
2735
+ runtimeVersion: 1 | 2;
2669
2736
  title: string;
2670
2737
  presentation: {
2671
2738
  quiz?: {
@@ -3275,7 +3342,7 @@ declare function createManagementClient(options: {
3275
3342
  })[];
3276
3343
  releases: ({
3277
3344
  quest: string;
3278
- runtimeVersion: 2 | 1;
3345
+ runtimeVersion: 1 | 2;
3279
3346
  title: string;
3280
3347
  presentation: {
3281
3348
  quiz?: {
@@ -3679,7 +3746,7 @@ declare function createManagementClient(options: {
3679
3746
  };
3680
3747
  releases: ({
3681
3748
  quest: string;
3682
- runtimeVersion: 2 | 1;
3749
+ runtimeVersion: 1 | 2;
3683
3750
  title: string;
3684
3751
  presentation: {
3685
3752
  quiz?: {
@@ -4027,7 +4094,7 @@ declare function createManagementClient(options: {
4027
4094
  };
4028
4095
  releases: ({
4029
4096
  quest: string;
4030
- runtimeVersion: 2 | 1;
4097
+ runtimeVersion: 1 | 2;
4031
4098
  title: string;
4032
4099
  presentation: {
4033
4100
  quiz?: {
@@ -4577,6 +4644,10 @@ declare function createManagementClient(options: {
4577
4644
  color: string;
4578
4645
  permissions: ("read" | "publish" | "review" | "confirm" | "handover" | "inventory" | "access")[];
4579
4646
  environments: ("test" | "live")[];
4647
+ setup?: {
4648
+ mode: "new" | "existing";
4649
+ brief: string;
4650
+ } | undefined;
4580
4651
  }[];
4581
4652
  }>;
4582
4653
  createProject: (input: z.infer<typeof projectInputSchema>) => Promise<{
@@ -4589,6 +4660,10 @@ declare function createManagementClient(options: {
4589
4660
  color: string;
4590
4661
  permissions: ("read" | "publish" | "review" | "confirm" | "handover" | "inventory" | "access")[];
4591
4662
  environments: ("test" | "live")[];
4663
+ setup?: {
4664
+ mode: "new" | "existing";
4665
+ brief: string;
4666
+ } | undefined;
4592
4667
  }>;
4593
4668
  page: (page: string, query: Partial<ListQuery> & {
4594
4669
  detail?: string;
@@ -4693,7 +4768,7 @@ declare function createManagementClient(options: {
4693
4768
  trigger: {
4694
4769
  kind: "manual";
4695
4770
  input: "photo" | "quiz" | "none";
4696
- actor?: "member" | "staff" | undefined;
4771
+ actor?: "staff" | "member" | undefined;
4697
4772
  } | {
4698
4773
  kind: "automatic";
4699
4774
  };
@@ -5170,7 +5245,7 @@ declare function createManagementClient(options: {
5170
5245
  trigger: {
5171
5246
  kind: "manual";
5172
5247
  input: "photo" | "quiz" | "none";
5173
- actor?: "member" | "staff" | undefined;
5248
+ actor?: "staff" | "member" | undefined;
5174
5249
  } | {
5175
5250
  kind: "automatic";
5176
5251
  };
@@ -5721,4 +5796,4 @@ declare function createManagementClient(options: {
5721
5796
  }>;
5722
5797
  };
5723
5798
 
5724
- export { type Access, type AuditRecord, type BuildArtifacts, type BuildIdentity, type BuildStatus, type ListQuery, type ManagementPage, type Permission, type Project, accessSchema, accountProfileSchema, assetPathSchema, auditRecordSchema, buildArtifactsSchema, buildIdentitySchema, buildPhaseSchema, buildStatusSchema, commitSchema, createManagementClient, createRepositorySchema, deviceApproveSchema, deviceRedeemSchema, deviceStartSchema, environmentSchema, grantSchema, inventorySchema, memberAccountSchema, memberDetailSchema, memberSchema, metricsSchema, operationInputSchema, operationSchema, pageSchema, permissionSchema, projectInputSchema, projectSchema, querySchema, readinessSchema, repositorySchema, rolePermissions, roleSchema, stageRequestSchema, stockInputSchema, tokenInputSchema, tokenSchema };
5799
+ export { type Access, type AuditRecord, type BuildArtifacts, type BuildIdentity, type BuildStatus, type ListQuery, type ManagementPage, type Permission, type Project, accessSchema, accountProfileSchema, assetPathSchema, auditRecordSchema, buildArtifactsSchema, buildIdentitySchema, buildPhaseSchema, buildStatusSchema, commitSchema, createManagementClient, createRepositorySchema, developmentPreflightSchema, deviceApproveSchema, deviceRedeemSchema, deviceStartSchema, environmentSchema, grantSchema, inventorySchema, memberAccountSchema, memberDetailSchema, memberSchema, metricsSchema, operationInputSchema, operationSchema, pageSchema, permissionSchema, projectInputSchema, projectSchema, projectSetupSchema, querySchema, readinessSchema, repositorySchema, rolePermissions, roleSchema, stageRequestSchema, stockInputSchema, tokenInputSchema, tokenSchema };