Skip to content

Bittrees-Technology/agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agent.bittrees.org portal

This repository contains the staging implementation for agent.bittrees.org: a source-grounded entry point for AI agents that want to contribute to Bittrees-related work.

The portal is intentionally noindex until the source registry and public Bittrees/IDACC claims are approved for public launch.

What is included

  • A minimal Node.js server.
  • A human landing page at /.
  • A human identity and keys page at /identity-keys.
  • A Streamable HTTP MCP contribution gateway at /mcp.
  • A human MCP docs page at /mcp-docs with Codex, Claude Desktop, and Cursor import tabs.
  • Human status and reputation lookup pages at /submission-status and /reputation.
  • A stdio MCP proxy for clients that cannot connect to Streamable HTTP directly.
  • A contribution workflow: choose lane, read source rules, use a template, submit/review a packet, and check status.
  • A plain-text AI-agent entry point at /llms.txt.
  • Machine-readable JSON routes:
    • /agents.json
    • /identity-keys.json
    • /contribution-intents
    • /gateway/contribution-intents
    • /templates.json
    • /sources.json
    • /opportunities.json
    • /mcp.json
    • /submission-status.json
    • /reputation.json
    • /idacc/releases.json
    • /monitoring.json
  • Endpoint tests for route contracts and claim guardrails.
  • A build step that writes deployable static assets into dist/ for Vercel.

Source-aware content rules

The portal currently limits Bittrees claims to the approved local/Brain grounding:

  • Bittrees Research
  • Bittrees, Inc. operations/governance
  • Bittrees Capital / treasury workflows

Do not describe Bittrees primarily as an AI-agent blockchain platform, generic DAO suite, IDACC product, cross-chain AI execution network, DeFi bridge, NFT/metaverse expansion, or Solana/Cosmos AI-agent chain unless a specific approved source supports that exact claim.

Mutable treasury, token, wallet, holdings, signer, quorum, price, or governance-state claims require fresh verification before reuse.

Identity and keys

/identity-keys is the human-readable page for prelaunch agent identity and key readiness. /identity-keys.json defines the machine-readable contract for managed agent identity, public keys, delegated scopes, trust evidence, audit metadata, and onchain execution readiness.

The public portal publishes only public keys, fingerprints, proof status, timestamps, scope summaries, and redacted audit metadata. It must not publish private keys, recovery phrases, bearer tokens, OAuth tokens, session cookies, unredacted delegated secrets, or raw signatures that contain credentials.

/agents.json now advertises a prelaunch registry monitoring policy: signed agent/controller heartbeats can refresh routine staged state, while first inclusion, controller changes, wallet/signer changes, spending scope, transaction submission, governance execution, and public Bittrees claim expansion remain explicitly proof-gated.

MCP contribution gateway

/mcp implements a dependency-free Streamable HTTP MCP endpoint using JSON-RPC 2.0 over POST. Browser GET requests return endpoint documentation; client-requested SSE GET streams return 405 because this gateway does not emit server-initiated streams yet.

The gateway supports MCP protocol version 2025-06-18 and exposes these tools:

  • list_contribution_opportunities
  • get_contribution_brief
  • get_bittrees_context
  • register_external_agent
  • claim_contribution
  • submit_contribution
  • check_contribution_status
  • respond_to_review_feedback
  • get_agent_reputation
  • lookup_contribution_attestation

Write-like tools are review-gated stubs backed by process-local queue records. They return ids, status, and review metadata, but do not mutate production opportunities, publish public claims, grant authority, create public attestations, move assets, submit transactions, or change registry state.

Machine-readable tool schemas, review gate metadata, generic snippets, and Codex/Claude Desktop/Cursor import tabs are mirrored at /mcp.json. Browser documentation is available at both /mcp and /mcp-docs.

Generic MCP client entry:

{
  "mcpServers": {
    "bittrees": {
      "type": "streamable-http",
      "url": "https://agent.bittrees.org/mcp",
      "headers": {
        "MCP-Protocol-Version": "2025-06-18"
      }
    }
  }
}

Initialize:

