minutework 0.1.35 → 0.1.37

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/EXTERNAL_ALPHA.md CHANGED
@@ -63,6 +63,11 @@ the same source so they cannot drift) plus exported `skills/` guidance so the
63
63
  local coding agent sees the combined-web, mobile standalone-client,
64
64
  snapshot-delivery, and `mw.core.site` baseline workflow. Claude Code reads
65
65
  `CLAUDE.md`; Codex and other IDE agents read `AGENTS.md`.
66
+ The generated capability-gap guidance is JSON-first and platform-submitted:
67
+ agents record sanitized gaps in
68
+ `.minutework/runtime/capability-gap-report.json`, run `minutework gaps submit`
69
+ for likely reusable substrate gaps, and do not use GitHub credentials or create
70
+ GitHub Issues/PRs from the generated workspace.
66
71
  The exported guidance includes a project-orientation fast path so broad
67
72
  questions like "what is this project about?", "what can we build?", and "can we
68
73
  make an existing product agentic?" route through the relevant skills in one
package/README.md CHANGED
@@ -12,6 +12,9 @@ The current external alpha is intentionally narrow:
12
12
  - Developer-local broker surface: `minutework session start|resume|status`
13
13
  - Hosted release class: `ssr_container`
14
14
  - Deploy surface: `minutework deploy --preview`
15
+ - Capability gap queue: `minutework gaps submit|status` sends sanitized
16
+ generated-workspace gap reports to platform `BuilderCapabilityRequest`
17
+ records; GitHub Issue/PR promotion is server-side follow-up automation
15
18
  - Deferred: `--live`, additional local coding engines, sidecar/runtime-backed deploys, and the commercial marketplace listing/pricing layer
16
19
  - Marketplace publish: `minutework publish` submits the compiled, digest-bound app pack through the platform publication-review + attestation gate and publishes it to the public marketplace catalog **only** on an approved (or approved-with-warnings) attestation; a rejected attestation prints the review findings and exits 1 without publishing
17
20
 
@@ -96,6 +99,10 @@ minutework session resume
96
99
  to the combined web, mobile, published-site, runtime-agent, OSS-adoption, and
97
100
  ontology workflows. Claude Code reads `CLAUDE.md`; Codex and other IDE agents
98
101
  read `AGENTS.md`.
102
+ - Generated guidance tells Claude/Codex/Cursor to record capability gaps as
103
+ sanitized JSON first, submit likely reusable gaps with `minutework gaps
104
+ submit`, and avoid direct GitHub Issue/PR workflows from the generated
105
+ workspace.
99
106
  - Broad project questions route through a project-orientation fast path so the
100
107
  agent can answer "what is this project about?" or "can we make an existing
101
108
  product agentic?" without the user naming individual skills.
@@ -128,12 +135,12 @@ For direct third-party web hosts such as Vercel, deploy `tenant-app` only. In Ve
128
135
 
129
136
  ## Machine-readable output (`--json`)
130
137
 
131
- `validate`, `compile`, `codegen`, and `deploy --preview` accept `--json` so an IDE coding agent can drive them unattended and parse one stable shape. With `--json` the command prints a single result envelope to stdout and nothing else:
138
+ `validate`, `compile`, `codegen`, `deploy --preview`, `publish`, and `gaps` accept `--json` so an IDE coding agent can drive them unattended and parse one stable shape. With `--json` the command prints a single result envelope to stdout and nothing else:
132
139
 
133
140
  ```json
134
141
  {
135
142
  "cliJsonVersion": 1,
136
- "command": "validate | compile | codegen | deploy",
143
+ "command": "validate | compile | codegen | deploy | publish | gaps",
137
144
  "ok": true,
138
145
  "status": "ok | compiled | generated | activated | failed | rolled_back | confirmation_required | not_implemented | error",
139
146
  "result": {},
@@ -142,7 +149,7 @@ For direct third-party web hosts such as Vercel, deploy `tenant-app` only. In Ve
142
149
  ```
143
150
 
144
151
  - `ok` mirrors the process exit code: `0` when `ok` is `true`, non-zero otherwise (fail-closed).
