Abgleich mit dem Vault-Stand a201514
16 Datei(en) geändert. Erzeugt von .vault-tools/auto-push/werkzeuge_spiegel.py.
This commit is contained in:
1 parent
fb8bc625e3
commit
4d90e6be60
16 files changed
+781
-36
No files matched your search
@@ -14,16 +14,25 @@
|
||||
// - agent() mit schema braucht type object und properties, required muss in properties stehen.
|
||||
// Ein Ergebnis ohne die required-Felder wird wie ein gescheiterter Agent zu null.
|
||||
// - parallel() ist eine Barriere; ein werfender Thunk wird zu null.
|
||||
// - agent() mit einem agentType, den die Sitzung nicht kennt, wirft vor dem Start (CLI-Abbild
|
||||
// 2.1.299). Bekannt sind die Agentendateien unter .claude/agents/ des Vaults oder optionen.agenten.
|
||||
// Zusätzlich als Verstoß protokolliert (Stamm, "Agenten & Modelle"): agent() ohne model.
|
||||
// Was die Attrappe nicht nachbildet: die Obergrenze gleichzeitiger Agenten je Lauf, Budget,
|
||||
// Resume und das Verhalten echter Modelle. Sie ist ein Fangnetz für die Steuerlogik der
|
||||
// Skripte, kein Nachweis für einen echten Lauf.
|
||||
import { readFileSync, existsSync } from 'node:fs'
|
||||
import { readFileSync, existsSync, readdirSync } from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor
|
||||
// Aufrufe über den echten Pfad werden in den Ordner unter Test umgeleitet.
|
||||
const ECHTER_ORDNER = 'D:/Claude/.claude/workflows/'
|
||||
// Agententypen wie in der Sitzung: die Agentendateien des Vaults neben den Workflows. Fehlt der
|
||||
// Ordner, ist jeder agentType unbekannt und jeder Fall damit rot: ein Befund, kein Durchlass.
|
||||
const AGENTEN_ORDNER = path.join(ECHTER_ORDNER, '..', 'agents')
|
||||
function agentenDesVaults() {
|
||||
if (!existsSync(AGENTEN_ORDNER)) return []
|
||||
return readdirSync(AGENTEN_ORDNER).filter(n => n.endsWith('.md')).map(n => n.slice(0, -3))
|
||||
}
|
||||
|
||||
class DatumAttrappe extends Date {
|
||||
constructor(...a) {
|
||||
@@ -51,6 +60,7 @@ const warte = ms => new Promise(r => setTimeout(r, ms))
|
||||
// aufruf trägt label, phase, modell, effort, agentType, prompt, tiefe und schema.
|
||||
export async function fuehreAus(datei, args, antworte, optionen = {}) {
|
||||
const ordner = optionen.ordner || path.dirname(datei)
|
||||
const agenten = optionen.agenten || agentenDesVaults()
|
||||
const protokoll = { agents: [], logs: [], phasen: [], verstoesse: [], spitze: {}, spitzeJePhase: {}, workflows: [] }
|
||||
const laufend = {}
|
||||
const laufendJePhase = {}
|
||||
@@ -82,6 +92,7 @@ export async function fuehreAus(datei, args, antworte, optionen = {}) {
|
||||
if (!opts.schema || opts.schema.type !== 'object' || !opts.schema.properties) throw new Error('Schema braucht type object und properties: ' + opts.label)
|
||||
if ((opts.schema.required || []).some(k => !(k in opts.schema.properties))) throw new Error('required nicht in properties: ' + opts.label)
|
||||
}
|
||||
if (opts.agentType != null && !agenten.includes(String(opts.agentType))) throw new Error(`agent({agentType}): agent type '${opts.agentType}' not found. Available agents: ${agenten.join(', ')}`)
|
||||
const modell = opts.model || '(erbt)'
|
||||
const phase = kindPhase || opts.phase || aktuellePhase || '(ohne)'
|
||||
const eintrag = { label: opts.label || null, phase, modell, effort: opts.effort, agentType: opts.agentType, prompt, tiefe, start: ++uhr, ende: null, ergebnis: undefined }
|
||||
|
||||
Reference in new issue
Block a user