KirinCode 4022216a83 chore: complete rebranding — all opencode references cleaned 1 lună în urmă
..
src 4022216a83 chore: complete rebranding — all opencode references cleaned 1 lună în urmă
test 4bf87257f9 Initial KirinCode v0.1 1 lună în urmă
README.md 4bf87257f9 Initial KirinCode v0.1 1 lună în urmă
package.json 4bf87257f9 Initial KirinCode v0.1 1 lună în urmă
sst-env.d.ts 4bf87257f9 Initial KirinCode v0.1 1 lună în urmă
tsconfig.json 4bf87257f9 Initial KirinCode v0.1 1 lună în urmă

README.md

@kirincode-ai/sdk-next

Effect-native scoped KirinCode host for in-process applications. This transitional package will replace the existing generated @kirincode-ai/sdk after its consumers migrate.

The SDK executes Server's assembled HTTP router in memory. It opens no listener and performs no network I/O, while preserving the same routing, middleware, handlers, codecs, and errors as the network client.

import { KirinCode } from "@kirincode-ai/sdk-next"

const kirincode = yield * KirinCode.create()
const session = yield * opencode.sessions.get({ sessionID })

It also exports Tool and exposes local-only tools.register(...), replacing the former @kirincode-ai/core/public facade. Registration uses Core's host-level ApplicationTools service shared by the host's Locations; each Location retains its own ToolRegistry for overlay, lookup, and settlement. Closing the owning Effect Scope releases router resources, location services, fibers, and scoped tool registrations.

sessions.events({ sessionID, after }) replays durable events after the optional aggregate sequence, then emits newly committed durable events. sessions.interrupt(...) targets execution owned by this host, and sessions.message(...) retrieves one projected Session message.

The same constructor is available as a service Layer:

const program = Effect.gen(function* () {
  const kirincode = yield* KirinCode.Service
  return yield* opencode.sessions.get({ sessionID })
})

yield * program.pipe(Effect.provide(KirinCode.layer))

KirinCode.layer adapts KirinCode.create() for dependency injection; it does not define another host implementation.