Skip to content

Commit 052b7f1

Browse files
rbadillapclaude
andauthored
feat: rename package to osprotocol + add home page CTAs (#67)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fa29c60 commit 052b7f1

45 files changed

Lines changed: 246 additions & 197 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/osprotocol-docwriter/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If there is no corresponding `.ts` file, the page has no schema backing. Unless
3636

3737
Read [conventions.md](references/conventions.md) for the full style guide. Key rules:
3838

39-
- Import paths must be real and verifiable (`@osprotocol/schema/system/env`)
39+
- Import paths must be real and verifiable (`osprotocol/system/env`)
4040
- TypeScript interfaces must match the schema exactly — copy from source, don't paraphrase
4141
- Mermaid diagrams when they clarify flow or state, not for decoration
4242
- No "Coming soon", no generic bullet lists, no marketing language

.claude/skills/osprotocol-docwriter/references/conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ No strict template. Follow conventions for tone and structure, but organize cont
5050
Always show the real import path first:
5151

5252
```ts
53-
import type { Timeout, TimeoutAction } from '@osprotocol/schema/runs/timeout'
53+
import type { Timeout, TimeoutAction } from 'osprotocol/runs/timeout'
5454
```
5555

5656
Verify the import path exists in `packages/schema/package.json` exports. If it doesn't, the path is wrong.

.claude/skills/osprotocol-docwriter/references/gold-standard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The flowchart shows the actual decision path: start → timer → running → ti
2929
### 3. TypeScript API section is verifiable
3030

3131
```ts
32-
import type { Timeout, TimeoutAction } from '@osprotocol/schema/runs/timeout'
32+
import type { Timeout, TimeoutAction } from 'osprotocol/runs/timeout'
3333
```
3434

3535
Real import path. The types that follow are exact copies from the schema source — not summaries, not paraphrases. A developer can copy-paste this into their code.

.claude/skills/osprotocol-docwriter/references/inventory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Or check specific paths:
5959
grep -r "exports" packages/schema/package.json
6060
```
6161

62-
If a page shows `import type { X } from '@osprotocol/schema/foo/bar'` but that export path doesn't exist in `package.json`, the page is **stale**.
62+
If a page shows `import type { X } from 'osprotocol/foo/bar'` but that export path doesn't exist in `package.json`, the page is **stale**.
6363

6464
## Step 6: Check for broken links
6565

.claude/skills/osprotocol-docwriter/references/templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ description: [One sentence: what it does and where it fits]
1919
## TypeScript API
2020

2121
\`\`\`ts
22-
import type { [Types] } from '@osprotocol/schema/[domain]/[file]'
22+
import type { [Types] } from 'osprotocol/[domain]/[file]'
2323
\`\`\`
2424

2525
### [TypeName]

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ A specification for orchestrating AI agents. OSP defines TypeScript interfaces
4040

4141
This is a monorepo managed with Turborepo and Bun:
4242

43-
- `packages/schema/``@osprotocol/schema` TypeScript types (published to npm as `.ts` files)
43+
- `packages/schema/``osprotocol` TypeScript types (published to npm as `.ts` files)
4444
- `apps/web/` — Documentation site (Next.js + Fumadocs)

CLAUDE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ This project uses [Changesets](https://github.com/changesets/changesets) for ver
6060
5. On merge to `main`, GitHub Actions creates a "Version Packages" PR
6161
6. On merge of that PR, GitHub Actions publishes to npm automatically
6262

63-
The `@osprotocol/schema` package is published as a **types-only package** (`.ts` files directly, no compiled `.d.ts`). The `apps/web` package is excluded from publishing.
63+
The `osprotocol` package is published as a **types-only package** (`.ts` files directly, no compiled `.d.ts`). The `apps/web` package is excluded from publishing.
6464

6565
## Architecture
6666

@@ -73,7 +73,7 @@ protocol/
7373
│ ├── content/docs/ # MDX documentation files
7474
│ ├── components/ # React components
7575
│ └── lib/ # Shared utilities (source.ts, metadata.ts)
76-
└── packages/schema/ # @osprotocol/schema - Protocol type definitions
76+
└── packages/schema/ # osprotocol - Protocol type definitions
7777
├── system/ # System interfaces (env, fs, sandbox, settings, preferences, registry, installer, mcp-client)
7878
├── context/ # Context facades (system context, embeddings, kv)
7979
├── actions/ # Action facades (system actions, tools, mcp-servers)
@@ -85,16 +85,16 @@ protocol/
8585

8686
### Schema Package Exports
8787

88-
The `@osprotocol/schema` package provides TypeScript types for the protocol. See `packages/schema/package.json` `exports` field for the full list. Key entry points:
88+
The `osprotocol` package provides TypeScript types for the protocol. See `packages/schema/package.json` `exports` field for the full list. Key entry points:
8989

90-
- `@osprotocol/schema` - Main barrel export
91-
- `@osprotocol/schema/workflows` - Workflow patterns
92-
- `@osprotocol/schema/runs` - Run control
93-
- `@osprotocol/schema/system/*` - System interfaces (env, fs, sandbox, settings, preferences, registry, installer, mcp-client)
94-
- `@osprotocol/schema/context/*` - Context facades (system, embeddings, kv)
95-
- `@osprotocol/schema/actions/*` - Action facades (system, tools, mcp-servers)
96-
- `@osprotocol/schema/checks/*` - Verification (rules, judge, audit, screenshot)
97-
- `@osprotocol/schema/apps/schema` - Distribution manifest types
90+
- `osprotocol` - Main barrel export
91+
- `osprotocol/workflows` - Workflow patterns
92+
- `osprotocol/runs` - Run control
93+
- `osprotocol/system/*` - System interfaces (env, fs, sandbox, settings, preferences, registry, installer, mcp-client)
94+
- `osprotocol/context/*` - Context facades (system, embeddings, kv)
95+
- `osprotocol/actions/*` - Action facades (system, tools, mcp-servers)
96+
- `osprotocol/checks/*` - Verification (rules, judge, audit, screenshot)
97+
- `osprotocol/apps/schema` - Distribution manifest types
9898

9999
### Documentation Site
100100

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<p align="center">
1515
<a href="https://osprotocol.dev/docs">Documentation</a> |
1616
<a href="https://osprotocol.dev/docs/architecture">Architecture</a> |
17-
<a href="https://www.npmjs.com/package/@osprotocol/schema">npm</a>
17+
<a href="https://www.npmjs.com/package/osprotocol">npm</a>
1818
</p>
1919

2020
#### About

apps/web/app/(home)/page.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Link from 'next/link';
33
import { Building, RefreshCw, Target } from 'lucide-react';
44
import { createMetadata } from '@/lib/metadata';
55
import WorldMap from '@/components/world-map';
6+
import { InstallButton } from '@/components/install-button';
67

78
export async function generateMetadata(): Promise<Metadata> {
89
const image = {
@@ -83,8 +84,19 @@ export default function HomePage() {
8384
<span className="text-foreground">REST</span> for APIs—but for AI agents.
8485
</p>
8586

87+
{/* CTAs */}
88+
<div className="flex flex-col sm:flex-row items-center gap-4 mb-12 md:mb-16">
89+
<Link
90+
href="/docs"
91+
className="inline-flex items-center justify-center px-6 py-2.5 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors"
92+
>
93+
Get Started
94+
</Link>
95+
<InstallButton />
96+
</div>
97+
8698
{/* Three Domains */}
87-
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8 w-full max-w-4xl mb-12 md:mb-16">
99+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8 w-full max-w-4xl">
88100
{domains.map((domain) => (
89101
<Link
90102
key={domain.title}
@@ -98,14 +110,6 @@ export default function HomePage() {
98110
</Link>
99111
))}
100112
</div>
101-
102-
{/* CTA */}
103-
<Link
104-
href="/docs"
105-
className="inline-flex items-center justify-center px-6 py-2.5 text-sm font-medium border border-border rounded-md bg-transparent hover:bg-accent hover:text-accent-foreground transition-colors active:scale-[0.97] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
106-
>
107-
View Documentation →
108-
</Link>
109113
</div>
110114
</div>
111115
);
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"use client"
2+
3+
import * as React from "react"
4+
import { Check, Copy } from "lucide-react"
5+
6+
export function InstallButton() {
7+
const [copied, setCopied] = React.useState(false)
8+
const command = "npm i osprotocol"
9+
10+
const copyToClipboard = async () => {
11+
await navigator.clipboard.writeText(command)
12+
setCopied(true)
13+
setTimeout(() => setCopied(false), 2000)
14+
}
15+
16+
return (
17+
<button
18+
onClick={copyToClipboard}
19+
className="inline-flex items-center gap-2 px-4 py-2.5 text-sm font-mono border border-border rounded-md bg-transparent hover:bg-accent transition-colors"
20+
>
21+
<span>{command}</span>
22+
{copied ? (
23+
<Check className="size-4 text-green-500" />
24+
) : (
25+
<Copy className="size-4 text-muted-foreground" />
26+
)}
27+
</button>
28+
)
29+
}

0 commit comments

Comments
 (0)