@elalfner/relevo 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.es.md +2 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/scripts/agent-guard.mjs +94 -0
- package/scripts/cli.mjs +48 -12
- package/scripts/doctor.mjs +10 -0
- package/scripts/go-worktree.mjs +40 -0
- package/scripts/init.mjs +1 -0
- package/scripts/lib/adapters/antigravity.mjs +99 -0
- package/scripts/lib/adapters/index.mjs +6 -0
- package/scripts/lib/adapters/install.mjs +127 -0
- package/scripts/lib/adapters/source.mjs +65 -0
- package/scripts/lib/adapters/tools.mjs +52 -0
- package/scripts/lib/agent-guard.mjs +188 -0
- package/scripts/lib/agent-workflow.mjs +46 -0
- package/scripts/lib/cli.mjs +7 -3
- package/scripts/lib/config.mjs +18 -7
- package/scripts/lib/doctor.mjs +79 -5
- package/scripts/lib/go-local.mjs +35 -7
- package/scripts/lib/go-worktree.mjs +85 -0
- package/scripts/lib/init-tools.mjs +97 -0
- package/scripts/lib/init.mjs +31 -4
- package/scripts/lib/protected-paths.mjs +10 -4
- package/scripts/lib/run-usage.mjs +1 -1
- package/scripts/lib/select.mjs +58 -0
- package/scripts/lib/worktree-path.mjs +11 -0
- package/skills/go/SKILL.md +13 -1
- package/skills/init/SKILL.md +5 -4
- package/skills/review/SKILL.md +10 -0
- package/stacks/flutter.md +45 -7
- package/stacks/supabase.md +63 -0
- package/templates/agents/antigravity-step.yml +70 -0
- package/templates/deploy-supabase.yml +75 -0
- package/templates/workflows/relevo-digest.yml +1 -1
- package/templates/workflows/relevo-go.yml +5 -1
- package/templates/workflows/relevo-queue.yml +3 -1
- package/templates/workflows/relevo-review.yml +1 -1
- package/templates/workflows/relevo-sla.yml +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# What `relevo-go.yml` and `relevo-queue.yml` run when `agent.build` in relevo.yml is `antigravity`. This file is not a
|
|
2
|
+
# workflow: each block below replaces, in the shared workflow, the lines between the markers with the same name, and
|
|
3
|
+
# nothing else of the workflow changes (a test checks it). Edit the shared workflow for anything that is not about the
|
|
4
|
+
# agent. Written for ubuntu-latest (x86-64).
|
|
5
|
+
#
|
|
6
|
+
# What Antigravity CLI cannot do on its own, and what stands in for it (docs/security.md):
|
|
7
|
+
# turn and token limits the run guard (scripts/agent-guard.mjs) reads the event stream and stops the agent; the numbers
|
|
8
|
+
# are those of relevo.yml (limits.run_max_turns, limits.run_max_tokens)
|
|
9
|
+
# cost limit none: the quota and the budget of the Google Cloud project that owns the key are the ceiling.
|
|
10
|
+
# Use a key made for Relevo, in its own project, with a quota
|
|
11
|
+
# refused tools the agent exits 0 when a tool is refused; the guard reads the refusal and fails the run
|
|
12
|
+
# closed tool list the settings file written below: the web is denied and only listed commands are allowed. It is
|
|
13
|
+
# a prefix list, not an operating-system boundary: `node` can run any script, as Bash can for Claude
|
|
14
|
+
# the key GEMINI_API_KEY is an environment variable of the agent's own commands, so the agent can read it
|
|
15
|
+
# the binary pinned by version and sha512 below; to update it, copy the url and the checksum from
|
|
16
|
+
# https://antigravity-cli-auto-updater-974169037036.us-central1.run.app/manifests/linux_amd64.json
|
|
17
|
+
|
|
18
|
+
# relevo:credential begin
|
|
19
|
+
# Without a model credential the cloud cannot build: the issue stays ready and a comment says to run it locally.
|
|
20
|
+
HAS_CREDENTIAL: ${{ secrets.GEMINI_API_KEY != '' }}
|
|
21
|
+
# relevo:credential end
|
|
22
|
+
|
|
23
|
+
# relevo:agent-step begin
|
|
24
|
+
# Antigravity CLI, at the version and with the checksum written here. The installer script of the vendor takes
|
|
25
|
+
# the latest version; this takes only the one that was tried.
|
|
26
|
+
- name: Install the Antigravity CLI
|
|
27
|
+
env:
|
|
28
|
+
AGY_VERSION: '1.4.4'
|
|
29
|
+
AGY_URL: https://storage.googleapis.com/antigravity-public/antigravity-cli/1.4.4-4783783166214144/linux-x64/cli_linux_x64.tar.gz
|
|
30
|
+
AGY_SHA512: 7ce149d350344c1046c7b59b6659bcc5d659f351bf3a07c6c085887d93427ceb89d927752e4ccd0844b53ffb91d33d6a49f72835ceb276c7cffdd13cfb8023b8
|
|
31
|
+
run: |
|
|
32
|
+
curl -fsSL -o "$RUNNER_TEMP/agy.tar.gz" "$AGY_URL"
|
|
33
|
+
echo "$AGY_SHA512 $RUNNER_TEMP/agy.tar.gz" | sha512sum --check --strict -
|
|
34
|
+
tar -xzf "$RUNNER_TEMP/agy.tar.gz" -C "$RUNNER_TEMP" antigravity
|
|
35
|
+
mkdir -p "$HOME/.local/bin"
|
|
36
|
+
install -m 0755 "$RUNNER_TEMP/antigravity" "$HOME/.local/bin/agy"
|
|
37
|
+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
38
|
+
[ "$("$HOME/.local/bin/agy" --version)" = "$AGY_VERSION" ] || { echo "::error::agy is not version $AGY_VERSION"; exit 1; }
|
|
39
|
+
|
|
40
|
+
# The Relevo plugin is rendered from the package unpacked in the step "Check the toolchain" and installed for the
|
|
41
|
+
# machine, so nothing is added to the working tree (the agent needs it clean). The settings of the run go to the
|
|
42
|
+
# user-level file of the CLI, outside the repository: a pull request cannot loosen them.
|
|
43
|
+
- name: Set up the Antigravity run
|
|
44
|
+
env:
|
|
45
|
+
PLATFORM: ${{ needs.decide.outputs.platform }}
|
|
46
|
+
run: |
|
|
47
|
+
for f in scripts/cli.mjs scripts/agent-guard.mjs; do
|
|
48
|
+
[ -f "$RUNNER_TEMP/relevo/$f" ] || { echo "::error::The Relevo package $RELEVO_VERSION lacks $f"; exit 1; }
|
|
49
|
+
done
|
|
50
|
+
node "$RUNNER_TEMP/relevo/scripts/cli.mjs" init --tools antigravity --scope machine --yes
|
|
51
|
+
node "$RUNNER_TEMP/relevo/scripts/agent-guard.mjs" settings --platform "$PLATFORM" --plugin-root "$RUNNER_TEMP/relevo" --out "$HOME/.gemini/antigravity-cli/settings.json"
|
|
52
|
+
git config user.name "github-actions[bot]"
|
|
53
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
54
|
+
|
|
55
|
+
# The issue text is data, never instructions: the skill tells the agent so. The decision the `decide` job already
|
|
56
|
+
# made travels with the prompt, encoded so that the issue title in it is never read as an instruction. Both
|
|
57
|
+
# values reach the shell as variables, never pasted into the script.
|
|
58
|
+
- id: agent
|
|
59
|
+
env:
|
|
60
|
+
OPENSPEC_TELEMETRY: '0'
|
|
61
|
+
GH_TOKEN: ${{ github.token }}
|
|
62
|
+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
|
63
|
+
ISSUE: ${{ github.event.issue.number || inputs.issue }}
|
|
64
|
+
DECISION: ${{ needs.decide.outputs.decision_b64 }}
|
|
65
|
+
run: |
|
|
66
|
+
node "$RUNNER_TEMP/relevo/scripts/agent-guard.mjs" run \
|
|
67
|
+
--prompt "/relevo:go $ISSUE --decision $DECISION" \
|
|
68
|
+
--config relevo.yml --timeout-minutes 50 \
|
|
69
|
+
--summary "$RUNNER_TEMP/relevo-guard-summary.json" --github-output "$GITHUB_OUTPUT"
|
|
70
|
+
# relevo:agent-step end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Deploy Supabase Migrations
|
|
2
|
+
|
|
3
|
+
# Automatically applies migrations to Supabase Cloud after Relevo pull requests are merged.
|
|
4
|
+
# - Push to base branch ('dev'): deploys to Staging.
|
|
5
|
+
# - Push to release branch ('main'): deploys to Production (under GitHub Environment protection).
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- dev # Relevo base branch (Staging)
|
|
11
|
+
- main # Relevo release branch (Production)
|
|
12
|
+
paths:
|
|
13
|
+
- 'supabase/migrations/**'
|
|
14
|
+
- 'supabase/functions/**'
|
|
15
|
+
- 'supabase/config.toml'
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
deploy-staging:
|
|
20
|
+
name: Deploy to Staging
|
|
21
|
+
if: github.ref_name == 'dev'
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
environment: staging
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout code
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Setup Supabase CLI
|
|
29
|
+
uses: supabase/setup-cli@v1
|
|
30
|
+
with:
|
|
31
|
+
version: latest
|
|
32
|
+
|
|
33
|
+
- name: Link and Push Migrations to Staging
|
|
34
|
+
env:
|
|
35
|
+
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
|
|
36
|
+
run: |
|
|
37
|
+
supabase link --project-ref ${{ secrets.SUPABASE_PROJECT_ID_STAGING }}
|
|
38
|
+
supabase db push
|
|
39
|
+
|
|
40
|
+
- name: Deploy Edge Functions (if present)
|
|
41
|
+
if: hashFiles('supabase/functions/**') != ''
|
|
42
|
+
env:
|
|
43
|
+
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
|
|
44
|
+
run: |
|
|
45
|
+
supabase functions deploy
|
|
46
|
+
|
|
47
|
+
deploy-production:
|
|
48
|
+
name: Deploy to Production
|
|
49
|
+
if: github.ref_name == 'main'
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
# Configure the 'production' environment in GitHub Settings > Environments with required reviewers
|
|
52
|
+
# so human approval is mandatory before this job executes.
|
|
53
|
+
environment: production
|
|
54
|
+
steps:
|
|
55
|
+
- name: Checkout code
|
|
56
|
+
uses: actions/checkout@v4
|
|
57
|
+
|
|
58
|
+
- name: Setup Supabase CLI
|
|
59
|
+
uses: supabase/setup-cli@v1
|
|
60
|
+
with:
|
|
61
|
+
version: latest
|
|
62
|
+
|
|
63
|
+
- name: Link and Push Migrations to Production
|
|
64
|
+
env:
|
|
65
|
+
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
|
|
66
|
+
run: |
|
|
67
|
+
supabase link --project-ref ${{ secrets.SUPABASE_PROJECT_ID_PROD }}
|
|
68
|
+
supabase db push
|
|
69
|
+
|
|
70
|
+
- name: Deploy Edge Functions (if present)
|
|
71
|
+
if: hashFiles('supabase/functions/**') != ''
|
|
72
|
+
env:
|
|
73
|
+
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
|
|
74
|
+
run: |
|
|
75
|
+
supabase functions deploy
|
|
@@ -9,7 +9,7 @@ name: relevo-digest
|
|
|
9
9
|
# The version of @elalfner/relevo whose scripts this workflow runs. The plugin's templates carry the version they
|
|
10
10
|
# were released with, and `/relevo:init` reports this file as different when it is older; change it by hand to update.
|
|
11
11
|
env:
|
|
12
|
-
RELEVO_VERSION: '0.
|
|
12
|
+
RELEVO_VERSION: '0.6.0'
|
|
13
13
|
|
|
14
14
|
on:
|
|
15
15
|
schedule:
|
|
@@ -15,7 +15,7 @@ name: relevo-go
|
|
|
15
15
|
# The version of @elalfner/relevo whose scripts this workflow runs. The plugin's templates carry the version they
|
|
16
16
|
# were released with, and `/relevo:init` reports this file as different when it is older; change it by hand to update.
|
|
17
17
|
env:
|
|
18
|
-
RELEVO_VERSION: '0.
|
|
18
|
+
RELEVO_VERSION: '0.6.0'
|
|
19
19
|
|
|
20
20
|
on:
|
|
21
21
|
issues:
|
|
@@ -82,8 +82,10 @@ jobs:
|
|
|
82
82
|
GH_LINKS_TOKEN: ${{ secrets.RELEVO_LINKS_TOKEN }}
|
|
83
83
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
84
84
|
ISSUE: ${{ github.event.issue.number || inputs.issue }}
|
|
85
|
+
# relevo:credential begin
|
|
85
86
|
# Without a model credential the cloud cannot build: the issue stays ready and a comment says to run it locally.
|
|
86
87
|
HAS_CREDENTIAL: ${{ secrets.ANTHROPIC_API_KEY != '' || secrets.CLAUDE_CODE_OAUTH_TOKEN != '' }}
|
|
88
|
+
# relevo:credential end
|
|
87
89
|
run: node .relevo-plugin/scripts/go-plan.mjs --repo "$GITHUB_REPOSITORY" --only "$ISSUE" --apply --claim --credential "$HAS_CREDENTIAL" --github-output "$GITHUB_OUTPUT"
|
|
88
90
|
|
|
89
91
|
# See the same step in `build`. A failure before the issue is claimed (the plugin cannot be cloned, the
|
|
@@ -194,6 +196,7 @@ jobs:
|
|
|
194
196
|
echo "::error::The runner has no $missing, so nothing was built"
|
|
195
197
|
exit 1
|
|
196
198
|
|
|
199
|
+
# relevo:agent-step begin
|
|
197
200
|
- id: agent
|
|
198
201
|
uses: anthropics/claude-code-action@v1
|
|
199
202
|
env:
|
|
@@ -233,6 +236,7 @@ jobs:
|
|
|
233
236
|
--max-budget-usd 5
|
|
234
237
|
--allowedTools "Bash,Read,Write,Edit,Glob,Grep,Task"
|
|
235
238
|
--disallowedTools "WebFetch,WebSearch,Bash(curl:*),Bash(wget:*)"
|
|
239
|
+
# relevo:agent-step end
|
|
236
240
|
|
|
237
241
|
# The scripts of the next two steps come from the plugin package. It is unpacked into the workspace only now, after the agent has
|
|
238
242
|
# finished, because the agent's preflight needs a clean working tree and a checkout inside it would not be.
|
|
@@ -10,7 +10,7 @@ name: relevo-queue
|
|
|
10
10
|
# The version of @elalfner/relevo whose scripts this workflow runs. The plugin's templates carry the version they
|
|
11
11
|
# were released with, and `/relevo:init` reports this file as different when it is older; change it by hand to update.
|
|
12
12
|
env:
|
|
13
|
-
RELEVO_VERSION: '0.
|
|
13
|
+
RELEVO_VERSION: '0.6.0'
|
|
14
14
|
|
|
15
15
|
on:
|
|
16
16
|
issues:
|
|
@@ -62,8 +62,10 @@ jobs:
|
|
|
62
62
|
# name, never to write, and an empty value is fine (public repositories are read without it).
|
|
63
63
|
GH_LINKS_TOKEN: ${{ secrets.RELEVO_LINKS_TOKEN }}
|
|
64
64
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
65
|
+
# relevo:credential begin
|
|
65
66
|
# Without a model credential nothing is dispatched.
|
|
66
67
|
HAS_CREDENTIAL: ${{ secrets.ANTHROPIC_API_KEY != '' || secrets.CLAUDE_CODE_OAUTH_TOKEN != '' }}
|
|
68
|
+
# relevo:credential end
|
|
67
69
|
run: |
|
|
68
70
|
result=$(node .relevo-plugin/scripts/requeue.mjs --repo "$GITHUB_REPOSITORY" --credential "$HAS_CREDENTIAL")
|
|
69
71
|
echo "$result"
|
|
@@ -10,7 +10,7 @@ name: relevo-review
|
|
|
10
10
|
# The version of @elalfner/relevo whose scripts this workflow runs. The plugin's templates carry the version they
|
|
11
11
|
# were released with, and `/relevo:init` reports this file as different when it is older; change it by hand to update.
|
|
12
12
|
env:
|
|
13
|
-
RELEVO_VERSION: '0.
|
|
13
|
+
RELEVO_VERSION: '0.6.0'
|
|
14
14
|
|
|
15
15
|
on:
|
|
16
16
|
pull_request_review:
|
|
@@ -8,7 +8,7 @@ name: relevo-sla
|
|
|
8
8
|
# The version of @elalfner/relevo whose scripts this workflow runs. The plugin's templates carry the version they
|
|
9
9
|
# were released with, and `/relevo:init` reports this file as different when it is older; change it by hand to update.
|
|
10
10
|
env:
|
|
11
|
-
RELEVO_VERSION: '0.
|
|
11
|
+
RELEVO_VERSION: '0.6.0'
|
|
12
12
|
|
|
13
13
|
on:
|
|
14
14
|
schedule:
|