GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: experimental codemode (#34677) · moonug/opencode@cb93114

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • bun.lock
  • package.json
  • packages
    • codemode
      • AGENTS.md
      • README.md
      • codemode.md
      • package.json
      • src
        • codemode.ts
        • index.ts
        • token.ts
        • tool-error.ts
        • tool-runtime.ts
        • tool.ts
        • values.ts
      • test
        • codemode.test.ts
        • enumeration.test.ts
        • parity.test.ts
        • promise.test.ts
        • signature.test.ts
        • stdlib.test.ts
      • tsconfig.json
    • opencode
      • package.json
      • src
        • effect
          • runtime-flags.ts
        • mcp
          • index.ts
          • invoke.ts
        • permission
          • index.ts
        • session
          • llm
            • request.ts
          • prompt.ts
          • tools.ts
        • tool
          • code-mode.ts
          • registry.ts
      • test
        • session
          • prompt.test.ts
          • snapshot-tool-race.test.ts
          • tools.test.ts
        • tool
          • code-mode-integration.test.ts
          • code-mode.test.ts
          • registry.test.ts
    • tui/src/routes/session
      • index.tsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bun.lock‎

Copy file name to clipboardExpand all lines: bun.lock
+61-15Lines changed: 61 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"@typescript/native-preview": "catalog:",
100100
"glob": "13.0.5",
101101
"husky": "9.1.7",
102+
"node-gyp": "12.4.0",
102103
"oxlint": "1.60.0",
103104
"oxlint-tsgolint": "0.21.0",
104105
"prettier": "3.6.2",
Collapse file

‎packages/codemode/AGENTS.md‎

Copy file name to clipboard
+15Lines changed: 15 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# @opencode-ai/codemode
2+
3+
- This local package owns confined execution over explicit schema-described tools. Applications own authorization, persistence, external authority, and tool-specific delivery semantics.
4+
- Do not add a speculative generic permission or approval policy. A host omits tools it does not expose and enforces domain authorization inside each provided tool.
5+
- Keep Code Mode unaware of host session, channel, and conversation models. The hosting application supplies trusted execution scope around it.
6+
- Tool schemas are the model-facing Interface. Keep arguments minimal and natural to the operation; never add unrelated IDs as ambient capability tokens.
7+
8+
## Future Design Notes
9+
10+
- If a captured user-visible output channel returns (an earlier `output.text`/`output.file`/`output.image` API was removed from v1), keep `output` as its name, distinct from the program return value: `return` stays the structured result for the model, while `output.*` describes artifacts the host may render into a conversation or UI after execution. Keep this host-neutral and let applications decide how captured output is delivered. In v1, hosts collect media host-side (outside the sandbox) instead.
11+
- Improve the sandbox failure taxonomy. Distinguish parse/compile mistakes, unsupported syntax, user-thrown errors, invalid returned data, tool refusal, tool internal failure, timeout, and genuine runtime defects so agents can recover accurately instead of treating everything as a generic execution failure.
12+
- Preserve the public/private error split. Tool authors should be able to return a safe model-visible message while retaining a private cause for host diagnostics. Unknown host failures must remain sanitized by default.
13+
- Think deliberately about richer binary boundaries before allowing `Blob`, `File`, `ArrayBuffer`, streams, or typed arrays beyond today’s JSON-like values. If CodeMode supports binary tool args/results, use explicit tagged data shapes and clear size limits rather than relying on ambient runtime serialization.
14+
- Keep host capabilities explicit. Globals such as `fetch`, `crypto`, filesystem handles, extra modules, or network clients should be opt-in runtime capabilities with obvious policy defaults, not ambient authority. Default to unavailable unless a host deliberately provides the capability.
15+
- If `fetch` is added, model it as a host-provided outbound capability with policy controls: allowed origins, methods, headers, response size, timeout, and whether response bodies may be returned, emitted, or only summarized through a tool.
Collapse file

‎packages/codemode/README.md‎

Copy file name to clipboardExpand all lines: packages/codemode/README.md
+337Lines changed: 337 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Large diffs are not rendered by default.
Collapse file

‎packages/codemode/codemode.md‎

Copy file name to clipboardExpand all lines: packages/codemode/codemode.md
+1,188Lines changed: 1188 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Large diffs are not rendered by default.
Collapse file

‎packages/codemode/package.json‎

Copy file name to clipboard
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://json.schemastore.org/package.json",
3+
"name": "@opencode-ai/codemode",
4+
"version": "0.0.1",
5+
"description": "Effect-native confined code execution over schema-described tools",
6+
"private": true,
7+
"type": "module",
8+
"license": "MIT",
9+
"exports": {
10+
".": "./src/index.ts"
11+
},
12+
"scripts": {
13+
"typecheck": "tsgo --noEmit",
14+
"test": "bun test"
15+
},
16+
"dependencies": {
17+
"acorn": "8.15.0",
18+
"effect": "catalog:",
19+
"typescript": "catalog:"
20+
},
21+
"devDependencies": {
22+
"@tsconfig/bun": "catalog:",
23+
"@types/bun": "catalog:",
24+
"@typescript/native-preview": "catalog:"
25+
}
26+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.