@farero-ai/core 0.1.0 → 0.1.1

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
@@ -2,4 +2,4 @@
2
2
 
3
3
  Shared API route contracts for the Farero PWA, server, and MCP tools. Other apps can import the contracts and route definitions from `@farero-ai/core/contracts` and `@farero-ai/core/routes`.
4
4
 
5
- From the Farero checkout, `yarn pack:core` writes the npm tarball to `output/`. The release includes minified JavaScript, TypeScript declarations, and license information. The checkout builds its workspace copy with `yarn build:core`.
5
+ From the Farero checkout, `yarn pack:core` writes the npm tarball to `output/`. The release includes minified JavaScript, TypeScript declarations, and license information. The checkout builds its workspace copy with `yarn build:core`. A push to Farero's main branch that changes the packed files publishes the next patch release to npm. A change that breaks callers raises the minor version in this package's `package.json`.
@@ -1,5 +1,5 @@
1
1
  /** Destinations understood by the existing Settings owner, including its section shortcuts. */
2
- export declare const SETTINGS_SECTIONS: readonly ["general", "interface", "theme", "providers", "models", "agents", "routing", "plugins", "prompts", "lantern", "feedback", "browser-cookies"];
2
+ export declare const SETTINGS_SECTIONS: readonly ["general", "notifications", "interface", "theme", "providers", "models", "agents", "routing", "plugins", "prompts", "lantern", "feedback", "browser-cookies"];
3
3
  export type SettingsSection = (typeof SETTINGS_SECTIONS)[number];
4
4
  export declare function parseSettingsSection(value: unknown): SettingsSection | null;
