Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
49 changes: 42 additions & 7 deletions .github/workflows/reusable-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1322,13 +1322,48 @@ jobs:
fi
# An enabled entry may omit source when it only tunes a built-in
# agent by name (runtime/model/effort/subagents, ADR 0091; trigger,
# #8726), the settings config.AgentEntry.HasSettings counts. A blank
# trigger counts as unset, as on the Go side. trigger is checked for
# null explicitly: `//` would also replace an unquoted false, which
# Go reads as the CEL expression "false".
BAD_SOURCE=$(yq '.agents[] | select(type == "!!map" and .enabled != false and (.source == null or .source == "") and (.runtime == null and .model == null and .effort == null and .subagents == null and ((.trigger == null) or (.trigger | tostring | test("^\\s*$"))))) | line' .fullsend/config.yaml 2>/dev/null || echo "")
if [[ -n "$BAD_SOURCE" ]]; then
echo "::error::config.yaml: enabled agent entry without a source field (an entry with only a name must set runtime, model, effort, subagents or trigger to tune a built-in agent)"
# #8726; a non-empty harness: block, ADR 0162), the settings
# config.AgentEntry.HasSettings counts. A blank trigger counts as
# unset, as on the Go side. trigger is checked for null explicitly:
# `//` would also replace an unquoted false, which Go reads as the
# CEL expression "false". explode(.) resolves each entry's YAML
# aliases, as the Go side does; without it `harness: *anchor`
# counts as unset. It runs per entry, so a bad merge key elsewhere
# in the file does not fail this check. A yq failure is reported;
# fullsend run validates the entries again.
YQ_ERR=$(mktemp)
BAD_SOURCE=$(yq '.agents[] | explode(.) | select(type == "!!map" and .enabled != false and (.source == null or .source == "") and (.runtime == null and .model == null and .effort == null and .subagents == null and ((.trigger == null) or (.trigger | tostring | test("^\\s*$"))) and (((.harness | type) != "!!map") or ((.harness | length) == 0)))) | ((.enabled // "unset") | tostring) + " " + ((.name // "") | downcase)' .fullsend/config.yaml 2>"$YQ_ERR") || {
echo "::warning::yq failed checking agent entries without a source — see logs"
cat "$YQ_ERR" >&2
BAD_SOURCE=""
}
# The Go keyed merge (perRepoConfig.AgentEntries) completes such an
# entry from the config.base.yaml entry of the same name: one with
# a source or a setting, or one that turns the agent off when this
# entry does not turn it on. Names compare without case, and a base
# entry without a name is named after its source file.
BASE_ENTRIES=""
if [[ -n "$BAD_SOURCE" && -f .fullsend/config.base.yaml ]]; then
BASE_ENTRIES=$(yq '.agents[] | explode(.) | ((select(type == "!!str") | "complete " + (sub("#[^#]*$", "") | sub("^.*/", "") | sub("\\.[^.]*$", "") | downcase)), (select(type == "!!map") | select(((.source // "") != "") or .runtime != null or .model != null or .effort != null or .subagents != null or ((.trigger != null) and ((.trigger | tostring | test("^\\s*$")) | not)) or (((.harness | type) == "!!map") and ((.harness | length) > 0))) | "complete " + ((.name // .source) | sub("#[^#]*$", "") | sub("^.*/", "") | sub("\\.[^.]*$", "") | downcase)), (select(type == "!!map") | select(.enabled == false) | "off " + ((.name // "") | downcase)))' .fullsend/config.base.yaml 2>"$YQ_ERR") || {
echo "::warning::yq failed reading agent entries from config.base.yaml — see logs"
cat "$YQ_ERR" >&2
BAD_SOURCE=""
}
fi
rm -f "$YQ_ERR"
UNRESOLVED=""
while read -r enabled name; do
[[ -z "$enabled" ]] && continue
if [[ -n "$name" ]] && grep -qxF -- "complete $name" <<<"$BASE_ENTRIES"; then
continue
fi
if [[ -n "$name" && "$enabled" == "unset" ]] && grep -qxF -- "off $name" <<<"$BASE_ENTRIES"; then
continue
fi
UNRESOLVED=1
done <<<"$BAD_SOURCE"
if [[ -n "$UNRESOLVED" ]]; then
echo "::error::config.yaml: enabled agent entry without a source field (an entry with only a name must set runtime, model, effort, subagents, trigger or harness to tune a built-in agent)"
exit 1
fi
DUPES_ENABLED=$(yq '.agents[] | select(type == "!!map" and .enabled != false) | (.name // "") | select(. != "") | downcase' .fullsend/config.yaml 2>/dev/null | sort | uniq -d)
Expand Down
24 changes: 19 additions & 5 deletions docs/agents/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,25 @@ See [Configuring with AGENTS.md](../guides/user/customizing-with-agents-md.md).
|----------|-------------|---------|--------------|
| `REVIEW_FINDING_SEVERITY_THRESHOLD` | Minimum severity for findings to include in the review. Findings below this level are omitted from both the narrative body and the posted inline comments. | `low` | `info`, `low`, `medium`, `high`, `critical` |

