@try-works/dsh-model-as-tool 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +245 -2
- package/catalog/desert-ant-models.json +629 -0
- package/catalog/playbooks.json +531 -0
- package/cordis.patch.yml +39 -0
- package/lib/adapters/index.d.ts +48 -0
- package/lib/adapters/index.d.ts.map +1 -0
- package/lib/adapters/index.js +67 -0
- package/lib/adapters/tongue.d.ts +23 -0
- package/lib/adapters/tongue.d.ts.map +1 -0
- package/lib/adapters/tongue.js +85 -0
- package/lib/adapters/types.d.ts +95 -0
- package/lib/adapters/types.d.ts.map +1 -0
- package/lib/adapters/types.js +85 -0
- package/lib/adapters/voz.d.ts +22 -0
- package/lib/adapters/voz.d.ts.map +1 -0
- package/lib/adapters/voz.js +90 -0
- package/lib/capability.d.ts +58 -0
- package/lib/capability.d.ts.map +1 -0
- package/lib/capability.js +175 -0
- package/lib/catalog.d.ts +37 -0
- package/lib/catalog.d.ts.map +1 -0
- package/lib/catalog.js +217 -0
- package/lib/index.d.ts +120 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +391 -0
- package/lib/playbook.d.ts +42 -0
- package/lib/playbook.d.ts.map +1 -0
- package/lib/playbook.js +65 -0
- package/lib/registrar.d.ts +59 -0
- package/lib/registrar.d.ts.map +1 -0
- package/lib/registrar.js +136 -0
- package/lib/skills.d.ts +25 -0
- package/lib/skills.d.ts.map +1 -0
- package/lib/skills.js +102 -0
- package/lib/state.d.ts +100 -0
- package/lib/state.d.ts.map +1 -0
- package/lib/state.js +160 -0
- package/lib/transport.d.ts +158 -0
- package/lib/transport.d.ts.map +1 -0
- package/lib/transport.js +332 -0
- package/lib/types.d.ts +111 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +8 -0
- package/package.json +83 -4
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tongue": {
|
|
3
|
+
"useCases": [
|
|
4
|
+
"Route a localisation task: detect the language of a user message, ticket or document before choosing templates, fonts or a translation target.",
|
|
5
|
+
"Verify generated copy: check that text the agent just wrote is in the language it was asked to write.",
|
|
6
|
+
"Triage an inbox or a corpus by language without calling a hosted classifier.",
|
|
7
|
+
"Guard a translation pipeline: only translate when the detected language differs from the target."
|
|
8
|
+
],
|
|
9
|
+
"whenToUse": [
|
|
10
|
+
"You have a short piece of text (even three or four words is enough) and you need its language code.",
|
|
11
|
+
"The text must not leave the machine, so a local detector is required.",
|
|
12
|
+
"You need a fast, cheap check that can run on every message rather than on a sample."
|
|
13
|
+
],
|
|
14
|
+
"whenNotToUse": [
|
|
15
|
+
"The input is audio: use detect_spoken_language (Ear) instead.",
|
|
16
|
+
"The text is a single proper noun, a URL, an emoji or pure digits — there is too little signal and the result will be unreliable.",
|
|
17
|
+
"You need translation; this model identifies language, it does not translate."
|
|
18
|
+
],
|
|
19
|
+
"workflow": [
|
|
20
|
+
"Call lang_detect with the raw text; do not pre-clean it, since punctuation and casing carry signal.",
|
|
21
|
+
"Read `language` as the answer and `reliability` as the confidence verdict.",
|
|
22
|
+
"Treat isTooCloseToCall true as 'ask or abstain' rather than guessing between the top candidates.",
|
|
23
|
+
"When the answer drives a destructive or expensive action, confirm with a candidate margin before acting."
|
|
24
|
+
],
|
|
25
|
+
"pairsWith": [
|
|
26
|
+
"detect_spoken_language (Ear) when the source is a recording",
|
|
27
|
+
"transcribe_audio (Voz) to pick the transcription language first"
|
|
28
|
+
],
|
|
29
|
+
"caveats": [
|
|
30
|
+
"Language identification over short text is inherently ambiguous between close relatives (da/no/sv, es/ca, id/ms); the candidate list is the honest answer, not just the top label.",
|
|
31
|
+
"The model ships inside the npm package, so there is no download and no network call.",
|
|
32
|
+
"It reports ISO 639-1 style codes; map them if the consumer expects another convention."
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"voz": {
|
|
36
|
+
"useCases": [
|
|
37
|
+
"Transcribe a meeting, interview or voice note locally so the audio never leaves the machine.",
|
|
38
|
+
"Produce captions or subtitles with word-level timing that a cut or highlight list can be built from.",
|
|
39
|
+
"Turn a recording into text the agent can then summarise, search or index.",
|
|
40
|
+
"Find where a phrase was said, using the per-word timestamps rather than re-listening."
|
|
41
|
+
],
|
|
42
|
+
"whenToUse": [
|
|
43
|
+
"The task needs the words of an audio or video file, and the audio is private or too large to upload.",
|
|
44
|
+
"You need timing, not just text: captions, clip boundaries or 'jump to that moment' behaviour.",
|
|
45
|
+
"The recording is one of the 25 supported languages."
|
|
46
|
+
],
|
|
47
|
+
"whenNotToUse": [
|
|
48
|
+
"The file is not speech (music, ambient, a tone) — expect an empty transcript, which is a correct result rather than a failure.",
|
|
49
|
+
"You only need the language, not the words: detect_spoken_language is far cheaper.",
|
|
50
|
+
"The environment cannot supply an ONNX Runtime module, or the ~349 MB of weights cannot be downloaded."
|
|
51
|
+
],
|
|
52
|
+
"workflow": [
|
|
53
|
+
"Confirm the runtime is present first; on Node this model needs onnxruntime-node, and the plugin reports that as the unavailable reason when it is missing.",
|
|
54
|
+
"Prefer a 16 kHz mono WAV when a decoder is unavailable: convert with ffmpeg -i in.mp4 -ac 1 -ar 16000 out.wav.",
|
|
55
|
+
"Transcribe once and reuse the result: transcription is the expensive step and its output feeds clips, alignment and summaries.",
|
|
56
|
+
"Pass include_words true only when timing is actually needed; a long transcript with word timings is a large payload.",
|
|
57
|
+
"Treat an empty `text` with wordCount 0 as 'no speech found' rather than an error."
|
|
58
|
+
],
|
|
59
|
+
"pairsWith": [
|
|
60
|
+
"select_clips (Clips) consumes the transcript to cut highlights",
|
|
61
|
+
"align_transcript (Align) refines word timings against the audio",
|
|
62
|
+
"detect_fillers (Uhm) finds the hesitations to cut",
|
|
63
|
+
"detect_speakers (Who) attributes turns to people"
|
|
64
|
+
],
|
|
65
|
+
"caveats": [
|
|
66
|
+
"The weights are ~349 MB and ONNX Runtime holds roughly 1.2 GB resident; load once and reuse rather than per call.",
|
|
67
|
+
"The first call downloads the bundle, so the first transcription is much slower than later ones.",
|
|
68
|
+
"Node CPU inference is materially slower than the browser's GPU path; budget time for long recordings.",
|
|
69
|
+
"A decoder can return less audio than the container claims; the SDK reports that instead of silently truncating."
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"redact": {
|
|
73
|
+
"useCases": [
|
|
74
|
+
"Scrub names, emails, phone numbers and account numbers from text before it is sent to a remote model or API.",
|
|
75
|
+
"Sanitise a transcript, ticket or log excerpt so it can be shared or committed.",
|
|
76
|
+
"Produce a shareable version of a document while keeping a placeholder map to restore the originals afterwards.",
|
|
77
|
+
"Meet a data-minimisation requirement in an agent pipeline that would otherwise forward raw personal data."
|
|
78
|
+
],
|
|
79
|
+
"whenToUse": [
|
|
80
|
+
"Text containing personal data is about to leave the machine, the repository or the trust boundary.",
|
|
81
|
+
"You need the redacted text AND the ability to put the originals back after a remote round trip.",
|
|
82
|
+
"The text is in one of the 27 supported languages."
|
|
83
|
+
],
|
|
84
|
+
"whenNotToUse": [
|
|
85
|
+
"Nothing personal is present: redaction adds placeholders that a later reader must resolve.",
|
|
86
|
+
"You need anonymisation that survives re-identification statistically; placeholder substitution is not that.",
|
|
87
|
+
"The text is audio or an image: transcribe or OCR it first."
|
|
88
|
+
],
|
|
89
|
+
"workflow": [
|
|
90
|
+
"Call redact_pii with the raw text and keep the returned items list — it is the restore map.",
|
|
91
|
+
"Send only the redacted text to the remote service.",
|
|
92
|
+
"Call the result's restore on the reply to put the original values back, on the machine, before showing it to the user.",
|
|
93
|
+
"Narrow with `labels` when only specific categories matter, and raise minimum_confidence to trade recall for precision."
|
|
94
|
+
],
|
|
95
|
+
"pairsWith": [
|
|
96
|
+
"transcribe_audio (Voz) to get text that then needs scrubbing",
|
|
97
|
+
"moderate_text (Toxic) for a different risk category over the same text"
|
|
98
|
+
],
|
|
99
|
+
"caveats": [
|
|
100
|
+
"Organisation names are detected but not redacted by default, because a company is not a natural person; pass ORG in labels to include them.",
|
|
101
|
+
"Structured patterns such as emails, card numbers and IMEI are matched by rule and always apply, independent of the model's confidence.",
|
|
102
|
+
"The free-tier licence counts monthly active devices per platform per model; it does not restrict the volume of inference."
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"emo": {
|
|
106
|
+
"useCases": [
|
|
107
|
+
"Decorate release notes, changelog entries or commit summaries with fitting emoji.",
|
|
108
|
+
"Pick an emoji for a UI label, notification or section heading.",
|
|
109
|
+
"Suggest reactions for a chat or support message."
|
|
110
|
+
],
|
|
111
|
+
"whenToUse": [
|
|
112
|
+
"Text is being written for a surface where an emoji improves scanning or tone.",
|
|
113
|
+
"The text is in one of the 22 supported languages.",
|
|
114
|
+
"The choice should be consistent rather than a matter of the model's taste."
|
|
115
|
+
],
|
|
116
|
+
"whenNotToUse": [
|
|
117
|
+
"The destination is a code identifier, a commit subject under a strict convention, or a formal document.",
|
|
118
|
+
"You need sentiment or intent; this model suggests emoji, it does not classify meaning.",
|
|
119
|
+
"A single emoji is required: take the top suggestion rather than asking for more and guessing."
|
|
120
|
+
],
|
|
121
|
+
"workflow": [
|
|
122
|
+
"Call suggest_emoji with the text as written.",
|
|
123
|
+
"Take the top suggestion when one emoji is needed; ask for a larger limit only when offering a choice.",
|
|
124
|
+
"Do not stack several suggestions into one label."
|
|
125
|
+
],
|
|
126
|
+
"pairsWith": ["suggest_title (Title) when a section needs both a heading and a marker"],
|
|
127
|
+
"caveats": [
|
|
128
|
+
"Emoji convention is cultural; a suggestion is a proposal, not a rule.",
|
|
129
|
+
"Skin-tone variants are not selected by this tool."
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"gist": {
|
|
133
|
+
"useCases": [
|
|
134
|
+
"Tag a document, post or issue with topics before indexing or routing it.",
|
|
135
|
+
"Route incoming content to the right owner, queue or template by topic.",
|
|
136
|
+
"Build a browsable topic facet over a corpus.",
|
|
137
|
+
"Check a draft against the taxonomy to see whether it is on-topic."
|
|
138
|
+
],
|
|
139
|
+
"whenToUse": [
|
|
140
|
+
"The content must be classified into a stable, fixed taxonomy rather than free-form tags.",
|
|
141
|
+
"The classification must not leave the machine.",
|
|
142
|
+
"You want multi-label output rather than one exclusive category."
|
|
143
|
+
],
|
|
144
|
+
"whenNotToUse": [
|
|
145
|
+
"You need free-form keywords or entity extraction: the taxonomy here is fixed at 36 topics.",
|
|
146
|
+
"The text is very short or empty; there is not enough signal for multi-label tagging.",
|
|
147
|
+
"You need sentiment or toxicity — those are different models."
|
|
148
|
+
],
|
|
149
|
+
"workflow": [
|
|
150
|
+
"Call tag_topics with the text; use the title when a full document is too long.",
|
|
151
|
+
"Treat the returned topics as a set, ranked by score; keep those above the threshold the consumer cares about.",
|
|
152
|
+
"Because the taxonomy is fixed, store the label ids rather than the display strings so a relabelling does not break the index."
|
|
153
|
+
],
|
|
154
|
+
"pairsWith": ["lang_detect (Tongue) for language-aware downstream routing"],
|
|
155
|
+
"caveats": [
|
|
156
|
+
"A fixed taxonomy means genuinely novel subjects fall into the nearest existing topic rather than creating a new one.",
|
|
157
|
+
"Scores are model confidences, not calibrated probabilities."
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"moderator": {
|
|
161
|
+
"useCases": [
|
|
162
|
+
"Screen a user-supplied image before it is stored, published or forwarded.",
|
|
163
|
+
"Gate an upload pipeline so objectionable content never reaches a CDN or a review queue unlabelled.",
|
|
164
|
+
"Batch-audit an asset library for policy compliance."
|
|
165
|
+
],
|
|
166
|
+
"whenToUse": [
|
|
167
|
+
"Images are entering a system from an untrusted source.",
|
|
168
|
+
"The check must happen locally, for privacy or because the images may not be uploaded to a third party.",
|
|
169
|
+
"A binary flag plus a score is enough for the decision."
|
|
170
|
+
],
|
|
171
|
+
"whenNotToUse": [
|
|
172
|
+
"The content is text: use moderate_text (Toxic) instead.",
|
|
173
|
+
"You need a nuanced appropriateness judgement for a specific audience; this is nudity/sexual-content detection.",
|
|
174
|
+
"The decision is irreversible and high-stakes without human review."
|
|
175
|
+
],
|
|
176
|
+
"workflow": [
|
|
177
|
+
"Call detect_nsfw with the image paths; the model loads once for the whole batch.",
|
|
178
|
+
"Treat the score as a threshold you choose, not a verdict, and log the score with the decision.",
|
|
179
|
+
"Route borderline scores to human review rather than auto-rejecting."
|
|
180
|
+
],
|
|
181
|
+
"pairsWith": ["moderate_text (Toxic) to cover the text side of the same pipeline"],
|
|
182
|
+
"caveats": [
|
|
183
|
+
"The model was trained only on licensed and synthetic data, which is what makes it safe to ship commercially — but it also bounds what it has seen.",
|
|
184
|
+
"A false negative publishes content; choose the threshold with that asymmetry in mind."
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
"clear": {
|
|
188
|
+
"useCases": [
|
|
189
|
+
"Clean up a recording before publishing a podcast or a video.",
|
|
190
|
+
"Remove room echo and background noise from a voice note so it can be transcribed more accurately.",
|
|
191
|
+
"Level the loudness of a set of recordings so they sit together consistently."
|
|
192
|
+
],
|
|
193
|
+
"whenToUse": [
|
|
194
|
+
"Speech is present and the problem is noise, echo or inconsistent level.",
|
|
195
|
+
"The audio must not be uploaded to a service.",
|
|
196
|
+
"A downstream step (transcription, clipping) benefits from cleaner input."
|
|
197
|
+
],
|
|
198
|
+
"whenNotToUse": [
|
|
199
|
+
"The recording is music: enhancement is tuned for speech.",
|
|
200
|
+
"The problem is that words are wrong, not that the audio is noisy — that is transcription's job.",
|
|
201
|
+
"You need a specific broadcast loudness standard certified; verify the output rather than assuming."
|
|
202
|
+
],
|
|
203
|
+
"workflow": [
|
|
204
|
+
"Enhance first, then transcribe: cleaner input gives better word timings.",
|
|
205
|
+
"Keep the original file; write the enhanced audio to a new path.",
|
|
206
|
+
"Check the loudness of the result before publishing rather than trusting the default target."
|
|
207
|
+
],
|
|
208
|
+
"pairsWith": [
|
|
209
|
+
"transcribe_audio (Voz) as the downstream consumer",
|
|
210
|
+
"detect_fillers (Uhm) after cleanup"
|
|
211
|
+
],
|
|
212
|
+
"caveats": [
|
|
213
|
+
"Enhancement is a transformation: it can remove breath and room tone that a listener expected, and it is not reversible.",
|
|
214
|
+
"Very noisy input can be over-suppressed, producing artefacts; spot-check the output."
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"ear": {
|
|
218
|
+
"useCases": [
|
|
219
|
+
"Choose the transcription language before running speech recognition.",
|
|
220
|
+
"Route an inbound call recording to a language-specific queue or agent.",
|
|
221
|
+
"Check that a recording is in the language it claims to be."
|
|
222
|
+
],
|
|
223
|
+
"whenToUse": [
|
|
224
|
+
"You have audio and need its spoken language, not its words.",
|
|
225
|
+
"Running full transcription just to learn the language would be wasteful.",
|
|
226
|
+
"The language is unknown across a large set (102 supported)."
|
|
227
|
+
],
|
|
228
|
+
"whenNotToUse": [
|
|
229
|
+
"The source is written text: use lang_detect (Tongue).",
|
|
230
|
+
"You already know the language and need the words: go straight to transcribe_audio.",
|
|
231
|
+
"The clip is shorter than a few seconds of speech."
|
|
232
|
+
],
|
|
233
|
+
"workflow": [
|
|
234
|
+
"Detect the spoken language on a short representative stretch rather than the whole file.",
|
|
235
|
+
"Pass the result as the language hint to transcription.",
|
|
236
|
+
"On a low-confidence or heavily multilingual recording, treat the answer as provisional."
|
|
237
|
+
],
|
|
238
|
+
"pairsWith": [
|
|
239
|
+
"transcribe_audio (Voz) as the immediate consumer",
|
|
240
|
+
"lang_detect (Tongue) to cross-check against any accompanying written text"
|
|
241
|
+
],
|
|
242
|
+
"caveats": [
|
|
243
|
+
"Code-switching and heavy accents degrade accuracy.",
|
|
244
|
+
"A recording with music or noise before speech can mislead the detector; sample from where speech actually is."
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
"shapes": {
|
|
248
|
+
"useCases": [
|
|
249
|
+
"Snap a hand-drawn ink stroke to a clean geometric shape in a drawing or whiteboard tool.",
|
|
250
|
+
"Normalise a diagram sketch into precise primitives before rendering.",
|
|
251
|
+
"Recognise a gesture stroke as a command shape."
|
|
252
|
+
],
|
|
253
|
+
"whenToUse": [
|
|
254
|
+
"You have stroke points and need the intended geometric primitive.",
|
|
255
|
+
"Latency matters and the stroke is a single closed or open path."
|
|
256
|
+
],
|
|
257
|
+
"whenNotToUse": [
|
|
258
|
+
"The input is a raster image: this consumes stroke coordinates, not pixels.",
|
|
259
|
+
"The drawing is complex or multi-stroke; recognition is per stroke.",
|
|
260
|
+
"The intended shape is not one of rectangle, ellipse, triangle, star or line."
|
|
261
|
+
],
|
|
262
|
+
"workflow": [
|
|
263
|
+
"Capture points in drawing order at a reasonable sample rate; keep the raw points for undo.",
|
|
264
|
+
"Pass closed true only when the stroke actually closes.",
|
|
265
|
+
"Use the confidence to decide between snapping and leaving the stroke as freehand."
|
|
266
|
+
],
|
|
267
|
+
"pairsWith": [],
|
|
268
|
+
"caveats": [
|
|
269
|
+
"A wobbly or over-sampled stroke can be classified by its noise rather than its intent; simplify before recognition if the result is unstable.",
|
|
270
|
+
"Only the five documented primitives are recognised."
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"align": {
|
|
274
|
+
"useCases": [
|
|
275
|
+
"Refine coarse segment timings from a transcript into word-accurate timings for captions.",
|
|
276
|
+
"Produce the timing data a clip cutter or highlight list needs.",
|
|
277
|
+
"Re-time a transcript produced by a different engine against the original audio."
|
|
278
|
+
],
|
|
279
|
+
"whenToUse": [
|
|
280
|
+
"You already have the transcript text and the audio, and you need better word timings.",
|
|
281
|
+
"The existing timings are segment-level or drifted.",
|
|
282
|
+
"The transcriber was not this project's own model."
|
|
283
|
+
],
|
|
284
|
+
"whenNotToUse": [
|
|
285
|
+
"You have audio but no transcript: transcribe first, alignment refines an existing transcript.",
|
|
286
|
+
"You need the words themselves to be corrected; alignment places words, it does not fix them.",
|
|
287
|
+
"The transcript does not correspond to the audio."
|
|
288
|
+
],
|
|
289
|
+
"workflow": [
|
|
290
|
+
"Transcribe first, then align the transcript against the same audio file.",
|
|
291
|
+
"Feed the exact transcript text that was produced; paraphrasing breaks the alignment.",
|
|
292
|
+
"Drop the aligned timings straight into the caption or cut step."
|
|
293
|
+
],
|
|
294
|
+
"pairsWith": ["transcribe_audio (Voz) produces the transcript to align"],
|
|
295
|
+
"caveats": [
|
|
296
|
+
"Alignment cannot rescue a transcript with missing or inserted words; it degrades where the two disagree.",
|
|
297
|
+
"Runs on Node only in the JavaScript SDK, and the native core targets linux-x64, linux-arm64 and darwin-arm64."
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
"clips": {
|
|
301
|
+
"useCases": [
|
|
302
|
+
"Turn a long podcast, interview or meeting into a ranked list of short clips.",
|
|
303
|
+
"Produce social cuts from a webinar recording.",
|
|
304
|
+
"Surface the moments most likely to be worth watching from an archive."
|
|
305
|
+
],
|
|
306
|
+
"whenToUse": [
|
|
307
|
+
"The recording is long and talking-led, and a set of candidate highlights is wanted.",
|
|
308
|
+
"A transcript exists or can be produced, since selection works from the transcript.",
|
|
309
|
+
"The output is a cut list for a human to review, not a final edit."
|
|
310
|
+
],
|
|
311
|
+
"whenNotToUse": [
|
|
312
|
+
"There is no speech: selection is transcript-driven.",
|
|
313
|
+
"You need a finished, publishable edit rather than candidates.",
|
|
314
|
+
"The recording is already short; the overhead is not worth it."
|
|
315
|
+
],
|
|
316
|
+
"workflow": [
|
|
317
|
+
"Transcribe once, then pass that transcript in so transcription does not repeat.",
|
|
318
|
+
"Review the ranked clip list and treat the ranking as a suggestion.",
|
|
319
|
+
"Reuse the written clip paths from the result rather than predicting filenames."
|
|
320
|
+
],
|
|
321
|
+
"pairsWith": [
|
|
322
|
+
"transcribe_audio (Voz) for the transcript input",
|
|
323
|
+
"suggest_title (Title) to give each selected clip a title and description"
|
|
324
|
+
],
|
|
325
|
+
"caveats": [
|
|
326
|
+
"The files this model consumes are documented upstream as not being a stable interface (naming mismatches, int64 versus int32, large memory use); do not depend on their layout.",
|
|
327
|
+
"Clip boundaries are model-suggested; check the first and last second of each before publishing."
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
"title": {
|
|
331
|
+
"useCases": [
|
|
332
|
+
"Write the heading and one-line description for a landing-page section.",
|
|
333
|
+
"Generate a documentation page title and summary from its body.",
|
|
334
|
+
"Give each selected clip or chapter a title and description.",
|
|
335
|
+
"Name an article, note or changelog entry."
|
|
336
|
+
],
|
|
337
|
+
"whenToUse": [
|
|
338
|
+
"A passage needs a short factual title plus a one- or two-sentence description.",
|
|
339
|
+
"The text is long enough to have a subject — a section, page or transcript — rather than a fragment.",
|
|
340
|
+
"You want a factual label rather than a marketing headline."
|
|
341
|
+
],
|
|
342
|
+
"whenNotToUse": [
|
|
343
|
+
"You need persuasive or brand copy; this model writes factual titles.",
|
|
344
|
+
"The passage is a single sentence with no distinct subject.",
|
|
345
|
+
"You are on Windows or Linux: see the caveat below — this model cannot run there."
|
|
346
|
+
],
|
|
347
|
+
"workflow": [
|
|
348
|
+
"Pass the full passage, not a summary of it; the model needs the material to name.",
|
|
349
|
+
"Use the returned title and description together: the title for navigation, the description for context.",
|
|
350
|
+
"Cap generation with max_tokens when input is unusual, since the model can otherwise generate without end.",
|
|
351
|
+
"On an empty card, fall back to the passage's own first sentence rather than retrying blindly."
|
|
352
|
+
],
|
|
353
|
+
"pairsWith": ["select_clips (Clips) to title each selected clip"],
|
|
354
|
+
"caveats": [
|
|
355
|
+
"Title runs on Apple platforms only, on the GPU through MLX, and requires the Swift MLX package trait. There is no JavaScript or Kotlin SDK and no Windows or Linux build, so this tool cannot run on a Windows DSH host.",
|
|
356
|
+
"On iOS the model must be suspended before the app backgrounds, because the platform revokes GPU access.",
|
|
357
|
+
"Treat it as a remote capability: call it from an Apple machine, not from this process."
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
"uhm": {
|
|
361
|
+
"useCases": [
|
|
362
|
+
"Find every hesitation in a recording so an editor can cut them.",
|
|
363
|
+
"Tighten a spoken transcript by removing filler spans.",
|
|
364
|
+
"Measure how disfluent a speaker is across a set of recordings."
|
|
365
|
+
],
|
|
366
|
+
"whenToUse": [
|
|
367
|
+
"Spoken audio needs its filler words located with tight time bounds.",
|
|
368
|
+
"You are preparing an edited cut and need exact spans to remove.",
|
|
369
|
+
"The language and speaker are broadly covered by the model."
|
|
370
|
+
],
|
|
371
|
+
"whenNotToUse": [
|
|
372
|
+
"You need the transcript: detect_fillers returns spans, not words.",
|
|
373
|
+
"The audio is music or non-speech.",
|
|
374
|
+
"You intend to remove every match automatically without listening: over-cutting is easy."
|
|
375
|
+
],
|
|
376
|
+
"workflow": [
|
|
377
|
+
"Transcribe first so you can see the fillers in context.",
|
|
378
|
+
"Use the returned spans as cut candidates, keeping a margin so the cut does not clip neighbouring words.",
|
|
379
|
+
"Review the cut list; some 'uh' sounds are meaningful emphasis."
|
|
380
|
+
],
|
|
381
|
+
"pairsWith": [
|
|
382
|
+
"transcribe_audio (Voz) for the words around the fillers",
|
|
383
|
+
"clear (Clear) to clean audio before editing"
|
|
384
|
+
],
|
|
385
|
+
"caveats": [
|
|
386
|
+
"Runs on Apple platforms only through the Swift SDK; it is not available to a Windows or Linux DSH host.",
|
|
387
|
+
"Spans are millisecond-precise but a cut still needs a small crossfade to avoid clicks."
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
"schemer": {
|
|
391
|
+
"useCases": [
|
|
392
|
+
"Turn unstructured text into typed JSON against a schema the caller defines.",
|
|
393
|
+
"Extract invoice, contract or form fields without a hosted model.",
|
|
394
|
+
"Normalise incoming free-text records into a database shape."
|
|
395
|
+
],
|
|
396
|
+
"whenToUse": [
|
|
397
|
+
"The target schema is known and the source is text.",
|
|
398
|
+
"Extraction must happen locally.",
|
|
399
|
+
"A field being absent from the text should stay absent rather than be guessed."
|
|
400
|
+
],
|
|
401
|
+
"whenNotToUse": [
|
|
402
|
+
"The schema is unknown or you want open-ended information extraction.",
|
|
403
|
+
"The task needs reasoning beyond field mapping.",
|
|
404
|
+
"The text is audio or an image."
|
|
405
|
+
],
|
|
406
|
+
"workflow": [
|
|
407
|
+
"Write the narrowest schema that answers the question; every optional field is a chance to hallucinate.",
|
|
408
|
+
"Pass the schema with the text in one call.",
|
|
409
|
+
"Treat a missing field as a real answer: the model leaves fields empty when the text is silent.",
|
|
410
|
+
"Validate the returned object against the schema before trusting it downstream."
|
|
411
|
+
],
|
|
412
|
+
"pairsWith": ["redact_pii (Redact) before extraction when the text holds personal data"],
|
|
413
|
+
"caveats": [
|
|
414
|
+
"In closed beta: the weights are published but no SDK ships them, so this tool cannot be installed yet.",
|
|
415
|
+
"Schema-constrained extraction fails quietly if the schema itself is ambiguous; make field names and descriptions unambiguous."
|
|
416
|
+
]
|
|
417
|
+
},
|
|
418
|
+
"toxic": {
|
|
419
|
+
"useCases": [
|
|
420
|
+
"Pre-screen user-generated text before publishing or forwarding it.",
|
|
421
|
+
"Flag abuse in a support or community inbox for human review.",
|
|
422
|
+
"Audit a corpus for hateful or threatening content."
|
|
423
|
+
],
|
|
424
|
+
"whenToUse": [
|
|
425
|
+
"Text is entering a system from an untrusted source and needs a risk signal.",
|
|
426
|
+
"The content is in one of the 23 supported European languages.",
|
|
427
|
+
"The result will be reviewed by a human before any action is taken."
|
|
428
|
+
],
|
|
429
|
+
"whenNotToUse": [
|
|
430
|
+
"The content is an image: use detect_nsfw (Moderator).",
|
|
431
|
+
"You need a legal determination; this is a triage signal.",
|
|
432
|
+
"Auto-banning on the score alone — false positives on reclaimed language and quoted abuse are expected."
|
|
433
|
+
],
|
|
434
|
+
"workflow": [
|
|
435
|
+
"Call moderate_text with the text and a deliberate confidence floor.",
|
|
436
|
+
"Use the verdict to prioritise human review, not to decide alone.",
|
|
437
|
+
"Record the score alongside the decision so thresholds can be tuned later."
|
|
438
|
+
],
|
|
439
|
+
"pairsWith": ["redact_pii (Redact) to strip personal data before a reviewer sees the text"],
|
|
440
|
+
"caveats": [
|
|
441
|
+
"In closed beta: the weights are published but no SDK ships them.",
|
|
442
|
+
"Coverage is 23 European languages; other languages are out of scope.",
|
|
443
|
+
"Quoted or reported speech is a known source of false positives."
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
"who": {
|
|
447
|
+
"useCases": [
|
|
448
|
+
"Split an interview into per-speaker turns for a readable transcript.",
|
|
449
|
+
"Attribute quotes to people in a meeting recording.",
|
|
450
|
+
"Label speakers so an edit can cut between them."
|
|
451
|
+
],
|
|
452
|
+
"whenToUse": [
|
|
453
|
+
"A recording has multiple speakers and the transcript needs attribution.",
|
|
454
|
+
"Timestamps per turn are needed for cutting or captions.",
|
|
455
|
+
"The speakers are distinguishable by voice."
|
|
456
|
+
],
|
|
457
|
+
"whenNotToUse": [
|
|
458
|
+
"Only one person speaks: attribution adds nothing.",
|
|
459
|
+
"You need to know who a person is by name; this labels turns, it does not identify identities.",
|
|
460
|
+
"The audio quality is too poor to separate voices."
|
|
461
|
+
],
|
|
462
|
+
"workflow": [
|
|
463
|
+
"Transcribe first, then attribute turns to the transcript.",
|
|
464
|
+
"Treat speaker labels as anonymous clusters until a human assigns names.",
|
|
465
|
+
"Use the face boxes on video to help a human confirm which cluster is which person."
|
|
466
|
+
],
|
|
467
|
+
"pairsWith": [
|
|
468
|
+
"transcribe_audio (Voz) for the words",
|
|
469
|
+
"match_faces (Face) to help map clusters to people"
|
|
470
|
+
],
|
|
471
|
+
"caveats": [
|
|
472
|
+
"In closed beta: the weights are published but no SDK ships them.",
|
|
473
|
+
"Overlapping speech and similar voices cause cluster swaps; verify before publishing attributed quotes."
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
"face": {
|
|
477
|
+
"useCases": [
|
|
478
|
+
"Group a photo library by person without uploading any image.",
|
|
479
|
+
"Find every appearance of a person in a video.",
|
|
480
|
+
"De-duplicate near-identical portrait shots."
|
|
481
|
+
],
|
|
482
|
+
"whenToUse": [
|
|
483
|
+
"Images or video must be grouped by identity and privacy rules forbid uploading them.",
|
|
484
|
+
"You need face boxes and cluster ids rather than names.",
|
|
485
|
+
"The faces are reasonably large and frontal."
|
|
486
|
+
],
|
|
487
|
+
"whenNotToUse": [
|
|
488
|
+
"You need to identify a named individual from a database; that is a different, consent-bound task.",
|
|
489
|
+
"Faces are tiny, profile-only or heavily occluded.",
|
|
490
|
+
"Biometric processing is not lawful in your jurisdiction for this purpose — check before using."
|
|
491
|
+
],
|
|
492
|
+
"workflow": [
|
|
493
|
+
"Run matching over the set and keep cluster ids stable for the session.",
|
|
494
|
+
"Let a human name each cluster; do not infer identity from the model.",
|
|
495
|
+
"Keep the images on the machine; only the cluster metadata needs to travel."
|
|
496
|
+
],
|
|
497
|
+
"pairsWith": ["detect_speakers (Who) to correlate speakers with on-screen faces"],
|
|
498
|
+
"caveats": [
|
|
499
|
+
"In closed beta: the weights are published but no SDK ships them.",
|
|
500
|
+
"Face matching is biometric processing and is regulated in many jurisdictions; the local-only design helps but does not by itself make a use lawful.",
|
|
501
|
+
"Quality of the crop dominates accuracy."
|
|
502
|
+
]
|
|
503
|
+
},
|
|
504
|
+
"eye": {
|
|
505
|
+
"useCases": [
|
|
506
|
+
"Choose the best frame from a burst for a thumbnail or hero image.",
|
|
507
|
+
"Reduce a clip to its most representative shots.",
|
|
508
|
+
"Detect and drop repeated near-identical shots before review."
|
|
509
|
+
],
|
|
510
|
+
"whenToUse": [
|
|
511
|
+
"A burst or clip must be reduced to the frames worth keeping.",
|
|
512
|
+
"You need a quality signal plus content labels without uploading the images.",
|
|
513
|
+
"De-duplication matters as much as ranking."
|
|
514
|
+
],
|
|
515
|
+
"whenNotToUse": [
|
|
516
|
+
"You need aesthetic judgement for a brand; scoring is technical.",
|
|
517
|
+
"The material is a single deliberate shot.",
|
|
518
|
+
"You need object detection over many categories."
|
|
519
|
+
],
|
|
520
|
+
"workflow": [
|
|
521
|
+
"Score the burst and take the top frame, or the best frame per duplicate group.",
|
|
522
|
+
"Use the labels to sanity-check that the chosen frame shows what was expected.",
|
|
523
|
+
"Keep the original files; scoring selects, it does not edit."
|
|
524
|
+
],
|
|
525
|
+
"pairsWith": ["detect_nsfw (Moderator) to screen the frames that would otherwise be published"],
|
|
526
|
+
"caveats": [
|
|
527
|
+
"In closed beta: the weights are published but no SDK ships them.",
|
|
528
|
+
"Scores favour technical quality (sharpness, exposure) over editorial suitability."
|
|
529
|
+
]
|
|
530
|
+
}
|
|
531
|
+
}
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# The dsh-model-as-tool bundle patch: one insert row over the empty profile root.
|
|
2
|
+
#
|
|
3
|
+
# A user's profile `cordis.patch.yml` (or the file this row is installed into)
|
|
4
|
+
# addresses this row by id, so a deployment can change the config without
|
|
5
|
+
# forking the package. Later patch layers win per row.
|
|
6
|
+
#
|
|
7
|
+
# `models: []` means "no explicit allowlist": every model whose runtime resolves
|
|
8
|
+
# in this process is registered. Naming ids narrows the surface; naming a model
|
|
9
|
+
# that cannot run here is harmless, because the allowlist is intersected with
|
|
10
|
+
# what the capability resolver proves runnable.
|
|
11
|
+
|
|
12
|
+
- insert:
|
|
13
|
+
- id: model-tools
|
|
14
|
+
name: '@try-works/dsh-model-as-tool'
|
|
15
|
+
config:
|
|
16
|
+
# Every model that can actually run in this process.
|
|
17
|
+
models: []
|
|
18
|
+
exclude: []
|
|
19
|
+
# Do not register a tool for a model whose runtime is missing: a tool
|
|
20
|
+
# that cannot work costs a model turn to discover.
|
|
21
|
+
exposeUnavailable: false
|
|
22
|
+
# Publish one skill per registered tool, teaching when to use it.
|
|
23
|
+
registerSkills: true
|
|
24
|
+
# Register the `model_tools` inspection and install tool.
|
|
25
|
+
registerControlTool: true
|
|
26
|
+
# Allow in-process npm packages. Set false to force every call through
|
|
27
|
+
# the CLI or the bridge below.
|
|
28
|
+
allowNpm: true
|
|
29
|
+
# The Desert Ant CLI, auto-detected on PATH (macOS and Linux). It can run
|
|
30
|
+
# every shipping model, so it is the route that needs no extra service.
|
|
31
|
+
cli:
|
|
32
|
+
enabled: true
|
|
33
|
+
command: desertant
|
|
34
|
+
# A bridge on a machine that can run what this one cannot — most
|
|
35
|
+
# importantly the Apple-only models. Leave the endpoint empty to disable.
|
|
36
|
+
# See scripts/desert-ant-bridge.mjs; the plugin never hosts this itself.
|
|
37
|
+
remote:
|
|
38
|
+
endpoint: ''
|
|
39
|
+
token: ''
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapter registry: the one place that maps a catalog model to the code that
|
|
3
|
+
* can invoke it.
|
|
4
|
+
*
|
|
5
|
+
* Two kinds of adapter exist. A **model adapter** is written by hand for a model
|
|
6
|
+
* with a real in-process SDK (Tongue, Voz). A **transport adapter** is generic:
|
|
7
|
+
* it drives any model through the Desert Ant CLI or a user-hosted bridge, using
|
|
8
|
+
* only the catalog's verb and parameter declarations.
|
|
9
|
+
*
|
|
10
|
+
* @module @try-works/dsh-model-as-tool/adapters/index
|
|
11
|
+
*/
|
|
12
|
+
import type { ModelCatalogEntry } from '../types.ts';
|
|
13
|
+
import type { AdapterFactory, ModelAdapter } from './types.ts';
|
|
14
|
+
import { type TransportOptions } from '../transport.ts';
|
|
15
|
+
/**
|
|
16
|
+
* Every hand-written adapter this plugin ships, in priority order.
|
|
17
|
+
*
|
|
18
|
+
* Each factory returns undefined for the entries it does not serve, so the
|
|
19
|
+
* lookup is a linear scan rather than a switch, and a model with no adapter yet
|
|
20
|
+
* simply has no tool.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ADAPTER_FACTORIES: readonly AdapterFactory[];
|
|
23
|
+
/**
|
|
24
|
+
* Options that decide which transports a model may use.
|
|
25
|
+
*
|
|
26
|
+
* `routes` is normally the capability resolver's verdict, which is what keeps
|
|
27
|
+
* the adapter and the reported reason from disagreeing: a model is only offered
|
|
28
|
+
* through a transport the resolver already proved usable.
|
|
29
|
+
*/
|
|
30
|
+
export interface TransportSelection extends TransportOptions {
|
|
31
|
+
/** The resolved route for this model. */
|
|
32
|
+
readonly route: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Create the adapter for one entry.
|
|
36
|
+
*
|
|
37
|
+
* A hand-written adapter always wins for the model it serves: an in-process
|
|
38
|
+
* call is faster and needs no external service. Everything else falls to the
|
|
39
|
+
* transport the capability resolver selected.
|
|
40
|
+
* @param entry - the catalog entry.
|
|
41
|
+
* @param options - the resolved route plus transport settings.
|
|
42
|
+
* @param factories - hand-written adapter factories, defaulting to the shipped set.
|
|
43
|
+
* @returns the adapter, or undefined when no factory or transport serves this model.
|
|
44
|
+
*/
|
|
45
|
+
export declare function createAdapter(entry: ModelCatalogEntry, options?: TransportSelection, factories?: readonly AdapterFactory[]): ModelAdapter | undefined;
|
|
46
|
+
export type { AdapterFactory, AdapterInvocation, JsonValue, ModelAdapter } from './types.ts';
|
|
47
|
+
export type { CommandTransport, TransportOptions } from '../transport.ts';
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAG9D,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAA;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAGtD,CAAA;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAmBD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,kBAA4C,EACrD,SAAS,GAAE,SAAS,cAAc,EAAsB,GACvD,YAAY,GAAG,SAAS,CAY1B;AAED,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC5F,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA"}
|