@axiom-lattice/protocols 4.10.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +113 -0
- package/dist/index.d.mts +506 -44
- package/dist/index.d.ts +506 -44
- package/dist/index.js +156 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +142 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AgentInterruptProtocol.ts +15 -0
- package/src/AgentLatticeProtocol.ts +0 -49
- package/src/AgentWebAppRuntimeProtocol.ts +2 -0
- package/src/ChannelAdapterProtocol.ts +17 -0
- package/src/ChannelReplyJobProtocol.ts +184 -0
- package/src/CheckpointStorageProtocol.ts +98 -0
- package/src/MessageProtocol.ts +8 -0
- package/src/ModelProviderProtocol.ts +65 -0
- package/src/RunCancelProtocol.ts +76 -0
- package/src/StoreProtocol.ts +181 -0
- package/src/ThreadStoreProtocol.ts +24 -0
- package/src/VectorStoreProviderProtocol.ts +9 -0
- package/src/__tests__/RunCancelProtocol.test.ts +148 -0
- package/src/__tests__/agent-web-app-types.test.ts +4 -0
- package/src/index.ts +5 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/protocols@
|
|
2
|
+
> @axiom-lattice/protocols@5.0.0 build /home/runner/work/agentic/agentic/packages/protocols
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2020
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m48.07 KB[39m
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m211.72 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 424ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m54.04 KB[39m
|
|
15
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m215.96 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 424ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 12155ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m277.82 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m277.82 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,118 @@
|
|
|
1
1
|
# @axiom-lattice/protocols
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 8f9dd0d: Remove the deprecated TeamAgent/teammate feature and its UI surfaces.
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- f1f8840: Durable cross-replica public-channel replies (Phase B)
|
|
12
|
+
|
|
13
|
+
- Add a durable `ChannelReplyJob` protocol, in-memory/PostgreSQL stores, and a
|
|
14
|
+
`lattice_channel_reply_jobs` migration (v200) with lease-based claim, bounded
|
|
15
|
+
reschedule, and terminal delivery state.
|
|
16
|
+
- Route non-Room public ingress for adapters declaring `durableReply: true`
|
|
17
|
+
through a reply job plus a pending `source='run_api'` run (job written first,
|
|
18
|
+
with compensation on run-create failure). Lark opts in; WeCom/WeChat/Room stay
|
|
19
|
+
legacy because their reply transport is connection-bound/process-local.
|
|
20
|
+
- Add `ChannelReplyDispatcher`, which polls due jobs on any replica, waits for
|
|
21
|
+
the run ledger to become terminal, reads the final assistant text from the
|
|
22
|
+
thread checkpoint, sends it through the adapter, and marks the job delivered.
|
|
23
|
+
Empty output and loader/send failures retry with capped exponential backoff;
|
|
24
|
+
sends have a 15s deadline; missing runs converge after a 30s grace window;
|
|
25
|
+
cancelled runs do not send a waiting notice. Terminal jobs are pruned after
|
|
26
|
+
24h.
|
|
27
|
+
- Keep Room/trusted dispatch and `ChannelConnectionLeader` unchanged. Durable
|
|
28
|
+
replies are at-least-once; outbound metadata carries `inputMessageId` for
|
|
29
|
+
channel-side deduplication. Ingress falls back to legacy when the dispatcher
|
|
30
|
+
runtime is not registered. Opt out with `CHANNEL_DURABLE_RUNS=false`.
|
|
31
|
+
|
|
32
|
+
- ea90717: `keep_latest` checkpoint pruning (M2-B2b)
|
|
33
|
+
|
|
34
|
+
- Add `CheckpointMaintenance.pruneThread` and transactional per-namespace latest-N checkpoint retention with blob retention derived from `channel_versions`.
|
|
35
|
+
- Add `POST .../prune { strategy: "keep_latest", keep?: 1..100 }`; `delete` is unchanged.
|
|
36
|
+
- Reuse strict ownership, thread-run lease, and empty-inbox guards; keep the thread row and chunk stream.
|
|
37
|
+
|
|
38
|
+
- 351b0e9: Multi-replica run cancel and queue-first HITL
|
|
39
|
+
|
|
40
|
+
- Add ledger-backed run cancel intent plus Redis owner wake-up and heartbeat fallback; abort/recover can be accepted by any replica without ingress stickiness.
|
|
41
|
+
- Make `input.respond` queue-first with `expected_interrupt_id` worker validation and the official LangGraph resume map; reserve answers across replicas and release in-flight reservations after enqueue.
|
|
42
|
+
- Unify Room and Web App native HITL resume mapping with the Console command path.
|
|
43
|
+
- Expose run-cancel readiness/metrics and document the A2A boundary: A2A remains a deferred adapter over the Agent runtime, not a second runtime.
|
|
44
|
+
|
|
45
|
+
- 1fde314: Pending run task queue (Phase 1)
|
|
46
|
+
|
|
47
|
+
- Make `lattice_agent_runs` the durable task queue for the new single-run API: create writes `pending`, a worker claims/executes through `Agent.executeRun`, and recovery reclaims expired rows in place and completes durable rollback work.
|
|
48
|
+
- Add run lifecycle `join` (bounded terminal wait), `cancel?action=interrupt|rollback`, and HITL command runs; Web App runtime mirrors the same handlers.
|
|
49
|
+
- Add `client.runs.join` / cancel `action` / create `command`, and single-run HITL with `ThreadStream.openRun`. `RunCreateResult` is now `{ runId, messageId?, status: "pending" }`: the old queue-first `status: "queued"` / `queued: true` shape and the required `messageId` are gone (command runs have no user message).
|
|
50
|
+
- Keep the legacy message queue, Room, Project Task, A2A, and legacy HITL on `source='legacy'`; the two executors share the `thread-run` lease.
|
|
51
|
+
|
|
52
|
+
- da5294d: Tenant-scoped namespaced KV store (M2-C)
|
|
53
|
+
|
|
54
|
+
- Add `StoreProtocol` (put/get/delete/search/listNamespaces/deleteExpired) with deep JSONB filters, substring query, and TTL.
|
|
55
|
+
- Add InMemory, Local SQLite, and PostgreSQL implementations (PG migration v195 with GIN and partial expiry indexes).
|
|
56
|
+
- Add `/api/store/*` routes and a single-flight store TTL sweeper.
|
|
57
|
+
- `index` hints are accepted but vector indexing and semantic search remain deferred.
|
|
58
|
+
|
|
59
|
+
- 03e9984: Thread commands and explicit interrupts (M3-B)
|
|
60
|
+
|
|
61
|
+
- Add normalized `AgentInterrupt` plus `Agent.getInterrupts()`/`normalizeAgentInterrupts()` for clarify, task_review, and custom interrupts.
|
|
62
|
+
- Expose `interrupts` in thread status using one state read.
|
|
63
|
+
- Add `POST /api/assistants/:assistantId/threads/:threadId/commands` with `run.start`, `input.respond`, and `agent.getTree`.
|
|
64
|
+
- Map multitask strategies to queue modes, add process-local 5-minute answer dedupe, and return Mermaid from `get_draw_graph()`.
|
|
65
|
+
|
|
66
|
+
- 2609f3b: Thread copy and prune-delete (M2-B1)
|
|
67
|
+
|
|
68
|
+
- Add `CheckpointMaintenance` and transactional `copyThread` / `deleteThread` to `PostgreSQLCheckpointStorage`, with a typed `CHECKPOINT_TARGET_NOT_EMPTY` conflict and metadata `thread_id` rewrite.
|
|
69
|
+
- Add owner-scoped, busy-guarded copy and prune-delete routes; prune clears the thread's chunk stream best-effort and retains run-ledger rows.
|
|
70
|
+
- Share the thread ownership resolver between read and maintenance controllers.
|
|
71
|
+
|
|
72
|
+
- 12ce057: Thread read model (M2-A)
|
|
73
|
+
|
|
74
|
+
- Add `Agent.getStateHistory` / `Agent.getStateAtCheckpoint` (bounded to 50 checkpoints).
|
|
75
|
+
- Add `CheckpointStorage` / `ThreadCheckpointStorage` protocols and a read-only `PostgreSQLCheckpointStorage` over the built-in `PostgresSaver` tables.
|
|
76
|
+
- Add tenant/assistant-scoped read-only routes for thread status, checkpoint history, checkpoint state, and checkpoint storage usage; missing checkpoints and foreign threads return 404 and unexpected errors are sanitized.
|
|
77
|
+
|
|
78
|
+
- 23902af: Per-thread TTL and expiry sweeper (M2-B2a)
|
|
79
|
+
|
|
80
|
+
- Add optional `expiresAt` to `Thread`/`CreateThreadRequest` and `listExpiredThreads` to `ThreadStore`.
|
|
81
|
+
- Persist `expires_at` in InMemory, Local SQLite, and PostgreSQL stores (PG migration v194 + partial index).
|
|
82
|
+
- Accept `ttlSeconds`/`expiresAt` when creating a thread (invalid values return 400).
|
|
83
|
+
- Add a lease/inbox/maintenance-guarded TTL sweeper with `THREAD_TTL_SWEEP_*` configuration.
|
|
84
|
+
- Copy does not inherit TTL; run-ledger rows are retained on sweep.
|
|
85
|
+
|
|
86
|
+
## 4.11.0
|
|
87
|
+
|
|
88
|
+
### Minor Changes
|
|
89
|
+
|
|
90
|
+
- b0d43d4: Tenant model providers can now offer chat, embedding and speech-to-text models from one catalog, and every model-provider or collection change takes effect without a gateway restart.
|
|
91
|
+
|
|
92
|
+
`ModelKind` (`chat` / `embedding` / `asr`) is stored on the model row rather than the provider, because one provider is one credential and one base URL and a single OpenAI-compatible endpoint commonly serves all three. Each kind keeps its own runtime lattice and lazily materialises its client from the shared store, so a tenant model resolves on every replica without replica-to-replica synchronisation. A loader guard keeps a chat consumer from ever resolving an embedding or ASR row, and the tenant default model remains chat-only.
|
|
93
|
+
|
|
94
|
+
The provider panel exposes the kind per model, offers a per-model thinking toggle (stored as `extra.disableThinking`, translated to the upstream kwargs by core), and can run one embedding inference to prove a model works and report its vector dimension. Collection and voice pickers now read the tenant catalog and fall back to the deployment's boot-registered models.
|
|
95
|
+
|
|
96
|
+
Invalidation is now uniform across kinds: a provider change evicts chat, embedding and ASR clients on every replica, and a collection change — including a new `embeddingKey` — drops the cached vector stores it invalidated, locally and across replicas through the outbox.
|
|
97
|
+
|
|
98
|
+
- c57f417: WeCom: tool-driven template cards and interactive card events.
|
|
99
|
+
|
|
100
|
+
- `wecom_card` is the only card producer: it validates/formatting the card and
|
|
101
|
+
registers it for the current reply instead of returning JSON that the model
|
|
102
|
+
has to copy. The channel takes the registered card on completion and sends it
|
|
103
|
+
as a separate `template_card` reply; it no longer parses card JSON from model
|
|
104
|
+
text, so no tool call means no card.
|
|
105
|
+
- `template_card_event` is forwarded to the agent. Clicks update the original
|
|
106
|
+
card in place and the agent's follow-up goes through `sendMessage` (the event
|
|
107
|
+
`req_id` is reserved for the card update). Same-button clicks are deduped;
|
|
108
|
+
different buttons on the same card still work.
|
|
109
|
+
- Event-triggered runs that produce a card send **only** the card (no extra
|
|
110
|
+
text). `OutboundStreamChunk` gains an optional `reason`; failed/interrupted/
|
|
111
|
+
timeout runs discard a pending card.
|
|
112
|
+
- Streaming now respects WeCom's 30 messages/minute limit (2500ms interval),
|
|
113
|
+
uses an 8-minute hard timeout, and closes a completed run after a short grace
|
|
114
|
+
window even when the final AI message is empty.
|
|
115
|
+
|
|
3
116
|
## 4.10.0
|
|
4
117
|
|
|
5
118
|
### Minor Changes
|