Initial commit: a0_software_orchestrator v1.0
- Auto-Registration-Bug behoben (register_project/get_project_id/resolve_project Trennung) - 25 Tests gruen (Pytest) - block_compactor-Tool refactored (Option B: Soft-Check statt Hard-Block) - 4 Restbaustellen gefixt - DB-Schema: plugin_settings-Tabelle hinzugefuegt - 3 Schattenprojekte aus DB geloescht - Plan v3 + Refactor-Plan + Worklog dokumentiert
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
import { createStore } from "/js/AlpineStore.js";
|
||||
import {
|
||||
toastFrontendError,
|
||||
toastFrontendSuccess,
|
||||
toastFrontendWarning,
|
||||
toastFrontendInfo
|
||||
} from "/components/notifications/notification-store.js";
|
||||
|
||||
export const store = createStore("a0SoftwareOrchestratorStore", {
|
||||
status: "idle",
|
||||
projectState: null,
|
||||
modelRouting: {},
|
||||
toolCapabilities: {},
|
||||
auditStatus: {},
|
||||
|
||||
init() {
|
||||
this.status = "initialized";
|
||||
},
|
||||
|
||||
onOpen() {
|
||||
this.status = "active";
|
||||
this.loadStatus();
|
||||
},
|
||||
|
||||
cleanup() {
|
||||
this.status = "idle";
|
||||
},
|
||||
|
||||
async loadStatus() {
|
||||
try {
|
||||
this.status = "loading";
|
||||
// In v0.1, load from API endpoints
|
||||
// TODO: wire to actual API calls
|
||||
toastFrontendInfo("Orchestrator status loaded", "A0 Software Orchestrator");
|
||||
} catch (e) {
|
||||
toastFrontendError(e.message, "A0 Software Orchestrator");
|
||||
} finally {
|
||||
this.status = "active";
|
||||
}
|
||||
},
|
||||
|
||||
async saveModelRouting(role, preset) {
|
||||
try {
|
||||
const response = await fetch("/api/plugins/a0_software_orchestrator/model_routing_save", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ role, preset })
|
||||
});
|
||||
const data = await response.json();
|
||||
if (data.ok) {
|
||||
toastFrontendSuccess(`Model routing updated: ${role} -> ${preset}`, "A0 Software Orchestrator");
|
||||
} else {
|
||||
toastFrontendError(data.error || "Save failed", "A0 Software Orchestrator");
|
||||
}
|
||||
} catch (e) {
|
||||
toastFrontendError(e.message, "A0 Software Orchestrator");
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user