@a5c-ai/triggers 5.0.1-staging.69cb593ea536 → 5.0.1-staging.6be34ee2a
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/action.yml +24 -66
- package/package.json +1 -1
package/action.yml
CHANGED
|
@@ -146,76 +146,50 @@ runs:
|
|
|
146
146
|
- name: Resolve action runtime
|
|
147
147
|
id: resolve-runtime
|
|
148
148
|
shell: bash
|
|
149
|
-
env:
|
|
150
|
-
ACTION_ROOT: ${{ github.action_path }}
|
|
151
149
|
run: |
|
|
152
150
|
set -euo pipefail
|
|
153
|
-
|
|
154
|
-
if [ -d "$
|
|
151
|
+
WORKSPACE="${GITHUB_WORKSPACE:-$(pwd)}"
|
|
152
|
+
if [ -d "$WORKSPACE/packages/agent-mux/cli" ] && [ -f "$WORKSPACE/packages/triggers/action.yml" ]; then
|
|
155
153
|
echo "mode=monorepo" >> "$GITHUB_OUTPUT"
|
|
156
|
-
echo "
|
|
154
|
+
echo "tag=staging" >> "$GITHUB_OUTPUT"
|
|
157
155
|
else
|
|
158
|
-
echo "mode=
|
|
159
|
-
echo "
|
|
156
|
+
echo "mode=external" >> "$GITHUB_OUTPUT"
|
|
157
|
+
echo "tag=latest" >> "$GITHUB_OUTPUT"
|
|
160
158
|
fi
|
|
161
159
|
|
|
162
|
-
- name:
|
|
163
|
-
if: steps.resolve-runtime.outputs.mode == 'monorepo'
|
|
164
|
-
uses: actions/cache@v4
|
|
165
|
-
with:
|
|
166
|
-
path: |
|
|
167
|
-
${{ steps.resolve-runtime.outputs.repo_root }}/node_modules
|
|
168
|
-
${{ steps.resolve-runtime.outputs.repo_root }}/packages/**/dist
|
|
169
|
-
${{ steps.resolve-runtime.outputs.repo_root }}/packages/**/tsconfig.tsbuildinfo
|
|
170
|
-
key: triggers-build-${{ runner.os }}-${{ hashFiles(format('{0}/package-lock.json', steps.resolve-runtime.outputs.repo_root)) }}
|
|
171
|
-
restore-keys: |
|
|
172
|
-
triggers-build-${{ runner.os }}-
|
|
173
|
-
|
|
174
|
-
- name: Build agent-mux (monorepo)
|
|
175
|
-
if: steps.resolve-runtime.outputs.mode == 'monorepo'
|
|
160
|
+
- name: Install runtime packages
|
|
176
161
|
shell: bash
|
|
177
162
|
env:
|
|
178
|
-
|
|
163
|
+
NPM_TAG: ${{ steps.resolve-runtime.outputs.tag }}
|
|
179
164
|
run: |
|
|
180
165
|
set -euo pipefail
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
fi
|
|
185
|
-
if [ ! -f "packages/agent-mux/cli/dist/index.js" ]; then
|
|
186
|
-
npm run build:agent-mux
|
|
187
|
-
fi
|
|
188
|
-
if [ ! -f "packages/triggers/dist/cli.js" ]; then
|
|
189
|
-
npm run build --workspace=@a5c-ai/triggers
|
|
190
|
-
fi
|
|
191
|
-
if [ ! -f "packages/sdk/dist/cli/main.js" ]; then
|
|
192
|
-
npm run build --workspace=@a5c-ai/babysitter-sdk
|
|
193
|
-
fi
|
|
166
|
+
echo "Installing @a5c-ai packages with tag: $NPM_TAG"
|
|
167
|
+
npm install -g --legacy-peer-deps @a5c-ai/agent-mux-cli@$NPM_TAG @a5c-ai/babysitter-sdk@$NPM_TAG @a5c-ai/triggers@$NPM_TAG
|
|
168
|
+
which amux && amux --version || { echo "ERROR: amux not found after install"; exit 1; }
|
|
194
169
|
|
|
195
170
|
- name: Install harness
|
|
196
171
|
if: ${{ inputs.harness != '' || inputs.adapter != '' }}
|
|
197
172
|
shell: bash
|
|
198
173
|
env:
|
|
199
|
-
ACTION_ROOT: ${{ github.action_path }}
|
|
200
|
-
RUNTIME_MODE: ${{ steps.resolve-runtime.outputs.mode }}
|
|
201
|
-
REPO_ROOT: ${{ steps.resolve-runtime.outputs.repo_root }}
|
|
202
174
|
INPUT_HARNESS: ${{ inputs.harness || inputs.adapter }}
|
|
203
175
|
INPUT_WORKING_DIRECTORY: ${{ inputs.working-directory }}
|
|
204
176
|
run: |
|
|
205
177
|
set -euo pipefail
|
|
206
178
|
cd "$INPUT_WORKING_DIRECTORY"
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
179
|
+
# Map adapter names to amux agent aliases
|
|
180
|
+
AMUX_AGENT="$INPUT_HARNESS"
|
|
181
|
+
case "$INPUT_HARNESS" in
|
|
182
|
+
claude-code) AMUX_AGENT="claude" ;;
|
|
183
|
+
gemini-cli) AMUX_AGENT="gemini" ;;
|
|
184
|
+
copilot-cli) AMUX_AGENT="copilot" ;;
|
|
185
|
+
cursor-cli) AMUX_AGENT="cursor" ;;
|
|
186
|
+
esac
|
|
187
|
+
amux install "$AMUX_AGENT" || true
|
|
212
188
|
|
|
213
189
|
- name: Install babysitter plugin
|
|
214
190
|
if: ${{ inputs.babysitter-plugin == 'true' }}
|
|
215
191
|
shell: bash
|
|
216
192
|
env:
|
|
217
|
-
RUNTIME_MODE: ${{ steps.resolve-runtime.outputs.mode }}
|
|
218
|
-
REPO_ROOT: ${{ steps.resolve-runtime.outputs.repo_root }}
|
|
219
193
|
INPUT_HARNESS: ${{ inputs.harness || inputs.adapter }}
|
|
220
194
|
INPUT_WORKING_DIRECTORY: ${{ inputs.working-directory }}
|
|
221
195
|
INPUT_PROCESS_FILE: ${{ inputs.process-file }}
|
|
@@ -223,21 +197,8 @@ runs:
|
|
|
223
197
|
set -euo pipefail
|
|
224
198
|
cd "$INPUT_WORKING_DIRECTORY"
|
|
225
199
|
|
|
226
|
-
if [ "$RUNTIME_MODE" = "monorepo" ]; then
|
|
227
|
-
# Generate plugins if generator script exists
|
|
228
|
-
if [ -f "$REPO_ROOT/package.json" ] && node -e "process.exit(JSON.parse(require('fs').readFileSync('$REPO_ROOT/package.json','utf8')).scripts?.['generate:plugins'] ? 0 : 1)" 2>/dev/null; then
|
|
229
|
-
cd "$REPO_ROOT" && npm run generate:plugins && cd "$INPUT_WORKING_DIRECTORY"
|
|
230
|
-
fi
|
|
231
|
-
# Use local SDK directly via node
|
|
232
|
-
BABYSITTER="node $REPO_ROOT/packages/sdk/dist/cli/main.js"
|
|
233
|
-
else
|
|
234
|
-
# External use — install from npm
|
|
235
|
-
npm install -g @a5c-ai/babysitter-sdk
|
|
236
|
-
BABYSITTER="babysitter"
|
|
237
|
-
fi
|
|
238
|
-
|
|
239
200
|
# Install babysitter plugin into harness
|
|
240
|
-
|
|
201
|
+
babysitter harness:install-plugin "$INPUT_HARNESS" --workspace "$INPUT_WORKING_DIRECTORY"
|
|
241
202
|
|
|
242
203
|
# Copy process file if provided
|
|
243
204
|
if [ -n "$INPUT_PROCESS_FILE" ]; then
|
|
@@ -254,10 +215,9 @@ runs:
|
|
|
254
215
|
INPUT_PLUGINS: ${{ inputs.plugins }}
|
|
255
216
|
run: |
|
|
256
217
|
set -euo pipefail
|
|
257
|
-
REPO_ROOT=$(cd "$ACTION_ROOT/../.." && pwd)
|
|
258
218
|
while IFS= read -r plugin; do
|
|
259
219
|
[ -z "$plugin" ] && continue
|
|
260
|
-
|
|
220
|
+
amux plugin install "$INPUT_ADAPTER" "$plugin"
|
|
261
221
|
done <<< "$INPUT_PLUGINS"
|
|
262
222
|
|
|
263
223
|
- name: Evaluate trigger
|
|
@@ -271,21 +231,20 @@ runs:
|
|
|
271
231
|
EFFECTIVE_GITHUB_TOKEN: ${{ steps.a5c-token.outputs.a5c_token || inputs.github-token }}
|
|
272
232
|
run: |
|
|
273
233
|
set -euo pipefail
|
|
274
|
-
REPO_ROOT=$(cd "$ACTION_ROOT/../.." && pwd)
|
|
275
234
|
EVENT_FILE="$RUNNER_TEMP/agent-mux-event.json"
|
|
276
235
|
RESULT_FILE="$RUNNER_TEMP/agent-mux-trigger.json"
|
|
277
236
|
INCLUDE_DIFF_ARGS=()
|
|
278
237
|
if [ "$INPUT_INCLUDE_DIFF" = "true" ]; then
|
|
279
238
|
INCLUDE_DIFF_ARGS+=(--include-diff)
|
|
280
239
|
fi
|
|
281
|
-
|
|
240
|
+
triggers enrich \
|
|
282
241
|
--backend "$INPUT_TRIGGER_BACKEND" \
|
|
283
242
|
--token "$EFFECTIVE_GITHUB_TOKEN" \
|
|
284
243
|
"${INCLUDE_DIFF_ARGS[@]}" \
|
|
285
244
|
--output "$EVENT_FILE"
|
|
286
245
|
if [ -z "$INPUT_TRIGGER_QUERY" ]; then
|
|
287
246
|
echo '{"matched":true,"reasons":["no trigger query configured"]}' > "$RESULT_FILE"
|
|
288
|
-
elif
|
|
247
|
+
elif triggers evaluate \
|
|
289
248
|
--backend "$INPUT_TRIGGER_BACKEND" \
|
|
290
249
|
--query "$INPUT_TRIGGER_QUERY" \
|
|
291
250
|
--token "$EFFECTIVE_GITHUB_TOKEN" \
|
|
@@ -337,8 +296,7 @@ runs:
|
|
|
337
296
|
AMUX_TRIGGER_EVENT_PATH: ${{ steps.trigger.outputs.event }}
|
|
338
297
|
run: |
|
|
339
298
|
set -euo pipefail
|
|
340
|
-
|
|
341
|
-
AMUX="node $REPO_ROOT/packages/agent-mux/cli/dist/index.js"
|
|
299
|
+
AMUX="amux"
|
|
342
300
|
|
|
343
301
|
# Build command args
|
|
344
302
|
ARGS=()
|
package/package.json
CHANGED