Files
AirCoding/packages/opencode/specs/effect/instance-context.md
airlongdian c4f9fe109e fix: logo 右半部分从 CODING 改为 CODE
去掉难以正确渲染的 N 和 G 字母,右半部分简化为 CODE(4 字母),
与左半部分 AIR 组合为 AIR CODE。
2026-06-14 09:54:53 +08:00

673 B

Instance Context

Instance selection is now Effect-provided context.

Use these APIs:

  • InstanceRef for the current project context.
  • WorkspaceRef for the current workspace id.
  • InstanceState.context / InstanceState.directory inside Effect services that require an instance.
  • InstanceStore at entry boundaries that need to load, reload, or dispose project contexts.
  • EffectBridge for native, plugin, or plain JavaScript callback boundaries that need to re-enter Effect with captured refs.

Do not add new ambient instance globals. Promise and callback boundaries should either stay in Effect, use EffectBridge, or pass the required context explicitly.