@hearthscale/app 0.2.3 → 0.2.4
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/dist/index.d.ts +67 -27
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -16,9 +16,10 @@ interface ModelIdentity {
|
|
|
16
16
|
* items of an array, names a file by its asset id on the app's side,
|
|
17
17
|
* `contentMediaType` saying what it takes, and its `description` the
|
|
18
18
|
* limits the model sets on it; it reaches the Server as a `RenderUpload`
|
|
19
|
-
* in the same place. A property
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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. */
|
|
22
23
|
interface JobSpec {
|
|
23
24
|
input: Record<string, unknown>;
|
|
24
25
|
}
|
|
@@ -86,6 +87,26 @@ interface CompanionOption {
|
|
|
86
87
|
path: string;
|
|
87
88
|
sizeBytes: number;
|
|
88
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;
|
|
89
110
|
}
|
|
90
111
|
/** One file of a repository a pull can name: the whole shard set where it
|
|
91
112
|
* is a numbered shard, with the weights' projector beside it where the
|
|
@@ -110,23 +131,14 @@ interface HubCandidate {
|
|
|
110
131
|
label: string;
|
|
111
132
|
path: string;
|
|
112
133
|
}[];
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
115
|
-
|
|
116
|
-
requires: {
|
|
117
|
-
role: string;
|
|
118
|
-
label: string;
|
|
119
|
-
options: CompanionOption[];
|
|
120
|
-
}[];
|
|
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[];
|
|
121
137
|
/** The companion roles the model loads where a pull names a file for
|
|
122
|
-
* them
|
|
138
|
+
* them: `llm_vision`, the vision
|
|
123
139
|
* part of a language model encoder, for a family that reads reference
|
|
124
140
|
* pictures through it. */
|
|
125
|
-
offers:
|
|
126
|
-
role: string;
|
|
127
|
-
label: string;
|
|
128
|
-
options: CompanionOption[];
|
|
129
|
-
}[];
|
|
141
|
+
offers: CompanionRole[];
|
|
130
142
|
/** Whether the repository holds vision projectors beside the file. */
|
|
131
143
|
projector: boolean;
|
|
132
144
|
/** The projectors to choose from where there is more than one, each
|
|
@@ -140,6 +152,8 @@ interface HubCandidate {
|
|
|
140
152
|
/** The task the model serves, as `CatalogRole` names it. */
|
|
141
153
|
role: string;
|
|
142
154
|
format: string;
|
|
155
|
+
/** For an adapter: model ids from a Server, card ids from the platform. */
|
|
156
|
+
fits?: string[];
|
|
143
157
|
/** Why the file cannot be pulled, in the Server's words. */
|
|
144
158
|
reason?: string;
|
|
145
159
|
}
|
|
@@ -544,9 +558,11 @@ type SourceKind = 'app' | 'connector';
|
|
|
544
558
|
type ToolOutcome = 'completed' | 'failed' | 'cancelled' | 'skipped' | 'unknown';
|
|
545
559
|
type Decision = 'run' | 'refused';
|
|
546
560
|
/**
|
|
547
|
-
* Who or what let a call run, or refused it.
|
|
561
|
+
* Who or what let a call run, or refused it. A call whose arguments name
|
|
562
|
+
* no path the tool takes is refused by its path, in words that say how to
|
|
563
|
+
* name one.
|
|
548
564
|
*/
|
|
549
|
-
type DecisionBy = 'level' | 'silent' | 'grant' | 'fence' | 'judge' | 'review' | 'person' | 'floor';
|
|
565
|
+
type DecisionBy = 'level' | 'silent' | 'grant' | 'fence' | 'judge' | 'review' | 'person' | 'floor' | 'path';
|
|
550
566
|
type Risk = 'low' | 'high' | 'too_destructive';
|
|
551
567
|
type Authorisation = 'explicitly_no' | 'neutral' | 'explicitly_yes';
|
|
552
568
|
/**
|
|
@@ -1038,15 +1054,10 @@ type ProviderStatus = ('ready' | 'unreachable' | 'unauthenticated' | 'error') |
|
|
|
1038
1054
|
*/
|
|
1039
1055
|
type CompletionOption = 'logprobs' | 'topLogprobs' | 'topK' | 'minP' | 'grammar' | 'stop' | 'seed';
|
|
1040
1056
|
/**
|
|
1041
|
-
* The kinds of model an app's Discover search lists, each a
|
|
1042
|
-
* the inference contract
|
|
1043
|
-
* requests: chat models in GGUF, one word for each kind of media and
|
|
1044
|
-
* vector model a runtime of the Server installs from Hugging Face, and
|
|
1045
|
-
* every format a runtime of the Server reads. Draft weights, which load
|
|
1046
|
-
* only beside another model, are none of them, and an upscaler, which the
|
|
1047
|
-
* Server takes from its catalogue alone, has no word.
|
|
1057
|
+
* The kinds of model an app's Discover search lists, each a `HubTask` word
|
|
1058
|
+
* of the inference contract. Draft weights and upscalers have none.
|
|
1048
1059
|
*/
|
|
1049
|
-
type DiscoverTask = 'text' | 'image' | 'transcription' | 'diarization' | 'separation' | 'speech' | 'music' | 'embedding' | 'rerank' | 'all';
|
|
1060
|
+
type DiscoverTask = 'text' | 'image' | 'transcription' | 'diarization' | 'separation' | 'speech' | 'music' | 'embedding' | 'rerank' | 'adapter' | 'all';
|
|
1050
1061
|
/**
|
|
1051
1062
|
* What an app asks to install on a Hearthscale Server: a card a Server
|
|
1052
1063
|
* lists and does not hold, by its id, or a file of a Hugging Face
|
|
@@ -2045,6 +2056,19 @@ interface HubCompanion {
|
|
|
2045
2056
|
role: string;
|
|
2046
2057
|
repo: string;
|
|
2047
2058
|
file: string;
|
|
2059
|
+
installed?: InstalledCompanion;
|
|
2060
|
+
}
|
|
2061
|
+
interface InstalledCompanion {
|
|
2062
|
+
modelId: string;
|
|
2063
|
+
path: string;
|
|
2064
|
+
source: InstalledCompanionSource;
|
|
2065
|
+
sha256: string;
|
|
2066
|
+
sizeBytes: number;
|
|
2067
|
+
}
|
|
2068
|
+
interface InstalledCompanionSource {
|
|
2069
|
+
type: string;
|
|
2070
|
+
repo: string;
|
|
2071
|
+
revision: string;
|
|
2048
2072
|
}
|
|
2049
2073
|
/**
|
|
2050
2074
|
* A right-click entry of the app's rail button: a call of one of the
|
|
@@ -2241,6 +2265,14 @@ interface ModelCard {
|
|
|
2241
2265
|
* Server reports it.
|
|
2242
2266
|
*/
|
|
2243
2267
|
progress?: DownloadProgressBytes;
|
|
2268
|
+
/**
|
|
2269
|
+
* For an adapter whose Server states them, the cards of the models it fits.
|
|
2270
|
+
*/
|
|
2271
|
+
fits?: string[];
|
|
2272
|
+
/**
|
|
2273
|
+
* For an adapter whose Server states them, its prompt trigger words.
|
|
2274
|
+
*/
|
|
2275
|
+
triggers?: string[];
|
|
2244
2276
|
}
|
|
2245
2277
|
/**
|
|
2246
2278
|
* A Hearthscale Server this computer names, as `ctx.models.servers` and
|
|
@@ -3620,6 +3652,14 @@ interface ViewHostMethods {
|
|
|
3620
3652
|
params: Empty;
|
|
3621
3653
|
result: Empty;
|
|
3622
3654
|
};
|
|
3655
|
+
/** Opens the Server's window at Explore, at the models of `kind`, on a
|
|
3656
|
+
* click inside the view. A kind that no Explore task lists is refused. */
|
|
3657
|
+
'hearthscale/ui/open-explore': {
|
|
3658
|
+
params: {
|
|
3659
|
+
kind: ModelKind;
|
|
3660
|
+
};
|
|
3661
|
+
result: Empty;
|
|
3662
|
+
};
|
|
3623
3663
|
/** Keeps a JSON value for this view's tab, which the host gives back in
|
|
3624
3664
|
* `hearthscale/widgetState`; it never reaches a model. The value takes
|
|
3625
3665
|
* at most 65,536 UTF-16 code units as JSON text. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearthscale/app",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "The types a Hearthscale app's backend and views import: the backend's exports and context, the view's host methods, extensions and slots; and the typed call of a view's requests.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"rollup": "^4.62.2",
|
|
40
40
|
"rollup-plugin-dts": "^6.5.1",
|
|
41
41
|
"typescript": "^5.6.3",
|
|
42
|
-
"@hearthscale/contract": "0.
|
|
42
|
+
"@hearthscale/contract": "0.2.3"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "node scripts/build.mjs",
|