Sdk koder ipc

koder_ipc / KoderIPC Protocol

  • *rea:*Developer Platform
  • *ath:*engines/sdk/koder_ipc, spec at meta/docs/stack/specs/ipc/protocol.kmd
  • *ind:*IPC protocol + multilanguage SDK — interapp communication for the Koder ecosystem
  • *ersion:*0.2.0

Role in the stack

KoderIPC is the inter-app communication layer for the Koder Stack. It enables any Koder app — regardless of language or platform — to send and receive structured messages from other Koder apps installed on the same device.

The protocol is *anguageagnostic* it defines a wire format (JSONRPC 2.0) and per-platform transports.

Binding Path Status
Dart/Flutter engines/sdk/koder_ipc *one*(v0.2.0, Android Messenger+Bundle IPC)
Go engines/sdk/go/ipc *one*(v0.1.0)
Android Messenger+Bundle KoderIpcPlugin.kt + KoderIpcService.kt *one*(v0.2.0, bidirectional)
iOS App Group KoderIpcPlugin.swift *one*(v0.1.1, bidirectional)
Linux D-Bus DBusTransport in Dart binding *one*(v0.1.1)
Windows Named pipe FFI Win32PipeTransport *one*(v0.1.1)
Web conditional Dart export *one*(v0.2.0, no-op discovery/listen and explicit send failure)
Rust engines/sdk/rust/koder_ipc *one*(v0.1.0)
Koder Koda engines/lang/lang/stdlib/koder/ipc.kd *one*

Primary couplings

Module Role
engines/sdk/koder_kit Wraps KoderIPC — KoderApp auto-registers the IPC server on startup
meta/docs/stack/specs/ipc/protocol.kmd Normative wire protocol spec
meta/docs/stack/specs/koder-app/behaviors.kmd Mandates IPC for all Koder apps

Wire format

All messages are *SONRPC 2.0* newlinedelimited.

{ "jsonrpc": "2.0", "id": "1", "method": "play", "params": { "uri": "..." } }
{ "jsonrpc": "2.0", "id": "1", "result": { "ok": true } }

Transports

Platform Transport
Linux desktop + CLI Unix socket /run/user/<uid>/koder/<slug>.sock
macOS desktop + CLI Unix socket $TMPDIR/../C/koder/<slug>.sock
Windows desktop + CLI Named pipe \.pipekoder-<slug> via FFI
Android KoderIpcService bound service — Messenger+Bundle (action dev.koder.ipc.BIND)
iOS App Group shared container group.dev.koder.ipc + URL scheme fallback
Web Stub surface: listen no-op, discovery empty, send throws unsupported transport

Android setup (v0.2.0)

Add to AndroidManifest.xml inside <application>:

<service android:name="dev.koder.ipc.KoderIpcService"
         android:exported="true">
  <intent-filter>
    <action android:name="dev.koder.ipc.BIND" />
  </intent-filter>
</service>

For API 30+, also add a <queries> block for the dev.koder.ipc.BIND intent.

Public API

// Client
final result = await KoderIPC.send(
  targetSlug: 'dek',
  method: 'play',
  params: {'uri': 'content://media/audio/123'},
);

// Server
await KoderIPC.listen(
  localSlug: 'dek',
  capabilities: ['play', 'pause', 'stop'],
  onRequest: (req) async { ... },
);

final apps = await KoderIPC.discoverApps(localSlug: 'drive');
final running = await KoderIPC.isAppRunning(localSlug: 'drive', targetSlug: 'dek');

On web, the Dart package keeps the same API surface but uses a conditional export to avoid dart:io, FFI, D-Bus, and Win32 imports. Discovery returns no apps and send fails with an unsupported-transport IpcException.

Standard methods

Method Returns
capabilities {"methods": ["play", "pause", ...]}
ping {"pong": true}
auth_token {"access_token": "...", "expires_in": 3600} (wired by koder_kit)

Specs

  • meta/docs/stack/specs/ipc/protocol.kmd — full wire protocol
  • meta/docs/stack/specs/koder-app/behaviors.kmd — §6: IPC mandatory; §1.3: SSO via auth_token

Status

v0.2.0 — 20260424. Android plugin rewritten with KoderIpcService (Messenger+Bundle), replacing the no-op stub from v0.1.3. The Dart binding now has a web-safe conditional export so Flutter web consumers can build without pulling in native transports. iOS App Group (v0.1.1) still current.

Source: ../home/koder/dev/koder/meta/docs/stack/modules/sdk-koder-ipc.md