@immediately-run/sdk 0.26.0 → 0.27.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/README.md CHANGED
@@ -65,6 +65,14 @@ single request:
65
65
  The installed npm package also ships `.d.ts` carrying the same JSDoc, so your
66
66
  editor/agent tooling can read the typed API inline without any network access.
67
67
 
68
+ ## Verify (the CI/deploy gate)
69
+
70
+ `npm run verify` runs this repo's full CI gate in one command —
71
+ `check:circular` → `test` → `build` → `api:check` (the additive-only API-stability
72
+ check against the committed snapshot). Run it before pushing; it is the same set of
73
+ checks CI enforces, so a local green equals a green CI. (Ways of working §4: the local
74
+ verify gate must equal the deploy gate — one `npm run verify` per repo.)
75
+
68
76
  ## License
69
77
 
70
78
  [MIT](./LICENSE)
package/dist/index.cjs CHANGED
@@ -38,6 +38,7 @@ __reExport(index_exports, require("./netFetch"), module.exports);
38
38
  __reExport(index_exports, require("./secrets"), module.exports);
39
39
  __reExport(index_exports, require("./llm"), module.exports);
40
40
  __reExport(index_exports, require("./diagnostics"), module.exports);
41
+ __reExport(index_exports, require("./vcs"), module.exports);
41
42
  __reExport(index_exports, require("./onFsChange"), module.exports);
42
43
  __reExport(index_exports, require("./fs"), module.exports);
43
44
  __reExport(index_exports, require("./debug"), module.exports);
@@ -73,6 +74,7 @@ __reExport(index_exports, require("./sandboxTypes"), module.exports);
73
74
  ...require("./secrets"),
74
75
  ...require("./llm"),
75
76
  ...require("./diagnostics"),
77
+ ...require("./vcs"),
76
78
  ...require("./onFsChange"),
77
79
  ...require("./fs"),
78
80
  ...require("./debug"),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./MDXProvider\";\nexport * from \"./routing\";\nexport * from \"./boot\";\nexport * from './components/Include';\nexport * from './components/MDXComponents';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks'\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './region';\nexport * from './mounts';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './sandboxTypes';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,0BAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,iCAHd;AAIA,0BAAc,uCAJd;AAKA,0BAAc,oCALd;AAMA,0BAAc,gCANd;AAOA,0BAAc,oBAPd;AAQA,0BAAc,mBARd;AASA,0BAAc,oBATd;AAUA,0BAAc,4BAVd;AAWA,0BAAc,qBAXd;AAYA,0BAAc,yBAZd;AAaA,0BAAc,qBAbd;AAcA,0BAAc,qBAdd;AAeA,0BAAc,yBAfd;AAgBA,0BAAc,sBAhBd;AAiBA,0BAAc,kBAjBd;AAkBA,0BAAc,kBAlBd;AAmBA,0BAAc,uBAnBd;AAoBA,0BAAc,sBApBd;AAqBA,0BAAc,kBArBd;AAsBA,0BAAc,0BAtBd;AAuBA,0BAAc,yBAvBd;AAwBA,0BAAc,iBAxBd;AAyBA,0BAAc,oBAzBd;AA0BA,0BAAc,oBA1Bd;AA2BA,0BAAc,sBA3Bd;AA4BA,0BAAc,wBA5Bd;AA6BA,0BAAc,oBA7Bd;AA8BA,0BAAc,sBA9Bd;AA+BA,0BAAc,6BA/Bd;AAgCA,0BAAc,2BAhCd;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./MDXProvider\";\nexport * from \"./routing\";\nexport * from \"./boot\";\nexport * from './components/Include';\nexport * from './components/MDXComponents';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks'\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './region';\nexport * from './mounts';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './vcs';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './sandboxTypes';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,0BAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,iCAHd;AAIA,0BAAc,uCAJd;AAKA,0BAAc,oCALd;AAMA,0BAAc,gCANd;AAOA,0BAAc,oBAPd;AAQA,0BAAc,mBARd;AASA,0BAAc,oBATd;AAUA,0BAAc,4BAVd;AAWA,0BAAc,qBAXd;AAYA,0BAAc,yBAZd;AAaA,0BAAc,qBAbd;AAcA,0BAAc,qBAdd;AAeA,0BAAc,yBAfd;AAgBA,0BAAc,sBAhBd;AAiBA,0BAAc,kBAjBd;AAkBA,0BAAc,kBAlBd;AAmBA,0BAAc,uBAnBd;AAoBA,0BAAc,sBApBd;AAqBA,0BAAc,kBArBd;AAsBA,0BAAc,0BAtBd;AAuBA,0BAAc,kBAvBd;AAwBA,0BAAc,yBAxBd;AAyBA,0BAAc,iBAzBd;AA0BA,0BAAc,oBA1Bd;AA2BA,0BAAc,oBA3Bd;AA4BA,0BAAc,sBA5Bd;AA6BA,0BAAc,wBA7Bd;AA8BA,0BAAc,oBA9Bd;AA+BA,0BAAc,sBA/Bd;AAgCA,0BAAc,6BAhCd;AAiCA,0BAAc,2BAjCd;","names":[]}
