@amistio/cli 0.1.27 → 0.1.28
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/README.md +2 -2
- package/dist/index.js +19 -8
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ amistio run --watch --background --tool opencode
|
|
|
38
38
|
amistio runner status
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Provider-backed model preferences use sanitized catalog fields: `--provider`, `--model-id`, optional `--model-variant`, and `--reasoning-effort` (`auto`, `low`, `medium`, `high`, or `xhigh`). Provider credentials, API keys, and local secret paths stay in the local tool configuration; they are not stored in Amistio preferences or runner heartbeats.
|
|
41
|
+
Provider-backed model preferences use sanitized catalog fields: `--provider`, `--model-id`, optional `--model-variant`, and `--reasoning-effort` (`auto`, `low`, `medium`, `high`, or `xhigh`). Opencode catalog metadata is synthesized by Amistio or derived from readable local OpenCode JSON config until opencode exposes a native catalog. Provider credentials, API keys, and local secret paths stay in the local tool configuration; they are not stored in Amistio preferences or runner heartbeats.
|
|
42
42
|
|
|
43
43
|
When `--tool copilot` uses the GitHub Copilot SDK, Amistio approves read-only permission requests by default and denies mutating, network, MCP, hook, memory, and shell requests. Set `AMISTIO_COPILOT_APPROVE_ALL=1` only on a local machine where broad Copilot SDK approval is intentional.
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ When `--tool codex` uses the Codex SDK, intermediate progress can be quiet until
|
|
|
46
46
|
|
|
47
47
|
`amistio runner status` reports local background runner state, latest heartbeat, and bounded resource usage when available. Resource usage is latest-sample runner process memory/CPU plus safe aggregate system memory/load signals; it does not include source files, environment variables, command lines, process lists, credentials, or arbitrary local paths.
|
|
48
48
|
|
|
49
|
-
The runner advertises its supported work kinds in heartbeats. Current runners can claim read-only `projectContextRefresh` jobs from the workspace Context panel and create due runner-driven refreshes when no fresh approved map exists. Context refreshes inspect the paired checkout locally without modifying files and submit only bounded summaries, slices, entities, relations, safe citations, confidence, freshness, and repo-relative paths. If a submitted context refresh contains unsafe evidence, unsafe paths, or a map too large to store safely, Amistio marks the refresh failed with a safe reason instead of storing the rejected raw result. Approved maps are reused as context packs for source-aware assistant and impact-preview work. Current runners can also claim read-only issue diagnosis jobs from the web Issues panel, generate root-cause analysis and a proposed fix, and submit that result without modifying source. They can claim manual read-only `appEvaluationScan` jobs from the workspace Evaluate panel and create at most one due hourly evaluation during normal watch/background polling when app evaluation is enabled for the repository link. Evaluation results contain bounded summaries, safe evidence, suggested actions, lifecycle proposals, and repo-relative paths only. Current runners can also claim manual read-only `securityPostureScan` jobs from the workspace Security panel and create due daily posture checks during normal watch/background polling. Security scan results contain bounded summaries, standard references, safe evidence, and repo-relative paths only. Current runners can claim manual read-only `testQualityScan` jobs from the workspace Test panel and create one due daily Test scan per repository when Test quality is enabled. Test scans run only existing lint, typecheck, test, coverage, build, or verify commands and submit bounded command summaries, coverage summaries, safe findings, blocked reasons, warnings, and repo-relative paths. Missing tests, missing coverage, low coverage, failing checks, flaky tests, and test gaps create reviewable plan-backed findings in the app. Current runners also claim `implementationTestGate` jobs before implementation completion, PR handoff, or runner-managed push; a passing gate is required unless the web Test panel records an audited override. Current runners can claim read-only `implementationVerification` jobs from Tasks to prove whether completed implementation work actually landed; verification submits bounded acceptance-criteria evidence, checks, gaps, outcome, and recommendation without mutating source. Source, secrets, environment variables, command lines, process lists, credentials, provider sessions, and arbitrary local paths stay local. Implementation or cleanup is queued separately only after the user approves an issue analysis, app evaluation finding, security remediation plan, or Test quality plan in the app.
|
|
49
|
+
The runner advertises its supported work kinds in heartbeats. Current runners can claim read-only `projectContextRefresh` jobs from the workspace Context panel and create due runner-driven refreshes when no fresh approved map exists. Context refreshes inspect the paired checkout locally without modifying files and submit only bounded summaries, slices, entities, relations, safe citations, confidence, freshness, and repo-relative paths. If a submitted context refresh contains unsafe evidence, unsafe paths, or a map too large to store safely, Amistio marks the refresh failed with a safe reason instead of storing the rejected raw result. Approved maps are reused as context packs for source-aware assistant and impact-preview work. Current runners can also claim read-only issue diagnosis jobs from the web Issues panel, generate root-cause analysis and a proposed fix, and submit that result without modifying source. They can claim manual read-only `appEvaluationScan` jobs from the workspace Evaluate panel and create at most one due hourly evaluation during normal watch/background polling when app evaluation is enabled for the repository link. Evaluation results contain bounded summaries, safe evidence, suggested actions, lifecycle proposals, and repo-relative paths only. Current runners can also claim manual read-only `securityPostureScan` jobs from the workspace Security panel and create due daily posture checks during normal watch/background polling. Security scan results contain bounded summaries, standard references, safe evidence, and repo-relative paths only. Current runners can claim manual read-only `testQualityScan` jobs from the workspace Test panel and create one due daily Test scan per repository when Test quality is enabled. Test scans run only existing lint, typecheck, test, coverage, build, or verify commands and submit bounded command summaries, coverage summaries, safe findings, blocked reasons, warnings, and repo-relative paths. Missing tests, missing coverage, low coverage, failing checks, flaky tests, and test gaps create reviewable plan-backed findings in the app. Current runners also claim `implementationTestGate` jobs before implementation completion, PR handoff, or runner-managed push; a passing gate is required unless the web Test panel records an audited override. Blocked implementation Test gates submit structured Test findings, such as `blockedEnvironment`, with safe evidence, a suggested action, and a verification plan. Current runners can claim read-only `implementationVerification` jobs from Tasks to prove whether completed implementation work actually landed; verification submits bounded acceptance-criteria evidence, checks, gaps, outcome, and recommendation without mutating source. Source, secrets, environment variables, command lines, process lists, credentials, provider sessions, and arbitrary local paths stay local. Implementation or cleanup is queued separately only after the user approves an issue analysis, app evaluation finding, security remediation plan, or Test quality plan in the app.
|
|
50
50
|
|
|
51
51
|
Approved implementation work uses Git as the handoff boundary. During worktree preflight, the runner locally copies eligible ignored root dotenv files such as `.env.local` or `.env.test.local` from the paired checkout into the implementation worktree when the target is missing and ignored, so local tests can use the same machine configuration. Dotenv values, variable names, file contents, and local paths are not uploaded to Amistio, and copied dotenv files stay ignored so PR handoff does not commit them. After the local tool completes successfully, the runner materializes approved Markdown, MDX, and HTML project-brain artifacts for the same work scope into the isolated worktree before final Git status. It then commits all source and artifact changes, fetches and rebases from the linked remote's default branch, pushes an `amistio/work/...` branch, opens or reuses a pull request with the locally authenticated `gh` CLI, reports only safe PR and artifact-inclusion metadata to Amistio, and removes the local worktree after the PR URL is durable. Artifact-only materialization changes still create or reuse a PR; no-change completion requires no source changes and no approved artifact changes. Prepare the runner machine with Git commit identity, fetch/push permission to the linked remote, and `gh auth status`. If artifact materialization, commit, fetch/rebase, push, or PR creation fails, the work item is blocked and the branch/worktree stay on disk for manual recovery; source files and patches are not uploaded to Amistio.
|
|
52
52
|
|
package/dist/index.js
CHANGED
|
@@ -3605,7 +3605,7 @@ async function detectLocalTools() {
|
|
|
3605
3605
|
localToolAdapters.map(async (adapter) => {
|
|
3606
3606
|
const sdkAvailable = await isSdkAvailable(adapter);
|
|
3607
3607
|
const commandAvailable = adapter.executable ? await commandExists(adapter.executable) : false;
|
|
3608
|
-
const providerCatalog = await
|
|
3608
|
+
const providerCatalog = await detectRunnerProviderCatalog(adapter);
|
|
3609
3609
|
return {
|
|
3610
3610
|
name: adapter.name,
|
|
3611
3611
|
description: adapter.description,
|
|
@@ -3847,16 +3847,18 @@ async function commandExists(command) {
|
|
|
3847
3847
|
lookup.on("close", (exitCode) => resolve(exitCode === 0));
|
|
3848
3848
|
});
|
|
3849
3849
|
}
|
|
3850
|
-
async function
|
|
3851
|
-
const
|
|
3852
|
-
return mergeProviderCatalogs(adapter.providerCatalog,
|
|
3850
|
+
async function detectRunnerProviderCatalog(adapter) {
|
|
3851
|
+
const localOpencodeConfigCatalog = adapter.name === "opencode" ? await loadLocalOpencodeProviderConfigCatalog() : void 0;
|
|
3852
|
+
return mergeProviderCatalogs(adapter.providerCatalog, localOpencodeConfigCatalog);
|
|
3853
3853
|
}
|
|
3854
|
-
|
|
3855
|
-
|
|
3854
|
+
function localOpencodeProviderConfigPaths() {
|
|
3855
|
+
return [
|
|
3856
3856
|
path6.join(os3.homedir(), ".config", "opencode", "opencode.json"),
|
|
3857
3857
|
path6.join(os3.homedir(), ".config", "opencode", "config.json"),
|
|
3858
3858
|
path6.join(process.cwd(), "opencode.json")
|
|
3859
3859
|
];
|
|
3860
|
+
}
|
|
3861
|
+
async function loadLocalOpencodeProviderConfigCatalog(configPaths = localOpencodeProviderConfigPaths()) {
|
|
3860
3862
|
for (const configPath of configPaths) {
|
|
3861
3863
|
try {
|
|
3862
3864
|
const parsed = JSON.parse(await readFile4(configPath, "utf8"));
|
|
@@ -5658,11 +5660,20 @@ function createImplementationTestGatePrompt(workItem) {
|
|
|
5658
5660
|
"## Output Contract",
|
|
5659
5661
|
"",
|
|
5660
5662
|
"Print exactly one JSON object between the markers below. The CLI will submit only this structured gate result back to Amistio.",
|
|
5661
|
-
"Accepted outcome values: passed, failed, blocked, overridden.",
|
|
5663
|
+
"Accepted outcome values: passed, failed, blocked, missingTests, belowThreshold, overridden.",
|
|
5664
|
+
"Accepted command kind values: verify, test, coverage, lint, typecheck, build, focused.",
|
|
5665
|
+
"Accepted command status values: passed, failed, skipped, missing, blocked.",
|
|
5666
|
+
"Prefer repository-documented verification commands or approved test profile commands over ad hoc package-script inference.",
|
|
5667
|
+
"For this Amistio monorepo, if plain Corepack pnpm fails before scripts with spawnSync pnpm ENOENT, retry the documented command corepack pnpm --config.verify-deps-before-run=false verify before declaring whole-app verification blocked.",
|
|
5668
|
+
"Accepted finding categories: missingTests, missingCoverage, missingCommand, lowCoverage, failingTests, failingQuality, failingQualityCheck, staleScan, blockedEnvironment, weakTests, flakyTests, unverifiedImplementation, testGap, other.",
|
|
5669
|
+
"Accepted finding severity values: info, low, medium, high, critical.",
|
|
5670
|
+
"Accepted finding confidence values: low, medium, high.",
|
|
5671
|
+
"Every finding must include title, category, severity, summary, suggestedAction, and a non-empty verificationPlan.",
|
|
5672
|
+
"Finding optional fields may include confidence, affectedSurfaces, evidence, safePaths, proposedPlanTitle, proposedPlanRepoPath, proposedPlanContent, and dedupeKey.",
|
|
5662
5673
|
"Omit optional fields when unavailable; do not emit null for optional command summary fields such as exitCode, durationMs, outputExcerpt, commandId, or safePaths.",
|
|
5663
5674
|
"",
|
|
5664
5675
|
implementationTestGateStart,
|
|
5665
|
-
'{"outcome":"
|
|
5676
|
+
'{"outcome":"blocked","summary":"Whole-app verification could not run because the local package-manager wrapper failed before repository checks started.","commandSummaries":[{"commandId":"verify","kind":"verify","label":"Whole-app verification","status":"blocked","summary":"Corepack could not spawn pnpm before repository verification started.","safePaths":["package.json"]}],"coverage":{"status":"unknown","thresholds":{},"summary":"Coverage was not produced because verification did not run."},"findings":[{"title":"Local verification toolchain is blocked","category":"blockedEnvironment","severity":"medium","confidence":"high","summary":"The implementation test gate could not start the repository verification command because the local package-manager toolchain failed before checks ran.","affectedSurfaces":["Local runner verification"],"evidence":["The verification command failed before repository checks started."],"safePaths":["package.json"],"suggestedAction":"Restore the local package-manager toolchain or run the repository-documented verification command, then rerun the implementation test gate.","verificationPlan":["Run the documented whole-app verification command","Rerun the implementation test gate"],"dedupeKey":"blocked-environment-package-manager"}],"blockedReasons":["The local package-manager toolchain could not start verification."],"redactionState":{"status":"clean","redactedFields":[]},"verificationPlan":["Restore local verification tooling","Rerun the implementation test gate before marking implementation complete"],"warnings":[]}',
|
|
5666
5677
|
implementationTestGateEnd,
|
|
5667
5678
|
"",
|
|
5668
5679
|
"Do not put Markdown fences around the markers."
|