145
- - `result` is the typed payload — the validate report (`validate`), the compile graph (`compile` / `codegen`), or the terminal deploy receipt (`deploy`).
152
+ - `result` is the typed payload — the validate report (`validate`), the compile graph (`compile` / `codegen`), the terminal deploy receipt (`deploy`), publish review status (`publish`), or platform capability request status (`gaps`).
146
153
  - `deploy --preview --json` runs unattended and never prompts. Pair it with `--yes` to authorize the deploy; without `--yes` it returns `status: "confirmation_required"` (exit 1) instead of blocking on a prompt.
147
154
  - In `--json` mode the automatic diagnostic report is suppressed — the envelope and exit code are the whole contract.
148
155
 
@@ -161,7 +168,8 @@ CLI failures automatically send a sanitized diagnostic report to the MinuteWork
161
168
 
162
169
  - Node.js 18 or newer
163
170
  - [Poetry](https://python-poetry.org/) on `PATH` when your workspace includes the FastAPI sidecar and you plan to run it locally (then run `pnpm run install:sidecar` or `cd sidecar && poetry install`)
164
- - A MinuteWork platform that exposes the developer CLI auth and public-site preview deploy endpoints
171
+ - A MinuteWork platform that exposes developer CLI auth, public-site preview
172
+ deploy, and developer Builder capability-request endpoints
165
173
  - An auth profile with interactive developer access, or a deploy token that includes `deploy.preview.request`
166
174
 
167
175
  If the hosted preview provider is not configured, preview deploy returns a typed failure or rollback-preserved receipt instead of a fake success.
@@ -39,6 +39,16 @@ coding agent can use them as reference: browse `skills/` and read the relevant
39
39
  automatically and `/skill-name` invokes one directly; other agents (Codex,
40
40
  Cursor) can open the files directly or ask "What skills are available?".
41
41
 
42
+ ## Capability Gaps
43
+
44
+ When a request exposes missing shared MinuteWork substrate, read
45
+ `skills/capability-gap-reporting/SKILL.md`. Inspect runtime/platform truth
46
+ first, write sanitized JSON to
47
+ `.minutework/runtime/capability-gap-report.json`, then submit likely reusable
48
+ gaps with `minutework gaps submit`. Do not use GitHub credentials, create
49
+ GitHub Issues, or open GitHub PRs from this generated workspace; the platform
50
+ `BuilderCapabilityRequest` queue is the trusted handoff.
51
+
42
52
  ## Project Orientation Fast Path
43
53
 
44
54
  When the user asks broad context questions like "what is this project about?",
@@ -27,6 +27,9 @@ receive:
27
27
  - tenant-specific extensions belong in adjacent schemas or extension packs
28
28
  - per-customer deliverables usually come from runtime content/workflow, not a
29
29
  fresh product rebuild
30
+ - reusable capability gaps are JSON-first and platform-submitted with
31
+ `minutework gaps submit`; generated workspaces do not open GitHub Issues or
32
+ PRs directly
30
33
 
31
34
  Generated-workspace-first guidance should live here, especially:
32
35
 
@@ -8,9 +8,43 @@ description: "A request does not cleanly fit current MinuteWork substrate and a
8
8
  Use this skill when a generated workspace discovers that the requested
9
9
  implementation does not cleanly fit current MinuteWork substrate.
10
10
 
11
+ ## Workflow
12
+
13
+ 1. Inspect available runtime/platform truth first:
14
+ - read the workspace MCP capability inventory and snapshot;
15
+ - check existing skills before inventing new substrate;
16
+ - prefer shipped MinuteWork primitives, baseline capabilities, app packs,
17
+ overlays, or reviewed skills when they already fit.
18
+ 2. Record the gap locally in
19
+ `.minutework/runtime/capability-gap-report.json` using the sanitized JSON
20
+ shape below.
21
+ 3. Submit likely reusable gaps to the platform queue:
22
+
23
+ ```bash
24
+ minutework gaps submit
25
+ ```
26
+
27
+ Use `minutework gaps submit --gap <gapId>` for one gap, and
28
+ `minutework gaps submit --all` only when the developer intentionally wants
29
+ tenant-local gaps submitted too.
30
+ 4. Check queue state with:
31
+
32
+ ```bash
33
+ minutework gaps status
34
+ ```
35
+
36
+ Platform `BuilderCapabilityRequest` records are the trusted queue for reusable
37
+ substrate requests. GitHub Issues and PRs are a later server-side automation
38
+ step after Codex reviews the submitted platform record against the monorepo.
39
+ Generated workspaces must not use GitHub credentials, create GitHub Issues,
40
+ open GitHub PRs, or require monorepo permissions for capability gaps.
41
+
42
+ ## JSON Report
43
+
11
44
  - Record architecture gaps in `.minutework/runtime/capability-gap-report.json`.
12
45
  - Keep the report sanitized and tenant-safe. Do not include secrets, raw
13
- prompts, private provider responses, or full payload copies.
46
+ prompts, private provider responses, full payload copies, absolute local
47
+ paths, env values, or source diffs.
14
48
  - Use the `MinuteWorkCapabilityGapReportV1` shape:
15
49
  - `version`
16
50
  - `generatedAt`
@@ -52,5 +86,12 @@ implementation does not cleanly fit current MinuteWork substrate.
52
86
  - `attached_app` when the right home is an attached-app integration surface
53
87
  rather than shared core substrate.
54
88
  - Prefer one concrete gap per missing shared capability.
55
- - Use gap reports to tell humans where MinuteWork needs new substrate. Do not
56
- treat them as automatic implementation instructions.
89
+ - Use gap reports to tell MinuteWork where shared substrate may be missing. Do
90
+ not treat them as automatic implementation instructions.
91
+ - `minutework gaps submit` submits only `reusability: "likelyReusable"` gaps by
92
+ default and fails closed on missing auth, missing link, invalid reports, or
93
+ platform rejection.
94
+ - The first slice stops at platform records:
95
+ `Builder agent -> gap JSON -> minutework gaps submit -> BuilderCapabilityRequest`.
96
+ - Later automation may validate accepted requests, create or link GitHub Issues,
97
+ open PRs, and mark platform records resolved after protected-branch merge.
@@ -12,6 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@expo/metro-runtime": "~56.0.13",
15
+ "@minutework/native-auth": "^0.1.0",
15
16
  "expo": "~56.0.8",
16
17
  "expo-asset": "~56.0.15",
17
18
  "expo-constants": "~56.0.16",
@@ -1,251 +1,48 @@
1
- // MinuteWork substrate. Thin layer — do not put product UI/logic here.
2
- //
3
- // MinuteWork native token client. Implements the browser-assisted device flow
4
- // against the SHIPPED platform native-token endpoints (`/api/v1/native/session/*`).
5
- //
6
- // Authentication is owned by the MinuteWork platform. This client only *obtains
7
- // and uses* a platform-issued bearer token — there is NO JWT minting, NO password
8
- // handling, NO local user table, and NO parallel auth stack here. Token plaintext
9
- // is never logged.
10
- //
11
- // ----------------------------------------------------------------------------
12
- // Device flow (browser-assisted authorization):
13
- // ----------------------------------------------------------------------------
14
- // 1. authorize(): generate a PKCE code_verifier + S256 code_challenge, open the
15
- // platform authorize URL in a system browser (`expo-web-browser`) with the
16
- // app's deep-link redirect_uri + code_challenge + an anti-forgery `state`.
17
- // The platform authenticates the human and redirects back to redirect_uri
18
- // with a short-lived single-use `code` (and the echoed `state`).
19
- // 2. exchange(code, verifier): POST {code, code_verifier, redirect_uri} to
20
- // `/token-exchange/`; the platform returns the access/refresh token pair.
21
- // 3. store the pair in the device keychain via `mwSession.setTokens(...)`.
22
- // 4. for every platform call, send `Authorization: Bearer <access>`. On a 401,
23
- // POST the stored refresh token to `/refresh/`, persist the rotated pair,
24
- // and retry once.
25
- // 5. logout(): POST `/logout/` to revoke, then `mwSession.clearTokens()`.
26
- //
27
- // This is the DIRECT platform path — there is no tenant-app BFF and no
28
- // server-owned cookie in front of the mobile client.
29
-
30
1
  import * as Crypto from "expo-crypto";
31
2
  import * as Linking from "expo-linking";
32
3
  import * as WebBrowser from "expo-web-browser";
33
-
34
4
  import {
35
- nativeSessionSchema,
36
- nativeTokenPairSchema,
37
- type NativeSession,
38
- type NativeTokenPair,
39
- } from "@/mw/contracts";
40
- import { platformNativeEndpoints } from "@/mw/endpoints";
5
+ createNativeAuthClient,
6
+ type NativeBrowser,
7
+ type NativeCrypto,
8
+ } from "@minutework/native-auth";
9
+
10
+ import { mwEnv } from "@/mw/env";
41
11
  import { mwSession } from "@/mw/session";
