aKode 0.9.1: correzioni dalla prova di Fourier (apply_patch, write_file, errori visibili, rete dei pacchetti)

- apply_patch tollerante: aggiunge '*** Begin Patch'/'*** End Patch' mancanti quando
  il contenuto inizia con Add/Update/Delete File, toglie i recinti ```; ogni altra
  ambiguità resta un errore; riga con il formato e un esempio negli errori di formato.
- Strumento write_file (path + contenuto) sulla pipeline di apply_patch (stesse
  verifiche, sandbox, approvazioni e hook), [tools] write_file (predefinito attivo);
  dopo la scrittura ricorda al modello di verificare il file.
- Chiamate a strumento fallite visibili nella TUI ("✗ strumento: motivo · riprovo").
- Avanzamento mentre il modello scrive una chiamata lunga ("Scrivo file · N token")
  e stato del gateway imeAI ("In coda…", "Leggo il prompt · 42%").
- write_stdin con id inesistente: elenca le sessioni aperte e indica exec_command o
  write_file; descrizione più chiara.
- Protezione dai loop: un avviso al modello prima di fermare il turno.
- Sandbox predefinita: rete attiva solo verso i registri dei pacchetti attraverso il
  proxy di rete ([features.network_proxy] nei default impacchettati); scritture
  invariate; nota al modello sugli errori di rete in sandbox.
- Testi della TUI in italiano (benvenuto, segnaposto, suggerimenti, «Errore fatale»).
- Test adattati ai nuovi default (rete del profilo :workspace, allowlist), snapshot e
  schemi rigenerati.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-16 23:01:42 +01:00
parent 1c278642de
commit 3df68b5842
282 changed files with 2750 additions and 707 deletions

View File

@@ -3538,6 +3538,49 @@
}
]
},
"ServerProgressNotification": {
"description": "aKode: a local server is queueing the request or reading the prompt.",
"properties": {
"ahead": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"etaS": {
"format": "double",
"type": [
"number",
"null"
]
},
"kind": {
"description": "`queue` or `prefill`.",
"type": "string"
},
"percent": {
"format": "double",
"type": [
"number",
"null"
]
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"kind",
"threadId",
"turnId"
],
"type": "object"
},
"ServerRequestResolvedNotification": {
"properties": {
"requestId": {
@@ -6185,6 +6228,44 @@
],
"type": "object"
},
"ToolCallInputProgressNotification": {
"description": "aKode: the model is still generating the arguments of a tool call.",
"properties": {
"callId": {
"type": "string"
},
"target": {
"description": "File or target recognized in the partial arguments, if any.",
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"tokens": {
"description": "Approximate number of argument tokens generated so far.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"toolName": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"callId",
"threadId",
"tokens",
"toolName",
"turnId"
],
"type": "object"
},
"Turn": {
"properties": {
"completedAt": {
@@ -7719,6 +7800,46 @@
"title": "Item/fileChange/patchUpdatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/toolCall/inputProgress"
],
"title": "Item/toolCall/inputProgressNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ToolCallInputProgressNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/toolCall/inputProgressNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"turn/serverProgress"
],
"title": "Turn/serverProgressNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ServerProgressNotification"
}
},
"required": [
"method",
"params"
],
"title": "Turn/serverProgressNotification",
"type": "object"
},
{
"properties": {
"method": {

View File

@@ -5270,6 +5270,46 @@
"title": "Item/fileChange/patchUpdatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/toolCall/inputProgress"
],
"title": "Item/toolCall/inputProgressNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ToolCallInputProgressNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/toolCall/inputProgressNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"turn/serverProgress"
],
"title": "Turn/serverProgressNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ServerProgressNotification"
}
},
"required": [
"method",
"params"
],
"title": "Turn/serverProgressNotification",
"type": "object"
},
{
"properties": {
"method": {
@@ -18553,6 +18593,51 @@
],
"type": "object"
},
"ServerProgressNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "aKode: a local server is queueing the request or reading the prompt.",
"properties": {
"ahead": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"etaS": {
"format": "double",
"type": [
"number",
"null"
]
},
"kind": {
"description": "`queue` or `prefill`.",
"type": "string"
},
"percent": {
"format": "double",
"type": [
"number",
"null"
]
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"kind",
"threadId",
"turnId"
],
"title": "ServerProgressNotification",
"type": "object"
},
"ServerRequestResolvedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -24161,6 +24246,46 @@
],
"type": "object"
},
"ToolCallInputProgressNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "aKode: the model is still generating the arguments of a tool call.",
"properties": {
"callId": {
"type": "string"
},
"target": {
"description": "File or target recognized in the partial arguments, if any.",
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"tokens": {
"description": "Approximate number of argument tokens generated so far.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"toolName": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"callId",
"threadId",
"tokens",
"toolName",
"turnId"
],
"title": "ToolCallInputProgressNotification",
"type": "object"
},
"ToolExposureSurface": {
"description": "A model-facing surface on which a tool can be exposed.",
"oneOf": [

View File

@@ -15586,6 +15586,46 @@
"title": "Item/fileChange/patchUpdatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/toolCall/inputProgress"
],
"title": "Item/toolCall/inputProgressNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ToolCallInputProgressNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/toolCall/inputProgressNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"turn/serverProgress"
],
"title": "Turn/serverProgressNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ServerProgressNotification"
}
},
"required": [
"method",
"params"
],
"title": "Turn/serverProgressNotification",
"type": "object"
},
{
"properties": {
"method": {
@@ -16378,6 +16418,51 @@
},
"title": "ServerNotification"
},
"ServerProgressNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "aKode: a local server is queueing the request or reading the prompt.",
"properties": {
"ahead": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"etaS": {
"format": "double",
"type": [
"number",
"null"
]
},
"kind": {
"description": "`queue` or `prefill`.",
"type": "string"
},
"percent": {
"format": "double",
"type": [
"number",
"null"
]
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"kind",
"threadId",
"turnId"
],
"title": "ServerProgressNotification",
"type": "object"
},
"ServerRequestResolvedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
@@ -21986,6 +22071,46 @@
],
"type": "object"
},
"ToolCallInputProgressNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "aKode: the model is still generating the arguments of a tool call.",
"properties": {
"callId": {
"type": "string"
},
"target": {
"description": "File or target recognized in the partial arguments, if any.",
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"tokens": {
"description": "Approximate number of argument tokens generated so far.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"toolName": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"callId",
"threadId",
"tokens",
"toolName",
"turnId"
],
"title": "ToolCallInputProgressNotification",
"type": "object"
},
"ToolExposureSurface": {
"description": "A model-facing surface on which a tool can be exposed.",
"oneOf": [

View File

@@ -0,0 +1,45 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "aKode: a local server is queueing the request or reading the prompt.",
"properties": {
"ahead": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"etaS": {
"format": "double",
"type": [
"number",
"null"
]
},
"kind": {
"description": "`queue` or `prefill`.",
"type": "string"
},
"percent": {
"format": "double",
"type": [
"number",
"null"
]
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"kind",
"threadId",
"turnId"
],
"title": "ServerProgressNotification",
"type": "object"
}

View File

@@ -0,0 +1,40 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "aKode: the model is still generating the arguments of a tool call.",
"properties": {
"callId": {
"type": "string"
},
"target": {
"description": "File or target recognized in the partial arguments, if any.",
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"tokens": {
"description": "Approximate number of argument tokens generated so far.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"toolName": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"callId",
"threadId",
"tokens",
"toolName",
"turnId"
],
"title": "ToolCallInputProgressNotification",
"type": "object"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* aKode: a local server is queueing the request or reading the prompt.
*/
export type ServerProgressNotification = { threadId: string, turnId: string,
/**
* `queue` or `prefill`.
*/
kind: string, percent: number | null, etaS: number | null, ahead: bigint | null, };

View File

@@ -0,0 +1,16 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* aKode: the model is still generating the arguments of a tool call.
*/
export type ToolCallInputProgressNotification = { threadId: string, turnId: string, callId: string, toolName: string,
/**
* File or target recognized in the partial arguments, if any.
*/
target: string | null,
/**
* Approximate number of argument tokens generated so far.
*/
tokens: bigint, };

View File

@@ -401,6 +401,7 @@ export type { SendAddCreditsNudgeEmailParams } from "./SendAddCreditsNudgeEmailP
export type { SendAddCreditsNudgeEmailResponse } from "./SendAddCreditsNudgeEmailResponse";
export type { ServerDiagnosticsGauge } from "./ServerDiagnosticsGauge";
export type { ServerDiagnosticsProcess } from "./ServerDiagnosticsProcess";
export type { ServerProgressNotification } from "./ServerProgressNotification";
export type { ServerRequestResolvedNotification } from "./ServerRequestResolvedNotification";
export type { SessionMigration } from "./SessionMigration";
export type { SessionSource } from "./SessionSource";
@@ -566,6 +567,7 @@ export type { ThreadUnsubscribeStatus } from "./ThreadUnsubscribeStatus";
export type { ThreadUsage } from "./ThreadUsage";
export type { ThreadUsageBreakdownGroup } from "./ThreadUsageBreakdownGroup";
export type { TokenUsageBreakdown } from "./TokenUsageBreakdown";
export type { ToolCallInputProgressNotification } from "./ToolCallInputProgressNotification";
export type { ToolRequestUserInputAnswer } from "./ToolRequestUserInputAnswer";
export type { ToolRequestUserInputOption } from "./ToolRequestUserInputOption";
export type { ToolRequestUserInputParams } from "./ToolRequestUserInputParams";