Skip to content

make /init a default slash command on server side#3677

Merged
rekram1-node merged 2 commits intodevfrom
port-init
Nov 1, 2025
Merged

make /init a default slash command on server side#3677
rekram1-node merged 2 commits intodevfrom
port-init

Conversation

@rekram1-node
Copy link
Copy Markdown
Collaborator

closes: #3637

@rekram1-node rekram1-node merged commit 041353f into dev Nov 1, 2025
5 checks passed
@rekram1-node rekram1-node deleted the port-init branch November 1, 2025 06:14
junkfactory pushed a commit to junkfactory/opencode that referenced this pull request Nov 2, 2025
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
kitlangton added a commit that referenced this pull request May 3, 2026
Move the Command.Event.Executed → setInitialized wiring out of
InstanceBootstrap.run and into Project.init(), making bootstrap
uniform: every per-instance setup is just `s.init()` for some service.

The subscription was added in #3677 directly to bootstrap when it was
still a Promise function. With Project as a proper Effect Service it
belongs there — the project is listening to its own /init event.

Project.layer now requires Bus.Service in R; defaultLayer adds
Layer.provide(Bus.defaultLayer) so consumers don't need to know.
kitlangton added a commit that referenced this pull request May 3, 2026
Move the Command.Event.Executed → setInitialized wiring out of
InstanceBootstrap.run and into Project.init(), making bootstrap
uniform: every per-instance setup is just `s.init()` for some service.

The subscription was added in #3677 directly to bootstrap when it was
still a Promise function. With Project as a proper Effect Service it
belongs there — the project is listening to its own /init event.

Project.layer now requires Bus.Service in R; defaultLayer adds
Layer.provide(Bus.defaultLayer) so consumers don't need to know.
kitlangton added a commit that referenced this pull request May 3, 2026
Move the Command.Event.Executed → setInitialized wiring out of
InstanceBootstrap.run and into Project.init(). The subscription was
added in #3677 directly to bootstrap when it was still a Promise
function. With Project as a proper Effect Service it belongs there —
the project is listening to its own /init event.

Implementation matches the established InstanceState.make pattern (same
shape as ShareNext, MCP, Plugin, etc.): the make body holds the
subscription via Effect.forkScoped against the per-instance state
scope, and init() just materializes the state. The public
Interface.init returns Effect<void> — no Scope leak.

Project.layer now requires Bus.Service in R; defaultLayer adds
Layer.provide(Bus.defaultLayer) so consumers don't need to know.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenTUI: /init command is missing in v1.0.x

1 participant