• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
c15r

c15r

sync

Agent collaboration layer https://sync.parc.land
Public
Like
1
sync
Home
Code
29
.claude
1
docs
11
frontend
13
mcp
11
reference
8
static
1
.gitignore
.vtignore
CLAUDE.md
README.md
_patch_main.ts
actions.ts
agents.ts
audit.ts
auth.ts
cel.ts
context.ts
deno.json
docs.ts
help-content.ts
invoke.ts
H
main.ts
replay.ts
rooms.ts
schema.ts
timers.ts
utils.ts
views.ts
wait.ts
Connections
Environment variables
2
Branches
8
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
CLAUDE.md
Code
/
CLAUDE.md
Search
2/28/2026
Viewing readonly version of main branch: v420
View latest version
CLAUDE.md

CLAUDE.md

This is agent-sync, a multi-agent coordination platform at https://sync.parc.land/.

Key architectural fact

The README.md is served as the root response (GET /) and doubles as the remote SKILL.md for Claude's skill system. It is fetched at module load time and served as text/plain.

This means README.md must:

  • Follow SKILL.md formatting conventions (frontmatter with name and description, concise workflow-first structure)
  • Be self-contained enough for an LLM to use the API without reading reference docs
  • Stay under ~4K tokens so it fits comfortably in a context window alongside other skills
  • Link to reference/api.md, reference/cel.md, reference/examples.md for deeper detail

When editing README.md, you are editing the skill definition that other Claude instances will read to learn how to use this platform. Write for that audience.

v5 architecture (context-first)

Two operations: read context, invoke actions.

  • GET /context — returns everything (state, views, agents, actions with defs, messages with bodies)
  • POST /actions/:id/invoke — the only write endpoint (builtin and custom actions)
  • GET /wait — blocks until condition, returns full context

10 total endpoints. Every write flows through action invocation. Every invocation is logged to _audit scope.

There are NO direct write endpoints for state, actions, views, or messages. All writes go through built-in actions (_set_state, _register_action, etc.) or custom actions.

Project structure

main.ts          — HTTP router, all endpoint handlers, built-in actions, audit logging
auth.ts          — Token generation, hashing, scope authority checks
cel.ts           — CEL context builder, expression evaluation, view context
schema.ts        — SQLite schema and v4→v5 migration
timers.ts        — Wall-clock and logical-clock timer lifecycle
dashboard.ts     — Browser dashboard (auth-gated, single HTML response)
README.md        — Skill definition (served at root)
reference/       — Detailed docs (api.md, cel.md, examples.md, surfaces.md)

Dashboard tabs

Agents, State, Messages, Actions, Views, Audit, CEL Console. The Audit tab shows every action invocation with success/failure status.

Surfaces (branch: surfaces)

The surfaces branch adds declarative UI composition to the dashboard. Key files:

  • frontend/types.ts — Surface type definitions and DashboardConfig interface
  • frontend/components/panels/Surfaces.tsx — Renderer for all 10 surface types
  • frontend/components/Dashboard.tsx — Consumes state._shared._dashboard, switches between surface mode and classic tab mode, includes client-side CEL evaluator for enabled expressions
  • reference/surfaces.md — Full reference doc

Client-side CEL evaluator

Dashboard.tsx has makeSimpleCelEvaluator() for evaluating surface enabled expressions in the browser. Key behavior:

  • Supports state.<scope>.<key> comparisons, views["id"], &&, ||
  • Loose equality: undefined == false returns true (missing state keys are treated as falsy). This is critical for gating on discovery flags that haven't been set yet.
  • Fail-closed: Unrecognized expressions return false (hide the surface).

Surface types

markdown, metric, view-grid, view-table, action-bar, action-form, action-choice, feed, watch, section (nesting container).

All defined in types.ts as a discriminated union on the type field.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.