@hearthscale/app 0.2.4 → 0.4.0-rc.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 +2 -2
- package/dist/index.d.ts +720 -246
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,186 +1,3 @@
|
|
|
1
|
-
/** Resolved publisher identity, independent of the model architecture.
|
|
2
|
-
* `GET /v1/publishers/{owner}/picture` answers the picture of the Hub
|
|
3
|
-
* user or organisation `repository` names first: its bytes as
|
|
4
|
-
* `image/png`, `image/jpeg`, `image/webp`, `image/gif` or
|
|
5
|
-
* `image/svg+xml`, with `cache-control: max-age=86400`. A 404
|
|
6
|
-
* `invalid_request` says no picture is known for the owner, and a 400
|
|
7
|
-
* `invalid_request` refuses a name that is not one Hub path segment of
|
|
8
|
-
* ASCII letters, digits, `-`, `_` and `.`. */
|
|
9
|
-
interface ModelIdentity {
|
|
10
|
-
publisher: string;
|
|
11
|
-
/** The Hub repository whose publisher supplies the artwork; null for other sources. */
|
|
12
|
-
repository: string | null;
|
|
13
|
-
}
|
|
14
|
-
/** A job kind a model runs: the JSON Schema (draft-07) of its input, every
|
|
15
|
-
* object of it closed. A property of `"format": "asset"`, alone or as the
|
|
16
|
-
* items of an array, names a file by its asset id on the app's side,
|
|
17
|
-
* `contentMediaType` saying what it takes, and its `description` the
|
|
18
|
-
* limits the model sets on it; it reaches the Server as a `RenderUpload`
|
|
19
|
-
* in the same place. A property of `"format": "model"` names another
|
|
20
|
-
* model of the same Server by its card id; it reaches the Server as that
|
|
21
|
-
* model's id. A property's `default` is what the model's saved settings
|
|
22
|
-
* give a job that leaves it out. */
|
|
23
|
-
interface JobSpec {
|
|
24
|
-
input: Record<string, unknown>;
|
|
25
|
-
}
|
|
26
|
-
/** The plan of a load or a media job against the memory as it stands, in
|
|
27
|
-
* MiB. A loaded model's process holds the graphics and system memory, and
|
|
28
|
-
* may fill the growth beside them as it keeps conversations ready; a
|
|
29
|
-
* job's process holds them at most while it runs. */
|
|
30
|
-
interface MemoryPlan {
|
|
31
|
-
graphicsMib: number;
|
|
32
|
-
systemMib: number;
|
|
33
|
-
growthMib: number;
|
|
34
|
-
/** The graphics and system memory together, written as the words write
|
|
35
|
-
* an amount of memory. */
|
|
36
|
-
takes: string;
|
|
37
|
-
/** The context a language model's load takes, shorter than its settings
|
|
38
|
-
* ask where the memory free now holds no more; absent for a media job. */
|
|
39
|
-
contextTokens?: number;
|
|
40
|
-
/** Whether the broker takes the load or the job now: it starts at once,
|
|
41
|
-
* or once the busy models and jobs it waits for finish. It is the check
|
|
42
|
-
* a load or a job meets as it starts, on the memory free now, and the
|
|
43
|
-
* catalogue says it changed when it does. */
|
|
44
|
-
ready: boolean;
|
|
45
|
-
/** The plan in words, or why the load cannot start now: the limit that
|
|
46
|
-
* stops it, the system memory free or what Windows can still commit,
|
|
47
|
-
* and what the person closes or changes. */
|
|
48
|
-
words: string;
|
|
49
|
-
}
|
|
50
|
-
interface DownloadProgressBytes {
|
|
51
|
-
receivedBytes: number;
|
|
52
|
-
totalBytes: number;
|
|
53
|
-
}
|
|
54
|
-
/** The order of a Discover search; trending first where `sort` names
|
|
55
|
-
* none. */
|
|
56
|
-
type HubSort = 'trending' | 'downloads' | 'likes' | 'updated';
|
|
57
|
-
/** One Hugging Face repository as Discover lists it: who published it, the
|
|
58
|
-
* model it quantises, how it is used, and what its header states of its
|
|
59
|
-
* size, its architecture and its window. */
|
|
60
|
-
interface HubRepository {
|
|
61
|
-
identity: ModelIdentity;
|
|
62
|
-
formats: string[];
|
|
63
|
-
tasks: string[];
|
|
64
|
-
repo: string;
|
|
65
|
-
author: string;
|
|
66
|
-
/** The repository the weights were quantised from, where the card
|
|
67
|
-
* names one. */
|
|
68
|
-
baseModel: string | null;
|
|
69
|
-
downloads: number;
|
|
70
|
-
likes: number;
|
|
71
|
-
/** A gated repository's files are read only with the Hugging Face token
|
|
72
|
-
* the Server holds. */
|
|
73
|
-
gated: boolean;
|
|
74
|
-
updatedAt: string | null;
|
|
75
|
-
pipeline: string | null;
|
|
76
|
-
architecture: string | null;
|
|
77
|
-
params: number | null;
|
|
78
|
-
contextLength: number | null;
|
|
79
|
-
vision: boolean;
|
|
80
|
-
tools: boolean;
|
|
81
|
-
reasoning: boolean;
|
|
82
|
-
}
|
|
83
|
-
/** A file that can fill a companion role: where it is, how big it is, and
|
|
84
|
-
* whether its checksum is published. */
|
|
85
|
-
interface CompanionOption {
|
|
86
|
-
repo: string;
|
|
87
|
-
path: string;
|
|
88
|
-
sizeBytes: number;
|
|
89
|
-
verifiable: boolean;
|
|
90
|
-
installed?: {
|
|
91
|
-
modelId: string;
|
|
92
|
-
path: string;
|
|
93
|
-
source: {
|
|
94
|
-
type: string;
|
|
95
|
-
repo: string;
|
|
96
|
-
revision: string;
|
|
97
|
-
};
|
|
98
|
-
sha256: string;
|
|
99
|
-
sizeBytes: number;
|
|
100
|
-
};
|
|
101
|
-
containsVision?: boolean;
|
|
102
|
-
}
|
|
103
|
-
/** A companion role of a candidate and the files that fill it. */
|
|
104
|
-
interface CompanionRole {
|
|
105
|
-
role: string;
|
|
106
|
-
label: string;
|
|
107
|
-
options: CompanionOption[];
|
|
108
|
-
/** A gated base or encoder repository whose files this caller cannot read. */
|
|
109
|
-
gated?: string;
|
|
110
|
-
}
|
|
111
|
-
/** One file of a repository a pull can name: the whole shard set where it
|
|
112
|
-
* is a numbered shard, with the weights' projector beside it where the
|
|
113
|
-
* repository holds one. */
|
|
114
|
-
interface HubCandidate {
|
|
115
|
-
/** The model id the pull makes, with the projector a lone one picks. */
|
|
116
|
-
id: string;
|
|
117
|
-
/** The name the pulled model goes by where no other model of the
|
|
118
|
-
* library shares it, as `CatalogModel.label` names it. */
|
|
119
|
-
name: string;
|
|
120
|
-
path: string;
|
|
121
|
-
quantization: string;
|
|
122
|
-
/** Every byte the pull writes for this file, its set and its projector. */
|
|
123
|
-
sizeBytes: number;
|
|
124
|
-
engine: string;
|
|
125
|
-
/** Whether every byte of it publishes a checksum; a pull refuses the
|
|
126
|
-
* rest by name rather than downloading them unverified. */
|
|
127
|
-
verifiable: boolean;
|
|
128
|
-
/** The files the repository supplies beside the weights. */
|
|
129
|
-
components: {
|
|
130
|
-
role: string;
|
|
131
|
-
label: string;
|
|
132
|
-
path: string;
|
|
133
|
-
}[];
|
|
134
|
-
/** Companion roles whose files the pull selects from compatible installed
|
|
135
|
-
* components, the model's family or the encoder's own releases. */
|
|
136
|
-
requires: CompanionRole[];
|
|
137
|
-
/** The companion roles the model loads where a pull names a file for
|
|
138
|
-
* them: `llm_vision`, the vision
|
|
139
|
-
* part of a language model encoder, for a family that reads reference
|
|
140
|
-
* pictures through it. */
|
|
141
|
-
offers: CompanionRole[];
|
|
142
|
-
/** Whether the repository holds vision projectors beside the file. */
|
|
143
|
-
projector: boolean;
|
|
144
|
-
/** The projectors to choose from where there is more than one, each
|
|
145
|
-
* with the model id a pull with it makes. */
|
|
146
|
-
projectorOptions: {
|
|
147
|
-
path: string;
|
|
148
|
-
id: string;
|
|
149
|
-
sizeBytes: number;
|
|
150
|
-
verifiable: boolean;
|
|
151
|
-
}[];
|
|
152
|
-
/** The task the model serves, as `CatalogRole` names it. */
|
|
153
|
-
role: string;
|
|
154
|
-
format: string;
|
|
155
|
-
/** For an adapter: model ids from a Server, card ids from the platform. */
|
|
156
|
-
fits?: string[];
|
|
157
|
-
/** Why the file cannot be pulled, in the Server's words. */
|
|
158
|
-
reason?: string;
|
|
159
|
-
}
|
|
160
|
-
/** `GET /control/discover?task=&q=&sort=` answers the repositories of one
|
|
161
|
-
* task that `q` matches, or with no `q` the whole set, at most 30, as
|
|
162
|
-
* `HubRepository[]`; and `GET /control/discover/{owner}/{repo}` one
|
|
163
|
-
* repository as `HubListing`: the files a runtime of the Server runs, how
|
|
164
|
-
* many files it publishes in all, so a repository whose listing yields
|
|
165
|
-
* no candidate is one no runtime there runs, and every file a pull of
|
|
166
|
-
* another repository's model can name as a companion. Both read Hugging
|
|
167
|
-
* Face on a person's act and on nothing else, and with no token, so they
|
|
168
|
-
* reach the public repositories alone; the Server's own window reads the
|
|
169
|
-
* same answers from `/local/discover`, with the token the person stored. */
|
|
170
|
-
interface HubListing {
|
|
171
|
-
repo: string;
|
|
172
|
-
model: HubRepository;
|
|
173
|
-
files: number;
|
|
174
|
-
candidates: HubCandidate[];
|
|
175
|
-
companions: CompanionOption[];
|
|
176
|
-
capabilities: {
|
|
177
|
-
vision: boolean;
|
|
178
|
-
tools: boolean;
|
|
179
|
-
reasoning: boolean;
|
|
180
|
-
tasks: string[];
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
1
|
/**
|
|
185
2
|
* The platform half of the contract, generated from the Rust types of
|
|
186
3
|
* the `contract` crate by `npm run contract` in `apps/platform/scripts`.
|
|
@@ -226,6 +43,12 @@ type Entry = {
|
|
|
226
43
|
type: 'session.filing';
|
|
227
44
|
} | {
|
|
228
45
|
model?: string | null;
|
|
46
|
+
reasoning?: Reasoning | null;
|
|
47
|
+
/**
|
|
48
|
+
* The id of the index's place the agent's `file_search` reads in; with
|
|
49
|
+
* none it reads every place the app may read.
|
|
50
|
+
*/
|
|
51
|
+
place?: string | null;
|
|
229
52
|
type: 'session.settings';
|
|
230
53
|
} | {
|
|
231
54
|
to: string | null;
|
|
@@ -253,6 +76,11 @@ type Entry = {
|
|
|
253
76
|
* block named them.
|
|
254
77
|
*/
|
|
255
78
|
shown?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The context window, in tokens, the turn planned its first
|
|
81
|
+
* request with.
|
|
82
|
+
*/
|
|
83
|
+
window?: number;
|
|
256
84
|
type: 'turn.started';
|
|
257
85
|
} | {
|
|
258
86
|
turn: string;
|
|
@@ -272,6 +100,20 @@ type Entry = {
|
|
|
272
100
|
model: string;
|
|
273
101
|
provider: string;
|
|
274
102
|
error?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Milliseconds from the request to the first streamed fragment of
|
|
105
|
+
* the reply: text, reasoning or a call.
|
|
106
|
+
*/
|
|
107
|
+
firstTokenMs?: number;
|
|
108
|
+
/**
|
|
109
|
+
* The attempts of the round thrown away before this reply, oldest
|
|
110
|
+
* first.
|
|
111
|
+
*/
|
|
112
|
+
retries?: Retry[];
|
|
113
|
+
/**
|
|
114
|
+
* The streamed calls that named no tool, left out of `toolCalls`.
|
|
115
|
+
*/
|
|
116
|
+
dropped?: number;
|
|
275
117
|
type: 'agent.message';
|
|
276
118
|
} | {
|
|
277
119
|
callId: string;
|
|
@@ -280,9 +122,13 @@ type Entry = {
|
|
|
280
122
|
* The call this one runs under; absent for a call of the turn.
|
|
281
123
|
*/
|
|
282
124
|
under?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The name as the model wrote it.
|
|
127
|
+
*/
|
|
283
128
|
name: string;
|
|
284
129
|
/**
|
|
285
|
-
*
|
|
130
|
+
* The arguments as the model wrote them: JSON-encoded, or the
|
|
131
|
+
* markup of a call written in the words of the reply.
|
|
286
132
|
*/
|
|
287
133
|
arguments: string;
|
|
288
134
|
context: CallContext;
|
|
@@ -291,6 +137,10 @@ type Entry = {
|
|
|
291
137
|
* Absent for a core tool, and for a name that named no tool.
|
|
292
138
|
*/
|
|
293
139
|
label?: CallLabel;
|
|
140
|
+
/**
|
|
141
|
+
* How the call runs, where the model wrote it out of form.
|
|
142
|
+
*/
|
|
143
|
+
repaired?: Repaired;
|
|
294
144
|
type: 'call.prepared';
|
|
295
145
|
} | {
|
|
296
146
|
callId: string;
|
|
@@ -426,6 +276,10 @@ type Entry = {
|
|
|
426
276
|
watermark: string;
|
|
427
277
|
rounds: number;
|
|
428
278
|
type: 'compaction.cleared';
|
|
279
|
+
} | {
|
|
280
|
+
callId: string;
|
|
281
|
+
chars: number;
|
|
282
|
+
type: 'compaction.clipped';
|
|
429
283
|
} | {
|
|
430
284
|
tailStart: string;
|
|
431
285
|
summary: string;
|
|
@@ -488,7 +342,7 @@ type RootKind = 'home' | 'workspace' | 'project' | 'memory' | 'skill' | 'folder'
|
|
|
488
342
|
*/
|
|
489
343
|
type PermissionLevel = 'manual' | 'auto' | 'skip' | 'bypass';
|
|
490
344
|
type ModelLocation = 'local' | 'lan' | 'cloud';
|
|
491
|
-
type StopReason = ('end_turn' | 'length' | 'budget' | 'cancelled' | 'error' | 'refused' | 'app_disabled' | 'app_update' | 'interrupted') | 'no_result';
|
|
345
|
+
type StopReason = ('end_turn' | 'length' | 'budget' | 'cancelled' | 'error' | 'refused' | 'app_disabled' | 'app_update' | 'interrupted') | 'no_result' | 'repeated';
|
|
492
346
|
/**
|
|
493
347
|
* A part of a user message.
|
|
494
348
|
*/
|
|
@@ -550,6 +404,14 @@ type AgentPart = {
|
|
|
550
404
|
kind: 'reasoning';
|
|
551
405
|
};
|
|
552
406
|
type AgentStop = 'end_turn' | 'tool_calls' | 'length' | 'cancelled' | 'error' | 'refused' | 'interrupted';
|
|
407
|
+
/**
|
|
408
|
+
* Why an attempt was sent again: its reply held no words and no call, the
|
|
409
|
+
* provider failed in a way that passes before any token, the request did
|
|
410
|
+
* not fit the runtime's window, or, and the attempt sent again carried a
|
|
411
|
+
* reminder, the reply announced a step and made no call, or it stated
|
|
412
|
+
* figures that nothing it was given holds and no program ran in the turn.
|
|
413
|
+
*/
|
|
414
|
+
type RetryReason = 'empty' | 'transient' | 'overflow' | 'announced' | 'figures';
|
|
553
415
|
/**
|
|
554
416
|
* A transcript mark an app's manifest names for a tool.
|
|
555
417
|
*/
|
|
@@ -612,15 +474,20 @@ type EnvironmentKind = 'process' | 'vm';
|
|
|
612
474
|
* manifest's order, placed in the rail or a tab: a `web` surface's own
|
|
613
475
|
* page, or the web page of a view's tab. `navigate` loads an address in
|
|
614
476
|
* the session's tab, opening it when the session has none, hidden for a
|
|
615
|
-
* view's tab; `evaluate` runs a script and answers its value;
|
|
616
|
-
*
|
|
617
|
-
*
|
|
477
|
+
* view's tab; `evaluate` runs a script and answers its value; `click`
|
|
478
|
+
* presses the left button at a point of the page's viewport, in its CSS
|
|
479
|
+
* pixels; `type` types text into the element with focus; `press` presses
|
|
480
|
+
* a key or a combination such as `Control+a`, but none that pastes, since
|
|
481
|
+
* a page may not read the clipboard; `screenshot` answers the page as an
|
|
482
|
+
* asset; `show` puts the tab in front of the person; `close` ends it. The
|
|
483
|
+
* page receives `click`, `type` and `press` as the person's own input,
|
|
484
|
+
* which its scripts cannot tell apart from a person's.
|
|
618
485
|
*/
|
|
619
|
-
type SurfaceOp = 'navigate' | 'evaluate' | 'screenshot' | 'show' | 'close';
|
|
486
|
+
type SurfaceOp = 'navigate' | 'evaluate' | 'click' | 'type' | 'press' | 'screenshot' | 'show' | 'close';
|
|
620
487
|
/**
|
|
621
488
|
* One setting's value.
|
|
622
489
|
*/
|
|
623
|
-
type SettingValue = string | number | boolean;
|
|
490
|
+
type SettingValue = string | number | boolean | string[];
|
|
624
491
|
/**
|
|
625
492
|
* What a model card answers on, and what a job runs: a role word of
|
|
626
493
|
* the runtimes, such as chat, embedding, image or transcription.
|
|
@@ -683,7 +550,6 @@ type NetworkEntry = string;
|
|
|
683
550
|
*/
|
|
684
551
|
type ListenPort = number;
|
|
685
552
|
type Lifetime = 'service';
|
|
686
|
-
type Reasoning = 'none' | 'auto' | 'high';
|
|
687
553
|
/**
|
|
688
554
|
* A relative path inside the package, forward slashes, never leaving it.
|
|
689
555
|
*/
|
|
@@ -722,6 +588,7 @@ type TriggerDeclaration = {
|
|
|
722
588
|
name: string;
|
|
723
589
|
keys?: string;
|
|
724
590
|
hold?: boolean;
|
|
591
|
+
armed?: boolean;
|
|
725
592
|
kind: 'hotkey';
|
|
726
593
|
} | {
|
|
727
594
|
name: string;
|
|
@@ -800,13 +667,12 @@ type SystemEvent = 'idle' | 'active' | 'lock' | 'unlock' | 'sleep' | 'wake' | 'p
|
|
|
800
667
|
* `events`, `models`, `jobs` and `peers` alike, each only when its app
|
|
801
668
|
* names it here. An agent's core tools need no namespace here.
|
|
802
669
|
*/
|
|
803
|
-
type Uses = ('sessions' | 'sessions.create' | 'secrets' | 'notifications' | 'readers' | 'roots' | 'exec' | 'catalogue' | 'surface' | 'store' | 'db' | 'events' | 'models' | 'jobs' | 'terminals' | 'files.open' | 'surfaces.open' | 'peers' | 'index' | 'capture.microphone' | 'capture.system-sound' | 'capture.program-sound' | 'capture.screen' | 'capture.window' | 'capture.camera' | 'desktop.context' | 'desktop.actions') | 'net.ask' | 'desktop.overlay' | 'input.controller' | 'system.state';
|
|
670
|
+
type Uses = ('sessions' | 'sessions.create' | 'secrets' | 'notifications' | 'readers' | 'roots' | 'exec' | 'catalogue' | 'surface' | 'store' | 'db' | 'events' | 'models' | 'jobs' | 'terminals' | 'files.open' | 'surfaces.open' | 'peers' | 'index' | 'capture.microphone' | 'capture.system-sound' | 'capture.program-sound' | 'capture.screen' | 'capture.window' | 'capture.camera' | 'desktop.context' | 'desktop.actions') | 'net.ask' | 'desktop.around' | 'desktop.overlay' | 'input.controller' | 'system.state';
|
|
804
671
|
/**
|
|
805
|
-
* The model an introduction card downloads on this computer's Server:
|
|
806
|
-
*
|
|
807
|
-
* Hugging Face repository.
|
|
672
|
+
* The model an introduction card downloads on this computer's Server: a
|
|
673
|
+
* file of a Hugging Face repository, or the best model of a kind.
|
|
808
674
|
*/
|
|
809
|
-
type OnboardingDownload =
|
|
675
|
+
type OnboardingDownload = HubFile | BestModel;
|
|
810
676
|
/**
|
|
811
677
|
* What a surface is: `view`, an MCP Apps document in a sandboxed frame,
|
|
812
678
|
* which may reserve slots for the chat the shell draws for the app's own
|
|
@@ -952,6 +818,22 @@ type SettingDeclaration = {
|
|
|
952
818
|
minLength?: number;
|
|
953
819
|
maxLength?: number;
|
|
954
820
|
pattern?: string;
|
|
821
|
+
/**
|
|
822
|
+
* The tool that lists the values to pick from, for a list only the
|
|
823
|
+
* computer knows, such as its microphones. It is called with `{}` and
|
|
824
|
+
* answers `{ options: [{ value, label }] }`. The page calls it with no
|
|
825
|
+
* press, so it is one the app declares, its views may call, and that
|
|
826
|
+
* neither changes anything nor reaches out.
|
|
827
|
+
*/
|
|
828
|
+
optionsFrom?: string;
|
|
829
|
+
/**
|
|
830
|
+
* The field takes several lines.
|
|
831
|
+
*/
|
|
832
|
+
multiline?: boolean;
|
|
833
|
+
/**
|
|
834
|
+
* What the empty field shows.
|
|
835
|
+
*/
|
|
836
|
+
placeholder?: string;
|
|
955
837
|
/**
|
|
956
838
|
* The value the platform holds until the person changes it.
|
|
957
839
|
*/
|
|
@@ -991,19 +873,56 @@ type SettingDeclaration = {
|
|
|
991
873
|
*/
|
|
992
874
|
default: number;
|
|
993
875
|
type: 'integer';
|
|
876
|
+
} | {
|
|
877
|
+
/**
|
|
878
|
+
* The setting's label.
|
|
879
|
+
*/
|
|
880
|
+
title: string;
|
|
881
|
+
/**
|
|
882
|
+
* The tooltip of the setting's row.
|
|
883
|
+
*/
|
|
884
|
+
description?: string;
|
|
885
|
+
items: ListSettingItems;
|
|
886
|
+
maxItems?: number;
|
|
887
|
+
/**
|
|
888
|
+
* What the empty field shows.
|
|
889
|
+
*/
|
|
890
|
+
placeholder?: string;
|
|
891
|
+
/**
|
|
892
|
+
* The value the platform holds until the person changes it.
|
|
893
|
+
*/
|
|
894
|
+
default: string[];
|
|
895
|
+
type: 'array';
|
|
994
896
|
};
|
|
995
897
|
/**
|
|
996
|
-
*
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
898
|
+
* The one type a list setting's entries have.
|
|
899
|
+
*/
|
|
900
|
+
type StringType = 'string';
|
|
901
|
+
/**
|
|
902
|
+
* One row of a settings group: a setting by its name, with a button at the
|
|
903
|
+
* end of its row where it names one, or a button alone. A button calls one of
|
|
904
|
+
* the app's tools with `{}`. A tool whose result names a view opens that view
|
|
905
|
+
* in a modal over the settings; any other shows its text in a tooltip of the
|
|
906
|
+
* button.
|
|
1000
907
|
*/
|
|
1001
908
|
type SettingsItem = {
|
|
1002
909
|
property: string;
|
|
910
|
+
/**
|
|
911
|
+
* The row shows only while another setting holds a value.
|
|
912
|
+
*/
|
|
913
|
+
when?: SettingsWhen;
|
|
914
|
+
/**
|
|
915
|
+
* The buttons beside the setting's control, in their order. A list or a
|
|
916
|
+
* field of several lines fills its row and takes none.
|
|
917
|
+
*
|
|
918
|
+
* @minItems 1
|
|
919
|
+
*/
|
|
920
|
+
actions?: SettingsAction[];
|
|
1003
921
|
kind: 'property';
|
|
1004
922
|
} | {
|
|
1005
923
|
tool: string;
|
|
1006
924
|
title: string;
|
|
925
|
+
confirm?: SettingsConfirm;
|
|
1007
926
|
kind: 'tool';
|
|
1008
927
|
};
|
|
1009
928
|
/**
|
|
@@ -1057,7 +976,7 @@ type CompletionOption = 'logprobs' | 'topLogprobs' | 'topK' | 'minP' | 'grammar'
|
|
|
1057
976
|
* The kinds of model an app's Discover search lists, each a `HubTask` word
|
|
1058
977
|
* of the inference contract. Draft weights and upscalers have none.
|
|
1059
978
|
*/
|
|
1060
|
-
type DiscoverTask = 'text' | 'image' | 'transcription' | 'diarization' | 'separation' | 'speech' | 'music' | 'embedding' | 'rerank' | 'adapter' | 'all';
|
|
979
|
+
type DiscoverTask = 'text' | 'image' | 'video' | 'transcription' | 'diarization' | 'separation' | 'speech' | 'music' | 'embedding' | 'rerank' | 'adapter' | 'all';
|
|
1061
980
|
/**
|
|
1062
981
|
* What an app asks to install on a Hearthscale Server: a card a Server
|
|
1063
982
|
* lists and does not hold, by its id, or a file of a Hugging Face
|
|
@@ -1164,6 +1083,11 @@ type ResourceWriteResult = {
|
|
|
1164
1083
|
* commit with its first parent.
|
|
1165
1084
|
*/
|
|
1166
1085
|
type VcsScope = 'working' | 'staged' | 'branch' | 'commit';
|
|
1086
|
+
/**
|
|
1087
|
+
* The parts of a search: the words of the passages and the names of the
|
|
1088
|
+
* files, the meanings, and the rerank model's order of the best.
|
|
1089
|
+
*/
|
|
1090
|
+
type IndexLeg = 'words' | 'vectors' | 'rerank';
|
|
1167
1091
|
/**
|
|
1168
1092
|
* What a transcription stream tells an app's backend: the open
|
|
1169
1093
|
* segment's text so far, a segment's final text with its start and end in
|
|
@@ -1177,6 +1101,10 @@ type ListenEvent = {
|
|
|
1177
1101
|
stream: string;
|
|
1178
1102
|
index: number;
|
|
1179
1103
|
text: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* The words after `text` that may still change.
|
|
1106
|
+
*/
|
|
1107
|
+
tentative?: string;
|
|
1180
1108
|
type: 'partial';
|
|
1181
1109
|
} | {
|
|
1182
1110
|
stream: string;
|
|
@@ -1205,7 +1133,7 @@ type NoticeAction = {
|
|
|
1205
1133
|
title: string;
|
|
1206
1134
|
id: string;
|
|
1207
1135
|
};
|
|
1208
|
-
type HotkeyPhase = 'pressed' | 'released';
|
|
1136
|
+
type HotkeyPhase = ('pressed' | 'released') | 'cancelled';
|
|
1209
1137
|
type DeviceEvent = 'connected' | 'removed';
|
|
1210
1138
|
type PowerSource = 'ac' | 'battery';
|
|
1211
1139
|
/**
|
|
@@ -1301,7 +1229,8 @@ interface ToolCall {
|
|
|
1301
1229
|
id: string;
|
|
1302
1230
|
name: string;
|
|
1303
1231
|
/**
|
|
1304
|
-
* JSON-encoded arguments
|
|
1232
|
+
* JSON-encoded arguments. A reply the log keeps holds each call as it
|
|
1233
|
+
* runs; its `call.prepared` keeps what the model wrote.
|
|
1305
1234
|
*/
|
|
1306
1235
|
arguments: string;
|
|
1307
1236
|
}
|
|
@@ -1312,8 +1241,20 @@ interface ToolCall {
|
|
|
1312
1241
|
interface Usage {
|
|
1313
1242
|
input: number;
|
|
1314
1243
|
output: number;
|
|
1244
|
+
/**
|
|
1245
|
+
* The tokens of `output` the model spent reasoning, where the runtime
|
|
1246
|
+
* states them.
|
|
1247
|
+
*/
|
|
1248
|
+
reasoning?: number;
|
|
1315
1249
|
estimated?: true;
|
|
1316
1250
|
}
|
|
1251
|
+
/**
|
|
1252
|
+
* An attempt of a round that was thrown away and sent again, and when.
|
|
1253
|
+
*/
|
|
1254
|
+
interface Retry {
|
|
1255
|
+
reason: RetryReason;
|
|
1256
|
+
at: string;
|
|
1257
|
+
}
|
|
1317
1258
|
/**
|
|
1318
1259
|
* What every tool call, session write and job carries: who acts, where
|
|
1319
1260
|
* the words came from, and the chain of principals the call crossed,
|
|
@@ -1346,6 +1287,20 @@ interface CallSource {
|
|
|
1346
1287
|
id: string;
|
|
1347
1288
|
name: string;
|
|
1348
1289
|
}
|
|
1290
|
+
/**
|
|
1291
|
+
* A call the model wrote out of form, as it runs: the tool's name where
|
|
1292
|
+
* the model wrote it in another case or with `-` for `_`, and the
|
|
1293
|
+
* arguments read as a JSON object of the types the tool's schema names.
|
|
1294
|
+
* `written` marks a call written in the words of the reply.
|
|
1295
|
+
*/
|
|
1296
|
+
interface Repaired {
|
|
1297
|
+
name: string;
|
|
1298
|
+
/**
|
|
1299
|
+
* JSON-encoded.
|
|
1300
|
+
*/
|
|
1301
|
+
arguments: string;
|
|
1302
|
+
written?: true;
|
|
1303
|
+
}
|
|
1349
1304
|
interface Executor {
|
|
1350
1305
|
principal: PrincipalRef;
|
|
1351
1306
|
instance: string;
|
|
@@ -1441,6 +1396,15 @@ interface AskFacts {
|
|
|
1441
1396
|
*/
|
|
1442
1397
|
label?: string;
|
|
1443
1398
|
arguments?: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* On a card of an app's or a connector's tool: what the call would do,
|
|
1401
|
+
* in one sentence the utility model wrote once the card was open.
|
|
1402
|
+
*/
|
|
1403
|
+
plain?: string;
|
|
1404
|
+
/**
|
|
1405
|
+
* The utility model is still writing `plain`.
|
|
1406
|
+
*/
|
|
1407
|
+
writing?: true;
|
|
1444
1408
|
/**
|
|
1445
1409
|
* The absolute path a file call would touch.
|
|
1446
1410
|
*/
|
|
@@ -1493,9 +1457,10 @@ interface AskFacts {
|
|
|
1493
1457
|
[k: string]: unknown;
|
|
1494
1458
|
};
|
|
1495
1459
|
/**
|
|
1496
|
-
* A connector card: the connector,
|
|
1497
|
-
*
|
|
1498
|
-
*
|
|
1460
|
+
* A connector card: the connector by its id, with the name the person
|
|
1461
|
+
* knows it or its app by in `sourceName`, and the tools waiting on a
|
|
1462
|
+
* bulk card, or the sign-in's issuer, or the device code the person
|
|
1463
|
+
* types at the verification address. An app's sign-in card carries the
|
|
1499
1464
|
* issuer, the scopes, and the code or the sign-in a window starts
|
|
1500
1465
|
* with the authorization endpoint its browser opens.
|
|
1501
1466
|
*/
|
|
@@ -1731,7 +1696,13 @@ interface Manifest {
|
|
|
1731
1696
|
* Semver, shown and never interpreted.
|
|
1732
1697
|
*/
|
|
1733
1698
|
version: string;
|
|
1734
|
-
api:
|
|
1699
|
+
api: 7;
|
|
1700
|
+
/**
|
|
1701
|
+
* The lowest Hearthscale version the package runs on. A Hearthscale
|
|
1702
|
+
* of a lower version refuses the package, and the Marketplace offers
|
|
1703
|
+
* it the newest release it meets.
|
|
1704
|
+
*/
|
|
1705
|
+
hearthscale?: string;
|
|
1735
1706
|
description: string;
|
|
1736
1707
|
icon?: Schemed;
|
|
1737
1708
|
license?: string;
|
|
@@ -1860,6 +1831,11 @@ interface ModelRequirement {
|
|
|
1860
1831
|
*/
|
|
1861
1832
|
recommend?: string[];
|
|
1862
1833
|
sampling?: Sampling;
|
|
1834
|
+
/**
|
|
1835
|
+
* The level the agent's turns think at; a level the person picks for
|
|
1836
|
+
* a conversation goes over it on a model that lists two or more
|
|
1837
|
+
* levels.
|
|
1838
|
+
*/
|
|
1863
1839
|
reasoning?: Reasoning;
|
|
1864
1840
|
}
|
|
1865
1841
|
interface Sampling {
|
|
@@ -1880,6 +1856,17 @@ interface Budget {
|
|
|
1880
1856
|
*/
|
|
1881
1857
|
interface ModelNeed {
|
|
1882
1858
|
required: boolean;
|
|
1859
|
+
/**
|
|
1860
|
+
* The setting that holds the device this kind of model hears, which its
|
|
1861
|
+
* test on the app's page opens.
|
|
1862
|
+
*/
|
|
1863
|
+
input?: string;
|
|
1864
|
+
/**
|
|
1865
|
+
* The tool that says which of a search's models the app recommends: it takes
|
|
1866
|
+
* `{ languages, models }` and answers `{ recommended: [{ repo, word }] }`, the
|
|
1867
|
+
* one it recommends most first. It runs with no press.
|
|
1868
|
+
*/
|
|
1869
|
+
recommend?: string;
|
|
1883
1870
|
/**
|
|
1884
1871
|
* The Hugging Face tasks the kind's card states, every one of them.
|
|
1885
1872
|
*
|
|
@@ -2070,6 +2057,14 @@ interface InstalledCompanionSource {
|
|
|
2070
2057
|
repo: string;
|
|
2071
2058
|
revision: string;
|
|
2072
2059
|
}
|
|
2060
|
+
/**
|
|
2061
|
+
* The model of a kind that the app's own tool recommends, where its manifest
|
|
2062
|
+
* names one, else the first recommended for the user's device, else
|
|
2063
|
+
* the first of a search, found when the card opens.
|
|
2064
|
+
*/
|
|
2065
|
+
interface BestModel {
|
|
2066
|
+
best: ModelKind;
|
|
2067
|
+
}
|
|
2073
2068
|
/**
|
|
2074
2069
|
* A right-click entry of the app's rail button: a call of one of the
|
|
2075
2070
|
* app's tools with these arguments, `{}` when absent. A result that names
|
|
@@ -2102,6 +2097,13 @@ interface SettingsSchema {
|
|
|
2102
2097
|
[k: string]: SettingDeclaration;
|
|
2103
2098
|
};
|
|
2104
2099
|
}
|
|
2100
|
+
/**
|
|
2101
|
+
* The entries of a list setting: strings, each at most `maxLength` long.
|
|
2102
|
+
*/
|
|
2103
|
+
interface ListSettingItems {
|
|
2104
|
+
type: StringType;
|
|
2105
|
+
maxLength?: number;
|
|
2106
|
+
}
|
|
2105
2107
|
interface SettingsGroup {
|
|
2106
2108
|
title: string;
|
|
2107
2109
|
/**
|
|
@@ -2109,6 +2111,29 @@ interface SettingsGroup {
|
|
|
2109
2111
|
*/
|
|
2110
2112
|
items: SettingsItem[];
|
|
2111
2113
|
}
|
|
2114
|
+
/**
|
|
2115
|
+
* A setting and the value that shows a row.
|
|
2116
|
+
*/
|
|
2117
|
+
interface SettingsWhen {
|
|
2118
|
+
property: string;
|
|
2119
|
+
is: unknown;
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2122
|
+
* A button beside a setting's control.
|
|
2123
|
+
*/
|
|
2124
|
+
interface SettingsAction {
|
|
2125
|
+
tool: string;
|
|
2126
|
+
title: string;
|
|
2127
|
+
confirm?: SettingsConfirm;
|
|
2128
|
+
}
|
|
2129
|
+
/**
|
|
2130
|
+
* What a button asks before it runs its tool, for a press that cannot be undone.
|
|
2131
|
+
* The answer that goes ahead carries the button's own title.
|
|
2132
|
+
*/
|
|
2133
|
+
interface SettingsConfirm {
|
|
2134
|
+
title: string;
|
|
2135
|
+
body: string;
|
|
2136
|
+
}
|
|
2112
2137
|
interface Mentions {
|
|
2113
2138
|
tool: string;
|
|
2114
2139
|
}
|
|
@@ -2216,6 +2241,11 @@ interface ModelCard {
|
|
|
2216
2241
|
* states them.
|
|
2217
2242
|
*/
|
|
2218
2243
|
tasks?: string[];
|
|
2244
|
+
/**
|
|
2245
|
+
* What a transcription model's card and file state about it, where its
|
|
2246
|
+
* provider states it.
|
|
2247
|
+
*/
|
|
2248
|
+
speech?: SpeechFacts;
|
|
2219
2249
|
vision?: boolean;
|
|
2220
2250
|
tools?: boolean;
|
|
2221
2251
|
/**
|
|
@@ -2223,6 +2253,21 @@ interface ModelCard {
|
|
|
2223
2253
|
* states it.
|
|
2224
2254
|
*/
|
|
2225
2255
|
reasoning?: boolean;
|
|
2256
|
+
/**
|
|
2257
|
+
* The levels the model thinks at, least first, where its provider
|
|
2258
|
+
* states them.
|
|
2259
|
+
*
|
|
2260
|
+
* Items: How much a model thinks before it answers, least first: `none` is Off and
|
|
2261
|
+
* `max` thinks with no limit. A model that lacks a level runs at the
|
|
2262
|
+
* nearest one it has, the higher of two as near. The inference contract's
|
|
2263
|
+
* `Reasoning`: a Server's `reasoning_effort` takes the same words.
|
|
2264
|
+
*/
|
|
2265
|
+
reasoningLevels?: Reasoning[];
|
|
2266
|
+
/**
|
|
2267
|
+
* The level the model thinks at when a request names none, where its
|
|
2268
|
+
* provider states it.
|
|
2269
|
+
*/
|
|
2270
|
+
reasoningLevel?: Reasoning;
|
|
2226
2271
|
/**
|
|
2227
2272
|
* The job kinds the card runs, by kind word, each with the input it
|
|
2228
2273
|
* takes.
|
|
@@ -2256,23 +2301,60 @@ interface ModelCard {
|
|
|
2256
2301
|
*/
|
|
2257
2302
|
reason?: string;
|
|
2258
2303
|
/**
|
|
2259
|
-
* What loading the card's model, or a job of it, takes now, where a
|
|
2260
|
-
* Server plans it.
|
|
2304
|
+
* What loading the card's model, or a job of it, takes now, where a
|
|
2305
|
+
* Server plans it.
|
|
2306
|
+
*/
|
|
2307
|
+
memory?: MemoryPlan;
|
|
2308
|
+
/**
|
|
2309
|
+
* How much of a downloading card's model has arrived, where its
|
|
2310
|
+
* Server reports it.
|
|
2311
|
+
*/
|
|
2312
|
+
progress?: DownloadProgressBytes;
|
|
2313
|
+
/**
|
|
2314
|
+
* For an adapter whose Server states them, the cards of the models it fits.
|
|
2315
|
+
*/
|
|
2316
|
+
fits?: string[];
|
|
2317
|
+
/**
|
|
2318
|
+
* For an adapter whose Server states them, its prompt trigger words.
|
|
2319
|
+
*/
|
|
2320
|
+
triggers?: string[];
|
|
2321
|
+
/**
|
|
2322
|
+
* The name of a licence that limits commercial use, where a Server's
|
|
2323
|
+
* recommendation states one.
|
|
2324
|
+
*/
|
|
2325
|
+
limitingLicense?: string;
|
|
2326
|
+
/**
|
|
2327
|
+
* How an embedding card's inputs are written, where its Server's
|
|
2328
|
+
* recommendation states it; a card that states none takes its texts
|
|
2329
|
+
* as they are.
|
|
2330
|
+
*/
|
|
2331
|
+
embedding?: Embedding;
|
|
2332
|
+
}
|
|
2333
|
+
/**
|
|
2334
|
+
* How an embedding model's inputs are written. Each template holds
|
|
2335
|
+
* `{text}` where the text goes, and a document's `{title}` where the
|
|
2336
|
+
* document's title goes; a template ends with the model's end token where
|
|
2337
|
+
* its file's tokenizer adds none.
|
|
2338
|
+
*/
|
|
2339
|
+
interface Embedding {
|
|
2340
|
+
/**
|
|
2341
|
+
* A search's words.
|
|
2261
2342
|
*/
|
|
2262
|
-
|
|
2343
|
+
query: string;
|
|
2263
2344
|
/**
|
|
2264
|
-
*
|
|
2265
|
-
* Server reports it.
|
|
2345
|
+
* A passage of a document with a title.
|
|
2266
2346
|
*/
|
|
2267
|
-
|
|
2347
|
+
document: string;
|
|
2268
2348
|
/**
|
|
2269
|
-
*
|
|
2349
|
+
* A passage of a document with no title, where it is not `document`
|
|
2350
|
+
* with an empty title.
|
|
2270
2351
|
*/
|
|
2271
|
-
|
|
2352
|
+
untitled?: string;
|
|
2272
2353
|
/**
|
|
2273
|
-
*
|
|
2354
|
+
* The length its vectors are cut to, where it is used shorter than it
|
|
2355
|
+
* embeds.
|
|
2274
2356
|
*/
|
|
2275
|
-
|
|
2357
|
+
dimensions?: number;
|
|
2276
2358
|
}
|
|
2277
2359
|
/**
|
|
2278
2360
|
* A Hearthscale Server this computer names, as `ctx.models.servers` and
|
|
@@ -2299,6 +2381,11 @@ interface HubSearch {
|
|
|
2299
2381
|
* The order of a Discover search: the inference contract's `HubSort`.
|
|
2300
2382
|
*/
|
|
2301
2383
|
sort?: HubSort;
|
|
2384
|
+
/**
|
|
2385
|
+
* The short codes of the languages a speech model must hear, with commas
|
|
2386
|
+
* between them.
|
|
2387
|
+
*/
|
|
2388
|
+
language?: string;
|
|
2302
2389
|
}
|
|
2303
2390
|
/**
|
|
2304
2391
|
* A file of a Hugging Face repository to install on a Hearthscale Server,
|
|
@@ -2402,6 +2489,12 @@ interface CompletionRequest {
|
|
|
2402
2489
|
*/
|
|
2403
2490
|
format?: CompletionFormat;
|
|
2404
2491
|
sampling?: Sampling;
|
|
2492
|
+
/**
|
|
2493
|
+
* How much a model thinks before it answers, least first: `none` is Off and
|
|
2494
|
+
* `max` thinks with no limit. A model that lacks a level runs at the
|
|
2495
|
+
* nearest one it has, the higher of two as near. The inference contract's
|
|
2496
|
+
* `Reasoning`: a Server's `reasoning_effort` takes the same words.
|
|
2497
|
+
*/
|
|
2405
2498
|
reasoning?: Reasoning;
|
|
2406
2499
|
/**
|
|
2407
2500
|
* Asks for the same answer to the same request as far as the runtime
|
|
@@ -2435,6 +2528,10 @@ interface ChatMessage {
|
|
|
2435
2528
|
content: ChatContent;
|
|
2436
2529
|
toolCalls?: ToolCall[];
|
|
2437
2530
|
toolCallId?: string;
|
|
2531
|
+
/**
|
|
2532
|
+
* The reasoning of a reply of the turn the request continues.
|
|
2533
|
+
*/
|
|
2534
|
+
reasoning?: string;
|
|
2438
2535
|
}
|
|
2439
2536
|
/**
|
|
2440
2537
|
* One tool as a model sees it.
|
|
@@ -2667,6 +2764,16 @@ interface Session {
|
|
|
2667
2764
|
* The card the next turn uses, when a person chose one.
|
|
2668
2765
|
*/
|
|
2669
2766
|
model?: string;
|
|
2767
|
+
/**
|
|
2768
|
+
* The level the next turn thinks at, when a person chose one and the
|
|
2769
|
+
* model lists two or more levels.
|
|
2770
|
+
*/
|
|
2771
|
+
reasoning?: Reasoning;
|
|
2772
|
+
/**
|
|
2773
|
+
* The id of the index's place the agent's `file_search` reads in, when a
|
|
2774
|
+
* person chose one.
|
|
2775
|
+
*/
|
|
2776
|
+
place?: string;
|
|
2670
2777
|
createdAt: string;
|
|
2671
2778
|
updatedAt: string;
|
|
2672
2779
|
status: SessionStatus;
|
|
@@ -2893,15 +3000,76 @@ interface IndexPage {
|
|
|
2893
3000
|
}
|
|
2894
3001
|
/**
|
|
2895
3002
|
* One answer of a search of the shared index: the passage, the document
|
|
2896
|
-
* it came from and its page, and how well it answers the query.
|
|
3003
|
+
* it came from and its page, and how well it answers the query. A
|
|
3004
|
+
* passage of a file in a place has the file's absolute path as its
|
|
3005
|
+
* source and the place's id; a file that answers by its name alone has
|
|
3006
|
+
* a line of its name, folder, size and date as its text.
|
|
2897
3007
|
*/
|
|
2898
3008
|
interface IndexHit {
|
|
3009
|
+
/**
|
|
3010
|
+
* Names the passage while it is in the index.
|
|
3011
|
+
*/
|
|
3012
|
+
id: string;
|
|
2899
3013
|
source: string;
|
|
2900
3014
|
title?: string;
|
|
2901
3015
|
page?: number;
|
|
3016
|
+
/**
|
|
3017
|
+
* What a person calls the page, such as `Slide 4` or a sheet's name.
|
|
3018
|
+
*/
|
|
3019
|
+
label?: string;
|
|
3020
|
+
/**
|
|
3021
|
+
* The first and the last line of the passage on its page, from 1.
|
|
3022
|
+
*/
|
|
3023
|
+
start?: number;
|
|
3024
|
+
end?: number;
|
|
3025
|
+
place?: string;
|
|
2902
3026
|
text: string;
|
|
2903
3027
|
score: number;
|
|
2904
3028
|
}
|
|
3029
|
+
/**
|
|
3030
|
+
* The body of `POST /index/search`: a search of every place the caller
|
|
3031
|
+
* may read, the person's reach for a window and the app's for a view.
|
|
3032
|
+
*/
|
|
3033
|
+
interface IndexSearchRequest {
|
|
3034
|
+
query: string;
|
|
3035
|
+
/**
|
|
3036
|
+
* Ten when none is named.
|
|
3037
|
+
*/
|
|
3038
|
+
limit?: number;
|
|
3039
|
+
legs?: IndexLegs;
|
|
3040
|
+
/**
|
|
3041
|
+
* The id of the one place to search in.
|
|
3042
|
+
*/
|
|
3043
|
+
place?: string;
|
|
3044
|
+
/**
|
|
3045
|
+
* The query is a phrase a passage holds word for word; only the words
|
|
3046
|
+
* leg runs.
|
|
3047
|
+
*/
|
|
3048
|
+
phrase?: boolean;
|
|
3049
|
+
}
|
|
3050
|
+
/**
|
|
3051
|
+
* The legs a search runs; a search with none named runs each.
|
|
3052
|
+
*/
|
|
3053
|
+
interface IndexLegs {
|
|
3054
|
+
words: boolean;
|
|
3055
|
+
vectors: boolean;
|
|
3056
|
+
rerank: boolean;
|
|
3057
|
+
}
|
|
3058
|
+
/**
|
|
3059
|
+
* The answer of a search: its hits, best first, and each leg it could
|
|
3060
|
+
* not run.
|
|
3061
|
+
*/
|
|
3062
|
+
interface IndexSearch {
|
|
3063
|
+
hits: IndexHit[];
|
|
3064
|
+
unavailable: IndexUnavailable[];
|
|
3065
|
+
}
|
|
3066
|
+
/**
|
|
3067
|
+
* A leg the search was asked to run and could not, with the reason.
|
|
3068
|
+
*/
|
|
3069
|
+
interface IndexUnavailable {
|
|
3070
|
+
leg: IndexLeg;
|
|
3071
|
+
reason: string;
|
|
3072
|
+
}
|
|
2905
3073
|
/**
|
|
2906
3074
|
* One enabled app as `apps.list` lists it.
|
|
2907
3075
|
*/
|
|
@@ -2995,9 +3163,10 @@ interface AppSkill {
|
|
|
2995
3163
|
interface HotkeyState {
|
|
2996
3164
|
name: string;
|
|
2997
3165
|
/**
|
|
2998
|
-
* The keys
|
|
2999
|
-
*
|
|
3000
|
-
*
|
|
3166
|
+
* The keys the hotkey names, the person's or else the declared ones;
|
|
3167
|
+
* none where neither names any, or where another app's hotkey holds
|
|
3168
|
+
* them. A hotkey declared with `armed: false` fires them only while
|
|
3169
|
+
* its backend arms it.
|
|
3001
3170
|
*/
|
|
3002
3171
|
keys?: string;
|
|
3003
3172
|
/**
|
|
@@ -3236,6 +3405,236 @@ interface MediaKeyPress {
|
|
|
3236
3405
|
key: MediaKey;
|
|
3237
3406
|
}
|
|
3238
3407
|
|
|
3408
|
+
/**
|
|
3409
|
+
* What a Server asks Hearthscale's api about models and what it answers:
|
|
3410
|
+
* the models that suit one computer, best first for each kind, with the
|
|
3411
|
+
* exact files of each. The Server keeps the last answer on disk.
|
|
3412
|
+
*/
|
|
3413
|
+
|
|
3414
|
+
/** A model's licence: its name, and whether it is open for commercial use. */
|
|
3415
|
+
interface OfferedLicense {
|
|
3416
|
+
name: string;
|
|
3417
|
+
commercial: boolean;
|
|
3418
|
+
}
|
|
3419
|
+
|
|
3420
|
+
/**
|
|
3421
|
+
* Control: the first-party half of the inference contract — everything the
|
|
3422
|
+
* OpenAI shape cannot express. Served by the Server (`hearthd`) beside the
|
|
3423
|
+
* generation routes.
|
|
3424
|
+
*/
|
|
3425
|
+
|
|
3426
|
+
/** How much a model thinks before it answers, least first, as a chat
|
|
3427
|
+
* request's `reasoning_effort` names it: `none` is Off and `max` thinks
|
|
3428
|
+
* with no limit. A model that lacks a level runs at the nearest one it
|
|
3429
|
+
* has, the higher of two as near. */
|
|
3430
|
+
type Reasoning = 'none' | 'low' | 'medium' | 'high' | 'max';
|
|
3431
|
+
/** Resolved publisher identity, independent of the model architecture.
|
|
3432
|
+
* `GET /v1/publishers/{owner}/picture` answers the picture of the Hub
|
|
3433
|
+
* user or organisation `repository` names first: its bytes as
|
|
3434
|
+
* `image/png`, `image/jpeg`, `image/webp`, `image/gif` or
|
|
3435
|
+
* `image/svg+xml`, with `cache-control: max-age=86400`. A 404
|
|
3436
|
+
* `invalid_request` says no picture is known for the owner, and a 400
|
|
3437
|
+
* `invalid_request` refuses a name that is not one Hub path segment of
|
|
3438
|
+
* ASCII letters, digits, `-`, `_` and `.`. */
|
|
3439
|
+
interface ModelIdentity {
|
|
3440
|
+
publisher: string;
|
|
3441
|
+
/** The Hub repository whose publisher supplies the artwork; null for other sources. */
|
|
3442
|
+
repository: string | null;
|
|
3443
|
+
}
|
|
3444
|
+
/** What a transcription model's card and file state about it. A list is empty,
|
|
3445
|
+
* and a field null, where neither says. */
|
|
3446
|
+
interface SpeechFacts {
|
|
3447
|
+
/** The languages it hears, by their short codes. */
|
|
3448
|
+
languages: string[];
|
|
3449
|
+
/** The percent of words, or of characters in a language written without
|
|
3450
|
+
* spaces, its publisher measured wrong on a public test set, by language. */
|
|
3451
|
+
errors: Record<string, number>;
|
|
3452
|
+
/** How long 30 s of speech took on a graphics device, as its publisher measured
|
|
3453
|
+
* it on the reference computer most like its Server. */
|
|
3454
|
+
seconds: number | null;
|
|
3455
|
+
/** The same on the processor. */
|
|
3456
|
+
processorSeconds: number | null;
|
|
3457
|
+
/** It writes English from another language. */
|
|
3458
|
+
translates: boolean | null;
|
|
3459
|
+
/** It tells the language by itself. */
|
|
3460
|
+
detects: boolean | null;
|
|
3461
|
+
}
|
|
3462
|
+
/** A job kind a model runs: the JSON Schema (draft-07) of its input, every
|
|
3463
|
+
* object of it closed. A property of `"format": "asset"`, alone or as the
|
|
3464
|
+
* items of an array, names a file by its asset id on the app's side,
|
|
3465
|
+
* `contentMediaType` saying what it takes, and its `description` the
|
|
3466
|
+
* limits the model sets on it; it reaches the Server as a `RenderUpload`
|
|
3467
|
+
* in the same place. A property of `"format": "model"` names another
|
|
3468
|
+
* model of the same Server by its card id; it reaches the Server as that
|
|
3469
|
+
* model's id. A property's `default` is what the model's saved settings
|
|
3470
|
+
* give a job that leaves it out. */
|
|
3471
|
+
interface JobSpec {
|
|
3472
|
+
input: Record<string, unknown>;
|
|
3473
|
+
}
|
|
3474
|
+
/** The plan of a load or a media job against the memory as it stands, in
|
|
3475
|
+
* MiB. A loaded model's process holds the graphics and system memory, and
|
|
3476
|
+
* may fill the growth beside them as it keeps conversations ready; a
|
|
3477
|
+
* job's process holds them at most while it runs. */
|
|
3478
|
+
interface MemoryPlan {
|
|
3479
|
+
graphicsMib: number;
|
|
3480
|
+
systemMib: number;
|
|
3481
|
+
growthMib: number;
|
|
3482
|
+
/** The graphics and system memory together, written as the words write
|
|
3483
|
+
* an amount of memory. */
|
|
3484
|
+
takes: string;
|
|
3485
|
+
/** The context a language model's load takes, shorter than its settings
|
|
3486
|
+
* ask where the memory free now holds no more; absent for a media job. */
|
|
3487
|
+
contextTokens?: number;
|
|
3488
|
+
/** Whether the broker takes the load or the job now: it starts at once,
|
|
3489
|
+
* or once the busy models and jobs it waits for finish. It is the check
|
|
3490
|
+
* a load or a job meets as it starts, on the memory free now, and the
|
|
3491
|
+
* catalogue says it changed when it does. */
|
|
3492
|
+
ready: boolean;
|
|
3493
|
+
/** The plan in words, or why the load cannot start now: the limit that
|
|
3494
|
+
* stops it, the system memory free or what Windows can still commit,
|
|
3495
|
+
* and what the person closes or changes. */
|
|
3496
|
+
words: string;
|
|
3497
|
+
}
|
|
3498
|
+
interface DownloadProgressBytes {
|
|
3499
|
+
receivedBytes: number;
|
|
3500
|
+
totalBytes: number;
|
|
3501
|
+
}
|
|
3502
|
+
/** The order of a Discover search; trending first where `sort` names
|
|
3503
|
+
* none. */
|
|
3504
|
+
type HubSort = 'trending' | 'downloads' | 'likes' | 'updated';
|
|
3505
|
+
/** One Hugging Face repository as Discover lists it: who published it, the
|
|
3506
|
+
* model it quantises, how it is used, and what its header states of its
|
|
3507
|
+
* size, its architecture and its window. */
|
|
3508
|
+
interface HubRepository {
|
|
3509
|
+
identity: ModelIdentity;
|
|
3510
|
+
formats: string[];
|
|
3511
|
+
tasks: string[];
|
|
3512
|
+
repo: string;
|
|
3513
|
+
author: string;
|
|
3514
|
+
/** The repository the weights were quantised from, where the card
|
|
3515
|
+
* names one. */
|
|
3516
|
+
baseModel: string | null;
|
|
3517
|
+
downloads: number;
|
|
3518
|
+
likes: number;
|
|
3519
|
+
/** A gated repository's files are read only with the Hugging Face token
|
|
3520
|
+
* the Server holds. */
|
|
3521
|
+
gated: boolean;
|
|
3522
|
+
updatedAt: string | null;
|
|
3523
|
+
pipeline: string | null;
|
|
3524
|
+
architecture: string | null;
|
|
3525
|
+
params: number | null;
|
|
3526
|
+
contextLength: number | null;
|
|
3527
|
+
vision: boolean;
|
|
3528
|
+
tools: boolean;
|
|
3529
|
+
reasoning: boolean;
|
|
3530
|
+
/** What a speech model's card states about it. */
|
|
3531
|
+
speech: SpeechFacts | null;
|
|
3532
|
+
}
|
|
3533
|
+
/** A file that can fill a companion role: where it is, how big it is, and
|
|
3534
|
+
* whether its checksum is published. */
|
|
3535
|
+
interface CompanionOption {
|
|
3536
|
+
repo: string;
|
|
3537
|
+
path: string;
|
|
3538
|
+
sizeBytes: number;
|
|
3539
|
+
verifiable: boolean;
|
|
3540
|
+
installed?: {
|
|
3541
|
+
modelId: string;
|
|
3542
|
+
path: string;
|
|
3543
|
+
source: {
|
|
3544
|
+
type: string;
|
|
3545
|
+
repo: string;
|
|
3546
|
+
revision: string;
|
|
3547
|
+
};
|
|
3548
|
+
sha256: string;
|
|
3549
|
+
sizeBytes: number;
|
|
3550
|
+
};
|
|
3551
|
+
containsVision?: boolean;
|
|
3552
|
+
/** The licence the recommendations state for a usual part of a family. */
|
|
3553
|
+
license?: OfferedLicense;
|
|
3554
|
+
}
|
|
3555
|
+
/** A companion role of a candidate and the files that fill it. */
|
|
3556
|
+
interface CompanionRole {
|
|
3557
|
+
role: string;
|
|
3558
|
+
label: string;
|
|
3559
|
+
options: CompanionOption[];
|
|
3560
|
+
/** A gated base or encoder repository whose files this caller cannot read. */
|
|
3561
|
+
gated?: string;
|
|
3562
|
+
}
|
|
3563
|
+
/** One file of a repository a pull can name: the whole shard set where it
|
|
3564
|
+
* is a numbered shard, with the weights' projector beside it where the
|
|
3565
|
+
* repository holds one. */
|
|
3566
|
+
interface HubCandidate {
|
|
3567
|
+
/** The model id the pull makes, with the projector a lone one picks. */
|
|
3568
|
+
id: string;
|
|
3569
|
+
/** The name the pulled model goes by where no other model of the
|
|
3570
|
+
* library shares it, as `CatalogModel.label` names it. */
|
|
3571
|
+
name: string;
|
|
3572
|
+
path: string;
|
|
3573
|
+
quantization: string;
|
|
3574
|
+
/** Every byte the pull writes for this file, its set and its projector. */
|
|
3575
|
+
sizeBytes: number;
|
|
3576
|
+
engine: string;
|
|
3577
|
+
/** Whether every byte of it publishes a checksum; a pull refuses the
|
|
3578
|
+
* rest by name rather than downloading them unverified. */
|
|
3579
|
+
verifiable: boolean;
|
|
3580
|
+
/** The files the repository supplies beside the weights. */
|
|
3581
|
+
components: {
|
|
3582
|
+
role: string;
|
|
3583
|
+
label: string;
|
|
3584
|
+
path: string;
|
|
3585
|
+
}[];
|
|
3586
|
+
/** Companion roles whose files the pull selects from compatible installed
|
|
3587
|
+
* components, the model's family or the encoder's own releases. */
|
|
3588
|
+
requires: CompanionRole[];
|
|
3589
|
+
/** The companion roles the model loads where a pull names a file for
|
|
3590
|
+
* them: `llm_vision`, the vision
|
|
3591
|
+
* part of a language model encoder, for a family that reads reference
|
|
3592
|
+
* pictures through it. */
|
|
3593
|
+
offers: CompanionRole[];
|
|
3594
|
+
/** Whether the repository holds vision projectors beside the file. */
|
|
3595
|
+
projector: boolean;
|
|
3596
|
+
/** The projectors to choose from where there is more than one, each
|
|
3597
|
+
* with the model id a pull with it makes. */
|
|
3598
|
+
projectorOptions: {
|
|
3599
|
+
path: string;
|
|
3600
|
+
id: string;
|
|
3601
|
+
sizeBytes: number;
|
|
3602
|
+
verifiable: boolean;
|
|
3603
|
+
}[];
|
|
3604
|
+
/** The task the model serves, as `CatalogRole` names it. */
|
|
3605
|
+
role: string;
|
|
3606
|
+
format: string;
|
|
3607
|
+
/** For an adapter: model ids from a Server, card ids from the platform. */
|
|
3608
|
+
fits?: string[];
|
|
3609
|
+
/** Why the file cannot be pulled, in the Server's words. */
|
|
3610
|
+
reason?: string;
|
|
3611
|
+
}
|
|
3612
|
+
/** `GET /control/discover?task=&q=&sort=` answers the repositories of one
|
|
3613
|
+
* task that `q` matches, or with no `q` the whole set, at most 30, as
|
|
3614
|
+
* `HubRepository[]`; and `GET /control/discover/{owner}/{repo}` one
|
|
3615
|
+
* repository as `HubListing`: the files a runtime of the Server runs, how
|
|
3616
|
+
* many files it publishes in all, so a repository whose listing yields
|
|
3617
|
+
* no candidate is one no runtime there runs, and every file a pull of
|
|
3618
|
+
* another repository's model can name as a companion. Both read Hugging
|
|
3619
|
+
* Face on a person's act and on nothing else, and with no token, so they
|
|
3620
|
+
* reach the public repositories alone; the Server's own window reads the
|
|
3621
|
+
* same answers from `/local/discover`, with the token the person stored. */
|
|
3622
|
+
interface HubListing {
|
|
3623
|
+
repo: string;
|
|
3624
|
+
model: HubRepository;
|
|
3625
|
+
files: number;
|
|
3626
|
+
/** The path of the file a press takes, where one can be taken. */
|
|
3627
|
+
fileToTake: string | null;
|
|
3628
|
+
candidates: HubCandidate[];
|
|
3629
|
+
companions: CompanionOption[];
|
|
3630
|
+
capabilities: {
|
|
3631
|
+
vision: boolean;
|
|
3632
|
+
tools: boolean;
|
|
3633
|
+
reasoning: boolean;
|
|
3634
|
+
tasks: string[];
|
|
3635
|
+
};
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3239
3638
|
/**
|
|
3240
3639
|
* The view bridge: what a view, an app's UI in a sandboxed frame, and its
|
|
3241
3640
|
* host say to each other beyond the MCP Apps standard the view speaks.
|
|
@@ -3470,8 +3869,8 @@ interface HostSlot {
|
|
|
3470
3869
|
project?: string;
|
|
3471
3870
|
/** On a `chat` or `composer` slot: false draws the composer with no
|
|
3472
3871
|
* model picker, for an app whose models are chosen only on its page in
|
|
3473
|
-
* Settings; the rest of the composer's footer
|
|
3474
|
-
* the composer shows the picker. */
|
|
3872
|
+
* Settings; the thinking level and the rest of the composer's footer
|
|
3873
|
+
* keep their places. Absent, the composer shows the picker. */
|
|
3475
3874
|
modelPicker?: boolean;
|
|
3476
3875
|
/** On a `terminal` slot: the folder its shell starts in, inside a folder
|
|
3477
3876
|
* the person gave the view's app. The slot's id, letters, digits, `-`
|
|
@@ -3514,6 +3913,15 @@ type HostSlotNotification =
|
|
|
3514
3913
|
session: string | null;
|
|
3515
3914
|
};
|
|
3516
3915
|
}
|
|
3916
|
+
/** The person asked to go back or forward in the tab, whose web page has
|
|
3917
|
+
* loaded none. Every view that fills a tab hears it, with or without a
|
|
3918
|
+
* slot, and moves through its own places. */
|
|
3919
|
+
| {
|
|
3920
|
+
method: 'hearthscale/ui/history';
|
|
3921
|
+
params: {
|
|
3922
|
+
direction: 'back' | 'forward';
|
|
3923
|
+
};
|
|
3924
|
+
}
|
|
3517
3925
|
/** The tab's web page changed: its address, title, icon, load, history
|
|
3518
3926
|
* or zoom. Sent once when the view starts and at each change. */
|
|
3519
3927
|
| {
|
|
@@ -4313,6 +4721,17 @@ interface ViewExtensionMethods {
|
|
|
4313
4721
|
servers: ModelServer[];
|
|
4314
4722
|
};
|
|
4315
4723
|
};
|
|
4724
|
+
/** The cards Hearthscale recommends of a kind, best first and in every
|
|
4725
|
+
* state, this computer's own Server first. */
|
|
4726
|
+
'hearthscale/models/recommended': {
|
|
4727
|
+
uses: 'models';
|
|
4728
|
+
params: {
|
|
4729
|
+
kind: ModelKind;
|
|
4730
|
+
};
|
|
4731
|
+
result: {
|
|
4732
|
+
cards: ModelCard[];
|
|
4733
|
+
};
|
|
4734
|
+
};
|
|
4316
4735
|
/** A search of a Server's Discover: the public Hugging Face
|
|
4317
4736
|
* repositories of `task` that `search` matches, as that Server answers
|
|
4318
4737
|
* it. Needs a click, as it reads Hugging Face. */
|
|
@@ -4500,6 +4919,15 @@ interface ViewExtensionMethods {
|
|
|
4500
4919
|
};
|
|
4501
4920
|
result: Empty;
|
|
4502
4921
|
};
|
|
4922
|
+
/** A search of the device's file index: the documents the app put and
|
|
4923
|
+
* the files of every place the app may read now, or of the one place
|
|
4924
|
+
* `place` names; the hits best first, and each leg that could not run
|
|
4925
|
+
* with the reason. */
|
|
4926
|
+
'hearthscale/index/search': {
|
|
4927
|
+
uses: 'index';
|
|
4928
|
+
params: IndexSearchRequest;
|
|
4929
|
+
result: IndexSearch;
|
|
4930
|
+
};
|
|
4503
4931
|
}
|
|
4504
4932
|
type ViewExtensionMethod = keyof ViewExtensionMethods;
|
|
4505
4933
|
/** The notifications the host sends a view, each only to a view whose app
|
|
@@ -4712,8 +5140,8 @@ type CapturedPart = {
|
|
|
4712
5140
|
width: number;
|
|
4713
5141
|
height: number;
|
|
4714
5142
|
};
|
|
4715
|
-
/** A transcription stream. The
|
|
4716
|
-
* each part becomes a segment. */
|
|
5143
|
+
/** A transcription stream. The sound is cut at pauses unless `pauses` is
|
|
5144
|
+
* false, and each part becomes a segment. */
|
|
4717
5145
|
interface Listening {
|
|
4718
5146
|
readonly id: string;
|
|
4719
5147
|
/** 16 kHz mono 16-bit little-endian PCM, at most 10 s at a time, such
|
|
@@ -4959,11 +5387,15 @@ interface AppContext {
|
|
|
4959
5387
|
root: string;
|
|
4960
5388
|
path?: string;
|
|
4961
5389
|
}): Promise<boolean>;
|
|
4962
|
-
/** With a hotkey trigger: the keys
|
|
4963
|
-
*
|
|
4964
|
-
*
|
|
4965
|
-
*
|
|
5390
|
+
/** With a hotkey trigger: the keys of each of the app's hotkeys, the
|
|
5391
|
+
* person's or else the declared ones, so the app can show them;
|
|
5392
|
+
* `keys` is absent where none are set or another app's hotkey holds
|
|
5393
|
+
* them, which `takenBy` names. A hotkey declared with `armed: false`
|
|
5394
|
+
* fires its keys only while `arm` holds them. */
|
|
4966
5395
|
hotkeys: {
|
|
5396
|
+
/** Makes a hotkey declared with `armed: false` hold its keys, or lets
|
|
5397
|
+
* them go: at every other moment they reach the program in front. */
|
|
5398
|
+
arm(name: string, on: boolean): Promise<void>;
|
|
4967
5399
|
list(): Promise<HotkeyState[]>;
|
|
4968
5400
|
/** Hears a move of the keys of any of them, with every one as
|
|
4969
5401
|
* `list` answers it. */
|
|
@@ -4997,7 +5429,9 @@ interface AppContext {
|
|
|
4997
5429
|
* taken in milliseconds since the Unix epoch on the computer that
|
|
4998
5430
|
* captures, the clock every capture there shares: a part's moment is
|
|
4999
5431
|
* `startedAt + at`. Sound comes as 16 kHz mono 16-bit PCM in parts of
|
|
5000
|
-
* half a second,
|
|
5432
|
+
* half a second, or `part` ms from 50 to 500 for the microphone and
|
|
5433
|
+
* the computer's sound, one after another, silence included; the last
|
|
5434
|
+
* part may be shorter; the screen, a window and the camera as a JPEG
|
|
5001
5435
|
* picture every `interval` ms (1000 unless named, at least 250), the
|
|
5002
5436
|
* screen cut to `region` when named. `device` names a device of
|
|
5003
5437
|
* `devices`; a window and a program need one. `echo` takes the
|
|
@@ -5016,6 +5450,7 @@ interface AppContext {
|
|
|
5016
5450
|
};
|
|
5017
5451
|
echo?: boolean;
|
|
5018
5452
|
keep?: boolean;
|
|
5453
|
+
part?: number;
|
|
5019
5454
|
}): Promise<{
|
|
5020
5455
|
capture: string;
|
|
5021
5456
|
startedAt: number;
|
|
@@ -5034,10 +5469,21 @@ interface AppContext {
|
|
|
5034
5469
|
}) => void): () => void;
|
|
5035
5470
|
};
|
|
5036
5471
|
/** Other programs on the person's computer: what they show, with
|
|
5037
|
-
* `desktop.context`,
|
|
5038
|
-
* `desktop.actions`. */
|
|
5472
|
+
* `desktop.context`, the text around the cursor, with `desktop.around`,
|
|
5473
|
+
* and typing into the one in front, with `desktop.actions`. */
|
|
5039
5474
|
desktop: {
|
|
5040
5475
|
context(): Promise<DesktopContext>;
|
|
5476
|
+
/** With `desktop.around`: the text around the cursor of the focused field
|
|
5477
|
+
* in the program in front, up to 1024 characters each way. A password
|
|
5478
|
+
* field gives no text and answers `password: true`. Null where the
|
|
5479
|
+
* program does not tell it, or a Hearthscale window has the focus
|
|
5480
|
+
* anywhere but in a view of this app. */
|
|
5481
|
+
around(): Promise<{
|
|
5482
|
+
before: string;
|
|
5483
|
+
selected: string;
|
|
5484
|
+
after: string;
|
|
5485
|
+
password?: true;
|
|
5486
|
+
} | null>;
|
|
5041
5487
|
/** Calls `on('change')` with each change from now on, and keeps the
|
|
5042
5488
|
* backend up. */
|
|
5043
5489
|
watch(): Promise<void>;
|
|
@@ -5046,12 +5492,21 @@ interface AppContext {
|
|
|
5046
5492
|
on(event: 'ended', fn: (ended: {
|
|
5047
5493
|
reason: string;
|
|
5048
5494
|
}) => void): () => void;
|
|
5495
|
+
/** The window in front now, to name to `type` or `paste`, which then
|
|
5496
|
+
* refuse once another window is in front. Null where the system names no
|
|
5497
|
+
* window, as Wayland does: the text then goes to whichever window has the
|
|
5498
|
+
* focus. */
|
|
5499
|
+
front(): Promise<string | null>;
|
|
5049
5500
|
/** Types the text into the focused field of the program in front. */
|
|
5050
|
-
type(text: string
|
|
5501
|
+
type(text: string, options?: {
|
|
5502
|
+
front?: string | null;
|
|
5503
|
+
}): Promise<void>;
|
|
5051
5504
|
/** Pastes the text there through the clipboard, which it restores. */
|
|
5052
|
-
paste(text: string
|
|
5053
|
-
|
|
5054
|
-
|
|
5505
|
+
paste(text: string, options?: {
|
|
5506
|
+
front?: string | null;
|
|
5507
|
+
}): Promise<void>;
|
|
5508
|
+
/** Presses each combination in turn, at most 200, such as `ctrl+a` or
|
|
5509
|
+
* `enter`: a key with `ctrl`, `shift`, `alt` or `meta` before it. */
|
|
5055
5510
|
keys(keys: string[]): Promise<void>;
|
|
5056
5511
|
};
|
|
5057
5512
|
/** With `input.controller`: the person's game controllers, read also
|
|
@@ -5120,8 +5575,8 @@ interface AppContext {
|
|
|
5120
5575
|
reason: string;
|
|
5121
5576
|
}) => void): () => void;
|
|
5122
5577
|
};
|
|
5123
|
-
/** With `index` in `uses`: the
|
|
5124
|
-
* what it put and the
|
|
5578
|
+
/** With `index` in `uses`: the device's index, where the app finds
|
|
5579
|
+
* again what it put and the files of every place it may read. */
|
|
5125
5580
|
index: {
|
|
5126
5581
|
/** Puts a document in place of what was put under its source;
|
|
5127
5582
|
* answers how many passages it holds. */
|
|
@@ -5129,14 +5584,15 @@ interface AppContext {
|
|
|
5129
5584
|
/** Answers whether there was a document under the source. */
|
|
5130
5585
|
remove(source: string): Promise<boolean>;
|
|
5131
5586
|
/** The passages that best answer the query, best first; ten unless
|
|
5132
|
-
* a limit is named.
|
|
5587
|
+
* a limit is named. A passage of a file has the file's absolute path
|
|
5588
|
+
* as its source. */
|
|
5133
5589
|
search(query: string, limit?: number): Promise<IndexHit[]>;
|
|
5134
|
-
/**
|
|
5135
|
-
*
|
|
5136
|
-
*
|
|
5590
|
+
/** Asks for a folder of a mount as a place of the device's index:
|
|
5591
|
+
* the person sees it among the places, and every app that may read
|
|
5592
|
+
* it finds its files. The place stays while the app may read it. */
|
|
5137
5593
|
watch(path: MountPath): Promise<void>;
|
|
5138
|
-
/**
|
|
5139
|
-
*
|
|
5594
|
+
/** Lets go of a place the app asked for; answers whether it had
|
|
5595
|
+
* asked. The place goes once nobody holds it. */
|
|
5140
5596
|
unwatch(path: MountPath): Promise<boolean>;
|
|
5141
5597
|
};
|
|
5142
5598
|
/** With `notifications` in `uses`: a system notification. A press
|
|
@@ -5225,6 +5681,11 @@ interface AppContext {
|
|
|
5225
5681
|
task?: string;
|
|
5226
5682
|
state?: CardState;
|
|
5227
5683
|
}): Promise<ModelList>;
|
|
5684
|
+
/** The cards Hearthscale recommends of a kind for each Server's computer,
|
|
5685
|
+
* best first and in every state, this computer's own Server first. A card
|
|
5686
|
+
* a Server does not hold yet goes to `install` by its id. Empty where a
|
|
5687
|
+
* Server has no answer. */
|
|
5688
|
+
recommended(kind: ModelKind): Promise<ModelCard[]>;
|
|
5228
5689
|
/** The Hearthscale Servers this app may install on: this computer's
|
|
5229
5690
|
* first, then each paired one, with whether each serves now. */
|
|
5230
5691
|
servers(): Promise<ModelServer[]>;
|
|
@@ -5269,15 +5730,28 @@ interface AppContext {
|
|
|
5269
5730
|
* the reason none can: this app's, or another app's under the
|
|
5270
5731
|
* `sessions.create` grant. */
|
|
5271
5732
|
effective(kind: ModelKind, app?: string): Promise<EffectiveModel>;
|
|
5733
|
+
/** The languages the person speaks to this app, as short codes, as they
|
|
5734
|
+
* chose them on its page; empty where they chose none. */
|
|
5735
|
+
languages(): Promise<string[]>;
|
|
5272
5736
|
/** Opens a stream on the transcription card `model` names, or else on
|
|
5273
5737
|
* the app's transcription model, which runs on a Hearthscale Server:
|
|
5274
5738
|
* the sound written in goes out as text while it is spoken. Rejects
|
|
5275
|
-
* when the model is not on a Server. `words` are
|
|
5276
|
-
*
|
|
5739
|
+
* when the model is not on a Server. `words` are names and terms the
|
|
5740
|
+
* sound holds, which an engine that takes hints favours and the text of
|
|
5741
|
+
* any other is corrected to. `aliases` names, for a term, what the model
|
|
5742
|
+
* may write for it. With `pauses: false`, a pause ends no segment, and
|
|
5743
|
+
* one segment runs until `end`. `translate` writes English on a model
|
|
5744
|
+
* that translates, or not, over the setting the person saved on the
|
|
5745
|
+
* model; any other model writes what it hears. `filterSilence` leaves
|
|
5746
|
+
* out the sound that holds no voice. */
|
|
5277
5747
|
listen(options?: {
|
|
5278
5748
|
language?: string;
|
|
5279
5749
|
model?: string;
|
|
5280
5750
|
words?: string[];
|
|
5751
|
+
aliases?: Record<string, string[]>;
|
|
5752
|
+
pauses?: boolean;
|
|
5753
|
+
translate?: boolean;
|
|
5754
|
+
filterSilence?: boolean;
|
|
5281
5755
|
}): Promise<Listening>;
|
|
5282
5756
|
};
|
|
5283
5757
|
/** With `sessions.create`: the projects of an app this one may start
|