Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"$schema": "https://json.schemastore.org/claude-code-marketplace.json",
"name": "once-agent",
"version": "0.1.0",
"description": "Once execution-safety plugins for AI agents performing consequential external writes.",
"description": "Once developer assessment/setup plugins; consequential writes need an admitted execution boundary.",
"owner": {
"name": "Once"
},
"plugins": [
{
"name": "once",
"description": "Adds Once execution-safety tools for consequential writes, ambiguous outcomes and safe retries.",
"description": "Adds Once assessment/setup tools; installation does not automatically protect sibling connectors.",
"source": "./plugins/claude-code/once",
"category": "security"
}
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/full-regression-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: '24.15.0'
cache: npm
cache-dependency-path: mcp/package-lock.json
- run: npm ci
Expand All @@ -69,6 +69,27 @@ jobs:
run: npm run build
- name: Run MCP smoke test
run: npm run smoke
- name: Verify connection semantics and public packed consumer
run: npm run test:registered-action-package
- name: Guard public compatibility and unpublished candidate claims
run: node --test ../scripts/mcp-public-contract.test.mjs

mcp-helper-node20:
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: mcp
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npm run test:connection
- run: node scripts/smoke.mjs

openai-plugin-static:
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ The callback and lookup are your reviewed provider functions. Inspect every argu

Local SQLite requires a persistent shared file on **one machine**, Node 24.15+, and distinct IDs for genuine new intents. Multiple legitimate partial refunds need distinct refund-intent IDs. [Complete integration guide](examples/natural-placement/README.md).

The ledger is part of execution authority. Changing, deleting, replacing,
resetting, rolling back or switching valid ledgers may permit an effect to
execute again. The same filesystem path does not prove the same history.
Fresh provisioning is separate from restart; preserve the original consistent
SQLite state and do not reinitialize missing expected state. UNKNOWN blocking
does not repair lost history. See [MCP compatibility and continuity](mcp/COMPATIBILITY.md).


## When you need Once — and when you do not

Evaluate Once when a consequential external write may be retried, its outcome can become ambiguous, and another effect would matter. Refunds, bookings, messages and tickets are examples, not automatic provider support.
Expand Down
9 changes: 8 additions & 1 deletion docs/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Available tools:
- `once_setup_project` — install/configure Once after explicit user approval.
- `once_plan_protection` — review candidate call sites without modifying source.
- `once_apply_protection` — transactionally apply one approved PATCHABLE candidate.
- `once_verify_connection` — run Once Doctor without exposing the API key.
- `once_verify_connection` — preserve local diagnostics; in MCP 0.2.1 read cloudVerified explicitly for requested Cloud checks. Retained MCP 0.1.5 plugins lack this correction; use doctor --connection for Cloud verification without exposing the API key.
- `once_live_proof` — return demonstrated proof and safe claim boundaries.

The MCP server is for agent-assisted discovery, integration, and verification. Production application agents do not need to call MCP before every protected write; Once Runtime or a supported local Connect boundary remains the execution-safety boundary.
Expand Down Expand Up @@ -307,3 +307,10 @@ protection; all effects must traverse the protected boundary. Local mode will
not redispatch an ambiguous operation on an ABSENT observation.

FIRST 10: Controlled refund proof: https://onceexec.com/first10/ . SDK 0.1.25 publishes once prove and read-only once check; the standalone proof also works with SDK 0.1.24 or later. See repository examples/first10/README.md and docs/FIRST10.md. Native idempotency or a unique constraint should be used alone when sufficient. Identity/effect decisions require developer review; never infer them silently.

Execution authority: preserve the original durable ledger and history, not only
its path. Replacement, reset, deletion or rollback can permit an effect again.
Default MCP exposes eight developer assessment/setup tools; it does not protect
sibling connectors. Registered actions are opt-in; proxies require reviewed
upstream configuration. Node 20+ supports the helper; local SQLite modes need
24.15+. Compatibility: https://github.com/stringsofthemind-oss/once/blob/main/mcp/COMPATIBILITY.md
9 changes: 9 additions & 0 deletions docs/claude-code-mcp-safe-retries/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
<section class="hero">
<div class="eyebrow">CLAUDE CODE / MCP / EXECUTION SAFETY</div>
<h1>Add Once execution safety to Claude Code through MCP.</h1>
<p><strong>Installation boundary:</strong> default MCP exposes eight developer
assessment/setup tools and does not automatically protect sibling GitHub, Adobe
or other connectors. Registered actions are opt-in; the proxy protects only
reviewed/configured upstream boundaries. The default helper supports Node 20+;
local SQLite proxy/actions require 24.15+. The original durable ledger is
execution authority: replacement, reset or rollback may permit an effect again,
even at the same path. UNKNOWN never grants permission to redispatch.
<a href="https://github.com/stringsofthemind-oss/once/blob/main/mcp/COMPATIBILITY.md">Authoritative compatibility and continuity matrix</a>.</p>

<p>Once gives Claude Code access to tools for identifying consequential writes, explaining retry risk, planning protection, applying approved protection and verifying a configured Once connection.</p>
</section>
<article>
Expand Down
9 changes: 9 additions & 0 deletions docs/cursor-mcp-safe-retries/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
<section class="hero">
<div class="eyebrow">CURSOR / MCP / EXECUTION SAFETY</div>
<h1>Add Once execution safety to Cursor through MCP.</h1>
<p><strong>Installation boundary:</strong> default MCP exposes eight developer
assessment/setup tools and does not automatically protect sibling GitHub, Adobe
or other connectors. Registered actions are opt-in; the proxy protects only
reviewed/configured upstream boundaries. The default helper supports Node 20+;
local SQLite proxy/actions require 24.15+. The original durable ledger is
execution authority: replacement, reset or rollback may permit an effect again,
even at the same path. UNKNOWN never grants permission to redispatch.
<a href="https://github.com/stringsofthemind-oss/once/blob/main/mcp/COMPATIBILITY.md">Authoritative compatibility and continuity matrix</a>.</p>

<p>Once gives Cursor access to tools for identifying consequential writes, explaining retry risk, planning protection, applying approved protection and verifying a configured Once connection.</p>
</section>
<article>
Expand Down
9 changes: 8 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ <h1>Your agent sent the refund.<br />The response disappeared.<br /><em>Should i
<p class="small" style="margin: 12px 0 0">Illustrative scenario; supported integration required.</p>
</aside>
</section>
<section class="section" id="when-not-needed"><div class="intro"><h2>When you do not need Once</h2><p>If a provider idempotency key completely solves your operation, use it. If a database unique constraint solves it, use it. Harmless repeated actions do not need Once.</p><p>Use Once when a consequential operation may already have happened, you cannot safely establish its outcome, and repeating it could create another effect. Keep native idempotency wherever available.</p><a href="/first10/">See two unprotected refunds versus one protected refund →</a></div></section>
<section class="section" id="when-not-needed"><div class="intro"><div class="note"><strong>The ledger is execution authority.</strong>
Changing, deleting, replacing, resetting or rolling back valid state may permit
an effect to execute again. The same filesystem path does not prove the same
execution history. Fresh provisioning is separate from continuation; restore
the original consistent history, never initialize replacement state on restart.
UNKNOWN blocks redispatch but cannot repair lost history.
<a href="https://github.com/stringsofthemind-oss/once/blob/main/mcp/COMPATIBILITY.md">Compatibility, backup and detection limits</a>.</div>
<h2>When you do not need Once</h2><p>If a provider idempotency key completely solves your operation, use it. If a database unique constraint solves it, use it. Harmless repeated actions do not need Once.</p><p>Use Once when a consequential operation may already have happened, you cannot safely establish its outcome, and repeating it could create another effect. Keep native idempotency wherever available.</p><a href="/first10/">See two unprotected refunds versus one protected refund →</a></div></section>
<section class="section" id="mechanism">
<div class="intro">
<p class="eyebrow">What Once changes</p>
Expand Down
9 changes: 8 additions & 1 deletion docs/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ once_plan_setup — preview setup without changing files
once_setup_project — install/configure after explicit approval
once_plan_protection — review candidate call sites without modifying source
once_apply_protection — apply one approved PATCHABLE candidate
once_verify_connection — run Once Doctor without exposing the API key
once_verify_connection — preserve local diagnostics; in MCP 0.2.1 read cloudVerified explicitly for requested Cloud checks. Retained MCP 0.1.5 plugins lack this correction; use doctor --connection for Cloud verification without exposing the API key
once_live_proof — return demonstrated proof and safe claim boundaries

The MCP layer is for agent-assisted discovery, integration, and verification. Production application agents do not need to call MCP before every protected write; Once Runtime or a supported local Connect boundary remains the execution-safety boundary.
Expand All @@ -165,3 +165,10 @@ MCP idempotency; MCP retry safety; MCP safe retries; MCP duplicate tool calls; s
- [Evidence](https://onceexec.com/evidence/): scoped reproductions and current release history.

FIRST 10: Controlled refund proof: https://onceexec.com/first10/ . SDK 0.1.25 publishes once prove and read-only once check; the standalone proof also works with SDK 0.1.24 or later. See repository examples/first10/README.md and docs/FIRST10.md. Native idempotency or a unique constraint should be used alone when sufficient. Identity/effect decisions require developer review; never infer them silently.

Execution authority: preserve the original durable ledger and history, not only
its path. Replacement, reset, deletion or rollback can permit an effect again.
Default MCP exposes eight developer assessment/setup tools; it does not protect
sibling connectors. Registered actions are opt-in; proxies require reviewed
upstream configuration. Node 20+ supports the helper; local SQLite modes need
24.15+. Compatibility: https://github.com/stringsofthemind-oss/once/blob/main/mcp/COMPATIBILITY.md
9 changes: 9 additions & 0 deletions docs/mcp-idempotency/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@
<section class="hero">
<div class="eyebrow">MCP IDEMPOTENCY / EXECUTION SAFETY</div>
<h1>MCP Idempotency for State-Changing AI Agent Tools</h1>
<p><strong>Installation boundary:</strong> default MCP exposes eight developer
assessment/setup tools and does not automatically protect sibling GitHub, Adobe
or other connectors. Registered actions are opt-in; the proxy protects only
reviewed/configured upstream boundaries. The default helper supports Node 20+;
local SQLite proxy/actions require 24.15+. The original durable ledger is
execution authority: replacement, reset or rollback may permit an effect again,
even at the same path. UNKNOWN never grants permission to redispatch.
<a href="https://github.com/stringsofthemind-oss/once/blob/main/mcp/COMPATIBILITY.md">Authoritative compatibility and continuity matrix</a>.</p>

<p>When an MCP tool changes external state, retries need a stable logical-operation identity and durable execution truth. Otherwise a timeout, lost response or process failure can turn one business intent into multiple real-world side effects.</p>
</section>

Expand Down
9 changes: 9 additions & 0 deletions docs/mcp-retry-safety/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@
<section class="hero">
<div class="eyebrow">MCP RELIABILITY / STATE-CHANGING TOOLS</div>
<h1>MCP Retry Safety: Safe Retries for State-Changing Tools</h1>
<p><strong>Installation boundary:</strong> default MCP exposes eight developer
assessment/setup tools and does not automatically protect sibling GitHub, Adobe
or other connectors. Registered actions are opt-in; the proxy protects only
reviewed/configured upstream boundaries. The default helper supports Node 20+;
local SQLite proxy/actions require 24.15+. The original durable ledger is
execution authority: replacement, reset or rollback may permit an effect again,
even at the same path. UNKNOWN never grants permission to redispatch.
<a href="https://github.com/stringsofthemind-oss/once/blob/main/mcp/COMPATIBILITY.md">Authoritative compatibility and continuity matrix</a>.</p>

<p>An MCP tool call can fail at the transport boundary after the real-world action has already happened. Safe retry logic must preserve the identity and execution truth of the original operation instead of treating every retry as permission to execute again.</p>
</section>

Expand Down
16 changes: 14 additions & 2 deletions docs/quickstart/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,24 @@ <h2 id="connect">Protect an agent’s existing tools</h2>
<a class="btn" href="https://github.com/stringsofthemind-oss/once/blob/main/docs/CONNECT_AUTO.md" data-event="docs_click"
>Open the complete Connect guide</a
>
<h2 id="hosts">Set up Codex, Claude Code or Cursor</h2>
<div class="note"><strong>The ledger is execution authority.</strong>
Changing, deleting, replacing, resetting or rolling back valid state may permit
an effect to execute again. The same filesystem path does not prove the same
execution history. Fresh provisioning is separate from continuation; restore
the original consistent history, never initialize replacement state on restart.
UNKNOWN blocks redispatch but cannot repair lost history.
<a href="https://github.com/stringsofthemind-oss/once/blob/main/mcp/COMPATIBILITY.md">Compatibility, backup and detection limits</a>.</div>
<h2 id="hosts">Set up Codex, Claude Code or Cursor</h2>
<p>
The plugin/MCP layer assesses and plans supported integration. Local assessment needs no key; hosted setup needs a Once API key. The
server’s presence does not automatically protect other tools or replace the execution boundary.
</p>
<h3>Codex</h3>
<p>Default MCP exposes eight assessment/setup tools, not automatic protection
of sibling GitHub/Adobe connectors. The registered action is opt-in; a proxy
protects only reviewed/configured upstream boundaries. Default helper: Node 20+;
SQLite proxy/registered action: Node 24.15+. Retained plugin pins are independent
of the latest npm release.</p>
<h3>Codex</h3>
<div class="codebox">
<button type="button" data-copy-target="codex" data-copy-label="Copy Codex setup" data-copy-event="install_copied">
Copy Codex setup
Expand Down
Loading
Loading