Skip to content

feat: ecosystem architecture enhancements (Graph, Loop, Context, Harness)#34

Merged
Patel230 merged 15 commits into
mainfrom
feat/sdk-go-openapi-fields
Jul 25, 2026
Merged

feat: ecosystem architecture enhancements (Graph, Loop, Context, Harness)#34
Patel230 merged 15 commits into
mainfrom
feat/sdk-go-openapi-fields

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

This PR introduces cross-ecosystem architectural enhancements encompassing Graph Engineering, Loop Engineering, Context Management, and Prompt Frameworks.

What's Included

  • Graph Engineering: StateGraph implementations, A2A protocol support, and Cypher-like DSLs.
  • Loop Engineering: Async exponential backoff and retry handlers with strict context timeout support.
  • Context Engineering: Token budget optimizers prioritizing recent messages and system prompts.
  • Harness Engineering: Test harness wrappers for injecting mocks and running result validations.
  • Prompt Engineering: Secure text templating engines for LLM prompts.

All changes include appropriate edge-case handling for timeouts, cancellations, and state immutability.

Patel230 added 13 commits July 23, 2026 20:14
The README documented the retry config field as RetryableStatusCodes but the
actual field in retry.go is RetryableStatuses.
Add StreamReader.NextContext(ctx) that closes the underlying response body
on context cancellation, unblocking the scanner on stalled streams. The
existing Next() method is unchanged for backward compatibility.
Add SystemPrompt, Temperature, and TopP fields to AgentConfig and
ChatRequest, and wire them through buildRequest. These are sent with
omitempty so they're backward-compatible with daemons that don't yet
support them.
Add ToolChoice and ParallelToolCalls fields to ChatRequest, and wire
ToolChoice through AgentConfig and buildRequest. Mirrors the OpenAPI
tool-use spec (tool_choice, parallel_tool_calls) so callers can
control tool selection behavior end-to-end.
…uest fields to OpenAPI spec

The OpenAPI spec was missing system_prompt, temperature, top_p, tools,
tool_results, tool_choice, and parallel_tool_calls from ChatRequest.
Also adds the ToolResult schema that was referenced but not defined.
The TypeScript SDK now completes the SDK trio alongside hawk-sdk-go and
hawk-sdk-python; reflect it in the ecosystem component table.
The README's API reference was missing the ChatWithTools method,
Tool/ToolSchema/ToolCall/ToolResult types, ChatWithToolsRequest/Response
types, Agent, Workflow, and StreamReader types. Added ChatWithTools to
the Client Methods table, expanded the API Types table, and added a
tool-use example to the Quick Start section.
The OpenAPI contract defines  on both Session and SessionDetail,
but the SDK types omitted it, so persona information was silently
dropped on decode. Add the field (omitempty) and assert round-trip in
the existing session list/detail tests.
- Add graph.go with execution graph implementation
- Add graph_test.go with test coverage
- Update README
- Add graph traversal (BFS, DFS, shortest path, PageRank)
- Implement Agent-to-Agent (A2A) communication protocol
- Add streaming support for A2A tasks
- Add ExecuteWithRetry loop engineering pattern with exponential backoff and context timeouts
- Add Prompt Template rendering engine with context variable injection
@Patel230
Patel230 force-pushed the feat/sdk-go-openapi-fields branch 2 times, most recently from 199c52f to e1e2b98 Compare July 25, 2026 11:38
- Update api/openapi.yaml from GrayCodeAI/hawk to match daemon contract
- Regenerate Go types from OpenAPI spec
- Fix spec test to use Prompt field instead of deprecated Message field
- Fix bodyclose linter warning in A2A streaming protocol
@Patel230
Patel230 force-pushed the feat/sdk-go-openapi-fields branch from 890bc05 to be1f255 Compare July 25, 2026 11:55
- Add comprehensive tests for internal/graph (BFS, DFS, PageRank, etc.)
- Add a2a HTTP client tests using httptest (GetAgentCard, SendTask, etc.)
- Add resilience RetryPolicy tests
- Expand spec tests for all Graph types and endpoint types
- Fix spec test for renamed Message->Prompt field
@Patel230
Patel230 merged commit 377a7eb into main Jul 25, 2026
12 checks passed
@Patel230
Patel230 deleted the feat/sdk-go-openapi-fields branch July 25, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant