Portable adapter packages for NLA.
The split in this repo is:
@nla/sdk-coregeneric NLA adapter/runtime mechanics@nla-adapters/contractsneutral capability contracts@nla-adapters/todo-agentportable todo adapter logic that depends only on NLA plus contracts
host-runtime should not be the portable surface. It should be one capability
implementation behind thin wrappers.
packages/
contracts/ neutral capability contracts
todo-agent/ portable todo adapter
wallet-agent/ portable wallet adapter
The todo adapter is created by dependency injection:
import { createTodoAgent } from "@nla-adapters/todo-agent";
const adapter = createTodoAgent({
createModel: () => myToolLoopModel(),
storage: {
getJson: async (request) => { ... },
putJson: async (request) => { ... }
}
});For stdio processes:
import { runTodoAgentStdio } from "@nla-adapters/todo-agent/stdio";
await runTodoAgentStdio({
createModel: () => myToolLoopModel(),
storage: {
getJson: async (request) => { ... },
putJson: async (request) => { ... }
}
});This is the intended wrapper style inside host-runtime:
import * as Effect from "effect/Effect";
import { runTodoAgentStdio } from "@nla-adapters/todo-agent/stdio";
import { toolLoopModel } from "@host-runtime/sdk/llm";
import { getJson, putJson } from "@host-runtime/sdk/storage";
await runTodoAgentStdio({
createModel: () =>
toolLoopModel({
provider: "openrouter",
metadata: {
agent_id: "todo.agent"
}
}),
storage: {
getJson: (request) => Effect.runPromise(getJson(request)),
putJson: (request) => Effect.runPromise(putJson(request))
}
});That keeps the portable adapter free of @host-runtime/sdk/* while still
letting host-runtime provide storage and model brokering.