Skip to content

reconcile: merge 11 fleet SDK example PRs (248-259)#260

Merged
davideast merged 39 commits intomainfrom
reconcile-fleet-examples
Mar 10, 2026
Merged

reconcile: merge 11 fleet SDK example PRs (248-259)#260
davideast merged 39 commits intomainfrom
reconcile-fleet-examples

Conversation

@jules-fleet
Copy link
Contributor

@jules-fleet jules-fleet bot commented Mar 10, 2026

Reconciliation PR created by Jules Merge

davideast and others added 30 commits March 10, 2026 00:34
Adds a practical example demonstrating how to integrate the Jules TypeScript SDK with the Vercel AI SDK. Includes a basic application showing how an AI model can delegate a coding task to a Jules session using the Tool API.

Fixes #227

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Fixes #226

Adds a practical Next.js example demonstrating how to integrate the Jules SDK into App Router API handlers and Server Actions. Also updates the main SDK README to link to the new example and includes a local test runner.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
… TypeScript SDK

Fixes #231

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Created `packages/core/examples/custom-cli/` with `index.ts`, `README.md`, and `package.json`.
- Added usage instructions and basic implementation for a repoless custom CLI using Jules.
- Updated the main `packages/core/README.md` to link to the new example.
- Fixed the issue requested in #232.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Added an example demonstrating how to use the Jules SDK on a scheduled GitHub Action cron job to analyze a repository for Agent Skills. Included full Action config and updated READMEs.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Fixes #235

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Adds a runnable example demonstrating how to read tabular data
from a Google Sheet using the googleapis library and provide it
as context to an interactive Jules session prompt.

Fixes #229

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Created `packages/core/examples/cloudflare-workers/index.ts` demonstrating edge-based event processing using the Jules SDK within a mocked Cloudflare Worker `fetch` handler.
- Added corresponding `package.json` for the workspace with a `--target=node` bun build script.
- Documented usage and setup instructions in `README.md`.
- Updated `packages/core/README.md` to link to the new example.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Added a new practical example to the Jules TypeScript SDK demonstrating
how to use the session GitPatch data. The example shows how to use a
Repoless session to generate code, extract the resulting GitPatch (either
via the changeSet artifact or manually from generated files), and then
pass that patch to a second session for reviewing against the original
goals and coding standards.

- Created `packages/core/examples/gitpatch-goals/index.ts` containing the example logic.
- Created `packages/core/examples/gitpatch-goals/README.md` explaining the example.
- Created `packages/core/examples/gitpatch-goals/package.json` to configure the workspace module.
- Updated `packages/core/README.md` to include a link to the new example.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Adds a new practical example to the Jules TypeScript SDK demonstrating
how to use the SDK to generate code and review the resulting GitPatch
against standard coding practices.

Updates the main packages/core/README.md to include a link to the new
example. Included a new package in packages/core/examples/gitpatch-review.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Refactors the previously added Google Sheets example into a robust
CLI application. Adheres to Agent SDK best practices and the Typed
Service Contract pattern.

Changes include:
- Implementing CLI parsing with `citty`.
- Defining input schemas, error codes, and Result objects in `spec.ts` using `zod`.
- Extracting business logic to a class in `handler.ts` that implements the spec.
- Adding a `--json` flag to provide deterministic, machine-readable output.

Fixes #229

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit introduces a new example demonstrating how to retrieve a `changeSet` artifact's `gitPatch` from a Jules session and apply it locally. It covers creating the branch, extracting the `unidiffPatch`, writing it to a patch file, and safely applying it to the local system using Git.
The SDK's core README has also been updated to link to this new example.

Fixes #237

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Updates the previous Vercel AI SDK integration example to follow Agent DX best practices.

- Wraps the AI integration in a `citty` CLI supporting human text and machine-readable JSON outputs.
- Adopts the `@ai-sdk/google` provider using `gemini-3.1-flash-lite-preview`.
- Refactors the Jules `tool` into a rigorous Typed Service Contract (spec/handler boundary) for explicit parsing and error handling.

Fixes #227

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Fixes #235

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
… Contracts

Fixes #231

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Refactored the gitpatch-goals SDK example based on AI Agent DX best practices:
- Wrapped the example in the `citty` CLI framework.
- Applied the "Typed Service Contract" (Spec and Handler) pattern using
  Zod schema validation and explicit Result types for deterministic error
  handling.
- Removed reliance on `jules.select()` cache queries, opting instead to
  extract `changeSet` and `agentMessaged` activities directly from the
  awaited session snapshot (`session.result()`).
- Added a `--json` output flag to cater to agent-first readability.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Refactors the `ai-sdk` Agent CLI example to adhere strictly to scalable design patterns.

- Extracts API integration to `src/services/agent.ts`.
- Extracts CLI flag handling and rendering to `src/commands/start.ts`.
- Updates `src/cli.ts` to be a minimal root entrypoint that lazily registers commands, preventing merge conflicts as the CLI scales.