Set this in the harness's `env.sandbox` (the upstream default lives in
`harness/review.yaml`). To override per repo or org, use `base:`
composition rather than the CI workflow `env:` block — workflow `env:`
is reserved for infrastructure plumbing (see [Architecture](../architecture.md#agent-harness)
for details on harness composition and workflow-env conventions).
The upstream default lives in `harness/review.yaml`, in both `env.runner`
and `env.sandbox`. To override it per repo or org, set it in the review
entry's `harness:` block in `config.yaml` (or `config.base.yaml`), which
keeps the agent on upstream updates
([ADR 0162](../ADRs/0162-agent-entries-may-carry-harness-overrides.md)):

```yaml
agents:
- name: review
harness:
env:
runner: { REVIEW_FINDING_SEVERITY_THRESHOLD: medium }
sandbox: { REVIEW_FINDING_SEVERITY_THRESHOLD: medium }
```

`base:` composition also works. Do not use the CI workflow `env:` block —
workflow `env:` is reserved for infrastructure plumbing (see
[Architecture](../architecture.md#agent-harness) for details on harness
composition and workflow-env conventions).
The post-script reads the value from the runner environment directly —
no separate configuration is needed.

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To update an installed binary later, run [`fullsend self-update`](self-update.md
| [`fullsend run`](run.md) | Execute an agent locally in a sandbox. See [running agents locally](../guides/user/running-agents-locally.md). |
| `fullsend poll` | Discover forge events and dispatch agent pipelines. `--forge gitlab` runs the cron poller ([ADR 0067](../ADRs/0067-gitlab-cron-polling-event-dispatch.md)); events-mode polling also recovers issue opens whose webhook delivery was missed. `--input-driver jira-poll` polls Jira (see [Jira integration](../guides/user/jira-integration.md)). It reads the Jira site, API gateway, project, and query only from the effective `tracker.jira` config (`base_url` and `project` required; the removed `--jira-url`, `--jira-project`, and `--jql` flags are rejected), authenticates with `FULLSEND_JIRA_TOKEN` (plus `FULLSEND_JIRA_EMAIL` for a bot user) or with OAuth 2.0 client credentials via `FULLSEND_JIRA_CLIENT_ID` and `FULLSEND_JIRA_CLIENT_SECRET`, and skips the cycle unless `tracker.jira.poll.enabled` is `true`; by default it writes dispatch records (`--output`) for a GitHub repository (`--target-repo`, an `owner/repo` slug; one that contains `..` is refused), and with `--target-forge gitlab` it starts the protected agent pipelines of the GitLab project named by `--project` (full path, nested groups allowed; default `CI_PROJECT_PATH`) on the https `--gitlab-url` instance, through the same signed, typed-input dispatch route and Poller credential as the GitLab poller, advancing a Jira issue's checkpoint only once its pipelines are created ([GitLab runtime](../guides/user/jira-integration.md#gitlab-runtime)). `--input-driver gitlab-webhook` is the GitLab dispatcher job's webhook fast-path ([ADR 0125](../ADRs/0125-gitlab-hybrid-webhook-poller-dispatch.md)). It reads the native webhook body from the file-type `TRIGGER_PAYLOAD` variable, re-validates it against the GitLab API, and creates each routed stage's pipeline (typed inputs, `FULLSEND_DISPATCH_SECRET` HMAC) with the poller-role credential (the `api` route, the default). Scheduled cron polling and the webhook fast path run as the trigger-only service account: once its dispatch activation is recorded, the managed webhook carries the account's pipeline trigger token ([#8509](https://github.com/fullsend-ai/fullsend/issues/8509)), the scaffold sets `FULLSEND_GITLAB_DISPATCH_ROUTE=child-pipeline`, and the command instead starts each pipeline with the job's own `CI_JOB_TOKEN` through the pipeline trigger API (`source=pipeline`); an unknown route, or `child-pipeline` without `CI_JOB_TOKEN`, fails closed. `fullsend poll --forge gitlab --print-dispatch-routes` prints the routes the CLI supports (`api` and `child-pipeline`) and exits; the scaffold runs it before selecting `child-pipeline`, and a CLI that predates the route rejects the flag, so the job stops before any dispatch. It requires `--project`, which has no `CI_PROJECT_PATH` fallback. It deduplicates against the poller's per-mode state on the `fullsend-poll-state-slash` and `fullsend-poll-state-events` branches, so an event the webhook dispatched is not dispatched again by the poller, and the reverse. Shared poller state is occurrence-aware (label additions are keyed on the resource label event ID, dispatched keys are retained for the webhook freshness window, and a failed label dispatch is handed back to the poller as a pending retry); legacy persisted keys keep working. Older pollers do not recognise the new label keys, so before a rollback or mixed-version run, follow the [ADR 0132](../ADRs/0132-occurrence-aware-shared-poller-state.md) guidance to drain in-flight poll jobs or pin every poller to one version. Both GitLab drivers dispatch the fix stage only for a changes-requested marker note authored by the registered Analyst, whose numeric user ID the scaffold exports as the job-local `FULLSEND_GITLAB_ANALYST_USER_ID`. |
| `fullsend dispatch` | Evaluate harness CEL triggers for one forge event and print the dispatch matrix (`--output-driver gha-matrix` or `json`); used by the dispatch workflow's `Harness dispatch` job. `--route <agent>` (`review`, `retro`, `triage` or `prioritize`) instead decides routing for that built-in agent and prints one JSON line, `{"agent":"<agent>","decision":"run\|skip\|bash","reason":"…","harness":"config:<source>\|agents@<sha>"}` (`harness` is optional: it is omitted when the harness cannot be resolved or the decision did not need it, as for `bash`): `run` or `skip` when the repository set `agents[].trigger` on the agent's entry ([Choosing when review runs](../guides/user/customizing-agents.md#choosing-when-review-runs), [Choosing when retro runs](../guides/user/customizing-agents.md#choosing-when-retro-runs), [Choosing when triage and prioritize run](../guides/user/customizing-agents.md#choosing-when-triage-and-prioritize-run)), `bash` to leave the decision to the workflow's built-in rules. The dispatch workflow's `Route` job runs it. With `--input-driver gha-event`, a GitHub bot actor's registered fullsend role is looked up first through the mint (a layered `mint_url`, else `FULLSEND_MINT_URL`) with the job's Actions OIDC token, so the job needs `id-token: write` ([ADR 0107](../ADRs/0107-bot-identity-resolution-for-dispatch-authorization.md)); label-added events skip the lookup, and an unregistered bot or a failed lookup is denied (an empty matrix, or a `skip` decision) rather than failing the command. An absent config falls back to `FULLSEND_MINT_URL`, but a config that fails to load or parse is a failed lookup, not a fallback. |
| `fullsend lock [agent-name]` | Pin remote dependencies to `lock.yaml`. If `lock.yaml` exists but cannot be parsed or declares an unsupported version, the command exits without writing and leaves the file unchanged. When it composes a harness (a new or stale entry, or `--update`), it also prints the harness diagnostics, including [reserved `env.sandbox` keys](run.md#reserved-envsandbox-keys). A current entry is not composed, so its keys are not checked, and `lock` composes without event context, so keys from event-guarded overlays are reported only by `fullsend run`. A harness whose runtime fetch service can start (`allow_runtime_fetch: true`, URL-sourced skill or plugin directories, or a bare, deprecated `allowed_remote_resources` declaration) must have every harness-level `allowed_remote_resources` prefix covered by the config-level allowlist — `config.yaml`'s `allowed_remote_resources` plus the built-in default prefixes (the defaults are included when the list is omitted or non-empty; an explicit `allowed_remote_resources: []` stays deny-all and excludes them); `lock` fails naming an uncovered prefix, and fails closed when no repository config (`config.yaml` or `config.base.yaml`) exists. |
| `fullsend lock [agent-name]` | Pin remote dependencies to `lock.yaml`. If `lock.yaml` exists but cannot be parsed or declares an unsupported version, the command exits without writing and leaves the file unchanged. An entry is stale when the harness file or the `harness:` block of the agent's `agents:` entry has changed. When it composes a harness (a new or stale entry, or `--update`), it also prints the harness diagnostics, including [reserved `env.sandbox` keys](run.md#reserved-envsandbox-keys). A current entry is not composed, so its keys are not checked, and `lock` composes without event context, so keys from event-guarded overlays are reported only by `fullsend run`. A harness whose runtime fetch service can start (`allow_runtime_fetch: true`, URL-sourced skill or plugin directories, or a bare, deprecated `allowed_remote_resources` declaration) must have every harness-level `allowed_remote_resources` prefix covered by the config-level allowlist — `config.yaml`'s `allowed_remote_resources` plus the built-in default prefixes (the defaults are included when the list is omitted or non-empty; an explicit `allowed_remote_resources: []` stays deny-all and excludes them); `lock` fails naming an uncovered prefix, and fails closed when no repository config (`config.yaml` or `config.base.yaml`) exists. With a `harness:` block on the agent's entry, the prefixes checked are the ones the block sets. |
| `fullsend lint` | Lint `config.yaml` and agent harness definitions — deprecations, misconfigurations, and file checks, with diagnostics for each enabled agent, or for one agent with `fullsend lint <agent-name>`. See [`fullsend lint`](lint.md), and [Checking a trigger before you merge](../guides/user/cel-triggers-reference.md#checking-a-trigger-before-you-merge) for a walkthrough. |
| `fullsend scan` | Run security scanners on agent input/output |
| [`fullsend self-update`](self-update.md) | Update the local `fullsend` binary to the latest release, or to `--version`, after verifying the release's Sigstore signature and checksum. |
Expand Down
7 changes: 6 additions & 1 deletion docs/cli/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ the `#sha256=...` integrity hash suffix is stripped from the displayed source
for readability. Disabled agents (`enabled: false`) are included in the listing.
A built-in agent tuned by an entry without `source:` shows `(built-in)`. An
entry's settings follow in brackets, for example `[model=sonnet effort=high]`;
an entry with an `agents[].trigger` shows `trigger` there.
an entry with an `agents[].trigger` shows `trigger` there, and one with a
`harness:` block shows `harness`.

Example output:
```
Expand Down Expand Up @@ -445,6 +446,10 @@ dispatch on each runtime.

Remove an agent from config. If the removed agent was the last one using a given `allowed_remote_resources` prefix, that prefix is cleaned from the config's own list only. Entries the parent chain resolves (fullsend's defaults, `GITHUB_SERVER_URL`-derived prefixes, `config.base.yaml` entries) are never carried into the cleaned list, and a prefix the base owns is left to the base. When the cleaned local list becomes empty, the local `allowed_remote_resources` key is dropped so the parent chain resolves again. Over a chain that resolves to deny-all (a base `[]`), the command instead writes the fullsend default prefixes a remaining agent still uses. Those can be host-specific when `GITHUB_SERVER_URL` names a GitHub Enterprise host.

The command edits `config.yaml` only. For an agent that `config.base.yaml`
registers, it fails and writes nothing. To turn that agent off, add an entry
with its `name` and `enabled: false` to `config.yaml`.

```bash
fullsend agent remove triage
```
Expand Down
22 changes: 15 additions & 7 deletions docs/cli/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,18 @@ Each enabled `agents:` entry is resolved and composed through the same machinery
directory. Run that online run with the same forge (`--forge` or CI auto-detection)
as the offline run; otherwise the forge-specific files are not cached and the
offline run fails.
- Harnesses are composed with `base:` chains, CEL-guarded overlays, and the forge
section for the effective platform, so diagnostics see the harness as it would
execute. Without a platform (`--forge` omitted, none in config, no CI env), the forge
section is left unconsumed and its fields are linted in place.

Diagnostics for an override-only entry come from the upstream harness, not from your
`config.yaml`, so you cannot fix them in this repository.
- Harnesses are composed with `base:` chains, CEL-guarded overlays, the forge
section for the effective platform, and the `harness:` block of the agent's
`agents:` entry, so diagnostics see the harness as it would execute. Without a
platform (`--forge` omitted, none in config, no CI env), the forge section is left
unconsumed and its fields are linted in place.

Diagnostics for an override-only entry come from the upstream harness, so you cannot
fix them in this repository. The entry's `harness:` block is the exception. A
diagnostic on a field that the block sets comes from your `config.yaml`. It
carries the same field label as one from the upstream harness, so compare the
field with your block. A diagnostic that names the block or a `harness.` field
always comes from the block.

Disabled agents (`enabled: false`) are skipped. Overlay `when` expressions evaluate
against an empty event with `runtime.forge` and `config` available, like other CLI
Expand Down Expand Up @@ -194,6 +199,9 @@ Codes appear only in `--format json`.
| `trigger-invalid` | `trigger` fails CEL validation |
| `preflight-check-path` | `preflight_check` looks like a bare script path |
| `github-issue-url-deprecated` | `GITHUB_ISSUE_URL` is set or referenced |
| `block-drops-runtime-fetch` | an `agents:` entry's `harness:` block leaves out a runtime fetch field that a layer below it sets, unless the block sets `allow_runtime_fetch: false` |
| `block-drops-ci-variable-credential` | an `agents:` entry's `harness:` block leaves out `allow_ci_variable_credential` when a layer below it sets it to `true`, unless the block sets it to `false`; not reported when the forge is known and is not GitLab |
| `block-trigger-ignored` | an `agents:` entry's `harness:` block sets `trigger` on a built-in agent |
| `reserved-sandbox-env` | `env.sandbox` keys the sandbox will drop |
| `config-invalid` | `config.yaml` semantic validation failed, including an invalid `forge:` |
| `agents-siblings-invalid` | scoped lint: other agents' `agents[]` entries are invalid |
Expand Down
Loading
Loading