Skip to content

Commit 1f254b2

Browse files
ambient-code[bot]Ambient Code Botclaude
authored
fix(docs): update GitHub Action docs to match ambient-action v0.0.5 (#1233)
<!-- acp:session_id=session-bce2475a-27ed-44ff-9b77-e0b522fc111d source=#1232 last_action=2026-04-07T15:34:00Z retry_count=2 --> ## Summary - Updates GitHub Action docs to reflect the current `ambient-action` `action.yml` (v0.0.5) - Adds new inputs: `session-name`, `stop-on-run-finished`, `poll-timeout` - Adds new output: `session-url` - Fixes `timeout` description (now inactivity timeout in seconds, default `0`) and renames old polling timeout to `poll-timeout` - Updates all example version refs from `v0.0.2` to `v0.0.5` - Adds new "Send to existing session" mode and example - Updates bugfix workflow doc to use `v0.0.5` and `poll-timeout` Closes #1232 ## Test plan - [x] Docs build passes (`npm run build` in `docs/`) - [ ] Visual review of rendered pages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Ambient Code Bot <bot@ambient-code.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 68d8306 commit 1f254b2

2 files changed

Lines changed: 31 additions & 12 deletions

File tree

docs/src/content/docs/extensions/github-action.md

100644100755
Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,34 @@ import { Badge } from '@astrojs/starlight/components';
66

77
<Badge text="Beta" variant="caution" />
88

9-
The [`ambient-action`](https://github.com/ambient-code/ambient-action) GitHub Action (v0.0.2) creates Ambient Code Platform sessions directly from GitHub workflows. Use it to automate bug fixes on new issues, run code analysis on pull requests, or trigger any agent workflow from CI/CD.
9+
The [`ambient-action`](https://github.com/ambient-code/ambient-action) GitHub Action creates Ambient Code Platform sessions directly from GitHub workflows. Use it to automate bug fixes on new issues, run code analysis on pull requests, or trigger any agent workflow from CI/CD.
1010

1111
## Modes
1212

1313
- **Fire-and-forget** -- Create a session and move on. The workflow does not wait for the session to finish.
1414
- **Wait-for-completion** -- Create a session and poll until it completes (or times out). Useful when subsequent steps depend on the agent's output.
15+
- **Send to existing session** -- Send a message to a running session instead of creating a new one (set `session-name`).
1516

1617
## Inputs
1718

1819
| Input | Required | Default | Description |
1920
|-------|----------|---------|-------------|
20-
| `api-url` | Yes | -- | Ambient Code Platform API URL |
21-
| `api-token` | Yes | -- | Bearer token for authentication (store as a GitHub secret) |
21+
| `api-url` | Yes | -- | Ambient Code Platform backend API URL |
22+
| `api-token` | Yes | -- | Bot user bearer token for authentication (store as a GitHub secret) |
2223
| `project` | Yes | -- | Target workspace/project name |
23-
| `prompt` | Yes | -- | Task prompt for the agent |
24+
| `prompt` | Yes | -- | Initial prompt for the session, or message to send to an existing session |
25+
| `session-name` | No | -- | Existing session name to send a message to (skips session creation) |
2426
| `display-name` | No | -- | Human-readable session display name |
2527
| `repos` | No | -- | JSON array of repo objects (`[{"url":"...","branch":"...","autoPush":true}]`) |
2628
| `labels` | No | -- | JSON object of labels for the session |
2729
| `environment-variables` | No | -- | JSON object of environment variables to inject into the runner |
2830
| `workflow` | No | -- | JSON workflow object (e.g., `{"gitUrl":"https://...","branch":"main","path":"workflows/my-wf"}`) |
2931
| `model` | No | -- | Model override (e.g., `claude-sonnet-4-20250514`) |
32+
| `timeout` | No | `0` | Session inactivity timeout in seconds -- auto-stops after this duration of inactivity (`0` means no timeout) |
33+
| `stop-on-run-finished` | No | `false` | Stop the session automatically when the agent finishes its run |
3034
| `wait` | No | `false` | Wait for session completion |
31-
| `timeout` | No | `30` | Session timeout in minutes |
3235
| `poll-interval` | No | `15` | Seconds between status checks (only when `wait: true`) |
36+
| `poll-timeout` | No | `60` | Maximum minutes to poll before giving up (only when `wait: true`) |
3337
| `no-verify-ssl` | No | `false` | Disable SSL certificate verification (for self-signed certs) |
3438

3539
## Outputs
@@ -38,6 +42,7 @@ The [`ambient-action`](https://github.com/ambient-code/ambient-action) GitHub Ac
3842
|--------|-------------|
3943
| `session-name` | Name of the created session |
4044
| `session-uid` | UID of the created session |
45+
| `session-url` | URL to the session in the Ambient UI |
4146
| `session-phase` | Final session phase (only set when `wait: true`) |
4247
| `session-result` | Session result text (only set when `wait: true`) |
4348

@@ -55,7 +60,7 @@ jobs:
5560
triage:
5661
runs-on: ubuntu-latest
5762
steps:
58-
- uses: ambient-code/ambient-action@v0.0.2
63+
- uses: ambient-code/ambient-action@v0.0.5
5964
with:
6065
api-url: ${{ secrets.ACP_URL }}
6166
api-token: ${{ secrets.ACP_TOKEN }}
@@ -71,22 +76,36 @@ jobs:
7176
Set `wait: true` to block the workflow until the session finishes:
7277

7378
```yaml
74-
- uses: ambient-code/ambient-action@v0.0.2
79+
- uses: ambient-code/ambient-action@v0.0.5
7580
with:
7681
api-url: ${{ secrets.ACP_URL }}
7782
api-token: ${{ secrets.ACP_TOKEN }}
7883
project: my-team
7984
prompt: "Analyze the codebase for security vulnerabilities and report findings."
8085
wait: true
81-
timeout: 30
86+
poll-timeout: 30
87+
```
88+
89+
## Send a message to an existing session
90+
91+
Use `session-name` to send a follow-up prompt to a running session instead of creating a new one:
92+
93+
```yaml
94+
- uses: ambient-code/ambient-action@v0.0.5
95+
with:
96+
api-url: ${{ secrets.ACP_URL }}
97+
api-token: ${{ secrets.ACP_TOKEN }}
98+
project: my-team
99+
session-name: my-existing-session
100+
prompt: "Run the test suite again and report the results."
82101
```
83102

84103
## Multi-repo sessions
85104

86105
Pass a JSON array to clone multiple repositories into the session:
87106

88107
```yaml
89-
- uses: ambient-code/ambient-action@v0.0.2
108+
- uses: ambient-code/ambient-action@v0.0.5
90109
id: session
91110
with:
92111
api-url: ${{ secrets.ACP_URL }}
@@ -101,7 +120,7 @@ Pass a JSON array to clone multiple repositories into the session:
101120
workflow: |
102121
{"gitUrl": "https://github.com/org/workflows.git", "branch": "main", "path": "workflows/cross-repo-refactor"}
103122
wait: true
104-
timeout: 45
123+
poll-timeout: 45
105124
106125
- run: echo "Session ${{ steps.session.outputs.session-name }} finished"
107126
```

docs/src/content/docs/workflows/bugfix.md

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ jobs:
348348
if: github.event.label.name == 'auto-fix'
349349
runs-on: ubuntu-latest
350350
steps:
351-
- uses: ambient-code/ambient-action@v0.0.2
351+
- uses: ambient-code/ambient-action@v0.0.5
352352
with:
353353
api-url: ${{ secrets.ACP_URL }}
354354
api-token: ${{ secrets.ACP_TOKEN }}
@@ -360,7 +360,7 @@ jobs:
360360
workflow: |
361361
{"gitUrl": "https://github.com/ambient-code/workflows", "branch": "main", "path": "workflows/bugfix"}
362362
wait: true
363-
timeout: 30
363+
poll-timeout: 30
364364
```
365365
366366
When `wait` is `true`, the action outputs `session-name`, `session-uid`,

0 commit comments

Comments
 (0)