@consiliency/agent-board-cli 1.9.0 → 1.10.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/dist/cli.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Command } from "commander";
2
- import { type EnrollKeystore, type EnrollmentIntent, type PendingEnrollmentStore, type OAuthFetchLike, type FetchLike, type AgentJoinDeployment, type AgentJoinInstructions, type DeviceAuthorizationPrompt } from "@consiliency/agent-board-client";
2
+ import { type EnrollKeystore, type EnrollmentIntent, type FleetOnboardingIntent, type PendingEnrollmentStore, type OAuthFetchLike, type FetchLike, type AgentJoinDeployment, type AgentJoinInstructions, type DeviceAuthorizationPrompt } from "@consiliency/agent-board-client";
3
+ import { DevicePendingEnrollmentStore } from "./enroll_runtime.js";
3
4
  type JsonObject = Record<string, unknown>;
4
5
  export interface CliIo {
5
6
  writeStdout(message: string): void;
@@ -38,6 +39,20 @@ interface ClientLike {
38
39
  grantBoardRole(input: JsonObject): Promise<unknown>;
39
40
  setBoardRoleGate(input: JsonObject): Promise<unknown>;
40
41
  createInviteLink(input: JsonObject): Promise<unknown>;
42
+ createFleetOnboardingInvite?(input: {
43
+ boardId: string;
44
+ machineId: string;
45
+ harnessKind: string;
46
+ harnessLabel: string;
47
+ repoSlug: string;
48
+ repoFingerprint: string;
49
+ repoScopeRole: "worker" | "reviewer";
50
+ agentRole: "phase_worker" | "reviewer";
51
+ expectedAgentHandle: string;
52
+ maxUses?: number;
53
+ expiresAt?: string;
54
+ createdByAgentId?: string;
55
+ }): Promise<unknown>;
41
56
  createInviteLinkWithInstructions(input: JsonObject, deployment: AgentJoinDeployment, board?: {
42
57
  boardSlug?: string;
43
58
  boardName?: string;
@@ -145,10 +160,37 @@ export interface EnrollmentCommandRunner {
145
160
  requestedBoardScopes?: string[];
146
161
  onDeviceAuthorization: (prompt: DeviceAuthorizationPrompt) => void | Promise<void>;
147
162
  }): Promise<unknown>;
163
+ deviceBegin?(input: {
164
+ /** Optional caller-generated ID used to bind a companion non-secret continuation first. */
165
+ enrollmentId?: string;
166
+ slug: string;
167
+ intent: EnrollmentIntent;
168
+ agentKind?: string;
169
+ requestedScopes?: string[];
170
+ requestedBoardScopes?: string[];
171
+ }): Promise<{
172
+ enrollmentId: string;
173
+ prompt: DeviceAuthorizationPrompt;
174
+ }>;
175
+ deviceComplete?(input: {
176
+ enrollmentId: string;
177
+ expectedFleet?: {
178
+ intent: Omit<FleetOnboardingIntent, "inviteCode">;
179
+ keyReference: string;
180
+ slug: string;
181
+ };
182
+ /** Keep the secret continuation for a caller that must finish local materialization first. */
183
+ deletePending?: boolean;
184
+ }): Promise<unknown>;
185
+ deviceDeletePending?(input: {
186
+ enrollmentId: string;
187
+ }): Promise<void>;
148
188
  }
149
189
  export interface DefaultEnrollmentRunnerDeps {
150
190
  /** Pending store bridging begin→complete. Default: FilePendingEnrollmentStore(env). */
151
191
  store?: PendingEnrollmentStore;
192
+ /** Device-code state bridging deviceBegin→deviceComplete across CLI processes. */
193
+ deviceStore?: DevicePendingEnrollmentStore;
152
194
  /** OAuth/enroll fetch. Default: nodeFetchAdapter over globalThis.fetch. */
153
195
  fetch?: OAuthFetchLike;
154
196
  /** Board-native fetch for the post-enroll SessionClient. Default: nodeFetchAdapter. */