@invarn/cli 0.2.3 → 0.2.4
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/dist/invarn.cjs +7 -7
- package/dist/sdk.mjs +20 -2
- package/package.json +1 -1
package/dist/sdk.mjs
CHANGED
|
@@ -8867,6 +8867,22 @@ var REGISTRATION_GUIDANCE = [
|
|
|
8867
8867
|
" If it does, read it \u2014 the build steps are already defined there. Base your agent's commands on them.",
|
|
8868
8868
|
" Do NOT explore the project structure if a pipeline file already tells you the build commands.",
|
|
8869
8869
|
"",
|
|
8870
|
+
"STEP SPLITTING \u2014 one concept per command:",
|
|
8871
|
+
" When you have multiple natural phases (setup, compile, test, package, sign, deploy), SPLIT them into separate commands.",
|
|
8872
|
+
" Rule of thumb: if your single `run` field contains `&&` joining distinct concepts, that's a signal to split.",
|
|
8873
|
+
" Example of a BAD single command (distinct phases chained together):",
|
|
8874
|
+
` run: "printf '...' > local.properties && xcodebuild -scheme iosApp build"`,
|
|
8875
|
+
" Better as two commands:",
|
|
8876
|
+
` [{name:"config", run:"printf '...' > local.properties"},`,
|
|
8877
|
+
' {name:"build", run:"xcodebuild -scheme iosApp build"}]',
|
|
8878
|
+
" Why it matters:",
|
|
8879
|
+
" \u2022 Each command is its own step in the PR check run \u2014 reviewers see exactly which phase broke.",
|
|
8880
|
+
' \u2022 Failed step name appears in the check summary (e.g. "Build failed at step `build`" is much more useful than a generic "build failed").',
|
|
8881
|
+
" \u2022 Per-step duration is tracked \u2014 spot slow phases.",
|
|
8882
|
+
" \u2022 cibuild auto-injects cache steps between commands; one mega-step defeats that.",
|
|
8883
|
+
" \u2022 Individual steps can be individually retried in future (phase 4 of the roadmap).",
|
|
8884
|
+
" Shell flow inside ONE command (pipes, variable assignment, short guards) is fine. Splitting is for DISTINCT PHASES, not every line.",
|
|
8885
|
+
"",
|
|
8870
8886
|
"DESCRIPTION: Write 3 sentences for other AI agents to read.",
|
|
8871
8887
|
" 1. What this agent does (include specific tools: Gradle, Xcode, pytest, etc.)",
|
|
8872
8888
|
" 2. When to use it (the trigger condition)",
|
|
@@ -9163,9 +9179,11 @@ var TOOL_SPECS = [
|
|
|
9163
9179
|
description: z2.string().describe("What this agent does, when to use it, and what it does not do"),
|
|
9164
9180
|
repository: z2.string().optional().describe('Repository to bind to (e.g. "owner/repo-name"). Required if the org has multiple repos connected. Omit if only one repo.'),
|
|
9165
9181
|
commands: z2.array(z2.object({
|
|
9166
|
-
name: z2.string().describe('Command name (e.g. "compile")'),
|
|
9182
|
+
name: z2.string().describe('Command name \u2014 short, lowercase, hyphenated, matches the concept (e.g. "config", "compile", "test", "package")'),
|
|
9167
9183
|
run: z2.string().describe('Shell command to execute (e.g. "./gradlew assembleDebug")')
|
|
9168
|
-
})).describe(
|
|
9184
|
+
})).describe(
|
|
9185
|
+
'Ordered list of commands. SPLIT NATURAL PHASES INTO SEPARATE COMMANDS \u2014 one concept per command. If you find yourself chaining distinct phases with `&&` (e.g. write a config file THEN build, or compile THEN archive THEN sign), those belong in separate commands. Each command becomes its own step in the check-run output, gets its own duration, and fails the build with a clear "Failed at step X" summary instead of "build step failed" for an 8-minute merged operation. Example: for "write local.properties from secrets, then xcodebuild", use two commands: [{name:"config", run:"printf ... > local.properties"}, {name:"build", run:"xcodebuild ..."}] \u2014 NOT one command that chains both with `&&`.'
|
|
9186
|
+
),
|
|
9169
9187
|
overwrite: z2.boolean().optional().describe("Set true to replace a pipeline file that already exists at .ci/pipelines/agent-<name>.yml in the repo. Use this when re-registering an agent \u2014 e.g. the same repo is connected under another org, or a prior registration was deleted without cleaning up the committed file. Do NOT set this when the existing file is hand-authored YAML unrelated to a prior agent."),
|
|
9170
9188
|
triggers: z2.array(z2.object({
|
|
9171
9189
|
push_branch: z2.string().optional().describe('Match push events where the pushed branch matches this pattern (glob). Use "*" for any branch.'),
|