refactor(opencode): remove instruction apparatus; add wire dialects from scratch

- delete instruction.ts, reminders.ts, system.ts, message.ts (dead or injector)
- read tool no longer appends <system-reminder> context from ancestor files
- prompt.ts assembles system context via SessionContext with provenance tags
- llm/request.ts uses base prompt constant directly
- provider/dialects/: raw-HTTP wire dialects (anthropic, openai,
  openai-compatible) + registry - no vendor SDK participation
- provider.ts: BUNDLED_PROVIDERS cut to three SDKs pending dialect cutover
This commit is contained in:
2026-08-22 17:42:51 -05:00
parent cfca4cec19
commit b5b202be3b
19 changed files with 295 additions and 791 deletions
@@ -1,19 +0,0 @@
const raw = process.argv[2]
if (!raw) throw new Error("Missing worker payload")
const value = JSON.parse(raw)
if (!value || typeof value !== "object") {
throw new Error("Invalid worker payload")
}
const msg = Object.fromEntries(Object.entries(value))
if (typeof msg.file !== "string" || typeof msg.spec !== "string" || typeof msg.target !== "string") {
throw new Error("Invalid worker payload")
}
if (typeof msg.id !== "string") throw new Error("Invalid worker payload")
process.env.OPENCODE_PLUGIN_META_FILE = msg.file
const { PluginMeta } = await import("../../src/plugin/meta")
await PluginMeta.touch(msg.spec, msg.target, msg.id)