@executor-js/codemode-core 0.0.1-beta.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +40 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # @executor/codemode-core
2
+
3
+ Core primitives for "code mode" — the pattern where an LLM writes TypeScript/JavaScript that calls into a pre-registered set of tools, executed in a sandbox. This package provides the shared type surface (`Tool`, `SandboxToolInvoker`, `CodeExecutor`), JSON Schema helpers, and error types used by every runtime that implements the contract.
4
+
5
+ Most callers depend on this transitively through `@executor/execution` and a sandbox runtime like `@executor/runtime-quickjs`. Install directly when you're authoring a new runtime.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ bun add @executor/codemode-core
11
+ # or
12
+ npm install @executor/codemode-core
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ Implement a runtime that satisfies `CodeExecutor`:
18
+
19
+ ```ts
20
+ import type { CodeExecutor, SandboxToolInvoker } from "@executor/codemode-core";
21
+ import { Effect } from "effect";
22
+
23
+ export const makeMyRuntime = (): CodeExecutor => ({
24
+ execute: (code: string, invoker: SandboxToolInvoker) =>
25
+ Effect.gen(function* () {
26
+ // Spin up your sandbox, expose `invoker` as `tools.<path>(...)`, run the code,
27
+ // collect logs, and return an ExecuteResult.
28
+ }),
29
+ });
30
+ ```
31
+
32
+ The runtime is passed a `SandboxToolInvoker` that bridges sandbox-side tool calls back to the executor. The sandbox-visible API is whatever you decide — `@executor/runtime-quickjs` exposes a `tools` proxy object; a runtime targeting Cloudflare Workers might use something else.
33
+
34
+ ## Status
35
+
36
+ Pre-`1.0`. APIs may still change between beta releases. Part of the [executor monorepo](https://github.com/RhysSullivan/executor).
37
+
38
+ ## License
39
+
40
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/codemode-core",
3
- "version": "0.0.1-beta.0",
3
+ "version": "0.0.1",
4
4
  "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/kernel/core",
5
5
  "bugs": {
6
6
  "url": "https://github.com/RhysSullivan/executor/issues"