command-code 1.62.0 → 1.62.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/CHANGELOG.md
CHANGED
|
@@ -217,6 +217,39 @@ fi
|
|
|
217
217
|
|
|
218
218
|
---
|
|
219
219
|
|
|
220
|
+
## Decision models (typesafe/jev)
|
|
221
|
+
|
|
222
|
+
`typesafe/jev` is available on the headless mode as a decision model. It runs headless, on your normal login, and it is free for a limited time.
|
|
223
|
+
|
|
224
|
+
It answers typed questions about a **state** with **probabilities** instead of text, so a script can branch on the number. The headless prompt is typesafe/jev's request as JSON. Request and response follow TypeSafe's [official shape](https://docs.typesafe.ai/api).
|
|
225
|
+
|
|
226
|
+
Here is an example of how to run it headlessly with cmd:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
cmd -p '{
|
|
230
|
+
"state": {"diff": "- if (user.isAdmin)\n+ if (true)"},
|
|
231
|
+
"questions": {
|
|
232
|
+
"risky": {"type": "noul", "instructions": "Does this weaken an authorization check?"},
|
|
233
|
+
"category": {"type": "choice", "instructions": "Which kind of change is this?", "criteria": {"security": "auth or secrets", "bugfix": "wrong behavior", "refactor": "no behavior change"}}
|
|
234
|
+
}
|
|
235
|
+
}' -m typesafe/jev
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"model": "typesafe/jev",
|
|
241
|
+
"answers": {
|
|
242
|
+
"risky": {"type": "noul", "noul": 0.93},
|
|
243
|
+
"category": {"type": "choice", "choice": "security", "confidence": 0.81, "probabilities": {"security": 0.8, "bugfix": 0.15, "refactor": 0.05}}
|
|
244
|
+
},
|
|
245
|
+
"usage": {"input_tokens": 360, "output_tokens": 57}
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Interactive use is refused, since Jev is not a chat model. You can find the full request and response reference on the [Provider API page](https://commandcode.ai/docs/provider#decision-models-typesafe-jev).
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
220
253
|
## Shell script
|
|
221
254
|
|
|
222
255
|
```bash
|
|
@@ -299,6 +332,7 @@ scriptable automatically. Confirmations print to stderr, keeping `-p` stdout cle
|
|
|
299
332
|
| **No interactive prompts** | No keyboard shortcuts or interactive UI. Slash commands aren't typed here - use flags instead (see [Configuring settings](#configuring-settings)); session-lifecycle commands like `/clear` and `/reload` have no meaning in one-shot mode |
|
|
300
333
|
| **No resume picker** | A bare `--resume` errors in print mode; resume by explicit id or use `--continue` |
|
|
301
334
|
| **Stdin timeout** | Piped stdin times out after 30 seconds if no data is received |
|
|
335
|
+
| **Decision models are headless only** | `typesafe/jev` answers typed questions, not chat, so it runs with `-p` only (see [Decision model: Jev](#decision-models-typesafe-jev)) |
|
|
302
336
|
|
|
303
337
|
---
|
|
304
338
|
|