2 Commits

Author SHA1 Message Date
Bruno Borges
e03ccb978a fix: Java cookbook recipes to compile with copilot-sdk-java 0.2.1-java.1
Fix compilation errors and documentation inaccuracies in Java cookbook
recipes against the actual SDK API:

- MultipleSessions: Replace non-existent destroy() with close()
- AccessibilityReport: Replace non-existent McpServerConfig class with
  Map<String, Object> (the actual type accepted by setMcpServers)
- error-handling.md: Replace non-existent session.addTool(),
  ToolDefinition.builder(), and ToolResultObject with actual SDK APIs
  (ToolDefinition.create(), SessionConfig.setTools(),
  CompletableFuture<Object> return type)

All 7 recipes now compile successfully with jbang build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-06 15:20:20 -04:00
Bruno Borges
46f6f3e6db Add Java SDK cookbook with 7 recipes
Add complete Java cookbook matching the pattern of existing .NET, Go,
Node.js, and Python cookbooks. All 7 recipes included:

- Ralph Loop: Autonomous AI task loops with JBang
- Error Handling: try-with-resources, ExecutionException, timeouts
- Multiple Sessions: Parallel sessions with CompletableFuture
- Managing Local Files: AI-powered file organization
- PR Visualization: Interactive PR age charts
- Persisting Sessions: Save/resume with custom IDs
- Accessibility Report: WCAG reports via Playwright MCP

Each recipe includes both markdown documentation and a standalone
JBang-runnable Java file in recipe/.
2026-04-06 15:20:20 -04:00