Forked from OpenCode v1.17.4 with multi-agent system: - 5 agents: aircoding, scheduler, worker, architect, reviewer - Deterministic DAG scheduling engine (coordinator_tick) - Tool whitelists as hard enforcement - AirCoding validation plugin - V1 requirements: C4 docs, ADR, AGENTS.md, debug-log.md - Design documents in docs/
56 lines
1.1 KiB
TypeScript
56 lines
1.1 KiB
TypeScript
import { createStore } from "solid-js/store"
|
|
|
|
const provider = {
|
|
all: [
|
|
{
|
|
id: "anthropic",
|
|
models: {
|
|
"claude-3-7-sonnet": {
|
|
id: "claude-3-7-sonnet",
|
|
name: "Claude 3.7 Sonnet",
|
|
cost: { input: 1, output: 1 },
|
|
},
|
|
},
|
|
},
|
|
],
|
|
connected: ["anthropic"],
|
|
default: { anthropic: "claude-3-7-sonnet" },
|
|
}
|
|
|
|
const [store, setStore] = createStore({
|
|
todo: {} as Record<string, any[]>,
|
|
provider,
|
|
session: [] as any[],
|
|
config: { permission: {} },
|
|
})
|
|
|
|
export function useServerSync() {
|
|
return {
|
|
data: {
|
|
provider,
|
|
session_todo: store.todo,
|
|
},
|
|
child() {
|
|
return [store, setStore] as const
|
|
},
|
|
todo: {
|
|
set(sessionID: string, todos: any[]) {
|
|
setStore("todo", sessionID, todos)
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
export function useQueryOptions() {
|
|
return {
|
|
agents: (directory: string) => ({
|
|
queryKey: [directory, "agents"],
|
|
queryFn: async () => [],
|
|
}),
|
|
providers: (directory: string | null) => ({
|
|
queryKey: [directory, "providers"],
|
|
queryFn: async () => provider,
|
|
}),
|
|
}
|
|
}
|