@domino-sdk/relay-cli 0.1.0 → 0.2.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");
@@ -131,6 +184,33 @@ export async function diagnose({ project, connection, options }) {
131
184
  message:
132
185
  "Management API verified project access. This does not verify participant sign-in or publication permission.",
133
186
  });
187
+ const preflight = await request(connection, "/preflight");
188
+ readiness = {
189
+ development: preflight.development,
190
+ staging: preflight.staging,
191
+ };
192
+ if (project.config.app)
193
+ checks.push({
194
+ id: "shared-preview",
195
+ status:
196
+ preflight.development?.status === "configured" ? "ok" : "error",
197
+ message:
198
+ preflight.development?.status === "configured"
199
+ ? "Shared development hosting is configured. Run domino dev to verify the public connection."
200
+ : "A Domino operator must configure shared development hosting before domino dev can start.",
201
+ missing: preflight.development?.missing ?? [],
202
+ });
203
+ checks.push(
204
+ ...preflight.checks.map((check) =>
205
+ !project.config.app &&
206
+ ["cloud-builds", "repository", "hosted-test-auth"].includes(
207
+ check.id,
208
+ ) &&
209
+ check.status === "error"
210
+ ? { ...check, status: "warning" }
211
+ : check,
212
+ ),
213
+ );
134
214
  } catch (error) {
135
215
  remoteAccess = "failed";
136
216
  checks.push({
@@ -143,9 +223,16 @@ export async function diagnose({ project, connection, options }) {
143
223
  }
144
224
  return {
145
225
  directory: root,
226
+ versions,
146
227
  healthy: checks.every((check) => check.status !== "error"),
147
- scope: connection,
228
+ scope: {
229
+ apiUrl: connection.apiUrl,
230
+ organization: connection.organization,
231
+ project: connection.project,
232
+ environment: connection.environment,
233
+ },
148
234
  agents,
235
+ readiness,
149
236
  remoteAccess,
150
237
  preview: project?.config.app
151
238
  ? "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.
@@ -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,28 @@
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. Keep management tokens on the server.
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
+ ## Display and complete quests
10
+
11
+ 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)`.
12
+
13
+ The controller's `kind` determines its input:
14
+
15
+ | Kind | Action |
16
+ | ------ | --------------------------------------------------------------------- |
17
+ | claim | `submit()` |
18
+ | photo | `submit(file)` with a File |
19
+ | quiz | `submit(answers)` with question IDs mapped to choice IDs |
20
+ | status | Observe only; staff and automatic actions are not participant buttons |
21
+
22
+ 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.
23
+
24
+ ## Recover without duplicate actions
25
+
26
+ `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.
27
+
28
+ 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,11 @@
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.
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,37 @@ 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
+ staging: z.ZodEnum<{
94
+ blocked: "blocked";
95
+ configured: "configured";
96
+ }>;
97
+ development: z.ZodObject<{
98
+ status: z.ZodEnum<{
99
+ blocked: "blocked";
100
+ configured: "configured";
101
+ }>;
102
+ missing: z.ZodArray<z.ZodString>;
103
+ authentication: z.ZodArray<z.ZodString>;
104
+ }, z.core.$strip>;
105
+ checks: z.ZodArray<z.ZodObject<{
106
+ id: z.ZodString;
107
+ status: z.ZodEnum<{
108
+ error: "error";
109
+ ok: "ok";
110
+ }>;
111
+ message: z.ZodString;
112
+ missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
+ }, z.core.$strip>>;
115
+ }, z.core.$strip>;
116
+
82
117
  declare const environmentSchema: z.ZodEnum<{
83
118
  test: "test";
84
119
  live: "live";
@@ -99,7 +134,21 @@ declare const permissionSchema: z.ZodEnum<{
99
134
  }>;
100
135
  type Permission = z.infer<typeof permissionSchema>;
101
136
  declare const rolePermissions: Record<z.infer<typeof roleSchema>, Permission[]>;
137
+ declare const projectSetupSchema: z.ZodObject<{
138
+ mode: z.ZodEnum<{
139
+ new: "new";
140
+ existing: "existing";
141
+ }>;
142
+ brief: z.ZodString;
143
+ }, z.core.$strict>;
102
144
  declare const projectSchema: z.ZodObject<{
145
+ setup: z.ZodOptional<z.ZodObject<{
146
+ mode: z.ZodEnum<{
147
+ new: "new";
148
+ existing: "existing";
149
+ }>;
150
+ brief: z.ZodString;
151
+ }, z.core.$strict>>;
103
152
  id: z.ZodString;
104
153
  organization: z.ZodString;
105
154
  project: z.ZodString;
@@ -125,6 +174,13 @@ type Project = z.infer<typeof projectSchema>;
125
174
  declare const projectInputSchema: z.ZodObject<{
126
175
  project: z.ZodString;
127
176
  name: z.ZodString;
177
+ setup: z.ZodOptional<z.ZodObject<{
178
+ mode: z.ZodEnum<{
179
+ new: "new";
180
+ existing: "existing";
181
+ }>;
182
+ brief: z.ZodString;
183
+ }, z.core.$strict>>;
128
184
  }, z.core.$strict>;
129
185
  declare const grantSchema: z.ZodObject<{
130
186
  subject: z.ZodString;
@@ -144,6 +200,13 @@ declare const accessSchema: z.ZodObject<{
144
200
  admin: z.ZodBoolean;
145
201
  local: z.ZodBoolean;
146
202
  projects: z.ZodArray<z.ZodObject<{
203
+ setup: z.ZodOptional<z.ZodObject<{
204
+ mode: z.ZodEnum<{
205
+ new: "new";
206
+ existing: "existing";
207
+ }>;
208
+ brief: z.ZodString;
209
+ }, z.core.$strict>>;
147
210
  id: z.ZodString;
148
211
  organization: z.ZodString;
149
212
  project: z.ZodString;
@@ -365,8 +428,8 @@ declare const pageSchema: z.ZodObject<{
365
428
  none: "none";
366
429
  }>;
367
430
  actor: z.ZodOptional<z.ZodEnum<{
368
- member: "member";
369
431
  staff: "staff";
432
+ member: "member";
370
433
  }>>;
371
434
  }, z.core.$strict>, z.ZodObject<{
372
435
  kind: z.ZodLiteral<"automatic">;
@@ -554,7 +617,7 @@ declare const pageSchema: z.ZodObject<{
554
617
  trigger: {
555
618
  kind: "manual";
556
619
  input: "photo" | "quiz" | "none";
557
- actor?: "member" | "staff" | undefined;
620
+ actor?: "staff" | "member" | undefined;
558
621
  } | {
559
622
  kind: "automatic";
560
623
  };
@@ -935,8 +998,8 @@ declare const memberDetailSchema: z.ZodObject<{
935
998
  none: "none";
936
999
  }>;
937
1000
  actor: z.ZodOptional<z.ZodEnum<{
938
- member: "member";
939
1001
  staff: "staff";
1002
+ member: "member";
940
1003
  }>>;
941
1004
  }, z.core.$strict>, z.ZodObject<{
942
1005
  kind: z.ZodLiteral<"automatic">;
@@ -1124,7 +1187,7 @@ declare const memberDetailSchema: z.ZodObject<{
1124
1187
  trigger: {
1125
1188
  kind: "manual";
1126
1189
  input: "photo" | "quiz" | "none";
1127
- actor?: "member" | "staff" | undefined;
1190
+ actor?: "staff" | "member" | undefined;
1128
1191
  } | {
1129
1192
  kind: "automatic";
1130
1193
  };
@@ -1396,8 +1459,8 @@ declare const memberDetailSchema: z.ZodObject<{
1396
1459
  none: "none";
1397
1460
  }>;
1398
1461
  actor: z.ZodOptional<z.ZodEnum<{
1399
- member: "member";
1400
1462
  staff: "staff";
1463
+ member: "member";
1401
1464
  }>>;
1402
1465
  }, z.core.$strict>, z.ZodObject<{
1403
1466
  kind: z.ZodLiteral<"automatic">;
@@ -1646,7 +1709,7 @@ declare function createManagementClient(options: {
1646
1709
  baseRevision: number;
1647
1710
  releases: ({
1648
1711
  quest: string;
1649
- runtimeVersion: 2 | 1;
1712
+ runtimeVersion: 1 | 2;
1650
1713
  title: string;
1651
1714
  presentation: {
1652
1715
  quiz?: {
@@ -2055,7 +2118,7 @@ declare function createManagementClient(options: {
2055
2118
  baseRevision: number;
2056
2119
  releases: ({
2057
2120
  quest: string;
2058
- runtimeVersion: 2 | 1;
2121
+ runtimeVersion: 1 | 2;
2059
2122
  title: string;
2060
2123
  presentation: {
2061
2124
  quiz?: {
@@ -2665,7 +2728,7 @@ declare function createManagementClient(options: {
2665
2728
  })[];
2666
2729
  releases: ({
2667
2730
  quest: string;
2668
- runtimeVersion: 2 | 1;
2731
+ runtimeVersion: 1 | 2;
2669
2732
  title: string;
2670
2733
  presentation: {
2671
2734
  quiz?: {
@@ -3275,7 +3338,7 @@ declare function createManagementClient(options: {
3275
3338
  })[];
3276
3339
  releases: ({
3277
3340
  quest: string;
3278
- runtimeVersion: 2 | 1;
3341
+ runtimeVersion: 1 | 2;
3279
3342
  title: string;
3280
3343
  presentation: {
3281
3344
  quiz?: {
@@ -3679,7 +3742,7 @@ declare function createManagementClient(options: {
3679
3742
  };
3680
3743
  releases: ({
3681
3744
  quest: string;
3682
- runtimeVersion: 2 | 1;
3745
+ runtimeVersion: 1 | 2;
3683
3746
  title: string;
3684
3747
  presentation: {
3685
3748
  quiz?: {
@@ -4027,7 +4090,7 @@ declare function createManagementClient(options: {
4027
4090
  };
4028
4091
  releases: ({
4029
4092
  quest: string;
4030
- runtimeVersion: 2 | 1;
4093
+ runtimeVersion: 1 | 2;
4031
4094
  title: string;
4032
4095
  presentation: {
4033
4096
  quiz?: {
@@ -4577,6 +4640,10 @@ declare function createManagementClient(options: {
4577
4640
  color: string;
4578
4641
  permissions: ("read" | "publish" | "review" | "confirm" | "handover" | "inventory" | "access")[];
4579
4642
  environments: ("test" | "live")[];
4643
+ setup?: {
4644
+ mode: "new" | "existing";
4645
+ brief: string;
4646
+ } | undefined;
4580
4647
  }[];
4581
4648
  }>;
4582
4649
  createProject: (input: z.infer<typeof projectInputSchema>) => Promise<{
@@ -4589,6 +4656,10 @@ declare function createManagementClient(options: {
4589
4656
  color: string;
4590
4657
  permissions: ("read" | "publish" | "review" | "confirm" | "handover" | "inventory" | "access")[];
4591
4658
  environments: ("test" | "live")[];
4659
+ setup?: {
4660
+ mode: "new" | "existing";
4661
+ brief: string;
4662
+ } | undefined;
4592
4663
  }>;
4593
4664
  page: (page: string, query: Partial<ListQuery> & {
4594
4665
  detail?: string;
@@ -4693,7 +4764,7 @@ declare function createManagementClient(options: {
4693
4764
  trigger: {
4694
4765
  kind: "manual";
4695
4766
  input: "photo" | "quiz" | "none";
4696
- actor?: "member" | "staff" | undefined;
4767
+ actor?: "staff" | "member" | undefined;
4697
4768
  } | {
4698
4769
  kind: "automatic";
4699
4770
  };
@@ -5170,7 +5241,7 @@ declare function createManagementClient(options: {
5170
5241
  trigger: {
5171
5242
  kind: "manual";
5172
5243
  input: "photo" | "quiz" | "none";
5173
- actor?: "member" | "staff" | undefined;
5244
+ actor?: "staff" | "member" | undefined;
5174
5245
  } | {
5175
5246
  kind: "automatic";
5176
5247
  };
@@ -5721,4 +5792,4 @@ declare function createManagementClient(options: {
5721
5792
  }>;
5722
5793
  };
5723
5794
 
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 };
5795
+ 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 };