Commit 5b419fe
Fix audit findings (non-docs): wire format, spec-conformance, bugs, security (#120)
* fix(core): pin spec wire format for union payloads (#94)
Add custom JSON converters for JobStatus, LogLevel, ChunkEncoding,
LeaseGrant (bare namespace map), CredentialConstraints (dotted keys),
AgentInventory (plain array) and JobEventPayload (flat kind-specific
body). Reorder Json.fs after Messages.fs so converters can reference
the payload types. Add golden wire-format tests pinning the spec
JSON shapes (§6.2, §7.3, §8.2, §8.4).
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(runtime): spec-conformance blockers — close ack, cancel, idempotency, leases, credentials
- session.close/session.closed wire types replace session.bye (#73)
- idempotency replay compares param fingerprint, emits DUPLICATE_KEY on conflict (#76)
- cancellation acks job.cancelled then job.error(CANCELLED) (#77, #100); job.cancel returns JOB_NOT_FOUND/PERMISSION_DENIED (#78)
- EmitDelegateAsync validates lease subset, raises LEASE_SUBSET_VIOLATION (#81)
- credential_rotated value redacted from subscribers (#82)
- streamed job.result carries result_id; mixing inline+chunks errors (#83)
- anonymous sessions never receive credentials; startup guard (#88)
- EventLog.EvictExpired honors lastAckedSeq; periodic pruning timer + PruneEmpty (#75, #105)
- terminal job records dispose CTS/watchdog, clear credentials, evicted after retention (#113)
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(runtime): implement session.resume flow + replay (#74, #80)
Add session.resume message type, move resume out of session.hello,
retain disconnected sessions as resumable within the window, replay
buffered events on reattach, rotate resume token, and return
RESUME_WINDOW_EXPIRED for unknown/expired sessions. Add integration
tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(runtime): enforce timeout, terminal guard, replay payload, telemetry, anonymous isolation
- max_runtime_sec watchdog emits job.error(TIMEOUT)/timed_out (#101)
- idempotent replay returns the original job.accepted verbatim (#102)
- single terminal message per job via terminal gate (#103)
- cost.budget.* telemetry no longer decrements budget (#104)
- unique per-session anonymous principal id (#110)
- malformed/unknown inbound -> session.error INVALID_REQUEST, session survives (#99)
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(runtime/client): pagination, subscribe history, ordering, rotation, client races
- list_jobs stable ordering + cursor pagination + next_cursor; bare-name agent filter; limit applied via take+1 (#109, #91, #108)
- job.subscribe history:true replays buffered events; replayed reflects reality (#115)
- per-session gate serializes event_seq assignment with send (#112)
- credential rotation keeps id outstanding for terminal revocation (#107)
- client buffers job-addressed envelopes until handle registered (#95)
- SubscribeAsync surfaces denials instead of a dead handle (#96)
- receive-loop exit faults pending waiters and completes handles (#97)
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(runtime): agent_versions gating, chunk/progress/metric validation, revocation surfacing
- reject name@version without agent_versions; strip suffix from non-negotiated sessions (#79)
- enforce chunk_seq monotonicity and single-stream completion (#84)
- progress current>=0 (reject) and current<=total (clamp) (#85)
- negative cost metrics rejected; negative non-cost metrics still emit (#86)
- permanent credential revocation failures logged + exposed via RevocationFailures (#87)
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(bugs): crypto trace ids, error mapping, caps, lifecycle, transports
- crypto RNG for trace/span ids (#41)
- handler resolved before job.accepted; shared unwind (#47)
- lease/runtime watchdog callbacks observe exceptions (#48)
- 3-state RevocationOutcome; permanent failures keep credential outstanding (#49)
- auto-ack/receive-loop/dispose tasks observed; Completion exposed (#60,#61,#62)
- JobErrorMapper parses details fields (#63)
- AutoAck docs corrected to event-driven (#64)
- ChunkAssembler + WebSocket message size/chunk caps (#65,#66)
- Giraffe short-circuits ws/400 branches (#40)
- CLI awaits enumerator dispose and honors --stdio (#38,#39)
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(minors): clean-code, perf, safety, feature gating
- watchdog skips terminal jobs (#89); wire retryable + Unknown arm (#90)
- client observes cancellation tokens (#98); reject re-hello (#106)
- session-scoped LastEventSeq via Interlocked; subscribed_from in subscriber space (#111)
- enforce negotiated features on submit (#114); duplicate-currency budget subset sum (#116)
- readEnvelope rejects null/empty envelopes (#117); ArcpResult avoids shadowing FSharp.Core Result (#118)
- StaticBearerVerifier constant-time compare (#119); DevMode rejects whitespace (#54)
- glob regex cache (#44); literalPrefix/isSubset cleanup (#43,#45); array retryDelays (#55)
- single idempotency lookup (#52); credential revoke failure observable (#53)
- dead-code removal (#51,#67); volatile stdio closed (#68); typed pending error (#69)
- Connected member (#70); optional jobId mapping (#71); lazy Otel source from Version.Sdk (#42)
Co-authored-by: Cursor <cursoragent@cursor.com>
* style: apply fantomas formatting
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Nick Ficano <nficano@teachmehipaa.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 2c6009e commit 5b419fe
57 files changed
Lines changed: 2318 additions & 462 deletions
File tree
- recipes/_common
- samples
- AspNetCore
- CustomAuth
- Giraffe
- LiteLLM
- ProvisionedCredentials
- Stdio
- _common
- src
- Arcp.Client
- Internal
- Transport
- Arcp.Cli
- Arcp.Core
- Arcp.Giraffe
- Arcp.Otel
- Arcp.Runtime
- Auth
- Internal
- Store
- tests
- Arcp.IntegrationTests
- Arcp.UnitTests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
165 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
166 | 175 | | |
167 | 176 | | |
168 | 177 | | |
| |||
0 commit comments