package/dist/index.d.cts CHANGED
@@ -21,6 +21,7 @@ export { HostFetchInit, HostFetchResponse, HostFetchStreamEvent, HostFetchStream
21
21
  export { SecretError, SecretGrant, SecretHints, SecretQuery, SecretType, SecretView, getSecrets, onSecretsChange, requestAddSecret, requestSecret, revokeSecret, useSecrets } from './secrets.cjs';
22
22
  export { ChatDelta, ChatFeatures, ChatMessage, ChatProviderInfo, ChatRequest, ChatResult, ChatRole, ChatStopReason, ContentPart, ToolDef, chat, describeChat, onChatProviderChange, useChatProvider } from './llm.cjs';
23
23
  export { BuildError, ConsoleEntry, ConsoleLevel, Diagnostics, DiagnosticsProvenance, getDiagnostics, onDiagnosticsChange, useDiagnostics } from './diagnostics.cjs';
24
+ export { VcsActionError, VcsBranch, VcsChange, VcsPR, VcsState, getVcsState, onVcsStateChange, refreshDiff, refreshPRs, resetWorkingTree, useVcsState } from './vcs.cjs';
24
25
  export { FsChange, getFsChange, onFsChange, useFsChange } from './onFsChange.cjs';
25
26
  export { DirEntry, FileStat, FsError, MountFs, SandboxFsPort, fsAvailable, mimeTypeFor, openAppFs, openFs, sandboxFs } from './fs.cjs';
26
27
  export { DebugLevel, debug, isDebugEnabled, log, useDebugEnabled } from './debug.cjs';
package/dist/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export { HostFetchInit, HostFetchResponse, HostFetchStreamEvent, HostFetchStream
21
21
  export { SecretError, SecretGrant, SecretHints, SecretQuery, SecretType, SecretView, getSecrets, onSecretsChange, requestAddSecret, requestSecret, revokeSecret, useSecrets } from './secrets.js';
22
22
  export { ChatDelta, ChatFeatures, ChatMessage, ChatProviderInfo, ChatRequest, ChatResult, ChatRole, ChatStopReason, ContentPart, ToolDef, chat, describeChat, onChatProviderChange, useChatProvider } from './llm.js';
23
23
  export { BuildError, ConsoleEntry, ConsoleLevel, Diagnostics, DiagnosticsProvenance, getDiagnostics, onDiagnosticsChange, useDiagnostics } from './diagnostics.js';
24
+ export { VcsActionError, VcsBranch, VcsChange, VcsPR, VcsState, getVcsState, onVcsStateChange, refreshDiff, refreshPRs, resetWorkingTree, useVcsState } from './vcs.js';
24
25
  export { FsChange, getFsChange, onFsChange, useFsChange } from './onFsChange.js';
25
26
  export { DirEntry, FileStat, FsError, MountFs, SandboxFsPort, fsAvailable, mimeTypeFor, openAppFs, openFs, sandboxFs } from './fs.js';
26
27
  export { DebugLevel, debug, isDebugEnabled, log, useDebugEnabled } from './debug.js';
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ export * from "./netFetch";
21
21
  export * from "./secrets";
22
22
  export * from "./llm";
23
23
  export * from "./diagnostics";
24
+ export * from "./vcs";
24
25
  export * from "./onFsChange";
25
26
  export * from "./fs";
26
27
  export * from "./debug";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./MDXProvider\";\nexport * from \"./routing\";\nexport * from \"./boot\";\nexport * from './components/Include';\nexport * from './components/MDXComponents';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks'\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './region';\nexport * from './mounts';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './sandboxTypes';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./MDXProvider\";\nexport * from \"./routing\";\nexport * from \"./boot\";\nexport * from './components/Include';\nexport * from './components/MDXComponents';\nexport * from './components/MountImage';\nexport * from './components/Routes';\nexport * from './hooks'\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './region';\nexport * from './mounts';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './llm';\nexport * from './diagnostics';\nexport * from './vcs';\nexport * from './onFsChange';\nexport * from './fs';\nexport * from './debug';\nexport * from './tasks';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './loading';\nexport * from './protocolStream';\nexport * from './sandboxTypes';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
package/dist/vcs.cjs ADDED
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var vcs_exports = {};
20
+ __export(vcs_exports, {
21
+ getVcsState: () => getVcsState,
22
+ onVcsStateChange: () => onVcsStateChange,
23
+ refreshDiff: () => refreshDiff,
24
+ refreshPRs: () => refreshPRs,
25
+ resetWorkingTree: () => resetWorkingTree,
26
+ useVcsState: () => useVcsState
27
+ });
28
+ module.exports = __toCommonJS(vcs_exports);
29
+ var import_pushChannel = require("./pushChannel");
30
+ var import_sandboxUtils = require("./sandboxUtils");
31
+ const EMPTY = { changes: [], branch: null, prs: [], diffLoading: false };
32
+ const isChangeArray = (v) => Array.isArray(v) && v.every(
33
+ (c) => !!c && typeof c.path === "string" && typeof c.status === "string"
34
+ );
35
+ const channel = (0, import_pushChannel.createPushChannel)({
36
+ pushType: "vcs-state",
37
+ requestType: "request-vcs-state",
38
+ initial: EMPTY,
39
+ parse: (msg) => {
40
+ if (!isChangeArray(msg.changes)) return void 0;
41
+ const branch = msg.branch && typeof msg.branch === "object" ? msg.branch : null;
42
+ const prs = Array.isArray(msg.prs) ? msg.prs : [];
43
+ return {
44
+ changes: msg.changes,
45
+ branch,
46
+ prs,
47
+ diffLoading: msg.diffLoading === true
48
+ };
49
+ }
50
+ });
51
+ const getVcsState = () => channel.get();
52
+ const onVcsStateChange = (listener) => channel.onChange(listener);
53
+ const useVcsState = () => channel.use();
54
+ const vcsRequest = async (method, arg = {}) => {
55
+ const res = await (0, import_sandboxUtils.protocolRequest)("vcs", method, [arg]);
56
+ if (!res || res.ok !== true) {
57
+ const err = new Error(res?.message ?? `vcs ${method} failed`);
58
+ err.code = res?.code ?? "unknown";
59
+ throw err;
60
+ }
61
+ };
62
+ const refreshDiff = () => vcsRequest("refreshDiff");
63
+ const refreshPRs = () => vcsRequest("refreshPRs");
64
+ const resetWorkingTree = () => vcsRequest("reset", { confirm: true });
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ getVcsState,
68
+ onVcsStateChange,
69
+ refreshDiff,
70
+ refreshPRs,
71
+ resetWorkingTree,
72
+ useVcsState
73
+ });
74
+ //# sourceMappingURL=vcs.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/vcs.ts"],"sourcesContent":["// The `vcs:read` / `vcs:reset` source-control surface — app-facing wrappers\n// (UI_AS_APPS_SPEC §5.3 Recipe A read channel + §8.4 Recipe B actions;\n// migrate-sidebars-to-apps Phase 05; roadmap R3-52).\n//\n// A first-party contribute panel (the `panel.contribute` app, Phase 06) reads the\n// live source-control state the native `SourceControlPanel` shows — the working-tree\n// diff summary, the branch lineage, and the open-PR list — and can trigger a\n// refresh/reset. The host derives all of it from authenticated GitHub calls +\n// the COW layers; NONE of the underlying `DiffResult` / `FileSystem` / OAuth token\n// ever crosses the boundary (§8.10) — the wire carries only the plain-JSON\n// {@link VcsState} the host projects.\n//\n// Read side: a Recipe-A push channel, the same get/onChange/use trio as\n// `editorContext` / `diagnostics`. Inert until the host wires the channel\n// (site-main `channelBridge`); an app without `vcs:read` simply sees the empty\n// initial. Action side: `protocol-vcs` requests gated host-side — `refreshDiff` /\n// `refreshPRs` by `vcs:read`, `resetWorkingTree` by first-party-only `vcs:reset`.\nimport { createPushChannel } from './pushChannel';\nimport { protocolRequest } from './sandboxUtils';\n\n/** One changed path in the working tree (vs. the loaded ref). `status` mirrors the\n * host `DiffResult` change kinds; `path` is repo-relative. Contents are NOT\n * carried — the native panel showed path + status, and a per-file content diff is\n * a deferred follow-up (plan step 6). */\nexport interface VcsChange {\n path: string;\n status: 'created' | 'modified' | 'deleted';\n}\n\n/** The branch the working tree sits on and the upstream it diverged from\n * (host `BranchInfo`, §15.1). `null` until the user is on a immediately.run-created\n * branch. `upstreamPushable` is `null` while push access is still being probed. */\nexport interface VcsBranch {\n name: string;\n parentRepo: string;\n parentRef: string;\n parentCommitSha: string;\n upstreamPushable: boolean | null;\n}\n\n/** One pull request open from the current branch (host `BranchPR`). */\nexport interface VcsPR {\n number: number;\n url: string;\n title: string;\n state: 'open' | 'closed' | 'merged';\n draft: boolean;\n}\n\n/** The whole source-control snapshot the host projects to a `vcs:read` frame.\n * Plain JSON — never a `DiffResult` / `FileSystem` / `Journal`. */\nexport interface VcsState {\n changes: VcsChange[];\n branch: VcsBranch | null;\n prs: VcsPR[];\n /** True while the host is recomputing the diff — the panel shows a spinner\n * without a separate request (plan gotcha). */\n diffLoading: boolean;\n}\n\n/** Value before the host answers — also the value when the app may not read the\n * channel (no `vcs:read`): an empty, branch-less snapshot. */\nconst EMPTY: VcsState = { changes: [], branch: null, prs: [], diffLoading: false };\n\nconst isChangeArray = (v: unknown): v is VcsChange[] =>\n Array.isArray(v) &&\n v.every(\n (c) =>\n !!c &&\n typeof (c as VcsChange).path === 'string' &&\n typeof (c as VcsChange).status === 'string',\n );\n\nconst channel = createPushChannel<VcsState>({\n pushType: 'vcs-state',\n requestType: 'request-vcs-state',\n initial: EMPTY,\n parse: (msg) => {\n // Require a well-formed `changes` array; tolerate an absent branch/prs. A\n // malformed push is ignored (returns undefined) so the last good state stands.\n if (!isChangeArray(msg.changes)) return undefined;\n const branch =\n msg.branch && typeof msg.branch === 'object' ? (msg.branch as VcsBranch) : null;\n const prs = Array.isArray(msg.prs) ? (msg.prs as VcsPR[]) : [];\n return {\n changes: msg.changes,\n branch,\n prs,\n diffLoading: msg.diffLoading === true,\n };\n },\n});\n\n/** One-off read of the current source-control state. Returns the empty snapshot\n * until the host answers (or if the app lacks `vcs:read`). Use\n * {@link onVcsStateChange} / {@link useVcsState} to react to live updates. */\nexport const getVcsState = (): VcsState => channel.get();\n\n/** Subscribe to source-control changes. Invoked immediately with the current\n * value, then on every host push (diff refresh, PR poll, branch change). Returns\n * an unsubscribe. */\nexport const onVcsStateChange = (listener: (state: VcsState) => void): (() => void) =>\n channel.onChange(listener);\n\n/** React hook: the current source-control state, re-rendering on every change. */\nexport const useVcsState = (): VcsState => channel.use();\n\n// ---------------------------------------------------------------------------\n// Actions (Recipe B, §8.4). The app NAMES an intent and the HOST performs it —\n// the COW/journal stays in the kernel (§2/§4). `refreshDiff`/`refreshPRs` only\n// cause a host-side recompute + a fresh push (gated `vcs:read`, no new authority);\n// `resetWorkingTree` DISCARDS the user's unsaved work, gated by the first-party-only\n// `vcs:reset` — a fork can never hold it. The arm-then-confirm UX stays in the app;\n// the authority is gated host-side (§8.9), and the host requires `confirm:true` as\n// belt-and-braces (T22).\n// ---------------------------------------------------------------------------\n\n/** An error from a `vcs` action, carrying a machine-readable `.code`. */\nexport interface VcsActionError extends Error {\n code:\n | 'forbidden' // the frame lacks the required capability (`vcs:read` / `vcs:reset`)\n | 'invalid-params' // reset called without `confirm: true`\n | 'no-target' // there is no host contribute session (not in edit mode)\n | 'unknown';\n}\n\ntype VcsResult =\n | { ok: true; data: unknown }\n | { ok: false; code: string; message: string };\n\nconst vcsRequest = async (method: string, arg: Record<string, unknown> = {}): Promise<void> => {\n const res = (await protocolRequest('vcs', method, [arg])) as VcsResult;\n if (!res || res.ok !== true) {\n const err = new Error(res?.message ?? `vcs ${method} failed`) as VcsActionError;\n err.code = (res?.code as VcsActionError['code']) ?? 'unknown';\n throw err;\n }\n};\n\n/** Ask the host to recompute the working-tree diff and push a fresh {@link VcsState}.\n * Gated `vcs:read`. Rejects with a {@link VcsActionError} (`.code`). */\nexport const refreshDiff = (): Promise<void> => vcsRequest('refreshDiff');\n\n/** Ask the host to re-poll the open PRs and push a fresh {@link VcsState}. Gated\n * `vcs:read`. Rejects with a {@link VcsActionError} (`.code`). */\nexport const refreshPRs = (): Promise<void> => vcsRequest('refreshPRs');\n\n/** Ask the host to DISCARD the working tree (COW writable wipe + journal clear) —\n * irreversible. First-party-only (`vcs:reset`); a fork/preview is refused at the\n * gate. Requires `confirm: true` (host belt-and-braces). Rejects with a\n * {@link VcsActionError} (`.code`). */\nexport const resetWorkingTree = (): Promise<void> => vcsRequest('reset', { confirm: true });\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA,yBAAkC;AAClC,0BAAgC;AA4ChC,MAAM,QAAkB,EAAE,SAAS,CAAC,GAAG,QAAQ,MAAM,KAAK,CAAC,GAAG,aAAa,MAAM;AAEjF,MAAM,gBAAgB,CAAC,MACrB,MAAM,QAAQ,CAAC,KACf,EAAE;AAAA,EACA,CAAC,MACC,CAAC,CAAC,KACF,OAAQ,EAAgB,SAAS,YACjC,OAAQ,EAAgB,WAAW;AACvC;AAEF,MAAM,cAAU,sCAA4B;AAAA,EAC1C,UAAU;AAAA,EACV,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO,CAAC,QAAQ;AAGd,QAAI,CAAC,cAAc,IAAI,OAAO,EAAG,QAAO;AACxC,UAAM,SACJ,IAAI,UAAU,OAAO,IAAI,WAAW,WAAY,IAAI,SAAuB;AAC7E,UAAM,MAAM,MAAM,QAAQ,IAAI,GAAG,IAAK,IAAI,MAAkB,CAAC;AAC7D,WAAO;AAAA,MACL,SAAS,IAAI;AAAA,MACb;AAAA,MACA;AAAA,MACA,aAAa,IAAI,gBAAgB;AAAA,IACnC;AAAA,EACF;AACF,CAAC;AAKM,MAAM,cAAc,MAAgB,QAAQ,IAAI;AAKhD,MAAM,mBAAmB,CAAC,aAC/B,QAAQ,SAAS,QAAQ;AAGpB,MAAM,cAAc,MAAgB,QAAQ,IAAI;AAyBvD,MAAM,aAAa,OAAO,QAAgB,MAA+B,CAAC,MAAqB;AAC7F,QAAM,MAAO,UAAM,qCAAgB,OAAO,QAAQ,CAAC,GAAG,CAAC;AACvD,MAAI,CAAC,OAAO,IAAI,OAAO,MAAM;AAC3B,UAAM,MAAM,IAAI,MAAM,KAAK,WAAW,OAAO,MAAM,SAAS;AAC5D,QAAI,OAAQ,KAAK,QAAmC;AACpD,UAAM;AAAA,EACR;AACF;AAIO,MAAM,cAAc,MAAqB,WAAW,aAAa;AAIjE,MAAM,aAAa,MAAqB,WAAW,YAAY;AAM/D,MAAM,mBAAmB,MAAqB,WAAW,SAAS,EAAE,SAAS,KAAK,CAAC;","names":[]}
package/dist/vcs.d.cts ADDED
@@ -0,0 +1,63 @@
1
+ /** One changed path in the working tree (vs. the loaded ref). `status` mirrors the
2
+ * host `DiffResult` change kinds; `path` is repo-relative. Contents are NOT
3
+ * carried — the native panel showed path + status, and a per-file content diff is
4
+ * a deferred follow-up (plan step 6). */
5
+ interface VcsChange {
6
+ path: string;
7
+ status: 'created' | 'modified' | 'deleted';
8
+ }
9
+ /** The branch the working tree sits on and the upstream it diverged from
10
+ * (host `BranchInfo`, §15.1). `null` until the user is on a immediately.run-created
11
+ * branch. `upstreamPushable` is `null` while push access is still being probed. */
12
+ interface VcsBranch {
13
+ name: string;
14
+ parentRepo: string;
15
+ parentRef: string;
16
+ parentCommitSha: string;
17
+ upstreamPushable: boolean | null;
18
+ }
19
+ /** One pull request open from the current branch (host `BranchPR`). */
20
+ interface VcsPR {
21
+ number: number;
22
+ url: string;
23
+ title: string;
24
+ state: 'open' | 'closed' | 'merged';
25
+ draft: boolean;
26
+ }
27
+ /** The whole source-control snapshot the host projects to a `vcs:read` frame.
28
+ * Plain JSON — never a `DiffResult` / `FileSystem` / `Journal`. */
29
+ interface VcsState {
30
+ changes: VcsChange[];
31
+ branch: VcsBranch | null;
32
+ prs: VcsPR[];
33
+ /** True while the host is recomputing the diff — the panel shows a spinner
34
+ * without a separate request (plan gotcha). */
35
+ diffLoading: boolean;
36
+ }
37
+ /** One-off read of the current source-control state. Returns the empty snapshot
38
+ * until the host answers (or if the app lacks `vcs:read`). Use
39
+ * {@link onVcsStateChange} / {@link useVcsState} to react to live updates. */
40
+ declare const getVcsState: () => VcsState;
41
+ /** Subscribe to source-control changes. Invoked immediately with the current
42
+ * value, then on every host push (diff refresh, PR poll, branch change). Returns
43
+ * an unsubscribe. */
44
+ declare const onVcsStateChange: (listener: (state: VcsState) => void) => (() => void);
45
+ /** React hook: the current source-control state, re-rendering on every change. */
46
+ declare const useVcsState: () => VcsState;
47
+ /** An error from a `vcs` action, carrying a machine-readable `.code`. */
48
+ interface VcsActionError extends Error {
49
+ code: 'forbidden' | 'invalid-params' | 'no-target' | 'unknown';
50
+ }
51
+ /** Ask the host to recompute the working-tree diff and push a fresh {@link VcsState}.
52
+ * Gated `vcs:read`. Rejects with a {@link VcsActionError} (`.code`). */
53
+ declare const refreshDiff: () => Promise<void>;
54
+ /** Ask the host to re-poll the open PRs and push a fresh {@link VcsState}. Gated
55
+ * `vcs:read`. Rejects with a {@link VcsActionError} (`.code`). */
56
+ declare const refreshPRs: () => Promise<void>;
57
+ /** Ask the host to DISCARD the working tree (COW writable wipe + journal clear) —
58
+ * irreversible. First-party-only (`vcs:reset`); a fork/preview is refused at the
59
+ * gate. Requires `confirm: true` (host belt-and-braces). Rejects with a
60
+ * {@link VcsActionError} (`.code`). */
61
+ declare const resetWorkingTree: () => Promise<void>;
62
+
63
+ export { type VcsActionError, type VcsBranch, type VcsChange, type VcsPR, type VcsState, getVcsState, onVcsStateChange, refreshDiff, refreshPRs, resetWorkingTree, useVcsState };
package/dist/vcs.d.ts ADDED
@@ -0,0 +1,63 @@
1
+ /** One changed path in the working tree (vs. the loaded ref). `status` mirrors the
2
+ * host `DiffResult` change kinds; `path` is repo-relative. Contents are NOT
3
+ * carried — the native panel showed path + status, and a per-file content diff is
4
+ * a deferred follow-up (plan step 6). */
5
+ interface VcsChange {
6
+ path: string;
7
+ status: 'created' | 'modified' | 'deleted';
8
+ }
9
+ /** The branch the working tree sits on and the upstream it diverged from
10
+ * (host `BranchInfo`, §15.1). `null` until the user is on a immediately.run-created
11
+ * branch. `upstreamPushable` is `null` while push access is still being probed. */
12
+ interface VcsBranch {
13
+ name: string;
14
+ parentRepo: string;
15
+ parentRef: string;
16
+ parentCommitSha: string;
17
+ upstreamPushable: boolean | null;
18
+ }
19
+ /** One pull request open from the current branch (host `BranchPR`). */
20
+ interface VcsPR {
21
+ number: number;
22
+ url: string;
23
+ title: string;
24
+ state: 'open' | 'closed' | 'merged';
25
+ draft: boolean;
26
+ }
27
+ /** The whole source-control snapshot the host projects to a `vcs:read` frame.
28
+ * Plain JSON — never a `DiffResult` / `FileSystem` / `Journal`. */
29
+ interface VcsState {
30
+ changes: VcsChange[];
31
+ branch: VcsBranch | null;
32
+ prs: VcsPR[];
33
+ /** True while the host is recomputing the diff — the panel shows a spinner
34
+ * without a separate request (plan gotcha). */
35
+ diffLoading: boolean;
36
+ }
37
+ /** One-off read of the current source-control state. Returns the empty snapshot
38
+ * until the host answers (or if the app lacks `vcs:read`). Use
39
+ * {@link onVcsStateChange} / {@link useVcsState} to react to live updates. */
40
+ declare const getVcsState: () => VcsState;
41
+ /** Subscribe to source-control changes. Invoked immediately with the current
42
+ * value, then on every host push (diff refresh, PR poll, branch change). Returns
43
+ * an unsubscribe. */
44
+ declare const onVcsStateChange: (listener: (state: VcsState) => void) => (() => void);
45
+ /** React hook: the current source-control state, re-rendering on every change. */
46
+ declare const useVcsState: () => VcsState;
47
+ /** An error from a `vcs` action, carrying a machine-readable `.code`. */
48
+ interface VcsActionError extends Error {
49
+ code: 'forbidden' | 'invalid-params' | 'no-target' | 'unknown';
50
+ }
51
+ /** Ask the host to recompute the working-tree diff and push a fresh {@link VcsState}.
52
+ * Gated `vcs:read`. Rejects with a {@link VcsActionError} (`.code`). */
53
+ declare const refreshDiff: () => Promise<void>;
54
+ /** Ask the host to re-poll the open PRs and push a fresh {@link VcsState}. Gated
55
+ * `vcs:read`. Rejects with a {@link VcsActionError} (`.code`). */
56
+ declare const refreshPRs: () => Promise<void>;
57
+ /** Ask the host to DISCARD the working tree (COW writable wipe + journal clear) —
58
+ * irreversible. First-party-only (`vcs:reset`); a fork/preview is refused at the
59
+ * gate. Requires `confirm: true` (host belt-and-braces). Rejects with a
60
+ * {@link VcsActionError} (`.code`). */
61
+ declare const resetWorkingTree: () => Promise<void>;
62
+
63
+ export { type VcsActionError, type VcsBranch, type VcsChange, type VcsPR, type VcsState, getVcsState, onVcsStateChange, refreshDiff, refreshPRs, resetWorkingTree, useVcsState };
package/dist/vcs.js ADDED
@@ -0,0 +1,45 @@
1
+ import { createPushChannel } from "./pushChannel";
2
+ import { protocolRequest } from "./sandboxUtils";
3
+ const EMPTY = { changes: [], branch: null, prs: [], diffLoading: false };
4
+ const isChangeArray = (v) => Array.isArray(v) && v.every(
5
+ (c) => !!c && typeof c.path === "string" && typeof c.status === "string"
6
+ );
7
+ const channel = createPushChannel({
8
+ pushType: "vcs-state",
9
+ requestType: "request-vcs-state",
10
+ initial: EMPTY,
11
+ parse: (msg) => {
12
+ if (!isChangeArray(msg.changes)) return void 0;
13
+ const branch = msg.branch && typeof msg.branch === "object" ? msg.branch : null;
14
+ const prs = Array.isArray(msg.prs) ? msg.prs : [];
15
+ return {
16
+ changes: msg.changes,
17
+ branch,
18
+ prs,
19
+ diffLoading: msg.diffLoading === true
20
+ };
21
+ }
22
+ });
23
+ const getVcsState = () => channel.get();
24
+ const onVcsStateChange = (listener) => channel.onChange(listener);
25
+ const useVcsState = () => channel.use();
26
+ const vcsRequest = async (method, arg = {}) => {
27
+ const res = await protocolRequest("vcs", method, [arg]);
28
+ if (!res || res.ok !== true) {
29
+ const err = new Error(res?.message ?? `vcs ${method} failed`);
30
+ err.code = res?.code ?? "unknown";
31
+ throw err;
32
+ }
33
+ };
34
+ const refreshDiff = () => vcsRequest("refreshDiff");
35
+ const refreshPRs = () => vcsRequest("refreshPRs");
36
+ const resetWorkingTree = () => vcsRequest("reset", { confirm: true });
37
+ export {
38
+ getVcsState,
39
+ onVcsStateChange,
40
+ refreshDiff,
41
+ refreshPRs,
42
+ resetWorkingTree,
43
+ useVcsState
44
+ };
45
+ //# sourceMappingURL=vcs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/vcs.ts"],"sourcesContent":["// The `vcs:read` / `vcs:reset` source-control surface — app-facing wrappers\n// (UI_AS_APPS_SPEC §5.3 Recipe A read channel + §8.4 Recipe B actions;\n// migrate-sidebars-to-apps Phase 05; roadmap R3-52).\n//\n// A first-party contribute panel (the `panel.contribute` app, Phase 06) reads the\n// live source-control state the native `SourceControlPanel` shows — the working-tree\n// diff summary, the branch lineage, and the open-PR list — and can trigger a\n// refresh/reset. The host derives all of it from authenticated GitHub calls +\n// the COW layers; NONE of the underlying `DiffResult` / `FileSystem` / OAuth token\n// ever crosses the boundary (§8.10) — the wire carries only the plain-JSON\n// {@link VcsState} the host projects.\n//\n// Read side: a Recipe-A push channel, the same get/onChange/use trio as\n// `editorContext` / `diagnostics`. Inert until the host wires the channel\n// (site-main `channelBridge`); an app without `vcs:read` simply sees the empty\n// initial. Action side: `protocol-vcs` requests gated host-side — `refreshDiff` /\n// `refreshPRs` by `vcs:read`, `resetWorkingTree` by first-party-only `vcs:reset`.\nimport { createPushChannel } from './pushChannel';\nimport { protocolRequest } from './sandboxUtils';\n\n/** One changed path in the working tree (vs. the loaded ref). `status` mirrors the\n * host `DiffResult` change kinds; `path` is repo-relative. Contents are NOT\n * carried — the native panel showed path + status, and a per-file content diff is\n * a deferred follow-up (plan step 6). */\nexport interface VcsChange {\n path: string;\n status: 'created' | 'modified' | 'deleted';\n}\n\n/** The branch the working tree sits on and the upstream it diverged from\n * (host `BranchInfo`, §15.1). `null` until the user is on a immediately.run-created\n * branch. `upstreamPushable` is `null` while push access is still being probed. */\nexport interface VcsBranch {\n name: string;\n parentRepo: string;\n parentRef: string;\n parentCommitSha: string;\n upstreamPushable: boolean | null;\n}\n\n/** One pull request open from the current branch (host `BranchPR`). */\nexport interface VcsPR {\n number: number;\n url: string;\n title: string;\n state: 'open' | 'closed' | 'merged';\n draft: boolean;\n}\n\n/** The whole source-control snapshot the host projects to a `vcs:read` frame.\n * Plain JSON — never a `DiffResult` / `FileSystem` / `Journal`. */\nexport interface VcsState {\n changes: VcsChange[];\n branch: VcsBranch | null;\n prs: VcsPR[];\n /** True while the host is recomputing the diff — the panel shows a spinner\n * without a separate request (plan gotcha). */\n diffLoading: boolean;\n}\n\n/** Value before the host answers — also the value when the app may not read the\n * channel (no `vcs:read`): an empty, branch-less snapshot. */\nconst EMPTY: VcsState = { changes: [], branch: null, prs: [], diffLoading: false };\n\nconst isChangeArray = (v: unknown): v is VcsChange[] =>\n Array.isArray(v) &&\n v.every(\n (c) =>\n !!c &&\n typeof (c as VcsChange).path === 'string' &&\n typeof (c as VcsChange).status === 'string',\n );\n\nconst channel = createPushChannel<VcsState>({\n pushType: 'vcs-state',\n requestType: 'request-vcs-state',\n initial: EMPTY,\n parse: (msg) => {\n // Require a well-formed `changes` array; tolerate an absent branch/prs. A\n // malformed push is ignored (returns undefined) so the last good state stands.\n if (!isChangeArray(msg.changes)) return undefined;\n const branch =\n msg.branch && typeof msg.branch === 'object' ? (msg.branch as VcsBranch) : null;\n const prs = Array.isArray(msg.prs) ? (msg.prs as VcsPR[]) : [];\n return {\n changes: msg.changes,\n branch,\n prs,\n diffLoading: msg.diffLoading === true,\n };\n },\n});\n\n/** One-off read of the current source-control state. Returns the empty snapshot\n * until the host answers (or if the app lacks `vcs:read`). Use\n * {@link onVcsStateChange} / {@link useVcsState} to react to live updates. */\nexport const getVcsState = (): VcsState => channel.get();\n\n/** Subscribe to source-control changes. Invoked immediately with the current\n * value, then on every host push (diff refresh, PR poll, branch change). Returns\n * an unsubscribe. */\nexport const onVcsStateChange = (listener: (state: VcsState) => void): (() => void) =>\n channel.onChange(listener);\n\n/** React hook: the current source-control state, re-rendering on every change. */\nexport const useVcsState = (): VcsState => channel.use();\n\n// ---------------------------------------------------------------------------\n// Actions (Recipe B, §8.4). The app NAMES an intent and the HOST performs it —\n// the COW/journal stays in the kernel (§2/§4). `refreshDiff`/`refreshPRs` only\n// cause a host-side recompute + a fresh push (gated `vcs:read`, no new authority);\n// `resetWorkingTree` DISCARDS the user's unsaved work, gated by the first-party-only\n// `vcs:reset` — a fork can never hold it. The arm-then-confirm UX stays in the app;\n// the authority is gated host-side (§8.9), and the host requires `confirm:true` as\n// belt-and-braces (T22).\n// ---------------------------------------------------------------------------\n\n/** An error from a `vcs` action, carrying a machine-readable `.code`. */\nexport interface VcsActionError extends Error {\n code:\n | 'forbidden' // the frame lacks the required capability (`vcs:read` / `vcs:reset`)\n | 'invalid-params' // reset called without `confirm: true`\n | 'no-target' // there is no host contribute session (not in edit mode)\n | 'unknown';\n}\n\ntype VcsResult =\n | { ok: true; data: unknown }\n | { ok: false; code: string; message: string };\n\nconst vcsRequest = async (method: string, arg: Record<string, unknown> = {}): Promise<void> => {\n const res = (await protocolRequest('vcs', method, [arg])) as VcsResult;\n if (!res || res.ok !== true) {\n const err = new Error(res?.message ?? `vcs ${method} failed`) as VcsActionError;\n err.code = (res?.code as VcsActionError['code']) ?? 'unknown';\n throw err;\n }\n};\n\n/** Ask the host to recompute the working-tree diff and push a fresh {@link VcsState}.\n * Gated `vcs:read`. Rejects with a {@link VcsActionError} (`.code`). */\nexport const refreshDiff = (): Promise<void> => vcsRequest('refreshDiff');\n\n/** Ask the host to re-poll the open PRs and push a fresh {@link VcsState}. Gated\n * `vcs:read`. Rejects with a {@link VcsActionError} (`.code`). */\nexport const refreshPRs = (): Promise<void> => vcsRequest('refreshPRs');\n\n/** Ask the host to DISCARD the working tree (COW writable wipe + journal clear) —\n * irreversible. First-party-only (`vcs:reset`); a fork/preview is refused at the\n * gate. Requires `confirm: true` (host belt-and-braces). Rejects with a\n * {@link VcsActionError} (`.code`). */\nexport const resetWorkingTree = (): Promise<void> => vcsRequest('reset', { confirm: true });\n"],"mappings":"AAiBA,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AA4ChC,MAAM,QAAkB,EAAE,SAAS,CAAC,GAAG,QAAQ,MAAM,KAAK,CAAC,GAAG,aAAa,MAAM;AAEjF,MAAM,gBAAgB,CAAC,MACrB,MAAM,QAAQ,CAAC,KACf,EAAE;AAAA,EACA,CAAC,MACC,CAAC,CAAC,KACF,OAAQ,EAAgB,SAAS,YACjC,OAAQ,EAAgB,WAAW;AACvC;AAEF,MAAM,UAAU,kBAA4B;AAAA,EAC1C,UAAU;AAAA,EACV,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO,CAAC,QAAQ;AAGd,QAAI,CAAC,cAAc,IAAI,OAAO,EAAG,QAAO;AACxC,UAAM,SACJ,IAAI,UAAU,OAAO,IAAI,WAAW,WAAY,IAAI,SAAuB;AAC7E,UAAM,MAAM,MAAM,QAAQ,IAAI,GAAG,IAAK,IAAI,MAAkB,CAAC;AAC7D,WAAO;AAAA,MACL,SAAS,IAAI;AAAA,MACb;AAAA,MACA;AAAA,MACA,aAAa,IAAI,gBAAgB;AAAA,IACnC;AAAA,EACF;AACF,CAAC;AAKM,MAAM,cAAc,MAAgB,QAAQ,IAAI;AAKhD,MAAM,mBAAmB,CAAC,aAC/B,QAAQ,SAAS,QAAQ;AAGpB,MAAM,cAAc,MAAgB,QAAQ,IAAI;AAyBvD,MAAM,aAAa,OAAO,QAAgB,MAA+B,CAAC,MAAqB;AAC7F,QAAM,MAAO,MAAM,gBAAgB,OAAO,QAAQ,CAAC,GAAG,CAAC;AACvD,MAAI,CAAC,OAAO,IAAI,OAAO,MAAM;AAC3B,UAAM,MAAM,IAAI,MAAM,KAAK,WAAW,OAAO,MAAM,SAAS;AAC5D,QAAI,OAAQ,KAAK,QAAmC;AACpD,UAAM;AAAA,EACR;AACF;AAIO,MAAM,cAAc,MAAqB,WAAW,aAAa;AAIjE,MAAM,aAAa,MAAqB,WAAW,YAAY;AAM/D,MAAM,mBAAmB,MAAqB,WAAW,SAAS,EAAE,SAAS,KAAK,CAAC;","names":[]}
package/dist/version.cjs CHANGED
@@ -21,7 +21,7 @@ __export(version_exports, {
21
21
  SDK_VERSION: () => SDK_VERSION
22
22
  });