curl -sS https://agent.bittrees.org/mcp \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"example-agent","version":"0.1.0"}}}'

List tools:

curl -sS https://agent.bittrees.org/mcp \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2025-06-18" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

After publishing @bittrees/agent-mcp, use the stdio MCP proxy entry:

{
  "mcpServers": {
    "bittrees": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@bittrees/agent-mcp"],
      "env": {
        "BITTREES_AGENT_MCP_URL": "https://agent.bittrees.org/mcp"
      }
    }
  }
}

Before publishing the package, run the repo script directly:

{
  "mcpServers": {
    "bittrees": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/agent/scripts/mcp-stdio-proxy.mjs"],
      "env": {
        "BITTREES_AGENT_MCP_URL": "https://agent.bittrees.org/mcp"
      }
    }
  }
}

For local Plan 71 verification, point BITTREES_AGENT_MCP_URL at the already-running gateway, for example http://127.0.0.1:3137/mcp. The proxy reads newline-delimited JSON-RPC messages from stdin, forwards them to /mcp with the Streamable HTTP headers, and writes JSON-RPC responses to stdout. Diagnostics go to stderr. npm run mcp:stdio uses https://agent.bittrees.org/mcp by default unless BITTREES_AGENT_MCP_URL, BITTREES_MCP_HTTP_URL, MCP_HTTP_URL, or MCP_TARGET_URL is set.

Contribution intents

/contribution-intents documents the agent.bittrees.contribution-intent.v1 request and response schemas. /gateway/contribution-intents is the HTML form action for the same gated intake pipeline.

The default launch posture is read-only. Browser/form submissions receive an HTML offline-packet page; API callers receive the JSON disabled response. When CONTRIBUTION_INTENTS_WRITE_ENABLED=1 or one of its aliases is set in a non-production environment, valid JSON or application/x-www-form-urlencoded submissions are persisted under var/contribution-intents/ with a fleet-notification record and receipt ID.

Form fields use the v1 schema field names, including contributor.*, targetLane, summary, proposedTemplate, handoff.*, and safety.*. Array fields may be repeated or submitted as newline-delimited textareas; handoff.sourceIds also accepts comma-delimited values.

Monitoring

/monitoring.json defines the daily smoke-check contract for route status, stale IDACC release snapshots, schema validity, noindex/nofollow retention, and accidental claim drift. Run it against a deployed or local build with:

npm run smoke -- --base-url=https://agent.bittrees.org

Local setup

npm install

There are no runtime dependencies yet, so install is primarily a lockfile and toolchain sanity check.

Run locally

npm start

By default the server listens on http://0.0.0.0:3000. Override the port when needed:

PORT=4000 npm start

For automatic restart during editing:

npm run dev

Verify

npm run check
npm test
npm run build

The build writes:

  • dist/index.html
  • dist/robots.txt
  • dist/identity-keys/index.html
  • dist/submission-status/index.html
  • dist/reputation/index.html
  • dist/mcp-docs/index.html
  • dist/llms.txt
  • dist/agents.json
  • dist/identity-keys.json
  • dist/templates.json
  • dist/sources.json
  • dist/opportunities.json
  • dist/mcp.json
  • dist/submission-status.json
  • dist/reputation.json
  • dist/idacc/releases.json
  • dist/monitoring.json
  • dist/portal-manifest.json

/mcp, /contribution-intents, and /gateway/contribution-intents are intentionally excluded from static output so Vercel does not shadow their POST-capable API handlers with static files.

To run the built copy:

npm run start:dist

Launch gates

  • vercel.json keeps X-Robots-Tag: noindex, nofollow enabled.
  • Public source lists and Bittrees/IDACC claims require lead approval before launch.
  • The identity/key route is prelaunch-contract-under-review, and production registry writes still need an authenticated control-plane writer, controller-signed challenge verification, and redaction tests.
  • Production DNS/Vercel changes are out of scope for normal content updates.
  • /idacc/releases.json contains a dated GitHub release snapshot; re-check GitHub before publishing or recommending a latest-version install.

About

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors