@try-works/dsh-tool-mode 0.5.47 → 0.5.48
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/client/index.js +65 -3
- package/package.json +1 -1
package/client/index.js
CHANGED
|
@@ -65,17 +65,31 @@ function createToolviews(createElement) {
|
|
|
65
65
|
* generic card until its name is added here.
|
|
66
66
|
*/
|
|
67
67
|
const TOOL_NAMES = Object.freeze([
|
|
68
|
-
// The plugin's own control tools.
|
|
69
|
-
'tool_mode_list', 'tool_mode_describe', 'tool_mode_run',
|
|
68
|
+
// The plugin's own control and discovery tools.
|
|
69
|
+
'tool_mode_list', 'tool_mode_describe', 'tool_mode_run', 'model_tools', 'model_tools_manage',
|
|
70
|
+
// Host-owned decision composition registered by this plugin.
|
|
71
|
+
'decision_combine', 'decision_evaluate', 'decision_route',
|
|
70
72
|
// embeddinggemma
|
|
71
73
|
'multimodal_embed', 'semantic_similarity', 'semantic_rank', 'semantic_classify',
|
|
72
74
|
'semantic_deduplicate', 'media_find_moments', 'dedupe_and_rank',
|
|
73
75
|
// laya
|
|
74
76
|
'decision_choose', 'decision_test', 'decision_score',
|
|
77
|
+
'decision_choose_local', 'decision_score_typed', 'decision_test_typed',
|
|
75
78
|
// needle
|
|
76
79
|
'tools_plan', 'structured_extract', 'validate_record', 'extract_with_repair',
|
|
77
|
-
// tongue, voz, minilm, declarative recipes
|
|
80
|
+
// tongue, voz, minilm, declarative recipes, harness text/vision
|
|
78
81
|
'lang_detect', 'stt_transcribe', 'text_embed', 'text_rerank', 'text_title', 'describe_image',
|
|
82
|
+
// mirage
|
|
83
|
+
'mirage_describe', 'mirage_detect', 'mirage_ocr', 'mirage_extract',
|
|
84
|
+
// Runtime-layer extensions (LiteRT/ONNX engines and code-free recipes).
|
|
85
|
+
'redact_text', 'shape_recognize', 'detect_fillers', 'enhance_speech',
|
|
86
|
+
'classify_nsfw', 'identify_language', 'suggest_emojis',
|
|
87
|
+
// Vendor catalog tools served through adapters when installed.
|
|
88
|
+
'align_transcript', 'select_clips', 'detect_spoken_language', 'suggest_emoji', 'score_frames',
|
|
89
|
+
'match_faces', 'tag_topics', 'detect_nsfw', 'redact_pii', 'extract_fields', 'recognize_shape',
|
|
90
|
+
'suggest_title', 'moderate_text', 'transcribe_audio', 'detect_speakers',
|
|
91
|
+
// Remote Jev decisions (opt-in).
|
|
92
|
+
'decision_choose_jev', 'decision_judgments_jev',
|
|
79
93
|
])
|
|
80
94
|
|
|
81
95
|
/** The first text block of a tool result, or null. */
|
|
@@ -234,6 +248,54 @@ function createToolviews(createElement) {
|
|
|
234
248
|
lines.push((Array.isArray(payload.ranking) || Array.isArray(payload.results)
|
|
235
249
|
? (payload.ranking ?? payload.results).length : 0) + ' ranked')
|
|
236
250
|
break
|
|
251
|
+
case 'model_tools':
|
|
252
|
+
case 'model_tools_manage': {
|
|
253
|
+
if (typeof payload.action === 'string') lines.push('action ' + payload.action)
|
|
254
|
+
if (typeof payload.installed === 'number') {
|
|
255
|
+
lines.push('installed ' + String(payload.installed) + ' · runnable ' + String(payload.runnable))
|
|
256
|
+
}
|
|
257
|
+
break
|
|
258
|
+
}
|
|
259
|
+
case 'redact_text':
|
|
260
|
+
if (Array.isArray(payload.spans)) lines.push(payload.spans.length + ' span(s)')
|
|
261
|
+
break
|
|
262
|
+
case 'shape_recognize':
|
|
263
|
+
if (typeof payload.shape === 'string') {
|
|
264
|
+
lines.push('shape ' + payload.shape + ' · confidence ' + (number(payload.confidence) ?? '?'))
|
|
265
|
+
}
|
|
266
|
+
break
|
|
267
|
+
case 'detect_fillers':
|
|
268
|
+
if (Array.isArray(payload.fillers)) lines.push(payload.fillers.length + ' filler span(s)')
|
|
269
|
+
break
|
|
270
|
+
case 'enhance_speech':
|
|
271
|
+
if (typeof payload.sampleRate === 'number' && typeof payload.durationSeconds === 'number') {
|
|
272
|
+
lines.push(String(payload.sampleRate) + ' Hz · ' + String(payload.durationSeconds) + ' s')
|
|
273
|
+
}
|
|
274
|
+
if (payload.coverage && typeof payload.coverage === 'object') {
|
|
275
|
+
lines.push('coverage complete ' + String(payload.coverage.complete === true))
|
|
276
|
+
}
|
|
277
|
+
break
|
|
278
|
+
case 'classify_nsfw':
|
|
279
|
+
if (typeof payload.isNSFW === 'boolean') {
|
|
280
|
+
lines.push('isNSFW ' + String(payload.isNSFW) + ' · score ' + (number(payload.score) ?? '?'))
|
|
281
|
+
}
|
|
282
|
+
break
|
|
283
|
+
case 'identify_language':
|
|
284
|
+
if (typeof payload.language === 'string') {
|
|
285
|
+
lines.push('language ' + payload.language + ' · confidence ' + (number(payload.confidence) ?? '?'))
|
|
286
|
+
}
|
|
287
|
+
if (typeof payload.isReliable === 'boolean') lines.push('reliable ' + String(payload.isReliable))
|
|
288
|
+
break
|
|
289
|
+
case 'suggest_emojis': {
|
|
290
|
+
const top = Array.isArray(payload.suggestions) ? payload.suggestions[0] : null
|
|
291
|
+
if (top && typeof top.emoji === 'string') {
|
|
292
|
+
lines.push(top.emoji + ' · confidence ' + (number(top.confidence) ?? '?'))
|
|
293
|
+
}
|
|
294
|
+
break
|
|
295
|
+
}
|
|
296
|
+
case 'decision_combine':
|
|
297
|
+
if (typeof payload.exit === 'string') lines.push('exit ' + payload.exit)
|
|
298
|
+
break
|
|
237
299
|
default:
|
|
238
300
|
break
|
|
239
301
|
}
|