5
5
  export type FareroLink = {
package/dist/app-link.js CHANGED
@@ -1 +1 @@
1
- var c=Object.defineProperty;var t=(r,n)=>c(r,"name",{value:n,configurable:!0});import{parseRoleTemplateLink as l,roleTemplateAppRoute as f,roleTemplateDeepLink as g}from"./role-template.js";const d=["general","interface","theme","providers","models","agents","routing","plugins","prompts","lantern","feedback","browser-cookies"];function o(r){return d.find(n=>n===r)??null}t(o,"parseSettingsSection");const m=/^(?=.{1,64}$)[a-z0-9]+(?:[.-][a-z0-9]+)*$/,h=/^farero:\/\/plugins\/([^/]*)\/?$/;function p(r){return typeof r=="string"&&m.test(r)?r:null}t(p,"parsePluginEntryId");function E(r){const n=l(r);if(n)return{kind:"role",slug:n};const i=p(h.exec(r.trim())?.[1]);if(i)return{kind:"plugin",id:i};try{const e=new URL(r.trim());if(e.protocol!=="farero:"||e.hostname!=="settings"||e.username||e.password||e.port||e.search||e.hash)return null;const s=e.pathname.match(/^(?:\/([a-z-]+))?\/?$/),u=s?o(s[1]??"general"):null;return u?{kind:"settings",section:u}:null}catch{return null}}t(E,"parseFareroLink");function a(r){if(!p(r))throw new Error("Plugin directory entry is invalid.");return r}t(a,"pluginEntryId");function I(r){if(r.kind==="role")return g(r.slug);if(r.kind==="plugin")return`farero://plugins/${a(r.id)}`;if(!o(r.section))throw new Error("Settings section is invalid.");return`farero://settings${r.section==="general"?"":`/${r.section}`}`}t(I,"fareroDeepLink");function L(r){if(r.kind==="role")return f(r.slug);if(r.kind==="plugin")return`/?plugin=${a(r.id)}`;if(!o(r.section))throw new Error("Settings section is invalid.");return`/?settings=${r.section}`}t(L,"fareroAppRoute");export{d as SETTINGS_SECTIONS,L as fareroAppRoute,I as fareroDeepLink,E as parseFareroLink,p as parsePluginEntryId,o as parseSettingsSection};
1
+ var c=Object.defineProperty;var t=(r,n)=>c(r,"name",{value:n,configurable:!0});import{parseRoleTemplateLink as l,roleTemplateAppRoute as f,roleTemplateDeepLink as g}from"./role-template.js";const d=["general","notifications","interface","theme","providers","models","agents","routing","plugins","prompts","lantern","feedback","browser-cookies"];function o(r){return d.find(n=>n===r)??null}t(o,"parseSettingsSection");const m=/^(?=.{1,64}$)[a-z0-9]+(?:[.-][a-z0-9]+)*$/,h=/^farero:\/\/plugins\/([^/]*)\/?$/;function p(r){return typeof r=="string"&&m.test(r)?r:null}t(p,"parsePluginEntryId");function E(r){const n=l(r);if(n)return{kind:"role",slug:n};const i=p(h.exec(r.trim())?.[1]);if(i)return{kind:"plugin",id:i};try{const e=new URL(r.trim());if(e.protocol!=="farero:"||e.hostname!=="settings"||e.username||e.password||e.port||e.search||e.hash)return null;const s=e.pathname.match(/^(?:\/([a-z-]+))?\/?$/),u=s?o(s[1]??"general"):null;return u?{kind:"settings",section:u}:null}catch{return null}}t(E,"parseFareroLink");function a(r){if(!p(r))throw new Error("Plugin directory entry is invalid.");return r}t(a,"pluginEntryId");function I(r){if(r.kind==="role")return g(r.slug);if(r.kind==="plugin")return`farero://plugins/${a(r.id)}`;if(!o(r.section))throw new Error("Settings section is invalid.");return`farero://settings${r.section==="general"?"":`/${r.section}`}`}t(I,"fareroDeepLink");function L(r){if(r.kind==="role")return f(r.slug);if(r.kind==="plugin")return`/?plugin=${a(r.id)}`;if(!o(r.section))throw new Error("Settings section is invalid.");return`/?settings=${r.section}`}t(L,"fareroAppRoute");export{d as SETTINGS_SECTIONS,L as fareroAppRoute,I as fareroDeepLink,E as parseFareroLink,p as parsePluginEntryId,o as parseSettingsSection};
package/dist/browser.d.ts CHANGED
@@ -51,8 +51,9 @@ export interface BrowserCommand {
51
51
  scope: BrowserScope;
52
52
  fingerprint: string;
53
53
  /** Only a sign-in request sends `sign-in-open`, once when it starts, and `sign-in-copy`, after the person's
54
- * Continue. No agent route accepts them. A copy names its bound profile in `args.source`. */
55
- action: 'open' | 'close' | 'release' | 'tool' | 'sign-in-open' | 'sign-in-copy' | 'handoff';
54
+ * Continue. `sign-in-logins` and `sign-in-fill` belong to a saved-password sign-in. No agent route accepts
55
+ * any of these. A copy names its bound profile in `args.source`. A fill names a saved sign-in id, never a password. */
56
+ action: 'open' | 'close' | 'release' | 'tool' | 'sign-in-open' | 'sign-in-copy' | 'sign-in-logins' | 'sign-in-fill' | 'handoff';
56
57
  url?: string;
57
58
  tool?: string;
58
59
  args?: Record<string, unknown>;
@@ -61,6 +62,8 @@ export interface BrowserCommand {
61
62
  export declare const BROWSER_FEATURES_HEADER = "x-farero-browser-features";
62
63
  /** The Desktop opens a sign-in page in the person's chosen browser and copies that site's cookies back. */
63
64
  export declare const BROWSER_SIGN_IN_FEATURE = "sign-in";
65
+ /** The Desktop lists saved sign-ins for the page on screen and types the one the person allows. */
66
+ export declare const SAVED_SIGN_IN_FEATURE = "saved-sign-in";
64
67
  /** The sign-in tool before handoff_request took its place. Older transcripts still show its card. */
65
68
  export declare const BROWSER_SIGN_IN_TOOL = "browser_sign_in";
66
69
  export type BrowserSignInState = 'waiting' | 'copying' | 'done' | 'failed' | 'cancelled';
@@ -160,4 +163,50 @@ export declare const BROWSER_PATHS: {
160
163
  readonly signIns: "/api/browser/sign-ins";
161
164
  /** The person's Continue or Cancel. Agent callers are refused. */
162
165
  readonly signInAction: "/api/browser/sign-ins/action";
166
+ /** The person's view of one saved-password sign-in, by `id` query. */
167
+ readonly savedSignIns: "/api/browser/saved-sign-ins";
168
+ /** The person's allow, remember, continue or cancel. Agent callers are refused. */
169
+ readonly savedSignInAction: "/api/browser/saved-sign-ins/action";
170
+ /** Saved-password grants on this computer. GET lists them. POST `{ id }` removes one. */
171
+ readonly passwordGrants: "/api/browser/password-grants";
163
172
  };
173
+ /** How far a saved-password grant reaches. */
174
+ export type PasswordGrantScope = 'chat' | 'device';
175
+ /** One saved sign-in the person allowed Farero to fill again. The password stays in the browser profile. */
176
+ export interface PasswordGrant {
177
+ id: string;
178
+ origin: string;
179
+ username: string;
180
+ scope: PasswordGrantScope;
181
+ /** Set for a grant that lasts until this chat ends. */
182
+ sessionId?: string;
183
+ createdAt: number;
184
+ }
185
+ export type SavedSignInState = 'listing' | 'waiting' | 'filling' | 'finishing' | 'done' | 'failed' | 'cancelled';
186
+ export type SavedSignInAction = 'allow_once' | 'remember_chat' | 'remember_device' | 'continue' | 'cancel';
187
+ /** A username offered for the page. The password is read on the Desktop only when the person allows the fill. */
188
+ export interface SavedSignInLogin {
189
+ id: string;
190
+ username: string;
191
+ }
192
+ /** A chat asks the person to fill one saved sign-in into a tab the chat holds. Farero types it on this computer.
193
+ * The chat never receives the password. A remembered grant can fill a later request for the same page and username. */
194
+ export interface SavedSignIn {
195
+ id: string;
196
+ workspaceId: string;
197
+ sessionId: string;
198
+ deviceId: string;
199
+ tabId: string;
200
+ /** The chat's words for the person. */
201
+ reason: string;
202
+ state: SavedSignInState;
203
+ /** The page origin the Desktop read. Empty while Farero is still asking the Desktop. */
204
+ origin: string;
205
+ logins: SavedSignInLogin[];
206
+ /** The username the person picked, or the grant filled. */
207
+ username?: string;
208
+ createdAt: number;
209
+ settledAt?: number;
210
+ /** Why the request failed or what the person should do next. */
211
+ detail?: string;
212
+ }
package/dist/browser.js CHANGED
@@ -1 +1 @@
1
- var a=Object.defineProperty;var s=(r,n)=>a(r,"name",{value:n,configurable:!0});function b(r,n,e){return r.workspaceId!==n||!r.tabId.startsWith(`preview:${n}:`)||!r.available?!1:r.kind==="agent"?r.control==="agent"&&r.sessionId===e:r.control==="agent"?r.sessionId===e:r.sessionId===void 0}s(b,"browserPageAdmits");const u="x-farero-browser-features",p="sign-in",w="browser_sign_in";function E(r){const n=s((e,t)=>{if(t>6)return;if(typeof e=="string")try{return n(JSON.parse(e),t+1)}catch{return}if(Array.isArray(e)){for(const d of e){const c=n(d,t+1);if(c)return c}return}if(!e||typeof e!="object")return;const i=e;if(i.isError)return;const o=i.signIn;return o&&typeof o.id=="string"&&/^bsi_[a-f\d]{64}$/.test(o.id)?o.id:n(i.structuredContent??i.content??i.text,t+1)},"read");return n(r,0)}s(E,"browserSignInReceipt");const R="x-farero-browser-connection",_={connect:"/api/browser/device/connect",state:"/api/browser/device/state",commands:"/api/browser/device/commands",authorize:"/api/browser/device/authorize",claim:"/api/browser/device/journal/claim",finish:"/api/browser/device/journal/finish",disconnect:"/api/browser/device/disconnect",devices:"/api/browser/devices",tabs:"/api/browser/tabs",operate:"/api/browser/operate",receipt:"/api/browser/receipt",signIns:"/api/browser/sign-ins",signInAction:"/api/browser/sign-ins/action"};export{R as BROWSER_CONNECTION_HEADER,u as BROWSER_FEATURES_HEADER,_ as BROWSER_PATHS,p as BROWSER_SIGN_IN_FEATURE,w as BROWSER_SIGN_IN_TOOL,b as browserPageAdmits,E as browserSignInReceipt};
1
+ var d=Object.defineProperty;var o=(r,n)=>d(r,"name",{value:n,configurable:!0});function b(r,n,e){return r.workspaceId!==n||!r.tabId.startsWith(`preview:${n}:`)||!r.available?!1:r.kind==="agent"?r.control==="agent"&&r.sessionId===e:r.control==="agent"?r.sessionId===e:r.sessionId===void 0}o(b,"browserPageAdmits");const p="x-farero-browser-features",w="sign-in",u="saved-sign-in",E="browser_sign_in";function I(r){const n=o((e,s)=>{if(s>6)return;if(typeof e=="string")try{return n(JSON.parse(e),s+1)}catch{return}if(Array.isArray(e)){for(const a of e){const c=n(a,s+1);if(c)return c}return}if(!e||typeof e!="object")return;const i=e;if(i.isError)return;const t=i.signIn;return t&&typeof t.id=="string"&&/^bsi_[a-f\d]{64}$/.test(t.id)?t.id:n(i.structuredContent??i.content??i.text,s+1)},"read");return n(r,0)}o(I,"browserSignInReceipt");const _="x-farero-browser-connection",R={connect:"/api/browser/device/connect",state:"/api/browser/device/state",commands:"/api/browser/device/commands",authorize:"/api/browser/device/authorize",claim:"/api/browser/device/journal/claim",finish:"/api/browser/device/journal/finish",disconnect:"/api/browser/device/disconnect",devices:"/api/browser/devices",tabs:"/api/browser/tabs",operate:"/api/browser/operate",receipt:"/api/browser/receipt",signIns:"/api/browser/sign-ins",signInAction:"/api/browser/sign-ins/action",savedSignIns:"/api/browser/saved-sign-ins",savedSignInAction:"/api/browser/saved-sign-ins/action",passwordGrants:"/api/browser/password-grants"};export{_ as BROWSER_CONNECTION_HEADER,p as BROWSER_FEATURES_HEADER,R as BROWSER_PATHS,w as BROWSER_SIGN_IN_FEATURE,E as BROWSER_SIGN_IN_TOOL,u as SAVED_SIGN_IN_FEATURE,b as browserPageAdmits,I as browserSignInReceipt};
@@ -27,7 +27,7 @@ export type AgentEffort = (typeof AGENT_EFFORTS)[number];
27
27
  * A list for a narrower question, such as providers with importable history, keeps its own
28
28
  * members typed against `NativeProvider`, so a new provider joins it only on purpose.
29
29
  */
30
- export declare const NATIVE_PROVIDERS: readonly ["codex", "claude", "opencode", "cursor"];
30
+ export declare const NATIVE_PROVIDERS: readonly ["codex", "claude", "opencode", "cursor", "antigravity"];
31
31
  /** A native provider id. Never inferred from a model label. */
32
32
  export type NativeProvider = (typeof NATIVE_PROVIDERS)[number];
33
33
  /**
package/dist/contracts.js CHANGED
@@ -1 +1 @@
1
- var c=Object.defineProperty;var t=(r,e)=>c(r,"name",{value:e,configurable:!0});import{routeParam as i,routes as a}from"./routes.js";const p=["none","low","medium","high","xhigh","max","ultracode"],m=["codex","claude","opencode","cursor"];function d(r){return r}t(d,"defineContractHandler");function s(r,e){for(const[n,o]of Object.entries(a)){if(!("re"in o)){if(r===o.method&&e===o.pattern)return{key:n,param:null};continue}const u=i(o,r,e);if(u!==null)return{key:n,param:u}}return null}t(s,"matchApiRoute");export{p as AGENT_EFFORTS,m as NATIVE_PROVIDERS,d as defineContractHandler,s as matchApiRoute};
1
+ var i=Object.defineProperty;var o=(r,t)=>i(r,"name",{value:t,configurable:!0});import{routeParam as c,routes as a}from"./routes.js";const p=["none","low","medium","high","xhigh","max","ultracode"],m=["codex","claude","opencode","cursor","antigravity"];function d(r){return r}o(d,"defineContractHandler");function s(r,t){for(const[n,e]of Object.entries(a)){if(!("re"in e)){if(r===e.method&&t===e.pattern)return{key:n,param:null};continue}const u=c(e,r,t);if(u!==null)return{key:n,param:u}}return null}o(s,"matchApiRoute");export{p as AGENT_EFFORTS,m as NATIVE_PROVIDERS,d as defineContractHandler,s as matchApiRoute};
@@ -0,0 +1,98 @@
1
+ /**
2
+ * The steps that chats wait for the person to do, as the desktop shell's handoff panel reads them.
3
+ *
4
+ * This module stays stdlib-free — no `node:` imports — like its `./desktop-notifications`
5
+ * sibling, so the host and the desktop shell read the same shape.
6
+ */
7
+ /** The contract version served by `GET /api/desktop-handoffs`. */
8
+ export declare const DESKTOP_HANDOFFS_VERSION: 1;
9
+ /** Where the person does the step. */
10
+ export type DesktopHandoffPlace =
11
+ /** The person types one private value into the chat's card in Farero. */
12
+ {
13
+ kind: 'private_input';
14
+ label: string;
15
+ }
16
+ /** A page in the browser of the Farero Desktop that `deviceId` names. */
17
+ | {
18
+ kind: 'farero_browser';
19
+ deviceId: string;
20
+ tabId: string;
21
+ site?: string;
22
+ }
23
+ /**
24
+ * A tab that Browse controls in the person's own browser, on the computer that runs the service.
25
+ * `tab` is the browser's own numeric tab ID, which Farero learns from Browse after the request starts.
26
+ */
27
+ | {
28
+ kind: 'own_browser';
29
+ tab?: number;
30
+ site?: string;
31
+ }
32
+ /** A sign-in page that the Farero Desktop that `deviceId` names opened in one profile of the person's browser. */
33
+ | {
34
+ kind: 'sign_in';
35
+ deviceId: string;
36
+ url: string;
37
+ site: string;
38
+ source?: string;
39
+ browser?: string;
40
+ }
41
+ /**
42
+ * A saved password filled into a page of Farero's browser. `choose` asks which account and how long to
43
+ * remember it. `finish` waits while the person completes a code, passkey or consent prompt.
44
+ */
45
+ | {
46
+ kind: 'saved_sign_in';
47
+ deviceId: string;
48
+ tabId: string;
49
+ origin: string;
50
+ site: string;
51
+ phase: 'choose' | 'finish';
52
+ logins: {
53
+ id: string;
54
+ username: string;
55
+ }[];
56
+ username?: string;
57
+ }
58
+ /** An MCP server the chat's provider needs signed in. The person presses Connect in the chat. */
59
+ | {
60
+ kind: 'mcp_sign_in';
61
+ server: string;
62
+ label: string;
63
+ }
64
+ /** The chat waits for the person's answer to a question or an approval, which they give in the chat. */
65
+ | {
66
+ kind: 'question';
67
+ };
68
+ /** One step that a chat waits for. Continue and Cancel use the request's own routes. */
69
+ export interface DesktopHandoff {
70
+ /**
71
+ * `hr_…` for a handoff request, `bsi_…` for a sign-in, `msi_…` for an MCP sign-in. A chat's
72
+ * questions share one `q_…` id, which changes when the chat asks something new.
73
+ */
74
+ id: string;
75
+ workspaceId: string;
76
+ /** The workspace's name. */
77
+ workspace: string;
78
+ sessionId: string;
79
+ /** The chat's title. */
80
+ chat: string;
81
+ /** The chat's words for the person. */
82
+ instructions: string;
83
+ createdAt: number;
84
+ place: DesktopHandoffPlace;
85
+ /** False while Continue would be refused, for example before Farero opened a sign-in page. */
86
+ ready: boolean;
87
+ }
88
+ export interface DesktopHandoffsResponse {
89
+ version: typeof DESKTOP_HANDOFFS_VERSION;
90
+ handoffs: DesktopHandoff[];
91
+ /**
92
+ * The steps with an `mcp_sign_in` place. They stay out of `handoffs`, because a Desktop from
93
+ * before them drops the whole feed when it finds a place it does not know.
94
+ */
95
+ mcpSignIns?: DesktopHandoff[];
96
+ /** One step with a `question` place for each chat that waits for an answer. Kept apart for the same reason. */
97
+ questions?: DesktopHandoff[];
98
+ }
@@ -0,0 +1 @@
1
+ const O=1;export{O as DESKTOP_HANDOFFS_VERSION};
package/dist/handoff.d.ts CHANGED
@@ -16,6 +16,8 @@ export interface HandoffReceipt {
16
16
  exitCode?: number | null;
17
17
  /** A check of the caller's nonsecret UI predicate, separate from delivery. */
18
18
  verified?: boolean;
19
+ /** Why a failed or uncertain handoff ended. A fixed sentence, never output or page text. */
20
+ detail?: string;
19
21
  }
20
22
  export interface HandoffCommand {
21
23
  file: string;
@@ -65,10 +67,28 @@ export type HandoffRequestSurface =
65
67
  tabId: string;
66
68
  site?: string;
67
69
  }
68
- /** A tab that Browse opened or the person lent to this chat in their own browser. */
70
+ /**
71
+ * Approval for the chat to run one exact script on a page it holds. The source is shown on the
72
+ * consent card so the person approves the code, not just the agent's description of it; the
73
+ * hash binds the later browser_eval call to that exact source.
74
+ */
75
+ | {
76
+ kind: 'eval';
77
+ deviceId: string;
78
+ tabId: string;
79
+ site?: string;
80
+ script: string;
81
+ scriptHash: string;
82
+ }
83
+ /**
84
+ * A tab that Browse opened or the person lent to this chat in their own browser. Farero adds the
85
+ * browser's numeric tab ID and the page's site once Browse lists the tab.
86
+ */
69
87
  | {
70
88
  kind: 'personal_browser';
71
89
  tabId: string | number;
90
+ tab?: number;
91
+ site?: string;
72
92
  };
73
93
  export type HandoffRequestState = 'waiting' | 'done' | 'cancelled' | 'ended';
74
94
  export type HandoffRequestAction = 'continue' | 'cancel';
@@ -97,7 +117,7 @@ export interface HandoffRequest {
97
117
  }
98
118
  /** The request that a handoff_request receipt names, in any provider's encoding of the result. */
99
119
  export declare function handoffRequestReceipt(output: unknown): {
100
- kind: 'request' | 'sign_in';
120
+ kind: 'request' | 'sign_in' | 'saved_sign_in';
101
121
  id: string;
102
122
  } | undefined;
103
123
  /** Private device payloads use their own channel, never a browser receipt or an
package/dist/handoff.js CHANGED
@@ -1 +1 @@
1
- var p=Object.defineProperty;var o=(r,t)=>p(r,"name",{value:t,configurable:!0});const c="private-handoff-v1",h="handoff_request";function _(r){const t=o((e,i)=>{if(i>6)return;if(typeof e=="string")try{return t(JSON.parse(e),i+1)}catch{return}if(Array.isArray(e)){for(const d of e){const a=t(d,i+1);if(a)return a}return}if(!e||typeof e!="object")return;const n=e;if(n.isError)return;const s=n.handoff,f=s?.id;if(typeof f=="string"){if(s?.kind==="sign_in"&&/^bsi_[a-f\d]{64}$/.test(f))return{kind:"sign_in",id:f};if(s?.kind!=="sign_in"&&/^hr_[a-f\d]{64}$/.test(f))return{kind:"request",id:f}}return t(n.structuredContent??n.content??n.text,i+1)},"read");return t(r,0)}o(_,"handoffRequestReceipt");const q={operate:"/api/handoffs/operate",list:"/api/handoffs/list",share:"/api/handoffs/share",forget:"/api/handoffs/forget",receipt:"/api/handoffs/receipt",deviceValue:"/api/handoffs/device/value",protect:"/api/handoffs/device/protect",history:"/api/handoffs/history",input:"/api/handoffs/input",inputStatus:"/api/handoffs/input/status",reveal:"/api/handoffs/reveal",delete:"/api/handoffs/delete",request:"/api/handoffs/request",requests:"/api/handoffs/requests",requestAction:"/api/handoffs/requests/action"};export{c as HANDOFF_BROWSER_FEATURE,q as HANDOFF_PATHS,h as HANDOFF_REQUEST_TOOL,_ as handoffRequestReceipt};
1
+ var p=Object.defineProperty;var o=(s,t)=>p(s,"name",{value:t,configurable:!0});const c="private-handoff-v1",h="handoff_request";function _(s){const t=o((e,r)=>{if(r>6)return;if(typeof e=="string")try{return t(JSON.parse(e),r+1)}catch{return}if(Array.isArray(e)){for(const d of e){const a=t(d,r+1);if(a)return a}return}if(!e||typeof e!="object")return;const i=e;if(i.isError)return;const f=i.handoff,n=f?.id;if(typeof n=="string"){if(f?.kind==="sign_in"&&/^bsi_[a-f\d]{64}$/.test(n))return{kind:"sign_in",id:n};if(f?.kind==="saved_sign_in"&&/^psi_[a-f\d]{64}$/.test(n))return{kind:"saved_sign_in",id:n};if(f?.kind!=="sign_in"&&f?.kind!=="saved_sign_in"&&/^hr_[a-f\d]{64}$/.test(n))return{kind:"request",id:n}}return t(i.structuredContent??i.content??i.text,r+1)},"read");return t(s,0)}o(_,"handoffRequestReceipt");const g={operate:"/api/handoffs/operate",list:"/api/handoffs/list",share:"/api/handoffs/share",forget:"/api/handoffs/forget",receipt:"/api/handoffs/receipt",deviceValue:"/api/handoffs/device/value",protect:"/api/handoffs/device/protect",history:"/api/handoffs/history",input:"/api/handoffs/input",inputStatus:"/api/handoffs/input/status",reveal:"/api/handoffs/reveal",delete:"/api/handoffs/delete",request:"/api/handoffs/request",requests:"/api/handoffs/requests",requestAction:"/api/handoffs/requests/action"};export{c as HANDOFF_BROWSER_FEATURE,g as HANDOFF_PATHS,h as HANDOFF_REQUEST_TOOL,_ as handoffRequestReceipt};
package/dist/plugin.d.ts CHANGED
@@ -417,7 +417,17 @@ export interface PluginRoleOverride {
417
417
  /** Bind an existing local role instead of the package role. */
418
418
  localRole?: string;
419
419
  accountId?: string;
420
+ /**
421
+ * Start on a model from a different maker than the roles this one must stay independent
422
+ * from. Only a role that `canPreferAnotherMaker` accepts reads it, and never with a local role.
423
+ */
424
+ preferDifferentMaker?: true;
420
425
  }
426
+ /**
427
+ * Whether a person can ask this role to start on another maker's model. The role must stay
428
+ * independent from other roles and run one model, not a panel with one seat per maker.
429
+ */
430
+ export declare function canPreferAnotherMaker(role: Pick<PluginRole, 'fanout' | 'requires'>): boolean;
421
431
  export interface PluginRoleState {
422
432
  name: string;
423
433
  /** `package/role`. */
package/dist/plugin.js CHANGED
@@ -1 +1 @@
1
- var n=Object.defineProperty;var p=(e,a)=>n(e,"name",{value:a,configurable:!0});const r="ai.farero",s="0.1",i="plugin.json",l="https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",c=/^(?!.*(?:--|\.\.))[a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?$/,g=/^[a-z][a-z0-9_-]{0,63}$/,_=/^[a-z][a-zA-Z0-9_-]{0,63}$/,E=/^(?![^/]*(?:--|\.\.))([a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?)\/([a-z][a-z0-9_-]{0,63})$/,N=6,u={typesafe:"TypeSafe",vercel:"Vercel AI Gateway",openrouter:"OpenRouter",opencode:"OpenCode Zen"};function I(e){const a=e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\b([KMGT]i) B\b/g,"$1B").toLowerCase().replace(/\b(api|url|id)\b/g,o=>o.toUpperCase()).replace(/\b[kmgt]ib\b/g,o=>`${o[0].toUpperCase()}iB`);return a.charAt(0).toUpperCase()+a.slice(1)}p(I,"pluginFieldLabel");const P={inlineSkillChars:32e3,pageChars:8e3,minPageChars:1e3,maxPageChars:4e4,skillFiles:500,fileBytes:1024*1024},L={inventory:"/api/plugins",catalog:"/api/plugins/catalog",operations:"/api/plugins/operations",operation:p(e=>`/api/plugins/operations/${encodeURIComponent(e)}`,"operation"),credentials:p(e=>`/api/plugins/${encodeURIComponent(e)}/credentials`,"credentials"),guide:"/api/plugins/guide",prepare:"/api/plugins/prepare",run:"/api/plugins/run",status:"/api/plugins/status",browser:"/api/plugins/browser"},T={operation:/^\/api\/plugins\/operations\/([^/]+)$/,credentials:/^\/api\/plugins\/([^/]+)\/credentials$/};export{u as JEVGREP_PROVIDER_LABELS,g as PLUGIN_COMPONENT_PATTERN,r as PLUGIN_EXTENSION,s as PLUGIN_EXTENSION_VERSION,_ as PLUGIN_FIELD_PATTERN,P as PLUGIN_GUIDE_LIMITS,i as PLUGIN_MANIFEST_FILE,c as PLUGIN_NAME_PATTERN,L as PLUGIN_PATHS,N as PLUGIN_PENDING_EXIT_CODE,E as PLUGIN_ROLE_SELECTOR_PATTERN,T as PLUGIN_ROUTE_PATTERNS,l as PLUGIN_SCHEMA,I as pluginFieldLabel};
1
+ var o=Object.defineProperty;var a=(e,p)=>o(e,"name",{value:p,configurable:!0});const t="ai.farero",s="0.1",i="plugin.json",l="https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",c=/^(?!.*(?:--|\.\.))[a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?$/,g=/^[a-z][a-z0-9_-]{0,63}$/,_=/^[a-z][a-zA-Z0-9_-]{0,63}$/,u=/^(?![^/]*(?:--|\.\.))([a-z0-9](?:[a-z0-9.-]{0,62}[a-z0-9])?)\/([a-z][a-z0-9_-]{0,63})$/,E=6,N={typesafe:"TypeSafe",vercel:"Vercel AI Gateway",openrouter:"OpenRouter",opencode:"OpenCode Zen"};function I(e){const p=e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\b([KMGT]i) B\b/g,"$1B").toLowerCase().replace(/\b(api|url|id)\b/g,n=>n.toUpperCase()).replace(/\b[kmgt]ib\b/g,n=>`${n[0].toUpperCase()}iB`);return p.charAt(0).toUpperCase()+p.slice(1)}a(I,"pluginFieldLabel");function P(e){return!e.fanout&&e.requires.independentFrom.length>0}a(P,"canPreferAnotherMaker");const L={inlineSkillChars:32e3,pageChars:8e3,minPageChars:1e3,maxPageChars:4e4,skillFiles:500,fileBytes:1024*1024},T={inventory:"/api/plugins",catalog:"/api/plugins/catalog",operations:"/api/plugins/operations",operation:a(e=>`/api/plugins/operations/${encodeURIComponent(e)}`,"operation"),credentials:a(e=>`/api/plugins/${encodeURIComponent(e)}/credentials`,"credentials"),guide:"/api/plugins/guide",prepare:"/api/plugins/prepare",run:"/api/plugins/run",status:"/api/plugins/status",browser:"/api/plugins/browser"},U={operation:/^\/api\/plugins\/operations\/([^/]+)$/,credentials:/^\/api\/plugins\/([^/]+)\/credentials$/};export{N as JEVGREP_PROVIDER_LABELS,g as PLUGIN_COMPONENT_PATTERN,t as PLUGIN_EXTENSION,s as PLUGIN_EXTENSION_VERSION,_ as PLUGIN_FIELD_PATTERN,L as PLUGIN_GUIDE_LIMITS,i as PLUGIN_MANIFEST_FILE,c as PLUGIN_NAME_PATTERN,T as PLUGIN_PATHS,E as PLUGIN_PENDING_EXIT_CODE,u as PLUGIN_ROLE_SELECTOR_PATTERN,U as PLUGIN_ROUTE_PATTERNS,l as PLUGIN_SCHEMA,P as canPreferAnotherMaker,I as pluginFieldLabel};
package/dist/routes.d.ts CHANGED
@@ -20,6 +20,8 @@
20
20
  export type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
21
21
  /** Procedures under this mount use the Rust-generated tRPC contract. */
22
22
  export declare const NAVIGATION_PATH = "/api/trpc";
23
+ /** Application-owned browser procedures. */
24
+ export declare const APP_RPC_PATH = "/api/app-rpc";
23
25
  /** A path with no parameters. */
24
26
  export interface Route0 {
25
27
  method: Method;
@@ -43,6 +45,7 @@ export declare const routes: {
43
45
  readonly state: Route0;
44
46
  readonly simulatorDevices: Route0;
45
47
  readonly simulatorBoot: Route1;
48
+ readonly simulatorWatch: Route1;
46
49
  readonly simulatorFrame: Route1;
47
50
  readonly simulatorInput: Route1;
48
51
  /** Fresh cross-workspace activity and pending-attention overview for agent callers. */
@@ -68,22 +71,14 @@ export declare const routes: {
68
71
  readonly trayOldestUnread: Route0;
69
72
  /** Cursor-bounded local desktop notifications, using the host's canonical notification policy. */
70
73
  readonly desktopNotifications: Route0;
74
+ /** The steps chats wait for the person to do, for the desktop shell's handoff panel. */
75
+ readonly desktopHandoffs: Route0;
71
76
  readonly search: Route0;
72
- readonly repos: Route0;
73
- readonly registerRepo: Route0;
74
- /** Which registered checkout GitHub says owns a pasted `owner/repo`, past any rename. */
75
- readonly matchGithubRepo: Route0;
76
77
  /** Opens a native folder dialog on the host's screen; refused unless the caller is on that machine. */
77
78
  readonly pickRepoFolder: Route0;
78
79
  /** Register a checkout by path through the host-scoped input shape. */
79
80
  readonly registerHostRepo: Route0;
80
81
  readonly workspaceSources: Route1;
81
- readonly modelCatalog: Route0;
82
- readonly modelDefaults: Route0;
83
- readonly updateModelDefaults: Route0;
84
- /** Per-provider process posture: permissions, sandbox, approvals and extra instructions. */
85
- readonly harness: Route0;
86
- readonly updateHarness: Route0;
87
82
  /** Each provider's accounts: the machine's own sign-in first, then the managed accounts in creation order. */
88
83
  readonly accounts: Route0;
89
84
  readonly createAccount: Route0;
@@ -98,8 +93,6 @@ export declare const routes: {
98
93
  readonly cancelAccountSignIn: Route1;
99
94
  /** Remove what signs the account in and keep the account. The default account names its provider in the body. */
100
95
  readonly signOutAccount: Route1;
101
- /** Rolling subscription limits, read without a model request from each provider CLI. */
102
- readonly planUsage: Route0;
103
96
  /** Estimated tool input/result tokens from recent saved chat activity. */
104
97
  readonly toolUsage: Route0;
105
98
  /** Mint a short-lived OpenAI SIP URI for an authenticated native client. */
@@ -131,11 +124,7 @@ export declare const routes: {
131
124
  /** Write one owned voice setting; the host restarts to apply it. */
132
125
  readonly updateVoiceConfig: Route0;
133
126
  readonly repoIcon: Route1;
134
- /** Per-repo shared defaults from the repo root `.farero/config.json`; new workspaces inherit the committed version. */
135
- readonly repoConfig: Route1;
136
- readonly updateRepoConfig: Route1;
137
- /** Edit base branch or sidebar icon; DELETE unregisters the repo and drops its workspaces/chats. */
138
- readonly updateRepo: Route1;
127
+ /** Unregister a repo and drop its archived workspaces and chats. */
139
128
  readonly deleteRepo: Route1;
140
129
  /** Commits of the base branch and the open workspaces, read from the registered checkout. */
141
130
  readonly repoHistory: Route1;
@@ -160,6 +149,8 @@ export declare const routes: {
160
149
  readonly repoAuthors: Route1;
161
150
  /** A local image linked in chat Markdown, fetched with the phone's auth header. */
162
151
  readonly localImage: Route1;
152
+ /** A loopback page for one HTML file and the files beside it. The Browser loads it without the bearer. */
153
+ readonly localPage: Route0;
163
154
  /** Mint a file-scoped URL for the browser's own PDF viewer or a media element, which cannot send the auth header. */
164
155
  readonly viewTicket: Route0;
165
156
  /** Release that URL once its viewer closes. */
@@ -168,6 +159,12 @@ export declare const routes: {
168
159
  readonly viewFile: Route1;
169
160
  /** A source-file preview linked from agent Markdown. */
170
161
  readonly filePreview: Route1;
162
+ /**
163
+ * Open one previewable file in the OS default app. The path is the same reference
164
+ * the preview reads, including another workspace or a home file. Refused unless the
165
+ * caller is on the machine where that app would open.
166
+ */
167
+ readonly openLocalFile: Route0;
171
168
  /** An edited source file saved back to its worktree, guarded by the edit read's mtime. */
172
169
  readonly saveFile: Route1;
173
170
  /**
@@ -212,10 +209,6 @@ export declare const routes: {
212
209
  readonly checkForUpdates: Route0;
213
210
  /** Move the installation between the release feeds — the "Join the beta" switch in General. */
214
211
  readonly selectUpdateChannel: Route0;
215
- readonly settings: Route0;
216
- readonly updateSettings: Route0;
217
- /** Lists the host under Accessibility and opens that pane on it; the switch itself stays with the person. */
218
- readonly accessibilityPrompt: Route0;
219
212
  /**
220
213
  * The Farero account linked to this installation. Identity only: the installation
221
214
  * token stays the transport credential, and every device holding it sees the same
@@ -240,9 +233,6 @@ export declare const routes: {
240
233
  readonly analyticsTrack: Route0;
241
234
  /** First-run setup finished on this installation. The host keeps the once-only record. */
242
235
  readonly completeOnboarding: Route0;
243
- /** Durable, device-independent PWA state. localStorage remains its offline-first mirror. */
244
- readonly prefs: Route0;
245
- readonly updatePrefs: Route0;
246
236
  readonly nosleep: Route0;
247
237
  readonly armNoSleep: Route0;
248
238
  readonly disarmNoSleep: Route0;
@@ -258,16 +248,11 @@ export declare const routes: {
258
248
  /** Replace the saved workflows only; GET /api/agents and /api/roles read them. */
259
249
  readonly updateSavedWorkflows: Route0;
260
250
  readonly roleTemplate: Route1;
261
- /** Global agent-facing prompt templates. */
262
- readonly prompts: Route0;
263
- readonly updatePrompts: Route0;
264
251
  readonly routing: Route0;
265
252
  readonly updateRouting: Route0;
266
253
  readonly updateAutoPreference: Route0;
267
254
  /** Compatibility views for cached PWAs and MCP. */
268
255
  readonly roles: Route0;
269
- readonly autoModelConfig: Route0;
270
- readonly updateAutoModelConfig: Route0;
271
256
  readonly updateRoles: Route0;
272
257
  /** Active and failed jobs; optionally filtered with `?workspaceId=`. */
273
258
  readonly delegations: Route0;
@@ -305,26 +290,7 @@ export declare const routes: {
305
290
  readonly runtimeOperation: Route1;
306
291
  /** Stop the host. Loopback only, and only when the service configured it. */
307
292
  readonly shutdown: Route0;
308
- /** Onboarding state for importing provider history (codex/claude/opencode transcripts). */
309
- readonly historyOnboarding: Route0;
310
- /** Trigger a development-only history import scan. */
311
- readonly historyDevTrigger: Route0;
312
- /** Start a background discovery scan of provider history on disk. */
313
- readonly historyDiscover: Route0;
314
- /** Candidate provider sessions available for import, paged with `offset`/`limit`. */
315
- readonly historyCandidates: Route0;
316
- /** Accept the current onboarding revision and replay the selected sessions. */
317
- readonly historyAccept: Route0;
318
- /** Skip the current onboarding revision without importing. */
319
- readonly historySkip: Route0;
320
- /** Stop a running history import job. */
321
- readonly historyStop: Route0;
322
- /** Dismiss the current onboarding revision. */
323
- readonly historyDismiss: Route0;
324
- /**
325
- * One imported read-only transcript page. Exact history routes win over this
326
- * parameter, and callers pass only `ih_` ids; anything else falls through.
327
- */
293
+ /** Read-only transcript page for an imported `ih_` conversation. */
328
294
  readonly importedHistoryRead: Route1;
329
295
  readonly createWorkspace: Route0;
330
296
  /** A general chat: its own repo-free context, started from the first message. */
package/dist/routes.js CHANGED
@@ -1 +1 @@
1
- var c=Object.defineProperty;var i=(a,o)=>c(a,"name",{value:o,configurable:!0});const k="/api/trpc";function r(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(r,"literal");function s(a,o){return{method:a,pattern:o,path:i(()=>o,"path")}}i(s,"flat");function e(a,o){const[p,t]=o.split(/:[a-zA-Z]+/);if(t===void 0)throw new Error(`route ${o} declares no :param`);return{method:a,pattern:o,path:i(n=>`${p}${encodeURIComponent(n)}${t}`,"path"),re:new RegExp(`^${r(p)}([^/]+)${r(t)}$`)}}i(e,"param");const d={state:s("GET","/api/state"),simulatorDevices:s("GET","/api/simulator/devices"),simulatorBoot:e("POST","/api/simulator/:id/boot"),simulatorFrame:e("GET","/api/simulator/:id/frame"),simulatorInput:e("POST","/api/simulator/:id/input"),workspaceOverview:s("GET","/api/workspace-overview"),attentionSettings:s("GET","/api/attention/settings"),attentionConfigure:s("PATCH","/api/attention/settings"),attentionCheck:s("POST","/api/attention/check"),attentionDemand:s("POST","/api/attention/demand"),attentionSkills:s("POST","/api/attention/skills"),attentionWebhooks:s("GET","/api/attention/webhooks"),attentionWebhookCreate:s("POST","/api/attention/webhooks"),attentionWebhookUpdate:e("PATCH","/api/attention/webhooks/:id"),attentionWebhookDelete:e("DELETE","/api/attention/webhooks/:id"),attentionWebhookTest:e("POST","/api/attention/webhooks/:id/test"),attentionWebhookWorkspace:e("PUT","/api/attention/webhooks/workspaces/:id"),trayStatus:s("GET","/api/tray-status"),trayOldestUnread:s("GET","/api/tray-status/oldest-unread"),desktopNotifications:s("GET","/api/desktop-notifications"),search:s("GET","/api/search"),repos:s("GET","/api/repos"),registerRepo:s("POST","/api/repos"),matchGithubRepo:s("POST","/api/repos/github-match"),pickRepoFolder:s("POST","/api/repos/pick-folder"),registerHostRepo:s("POST","/api/host/repos"),workspaceSources:e("GET","/api/repos/:repo/workspace-sources"),modelCatalog:s("GET","/api/models"),modelDefaults:s("GET","/api/models/defaults"),updateModelDefaults:s("PATCH","/api/models/defaults"),harness:s("GET","/api/harness"),updateHarness:s("PATCH","/api/harness"),accounts:s("GET","/api/accounts"),createAccount:s("POST","/api/accounts"),updateAccount:e("PATCH","/api/accounts/:account"),deleteAccount:e("DELETE","/api/accounts/:account"),refreshAccount:e("POST","/api/accounts/:account/refresh"),signInAccount:e("POST","/api/accounts/:account/sign-in"),cancelAccountSignIn:e("DELETE","/api/accounts/:account/sign-in"),signOutAccount:e("POST","/api/accounts/:account/sign-out"),planUsage:s("GET","/api/usage"),toolUsage:s("GET","/api/usage/tools"),voiceTicket:s("POST","/api/voice/ticket"),liveTicket:s("POST","/api/live/ticket"),live:s("GET","/api/live"),voiceCall:s("POST","/api/voice/calls"),voiceCallReady:e("POST","/api/voice/calls/:callId/ready"),voiceCallText:e("POST","/api/voice/calls/:callId/text"),voiceDrafts:e("GET","/api/voice/calls/:callId/drafts"),voiceBriefFocus:e("POST","/api/voice/calls/:callId/brief-focus"),voiceClearBriefFocus:e("DELETE","/api/voice/calls/:callId/brief-focus"),voiceDraftAction:e("POST","/api/voice/calls/:callId/drafts"),voiceCallDiagnostics:e("POST","/api/voice/calls/:callId/diagnostics"),voiceCallEnd:e("DELETE","/api/voice/calls/:callId"),voiceHistory:s("GET","/api/voice/history"),voiceTranscript:e("GET","/api/voice/history/:callId"),voiceSearch:s("GET","/api/voice/search"),updateVoiceConfig:s("PUT","/api/config/voice"),repoIcon:e("GET","/api/repos/:repo/icon"),repoConfig:e("GET","/api/repos/:repo/config"),updateRepoConfig:e("PUT","/api/repos/:repo/config"),updateRepo:e("PATCH","/api/repos/:repo"),deleteRepo:e("DELETE","/api/repos/:repo"),repoHistory:e("GET","/api/repos/:repo/history"),repoCommit:e("GET","/api/repos/:repo/commit"),repoCompare:e("GET","/api/repos/:repo/compare"),repoCommitFile:e("GET","/api/repos/:repo/commit/file"),repoFile:e("GET","/api/repos/:repo/file"),repoBlame:e("GET","/api/repos/:repo/blame"),repoCommitIds:e("GET","/api/repos/:repo/commit-ids"),repoFiles:e("GET","/api/repos/:repo/files"),fetchRepoBase:e("POST","/api/repos/:repo/fetch"),repoConversations:e("GET","/api/repos/:repo/conversations"),repoAuthors:e("GET","/api/repos/:repo/authors"),localImage:e("GET","/api/local-images/:path"),viewTicket:s("POST","/api/view-tickets"),revokeViewTicket:e("DELETE","/api/view-tickets/:ticket"),viewFile:e("GET","/api/view/:name"),filePreview:e("GET","/api/files/:reference"),saveFile:e("PUT","/api/files/:reference"),toolImage:e("GET","/api/tool-images/:reference"),mcpAppToolCall:e("GET","/api/mcp-app-calls/:reference"),generatedUi:e("GET","/api/generated-ui/:reference"),generatedUiState:e("GET","/api/generated-ui/:reference/state"),updateGeneratedUiState:e("PUT","/api/generated-ui/:reference/state"),renderUi:e("POST","/api/sessions/:sessionId/generated-ui"),mcpAppSandbox:s("GET","/api/mcp-app-sandbox"),stageAttachment:s("POST","/api/attachments"),stageLocalAttachment:s("POST","/api/attachments/local"),importConversation:s("POST","/api/attachments/import"),localConversations:s("GET","/api/conversation-import/local"),importLocalConversation:s("POST","/api/conversation-import/local"),stagedAttachmentImage:e("GET","/api/attachments/:attachmentId"),discardStagedAttachment:e("DELETE","/api/attachments/:attachmentId"),logs:s("GET","/api/logs"),feedback:s("POST","/api/feedback"),probeExternalPreview:s("POST","/api/external-previews/probe"),resetAgentConnections:s("POST","/api/agents/reset"),restartForUpdate:s("POST","/api/update/restart"),applyUpdate:s("POST","/api/update/apply"),checkForUpdates:s("POST","/api/update/check"),selectUpdateChannel:s("POST","/api/update/channel"),settings:s("GET","/api/settings"),updateSettings:s("PATCH","/api/settings"),accessibilityPrompt:s("POST","/api/settings/accessibility"),account:s("GET","/api/account"),accountLogin:s("POST","/api/account/login"),accountLoginComplete:s("POST","/api/account/login/complete"),accountLogout:s("POST","/api/account/logout"),accountMcp:s("GET","/api/account/mcp"),enableAccountMcp:s("PUT","/api/account/mcp"),disableAccountMcp:s("DELETE","/api/account/mcp"),revokeAccountMcpGrant:e("DELETE","/api/account/mcp/grants/:grantId"),analyticsConsent:s("GET","/api/analytics"),analyticsTrack:s("POST","/api/analytics"),completeOnboarding:s("POST","/api/onboarding/complete"),prefs:s("GET","/api/prefs"),updatePrefs:s("PATCH","/api/prefs"),nosleep:s("GET","/api/nosleep"),armNoSleep:s("POST","/api/nosleep"),disarmNoSleep:s("DELETE","/api/nosleep"),push:s("GET","/api/push"),pushSubscribe:s("POST","/api/push/subscribe"),pushUnsubscribe:s("POST","/api/push/unsubscribe"),pushTest:s("POST","/api/push/test"),agents:s("GET","/api/agents"),updateAgents:s("PATCH","/api/agents"),agentImportCandidates:s("GET","/api/agents/import"),importAgents:s("POST","/api/agents/import"),updateSavedWorkflows:s("PATCH","/api/saved-workflows"),roleTemplate:e("GET","/api/agents/templates/:slug"),prompts:s("GET","/api/prompts"),updatePrompts:s("PATCH","/api/prompts"),routing:s("GET","/api/routing"),updateRouting:s("PATCH","/api/routing"),updateAutoPreference:s("PATCH","/api/routing/default-auto"),roles:s("GET","/api/roles"),autoModelConfig:s("GET","/api/auto-model"),updateAutoModelConfig:s("PATCH","/api/auto-model"),updateRoles:s("PATCH","/api/roles"),delegations:s("GET","/api/delegations"),receiveDelegations:s("POST","/api/delegations/receive"),dismissDelegation:e("DELETE","/api/delegations/:delegationId"),cancelDelegation:e("POST","/api/delegations/:delegationId/cancel"),cancelOwnedDelegation:e("POST","/api/sessions/:sessionId/delegations/cancel"),askDelegationQuestion:e("POST","/api/sessions/:sessionId/delegation-questions"),answerDelegationQuestion:e("POST","/api/sessions/:sessionId/delegation-answers"),wakeDelegation:e("POST","/api/delegations/:delegationId/wake"),workflows:s("POST","/api/workflows"),workflow:e("DELETE","/api/workflows/:workflowId"),workflowDelegation:e("POST","/api/workflows/:workflowId/delegations"),workflowResolution:e("POST","/api/workflows/:workflowId/resolve-assignment"),workflowRetry:e("POST","/api/workflows/:workflowId/retry"),workflowAdopt:e("POST","/api/workflows/:workflowId/adopt"),workflowReplay:e("POST","/api/workflows/:workflowId/replay"),workflowComplete:e("POST","/api/workflows/:workflowId/complete"),workflowDetail:e("GET","/api/workflows/:workflowId"),workflowJobReport:e("GET","/api/workflow-jobs/:jobId/report"),confirmUiStable:s("POST","/api/ui-quarantine/confirm"),runtimeOperation:e("GET","/api/runtime-operations/:operationId"),shutdown:s("POST","/api/shutdown"),historyOnboarding:s("GET","/api/history/onboarding"),historyDevTrigger:s("POST","/api/history/development/trigger"),historyDiscover:s("POST","/api/history/discover"),historyCandidates:s("GET","/api/history/candidates"),historyAccept:s("POST","/api/history/accept"),historySkip:s("POST","/api/history/skip"),historyStop:s("POST","/api/history/stop"),historyDismiss:s("POST","/api/history/dismiss"),importedHistoryRead:e("GET","/api/history/:historyId"),createWorkspace:s("POST","/api/workspaces"),createChat:s("POST","/api/chats"),chatIdentity:e("POST","/api/workspaces/:workspaceId/chat-identity"),workspaceHistory:s("GET","/api/workspaces/history"),renameWorkspace:e("POST","/api/workspaces/:workspaceId/rename"),workspace:e("GET","/api/workspaces/:workspaceId"),sessions:e("GET","/api/workspaces/:workspaceId/sessions"),closedSessions:e("GET","/api/workspaces/:workspaceId/sessions/closed"),newChat:e("POST","/api/workspaces/:workspaceId/sessions"),prepareWorkflowDraft:e("POST","/api/workspaces/:workspaceId/workflow-draft"),diff:e("GET","/api/workspaces/:workspaceId/diff"),diffPaths:e("GET","/api/workspaces/:workspaceId/diff/paths"),fileDiff:e("GET","/api/workspaces/:workspaceId/diff/file"),diffImage:e("GET","/api/workspaces/:workspaceId/diff/image"),workspaceFiles:e("GET","/api/workspaces/:workspaceId/files"),workspaceDirectory:e("GET","/api/workspaces/:workspaceId/directory"),workspacePath:e("GET","/api/workspaces/:workspaceId/path"),previewWorkspaceDiscard:e("GET","/api/workspaces/:workspaceId/files/discard"),discardWorkspaceChanges:e("POST","/api/workspaces/:workspaceId/files/discard"),openWorkspaceFile:e("POST","/api/workspaces/:workspaceId/files/open"),workspaceLaunchers:e("GET","/api/workspaces/:workspaceId/launchers"),openWorkspaceLauncher:e("POST","/api/workspaces/:workspaceId/launchers/open"),pasteWorkspaceTerminal:e("POST","/api/workspaces/:workspaceId/launchers/paste"),terminalSessions:e("GET","/api/workspaces/:workspaceId/terminals"),startTerminalSession:e("POST","/api/workspaces/:workspaceId/terminals"),startTerminalShell:e("POST","/api/workspaces/:workspaceId/terminals/shell"),terminalSession:e("GET","/api/workspaces/:workspaceId/terminals/status"),stopTerminalSession:e("POST","/api/workspaces/:workspaceId/terminals/stop"),terminalAttachment:e("POST","/api/workspaces/:workspaceId/terminals/attachment"),launcherIcon:e("GET","/api/workspaces/:workspaceId/launchers/icon"),refreshWorkspaceGit:e("POST","/api/workspaces/:workspaceId/git/refresh"),pushWorkspace:e("POST","/api/workspaces/:workspaceId/git/push"),workspaceRelease:e("GET","/api/workspaces/:workspaceId/git/release"),workspacePrompts:e("GET","/api/workspaces/:workspaceId/prompts"),workspaceConfig:e("GET","/api/workspaces/:workspaceId/config"),updateWorkspaceConfig:e("PUT","/api/workspaces/:workspaceId/config"),merge:e("POST","/api/workspaces/:workspaceId/merge"),closeoutWorkspace:e("POST","/api/workspaces/:workspaceId/closeout"),continueWorkspace:e("POST","/api/workspaces/:workspaceId/continue"),workspaceStatus:e("POST","/api/workspaces/:workspaceId/status"),renameWorkspaceStatus:e("POST","/api/workspace-statuses/:status/rename"),deleteWorkspaceStatus:e("DELETE","/api/workspace-statuses/:status"),pinWorkspace:e("POST","/api/workspaces/:workspaceId/pin"),retryWorkspaceSetup:e("POST","/api/workspaces/:workspaceId/setup"),archiveWorkspace:e("POST","/api/workspaces/:workspaceId/archive"),archiveJobs:s("GET","/api/workspace-archive-jobs"),inspectArchiveWork:s("POST","/api/workspace-archive-jobs/inspect"),queueArchiveJobs:s("POST","/api/workspace-archive-jobs"),queueCloseoutJobs:s("POST","/api/workspace-archive-jobs/closeout"),confirmArchiveJob:s("POST","/api/workspace-archive-jobs/confirm"),dismissArchiveJobs:s("DELETE","/api/workspace-archive-jobs"),restoreWorkspace:e("POST","/api/workspaces/:workspaceId/restore"),workspaceRecovery:e("GET","/api/workspaces/:workspaceId/recovery"),releaseWorkspaceRecovery:e("POST","/api/workspaces/:workspaceId/recovery"),devServer:e("GET","/api/workspaces/:workspaceId/dev-server"),startDevServer:e("POST","/api/workspaces/:workspaceId/dev-server"),stopDevServer:e("DELETE","/api/workspaces/:workspaceId/dev-server"),devServerLog:e("GET","/api/workspaces/:workspaceId/dev-server/log"),dismissFirstPrompt:e("DELETE","/api/workspaces/:workspaceId/prompt"),nativeSession:e("GET","/api/sessions/:sessionId/native"),opencodeCompactionStatus:e("GET","/api/sessions/:sessionId/opencode-compaction"),opencodeCompact:e("POST","/api/sessions/:sessionId/opencode-compaction"),compactInPlaceStatus:e("GET","/api/sessions/:sessionId/compact-in-place"),compactInPlace:e("POST","/api/sessions/:sessionId/compact-in-place"),nativeConnect:e("POST","/api/sessions/:sessionId/connect"),nativeAnswer:e("POST","/api/sessions/:sessionId/answer"),nativeDismissDelivery:e("DELETE","/api/sessions/:sessionId/delivery"),schedulePrompt:e("POST","/api/sessions/:sessionId/scheduled-prompts"),scheduledPromptAction:e("POST","/api/sessions/:sessionId/scheduled-prompts/action"),promoteQueuedPrompt:e("POST","/api/sessions/:sessionId/delivery/promote"),messages:e("GET","/api/sessions/:sessionId/messages"),messagesAround:e("GET","/api/sessions/:sessionId/around"),chatFind:e("GET","/api/sessions/:sessionId/find"),chatOutputs:e("GET","/api/sessions/:sessionId/outputs"),context:e("GET","/api/sessions/:sessionId/context"),models:e("GET","/api/sessions/:sessionId/models"),commands:e("GET","/api/sessions/:sessionId/commands"),mcpAppResource:e("POST","/api/sessions/:sessionId/mcp-apps/resource"),mcpAppRead:e("POST","/api/sessions/:sessionId/mcp-apps/read"),mcpAppCallTool:e("POST","/api/sessions/:sessionId/mcp-apps/call"),mcpSignInState:e("POST","/api/sessions/:sessionId/mcp-sign-in/state"),mcpSignInStart:e("POST","/api/sessions/:sessionId/mcp-sign-in/start"),defaultModel:e("POST","/api/sessions/:sessionId/default-model"),agent:e("POST","/api/sessions/:sessionId/agent"),stop:e("POST","/api/sessions/:sessionId/stop"),closeChat:e("DELETE","/api/sessions/:sessionId"),renameChat:e("POST","/api/sessions/:sessionId/rename"),markChatUnread:e("POST","/api/sessions/:sessionId/unread"),restoreChat:e("POST","/api/sessions/:sessionId/restore"),sendPrompt:e("POST","/api/sessions/:sessionId/prompt"),sideQuestion:e("POST","/api/sessions/:sessionId/side-question"),requestQuestionForm:e("POST","/api/sessions/:sessionId/question-form"),questionForm:e("GET","/api/sessions/:sessionId/question-form"),sideQuestions:e("GET","/api/sessions/:sessionId/side-questions"),sideQuestionAction:e("POST","/api/sessions/:sessionId/side-question/action"),uploadAttachment:e("POST","/api/sessions/:sessionId/attachments"),importLocalAttachment:e("POST","/api/sessions/:sessionId/attachments/local"),materializeAttachments:e("POST","/api/sessions/:sessionId/attachments/staged"),splitChat:e("POST","/api/sessions/:sessionId/split"),transcriptAttachment:e("POST","/api/sessions/:sessionId/transcript"),joinChatHistory:e("POST","/api/sessions/:sessionId/history"),delegateTask:e("POST","/api/sessions/:sessionId/delegate"),roleActions:e("GET","/api/sessions/:sessionId/role-actions"),runRoleAction:e("POST","/api/sessions/:sessionId/role-actions"),reportBack:e("GET","/api/sessions/:sessionId/report-back"),shareReportBack:e("POST","/api/sessions/:sessionId/report-back"),dismissParkedPrompt:e("DELETE","/api/sessions/:sessionId/prompt")},l=new Set(Object.values(d).filter(a=>!("re"in a)).map(a=>`${a.method} ${a.pattern}`));function w(a,o,p){return o===a.method&&p===a.pattern}i(w,"isRoute");function u(a,o,p){if(o!==a.method||l.has(`${o} ${p}`))return null;const t=p.match(a.re);return t?decodeURIComponent(t[1]):null}i(u,"routeParam");export{k as NAVIGATION_PATH,w as isRoute,u as routeParam,d as routes};
1
+ var n=Object.defineProperty;var i=(a,o)=>n(a,"name",{value:o,configurable:!0});const k="/api/trpc",w="/api/app-rpc";function r(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(r,"literal");function s(a,o){return{method:a,pattern:o,path:i(()=>o,"path")}}i(s,"flat");function e(a,o){const[p,t]=o.split(/:[a-zA-Z]+/);if(t===void 0)throw new Error(`route ${o} declares no :param`);return{method:a,pattern:o,path:i(c=>`${p}${encodeURIComponent(c)}${t}`,"path"),re:new RegExp(`^${r(p)}([^/]+)${r(t)}$`)}}i(e,"param");const l={state:s("GET","/api/state"),simulatorDevices:s("GET","/api/simulator/devices"),simulatorBoot:e("POST","/api/simulator/:id/boot"),simulatorWatch:e("GET","/api/simulator/:id/watch"),simulatorFrame:e("GET","/api/simulator/:id/frame"),simulatorInput:e("POST","/api/simulator/:id/input"),workspaceOverview:s("GET","/api/workspace-overview"),attentionSettings:s("GET","/api/attention/settings"),attentionConfigure:s("PATCH","/api/attention/settings"),attentionCheck:s("POST","/api/attention/check"),attentionDemand:s("POST","/api/attention/demand"),attentionSkills:s("POST","/api/attention/skills"),attentionWebhooks:s("GET","/api/attention/webhooks"),attentionWebhookCreate:s("POST","/api/attention/webhooks"),attentionWebhookUpdate:e("PATCH","/api/attention/webhooks/:id"),attentionWebhookDelete:e("DELETE","/api/attention/webhooks/:id"),attentionWebhookTest:e("POST","/api/attention/webhooks/:id/test"),attentionWebhookWorkspace:e("PUT","/api/attention/webhooks/workspaces/:id"),trayStatus:s("GET","/api/tray-status"),trayOldestUnread:s("GET","/api/tray-status/oldest-unread"),desktopNotifications:s("GET","/api/desktop-notifications"),desktopHandoffs:s("GET","/api/desktop-handoffs"),search:s("GET","/api/search"),pickRepoFolder:s("POST","/api/repos/pick-folder"),registerHostRepo:s("POST","/api/host/repos"),workspaceSources:e("GET","/api/repos/:repo/workspace-sources"),accounts:s("GET","/api/accounts"),createAccount:s("POST","/api/accounts"),updateAccount:e("PATCH","/api/accounts/:account"),deleteAccount:e("DELETE","/api/accounts/:account"),refreshAccount:e("POST","/api/accounts/:account/refresh"),signInAccount:e("POST","/api/accounts/:account/sign-in"),cancelAccountSignIn:e("DELETE","/api/accounts/:account/sign-in"),signOutAccount:e("POST","/api/accounts/:account/sign-out"),toolUsage:s("GET","/api/usage/tools"),voiceTicket:s("POST","/api/voice/ticket"),liveTicket:s("POST","/api/live/ticket"),live:s("GET","/api/live"),voiceCall:s("POST","/api/voice/calls"),voiceCallReady:e("POST","/api/voice/calls/:callId/ready"),voiceCallText:e("POST","/api/voice/calls/:callId/text"),voiceDrafts:e("GET","/api/voice/calls/:callId/drafts"),voiceBriefFocus:e("POST","/api/voice/calls/:callId/brief-focus"),voiceClearBriefFocus:e("DELETE","/api/voice/calls/:callId/brief-focus"),voiceDraftAction:e("POST","/api/voice/calls/:callId/drafts"),voiceCallDiagnostics:e("POST","/api/voice/calls/:callId/diagnostics"),voiceCallEnd:e("DELETE","/api/voice/calls/:callId"),voiceHistory:s("GET","/api/voice/history"),voiceTranscript:e("GET","/api/voice/history/:callId"),voiceSearch:s("GET","/api/voice/search"),updateVoiceConfig:s("PUT","/api/config/voice"),repoIcon:e("GET","/api/repos/:repo/icon"),deleteRepo:e("DELETE","/api/repos/:repo"),repoHistory:e("GET","/api/repos/:repo/history"),repoCommit:e("GET","/api/repos/:repo/commit"),repoCompare:e("GET","/api/repos/:repo/compare"),repoCommitFile:e("GET","/api/repos/:repo/commit/file"),repoFile:e("GET","/api/repos/:repo/file"),repoBlame:e("GET","/api/repos/:repo/blame"),repoCommitIds:e("GET","/api/repos/:repo/commit-ids"),repoFiles:e("GET","/api/repos/:repo/files"),fetchRepoBase:e("POST","/api/repos/:repo/fetch"),repoConversations:e("GET","/api/repos/:repo/conversations"),repoAuthors:e("GET","/api/repos/:repo/authors"),localImage:e("GET","/api/local-images/:path"),localPage:s("POST","/api/local-pages"),viewTicket:s("POST","/api/view-tickets"),revokeViewTicket:e("DELETE","/api/view-tickets/:ticket"),viewFile:e("GET","/api/view/:name"),filePreview:e("GET","/api/files/:reference"),openLocalFile:s("POST","/api/files/open"),saveFile:e("PUT","/api/files/:reference"),toolImage:e("GET","/api/tool-images/:reference"),mcpAppToolCall:e("GET","/api/mcp-app-calls/:reference"),generatedUi:e("GET","/api/generated-ui/:reference"),generatedUiState:e("GET","/api/generated-ui/:reference/state"),updateGeneratedUiState:e("PUT","/api/generated-ui/:reference/state"),renderUi:e("POST","/api/sessions/:sessionId/generated-ui"),mcpAppSandbox:s("GET","/api/mcp-app-sandbox"),stageAttachment:s("POST","/api/attachments"),stageLocalAttachment:s("POST","/api/attachments/local"),importConversation:s("POST","/api/attachments/import"),localConversations:s("GET","/api/conversation-import/local"),importLocalConversation:s("POST","/api/conversation-import/local"),stagedAttachmentImage:e("GET","/api/attachments/:attachmentId"),discardStagedAttachment:e("DELETE","/api/attachments/:attachmentId"),logs:s("GET","/api/logs"),feedback:s("POST","/api/feedback"),probeExternalPreview:s("POST","/api/external-previews/probe"),resetAgentConnections:s("POST","/api/agents/reset"),restartForUpdate:s("POST","/api/update/restart"),applyUpdate:s("POST","/api/update/apply"),checkForUpdates:s("POST","/api/update/check"),selectUpdateChannel:s("POST","/api/update/channel"),account:s("GET","/api/account"),accountLogin:s("POST","/api/account/login"),accountLoginComplete:s("POST","/api/account/login/complete"),accountLogout:s("POST","/api/account/logout"),accountMcp:s("GET","/api/account/mcp"),enableAccountMcp:s("PUT","/api/account/mcp"),disableAccountMcp:s("DELETE","/api/account/mcp"),revokeAccountMcpGrant:e("DELETE","/api/account/mcp/grants/:grantId"),analyticsConsent:s("GET","/api/analytics"),analyticsTrack:s("POST","/api/analytics"),completeOnboarding:s("POST","/api/onboarding/complete"),nosleep:s("GET","/api/nosleep"),armNoSleep:s("POST","/api/nosleep"),disarmNoSleep:s("DELETE","/api/nosleep"),push:s("GET","/api/push"),pushSubscribe:s("POST","/api/push/subscribe"),pushUnsubscribe:s("POST","/api/push/unsubscribe"),pushTest:s("POST","/api/push/test"),agents:s("GET","/api/agents"),updateAgents:s("PATCH","/api/agents"),agentImportCandidates:s("GET","/api/agents/import"),importAgents:s("POST","/api/agents/import"),updateSavedWorkflows:s("PATCH","/api/saved-workflows"),roleTemplate:e("GET","/api/agents/templates/:slug"),routing:s("GET","/api/routing"),updateRouting:s("PATCH","/api/routing"),updateAutoPreference:s("PATCH","/api/routing/default-auto"),roles:s("GET","/api/roles"),updateRoles:s("PATCH","/api/roles"),delegations:s("GET","/api/delegations"),receiveDelegations:s("POST","/api/delegations/receive"),dismissDelegation:e("DELETE","/api/delegations/:delegationId"),cancelDelegation:e("POST","/api/delegations/:delegationId/cancel"),cancelOwnedDelegation:e("POST","/api/sessions/:sessionId/delegations/cancel"),askDelegationQuestion:e("POST","/api/sessions/:sessionId/delegation-questions"),answerDelegationQuestion:e("POST","/api/sessions/:sessionId/delegation-answers"),wakeDelegation:e("POST","/api/delegations/:delegationId/wake"),workflows:s("POST","/api/workflows"),workflow:e("DELETE","/api/workflows/:workflowId"),workflowDelegation:e("POST","/api/workflows/:workflowId/delegations"),workflowResolution:e("POST","/api/workflows/:workflowId/resolve-assignment"),workflowRetry:e("POST","/api/workflows/:workflowId/retry"),workflowAdopt:e("POST","/api/workflows/:workflowId/adopt"),workflowReplay:e("POST","/api/workflows/:workflowId/replay"),workflowComplete:e("POST","/api/workflows/:workflowId/complete"),workflowDetail:e("GET","/api/workflows/:workflowId"),workflowJobReport:e("GET","/api/workflow-jobs/:jobId/report"),confirmUiStable:s("POST","/api/ui-quarantine/confirm"),runtimeOperation:e("GET","/api/runtime-operations/:operationId"),shutdown:s("POST","/api/shutdown"),importedHistoryRead:e("GET","/api/history/:historyId"),createWorkspace:s("POST","/api/workspaces"),createChat:s("POST","/api/chats"),chatIdentity:e("POST","/api/workspaces/:workspaceId/chat-identity"),workspaceHistory:s("GET","/api/workspaces/history"),renameWorkspace:e("POST","/api/workspaces/:workspaceId/rename"),workspace:e("GET","/api/workspaces/:workspaceId"),sessions:e("GET","/api/workspaces/:workspaceId/sessions"),closedSessions:e("GET","/api/workspaces/:workspaceId/sessions/closed"),newChat:e("POST","/api/workspaces/:workspaceId/sessions"),prepareWorkflowDraft:e("POST","/api/workspaces/:workspaceId/workflow-draft"),diff:e("GET","/api/workspaces/:workspaceId/diff"),diffPaths:e("GET","/api/workspaces/:workspaceId/diff/paths"),fileDiff:e("GET","/api/workspaces/:workspaceId/diff/file"),diffImage:e("GET","/api/workspaces/:workspaceId/diff/image"),workspaceFiles:e("GET","/api/workspaces/:workspaceId/files"),workspaceDirectory:e("GET","/api/workspaces/:workspaceId/directory"),workspacePath:e("GET","/api/workspaces/:workspaceId/path"),previewWorkspaceDiscard:e("GET","/api/workspaces/:workspaceId/files/discard"),discardWorkspaceChanges:e("POST","/api/workspaces/:workspaceId/files/discard"),openWorkspaceFile:e("POST","/api/workspaces/:workspaceId/files/open"),workspaceLaunchers:e("GET","/api/workspaces/:workspaceId/launchers"),openWorkspaceLauncher:e("POST","/api/workspaces/:workspaceId/launchers/open"),pasteWorkspaceTerminal:e("POST","/api/workspaces/:workspaceId/launchers/paste"),terminalSessions:e("GET","/api/workspaces/:workspaceId/terminals"),startTerminalSession:e("POST","/api/workspaces/:workspaceId/terminals"),startTerminalShell:e("POST","/api/workspaces/:workspaceId/terminals/shell"),terminalSession:e("GET","/api/workspaces/:workspaceId/terminals/status"),stopTerminalSession:e("POST","/api/workspaces/:workspaceId/terminals/stop"),terminalAttachment:e("POST","/api/workspaces/:workspaceId/terminals/attachment"),launcherIcon:e("GET","/api/workspaces/:workspaceId/launchers/icon"),refreshWorkspaceGit:e("POST","/api/workspaces/:workspaceId/git/refresh"),pushWorkspace:e("POST","/api/workspaces/:workspaceId/git/push"),workspaceRelease:e("GET","/api/workspaces/:workspaceId/git/release"),workspacePrompts:e("GET","/api/workspaces/:workspaceId/prompts"),workspaceConfig:e("GET","/api/workspaces/:workspaceId/config"),updateWorkspaceConfig:e("PUT","/api/workspaces/:workspaceId/config"),merge:e("POST","/api/workspaces/:workspaceId/merge"),closeoutWorkspace:e("POST","/api/workspaces/:workspaceId/closeout"),continueWorkspace:e("POST","/api/workspaces/:workspaceId/continue"),workspaceStatus:e("POST","/api/workspaces/:workspaceId/status"),renameWorkspaceStatus:e("POST","/api/workspace-statuses/:status/rename"),deleteWorkspaceStatus:e("DELETE","/api/workspace-statuses/:status"),pinWorkspace:e("POST","/api/workspaces/:workspaceId/pin"),retryWorkspaceSetup:e("POST","/api/workspaces/:workspaceId/setup"),archiveWorkspace:e("POST","/api/workspaces/:workspaceId/archive"),archiveJobs:s("GET","/api/workspace-archive-jobs"),inspectArchiveWork:s("POST","/api/workspace-archive-jobs/inspect"),queueArchiveJobs:s("POST","/api/workspace-archive-jobs"),queueCloseoutJobs:s("POST","/api/workspace-archive-jobs/closeout"),confirmArchiveJob:s("POST","/api/workspace-archive-jobs/confirm"),dismissArchiveJobs:s("DELETE","/api/workspace-archive-jobs"),restoreWorkspace:e("POST","/api/workspaces/:workspaceId/restore"),workspaceRecovery:e("GET","/api/workspaces/:workspaceId/recovery"),releaseWorkspaceRecovery:e("POST","/api/workspaces/:workspaceId/recovery"),devServer:e("GET","/api/workspaces/:workspaceId/dev-server"),startDevServer:e("POST","/api/workspaces/:workspaceId/dev-server"),stopDevServer:e("DELETE","/api/workspaces/:workspaceId/dev-server"),devServerLog:e("GET","/api/workspaces/:workspaceId/dev-server/log"),dismissFirstPrompt:e("DELETE","/api/workspaces/:workspaceId/prompt"),nativeSession:e("GET","/api/sessions/:sessionId/native"),opencodeCompactionStatus:e("GET","/api/sessions/:sessionId/opencode-compaction"),opencodeCompact:e("POST","/api/sessions/:sessionId/opencode-compaction"),compactInPlaceStatus:e("GET","/api/sessions/:sessionId/compact-in-place"),compactInPlace:e("POST","/api/sessions/:sessionId/compact-in-place"),nativeConnect:e("POST","/api/sessions/:sessionId/connect"),nativeAnswer:e("POST","/api/sessions/:sessionId/answer"),nativeDismissDelivery:e("DELETE","/api/sessions/:sessionId/delivery"),schedulePrompt:e("POST","/api/sessions/:sessionId/scheduled-prompts"),scheduledPromptAction:e("POST","/api/sessions/:sessionId/scheduled-prompts/action"),promoteQueuedPrompt:e("POST","/api/sessions/:sessionId/delivery/promote"),messages:e("GET","/api/sessions/:sessionId/messages"),messagesAround:e("GET","/api/sessions/:sessionId/around"),chatFind:e("GET","/api/sessions/:sessionId/find"),chatOutputs:e("GET","/api/sessions/:sessionId/outputs"),context:e("GET","/api/sessions/:sessionId/context"),models:e("GET","/api/sessions/:sessionId/models"),commands:e("GET","/api/sessions/:sessionId/commands"),mcpAppResource:e("POST","/api/sessions/:sessionId/mcp-apps/resource"),mcpAppRead:e("POST","/api/sessions/:sessionId/mcp-apps/read"),mcpAppCallTool:e("POST","/api/sessions/:sessionId/mcp-apps/call"),mcpSignInState:e("POST","/api/sessions/:sessionId/mcp-sign-in/state"),mcpSignInStart:e("POST","/api/sessions/:sessionId/mcp-sign-in/start"),defaultModel:e("POST","/api/sessions/:sessionId/default-model"),agent:e("POST","/api/sessions/:sessionId/agent"),stop:e("POST","/api/sessions/:sessionId/stop"),closeChat:e("DELETE","/api/sessions/:sessionId"),renameChat:e("POST","/api/sessions/:sessionId/rename"),markChatUnread:e("POST","/api/sessions/:sessionId/unread"),restoreChat:e("POST","/api/sessions/:sessionId/restore"),sendPrompt:e("POST","/api/sessions/:sessionId/prompt"),sideQuestion:e("POST","/api/sessions/:sessionId/side-question"),requestQuestionForm:e("POST","/api/sessions/:sessionId/question-form"),questionForm:e("GET","/api/sessions/:sessionId/question-form"),sideQuestions:e("GET","/api/sessions/:sessionId/side-questions"),sideQuestionAction:e("POST","/api/sessions/:sessionId/side-question/action"),uploadAttachment:e("POST","/api/sessions/:sessionId/attachments"),importLocalAttachment:e("POST","/api/sessions/:sessionId/attachments/local"),materializeAttachments:e("POST","/api/sessions/:sessionId/attachments/staged"),splitChat:e("POST","/api/sessions/:sessionId/split"),transcriptAttachment:e("POST","/api/sessions/:sessionId/transcript"),joinChatHistory:e("POST","/api/sessions/:sessionId/history"),delegateTask:e("POST","/api/sessions/:sessionId/delegate"),roleActions:e("GET","/api/sessions/:sessionId/role-actions"),runRoleAction:e("POST","/api/sessions/:sessionId/role-actions"),reportBack:e("GET","/api/sessions/:sessionId/report-back"),shareReportBack:e("POST","/api/sessions/:sessionId/report-back"),dismissParkedPrompt:e("DELETE","/api/sessions/:sessionId/prompt")},d=new Set(Object.values(l).filter(a=>!("re"in a)).map(a=>`${a.method} ${a.pattern}`));function u(a,o,p){return o===a.method&&p===a.pattern}i(u,"isRoute");function m(a,o,p){if(o!==a.method||d.has(`${o} ${p}`))return null;const t=p.match(a.re);return t?decodeURIComponent(t[1]):null}i(m,"routeParam");export{w as APP_RPC_PATH,k as NAVIGATION_PATH,u as isRoute,m as routeParam,l as routes};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farero-ai/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Shared API route contracts for local coding-agent applications.",
@@ -50,6 +50,10 @@
50
50
  "types": "./dist/desktop-notifications.d.ts",
51
51
  "import": "./dist/desktop-notifications.js"
52
52
  },
53
+ "./desktop-handoffs": {
54
+ "types": "./dist/desktop-handoffs.d.ts",
55
+ "import": "./dist/desktop-handoffs.js"
56
+ },
53
57
  "./desktop-feed": {
54
58
  "types": "./dist/desktop-feed.d.ts",
55
59
  "import": "./dist/desktop-feed.js"