Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
271 commits
Select commit Hold shift + click to select a range
4cf120a
refactor: migrate durable research agent to LangGraph + SQLite checkp…
RaviPidaparthi May 20, 2026
6d366a8
Revert "refactor: migrate durable research agent to LangGraph + SQLit…
RaviPidaparthi May 20, 2026
0d80832
chore: add .env deployment config for durable-agent-demo
RaviPidaparthi May 20, 2026
0a30e20
docs: hardcode actual endpoint in demo script
RaviPidaparthi May 20, 2026
59ed7bb
feat(durable-demo): POST fire-and-forget + SSE resume with last_event_id
RaviPidaparthi May 20, 2026
e493317
fix(demo-client): use azd ai agent monitor for container logs
RaviPidaparthi May 20, 2026
ceb03d0
docs(durable-demo): update README for fire-and-forget + last_event_id…
RaviPidaparthi May 20, 2026
58caaf8
fix(durable-demo): remove task_id from POST response (internal detail)
RaviPidaparthi May 20, 2026
eb6b6a0
chore(durable-demo): update .gitignore and azd state
RaviPidaparthi May 20, 2026
29c7394
perf(durable-demo): skip artificial delay on first stage for responsi…
RaviPidaparthi May 20, 2026
d316d58
fix(durable-demo): use --session-id flag (not --session) for azd monitor
RaviPidaparthi May 20, 2026
0175d1e
chore(durable-demo): add azd environment config
RaviPidaparthi May 20, 2026
600bc84
fix(demo-client): reset LAST_EVENT_ID on fresh task start
RaviPidaparthi May 20, 2026
b348b10
docs(durable-task): add framework camps comparison to overview
RaviPidaparthi May 20, 2026
dae7adc
fix: per-invocation task_id, GET-only reconnect, switch to api-versio…
RaviPidaparthi May 20, 2026
4485168
chore: update built wheels
RaviPidaparthi May 20, 2026
30e5fe3
Rename @durable_task → @task and internal classes
RaviPidaparthi May 22, 2026
8f901e2
feat(agentserver): durable response recovery contract (spec 012) + ca…
RaviPidaparthi May 27, 2026
99b59a0
fix(agentserver): rework durable recovery samples per stakeholder fee…
RaviPidaparthi May 27, 2026
543fb78
fix(agentserver): flush metadata before upstream side effect in durab…
RaviPidaparthi May 28, 2026
b02001e
Use upstream session history for dedup in durable LLM samples
May 28, 2026
7013c03
Frame response.created emit as uniform across fresh and recovered att…
May 28, 2026
c4c0bd1
spec013 Phase 1: dev guide updates (US1/US2/US3 documentation)
May 28, 2026
390f0e7
spec013 Phase 3: FileResponseStore + crash harness (US1 deliverable c)
May 28, 2026
a2c11fd
spec013 Phase 4: cross-process recovery + idempotent create (US1 a+b)
May 28, 2026
37861d4
spec013 Phase 5: input clearing on suspend + dead code removal (US4)
May 28, 2026
7a56557
spec013 + spec014 Phase 3-A: durable recovery follow-ups + matrix con…
Copilot May 29, 2026
bd6ad44
spec014 Phase 3-B: durable streaming row 1 (closes divergence 1 / FR-…
RaviPidaparthi May 29, 2026
a80a7ee
spec014 Phase 3 closure: CHANGELOG + type tightening (T-048..T-050)
RaviPidaparthi May 29, 2026
a0ac75f
spec014 conformance: fix foreground non-stream id discovery (Row 3 Pa…
RaviPidaparthi May 29, 2026
71a0dbd
spec014 Phase 4: bookkeeping durable record (closes divergences 2 + 3…
RaviPidaparthi May 29, 2026
e702dee
spec014 Phase 4: reorder shutdown hooks (handle_shutdown before TaskM…
RaviPidaparthi May 29, 2026
e5624b3
spec014 Phase 4 closure: CHANGELOG entry for bookkeeping recovery (T-…
RaviPidaparthi May 29, 2026
2127bef
spec014 Row 3 Path B fix: SHUTTING_DOWN signal propagation (closes la…
RaviPidaparthi May 29, 2026
3dbf2bc
spec014 Phase 5: composition-guard failing tests (T-080/T-081 — TDD b…
RaviPidaparthi May 29, 2026
97fa9b0
spec014 Phase 5: FR-006 composition guard (T-082..T-088)
RaviPidaparthi May 29, 2026
da01ceb
[agentserver] responses: pre-register bookkeeping event from caller (…
RaviPidaparthi May 29, 2026
cc8c494
[agentserver] responses: dispose dead recovery helpers (spec 014 Phas…
RaviPidaparthi May 29, 2026
46f8861
[agentserver] docs: link recovery guides to durability-contract.md (s…
RaviPidaparthi May 29, 2026
1bb9105
[agentserver] responses: enable real incremental streaming in sample 18
RaviPidaparthi May 29, 2026
1e69dba
[agentserver] responses: persist + monotonic seq across stream recove…
RaviPidaparthi May 29, 2026
1a5385c
[agentserver] responses: sample 18 invocation-pattern e2e suite (spec…
RaviPidaparthi May 29, 2026
4ade280
[agentserver] responses: document run_attempt's per-process semantics…
RaviPidaparthi May 29, 2026
e4416e7
[agentserver] responses: redesign conformance test handler with per-l…
RaviPidaparthi May 29, 2026
c455f4c
[agentserver] responses: conformance suite depth — coverage matrix + …
RaviPidaparthi May 29, 2026
6335b9c
spec015 Phase 2: contract completeness meta-test (RED)
RaviPidaparthi May 29, 2026
9a8eedd
spec015 Phase 3 (T013-T017): public API surface tests RED
RaviPidaparthi May 30, 2026
509aee9
spec015 Phase 3 GREEN: drop & rename retired surface (T018-T027b)
RaviPidaparthi May 30, 2026
0e3db4e
spec015 Phase 4 RED (T028, T029): retry_attempt durability tests
RaviPidaparthi May 30, 2026
b9a3584
spec015 Phase 4 GREEN (T030-T034): retry_attempt durability impl
RaviPidaparthi May 30, 2026
367d39d
spec015 Phase 5 RED (T035-T036): metadata namespace tests
May 30, 2026
7510cc5
spec015 Phase 5 GREEN (T037-T042): metadata named namespaces
RaviPidaparthi May 30, 2026
ef55e5f
spec015 Phase 6 RED (T043-T045): responses-side contract tests
RaviPidaparthi May 30, 2026
86d0934
spec015 Phase 6 GREEN (T046-T052): responses-package adapted to new p…
RaviPidaparthi May 30, 2026
f217118
spec015 Phase 6 docs+CHANGELOG (T053-T056b): close-out the responses …
RaviPidaparthi May 30, 2026
22ec18c
spec015 Phase 7 RED (T057-T058): dev-guide review meta-test
RaviPidaparthi May 30, 2026
0805307
spec015 Phase 7 GREEN (T059-T063): consolidated dev guide + meta-test…
RaviPidaparthi May 30, 2026
77bbfcf
spec015 Phase 8 RED (T064-T067): durable invocation sample structural…
RaviPidaparthi May 30, 2026
59ad1f6
spec015 Phase 8 GREEN (T068-T073): invocation samples conform to refi…
RaviPidaparthi May 30, 2026
e0683b6
spec015 Phase 9 RED (T074-T075): shippable-bar + install-independence…
RaviPidaparthi May 30, 2026
cd77218
spec015 Phase 9 GREEN (T076-T083): per-sample READMEs + manifests
RaviPidaparthi May 30, 2026
a466f28
Spec 015 Phase 10 (T084-T087): CHANGELOG sweep + close out audit
RaviPidaparthi May 30, 2026
013925a
Spec 015 Phase 11 (T026, T088-T094): mark EtagConflict advanced + ver…
May 30, 2026
fc8566a
[agentserver] core: tighten dev-guide to remove SDK-internal leakage
May 30, 2026
b412e10
[agentserver] core: fix accuracy bugs and residual leakage in durable…
May 30, 2026
f29756c
[agentserver] core: drop non-recovery-safe per-call kwargs from Task.…
RaviPidaparthi May 30, 2026
ef8b27c
[agentserver] core: drop title/tags/stale_timeout from Task.run/start…
RaviPidaparthi May 30, 2026
6bcb688
[agentserver] core: drop migration framing from changelog/dev-guide; …
RaviPidaparthi May 30, 2026
5abd36b
[agentserver] docs: correct TaskResult(status='superseded') output se…
RaviPidaparthi May 30, 2026
5084210
[agentserver] docs: clarify cooperative-cancellation handler strategi…
RaviPidaparthi May 30, 2026
5df2921
[agentserver] spec 016: expand scope to also fix steering surface
RaviPidaparthi May 30, 2026
04dfcc2
[agentserver] spec 016: add task API azure.core pipeline migration
RaviPidaparthi May 30, 2026
baf1c26
[agentserver] spec 016: codify metadata auto-flush invariant across a…
RaviPidaparthi May 30, 2026
7e354cc
[agentserver] spec 016: cancel signal carries reason; per-turn timeou…
RaviPidaparthi May 30, 2026
bc7e017
[agentserver] spec 016: durable wall-clock per-turn timeout; recovery…
RaviPidaparthi May 30, 2026
2e7aa2f
[agentserver] spec 016: refresh Docs Loop section for full scope
RaviPidaparthi May 30, 2026
e4cca88
[agentserver] spec 016: close 4 constitutional review gaps
RaviPidaparthi May 30, 2026
a28c9cc
[agentserver] spec 016: start cancel-surface proposal doc for iteration
RaviPidaparthi May 30, 2026
7f74291
[agentserver] spec 016: cancel-surface proposal — Strategy C ends wit…
RaviPidaparthi Jun 1, 2026
94a894c
[agentserver] spec 016 + cancel proposal: remove TaskRun.terminate() …
RaviPidaparthi Jun 1, 2026
6ecd409
[agentserver] spec 016: add FR-037 ctx.exit_for_recovery() for shutdo…
RaviPidaparthi Jun 1, 2026
5e161a0
[agentserver] cancel-surface proposal: lock in Proposal E (independen…
RaviPidaparthi Jun 1, 2026
a8ec9e7
[agentserver] cancel-surface proposal: replace ctx.pending_inputs (Se…
RaviPidaparthi Jun 1, 2026
00cd1d5
[agentserver] cancel-surface proposal: fix missed ctx.pending_inputs …
RaviPidaparthi Jun 1, 2026
95ddb3d
[agentserver] cancel-surface proposal: fix was_steered, drop ctx.stee…
RaviPidaparthi Jun 1, 2026
63dbe29
[agentserver] spec 016: fold in Proposal E (independent boolean cance…
RaviPidaparthi Jun 1, 2026
4cdbfab
[agentserver] spec 016: coherence rewrite + second-pass cleanup
RaviPidaparthi Jun 1, 2026
e99262b
[agentserver] spec 016: add Conformance Test Map (non-duplication; ci…
RaviPidaparthi Jun 1, 2026
7e2d9c1
[agentserver] spec 016: include agent name in stable lease owner (FR-…
RaviPidaparthi Jun 1, 2026
5ff0a15
[agentserver] spec 016: catch derive_lease_owner Behavior-changed bul…
RaviPidaparthi Jun 1, 2026
f5dc085
[agentserver] /speckit.plan: fill plan + Phase 0 + Phase 1 artifacts …
RaviPidaparthi Jun 1, 2026
e141424
[agentserver] spec 016 plan: address 5 nits from code review (APPROVE…
RaviPidaparthi Jun 1, 2026
686bc92
[agentserver] /speckit.tasks: generate tasks.md for spec 016 (111 tas…
RaviPidaparthi Jun 1, 2026
297de50
[agentserver] spec 016 tasks: add 11 continuous code review tasks (T1…
RaviPidaparthi Jun 1, 2026
45a4440
[agentserver] constitution: add Principle XIII (Continuous Code Revie…
RaviPidaparthi Jun 1, 2026
c206847
[agentserver] spec 016: address 9 /speckit.analyze findings (1 CRITIC…
Copilot Jun 1, 2026
af16196
[agentserver] spec 016 Phase 1: resolve T002/T003/T004 + create confo…
Copilot Jun 1, 2026
665c22d
[agentserver] spec 016 Phase 2: foundational docs + meta-test invaria…
Copilot Jun 1, 2026
ad33e12
[agentserver] spec 016 Phase 3: US9 transport migration to azure.core…
Copilot Jun 1, 2026
6b3f253
[agentserver] spec 016 Phase 4: US1 stale_timeout removal (T025..T032)
Copilot Jun 1, 2026
2dbb83e
[agentserver] spec 016 Phase 6 partial: FR-004a lease-owner agent+ses…
Copilot Jun 1, 2026
054d1c6
[agentserver] spec 016 tasks: add rolling progress status (38/122 don…
Copilot Jun 1, 2026
a199e57
[agentserver] spec 016 Phase 5: US2 split-brain eviction integration …
Copilot Jun 1, 2026
fce1919
[agentserver] spec 016 Phase 6: US3+US4 three-layer recovery (T043..T…
Copilot Jun 1, 2026
dda570a
[agentserver] spec 016 Phase 8: US5 steering as plain multi-turn (T06…
Copilot Jun 2, 2026
38348ef
[agentserver] spec 016 Phase 9: US6 cancel-cause booleans + terminate…
Copilot Jun 2, 2026
f360b93
[agentserver] spec 016 Phases 10+11: per-turn timeout + exit_for_reco…
Copilot Jun 2, 2026
66b3fe5
[agentserver] spec 016 Phase 12: polish + sample updates + gap-list a…
Copilot Jun 2, 2026
832890d
[agentserver] spec 016 Phase 13: code-review fixes (BLOCKING + HIGH a…
Copilot Jun 2, 2026
ed20701
[agentserver] spec 016 US7: per-turn durable timeout end-to-end (T086…
Copilot Jun 2, 2026
019fea4
[agentserver] spec 016 US8 extended: T094(b) recovery re-entry + T096…
Copilot Jun 2, 2026
625846c
[agentserver] spec 016 complete: all 123 tasks done; Phase 13 reviews…
Copilot Jun 2, 2026
3df9c5b
[agentserver] core+responses: fix stale spec-016-touched tests + samp…
Copilot Jun 2, 2026
5c11009
[agentserver] split PR: remove responses/demo/speckit; restore optimi…
RaviPidaparthi Jun 2, 2026
d8e5bc6
Merge remote-tracking branch 'origin/main' into feature/agentserver-d…
RaviPidaparthi Jun 2, 2026
519ddd9
[agentserver] invocations: drop demo-preserved test (demo split out)
RaviPidaparthi Jun 2, 2026
7dbc8f0
[agentserver] reframe durability as new feature launch in changelog +…
RaviPidaparthi Jun 2, 2026
cea253b
[agentserver] core: pre-commit cleanup — pylint/mypy/pyright clean
RaviPidaparthi Jun 2, 2026
24dc2c5
Merge remote-tracking branch 'origin/main' into feature/agentserver-d…
RaviPidaparthi Jun 2, 2026
7dfbd7a
[agentserver] address feedback: tags internal, single shutdown-grace …
RaviPidaparthi Jun 2, 2026
dd4923e
[agentserver] invocations: drop sample MDs in favor of module docstrings
RaviPidaparthi Jun 2, 2026
a2c9a1f
[agentserver] core: drop unused aiohttp production dependency
RaviPidaparthi Jun 2, 2026
17af169
[agentserver] core: send Foundry-Features header on task-store requests
RaviPidaparthi Jun 2, 2026
a555f72
[agentserver] core: make TaskRun awaitable (return .result())
RaviPidaparthi Jun 2, 2026
10d9440
[agentserver] core: rename FOUNDRY_TASK_API_ENABLED → AGENTSERVER_TAS…
RaviPidaparthi Jun 2, 2026
98f0d59
[agentserver] core: auto-on hosted task API + wheel build script + @t…
RaviPidaparthi Jun 3, 2026
7052b22
[agentserver] core: move skill out of .github/, check in @task previe…
RaviPidaparthi Jun 3, 2026
7bacb85
[agentserver] core: co-locate skill with dev guide + wheel doc + scri…
RaviPidaparthi Jun 3, 2026
8997815
[agentserver] core: add unified streaming subpackage (spec 017 Phase …
RaviPidaparthi Jun 4, 2026
ed7abf7
[agentserver] core: conformance tests for streaming subpackage (spec …
RaviPidaparthi Jun 4, 2026
bdddffc
[agentserver] spec 017 Phase 1: delete legacy stream surface, migrate…
RaviPidaparthi Jun 4, 2026
f9e70e1
[agentserver] core: refresh @task preview wheels with spec 017 stream…
RaviPidaparthi Jun 4, 2026
ca7f62c
[agentserver] core: relax input_id precondition to idempotency-only w…
RaviPidaparthi Jun 4, 2026
2a1c028
[agentserver] core: handle hosted-store etag conflicts on every CAS w…
RaviPidaparthi Jun 4, 2026
4621d2b
[agentserver] core: workaround hosted-store etag-comparison bug + nor…
RaviPidaparthi Jun 4, 2026
1ca9d74
[agentserver] core: normalize If-Match to RFC 7232 strong-validator f…
RaviPidaparthi Jun 5, 2026
2324eb8
[agentserver] task-primitive efficiency + sample maturity + e2e tests
RaviPidaparthi Jun 6, 2026
57927d8
[agentserver] copilot sample: real subscribe-before-start + fix delta…
RaviPidaparthi Jun 6, 2026
464c42a
[agentserver] research sample: AZURE_AI_CREDENTIAL=cli override + cra…
RaviPidaparthi Jun 6, 2026
e31a318
[agentserver] core: remove etag quote-strip + drop-If-Match fallbacks…
RaviPidaparthi Jun 8, 2026
acbe6cc
Revert "[agentserver] core: remove etag quote-strip + drop-If-Match f…
RaviPidaparthi Jun 8, 2026
adb4cff
[agentserver] core: remove etag quote-strip + drop-If-Match fallbacks…
RaviPidaparthi Jun 8, 2026
f3c5dfa
[agentserver] core: task attachments — per-input payloads up to 2 MB …
RaviPidaparthi Jun 9, 2026
d12325b
[agentserver] core: spec 018 TDD-gap fill — add 7 missing-coverage tests
RaviPidaparthi Jun 9, 2026
64fdb72
[agentserver] core: scrub user-facing docs of internal attachment/pro…
RaviPidaparthi Jun 9, 2026
b4d89f5
[agentserver] core: add task-and-streaming design spec + dev-doc tidies
Jun 11, 2026
09cc8a6
[agentserver] specify: recover constitution.md + whitelist in gitignore
Jun 11, 2026
2971d25
[agentserver] core: spec 019 — task & streams reconciliation (spec ph…
RaviPidaparthi Jun 11, 2026
8e8a9ac
[agentserver] core: spec 019 T-2.0 — extend completeness meta-tests (…
RaviPidaparthi Jun 11, 2026
79b473c
[agentserver] core: spec 019 T-2.1 — Area A tests RED (etag CAS / wri…
RaviPidaparthi Jun 11, 2026
0912ae6
[agentserver] core: spec 019 T-2.2 — Area B test RED (recovery source…
RaviPidaparthi Jun 11, 2026
adc8746
[agentserver] core: spec 019 T-2.3 — Area D tests RED (errors / flush…
RaviPidaparthi Jun 11, 2026
f9781ff
[agentserver] core: spec 019 T-2.4 — Area C tests RED (Task.get + out…
RaviPidaparthi Jun 11, 2026
c896ac1
[agentserver] core: spec 019 T-2.5 — Area E tests RED (Gone→NotFound …
RaviPidaparthi Jun 11, 2026
fb8b091
[agentserver] core: spec 019 T-3.1 — Area A impl (etag CAS + write qu…
RaviPidaparthi Jun 11, 2026
0f5ed06
[agentserver] core: spec 019 T-3.1 — Area A follow-up (close T-5.1 BL…
RaviPidaparthi Jun 11, 2026
1f8405a
[agentserver] core: spec 019 T-3.2 — Area B impl (recovery scan sourc…
RaviPidaparthi Jun 11, 2026
ab21d9e
[agentserver] core: spec 019 T-3.3 — Area D impl (errors / flush_all …
RaviPidaparthi Jun 11, 2026
b2b2661
[agentserver] core: spec 019 T-5.3 — close LOW finding (stale :class:…
RaviPidaparthi Jun 11, 2026
2adbdb4
[agentserver] core: spec 019 T-3.4 — Area C impl (Task.get + TaskSnap…
RaviPidaparthi Jun 11, 2026
4146f71
[agentserver] core: spec 019 T-5.4 — close BLOCKING-1 + MEDIUM-1/-2/L…
RaviPidaparthi Jun 11, 2026
7c545d9
[agentserver] core: spec 019 T-3.5 — Area E impl (streaming Gone→NotF…
RaviPidaparthi Jun 11, 2026
7291f62
[agentserver] core: spec 019 T-5.5 — close BLOCKING + HIGH + MEDIUM +…
RaviPidaparthi Jun 11, 2026
ea08355
[agentserver] core: spec 019 T-5.6 — close 3 HIGH + 2 LOW findings fr…
RaviPidaparthi Jun 11, 2026
d5066de
[agentserver] core: dev-guide internal-leakage audit — clean up 12 le…
RaviPidaparthi Jun 11, 2026
8d6cc1d
[agentserver] core: dev-guide framing pass — rewrite from developer p…
RaviPidaparthi Jun 11, 2026
78e2ffd
[agentserver] durable_research sample: emit terminal SSE frame on Tas…
RaviPidaparthi Jun 11, 2026
d2b7a11
[agentserver] core: remove samples/ directory
RaviPidaparthi Jun 11, 2026
a23fe51
[agentserver] spec 020 (SOT update): local-provider ↔ service parity
RaviPidaparthi Jun 11, 2026
6938629
[agentserver] spec 020 Phase 1: conformance tests (RED first)
RaviPidaparthi Jun 12, 2026
8b89408
[agentserver] spec 020 Phase 2 (Workstream A): LocalFileTaskProvider …
RaviPidaparthi Jun 12, 2026
cf303cf
[agentserver] spec 020 Phase 2 (Workstream B): hosted classifier serv…
RaviPidaparthi Jun 12, 2026
ca895af
[agentserver] spec 020 Phase 2c: framework translation layer (no _Hos…
RaviPidaparthi Jun 12, 2026
5a22a05
[agentserver] spec 020 Phase 4: code-review fixes (3 BLOCKING + 4 HIG…
RaviPidaparthi Jun 12, 2026
843a21d
[agentserver] core: `started_at` immutable after first `in_progress` …
RaviPidaparthi Jun 13, 2026
f32008d
[agentserver] spec 022: Phase 0+1 — speckit + RED-first conformance t…
RaviPidaparthi Jun 13, 2026
b46c0ed
[agentserver] spec 022 Phase 2: class split + new symbols + decorator…
RaviPidaparthi Jun 13, 2026
5500481
[agentserver] spec 022 Phase 2: LastInputIdPreconditionFailed new shape
RaviPidaparthi Jun 13, 2026
d1cb8c5
[agentserver] spec 022 Phase 7: migrate invocations durable samples
RaviPidaparthi Jun 13, 2026
2f74449
[agentserver] spec 022: tasks.md status snapshot
RaviPidaparthi Jun 13, 2026
4f6fee0
[agentserver] spec 022 Phase 3: multi-turn raise → suspended (FR-010/…
RaviPidaparthi Jun 13, 2026
d2195d1
[agentserver] spec 022 Phase 4: no output/error persistence for multi…
RaviPidaparthi Jun 13, 2026
db676a7
[agentserver] spec 022 Phase 5 partial: TaskRun.input_id attribute (F…
RaviPidaparthi Jun 13, 2026
7f751c0
[agentserver] spec 022 Phase 6: TaskDeferred from exit_for_recovery (…
RaviPidaparthi Jun 13, 2026
c4421f8
spec 022 Phase 5: TaskRun slim shape (T-5.1, T-5.4)
RaviPidaparthi Jun 13, 2026
e8c0cc8
spec 022 Phase 5: exception taxonomy slim (T-5.5/T-5.6/T-5.7)
RaviPidaparthi Jun 13, 2026
bfe7912
spec 022: T-2.3 handler-arg, T-2.5 auto-task_id, T-3.5 metadata reser…
RaviPidaparthi Jun 13, 2026
9f4c4fd
spec 022 Phase 6: TaskContext.input_id + skip legacy tests
RaviPidaparthi Jun 13, 2026
ee5eebf
spec 022: bare exception signatures + JSONValue forward refs
RaviPidaparthi Jun 13, 2026
7d740d2
spec 022 small fixes: TaskCancelled message, MultiTurnTask requires t…
RaviPidaparthi Jun 13, 2026
062f7b9
spec 022 multi-turn drain wiring: refresh current_result_future + inp…
RaviPidaparthi Jun 13, 2026
0713af6
spec 022 T-6.6 MultiTurnTask.delete full impl (FR-024/FR-061)
RaviPidaparthi Jun 13, 2026
e749ee9
spec 022 FR-027/FR-030: no interim error PATCH between retries + retr…
RaviPidaparthi Jun 13, 2026
6c149d2
spec 022: drop is_suspended assertions in legacy tests; always-unwrap
RaviPidaparthi Jun 13, 2026
57d3602
spec 022 FR-007/FR-013: multi-turn success path unwraps Output + prom…
RaviPidaparthi Jun 13, 2026
8a17d9c
spec 022: more legacy result.output / is_suspended cleanup + inline_r…
RaviPidaparthi Jun 13, 2026
2571e12
spec 022: eager Task decorator registration into live TaskManager
RaviPidaparthi Jun 13, 2026
36c4016
spec 022 FR-015/FR-077: structured failure log + bare TaskCancelled()…
RaviPidaparthi Jun 13, 2026
072dc5b
spec 022: tasks.md status snapshot — 58/69 tasks done, 690/704 tests …
RaviPidaparthi Jun 13, 2026
d3eccd4
spec 022 honest T-0.2/T-5.1/T-5.2/T-5.3/T-7.1 — delete _result.py + _…
RaviPidaparthi Jun 13, 2026
d8c684f
spec 022: T-7.6 dev guide rewrite + T-8.2 SC-009 downstream audit + T…
RaviPidaparthi Jun 13, 2026
3047fd9
spec 022: address cross-area review findings (B1/B2/B4/L1/L2/M1-M4/H6)
RaviPidaparthi Jun 13, 2026
d29474e
spec 022: clean standalone dev guide + drop SOT supersedence preamble…
RaviPidaparthi Jun 13, 2026
657004d
spec 022 SOT: surgical section rewrites (§11, §26, §32, §33, §34, §35…
RaviPidaparthi Jun 13, 2026
f12539d
spec 022 SOT: comprehensive inline cleanup — §12/§13/§15/§16/§20/§22/…
RaviPidaparthi Jun 13, 2026
a778d7c
spec 021 conformance: hard-reject @task(steerable=|ephemeral=), delet…
RaviPidaparthi Jun 13, 2026
485230a
spec 021 Appendix A.5: remove TaskContext.suspend() from public surface
RaviPidaparthi Jun 13, 2026
875841b
spec 021 conformance: address all BLOCKING + HIGH findings from cross…
RaviPidaparthi Jun 13, 2026
01d711e
spec 022: M2/M3 cleanup — strip FR/spec-N references from samples + d…
RaviPidaparthi Jun 13, 2026
776ed16
fix(agentserver): remove output-persistence dead code (SOT §11/§20 dr…
Jun 14, 2026
2fc7a88
fix(agentserver): resolve all SOT-vs-impl drift items (D-1 .. D-4)
Jun 14, 2026
60aaedb
Merge remote-tracking branch 'origin/main' into feature/agentserver-d…
Jun 14, 2026
e09d5ba
agentserver: finalize feature branch — scrub internal-spec refs, vers…
Jun 14, 2026
b35483c
agentserver: refresh @task preview wheels for 2.0.0b7 / 1.0.0b6
Jun 14, 2026
d026cf6
agentserver: spec 022 final — zero skips, zero legacy, all tests green
Jun 14, 2026
b6b9b43
[agentserver] core: unified storage_paths + AGENTSERVER_TASKS_BACKEND…
RaviPidaparthi Jun 15, 2026
b30018e
[agentserver] core: refresh 2.0.0b7 preview wheels (storage_paths + A…
RaviPidaparthi Jun 15, 2026
1cab231
[agentserver] core CHANGELOG: add storage_paths + AGENTSERVER_TASKS_B…
RaviPidaparthi Jun 15, 2026
09a42d2
[agentserver] core: black formatter pass on storage_paths + _manager …
RaviPidaparthi Jun 15, 2026
ecb1a10
[agentserver] core: refresh 2.0.0b7 wheels post-black format
RaviPidaparthi Jun 15, 2026
57ca8f7
[agentserver] invocations: propagate agent_session_id into request.st…
RaviPidaparthi Jun 15, 2026
bcd1267
[agentserver] invocations: refresh 1.0.0b6 wheels with session_id pro…
RaviPidaparthi Jun 15, 2026
f98402b
[agentserver] invocations: regression tests for agent_session_id prop…
RaviPidaparthi Jun 15, 2026
ae1895a
[agentserver] invocations: source session_id for cancel/get from env …
RaviPidaparthi Jun 15, 2026
8577e85
[agentserver] invocations: refresh 1.0.0b6 wheels with env-var sessio…
RaviPidaparthi Jun 15, 2026
036dca6
[agentserver] core: move sdk/agentserver/wheels/ off durable-tasks br…
RaviPidaparthi Jun 15, 2026
5207960
[agentserver] core: move standalone skill files off durable-tasks branch
RaviPidaparthi Jun 15, 2026
10918e3
fix(core/durable): track post-reclaim etag on cold-start recovery
RaviPidaparthi Jun 16, 2026
17437a1
Sync durable_research sample to unified .durable storage path
RaviPidaparthi Jun 16, 2026
4bc5c96
test(durable): RED conformance for pending_input_count + steering wri…
RaviPidaparthi Jun 18, 2026
352b6c4
fix(durable): wire pending_input_count + serialize steering writes (s…
RaviPidaparthi Jun 18, 2026
f8cd2b4
fix(durable): finish spec 031 — drain conflict recovery, metadata ret…
RaviPidaparthi Jun 18, 2026
d351a44
test(durable): faithful local-provider lease rule exposes hosted drai…
RaviPidaparthi Jun 18, 2026
af72411
fix(durable): steering drain flips suspended->in_progress so the stee…
RaviPidaparthi Jun 18, 2026
e8d8fc1
docs(durable): SOT — steering drain flips suspended->in_progress; lea…
RaviPidaparthi Jun 18, 2026
042ef86
Merge remote-tracking branch 'origin/main' into feature/agentserver-d…
RaviPidaparthi Jun 19, 2026
5fe5b8c
fix(core-streaming): reopen FileBackedReplayEventStream after compact…
RaviPidaparthi Jun 19, 2026
2674f7a
feat(core): public platform-contract surface for composed protocol la…
RaviPidaparthi Jun 24, 2026
b56ce6e
refactor(core): reframe durable->resilient terminology (spec 034 Phas…
RaviPidaparthi Jun 25, 2026
2cc45a6
refactor(core): storage-prose accuracy in reframe (Spec 034 §2.9a)
RaviPidaparthi Jun 25, 2026
14287d6
docs(constitution): reframe durable->resilient terminology (Spec 034 …
RaviPidaparthi Jun 25, 2026
9a863bb
docs(core): drop fake "Resilient Functions" product name from reframe…
RaviPidaparthi Jun 25, 2026
d23b123
fix(core): correct logger namespace mis-swap from reframe (Spec 034)
RaviPidaparthi Jun 25, 2026
4b15a8a
refactor(invocations): move durable->resilient sample/test reframe to…
RaviPidaparthi Jun 25, 2026
d294849
fix(samples): invocation-id dedup for resilient_copilot (fixes stuck …
RaviPidaparthi Jun 25, 2026
40174e4
fix(samples): make Copilot history the source of truth for resilient_…
RaviPidaparthi Jun 25, 2026
477b7c3
fix(samples): close resilient_copilot SSE stream after turn completes
RaviPidaparthi Jun 25, 2026
f879e16
fix(samples): close SSE stream producer-side when invocation completes
RaviPidaparthi Jun 25, 2026
03127a4
docs(samples): correct stream-close rationale comment
RaviPidaparthi Jun 25, 2026
738a7b6
docs(samples): use raw docstrings so usage curl commands copy-paste c…
RaviPidaparthi Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion sdk/agentserver/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Speckit / Specify - spec-driven development tooling
specs/
.specify/
.specify/*
!.specify/memory/
.specify/memory/*
!.specify/memory/constitution.md
.github/
.vscode/

# Demo session state — regenerated each time the demo runs
.demo-session
517 changes: 517 additions & 0 deletions sdk/agentserver/.specify/memory/constitution.md

Large diffs are not rendered by default.

315 changes: 315 additions & 0 deletions sdk/agentserver/azure-ai-agentserver-core/CHANGELOG.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion sdk/agentserver/azure-ai-agentserver-core/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include *.md
include LICENSE
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
include azure/ai/__init__.py
include azure/ai/agentserver/__init__.py
Expand Down
24 changes: 24 additions & 0 deletions sdk/agentserver/azure-ai-agentserver-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,29 @@ export APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=..."
python my_agent.py
```

### Resilient long-running agents

The `@task` decorator builds crash-resilient agents that survive container restarts, OOM kills, and redeployments. Task state is persisted to a task store, enabling automatic recovery and multi-turn suspend/resume patterns.

```python
from azure.ai.agentserver.core.tasks import task, TaskContext

@task
async def process_document(ctx: TaskContext[dict]) -> dict:
# ctx.entry_mode is "fresh" | "resumed" | "recovered".
# The framework re-invokes the handler from the top after a
# crash; ctx.input survives, so the handler picks up.
summary = await analyze(ctx.input["document_url"])
return {"summary": summary}

result = await process_document.run(
task_id="doc-42", input={"document_url": "..."},
)
print(result.output) # {"summary": "..."}
```

See the [Developer Guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-core/docs/tasks-guide.md) for streaming, multi-turn suspend/resume, retries, timeouts, steering, and the patterns reference.

## Troubleshooting

### Logging
Expand All @@ -130,6 +153,7 @@ To report an issue with the client library, or request additional features, plea
## Next steps

- Install [`azure-ai-agentserver-invocations`](https://pypi.org/project/azure-ai-agentserver-invocations/) to add the invocation protocol endpoints.
- Read the [Resilient Task Developer Guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-core/docs/tasks-guide.md) for crash-resilient long-running agents.
- See the [container image spec](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/agentserver) for the full hosted agent contract.

## Contributing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@
end_span,
flush_spans,
record_error,
read_request_id,
set_current_span,
trace_stream,
)
"""

__path__ = __import__("pkgutil").extend_path(__path__, __name__)

from ._base import AgentServerHost
from ._config import AgentConfig
from ._errors import create_error_response
from ._middleware import InboundRequestLoggingMiddleware
from ._request_id import RequestIdMiddleware
from ._request_id import RequestIdMiddleware, read_request_id
from ._server_version import build_server_version
from ._tracing import (
configure_observability,
Expand All @@ -52,6 +54,7 @@
"end_span",
"flush_spans",
"record_error",
"read_request_id",
"set_current_span",
"trace_stream",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,27 @@
_NOT_SET = "(not set)"


def _read_task_manager_shutdown_grace() -> float:
"""Return TaskManager shutdown grace in seconds (env-driven, default 25.0).

Reads ``AGENTSERVER_SHUTDOWN_GRACE_SECONDS``. Defaults to 25.0 when
unset. Allows tests (and operators) to keep shutdown fast when no
long-running resilient handlers need to checkpoint — for example the
conformance suite runs with a 1s grace so the in-process shutdown
marker fires before the handler completes naturally.

:return: Grace period in seconds (non-negative).
:rtype: float
"""
raw = os.environ.get("AGENTSERVER_SHUTDOWN_GRACE_SECONDS")
if raw is None:
return 25.0
try:
return max(0.0, float(raw))
except ValueError:
return 25.0


def _mask_uri(uri: str) -> str:
"""Return only the scheme and host of a URI, hiding path/query/credentials.

Expand Down Expand Up @@ -84,9 +105,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
async def _send_with_header(message: MutableMapping[str, Any]) -> None:
if message["type"] == "http.response.start":
headers = list(message.get("headers", []))
headers.append(
(b"x-platform-server", self._get_server_version().encode())
)
headers.append((b"x-platform-server", self._get_server_version().encode()))
message = {**message, "headers": headers}
await send(message)

Expand Down Expand Up @@ -160,7 +179,7 @@ class MyHost(InvocationAgentServerHost, ResponsesAgentServerHost):

_DEFAULT_ACCESS_LOG_FORMAT = '%(h)s "%(r)s" %(s)s %(b)s %(D)sμs'

def __init__(
def __init__( # pylint: disable=too-many-statements
self,
*,
applicationinsights_connection_string: Optional[str] = None,
Expand All @@ -174,14 +193,20 @@ def __init__(
) -> None:
# Shutdown handler slot (server-level lifecycle) -------------------
self._shutdown_fn: Optional[Callable[[], Awaitable[None]]] = None
# Pre-shutdown callbacks invoked SYNCHRONOUSLY from the
# SIGTERM signal handler — before Hypercorn's graceful drain
# begins. Used by responses to set ``_shutdown_requested`` early so
# foreground handlers' disconnect-poll loop sees the shutdown
# signal BEFORE Hypercorn waits for in-flight requests to complete.
# Callbacks must be non-blocking and thread-safe (they run in the
# signal handler, not on the event loop).
self._pre_shutdown_callbacks: list[Callable[[], None]] = []

# Server version segments for the x-platform-server header.
# Protocol packages call register_server_version() to add their
# own portion; the middleware joins them at response time.
self._server_version_segments: list[str] = []
self.register_server_version(
build_server_version("azure-ai-agentserver-core", _CORE_VERSION)
)
self.register_server_version(build_server_version("azure-ai-agentserver-core", _CORE_VERSION))

# Resolved configuration (accessible as self.config)
self.config: _config.AgentConfig = _config.AgentConfig.from_env()
Expand All @@ -203,15 +228,11 @@ def __init__(
logger.warning("Failed to initialize observability; continuing without it.", exc_info=True)

# Access logging ---------------------------------------------------
self._access_log: Optional[logging.Logger] = (
logger if access_log is _SENTINEL_ACCESS_LOG else access_log
)
self._access_log: Optional[logging.Logger] = logger if access_log is _SENTINEL_ACCESS_LOG else access_log
self._access_log_format: str = access_log_format or self._DEFAULT_ACCESS_LOG_FORMAT

# Timeouts ---------------------------------------------------------
self._graceful_shutdown_timeout = _config.resolve_graceful_shutdown_timeout(
graceful_shutdown_timeout
)
self._graceful_shutdown_timeout = _config.resolve_graceful_shutdown_timeout(graceful_shutdown_timeout)

# Build lifespan context manager
@contextlib.asynccontextmanager
Expand Down Expand Up @@ -244,13 +265,42 @@ async def _lifespan(_app: Starlette) -> AsyncGenerator[None, None]: # noqa: RUF
protocols,
)

# --- Resilient task manager auto-initialization ---
task_manager = None
try:
from .tasks._manager import ( # pylint: disable=import-outside-toplevel
TaskManager,
set_task_manager,
)

task_manager = TaskManager(
config=cfg,
shutdown_event=asyncio.Event(),
shutdown_grace_seconds=_read_task_manager_shutdown_grace(),
)
set_task_manager(task_manager)
await task_manager.startup()
logger.info("TaskManager initialized automatically")
except ImportError:
pass # resilient module not available
except Exception: # pylint: disable=broad-exception-caught
logger.warning("Failed to initialize TaskManager", exc_info=True)

yield

# --- SHUTDOWN: runs once when the server is stopping ---
logger.info(
"AgentServerHost shutting down (graceful timeout=%ss)",
self._graceful_shutdown_timeout,
)

# Run on_shutdown FIRST so the responses layer's
# ``handle_shutdown`` can set ``_shutdown_requested`` and signal
# cancellation BEFORE the TaskManager waits its grace period.
# Without this, Row 3 (foreground) handlers can race against
# Hypercorn's client-connection close — the disconnect-poll loop
# stamps ``CLIENT_CANCELLED`` instead of ``SHUTTING_DOWN`` and
# B11 emits a cancelled terminal instead of failed.
if self._graceful_shutdown_timeout == 0:
logger.info("Graceful shutdown drain period disabled (timeout=0)")
else:
Expand All @@ -267,6 +317,21 @@ async def _lifespan(_app: Starlette) -> AsyncGenerator[None, None]: # noqa: RUF
except Exception: # pylint: disable=broad-exception-caught
logger.warning("Error in on_shutdown", exc_info=True)

# Shutdown task manager AFTER on_shutdown so resilient handlers
# have had time to checkpoint via the responses layer's
# ``handle_shutdown``.
if task_manager is not None:
try:
await task_manager.shutdown()
from .tasks._manager import ( # pylint: disable=import-outside-toplevel
set_task_manager as _clear_manager,
)

_clear_manager(None)
logger.info("TaskManager shut down")
except Exception: # pylint: disable=broad-exception-caught
logger.warning("Error shutting down TaskManager", exc_info=True)

# Merge routes: subclass routes (if any) + health endpoint
all_routes: list[Any] = list(routes or [])
all_routes.append(
Expand All @@ -293,6 +358,7 @@ async def _lifespan(_app: Starlette) -> AsyncGenerator[None, None]: # noqa: RUF
# (e.g. by MAF / agent-framework) are children of the caller's trace.
# We do NOT create a SERVER span ourselves — we only propagate context.
from azure.ai.agentserver.core._tracing import TraceContextMiddleware # pylint: disable=import-outside-toplevel

self.add_middleware(TraceContextMiddleware)

# ------------------------------------------------------------------
Expand Down Expand Up @@ -352,6 +418,31 @@ def shutdown_handler(self, fn: Callable[[], Awaitable[None]]) -> Callable[[], Aw
self._shutdown_fn = fn
return fn

def register_pre_shutdown_callback(self, fn: Callable[[], None]) -> None:
"""Register a synchronous callback to run on SIGTERM signal receipt.

Callbacks run from inside the SIGTERM signal handler,
BEFORE Hypercorn begins its graceful drain. Use this to
set asyncio events that long-running request handlers observe via
their cancellation-polling loops, so they can return before
Hypercorn waits the full ``graceful_shutdown_timeout`` for the
request to complete.

Callbacks MUST be non-blocking and signal-safe — they execute
synchronously on the main thread inside the signal handler. The
typical pattern is::

shutdown_event = asyncio.Event()
app.register_pre_shutdown_callback(shutdown_event.set)

Note: ``asyncio.Event.set()`` is safe to call from a signal
handler when the event loop is running on the same thread.

:param fn: A synchronous, non-blocking callable.
:type fn: Callable[[], None]
"""
self._pre_shutdown_callbacks.append(fn)

async def _dispatch_shutdown(self) -> None:
"""Dispatch to the registered shutdown handler, or no-op."""
if self._shutdown_fn is not None:
Expand Down Expand Up @@ -403,23 +494,42 @@ def run(self, host: str = "0.0.0.0", port: Optional[int] = None) -> None:
logger.info("AgentServerHost starting on %s:%s", host, resolved_port)
config = self._build_hypercorn_config(host, resolved_port)

# Register SIGTERM handler to log the signal and initiate
# Hypercorn's graceful shutdown.
original_sigterm = signal.getsignal(signal.SIGTERM)

def _handle_sigterm(_signum: int, _frame: Any) -> None:
logger.info("SIGTERM received, initiating graceful shutdown")
# Restore the original handler so the re-raised signal is not
# caught by this handler again (avoids infinite recursion).
signal.signal(signal.SIGTERM, original_sigterm)
os.kill(os.getpid(), signal.SIGTERM)

signal.signal(signal.SIGTERM, _handle_sigterm)

try:
asyncio.run(_hypercorn_serve(self, config)) # type: ignore[arg-type]
finally:
signal.signal(signal.SIGTERM, original_sigterm)
async def _serve_with_shutdown_trigger() -> None:
"""Wrap hypercorn.serve with a custom shutdown_trigger.

When Hypercorn's default ``shutdown_trigger=None``
is used, Hypercorn registers its own SIGTERM/SIGINT handler
via ``loop.add_signal_handler`` and our ``signal.signal``
handler is overridden. We register our own
``loop.add_signal_handler`` here and pass the resulting wait
as ``shutdown_trigger`` so Hypercorn uses our event — and we
get to fire pre-shutdown callbacks synchronously on signal
receipt, before Hypercorn begins its graceful drain.
"""
loop = asyncio.get_event_loop()
signal_event = asyncio.Event()

def _on_signal() -> None:
# Run pre-shutdown callbacks BEFORE setting the event so
# they fire before Hypercorn begins draining connections.
for cb in self._pre_shutdown_callbacks:
try:
cb()
except Exception: # pylint: disable=broad-exception-caught
logger.warning("Pre-shutdown callback raised", exc_info=True)
signal_event.set()

for signal_name in ("SIGINT", "SIGTERM", "SIGBREAK"):
if hasattr(signal, signal_name):
try:
loop.add_signal_handler(getattr(signal, signal_name), _on_signal)
except NotImplementedError:
# Windows fallback — install via signal.signal directly.
signal.signal(getattr(signal, signal_name), lambda *_: _on_signal())

await _hypercorn_serve(self, config, shutdown_trigger=signal_event.wait) # type: ignore[arg-type]

asyncio.run(_serve_with_shutdown_trigger())

async def run_async(self, host: str = "0.0.0.0", port: Optional[int] = None) -> None:
"""Start the server asynchronously (awaitable).
Expand Down
Loading
Loading