Fixes #227

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Implement auto-discovery pattern for commands mapping to reduce monoliths.
- Add Typed Service Contract pattern (spec.ts/handler.ts) using Zod.
- Update `session` command to accept strict JSON structures (agent-first) while retaining prompt flags (human-first).
- Emit NDJSON payloads when `--output json` is requested.
- Update documentation and constraints to guide users on proper AI agent integration paths as per feedback.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Adds a new practical example to the Jules TypeScript SDK demonstrating
how to use the SDK to generate code and review the resulting GitPatch
against standard coding practices.

The example is built as an Agent-ready CLI using the `citty` framework,
follows the Typed Service Contract pattern to separate schemas from
business logic, streams activities back to the user, and uses the `session.snapshot()`
to safely extract the GitPatch.

Updates the main packages/core/README.md to include a link to the new
example. Included a new package in packages/core/examples/gitpatch-review.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Replaced basic API wrapper example with `generate-test` which interacts with the local file system.
- Reads a local source file, issues a prompt for test generation via Jules, and writes the test file back to disk locally.
- Retained Agent DX features (auto-discovery, strictly typed Zod contracts, and `--json` raw payloads).
- Ensured all tests continue to pass.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Split `handler.ts` into discrete modules (`generate.ts`, `patch.ts`,
  `review.ts`) to avoid merge conflicts and promote code cleanliness.
- Implemented real-time progress streaming using `for await (const
  activity of session.stream())` to provide CLI feedback before
  sessions complete, rather than waiting entirely on `session.result()`.
- Maintained the Typed Service Contract pattern and JSON output formatting.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Added `--dry-run` to support input validation without executing
  costly or destructive Jules API mutations.
- Added `--describe` using `zod-to-json-schema` to allow agents to
  introspect the CLI schema dynamically at runtime.
- Added `SKILL.md` to document usage guidelines for agents, encouraging
  context window discipline via `--json` and input hardening via
  `--dry-run`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Removed basic `generate-test` CLI and replaced it with a bold `cloud-worker` implementation.
- Demonstrates Jules repoless sessions acting as powerful serverless containers for scripts (e.g., Python scraping, data analysis).
- Ingests local files, executes tasks, and writes processed results back to the user's local disk.
- Adheres to best practices: Typed Service Contracts via Zod, auto-discovery using `citty`, and full support for agent `--json` payloads.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Improves the ai-sdk CLI example by adhering directly to Agent DX best practices outlined by Justin Poehnelt.

- **Input Hardening**: Upgrades the Zod tool specification to proactively block hallucinated or adversarial inputs (control characters, URL-encoded strings, path traversals).
- **Dry-Run Validation**: Introduces a `--dry-run` flag via `citty`, plumbing it through the LLM system prompt and short-circuiting real Jules sessions.
- **Agent Context Docs**: Adds a `CONTEXT.md` explicitly defining operating invariants (formatting, mutations, schema rules) for integrating agents.

Fixes #227

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Replaced `cloud-worker` with `run` to avoid confusing "worker" terminology.
- Updated Typed Service Contract schema parameters (using "instruction" instead of "task").
- Reworded documentation to describe the tool as a "Cloud Compute container" or "Cloud Task".
- Kept Agent CLI best practices (auto-discovery, strictly typed Zod contracts, `--json` parameters) intact.
- Verified all examples and test suites continue to pass successfully.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit introduces a new example demonstrating how to retrieve a `changeSet` artifact's `gitPatch` from a Jules session snapshot and safely apply it locally.

Per user instructions, the example has been refactored into a CLI utilizing:
- `citty` for command-line argument parsing
- `zod` and the Typed Service Contract pattern for strict input validation, separation of impure side-effects into `handler.ts`, and structured error mapping (Result types)
- Agent-friendly `--json` flags to output machine-readable payloads

The SDK's core README has also been updated to link to this new example.

Fixes #237

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Adds a new practical example to the Jules TypeScript SDK demonstrating
how to use the SDK to generate code and review the resulting GitPatch
against standard coding practices.

The example is built as an Agent-ready CLI using the `citty` framework,
follows the Typed Service Contract pattern to separate schemas from
business logic, streams activities back to the user, and uses the `session.snapshot()`
to safely extract the GitPatch. Includes an automated E2E test script (`e2e-test.ts`)
to verify authentic LLM execution flows.

Updates the main packages/core/README.md to include a link to the new
example. Included a new package in packages/core/examples/gitpatch-review.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit enhances the `gitpatch-local` example by introducing advanced AI Agent CLI conventions:
- **Introspection:** Implements a `--describe` flag that dynamically outputs the JSON schema of the CLI's inputs and outputs using `zod-to-json-schema`, providing self-documenting capabilities to agents.
- **Safety Rails:** Adds a `--dry-run` flag that safely simulates the patching operation (skipping `git checkout`, `git apply`, and `git commit` actions) to allow agents to "think out loud" before mutating a local system.
- **Input Hardening:** Enhances the Zod spec to strictly reject path traversals, control characters, and embedded query string fragments in agent-provided arguments.
- **Agent Skill documentation:** Ships an `SKILL.md` file designed to be injected into an agent's context, explicitly detailing the safety instructions and expected behaviors of this tool.

Fixes #237

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-cla
Copy link

google-cla bot commented Mar 10, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@davideast davideast merged commit f81e5ba into main Mar 10, 2026
4 of 5 checks passed
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