Metadata-Version: 2.4
Name: silicon-extend
Version: 0.1.1
Summary: The shared and standalone tool integration layer for Silicon.
Keywords: agents,integrations,silicon,tools
Author: Team of Silicons
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: cryptography>=42.0.0
Requires-Dist: jsonschema>=4.21.0
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: requests>=2.31.0
Requires-Python: >=3.9
Project-URL: Repository, https://github.com/teamofsilicons/silicon-extend
Project-URL: Issues, https://github.com/teamofsilicons/silicon-extend/issues
Description-Content-Type: text/markdown

# Silicon Extend

Silicon Extend is the tool layer for Silicons. It gives every Silicon the same
small interface for discovering tools, understanding their inputs, requesting
setup, and executing work.

It runs in two modes:

| Mode | Source of truth | Best for |
| --- | --- | --- |
| Connected | Glass for the authenticated Silicon's team | Shared tools, setup, and connections across every Silicon on a team |
| Standalone | A local encrypted Extend store | Local development, isolated installations, and private internal APIs |

The command surface stays the same in both modes. A Silicon can move from a
standalone workspace to a Glass-connected installation without learning a
second tool system.

## Install

```bash
python -m pip install silicon-extend
```

The package installs both the `silicon-extend` command and the
`silicon_extend` Python library.

## The four-command path

```bash
# See the active mode and readiness summary.
silicon-extend status

# List tools that can be used now.
silicon-extend ready

# Read the live schema and usage guidance before calling a tool.
silicon-extend show inventory.lookup

# Execute with one JSON object.
silicon-extend run inventory.lookup --input examples/lookup-input.json
```

If a tool is enabled but not connected:

```bash
silicon-extend setup inventory.lookup \
  --note "Needed to check stock before confirming the order"
```

In connected mode this creates an actionable setup request in Interface. The
Carbon completes setup there; credentials remain in Glass and the tool becomes
available to the team's Silicons. In standalone mode the response points to
the local `connection add` command.

Every command accepts `--json`, including commands such as:

```bash
silicon-extend --json list
silicon-extend --json integration help inventory
```

## Connected mode: one team, one live directory

A normal Silicon installation already has a `.glass.json` credential file.
Extend discovers it, authenticates the Silicon, and lets Glass derive the
team. There is no team flag and no local copy of team connections.

That means:

- tools enabled or created for a team are visible to that team's Silicons;
- setup completed once can be reused according to the connection's team scope;
- changes made from the Extend area in Glass are visible on the next command;
- `silicon-extend sync` reports the current authoritative revision rather than
  merging a second local registry.

See [Connected mode](docs/connected-mode.md) for the full flow.

## Standalone mode: a complete local Extend

Without a Glass connection, Extend starts in standalone mode. It can define
integrations, import OpenAPI descriptions, create tools, store encrypted
connections, and execute tools directly.

```bash
export SILICON_EXTEND_MODE=standalone
export SILICON_EXTEND_HOME="$PWD/.extend"

silicon-extend integration create --file examples/inventory-integration.json
silicon-extend tool create inventory --file examples/inventory-tool.json
silicon-extend integration help inventory
```

Add a connection without putting its value in shell history:

```bash
silicon-extend connection add inventory --input -
```

The command reads one JSON object from standard input. See
[Standalone mode](docs/standalone.md) for storage, backup, and setup details.

## Internal tools

An internal integration is an HTTP API plus safe connection rules, help, and
one or more typed operations. Each operation becomes a tool. Tool definitions
contain:

- a stable key such as `inventory.lookup`;
- an HTTP method and path;
- JSON Schema for inputs and outputs;
- routing information for path, query, header, and body arguments;
- help that tells a Silicon when and how to use it.

Create one from the included manifests:

```bash
silicon-extend integration create --file examples/inventory-integration.json
silicon-extend tool create inventory --file examples/inventory-tool.json
```

Or import an OpenAPI 3 description:

```bash
silicon-extend integration import-openapi examples/inventory-openapi.json \
  --key inventory \
  --name "Inventory"
```

See [Building integrations](docs/integrations.md) for the manifest format,
connection types, OpenAPI behavior, and design guidance.

## Python

```python
from silicon_extend import Extend

extend = Extend.discover()

for tool in extend.list_tools(view="ready")["tools"]:
    print(tool["key"], tool["description"])

details = extend.get_tool("inventory.lookup")
result = extend.execute("inventory.lookup", {"sku": "SKU-1042"})
```

`Extend.discover()` uses the same mode discovery and source of truth as the
CLI. See the [Python SDK guide](docs/python-sdk.md) for setup requests,
authoring, errors, and structured results.

## Documentation

- [Getting started](docs/getting-started.md)
- [Connected mode](docs/connected-mode.md)
- [Standalone mode](docs/standalone.md)
- [Building integrations and tools](docs/integrations.md)
- [CLI reference](docs/cli.md)
- [Python SDK](docs/python-sdk.md)
- [Security model](docs/security.md)

Silicon Extend is licensed under the [Apache License 2.0](LICENSE).