23
23
  module.exports = __toCommonJS(version_exports);
24
- const SDK_VERSION = "0.26.0";
24
+ const SDK_VERSION = "0.27.0";
25
25
  // Annotate the CommonJS export names for ESM import in node:
26
26
  0 && (module.exports = {
27
27
  SDK_VERSION
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.26.0';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.27.0';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,cAAc;","names":[]}
@@ -1,4 +1,4 @@
1
1
  /** This SDK's package version, baked from package.json at build (SP2-6). */
2
- declare const SDK_VERSION = "0.26.0";
2
+ declare const SDK_VERSION = "0.27.0";
3
3
 
4
4
  export { SDK_VERSION };
package/dist/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /** This SDK's package version, baked from package.json at build (SP2-6). */
2
- declare const SDK_VERSION = "0.26.0";
2
+ declare const SDK_VERSION = "0.27.0";
3
3
 
4
4
  export { SDK_VERSION };
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.26.0";
1
+ const SDK_VERSION = "0.27.0";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.26.0';\n"],"mappings":"AAIO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.27.0';\n"],"mappings":"AAIO,MAAM,cAAc;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immediately-run/sdk",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Runtime SDK for code executing inside an immediately.run sandbox.",
5
5
  "license": "MIT",
6
6
  "repository": "github:immediately-run/immediately-run-sdk",
@@ -32,6 +32,7 @@
32
32
  "check:circular": "node scripts/check-circular.mjs",
33
33
  "api:check": "node scripts/check-api-stability.mjs",
34
34
  "api:update": "node scripts/check-api-stability.mjs --update",
35
+ "verify": "npm run check:circular && npm test && npm run build && npm run api:check",
35
36
  "docs": "typedoc --json docs/api.json && node scripts/gen-llms.mjs",
36
37
  "prepublishOnly": "npm run check:circular && npm run build && npm run api:check"
37
38
  },