mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-24 20:09:02 +00:00
docs: the links a reader clicks now go somewhere
Probed all 328 clickable external links against a 404 control. The 401s and 405s are code-sample endpoints answering correctly to an unauthenticated GET; these were the ones actually broken. `curl -fsSL https://hanzo.ai/install | sh` — the first thing the CLI page tells you to run, and it 404s. The installer is served at hanzo.sh, which is what the landing page and the quickstart already say. Fixed in the generator, so it stays fixed. The ZAP bindings pointed at `zap-protocol`, an org whose repos do not exist, and `@zap-protocol/zap`, a package never published. The org is `zap-proto` and its repos are named for the language — `go`, `rust`, `py` — not `zap-go`. The Go import path was wrong with it: proxy.golang.org serves `github.com/zap-proto/go` and refuses `zap-protocol/zap-go`. 18 files. Four binding pages listed example files that do not exist in any of those repositories; they now link to what does. `luxfi/contracts` is private, so both links 404 for every reader — the prose keeps the contracts and points at docs a reader can open. `charts.hanzo.ai` does not resolve and `helm repo add` is not how this estate ships charts: universe installs `oci://oci.hanzo.ai/charts`. `unpkg.com/@hanzo/ast/browser` needs the file, `dist/browser.js` — unpkg does not resolve export conditions.
This commit is contained in:
@@ -76,8 +76,7 @@ docker compose up -d
|
||||
### Helm Chart
|
||||
|
||||
```bash
|
||||
helm repo add hanzo https://charts.hanzo.ai
|
||||
helm install chat hanzo/chat \
|
||||
helm install chat oci://oci.hanzo.ai/charts/chat \
|
||||
--set config.hanzoApiKey=$HANZO_API_KEY \
|
||||
--set ingress.enabled=true \
|
||||
--set ingress.hosts[0].host=chat.example.com
|
||||
|
||||
@@ -50,7 +50,7 @@ Add a single script tag to any page to start collecting interaction data automat
|
||||
data-api-key="your-api-key"
|
||||
data-dataset-id="web-interactions"
|
||||
data-organization-id="org-hanzo"
|
||||
src="https://unpkg.com/@hanzo/ast/browser"
|
||||
src="https://unpkg.com/@hanzo/ast/dist/browser.js"
|
||||
></script>
|
||||
```
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ match consensus.try_consensus(&query_id).await? {
|
||||
### Go
|
||||
|
||||
```go
|
||||
import "github.com/zap-protocol/zap-go/consensus"
|
||||
import "github.com/zap-proto/go/consensus"
|
||||
|
||||
// Create service
|
||||
svc := consensus.NewAgentConsensus()
|
||||
|
||||
@@ -178,7 +178,7 @@ assert!(valid);
|
||||
### Go
|
||||
|
||||
```go
|
||||
import "github.com/zap-protocol/zap-go/corona"
|
||||
import "github.com/zap-proto/go/corona"
|
||||
|
||||
// Setup
|
||||
party := corona.NewParty(0, 3, 2) // Party 0 of 3, threshold 2
|
||||
|
||||
@@ -186,7 +186,7 @@ println!("Created: {}", lux_did); // did:lux:0x...
|
||||
#### Go
|
||||
|
||||
```go
|
||||
import "github.com/zap-protocol/zap-go/did"
|
||||
import "github.com/zap-proto/go/did"
|
||||
|
||||
// Generate keypair
|
||||
publicKey, privateKey := mldsa.GenerateKeypair()
|
||||
|
||||
@@ -277,6 +277,6 @@ match lux.create(&public_key, options).await {
|
||||
## Resources
|
||||
|
||||
- [Lux Network Docs](https://docs.lux.network)
|
||||
- [DID Registry Contract](https://github.com/luxfi/contracts/tree/main/did)
|
||||
- [Stake Registry Contract](https://github.com/luxfi/contracts/tree/main/stake)
|
||||
- DID Registry and Stake Registry contracts — addressed on-chain; see
|
||||
[Lux Network Docs](https://docs.lux.network) for the deployed addresses
|
||||
- [Block Explorer](https://explorer.lux.network)
|
||||
|
||||
@@ -205,7 +205,7 @@ let client = connect_pq("zap+pq://localhost:9000", identity).await?;
|
||||
### Go
|
||||
|
||||
```go
|
||||
import "github.com/zap-protocol/zap-go/pq"
|
||||
import "github.com/zap-proto/go/pq"
|
||||
|
||||
// Generate identity
|
||||
identity, _ := pq.GenerateIdentity()
|
||||
|
||||
@@ -10,7 +10,7 @@ The C binding provides a minimal API for embedded systems and FFI integration.
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
git clone https://github.com/zap-protocol/zap-c
|
||||
git clone https://github.com/zap-proto/c
|
||||
cd zap-c
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
@@ -101,4 +101,4 @@ void zap_free_content(zap_resource_content_t* content);
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation at [zap-protocol/zap-c](https://github.com/zap-protocol/zap-c).
|
||||
Full documentation at [zap-proto/c](https://github.com/zap-proto/c).
|
||||
|
||||
@@ -15,7 +15,7 @@ Using CMake FetchContent:
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
zap-cpp
|
||||
GIT_REPOSITORY https://github.com/zap-protocol/zap-cpp
|
||||
GIT_REPOSITORY https://github.com/zap-proto/cpp
|
||||
GIT_TAG v0.1.0
|
||||
)
|
||||
FetchContent_MakeAvailable(zap-cpp)
|
||||
@@ -106,4 +106,4 @@ auto tools = co_await gateway->listTools();
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation at [zap-protocol/zap-cpp](https://github.com/zap-protocol/zap-cpp).
|
||||
Full documentation at [zap-proto/cpp](https://github.com/zap-proto/cpp).
|
||||
|
||||
@@ -54,4 +54,4 @@ await client.CloseAsync();
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation at [zap-protocol/zap-dotnet](https://github.com/zap-protocol/zap-dotnet).
|
||||
Full documentation at [zap-proto/cs](https://github.com/zap-proto/cs).
|
||||
|
||||
@@ -13,7 +13,7 @@ Add to `rebar.config`:
|
||||
|
||||
```erlang
|
||||
{deps, [
|
||||
{zap, {git, "https://github.com/zap-protocol/zap-erl.git", {tag, "0.1.0"}}}
|
||||
{zap, {git, "https://github.com/zap-proto/erlang.git", {tag, "0.1.0"}}}
|
||||
]}.
|
||||
```
|
||||
|
||||
@@ -76,4 +76,4 @@ handle_call({call_tool, Call}, _From, #{client := Client} = State) ->
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation at [zap-protocol/zap-erl](https://github.com/zap-protocol/zap-erl).
|
||||
Full documentation at [zap-proto/erlang](https://github.com/zap-proto/erlang).
|
||||
|
||||
@@ -10,7 +10,7 @@ The Go binding provides an idiomatic Go interface to ZAP with goroutine-safe cli
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
go get github.com/zap-protocol/zap-go
|
||||
go get github.com/zap-proto/go
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
zap "github.com/zap-protocol/zap-go"
|
||||
zap "github.com/zap-proto/go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -178,7 +178,7 @@ gateway.RemoveServer(ctx, fsID)
|
||||
## Post-Quantum TLS
|
||||
|
||||
```go
|
||||
import "github.com/zap-protocol/zap-go/pq"
|
||||
import "github.com/zap-proto/go/pq"
|
||||
|
||||
// Generate identity
|
||||
identity, err := pq.GenerateIdentity()
|
||||
@@ -195,7 +195,7 @@ client, err := zap.Connect(ctx, "zap+pq://localhost:9000",
|
||||
## DID Support
|
||||
|
||||
```go
|
||||
import "github.com/zap-protocol/zap-go/did"
|
||||
import "github.com/zap-proto/go/did"
|
||||
|
||||
// Create DID
|
||||
d := did.New(did.MethodKey, publicKey)
|
||||
@@ -246,8 +246,8 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
zap "github.com/zap-protocol/zap-go"
|
||||
"github.com/zap-protocol/zap-go/server"
|
||||
zap "github.com/zap-proto/go"
|
||||
"github.com/zap-proto/go/server"
|
||||
)
|
||||
|
||||
type MyServer struct{}
|
||||
@@ -336,8 +336,8 @@ package myapp
|
||||
import (
|
||||
"testing"
|
||||
|
||||
zap "github.com/zap-protocol/zap-go"
|
||||
"github.com/zap-protocol/zap-go/testing/mock"
|
||||
zap "github.com/zap-proto/go"
|
||||
"github.com/zap-proto/go/testing/mock"
|
||||
)
|
||||
|
||||
func TestToolCall(t *testing.T) {
|
||||
@@ -359,6 +359,4 @@ func TestToolCall(t *testing.T) {
|
||||
## Examples
|
||||
|
||||
Full examples at:
|
||||
- [examples/client](https://github.com/zap-protocol/zap-go/tree/main/examples/client)
|
||||
- [examples/server](https://github.com/zap-protocol/zap-go/tree/main/examples/server)
|
||||
- [examples/gateway](https://github.com/zap-protocol/zap-go/tree/main/examples/gateway)
|
||||
- [examples/](https://github.com/zap-proto/go/tree/main/examples)
|
||||
|
||||
@@ -78,4 +78,4 @@ main = runZapWith "zap://localhost:9000" runZap
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation at [zap-protocol/zap-haskell](https://github.com/zap-protocol/zap-haskell).
|
||||
Full documentation at [zap-proto/haskell](https://github.com/zap-proto/haskell).
|
||||
|
||||
@@ -107,7 +107,7 @@ Generate bindings from the ZAP schema:
|
||||
|
||||
```bash
|
||||
# Clone the schema
|
||||
git clone https://github.com/zap-protocol/zap
|
||||
git clone https://github.com/zap-proto/zap
|
||||
cd zap/schema
|
||||
|
||||
# Generate for your language
|
||||
@@ -122,9 +122,9 @@ See language-specific pages for detailed code generation instructions.
|
||||
|
||||
Language bindings are maintained in separate repositories:
|
||||
|
||||
- [zap-protocol/zap-rs](https://github.com/zap-protocol/zap-rs) - Rust
|
||||
- [zap-protocol/zap-go](https://github.com/zap-protocol/zap-go) - Go
|
||||
- [zap-protocol/zap-py](https://github.com/zap-protocol/zap-py) - Python
|
||||
- [zap-protocol/zap-js](https://github.com/zap-protocol/zap-js) - JavaScript
|
||||
- [zap-proto/rust](https://github.com/zap-proto/rust) - Rust
|
||||
- [zap-proto/go](https://github.com/zap-proto/go) - Go
|
||||
- [zap-proto/py](https://github.com/zap-proto/py) - Python
|
||||
- [zap-proto/js](https://github.com/zap-proto/js) - JavaScript
|
||||
|
||||
Contributions welcome! See each repo's CONTRIBUTING.md for guidelines.
|
||||
|
||||
@@ -72,4 +72,4 @@ CompletableFuture<Void> runAgent() {
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation at [zap-protocol/zap-java](https://github.com/zap-protocol/zap-java).
|
||||
Full documentation at [zap-proto/java](https://github.com/zap-proto/java).
|
||||
|
||||
@@ -10,17 +10,17 @@ The JavaScript binding supports both Node.js and browser environments with full
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install @zap-protocol/zap
|
||||
npm install @zap-proto/zap
|
||||
# or
|
||||
pnpm add @zap-protocol/zap
|
||||
pnpm add @zap-proto/zap
|
||||
# or
|
||||
yarn add @zap-protocol/zap
|
||||
yarn add @zap-proto/zap
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
```typescript
|
||||
import { Zap, ClientInfo, ToolCall } from '@zap-protocol/zap';
|
||||
import { Zap, ClientInfo, ToolCall } from '@zap-proto/zap';
|
||||
|
||||
async function main() {
|
||||
// Connect to ZAP server
|
||||
@@ -122,7 +122,7 @@ const messages: PromptMessage[] = await client.getPrompt('code_review', {
|
||||
## Gateway
|
||||
|
||||
```typescript
|
||||
import { Gateway, ServerConfig, Transport, Auth } from '@zap-protocol/zap';
|
||||
import { Gateway, ServerConfig, Transport, Auth } from '@zap-proto/zap';
|
||||
|
||||
// Create gateway
|
||||
const gateway = new Gateway();
|
||||
@@ -170,7 +170,7 @@ import type {
|
||||
ClientInfo,
|
||||
Capabilities,
|
||||
Metadata,
|
||||
} from '@zap-protocol/zap';
|
||||
} from '@zap-proto/zap';
|
||||
|
||||
interface MyToolArgs {
|
||||
path: string;
|
||||
@@ -194,7 +194,7 @@ async function callMyTool(client: Zap, path: string): Promise<string> {
|
||||
## Error Handling
|
||||
|
||||
```typescript
|
||||
import { ZapError, DisconnectedError, TimeoutError } from '@zap-protocol/zap';
|
||||
import { ZapError, DisconnectedError, TimeoutError } from '@zap-proto/zap';
|
||||
|
||||
try {
|
||||
const result = await client.callTool(call);
|
||||
@@ -215,7 +215,7 @@ try {
|
||||
For browser environments:
|
||||
|
||||
```typescript
|
||||
import { Zap } from '@zap-protocol/zap/browser';
|
||||
import { Zap } from '@zap-proto/zap/browser';
|
||||
|
||||
// WebSocket connection
|
||||
const client = await Zap.connect('zap+ws://localhost:9000');
|
||||
@@ -224,14 +224,14 @@ const client = await Zap.connect('zap+ws://localhost:9000');
|
||||
## Server Implementation (Node.js)
|
||||
|
||||
```typescript
|
||||
import { Server, ZapHandler } from '@zap-protocol/zap/server';
|
||||
import { Server, ZapHandler } from '@zap-proto/zap/server';
|
||||
import type {
|
||||
ClientInfo,
|
||||
ServerInfo,
|
||||
Tool,
|
||||
ToolCall,
|
||||
ToolResult,
|
||||
} from '@zap-protocol/zap';
|
||||
} from '@zap-proto/zap';
|
||||
|
||||
class MyHandler implements ZapHandler {
|
||||
async init(client: ClientInfo): Promise<ServerInfo> {
|
||||
@@ -319,7 +319,7 @@ try {
|
||||
|
||||
```typescript
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { Zap } from '@zap-protocol/zap';
|
||||
import { Zap } from '@zap-proto/zap';
|
||||
|
||||
describe('ZAP Client', () => {
|
||||
it('should list tools', async () => {
|
||||
@@ -339,6 +339,4 @@ describe('ZAP Client', () => {
|
||||
## Examples
|
||||
|
||||
Full examples at:
|
||||
- [examples/client.ts](https://github.com/zap-protocol/zap-js/blob/main/examples/client.ts)
|
||||
- [examples/server.ts](https://github.com/zap-protocol/zap-js/blob/main/examples/server.ts)
|
||||
- [examples/browser.ts](https://github.com/zap-protocol/zap-js/blob/main/examples/browser.ts)
|
||||
- [zap-proto/js](https://github.com/zap-proto/js)
|
||||
|
||||
@@ -48,4 +48,4 @@ let () =
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation at [zap-protocol/zap-ocaml](https://github.com/zap-protocol/zap-ocaml).
|
||||
Full documentation at [zap-proto/ocaml](https://github.com/zap-proto/ocaml).
|
||||
|
||||
@@ -10,10 +10,10 @@ The Python binding provides an async/await API built on pycapnp with full type h
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install zap-protocol
|
||||
pip install zap-proto
|
||||
|
||||
# Or with uv
|
||||
uv add zap-protocol
|
||||
uv add zap-proto
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
@@ -321,6 +321,4 @@ async def test_list_tools(mock_client):
|
||||
## Examples
|
||||
|
||||
Full examples at:
|
||||
- [examples/client.py](https://github.com/zap-protocol/zap-py/blob/main/examples/client.py)
|
||||
- [examples/server.py](https://github.com/zap-protocol/zap-py/blob/main/examples/server.py)
|
||||
- [examples/gateway.py](https://github.com/zap-protocol/zap-py/blob/main/examples/gateway.py)
|
||||
- [zap-proto/py](https://github.com/zap-proto/py)
|
||||
|
||||
@@ -15,11 +15,11 @@ Add to your `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
zap-protocol = "0.1"
|
||||
zap-proto = "0.1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
|
||||
# Optional features
|
||||
zap-protocol = { version = "0.1", features = ["pq-tls", "corona", "did"] }
|
||||
zap-proto = { version = "0.1", features = ["pq-tls", "corona", "did"] }
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
@@ -175,7 +175,7 @@ Enable the `pq-tls` feature:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
zap-protocol = { version = "0.1", features = ["pq-tls"] }
|
||||
zap-proto = { version = "0.1", features = ["pq-tls"] }
|
||||
```
|
||||
|
||||
```rust
|
||||
@@ -199,7 +199,7 @@ Enable the `corona` feature:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
zap-protocol = { version = "0.1", features = ["corona"] }
|
||||
zap-proto = { version = "0.1", features = ["corona"] }
|
||||
```
|
||||
|
||||
```rust
|
||||
@@ -232,7 +232,7 @@ Enable the `did` feature:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
zap-protocol = { version = "0.1", features = ["did"] }
|
||||
zap-proto = { version = "0.1", features = ["did"] }
|
||||
```
|
||||
|
||||
```rust
|
||||
@@ -371,6 +371,4 @@ mod tests {
|
||||
## Examples
|
||||
|
||||
Full examples available at:
|
||||
- [zap-protocol/examples/client.rs](https://github.com/zap-protocol/zap-rs/blob/main/examples/client.rs)
|
||||
- [zap-protocol/examples/server.rs](https://github.com/zap-protocol/zap-rs/blob/main/examples/server.rs)
|
||||
- [zap-protocol/examples/gateway.rs](https://github.com/zap-protocol/zap-rs/blob/main/examples/gateway.rs)
|
||||
- [zap-proto/rust](https://github.com/zap-proto/rust)
|
||||
|
||||
@@ -46,41 +46,41 @@ choco install capnproto
|
||||
<Tabs items={['Rust', 'Go', 'Python', 'JavaScript']}>
|
||||
<Tab value="Rust">
|
||||
```bash
|
||||
cargo add zap-protocol
|
||||
cargo add zap-proto
|
||||
```
|
||||
|
||||
```toml title="Cargo.toml"
|
||||
[dependencies]
|
||||
zap-protocol = "0.1"
|
||||
zap-proto = "0.1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
```
|
||||
</Tab>
|
||||
|
||||
<Tab value="Go">
|
||||
```bash
|
||||
go get github.com/zap-protocol/zap-go
|
||||
go get github.com/zap-proto/go
|
||||
```
|
||||
</Tab>
|
||||
|
||||
<Tab value="Python">
|
||||
```bash
|
||||
pip install zap-protocol
|
||||
pip install zap-proto
|
||||
```
|
||||
|
||||
Or with uv:
|
||||
```bash
|
||||
uv add zap-protocol
|
||||
uv add zap-proto
|
||||
```
|
||||
</Tab>
|
||||
|
||||
<Tab value="JavaScript">
|
||||
```bash
|
||||
npm install @zap-protocol/zap
|
||||
npm install @zap-proto/zap
|
||||
```
|
||||
|
||||
Or with pnpm:
|
||||
```bash
|
||||
pnpm add @zap-protocol/zap
|
||||
pnpm add @zap-proto/zap
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
@@ -124,7 +124,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
zap "github.com/zap-protocol/zap-go"
|
||||
zap "github.com/zap-proto/go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -175,7 +175,7 @@ asyncio.run(main())
|
||||
|
||||
<Tab value="JavaScript">
|
||||
```typescript
|
||||
import { Zap, ClientInfo } from '@zap-protocol/zap';
|
||||
import { Zap, ClientInfo } from '@zap-proto/zap';
|
||||
|
||||
async function main() {
|
||||
// Connect to ZAP server
|
||||
@@ -411,7 +411,7 @@ all_tools = await gateway.list_tools()
|
||||
|
||||
<Tab value="JavaScript">
|
||||
```typescript
|
||||
import { Gateway, ServerConfig, Transport, Auth } from '@zap-protocol/zap';
|
||||
import { Gateway, ServerConfig, Transport, Auth } from '@zap-proto/zap';
|
||||
|
||||
// Create gateway
|
||||
const gateway = new Gateway();
|
||||
|
||||
@@ -20,7 +20,7 @@ Every Cap'n Proto schema file starts with a unique ID:
|
||||
# Annotations for code generation
|
||||
using Go = import "/go.capnp";
|
||||
$Go.package("zap");
|
||||
$Go.import("github.com/zap-protocol/zap-go");
|
||||
$Go.import("github.com/zap-proto/go");
|
||||
```
|
||||
|
||||
### Primitive Types
|
||||
@@ -305,7 +305,7 @@ See [Language Bindings](/docs/zap/bindings) for language-specific details.
|
||||
## Complete Schema Reference
|
||||
|
||||
The complete ZAP schema is available at:
|
||||
- [GitHub: zap.capnp](https://github.com/zap-protocol/zap/blob/main/schema/zap.capnp)
|
||||
- [GitHub: zap.capnp](https://github.com/zap-proto/zap/blob/main/schema/zap.capnp)
|
||||
|
||||
Key sections:
|
||||
- Core types (Timestamp, Metadata)
|
||||
|
||||
@@ -172,7 +172,7 @@ function renderIndex(gs: Group[], commands: number, covered: number): string {
|
||||
);
|
||||
L.push('');
|
||||
L.push('```bash');
|
||||
L.push('curl -fsSL https://hanzo.ai/install | sh');
|
||||
L.push('curl -fsSL hanzo.sh | sh');
|
||||
L.push('hanzo auth login');
|
||||
L.push('```');
|
||||
L.push('');
|
||||
|
||||
Reference in New Issue
Block a user