42
12
 
43
13
  // The deep-link path the platform redirects back to. The scheme is read from
44
14
  // `app.json` ("scheme") by expo-linking; the dev configures that scheme.
45
15
  const REDIRECT_PATH = "auth/native-callback";
46
16
 
47
- // Result of a single authorize round-trip: the one-time code plus the PKCE
48
- // verifier that must be presented at exchange.
49
- export interface NativeAuthorizationResult {
50
- code: string;
51
- codeVerifier: string;
52
- redirectUri: string;
53
- }
54
-
55
- function base64UrlFromBytes(bytes: Uint8Array): string {
56
- let binary = "";
57
- for (const byte of bytes) {
58
- binary += String.fromCharCode(byte);
59
- }
60
- // btoa is available in the Hermes/React Native runtime.
61
- return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
62
- }
63
-
64
- // PKCE code_verifier: 32 random bytes -> base64url (43 chars, no padding). This
65
- // is URL-safe and whitespace-free, matching the platform's `.strip()`ed verifier
66
- // and its 255-char cap.
67
- function generateCodeVerifier(): string {
68
- return base64UrlFromBytes(Crypto.getRandomBytes(32));
69
- }
70
-
71
- // S256 challenge: base64url(SHA-256(verifier)). Mirrors the platform's
72
- // `build_pkce_code_challenge` (sha256 digest -> urlsafe base64 -> strip "=").
73
- async function deriveCodeChallenge(codeVerifier: string): Promise<string> {
74
- const digestBase64 = await Crypto.digestStringAsync(
75
- Crypto.CryptoDigestAlgorithm.SHA256,
76
- codeVerifier,
77
- { encoding: Crypto.CryptoEncoding.BASE64 },
78
- );
79
- return digestBase64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
80
- }
81
-
82
- function buildAuthorizeUrl(params: {
83
- redirectUri: string;
84
- state: string;
85
- codeChallenge: string;
86
- }): string {
87
- const url = new URL(platformNativeEndpoints.authorize);
88
- url.searchParams.set("redirect_uri", params.redirectUri);
89
- url.searchParams.set("state", params.state);
90
- url.searchParams.set("code_challenge", params.codeChallenge);
91
- return url.toString();
92
- }
93
-
94
- async function postJson(url: string, body: Record<string, unknown>): Promise<Response> {
95
- return fetch(url, {
96
- method: "POST",
97
- headers: {
98
- "Content-Type": "application/json",
99
- Accept: "application/json",
100
- },
101
- body: JSON.stringify(body),
102
- });
103
- }
104
-
105
- // Surface a platform error without leaking response internals. The platform
106
- // returns `{detail: "..."}` for native auth failures.
107
- async function readErrorDetail(response: Response, fallback: string): Promise<string> {
108
- try {
109
- const data = (await response.json()) as { detail?: unknown };
110
- if (data && typeof data.detail === "string" && data.detail.length > 0) {
111
- return data.detail;
112
- }
113
- } catch {
114
- // ignore non-JSON bodies
115
- }
116
- return `${fallback} (HTTP ${response.status})`;
117
- }
118
-
119
- export const mwClient = {
120
- // Step 1: open the platform authorize URL in a system browser and resolve with
121
- // the single-use authorization code + the PKCE verifier to exchange it.
122
- async authorize(): Promise<NativeAuthorizationResult> {
123
- const redirectUri = Linking.createURL(REDIRECT_PATH);
124
- const codeVerifier = generateCodeVerifier();
125
- const codeChallenge = await deriveCodeChallenge(codeVerifier);
126
- const state = base64UrlFromBytes(Crypto.getRandomBytes(16));
127
-
128
- const authorizeUrl = buildAuthorizeUrl({ redirectUri, state, codeChallenge });
129
- const result = await WebBrowser.openAuthSessionAsync(authorizeUrl, redirectUri);
130
-
131
- if (result.type !== "success" || !result.url) {
132
- throw new Error("Sign in was cancelled before the platform returned a code.");
133
- }
134
-
135
- const returned = new URL(result.url);
136
- const returnedState = returned.searchParams.get("state");
137
- if (returnedState !== state) {
138
- // Anti-forgery: the platform must echo back the exact state we sent.
139
- throw new Error("Sign in failed: callback state did not match the request.");
140
- }
141
- const code = returned.searchParams.get("code");
142
- if (!code) {
143
- throw new Error("Sign in failed: the platform callback did not include a code.");
144
- }
145
-
146
- return { code, codeVerifier, redirectUri };
147
- },
148
-
149
- // Step 2: exchange the authorization code for a platform-issued token pair and
150
- // persist it to the device keychain.
151
- async exchange(
152
- code: string,
153
- codeVerifier: string,
154
- redirectUri: string,
155
- ): Promise<NativeTokenPair> {
156
- const response = await postJson(platformNativeEndpoints.tokenExchange, {
157
- code,
158
- code_verifier: codeVerifier,
159
- redirect_uri: redirectUri,
160
- });
161
- if (!response.ok) {
162
- throw new Error(await readErrorDetail(response, "Token exchange failed"));
163
- }
164
- const pair = nativeTokenPairSchema.parse(await response.json());
165
- await mwSession.setTokens(
166
- pair.access_token,
167
- pair.refresh_token,
168
- pair.access_token_expires_at,
169
- );
170
- return pair;
17
+ const nativeCrypto: NativeCrypto = {
18
+ randomBytes(length: number): Uint8Array {
19
+ return Crypto.getRandomBytes(length);
171
20
  },
172
-
173
- // Step 4 (on 401 / proactive): rotate the access token using the stored refresh
174
- // token and persist the rotated pair.
175
- async refresh(): Promise<NativeTokenPair> {
176
- const stored = await mwSession.getTokens();
177
- if (!stored) {
178
- throw new Error("No stored session to refresh. Sign in again.");
179
- }
180
- const response = await postJson(platformNativeEndpoints.refresh, {
181
- refresh_token: stored.refresh,
182
- });
183
- if (!response.ok) {
184
- // Refresh failure means the session is dead; clear it so the app routes
185
- // back to login.
186
- await mwSession.clearTokens();
187
- throw new Error(await readErrorDetail(response, "Session refresh failed"));
188
- }
189
- const pair = nativeTokenPairSchema.parse(await response.json());
190
- await mwSession.setTokens(
191
- pair.access_token,
192
- pair.refresh_token,
193
- pair.access_token_expires_at,
21
+ async sha256Base64Url(input: string): Promise<string> {
22
+ const digestBase64 = await Crypto.digestStringAsync(
23
+ Crypto.CryptoDigestAlgorithm.SHA256,
24
+ input,
25
+ { encoding: Crypto.CryptoEncoding.BASE64 },
194
26
  );
195
- return pair;
27
+ return digestBase64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
196
28
  },
29
+ };
197
30
 
198
- // Resolve the active session (user + active tenant + memberships) from the
199
- // stored token, auto-refreshing once on a 401 then retrying.
200
- async loadSession(): Promise<NativeSession> {
201
- const stored = await mwSession.getTokens();
202
- if (!stored) {
203
- throw new Error("Not signed in.");
204
- }
205
-
206
- const meOnce = async (accessToken: string): Promise<Response> =>
207
- fetch(platformNativeEndpoints.me, {
208
- method: "GET",
209
- headers: {
210
- Accept: "application/json",
211
- Authorization: `Bearer ${accessToken}`,
212
- },
213
- });
214
-
215
- let response = await meOnce(stored.access);
216
- if (response.status === 401) {
217
- // Single refresh-and-retry on an expired/invalid access token.
218
- const rotated = await this.refresh();
219
- response = await meOnce(rotated.access_token);
220
- }
221
- if (!response.ok) {
222
- throw new Error(await readErrorDetail(response, "Failed to load session"));
223
- }
224
- return nativeSessionSchema.parse(await response.json());
31
+ const nativeBrowser: NativeBrowser = {
32
+ createRedirectUri(): string {
33
+ return Linking.createURL(REDIRECT_PATH);
225
34
  },
226
-
227
- // Step 5: revoke the token pair on the platform, then clear local secure
228
- // storage. Local state is always cleared, even if the revoke call fails.
229
- async logout(): Promise<void> {
230
- const stored = await mwSession.getTokens();
231
- try {
232
- if (stored) {
233
- await fetch(platformNativeEndpoints.logout, {
234
- method: "POST",
235
- headers: {
236
- "Content-Type": "application/json",
237
- Accept: "application/json",
238
- Authorization: `Bearer ${stored.access}`,
239
- },
240
- body: JSON.stringify({}),
241
- });
242
- }
243
- } catch {
244
- // Best-effort revoke; never block local sign-out on a network error.
245
- } finally {
246
- await mwSession.clearTokens();
247
- }
35
+ async openAuthSession(url: string, redirectUri: string): Promise<string | null> {
36
+ const result = await WebBrowser.openAuthSessionAsync(url, redirectUri);
37
+ return result.type === "success" && result.url ? result.url : null;
248
38
  },
249
39
  };
250
40
 
41
+ export const mwClient = createNativeAuthClient({
42
+ platformBaseUrl: mwEnv.platformBaseUrl,
43
+ storage: mwSession,
44
+ crypto: nativeCrypto,
45
+ browser: nativeBrowser,
46
+ });
47
+
251
48
  export type MwClient = typeof mwClient;
@@ -8,7 +8,11 @@
8
8
 
9
9
  import * as SecureStore from "expo-secure-store";
10
10
 
11
- import { storedTokensSchema, type StoredTokens } from "@/mw/contracts";
11
+ import {
12
+ storedTokensSchema,
13
+ type NativeTokenStorage,
14
+ type StoredTokens,
15
+ } from "@minutework/native-auth";
12
16
 
13
17
  const TOKEN_KEY = "mw.native.token_pair";
14
18
 
@@ -45,6 +49,6 @@ export const mwSession = {
45
49
  async clearTokens(): Promise<void> {
46
50
  await SecureStore.deleteItemAsync(TOKEN_KEY, SECURE_STORE_OPTIONS);
47
51
  },
48
- };
52
+ } satisfies NativeTokenStorage;
49
53
 
50
54
  export type MwSession = typeof mwSession;
@@ -1,5 +1,5 @@
1
1
  export declare const CLI_JSON_VERSION: 1;
2
- export type CliJsonCommand = "validate" | "compile" | "codegen" | "deploy" | "publish";
2
+ export type CliJsonCommand = "validate" | "compile" | "codegen" | "deploy" | "publish" | "gaps";
3
3
  export type CliJsonEnvelope = {
4
4
  cliJsonVersion: typeof CLI_JSON_VERSION;
5
5
  command: CliJsonCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"cli-json.js","sourceRoot":"","sources":["../src/cli-json.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAU,CAAC;AAa3C;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAMrC;IACC,MAAM,OAAO,GAAoB;QAC/B,cAAc,EAAE,gBAAgB;QAChC,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,IAAI;QAC/B,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI;KAC9B,CAAC;IACF,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC"}
1
+ {"version":3,"file":"cli-json.js","sourceRoot":"","sources":["../src/cli-json.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAU,CAAC;AAmB3C;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAMrC;IACC,MAAM,OAAO,GAAoB;QAC/B,cAAc,EAAE,gBAAgB;QAChC,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,IAAI;QAC/B,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI;KAC9B,CAAC;IACF,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC"}
@@ -130,6 +130,34 @@ export type DeveloperMarketplacePublishResponse = {
130
130
  findings: DeveloperMarketplacePublishFinding[];
131
131
  published: boolean;
132
132
  };
133
+ export type DeveloperBuilderCapabilityRequest = {
134
+ architecture_violation: string;
135
+ created_at: string;
136
+ current_workaround: string;
137
+ gap_digest: string;
138
+ id: string;
139
+ missing_layer: string;
140
+ priority: string;
141
+ requested_by_id: string;
142
+ source_kind: string;
143
+ source_plan_digest: string;
144
+ source_plan_revision: number;
145
+ source_plan_revision_ref: string;
146
+ source_ref: string;
147
+ source_thread_id: string;
148
+ status: string;
149
+ suggested_shared_substrate: string;
150
+ tenant_id: string;
151
+ title: string;
152
+ updated_at: string;
153
+ };
154
+ export type DeveloperBuilderCapabilityRequestSubmitResponse = {
155
+ capability_request: DeveloperBuilderCapabilityRequest;
156
+ reused: boolean;
157
+ };
158
+ export type DeveloperBuilderCapabilityRequestListResponse = {
159
+ capability_requests: DeveloperBuilderCapabilityRequest[];
160
+ };
133
161
  export type AgentTimelineEntry = {
134
162
  entry_at: string;
135
163
  post: Record<string, unknown> | null;
@@ -245,6 +273,18 @@ export declare function createDeveloperClient(options: {
245
273
  appId: string;
246
274
  packagePayload: Record<string, unknown>;
247
275
  }): Promise<DeveloperMarketplacePublishResponse>;
276
+ submitBuilderCapabilityRequest(input: {
277
+ gap: Record<string, unknown>;
278
+ reportVersion?: string;
279
+ sourceRef?: string;
280
+ targetKind?: "public_site" | "runtime_app" | "unknown";
281
+ workspaceName?: string;
282
+ }): Promise<DeveloperBuilderCapabilityRequestSubmitResponse>;
283
+ listBuilderCapabilityRequests(input?: {
284
+ gapDigest?: string;
285
+ sourceKind?: string;
286
+ status?: string;
287
+ }): Promise<DeveloperBuilderCapabilityRequestListResponse>;
248
288
  attachAgent(): Promise<AgentAttachResponse>;
249
289
  resumeAgent(): Promise<AgentAttachResponse>;
250
290
  getAgentStatus(): Promise<AgentStatusResponse>;
@@ -100,6 +100,33 @@ export function createDeveloperClient(options) {
100
100
  }),
101
101
  }, "submit marketplace publish");
102
102
  },
103
+ submitBuilderCapabilityRequest(input) {
104
+ return requestJson("/api/v1/developer/builder/capability-requests/", {
105
+ method: "POST",
106
+ body: JSON.stringify({
107
+ gap: input.gap,
108
+ report_version: input.reportVersion ?? "",
109
+ source_ref: input.sourceRef ?? "",
110
+ target_kind: input.targetKind ?? "unknown",
111
+ tenant_id: tenantId,
112
+ workspace_name: input.workspaceName ?? "",
113
+ }),
114
+ }, "submit builder capability request");
115
+ },
116
+ listBuilderCapabilityRequests(input = {}) {
117
+ const search = new URLSearchParams();
118
+ search.set("tenant_id", tenantId);
119
+ if (input.status) {
120
+ search.set("status", input.status);
121
+ }
122
+ if (input.gapDigest) {
123
+ search.set("gap_digest", input.gapDigest);
124
+ }
125
+ if (input.sourceKind) {
126
+ search.set("source_kind", input.sourceKind);
127
+ }
128
+ return requestJson(`/api/v1/developer/builder/capability-requests/?${search.toString()}`, { method: "GET" }, "list builder capability requests");
129
+ },
103
130
  attachAgent() {
104
131
  return requestJson("/api/v1/developer/agent/attach/", { method: "POST", body: JSON.stringify({}) }, "attach to hosted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E,OAAO,CAAC,MAAM,CAAC,CAAC;AACrG,CAAC"}
package/dist/gaps.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { type DeveloperClientDependencies } from "./developer-client.js";
2
+ import type { CliIo } from "./index.js";
3
+ import type { CliStatePaths, PlatformName } from "./paths.js";
4
+ export type GapsDependencies = DeveloperClientDependencies;
5
+ export declare function runGapsCommand(options: {
6
+ args: string[];
7
+ cwd: string;
8
+ dependencies?: GapsDependencies;
9
+ env: NodeJS.ProcessEnv;
10
+ io: CliIo;
11
+ paths: CliStatePaths;
12
+ platform: PlatformName;
13
+ }): Promise<number>;