@ours.network/sdk 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/LICENSE +98 -0
- package/README.md +41 -0
- package/dist/api/contacts.d.ts +31 -0
- package/dist/api/contacts.js +2 -0
- package/dist/api/files.d.ts +10 -0
- package/dist/api/files.js +2 -0
- package/dist/api/identity.d.ts +44 -0
- package/dist/api/identity.js +2 -0
- package/dist/api/messaging.d.ts +23 -0
- package/dist/api/messaging.js +2 -0
- package/dist/api/profile.d.ts +9 -0
- package/dist/api/profile.js +2 -0
- package/dist/api/types.d.ts +177 -0
- package/dist/api/types.js +1 -0
- package/dist/book.d.ts +22 -0
- package/dist/book.js +2 -0
- package/dist/boot.d.ts +1 -0
- package/dist/boot.js +2 -0
- package/dist/chunk-37D5PCFY.js +2 -0
- package/dist/chunk-3DQSMLVZ.js +2 -0
- package/dist/chunk-5EWCIQH6.js +2 -0
- package/dist/chunk-7UUFYO6G.js +2 -0
- package/dist/chunk-A3SXVUOC.js +2 -0
- package/dist/chunk-AJQIWYXG.js +2 -0
- package/dist/chunk-DIRW7I4S.js +2 -0
- package/dist/chunk-HCIVLHKC.js +2 -0
- package/dist/chunk-HSVIKO4D.js +3 -0
- package/dist/chunk-IB2U7K6Y.js +5 -0
- package/dist/chunk-KZMPGVQM.js +2 -0
- package/dist/chunk-LKFYUCN7.js +2 -0
- package/dist/chunk-NMYSFQBL.js +2 -0
- package/dist/chunk-NQQ4GSVI.js +5 -0
- package/dist/chunk-NSPYN5TT.js +2 -0
- package/dist/chunk-P55RJGZU.js +2 -0
- package/dist/chunk-PCHN744Y.js +2 -0
- package/dist/chunk-Q3UVLSCX.js +2 -0
- package/dist/chunk-RAGUBE4Y.js +2 -0
- package/dist/chunk-T25JIPX5.js +2 -0
- package/dist/chunk-TZBRSDND.js +2 -0
- package/dist/chunk-UELGY557.js +2 -0
- package/dist/chunk-UJGRFV4J.js +2 -0
- package/dist/chunk-UM73BGFH.js +2 -0
- package/dist/chunk-V64IUVSS.js +4 -0
- package/dist/chunk-VOYMK2OO.js +2 -0
- package/dist/chunk-VW2KWXSJ.js +2 -0
- package/dist/chunk-X4RVJ5VL.js +6 -0
- package/dist/chunk-YRPUM6JG.js +2 -0
- package/dist/chunk-ZAXRB5MO.js +2 -0
- package/dist/chunk-ZHH3PWEW.js +4 -0
- package/dist/client/http.d.ts +178 -0
- package/dist/client/http.js +2 -0
- package/dist/cluster/control.d.ts +5 -0
- package/dist/cluster/control.js +2 -0
- package/dist/cluster/manifest.d.ts +12 -0
- package/dist/cluster/manifest.js +2 -0
- package/dist/config.d.ts +37 -0
- package/dist/config.js +2 -0
- package/dist/connector.d.ts +68 -0
- package/dist/connector.js +5 -0
- package/dist/daemon.d.ts +5 -0
- package/dist/daemon.js +2 -0
- package/dist/errors.d.ts +40 -0
- package/dist/errors.js +2 -0
- package/dist/events.d.ts +144 -0
- package/dist/events.js +2 -0
- package/dist/files.d.ts +2 -0
- package/dist/files.js +2 -0
- package/dist/gc.d.ts +2 -0
- package/dist/gc.js +2 -0
- package/dist/http/api-routes.d.ts +63 -0
- package/dist/http/api-routes.js +2 -0
- package/dist/http/server.d.ts +120 -0
- package/dist/http/server.js +2 -0
- package/dist/identity/hierarchy.d.ts +20 -0
- package/dist/identity/hierarchy.js +2 -0
- package/dist/identity/lease.d.ts +29 -0
- package/dist/identity/lease.js +2 -0
- package/dist/identity/lifecycle.d.ts +5 -0
- package/dist/identity/lifecycle.js +2 -0
- package/dist/identity/model.d.ts +67 -0
- package/dist/identity/model.js +2 -0
- package/dist/identity/provision.d.ts +12 -0
- package/dist/identity/provision.js +2 -0
- package/dist/inbox.d.ts +38 -0
- package/dist/inbox.js +2 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +2 -0
- package/dist/messaging/send.d.ts +28 -0
- package/dist/messaging/send.js +2 -0
- package/dist/mufl/handlers.d.ts +5 -0
- package/dist/mufl/handlers.js +2 -0
- package/dist/mufl/tx.d.ts +9 -0
- package/dist/mufl/tx.js +2 -0
- package/dist/mufl_code/8ED6356B41CC689C75DA3302AD7856058131661A6ABBAC961E71BA838D8C97A3.muflo +0 -0
- package/dist/notify.d.ts +24 -0
- package/dist/notify.js +2 -0
- package/dist/process-state.d.ts +2 -0
- package/dist/process-state.js +2 -0
- package/dist/protocol.d.ts +1 -0
- package/dist/protocol.js +2 -0
- package/dist/render/adapt-to-json.d.ts +83 -0
- package/dist/render/adapt-to-json.js +2 -0
- package/dist/runtime/env.d.ts +18 -0
- package/dist/runtime/env.js +2 -0
- package/dist/runtime/unit.d.ts +15 -0
- package/dist/runtime/unit.js +2 -0
- package/dist/sse-keepalive.d.ts +18 -0
- package/dist/sse-keepalive.js +2 -0
- package/dist/startup-progress.d.ts +54 -0
- package/dist/startup-progress.js +2 -0
- package/dist/state.d.ts +5 -0
- package/dist/state.js +2 -0
- package/dist/sweeps.d.ts +18 -0
- package/dist/sweeps.js +2 -0
- package/dist/transcribe.d.ts +113 -0
- package/dist/transcribe.js +2 -0
- package/dist/version-advisory.d.ts +4 -0
- package/dist/version-advisory.js +2 -0
- package/dist/voice-setup.d.ts +44 -0
- package/dist/voice-setup.js +28 -0
- package/package.json +49 -0
package/dist/inbox.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type EncryptionType = 'legacy' | 'e2e';
|
|
2
|
+
export declare function e2eWireIdsFromEvents(events: Array<Record<string, unknown>>): Set<string>;
|
|
3
|
+
export declare function encryptionFor(wireId: string | undefined | null, e2eWireIds: Set<string>): EncryptionType;
|
|
4
|
+
export type MessageJson = {
|
|
5
|
+
msg_id: number;
|
|
6
|
+
wire_id: string;
|
|
7
|
+
from: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
encryption: EncryptionType;
|
|
12
|
+
transport: 'double_ratchet' | 'legacy_box';
|
|
13
|
+
text: string;
|
|
14
|
+
date: string;
|
|
15
|
+
status: string;
|
|
16
|
+
reply_to: {
|
|
17
|
+
wire_id: string;
|
|
18
|
+
sentence?: number;
|
|
19
|
+
} | null;
|
|
20
|
+
};
|
|
21
|
+
export type InboxLike = {
|
|
22
|
+
msg_id: number;
|
|
23
|
+
sender_id: string;
|
|
24
|
+
sender_name: string;
|
|
25
|
+
text: string;
|
|
26
|
+
date: string;
|
|
27
|
+
status: string;
|
|
28
|
+
wire_id: string;
|
|
29
|
+
reply_to: {
|
|
30
|
+
wire_id: string;
|
|
31
|
+
sentence?: number;
|
|
32
|
+
} | null;
|
|
33
|
+
};
|
|
34
|
+
export declare function toMessageJson(m: InboxLike, e2eWireIds: Set<string>): MessageJson;
|
|
35
|
+
export declare function buildMessagesPayload(msgs: InboxLike[], e2eWireIds: Set<string>): {
|
|
36
|
+
count: number;
|
|
37
|
+
messages: MessageJson[];
|
|
38
|
+
};
|
package/dist/inbox.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './errors.js';
|
|
2
|
+
export type * from './api/types.js';
|
|
3
|
+
export * from './api/identity.js';
|
|
4
|
+
export * from './api/contacts.js';
|
|
5
|
+
export * from './api/messaging.js';
|
|
6
|
+
export * from './api/files.js';
|
|
7
|
+
export * from './api/profile.js';
|
|
8
|
+
export * from './client/http.js';
|
|
9
|
+
export * from './version-advisory.js';
|
|
10
|
+
export { FILE_SELECTION_CAP } from './identity/model.js';
|
|
11
|
+
export * from './events.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as Oo}from"./chunk-TZBRSDND.js";import{a as Po}from"./chunk-5EWCIQH6.js";import{a as oo,b as ro,c as po,d as eo,e as to,f as fo,g as mo,h as xo,i as Eo,j as so}from"./chunk-KZMPGVQM.js";import{a as yo,b as Co,c as Io}from"./chunk-AJQIWYXG.js";import{a as Lo,b as _o,c as ao,d as io,e as jo}from"./chunk-NSPYN5TT.js";import"./chunk-VW2KWXSJ.js";import{a as Ao,b as Fo,c as No}from"./chunk-3DQSMLVZ.js";import{a as K,b as M,c as Q,d as R,e as U,f as V,g as W,h as X,i as Y,j as Z,k as $}from"./chunk-7UUFYO6G.js";import{A as q,B as u,C as v,D as w,E as z,F as B,G as D,H as G,I as H,J,a as x,b as E,c as s,d as y,e as C,f as I,g as L,h as _,i as a,j as i,k as j,l as A,m as F,n as N,o as O,p as P,q as S,r as T,s as b,t as c,u as d,v as g,w as h,x as k,y as l,z as n}from"./chunk-UM73BGFH.js";import"./chunk-NMYSFQBL.js";import"./chunk-VOYMK2OO.js";import"./chunk-T25JIPX5.js";import"./chunk-HCIVLHKC.js";import"./chunk-NQQ4GSVI.js";import"./chunk-X4RVJ5VL.js";import"./chunk-DIRW7I4S.js";import"./chunk-YRPUM6JG.js";import"./chunk-LKFYUCN7.js";import"./chunk-P55RJGZU.js";import"./chunk-RAGUBE4Y.js";import{u as o}from"./chunk-Q3UVLSCX.js";import"./chunk-HSVIKO4D.js";import"./chunk-ZHH3PWEW.js";import"./chunk-IB2U7K6Y.js";import{a as r,b as p,c as e,d as t,e as f,f as m}from"./chunk-UJGRFV4J.js";export{o as FILE_SELECTION_CAP,Oo as OursClient,x as OursError,r as VETOABLE_EVENTS,eo as addContact,Fo as advertiseMigrate,W as chooseIdentity,R as closeTemporaryIdentityOp,M as createIdentity,U as createRootIdentity,Q as createTemporaryIdentity,Y as currentIdentity,jo as deferMessages,V as defineLocalIdentityFile,f as emitDaemonEvent,m as emitDaemonNotification,s as errBindingReassigned,c as errBoundElsewhere,y as errBoundIdentityGone,G as errDuplicateId,v as errFileUnreadable,g as errIdentityClosedWithError,k as errIdentityPartiallyRemoved,B as errInvalidSelection,D as errMalformedId,I as errNameTaken,L as errNoLeaseHeaders,P as errNoLeaseToken,n as errNoPolicyArgs,z as errNoRoot,O as errNoSuchIdentity,E as errNotBound,i as errNotBoundNoName,j as errNotTemporary,N as errPathNotAbsolute,l as errPublicInviteNamed,_ as errRandomNameExhausted,a as errRootExists,h as errRootHasRoles,w as errSaveFileFallback,q as errSendFileArgs,u as errSendFileFilenameRequired,F as errTempClosedWithError,C as errTempClosingBound,S as errTempClosingChoose,A as errTempOwnedElsewhereClose,d as errTempOwnedElsewhereRemove,T as errTempOwnedLive,b as errTempStale,J as errTool,H as errUnknownOrStaleId,Po as formatVersionAdvisory,oo as generateInvite,Co as getFiles,io as getMessages,t as isDefaultHandler,to as listContacts,X as listIdentities,yo as listIncomingFiles,ao as listIncomingMessages,ro as listInvites,fo as listLocalContactBook,$ as releaseLease,xo as removeContact,Z as removeIdentity,Eo as renameContact,K as requireBound,e as resetDaemonEventHandlers,so as respondToIntroduction,po as revokeInvite,Io as saveFileFallbackNotice,_o as sendFile,Lo as sendMessage,Ao as setBio,p as setDaemonEventHandler,mo as setLocalBookPolicy,No as setPersona};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AdaptValue } from '@adapt-toolkit/sdk/backend';
|
|
2
|
+
import { type Identity } from '../identity/model.js';
|
|
3
|
+
export declare function findSibling(id: Identity, contact: string): Identity | null;
|
|
4
|
+
export declare function sendViaSibling(id: Identity, target: Identity, text: string): Promise<string>;
|
|
5
|
+
export declare function sendViaLocalBook(id: Identity, contact: string, text: string): Promise<string>;
|
|
6
|
+
export type SendVerdict = {
|
|
7
|
+
kind: 'refused';
|
|
8
|
+
wireId: string;
|
|
9
|
+
cid: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'migrating';
|
|
12
|
+
wireId: string;
|
|
13
|
+
cid: string;
|
|
14
|
+
queued: number;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'e2e';
|
|
17
|
+
wireId: string;
|
|
18
|
+
cid: string;
|
|
19
|
+
notRetained?: boolean;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'deferred';
|
|
22
|
+
wireId: string;
|
|
23
|
+
queued: number;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'sent';
|
|
26
|
+
wireId: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const parseSendVerdict: (sent: AdaptValue) => SendVerdict;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d}from"../chunk-VW2KWXSJ.js";import"../chunk-HCIVLHKC.js";import"../chunk-NQQ4GSVI.js";import"../chunk-X4RVJ5VL.js";import"../chunk-DIRW7I4S.js";import"../chunk-YRPUM6JG.js";import"../chunk-LKFYUCN7.js";import"../chunk-P55RJGZU.js";import"../chunk-RAGUBE4Y.js";import"../chunk-Q3UVLSCX.js";import"../chunk-HSVIKO4D.js";import"../chunk-ZHH3PWEW.js";import"../chunk-IB2U7K6Y.js";import"../chunk-UJGRFV4J.js";export{a as findSibling,d as parseSendVerdict,c as sendViaLocalBook,b as sendViaSibling};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{v as a}from"../chunk-NQQ4GSVI.js";import"../chunk-X4RVJ5VL.js";import"../chunk-DIRW7I4S.js";import"../chunk-YRPUM6JG.js";import"../chunk-LKFYUCN7.js";import"../chunk-P55RJGZU.js";import"../chunk-RAGUBE4Y.js";import"../chunk-Q3UVLSCX.js";import"../chunk-HSVIKO4D.js";import"../chunk-ZHH3PWEW.js";import"../chunk-IB2U7K6Y.js";import"../chunk-UJGRFV4J.js";export{a as wireHandlers};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AdaptObjectLifetime } from '@adapt-toolkit/sdk/common';
|
|
2
|
+
import type { AdaptValue } from '@adapt-toolkit/sdk/backend';
|
|
3
|
+
import type { Identity } from '../identity/model.js';
|
|
4
|
+
export declare function withScope<T>(fn: (lt: AdaptObjectLifetime) => T): T;
|
|
5
|
+
export declare function withScopeAsync<T>(fn: (lt: AdaptObjectLifetime) => Promise<T>): Promise<T>;
|
|
6
|
+
export declare function readonlyTx(id: Identity, name: string, lt?: AdaptObjectLifetime): AdaptValue;
|
|
7
|
+
export declare function withLock<T>(id: Identity, fn: () => Promise<T>): Promise<T>;
|
|
8
|
+
export declare function enqueueMutation(id: Identity, envelope: AdaptValue, timeoutMs?: number): Promise<AdaptValue>;
|
|
9
|
+
export declare function mutatingTx(id: Identity, name: string, targ: unknown, lt?: AdaptObjectLifetime, timeoutMs?: number): Promise<AdaptValue>;
|
package/dist/mufl/tx.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{E as a,F as b,G as c,H as d,I as e,J as f}from"../chunk-NQQ4GSVI.js";import"../chunk-X4RVJ5VL.js";import"../chunk-DIRW7I4S.js";import"../chunk-YRPUM6JG.js";import"../chunk-LKFYUCN7.js";import"../chunk-P55RJGZU.js";import"../chunk-RAGUBE4Y.js";import"../chunk-Q3UVLSCX.js";import"../chunk-HSVIKO4D.js";import"../chunk-ZHH3PWEW.js";import"../chunk-IB2U7K6Y.js";import"../chunk-UJGRFV4J.js";export{e as enqueueMutation,f as mutatingTx,c as readonlyTx,d as withLock,a as withScope,b as withScopeAsync};
|
|
Binary file
|
package/dist/notify.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
import type { AdaptValue } from '@adapt-toolkit/sdk/backend';
|
|
3
|
+
import { type Identity } from './identity/model.js';
|
|
4
|
+
import type { WireHooks } from './mufl/handlers.js';
|
|
5
|
+
export type NotifyHook = (identityName: string, summary: string) => void;
|
|
6
|
+
export declare function setNotifyHook(fn: NotifyHook | null): void;
|
|
7
|
+
export declare function clearNotifyHook(fn: NotifyHook): void;
|
|
8
|
+
export declare function fireNotify(identityName: string, summary: string): void;
|
|
9
|
+
export declare const notifyHooks: WireHooks;
|
|
10
|
+
export declare function fireNotifyWaiters(name: string): void;
|
|
11
|
+
export declare function waitForNotify(name: string, ms: number): Promise<void>;
|
|
12
|
+
export declare function appendNotifyLog(id: Identity, event: Record<string, unknown>): void;
|
|
13
|
+
export declare function readE2eWireIds(id: Identity): Set<string>;
|
|
14
|
+
export declare function binHexField(av: AdaptValue, field: string): string;
|
|
15
|
+
export declare function notifyLogSize(logPath: string): number;
|
|
16
|
+
export declare function readNotifyRange(logPath: string, from: number, to: number): {
|
|
17
|
+
events: Record<string, unknown>[];
|
|
18
|
+
cursor: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function serveNotifications(req: IncomingMessage, res: ServerResponse, name: string, sinceParam: string | null): Promise<void>;
|
|
21
|
+
export declare function refreshUnread(id: Identity): void;
|
|
22
|
+
export declare function unreadSummary(): {
|
|
23
|
+
identities: Array<Record<string, unknown>>;
|
|
24
|
+
};
|
package/dist/notify.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-NQQ4GSVI.js";import"./chunk-X4RVJ5VL.js";import"./chunk-DIRW7I4S.js";import"./chunk-YRPUM6JG.js";import"./chunk-LKFYUCN7.js";import"./chunk-P55RJGZU.js";import"./chunk-RAGUBE4Y.js";import"./chunk-Q3UVLSCX.js";import"./chunk-HSVIKO4D.js";import"./chunk-ZHH3PWEW.js";import"./chunk-IB2U7K6Y.js";import"./chunk-UJGRFV4J.js";export{g as appendNotifyLog,i as binHexField,b as clearNotifyHook,c as fireNotify,e as fireNotifyWaiters,d as notifyHooks,j as notifyLogSize,h as readE2eWireIds,k as readNotifyRange,m as refreshUnread,l as serveNotifications,a as setNotifyHook,n as unreadSummary,f as waitForNotify};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
function e(n){let t=n.lastIndexOf(")");if(t<0)return null;let r=n.slice(t+1).trimStart();return/^[A-Za-z](?:\s|$)/.test(r)?r[0]:null}function s(n){let t=e(n);return t==="Z"||t==="X"||t==="x"}export{s as linuxProcHasExited,e as linuxProcState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OURS_COMPAT_VERSION = 1;
|
package/dist/protocol.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { AdaptValue } from '@adapt-toolkit/sdk/backend';
|
|
2
|
+
import { type Identity } from '../identity/model.js';
|
|
3
|
+
import { type StructuredVoiceOutcome } from '../transcribe.js';
|
|
4
|
+
export declare function renderContacts(v: AdaptValue): Array<{
|
|
5
|
+
name: string;
|
|
6
|
+
container_id: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function renderImportRenames(v: AdaptValue): Record<string, string>;
|
|
9
|
+
export type ReplyRef = {
|
|
10
|
+
wire_id: string;
|
|
11
|
+
sentence?: number;
|
|
12
|
+
};
|
|
13
|
+
export type InboxMsg = {
|
|
14
|
+
msg_id: number;
|
|
15
|
+
sender_id: string;
|
|
16
|
+
sender_name: string;
|
|
17
|
+
text: string;
|
|
18
|
+
date: string;
|
|
19
|
+
status: string;
|
|
20
|
+
wire_id: string;
|
|
21
|
+
reply_to: ReplyRef | null;
|
|
22
|
+
};
|
|
23
|
+
export declare function renderInbox(v: AdaptValue): InboxMsg[];
|
|
24
|
+
export type FileReplyRef = {
|
|
25
|
+
wire_id: string;
|
|
26
|
+
sentence?: number;
|
|
27
|
+
};
|
|
28
|
+
export type IncomingFileMeta = {
|
|
29
|
+
file_id: number;
|
|
30
|
+
wire_id: string;
|
|
31
|
+
from: {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
};
|
|
35
|
+
filename: string;
|
|
36
|
+
mime: string;
|
|
37
|
+
size: number;
|
|
38
|
+
size_source: 'received_payload';
|
|
39
|
+
status: string;
|
|
40
|
+
date: string;
|
|
41
|
+
sha256: null;
|
|
42
|
+
reply_to: FileReplyRef | null;
|
|
43
|
+
kind: 'file' | 'voice_message';
|
|
44
|
+
};
|
|
45
|
+
export declare function renderFileMetadata(v: AdaptValue): IncomingFileMeta[];
|
|
46
|
+
export declare function renderFiles(files: IncomingFileMeta[]): string;
|
|
47
|
+
export type ReceivedFileMeta = {
|
|
48
|
+
file_id: number;
|
|
49
|
+
wire_id: string;
|
|
50
|
+
from: {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
filename: string;
|
|
55
|
+
path: string;
|
|
56
|
+
mime: string;
|
|
57
|
+
size: number;
|
|
58
|
+
sha256: string;
|
|
59
|
+
status: 'processed';
|
|
60
|
+
date: string;
|
|
61
|
+
kind: 'file' | 'voice_message';
|
|
62
|
+
transcription?: StructuredVoiceOutcome;
|
|
63
|
+
sender: string;
|
|
64
|
+
};
|
|
65
|
+
export declare function writeIncomingFiles(id: Identity, v: AdaptValue): Promise<{
|
|
66
|
+
text: string;
|
|
67
|
+
files: ReceivedFileMeta[];
|
|
68
|
+
}>;
|
|
69
|
+
export declare function renderPending(v: AdaptValue): Array<{
|
|
70
|
+
container_id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
queued: number;
|
|
73
|
+
}>;
|
|
74
|
+
export type ContactRoot = {
|
|
75
|
+
root_cid: string;
|
|
76
|
+
root_name: string;
|
|
77
|
+
role_id: string;
|
|
78
|
+
};
|
|
79
|
+
export declare function renderContactRoots(v: AdaptValue): Record<string, ContactRoot>;
|
|
80
|
+
export declare function fmtContactRoot(r: ContactRoot | undefined): string;
|
|
81
|
+
export declare function encodeWireBin(raw: Buffer): string;
|
|
82
|
+
export declare function decodeWireBin(s: string): Buffer;
|
|
83
|
+
export declare function adaptValueToJson(v: AdaptValue, fieldKey?: string): unknown;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"../chunk-X4RVJ5VL.js";import"../chunk-DIRW7I4S.js";import"../chunk-P55RJGZU.js";import"../chunk-Q3UVLSCX.js";import"../chunk-HSVIKO4D.js";import"../chunk-ZHH3PWEW.js";import"../chunk-IB2U7K6Y.js";export{l as adaptValueToJson,k as decodeWireBin,j as encodeWireBin,i as fmtContactRoot,h as renderContactRoots,a as renderContacts,d as renderFileMetadata,e as renderFiles,b as renderImportRenames,c as renderInbox,g as renderPending,f as writeIncomingFiles};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
import { type StartupProgressReporter } from '../startup-progress';
|
|
3
|
+
export declare const VERSION: string;
|
|
4
|
+
export declare const CONFIG: import("../config").OursConfig;
|
|
5
|
+
export declare const STATE_DIR: string;
|
|
6
|
+
export declare const BROKER_URL: string;
|
|
7
|
+
export declare const PORT: number;
|
|
8
|
+
export declare const GC_INTERVAL_MS: number;
|
|
9
|
+
export declare const API_VISIBILITY: import("../config").ApiVisibility;
|
|
10
|
+
export declare const startupProgress: StartupProgressReporter | null;
|
|
11
|
+
export declare const log: (...parts: unknown[]) => boolean;
|
|
12
|
+
export declare const API_TOKEN: string | null;
|
|
13
|
+
export declare function tokenFromReq(req: IncomingMessage): string | undefined;
|
|
14
|
+
export declare function authOk(req: IncomingMessage): boolean;
|
|
15
|
+
export declare function requireAuth(req: IncomingMessage, res: ServerResponse): boolean;
|
|
16
|
+
export declare const NAME_RE: RegExp;
|
|
17
|
+
export declare const BOOK_DIR_NAME = "contact-book";
|
|
18
|
+
export declare function validateName(name: string): string | null;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"../chunk-HSVIKO4D.js";import"../chunk-ZHH3PWEW.js";import"../chunk-IB2U7K6Y.js";export{j as API_TOKEN,g as API_VISIBILITY,o as BOOK_DIR_NAME,d as BROKER_URL,b as CONFIG,f as GC_INTERVAL_MS,n as NAME_RE,e as PORT,c as STATE_DIR,a as VERSION,l as authOk,i as log,m as requireAuth,h as startupProgress,k as tokenFromReq,p as validateName};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare function locateUnit(): {
|
|
2
|
+
dir: string;
|
|
3
|
+
hash: string;
|
|
4
|
+
contents: Uint8Array;
|
|
5
|
+
};
|
|
6
|
+
export declare let UNIT: {
|
|
7
|
+
dir: string;
|
|
8
|
+
hash: string;
|
|
9
|
+
contents: Uint8Array;
|
|
10
|
+
};
|
|
11
|
+
export declare function setUnit(u: {
|
|
12
|
+
dir: string;
|
|
13
|
+
hash: string;
|
|
14
|
+
contents: Uint8Array;
|
|
15
|
+
}): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ServerResponse } from 'node:http';
|
|
2
|
+
/** Default cadence: a 12x margin under the 300s inter-chunk timeout. */
|
|
3
|
+
export declare const DEFAULT_SSE_KEEPALIVE_MS = 25000;
|
|
4
|
+
/** The comment frame. Payload is irrelevant; being a flushed body chunk is the point. */
|
|
5
|
+
export declare const KEEPALIVE_FRAME = ": ka\n\n";
|
|
6
|
+
/** Resolve the interval from the environment. 0 (or negative) disables. */
|
|
7
|
+
export declare function sseKeepaliveMs(env?: NodeJS.ProcessEnv): number;
|
|
8
|
+
/**
|
|
9
|
+
* Emit keepalive comment frames on `res` once it becomes an SSE stream.
|
|
10
|
+
* No-op for non-SSE responses, and self-cancelling when the response ends.
|
|
11
|
+
*
|
|
12
|
+
* Detecting "is SSE" by wrapping writeHead is deliberate: res.getHeader() does
|
|
13
|
+
* NOT see headers passed as writeHead(status, obj) — it returns undefined,
|
|
14
|
+
* verified — and @hono/node-server (which the MCP SDK's Node wrapper uses) sets
|
|
15
|
+
* the SSE headers exactly that way. Reading them back would silently never match,
|
|
16
|
+
* leaving a keepalive that looks armed and never fires.
|
|
17
|
+
*/
|
|
18
|
+
export declare function armSseKeepalive(res: ServerResponse, intervalMs?: number): void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const STARTUP_PROGRESS_FILENAME = "startup-progress.json";
|
|
2
|
+
export declare const STARTUP_PROGRESS_VERSION = 1;
|
|
3
|
+
export type StartupPhase = 'initializing' | 'wrapper' | 'registrar' | 'identities' | 'reconciliation' | 'server' | 'ready' | 'failed';
|
|
4
|
+
export interface StartupProgress {
|
|
5
|
+
version: typeof STARTUP_PROGRESS_VERSION;
|
|
6
|
+
pid: number;
|
|
7
|
+
bootId: string;
|
|
8
|
+
phase: StartupPhase;
|
|
9
|
+
completed?: number;
|
|
10
|
+
total?: number;
|
|
11
|
+
startedAt: number;
|
|
12
|
+
updatedAt: number;
|
|
13
|
+
}
|
|
14
|
+
export interface StartupProgressReporter {
|
|
15
|
+
update(phase: StartupPhase, counts?: {
|
|
16
|
+
completed: number;
|
|
17
|
+
total: number;
|
|
18
|
+
}): void;
|
|
19
|
+
ready(): void;
|
|
20
|
+
failed(): void;
|
|
21
|
+
}
|
|
22
|
+
export declare function startupProgressPath(stateDir: string): string;
|
|
23
|
+
export declare function readStartupProgress(stateDir: string): StartupProgress | null;
|
|
24
|
+
export declare function createStartupProgressReporter(stateDir: string, opts?: {
|
|
25
|
+
heartbeatMs?: number;
|
|
26
|
+
pid?: number;
|
|
27
|
+
now?: () => number;
|
|
28
|
+
}): StartupProgressReporter;
|
|
29
|
+
export declare function formatStartupProgress(progress: StartupProgress): string;
|
|
30
|
+
export declare function renderStartupProgress(progress: StartupProgress, interactive: boolean): string;
|
|
31
|
+
export type StartupWaitFailure = 'process-exited' | 'daemon-reported-failure' | 'inactivity-timeout' | 'absolute-timeout';
|
|
32
|
+
export type StartupWaitResult = {
|
|
33
|
+
ok: true;
|
|
34
|
+
elapsedMs: number;
|
|
35
|
+
lastProgress: StartupProgress | null;
|
|
36
|
+
} | {
|
|
37
|
+
ok: false;
|
|
38
|
+
reason: StartupWaitFailure;
|
|
39
|
+
elapsedMs: number;
|
|
40
|
+
lastProgress: StartupProgress | null;
|
|
41
|
+
};
|
|
42
|
+
export interface StartupWaitOptions {
|
|
43
|
+
pid: number;
|
|
44
|
+
absoluteMs: number;
|
|
45
|
+
inactivityMs: number;
|
|
46
|
+
pollMs: number;
|
|
47
|
+
isProcessAlive: () => boolean;
|
|
48
|
+
isReady: () => Promise<boolean>;
|
|
49
|
+
readProgress: () => StartupProgress | null;
|
|
50
|
+
onProgress?: (progress: StartupProgress) => void;
|
|
51
|
+
now?: () => number;
|
|
52
|
+
sleep?: (ms: number) => Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
export declare function waitForStartup(opts: StartupWaitOptions): Promise<StartupWaitResult>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-ZHH3PWEW.js";export{a as STARTUP_PROGRESS_FILENAME,b as STARTUP_PROGRESS_VERSION,e as createStartupProgressReporter,f as formatStartupProgress,d as readStartupProgress,g as renderStartupProgress,c as startupProgressPath,h as waitForStartup};
|
package/dist/state.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Identity } from './identity/model.js';
|
|
2
|
+
export declare function ensureRegistrar(): Promise<void>;
|
|
3
|
+
export declare function hasSavedState(dir: string): boolean;
|
|
4
|
+
export declare function saveState(id: Identity): void;
|
|
5
|
+
export declare function saveStateFailClosed(id: Identity): void;
|
package/dist/state.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{A as a,B as b,C as c,D as d}from"./chunk-NQQ4GSVI.js";import"./chunk-X4RVJ5VL.js";import"./chunk-DIRW7I4S.js";import"./chunk-YRPUM6JG.js";import"./chunk-LKFYUCN7.js";import"./chunk-P55RJGZU.js";import"./chunk-RAGUBE4Y.js";import"./chunk-Q3UVLSCX.js";import"./chunk-HSVIKO4D.js";import"./chunk-ZHH3PWEW.js";import"./chunk-IB2U7K6Y.js";import"./chunk-UJGRFV4J.js";export{a as ensureRegistrar,b as hasSavedState,c as saveState,d as saveStateFailClosed};
|
package/dist/sweeps.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AdaptValue } from '@adapt-toolkit/sdk/backend';
|
|
2
|
+
import { type Identity } from './identity/model.js';
|
|
3
|
+
export declare function renderDegraded(av: AdaptValue): Array<{
|
|
4
|
+
cid: string;
|
|
5
|
+
name: string;
|
|
6
|
+
attempts: number;
|
|
7
|
+
queued: number;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function renderDeferredQueues(av: AdaptValue): Array<{
|
|
10
|
+
cid: string;
|
|
11
|
+
queued: number;
|
|
12
|
+
degraded: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function flushDeferredFor(id: Identity, contactCid: string): Promise<void>;
|
|
15
|
+
export declare function contactRestoreSweep(id: Identity): Promise<void>;
|
|
16
|
+
export declare function capabilityReconcileSweep(id: Identity): Promise<void>;
|
|
17
|
+
export declare function scheduleCapabilityReconcile(id: Identity): void;
|
|
18
|
+
export declare function e2eRecoverySweep(id: Identity): Promise<void>;
|
package/dist/sweeps.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{o as a,p as b,q as c,r as d,s as e,t as f,u as g}from"./chunk-NQQ4GSVI.js";import"./chunk-X4RVJ5VL.js";import"./chunk-DIRW7I4S.js";import"./chunk-YRPUM6JG.js";import"./chunk-LKFYUCN7.js";import"./chunk-P55RJGZU.js";import"./chunk-RAGUBE4Y.js";import"./chunk-Q3UVLSCX.js";import"./chunk-HSVIKO4D.js";import"./chunk-ZHH3PWEW.js";import"./chunk-IB2U7K6Y.js";import"./chunk-UJGRFV4J.js";export{e as capabilityReconcileSweep,d as contactRestoreSweep,g as e2eRecoverySweep,c as flushDeferredFor,b as renderDeferredQueues,a as renderDegraded,f as scheduleCapabilityReconcile};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exact mime parameter the panel puts on voice messages.
|
|
3
|
+
* SINGLE SOURCE OF TRUTH — any change must be coordinated with the panel send
|
|
4
|
+
* side (Designer-1); swapping it is a one-line change here.
|
|
5
|
+
*/
|
|
6
|
+
export declare const VOICE_MESSAGE_MIME_PARAM = "x-ours-kind=voice-message";
|
|
7
|
+
/**
|
|
8
|
+
* Fallback marker (also panel-controlled): filename `voice-message-<UTCstamp>.<ext>`
|
|
9
|
+
* — only honoured when the base mime is audio/*.
|
|
10
|
+
*/
|
|
11
|
+
export declare const VOICE_MESSAGE_FILENAME_PREFIX = "voice-message-";
|
|
12
|
+
/**
|
|
13
|
+
* Deterministic voice-message check for an incoming file.
|
|
14
|
+
* PRIMARY: case-insensitive `x-ours-kind=voice-message` among the mime
|
|
15
|
+
* parameters. FALLBACK: filename starts with `voice-message-` AND the base
|
|
16
|
+
* type is audio/*.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isVoiceMessage(mime: string, filename: string): boolean;
|
|
19
|
+
/** The real container type, with our marker (and any other params) stripped. */
|
|
20
|
+
export declare function baseMime(mime: string): string;
|
|
21
|
+
export declare const STT_PROVIDERS: readonly ["openai-compatible", "elevenlabs", "deepgram", "custom"];
|
|
22
|
+
export type SttProvider = (typeof STT_PROVIDERS)[number];
|
|
23
|
+
/** Request template for `provider: "custom"` — plugs in ANY provider via config. */
|
|
24
|
+
export interface SttCustomTemplate {
|
|
25
|
+
/** Full endpoint URL; `{model}` is substituted when set. */
|
|
26
|
+
url: string;
|
|
27
|
+
/** HTTP method (default POST). */
|
|
28
|
+
method?: string;
|
|
29
|
+
/** Auth header name (default Authorization). */
|
|
30
|
+
authHeaderName?: string;
|
|
31
|
+
/** Auth header value; `{key}` is substituted (default `Bearer {key}`). */
|
|
32
|
+
authHeaderTemplate?: string;
|
|
33
|
+
/** How the audio travels (default multipart). */
|
|
34
|
+
bodyMode?: 'multipart' | 'raw' | 'json-base64';
|
|
35
|
+
/** Multipart / JSON field carrying the audio (default `file`). */
|
|
36
|
+
fileField?: string;
|
|
37
|
+
/** Field carrying the model; empty string = omit the field (default `model`). */
|
|
38
|
+
modelField?: string;
|
|
39
|
+
/** Extra constant fields to send alongside. */
|
|
40
|
+
extraFields?: Record<string, string>;
|
|
41
|
+
/** Dot-path to the transcript in the JSON response (default `text`); numeric segments index arrays. */
|
|
42
|
+
responseTextPath?: string;
|
|
43
|
+
}
|
|
44
|
+
/** User-facing config block (config.json `stt: {}` / OURS_STT_* env). No defaults for provider/model/key. */
|
|
45
|
+
export interface SttUserConfig {
|
|
46
|
+
provider?: string;
|
|
47
|
+
apiKey?: string;
|
|
48
|
+
model?: string;
|
|
49
|
+
baseUrl?: string;
|
|
50
|
+
language?: string;
|
|
51
|
+
maxBytes?: number;
|
|
52
|
+
timeoutMs?: number;
|
|
53
|
+
custom?: SttCustomTemplate;
|
|
54
|
+
}
|
|
55
|
+
export declare const STT_MAX_BYTES_DEFAULT: number;
|
|
56
|
+
export declare const STT_TIMEOUT_MS_DEFAULT = 60000;
|
|
57
|
+
export type SttStatus = {
|
|
58
|
+
ready: true;
|
|
59
|
+
provider: SttProvider;
|
|
60
|
+
} | {
|
|
61
|
+
ready: false;
|
|
62
|
+
reason: string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Deterministic readiness check with a PRECISE operator-facing reason when not
|
|
66
|
+
* configured. Partial configuration never guesses.
|
|
67
|
+
*/
|
|
68
|
+
export declare function sttStatus(cfg: SttUserConfig | undefined): SttStatus;
|
|
69
|
+
export type SttResult = {
|
|
70
|
+
ok: true;
|
|
71
|
+
text: string;
|
|
72
|
+
} | {
|
|
73
|
+
ok: false;
|
|
74
|
+
error: string;
|
|
75
|
+
};
|
|
76
|
+
/** Dot-path lookup; numeric segments index arrays ("results.channels.0.…"). */
|
|
77
|
+
export declare function textAtPath(obj: unknown, path: string): string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Transcribe a voice message. Callers must have checked sttStatus().ready.
|
|
80
|
+
* Never throws; never logs the key.
|
|
81
|
+
*/
|
|
82
|
+
export declare function transcribeVoice(bytes: Buffer, filename: string, mime: string, cfg: SttUserConfig): Promise<SttResult>;
|
|
83
|
+
export type VoiceOutcome = {
|
|
84
|
+
kind: 'transcript';
|
|
85
|
+
text: string;
|
|
86
|
+
} | {
|
|
87
|
+
kind: 'unconfigured';
|
|
88
|
+
reason: string;
|
|
89
|
+
} | {
|
|
90
|
+
kind: 'failed';
|
|
91
|
+
error: string;
|
|
92
|
+
};
|
|
93
|
+
export type StructuredVoiceOutcome = {
|
|
94
|
+
configured: boolean;
|
|
95
|
+
attempted: boolean;
|
|
96
|
+
status: 'succeeded' | 'failed' | 'unavailable';
|
|
97
|
+
provider: SttProvider | null;
|
|
98
|
+
text: string | null;
|
|
99
|
+
error_category: 'not_configured' | 'size_limit' | 'timeout' | 'provider_http' | 'invalid_response' | 'provider_error' | null;
|
|
100
|
+
audio_path: string;
|
|
101
|
+
file_wire_id: string;
|
|
102
|
+
};
|
|
103
|
+
/** Stable, secret-free machine view paired with the existing human delivery line. */
|
|
104
|
+
export declare function structuredVoiceOutcome(readiness: SttStatus, outcome: VoiceOutcome, association: {
|
|
105
|
+
audioPath: string;
|
|
106
|
+
wireId: string;
|
|
107
|
+
}): StructuredVoiceOutcome;
|
|
108
|
+
export declare function voiceDeliveryLine(args: {
|
|
109
|
+
sender: string;
|
|
110
|
+
wire: string;
|
|
111
|
+
savedPath: string;
|
|
112
|
+
sizeBytes: number;
|
|
113
|
+
}, outcome: VoiceOutcome): string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-DIRW7I4S.js";export{f as STT_MAX_BYTES_DEFAULT,e as STT_PROVIDERS,g as STT_TIMEOUT_MS_DEFAULT,b as VOICE_MESSAGE_FILENAME_PREFIX,a as VOICE_MESSAGE_MIME_PARAM,d as baseMime,c as isVoiceMessage,k as structuredVoiceOutcome,h as sttStatus,i as textAtPath,j as transcribeVoice,l as voiceDeliveryLine};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const VOICE_PROVIDER_CHOICES: readonly [{
|
|
2
|
+
readonly value: "openai-compatible";
|
|
3
|
+
readonly label: "OpenAI-compatible";
|
|
4
|
+
readonly detail: "an OpenAI-style /v1 transcription endpoint";
|
|
5
|
+
}, {
|
|
6
|
+
readonly value: "elevenlabs";
|
|
7
|
+
readonly label: "ElevenLabs";
|
|
8
|
+
readonly detail: "ElevenLabs speech-to-text";
|
|
9
|
+
}, {
|
|
10
|
+
readonly value: "deepgram";
|
|
11
|
+
readonly label: "Deepgram";
|
|
12
|
+
readonly detail: "Deepgram speech-to-text";
|
|
13
|
+
}, {
|
|
14
|
+
readonly value: "custom";
|
|
15
|
+
readonly label: "Custom HTTP endpoint";
|
|
16
|
+
readonly detail: "a fully specified transcription URL";
|
|
17
|
+
}];
|
|
18
|
+
type JsonObject = Record<string, unknown>;
|
|
19
|
+
type DaemonState = 'managed' | 'external' | 'stopped';
|
|
20
|
+
type ApplyResult = {
|
|
21
|
+
ok: boolean;
|
|
22
|
+
};
|
|
23
|
+
export interface VoiceSetupOptions {
|
|
24
|
+
configFile: string;
|
|
25
|
+
env?: NodeJS.ProcessEnv;
|
|
26
|
+
dryRun?: boolean;
|
|
27
|
+
daemonState?: DaemonState;
|
|
28
|
+
apply?: () => Promise<ApplyResult> | ApplyResult;
|
|
29
|
+
stdout?: (text: string) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare function atomicWriteVoiceConfig(path: string, config: JsonObject): void;
|
|
32
|
+
export type VoiceConfigTransactionResult = {
|
|
33
|
+
ok: true;
|
|
34
|
+
stage: 'write' | 'apply';
|
|
35
|
+
} | {
|
|
36
|
+
ok: false;
|
|
37
|
+
stage: 'write' | 'apply' | 'rollback';
|
|
38
|
+
rolledBack: boolean;
|
|
39
|
+
daemonRestored: boolean;
|
|
40
|
+
};
|
|
41
|
+
export declare function transactVoiceConfig(path: string, config: JsonObject, daemonState: DaemonState, apply?: () => Promise<ApplyResult> | ApplyResult): Promise<VoiceConfigTransactionResult>;
|
|
42
|
+
export declare function runVoiceSetup(options: VoiceSetupOptions): Promise<number>;
|
|
43
|
+
export declare const VOICE_SETUP_HELP = "ours-mcp voice-setup \u2014 configure voice transcription securely\n\nUsage: ours-mcp voice-setup [--dry-run]\n\nInteractively choose exactly one provider, collect provider-specific fields, and\nread the provider API key with hidden input. The key is never accepted as a CLI\nargument. Configuration is written atomically with mode 0600. When the managed\ndaemon is running, it is restarted and readiness-checked; a failure restores the\nexact prior config.\n\n --dry-run walk the prompts without writing config or restarting the daemon\n --help show this help and exit\n\nHeadless automation remains environment-driven through OURS_STT_PROVIDER,\nOURS_STT_API_KEY, OURS_STT_MODEL, OURS_STT_BASE_URL, and OURS_STT_LANGUAGE.\nExit 2 means restart/readiness failed after a write and rollback was attempted.";
|
|
44
|
+
export {};
|