Dashboard › opencode › Distillation
8171e4bd-58bf-48c2-b2e9-1195bf03685c["lore_tm_v1_vrEKjkJaUQpDa6_Gy3qz1mLDBtoS4XmLv9Ye5zxeKEY","lore_tm_v1_q2avH2yjswogCR2ps3AApnDI6IP-3thzfR7-fh-gSXA","lore_tm_v1_4BeoMlRcPedXxw9EsOtjhoWUFEwryxEJcWg4aB74p_I","lore_tm_v1_SDfqXTEFc4puW-S2qz0XwpYIDrpMb1_cSSNj-85LFZM","lore_tm_v1_hv-0yv723cqU5tdoHG9CLrEcyMuJaaH2V1DN3mBy2ac","lore_tm_v1_kTjmAztlg2MuJwFQKcndvfiz4U5cLoX69xRnmH-0d2M","lore_tm_v1_qpbwYpH8EiLdv0VTU2-vQ2U6fmMpdbq5JfwF1G71f_M","lore_tm_v1__tRQeHkGFHowR_SUKFKjTV3vRG0d4Mmlcmfe1coPLAc","lore_tm_v1_lt1OWoz1o-ukHjzlxDUkP2U4TWGgipKs8bJBZMyRKXc","lore_tm_v1_eCuzXi3H-4cg5mtVGLpCQPQbB0AvjaWRTEiQ37xFwCo"]
Date: Sep 8, 2026
packages/core/test/plugin.test.ts, importing Cause, Exit, Schema, Agent, Permission, SessionMessage, Tool, and pluginTestLayer."exposes canonical permission assertions to Promise plugins": activates Promise plugin promise-permission, calls ctx.permission.assert() with sessionID=ses_plugin_permission, action=shell, resources=["'true'"], and tool source { messageID: "msg_plugin_permission", id: "call_plugin_permission" }; waits through a Deferred and verifies the plugin remains active."preserves Promise permission assertion outcomes through tool execution" using activated Promise plugin promise-permission-tool and a dynamically registered permission tool with Schema.Struct({ action: Schema.String }) and options: { codemode: false }.corrected fails with Permission.CorrectedError({ feedback: "Use a read-only command instead" }); action declined dies with Permission.DeclinedError; action defect dies with Error("permission assertion defect"); all other actions succeed with Effect.void.allow returns { content: [{ type: "text", text: "allowed" }] }; corrected becomes a Tool.Error whose exact message is "Use a read-only command instead"; both defect and plain declined produce failed exits with Cause.hasDies(...) === true and Cause.hasFails(...) === false.packages/core/test/plugin/fixture.ts to export pluginTestLayer(assert: Permission.Interface["assert"] = () => Effect.void), inject the supplied assert into Permission.Service, return the existing AppNodeBuilder.build(...) fixture, and define PluginTestLayer = pluginTestLayer() to preserve default behavior.tsgo -b tsconfig.json tsconfig.tests.json; command completed without diagnostics.test/plugin.test.ts run under Bun 1.3.14 (0d9b296a) passed: 19 tests, 0 failures, 65 expect() calls, 1 file, 2.59s.tsgo -b tsconfig.json tsconfig.tests.json; command completed without diagnostics.expect() calls, 1 file, 1.82s.Permission.CorrectedError.feedback becomes the exact Tool.Error.message; ordinary defects remain defects rather than typed tool failures; plain Permission.DeclinedError retains its established defect tunnel.packages/core/src/plugin/host.ts, packages/core/test/plugin.test.ts, packages/core/test/plugin/fixture.ts, packages/core/test/plugin/host.ts, packages/plugin/src/effect/permission.ts, packages/plugin/src/promise/adapter.ts, and packages/plugin/src/promise/permission.ts; untracked directories were packages/cli/dist-v2-pilot-final/, packages/cli/dist-v2-pilot-next/, and packages/cli/dist-v2-pilot/.git diff --check passed.