Dashboard › opencode › Distillation
f12b3742-48eb-4fa2-bafc-e62bbfc37f6b["lore_tm_v1_nJq4FSEOb2k9C1JP0EfxfrrD0QIfJJ6N23TQzM7_2jc","lore_tm_v1_YOmnT4fCVi7dvnENrFNnF_CDfjnrisbM-d1JxKCIRT0","lore_tm_v1_jKdMOi3MdNe1udkUkkVzdb3Hkls1ud_QS9r1mB3VEd4","lore_tm_v1_BTD7umwrtn-rjX6N1ry9JNIiXyzpDXKXtm1opBx1yqE","lore_tm_v1_jYv6IW_3Fa7GUrV-wYdzHAMwBr6O5_tzKsGy6Cm7fsw","lore_tm_v1__6NGhoFLXhGqS8Mzv0JRpcaeOK9wqEqjSQrfCG6edak","lore_tm_v1_cjyl9dP3L2lxXnqtDBqT6UH0KiouK87aD2NfL8G1pB0","lore_tm_v1_nYuSmYSrFA1K2FZNaKlvISqVC_C72NPp5fPe658Y9LQ","lore_tm_v1_1X8De6V24oOt9HnHH1Dsda4CnNwpVzetPtdrYk07hMg","lore_tm_v1_fG5G4RL2OSp5SwtkTLVXkNUSef4rt9ofaYrytYDXQTY","lore_tm_v1_QtAg32u4pLFwod7pFh0QXWhH6mVSCN2p6AukZ_pjylI","lore_tm_v1_RQSbaD0SOBkqWxzrppjY4_WslwTZ4jPimQDjQy7mXAk","lore_tm_v1_Wp8AFu3wSh5IdrQDZga6urMeG8aUsAg5YjvuiFdTXio","lore_tm_v1_j_VCVDn_rjvMNcKEYQCrV4pGUCTr24A0Xl2H9A-DROU","lore_tm_v1_Hu59qoYLQhilJPb4zYpfSLoaoWjg6VkeV7xXIW8WX4c","lore_tm_v1_81pcqjgT4yei9KUHZpbLFIbhY6pTV7aodrRQ6CULu7c","lore_tm_v1_aWAcynFYcQy4vlu-hH0Hp2DeuW80bUYxVgsK_XrWwuc","lore_tm_v1_UQtKsG1lVdWl4m5yge3NNI2QT5vF9SIWeJBFPPzlzQ8","lore_tm_v1_NHAx9W_f4bgNcswP5VXOde_Vs05E5DSDZRf2QaXQ51Q","lore_tm_v1_8rGyhCiOkeuTo0g7YcT205G_gEBxT3Wv5u5Czx7GCX4","lore_tm_v1_rWFlp0QVh8eGwcQA4WXeyMk1NC9Sx_CXafPE5mexaHk","lore_tm_v1_MNseJ4yXUHd8U3PiF-42bWjxUug8PEwwsboH80Iwj9g","lore_tm_v1_cDCNaKnZVc0h0PjMfpNzsM7K4SLD5tgTWRsAjwuDunU","lore_tm_v1_UqvFg4TiAqdr27Hy8rXPYMKq8QhwWDZJl6U2GLOJHZM","lore_tm_v1_MwMKypAuXEz5cFZuVWGp4Z2HSPdc40eIJuVc_lUQBgw","lore_tm_v1_tXavY4vu-vgdJPVynObPQi60axGJ-tNnWkq1aKUPkrs","lore_tm_v1_1tHyH4IXld8Mo8G4LJKymh_4UmlugoWMBmxiMP-eK0s","lore_tm_v1_xnnLMglebkIQsUE5P0PHk9VxX9wpAGF7iVxuoE93lT0","lore_tm_v1_mguY1waSBQumNlsktokG6ysEjnYGnUNWmK-AfvKn-do","lore_tm_v1_S9xb0RmK-dUPv3pQW9KUySWjRSm38vDAinaSVaO1nTk","lore_tm_v1_09BySwHRC826NOBrPAPZxoMj7Ct2abtBKJtgGftqY_8","lore_tm_v1_GKwinKobO-fguAQHT5L-7VaY5djEcfTWdHz00gF3LQw","lore_tm_v1_qOzr9-G853o3xM8A270Pevgdke9TFSUn_VLeH6KYVDU","lore_tm_v1_2LbVq3cpCtR8QOuxVWyZGIcq0WrUOf2NFm3uitF_yMk","lore_tm_v1_Inr16fw83bLjux2NI8gZAZ7kgUhSTBa1-EdfHzCTe2w","lore_tm_v1_-4gKsV4e7rduh_lODqz7msiVtzzRiVNZj9pSwWWWbek","lore_tm_v1_NVkWLi6j0dF6EGras0xirEom0uNaBWH_0nrI9uaFnIs"]
/home/byk/Code/opencode-v2-pilot/packages/core/src/agent.ts defines SHELL_OUTPUT_GLOB(data) as path.join(data, "shell", "*", "*"), TOOL_OUTPUT_GLOB(data) as path.join(data, "tool-output", "*"), and Agent.defaultID as ID.make("build")./home/byk/Code/opencode-v2-pilot/packages/core/src/agent.ts defines Editor methods list(), get(id), default(id), update(id, fn), and remove(id); Interface adds Effect-based get, resolve, select, and list and extends State.Transformable<Editor>.Agent.Service layer grants external_directory access to SHELL_OUTPUT_GLOB(global.data), TOOL_OUTPUT_GLOB(global.data), path.join(global.tmp, "*"), and path.join(global.config, "*").Agent.Service stores agents in Map<ID, Types.DeepMutable<Info>>; editor.update() creates missing agents with Info.default(id) plus global permissions, applies the callback, and resets current.id = id; state changes publish Agent.Event.Updated.mode === "subagent" or hidden === true; selection order is configured default, agent ID "build", then the first selectable agent.TypeError: Body is unusable: Body has already been read at _Request.text, indicating the request body was consumed more than once./home/byk/Code/opencode-lore-v2/packages/core/src/git.ts enforces that directive in getGitRemote(path) by returning null immediately when isHostedMode() is true, before cache lookup or execSync("git remote -v", { cwd: path, encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] }).getGitRemote(path) caches results for process lifetime, parses only git remote -v fetch lines using /^(\S+)\s+(\S+)\s+\(fetch\)$/, and chooses origin, then upstream, then any other remote.origin over upstream: unrelated repositories bootstrapped or forked from a shared template may share upstream, so upstream-first identity could falsely merge distinct projects; an incorrect merge is considered worse than failing to unify a genuine fork with its source.getGitRemote(path) normalizes the chosen URL with normalizeRemoteUrl(url) and returns/caches null for no remotes, missing URL, non-repositories, unavailable Git, timeout, or other exceptions; clearGitRemoteCache() clears the in-memory cache./home/byk/Code/opencode-lore-v2/packages/core/src/workspace.ts defines discoverWorkspaceRoot(startDir) with marker priority: 1. .lore.json containing workspaces; 2. VCS markers such as .git, .hg, .svn, and .jj; 3. workspace markers such as pnpm-workspace.yaml and nx.json; 4. language markers such as package.json and pyproject.toml, where closest wins.discoverWorkspaceRoot(startDir) returns startDir unchanged in hosted mode to avoid filesystem traversal with client-controlled paths; otherwise it resolves and caches the path, stops before claiming os.homedir() as a project, detects cycles via realpathSync() and a Set, and stops on broken symlinks or permission errors./home/byk/Code/opencode-lore-v2/packages/gateway/src/config.ts permits arbitrary upstream URLs only when both remoteGateway and hostedMode are false; otherwise the URL must use HTTPS and its origin must appear in callerUpstreamAllowlist.extractUpstreamUrlHeader(headers) reads "x-lore-upstream-url", strips control characters with /[\x00-\x1f\x7f]/g, trims whitespace, rejects empty or over-MAX_UPSTREAM_URL_LENGTH values, accepts only HTTP(S), rejects embedded username/password credentials, removes trailing slashes and a terminal /v1, and returns url.origin + pathname.upstreamUrlForLog(value) returns "none" for absent values, "invalid" for malformed or non-HTTP(S) values, and otherwise ${url.origin}${url.pathname}, thereby excluding credentials and non-routing URL components from diagnostic logs.node-domexception@1.0.0 was reported as a deprecated subdependency and the build script for msgpackr-extract@3.0.4 was ignored.lore and lore-gateway binaries because /home/byk/Code/opencode-lore-v2/packages/gateway/dist/bin.cjs did not exist; the root postinstall ran pnpm --filter @loreai/gateway run build, whose tsx script/build.ts generated development shims index.bun.js, embedding-worker.js, and vector-worker.js, but binary-link warnings persisted for the missing dist/bin.cjs./home/byk/Code/opencode-lore-v2/packages/opencode/package.json defines package @loreai/opencode version 0.40.0, ESM type, license FSL-1.1-Apache-2.0, description "Three-tier memory architecture for OpenCode β distillation, not summarization", and raw-TypeScript entry/export ./src/index.ts.@loreai/opencode scripts are "typecheck": "tsc --noEmit" and "build": "echo '@loreai/opencode ships raw TS β no build step needed'"; dependencies are @loreai/core and @loreai/gateway at workspace:*; peer dependency is @opencode-ai/plugin >=1.1.0; dev dependencies include @opencode-ai/plugin ^1.1.39, @opencode-ai/sdk ^1.1.39, @opencode/plugin 0.0.0-beta-19378, and @types/bun ^1.2.0.@loreai/opencode publishes src/, README.md, and LICENSE, uses public access, points to git+https://github.com/BYK/loreai.git under packages/opencode, and lists author BYK.@opencode/plugin version 0.0.0-beta-19378 contains only dist/ and package.json; its package exports map "." to ./dist/promise/index.js, "./effect" to ./dist/effect/index.js, "./host" to ./dist/host.js, "./tui" to ./dist/tui/index.js, and wildcard imports to ./dist/*.js.@opencode/plugin version 0.0.0-beta-19378 depends on effect 4.0.0-rc.112, zod 4.1.8, @ai-sdk/provider 3.0.8, and matching 0.0.0-beta-19378 versions of @opencode/ai, @opencode/client, @opencode/protocol, @opencode/schema, and @opencode/util./home/byk/Code/opencode-lore-v2/packages/opencode/node_modules/@opencode/plugin/dist/promise/plugin.d.ts defines plugin Context domains app, location, options, agent, aisdk, catalog, command, event, experimental.terminal.read, integration, mcp, generate, permission, plugin.list, reference, rpc, session, shell, skill, storage, tool, vcs, websearch, and worktree.Cleanup = () => Promise<void> | void; a Plugin has readonly id and setup(context) returning Promise<Cleanup | void> | Cleanup | void; define(plugin) returns a Plugin./home/byk/Code/opencode-lore-v2/packages/opencode/node_modules/@opencode/plugin/dist/promise/agent.d.ts defines AgentEditor with mutable list, get, default, update, and remove; AgentDomain extends AgentApi with transform: Transform<AgentEditor> and reload(): Promise<void>.@opencode/schema/agent from /home/byk/Code/opencode-lore-v2 failed with MODULE_NOT_FOUND under Node.js v24.16.0; expected package locations under both packages/opencode/node_modules and the workspace root were absent.tsc --noEmit for /home/byk/Code/opencode-lore-v2/packages/opencode failed with exit code 2, primarily because workspace dependencies were not fully installed; missing modules included zod, @noble/ciphers/chacha.js, @noble/ciphers/utils.js, @noble/curves/ed25519.js, @noble/hashes/argon2.js, @hpke/core, sqlite-vec, uuidv7, pickleparser, remark, mdast, micromark, p-limit, ai-tokenizer and its encodings, unbash, @sentry/bun, undici, @supabase/supabase-js, @streamparser/json, and google-auth-library.packages/core/src/import/sources/mem0.ts:255 TS2347; packages/core/src/lat-reader.ts:58-59 TS7006; packages/core/src/ltm.ts:214 TS2345 and :216 TS2322 for string | null; packages/gateway/src/batch-queue.ts:1037, llm-adapter.ts:3811, and sentry.ts:924,1005 TS7006; pipeline.ts:13078-13081,13090 TS2339 and :13092 TS2345; openai-responses.ts:368 TS7006; and vertex-auth.ts:136-137 TS2322.@google/genai@1.52.0 and msgpackr-extract@3.0.4; it again generated gateway development shims but continued warning that lore and lore-gateway binaries could not be linked because dist/bin.cjs was absent.@opencode/schema package from packages/opencode still failed with ERR_MODULE_NOT_FOUND./home/byk/Code/opencode-lore-v2/packages/opencode/node_modules/@opencode/plugin/dist/promise/session.d.ts defines session hooks prompt, context, "model.request", "http.request", "http.response", and retry; request kinds are exactly "primary" | "compaction" | "title" | "generate".SessionContext exposes sessionID, agent, model, mutable system, messages, tools, generation settings, and provider options; SessionModelRequest can mutate baseURL and headers; HTTP hooks can mutate request or response; retry decisions are { retry: false } or { retry: true, delay: number }.SessionDomain exposes create, get, switchAgent, switchModel, prompt, generate, command, synthetic, interrupt, rename, move, wait, and context, plus hook: ModelHooks<SessionHooks>./home/byk/Code/opencode-lore-v2/packages/opencode/node_modules/@opencode/plugin/dist/promise/registration.d.ts defines Registration.dispose(): Promise<void>, provider-scoped ModelHookOptions.providerID?, asynchronous Hooks<Spec> and ModelHooks<Spec> registration, and Transform<Input> returning Promise<Registration>./home/byk/Code/opencode-v2-pilot/packages/schema/src/agent.ts defines branded string Agent.ID and Agent.Name, string Agent.Color, and Agent.Info fields id, name, optional model, request, optional system, optional description, mode, hidden, optional color, optional positive-integer steps, and permissions.Agent.Info.default(id) sets name from the ID, empty request settings/headers/body, mode: "primary", hidden: false, and ordered permissions: 1. allow all actions/resources; 2. ask for external_directory on "*"; 3. ask to read "*.env"; 4. ask to read "*.env.*"; 5. allow reading "*.env.example"."agent.updated" and exports it through Agent.Event.Updated and Agent.Event.Definitions./home/byk/Code/opencode-v2-pilot/packages/core/src/config/plugin/agent.ts subscribes eagerly to config changes and "config.updated" events, publishes into PubSub.sliding<void>(1), debounces updates for "100 millis", and invokes agent reload.global.home, sets default_agent via editor.default(Agent.ID.make(configuredDefault)), and appends global configured permissions to every existing agent.disabled; otherwise it creates or updates the agent, applies shared permissions once to newly created agents, and conditionally merges model, model variant, request headers/body, system, description, mode, hidden, color, steps, and expanded per-agent permissions.<root>/{agent,agents,mode,modes} without checking file suffixes so directory rename events are handled.$HOME in shell commands requires shell-aware parsing. expandHome() recognizes "~", "$HOME", "~/", "$HOME/", and "$HOME\\".