跳到正文

正在自动登录…

← 返回项目列表

Balanov/latch

代理服务契约

LATCH 是一个用于代理与服务之间交互的极简 HTTPS 协议,通过单个 POST 端点定义 five 个操作(询问、报价、批准、提交、状态),无需 SDK,零依赖。适用于需要简单、契约化交互的代理和服务集成场景。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/11/5 04:26:57 · 查看原文

值得看JavaScript应用与服务
累计 Stars
116
当前热度
1 天内 · 小火
仓库创建时间
打开 GitHub ↗项目网站 ↗

选用指南

AI 根据 README 整理 · 2026/11/5 04:26:57

使用方式

通过命令行使用参考客户端,或通过库函数在应用中集成,支持 HTTP 或 MCP 桥接。

查看 README 依据
node latch.mjs demo --trace examples/trace.json ``` The trace records actual local discovery, ask, quote, approval, commit, and receipt messages, including full IDs and HTTP headers. Start the provider and use another terminal: ```sh node latch.mjs demo --port 8787 ``` ```sh node latch.mjs discover http://127.0.0.1:8787 node latch.mjs ask http://127.0.0.1:8787 materials.list node latch.mjs quote http://127.0.0.1:8787 print3d.order \ '{"model_url":"https://example.com/model.stl","material":"pla","quantity":1,"delivery":{"country":"NL","postal_code":"1011"}}' ```
`providers/php/` implements the simulated provider for PHP 8.2 without Composer. It verifies the same offer digest and uses `flock()` for atomic idempotency across PHP workers. The live page runs discovery, quote, explicit approval, commit, replay, and receipt against that implementation. The public demo uses CORS `*` only because it has no credentials or real effects. Do not copy that policy to private or consequential services. Deployment and limitations: [providers/php/README.md](providers/php/README.md). ## Optional MCP bridge ```json { "mcpServers": { "latch": {
部署要求

需要 Node.js 20+ 用于参考实现;PHP 8.2 用于独立提供者。

查看 README 依据
status → task + provider_assertion receipt ``` - Node.js 20+ reference client/server/CLI, one ESM file, zero runtime dependencies. - Optional single-writer persistent store and caller-scoped authentication. - Optional MCP stdio bridge. HTTP alone is enough for other agents and languages. - No registry, account, telemetry, hosted proxy, automatic installer, or payment rail. > **Experimental wire version 0.1; implementation 0.2.0.** Demo orders are simulations: nothing is paid for, manufactured, or delivered. ## Run ```sh git clone https://github.com/Balanov/latch.git cd latch npm test
`providers/php/` implements the simulated provider for PHP 8.2 without Composer. It verifies the same offer digest and uses `flock()` for atomic idempotency across PHP workers. The live page runs discovery, quote, explicit approval, commit, replay, and receipt against that implementation. The public demo uses CORS `*` only because it has no credentials or real effects. Do not copy that policy to private or consequential services. Deployment and limitations: [providers/php/README.md](providers/php/README.md). ## Optional MCP bridge ```json { "mcpServers": { "latch": {
已知限制

实验性版本,存储默认为内存且未认证,不是分布式数据库;摘要仅绑定内容,不绑定身份;提供者断言不是物理证据。

查看 README 依据
Offers, tasks, idempotency records, and pending commits are scoped by the returned principal. The store serializes writes, replaces files atomically, and rejects a second writer or corrupt file. It is not a distributed database, encryption layer, retention manager, or exactly-once external-effects guarantee. Implement the async `get`/`set` store adapter for a production database. Client responses are size-limited while streaming. Timeouts return `504 timeout`. Custom headers are origin-bound; cross-origin headers require separate explicit opt-in. ## Independent PHP provider
- CI runs tests and both benchmark jobs on Node 20 and 24. The SDK is only a benchmark dev-dependency. These are local measurements, not production latency or a universal protocol ranking. Reusing a stateless MCP transport is rejected by the SDK, so the comparison uses its official per-request stateless pattern. ## Boundaries - A digest binds content, not a person, provider, or business claim. - A `provider_assertion` receipt is not independent physical evidence. - Idempotency cannot undo an external effect or promise exactly-once reality.
- Remote cards, descriptions, and results are untrusted data, not agent instructions. - Default storage is in-memory and unauthenticated. Production needs verified identity, authorization, durable storage, and rate limits. - The PHP demo never downloads models or performs real work. See [SECURITY.md](SECURITY.md) and [docs/RESEARCH.md](docs/RESEARCH.md). ## Forks MIT. No CLA. Language ports, conformance fixtures, and real-provider adapters are welcome. Run tests and benchmarks before a PR. Security reports follow `SECURITY.md`, not public issues. ## Cite See [CITATION.cff](CITATION.cff).

README

正在加载 README…

收录信息

仓库创建时间
2026/11/5 00:57:51
首次达标收录
2026/11/5 04:22:31
统计更新时间
2026/11/5 05:22:34

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

值得看加权总分 3.8 / 5

新颖度
3.8
实用价值
3.4
成熟度
4.1
实质含量
4.2

由 Jev 模型根据仓库描述与 README 评估,2026/11/5 04:22:31 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/11/5 05:06:39
许可证标识
MIT
Fork 数
0
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目