Metadata-Version: 2.4
Name: arp-jarvis-atomic-nodes
Version: 0.3.5
Summary: First-party atomic node pack for the JARVIS stack (metadata + handlers).
Author: Agent Runtime Protocol
License-Expression: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: arp-standard-model==0.3.5
Provides-Extra: metadata
Provides-Extra: runtime
Requires-Dist: httpx>=0.27.0; extra == "runtime"
Provides-Extra: dev
Requires-Dist: pyright>=1.1.0; extra == "dev"
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Dynamic: license-file

# JARVIS Atomic Nodes (Node Pack)

First-party “node pack” for the JARVIS stack. This package provides:
- **NodeType metadata** for Node Registry + Selection
- **Atomic handler implementations** for Atomic Executor

This is a trusted, in-process node pack (v0.x). It does **not** implement runtime code download.

## Install

Metadata-only (safe for Node Registry):

```bash
python3 -m pip install arp-jarvis-atomic-nodes
```

Or explicitly:

```bash
python3 -m pip install "arp-jarvis-atomic-nodes[metadata]"
```

Runtime handlers (Atomic Executor):

```bash
python3 -m pip install "arp-jarvis-atomic-nodes[runtime]"
```

## Usage

### NodeType metadata (Node Registry)

```python
from jarvis_atomic_nodes.catalog import node_types

node_type_list = node_types()
```

### Handler registry (Atomic Executor)

```python
from jarvis_atomic_nodes.handlers import handlers

handler_map = handlers(require_http=True)
```

### Authoring nodes (LangChain-like)

```python
from pydantic import BaseModel, HttpUrl
from jarvis_atomic_nodes.sdk import atomic_node, NodeContext

class WebFetchIn(BaseModel):
    url: HttpUrl

class WebFetchOut(BaseModel):
    status_code: int
    content_base64: str

@atomic_node(name="jarvis.web.fetch", side_effect="read")
async def web_fetch(inp: WebFetchIn, ctx: NodeContext) -> WebFetchOut:
    """Fetch a URL over HTTP(S) and return bytes."""
    resp = await ctx.http.get(str(inp.url))
    return WebFetchOut(status_code=resp.status_code, content_base64=resp.content)
```

### Entry point discovery

This package exposes a NodePack entry point:

- group: `jarvis.nodepacks`
- name: `jarvis.core`
- object: `jarvis_atomic_nodes.pack:core_pack`

```python
from jarvis_atomic_nodes.discovery import load_nodepacks, load_handlers, load_node_types

packs = load_nodepacks()
handlers = load_handlers()
node_types = load_node_types()
```

## NodeType `extensions` metadata

Each NodeType emitted by this pack includes JARVIS metadata in `NodeType.extensions`, including:
- `jarvis.pack_id` / `jarvis.pack_version` (provenance)
- `jarvis.node_name` (stable node name)
- `jarvis.side_effect`, `jarvis.trust_tier` (governance hints)
- Optional: `jarvis.egress_policy`, `jarvis.budget_hints`, `jarvis.tags`

Node Registry stores these fields verbatim and Selection Service may use a subset to enrich candidate ranking.

Full cross-stack list: `https://github.com/AgentRuntimeProtocol/BusinessDocs/blob/main/Business_Docs/JARVIS/Extensions.md`.

## Included nodes (v0.3.5 baseline)

Core:
- `jarvis.core.echo`
- `jarvis.core.sleep`
- `jarvis.core.uuid4`
- `jarvis.core.time.now`
- `jarvis.core.hash.sha256`

HTTP:
- `jarvis.web.fetch`
