@cortexkit/aft 0.57.1 → 0.58.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.
Files changed (50) hide show
  1. package/dist/adapters/opencode.d.ts +27 -0
  2. package/dist/adapters/opencode.d.ts.map +1 -1
  3. package/dist/adapters/pi.d.ts.map +1 -1
  4. package/dist/adapters/types.d.ts +14 -0
  5. package/dist/adapters/types.d.ts.map +1 -1
  6. package/dist/commands/backups.d.ts +7 -0
  7. package/dist/commands/backups.d.ts.map +1 -0
  8. package/dist/commands/doctor.d.ts +35 -1
  9. package/dist/commands/doctor.d.ts.map +1 -1
  10. package/dist/commands/index.d.ts.map +1 -1
  11. package/dist/commands/setup.d.ts +26 -0
  12. package/dist/commands/setup.d.ts.map +1 -1
  13. package/dist/doctor/features.d.ts +39 -0
  14. package/dist/doctor/features.d.ts.map +1 -0
  15. package/dist/doctor/opencode.d.ts +10 -0
  16. package/dist/doctor/opencode.d.ts.map +1 -1
  17. package/dist/index.js +3442 -732
  18. package/dist/lib/binary-install.d.ts +42 -0
  19. package/dist/lib/binary-install.d.ts.map +1 -0
  20. package/dist/lib/binary-probe.d.ts.map +1 -1
  21. package/dist/lib/bridge-tool-failures.d.ts.map +1 -1
  22. package/dist/lib/cli-logger.d.ts +34 -0
  23. package/dist/lib/cli-logger.d.ts.map +1 -0
  24. package/dist/lib/config-migration.d.ts +37 -0
  25. package/dist/lib/config-migration.d.ts.map +1 -0
  26. package/dist/lib/diagnostics.d.ts +14 -1
  27. package/dist/lib/diagnostics.d.ts.map +1 -1
  28. package/dist/lib/feature-plan.d.ts +111 -0
  29. package/dist/lib/feature-plan.d.ts.map +1 -0
  30. package/dist/lib/fs-errors.d.ts +34 -0
  31. package/dist/lib/fs-errors.d.ts.map +1 -0
  32. package/dist/lib/jsonc.d.ts.map +1 -1
  33. package/dist/lib/omp-helpers.d.ts +1 -1
  34. package/dist/lib/omp-helpers.d.ts.map +1 -1
  35. package/dist/lib/onnx-fix.d.ts.map +1 -1
  36. package/dist/lib/onnx.d.ts +18 -0
  37. package/dist/lib/onnx.d.ts.map +1 -1
  38. package/dist/lib/plugin-load.d.ts +51 -0
  39. package/dist/lib/plugin-load.d.ts.map +1 -0
  40. package/dist/lib/sanitize.d.ts +6 -0
  41. package/dist/lib/sanitize.d.ts.map +1 -1
  42. package/dist/setup/feature-list.d.ts +89 -0
  43. package/dist/setup/feature-list.d.ts.map +1 -0
  44. package/dist/setup/feature-wizard.d.ts +69 -0
  45. package/dist/setup/feature-wizard.d.ts.map +1 -0
  46. package/dist/setup/host-generation.d.ts +6 -0
  47. package/dist/setup/host-generation.d.ts.map +1 -1
  48. package/dist/setup/opencode-config.d.ts +53 -0
  49. package/dist/setup/opencode-config.d.ts.map +1 -1
  50. package/package.json +3 -2
@@ -0,0 +1,69 @@
1
+ import { type NativeRunner, type PlanFeature, type SetupAnswers, type SetupPlan } from "../lib/feature-plan.js";
2
+ import { type FeatureRow, type SelectionRules } from "./feature-list.js";
3
+ /**
4
+ * How rows depend on each other, read from the plan's kinds and
5
+ * prerequisites. A setting row (bash compression, rewrites, background
6
+ * commands) requires the tool row it configures and does not apply while that
7
+ * tool is unchecked. A capability row that lists another capability as a
8
+ * prerequisite needs it checked: GitHub write needs GitHub read. A tool's
9
+ * prerequisites on indexes describe runtime dependencies only and never
10
+ * change the checklist.
11
+ */
12
+ export declare function selectionRules(plan: SetupPlan): SelectionRules;
13
+ /** Checkbox rows: every row of the plan. */
14
+ export declare function checkboxRows(plan: SetupPlan): PlanFeature[];
15
+ /** Initial checkbox values: the plan's proposed value for each row. */
16
+ export declare function initialSelections(plan: SetupPlan): Record<string, boolean>;
17
+ /** Rows grouped by the plan's `group`, in plan order. */
18
+ export declare function groupRows(plan: SetupPlan): Map<string, PlanFeature[]>;
19
+ /**
20
+ * Answers for a completed wizard. Every row is sent as shown, so an untouched
21
+ * save writes the proposed values explicitly, including a setting whose tool
22
+ * is unchecked (its remembered value) and GitHub read next to GitHub write.
23
+ * A checked row whose prerequisite is unchecked gets the prerequisite too.
24
+ */
25
+ export declare function buildAnswers(plan: SetupPlan, selections: Record<string, boolean>): SetupAnswers;
26
+ /**
27
+ * Explanations shown before the checkboxes: every row's cost note, the move
28
+ * and delete safety notes, and why a proposed value differs from the saved one.
29
+ */
30
+ export declare function explanationLines(plan: SetupPlan): string[];
31
+ /** Prompt operations, injectable so tests can drive the wizard. */
32
+ export interface WizardIO {
33
+ selectRows(message: string, options: Record<string, FeatureRow[]>, initial: string[], rules: SelectionRules): Promise<string[]>;
34
+ info(message: string): void;
35
+ warn?(message: string): void;
36
+ note(message: string, title: string): void;
37
+ }
38
+ /**
39
+ * The checklist rows: each feature's name and its description, nothing else.
40
+ * Runtime state ("ready", "unavailable: <code>") describes the machine at this
41
+ * moment, not the choice being made, and on a fresh install every index reads
42
+ * as unavailable; doctor reports it instead.
43
+ */
44
+ export declare function featureListGroups(plan: SetupPlan): Record<string, FeatureRow[]>;
45
+ export type GhStatus = "ready" | "missing" | "signed_out";
46
+ /** Whether `gh` is on PATH and signed in. Called at most once per wizard run. */
47
+ export declare function checkGhStatus(): GhStatus;
48
+ /** Render the plan and collect the user's choices. */
49
+ export declare function runFeatureWizard(plan: SetupPlan, io?: WizardIO, checkGh?: () => GhStatus): Promise<SetupAnswers>;
50
+ export interface FeatureSetupDeps {
51
+ run?: NativeRunner;
52
+ io?: WizardIO;
53
+ /** GitHub CLI check for the GitHub read warning (tests stub it). */
54
+ checkGh?: () => GhStatus;
55
+ interactive?: boolean;
56
+ stdout?: (text: string) => void;
57
+ stderr?: (text: string) => void;
58
+ }
59
+ /** Whether `argv` asks for the non-interactive feature modes. */
60
+ export declare function featureMode(argv: string[]): "plan" | "yes" | "answers" | "interactive";
61
+ /**
62
+ * The feature step of `aft setup` and `aft doctor --reconfigure`. `--plan`,
63
+ * `--yes` and `--answers` pass straight through to the binary; the default
64
+ * mode renders the plan interactively.
65
+ */
66
+ export declare function runFeatureSetup(argv: string[], deps?: FeatureSetupDeps): Promise<number>;
67
+ /** Whether the default (no-flag) feature step will prompt, so it needs the binary. */
68
+ export declare function featureWizardIsInteractive(deps?: FeatureSetupDeps): boolean;
69
+ //# sourceMappingURL=feature-wizard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-wizard.d.ts","sourceRoot":"","sources":["../../src/setup/feature-wizard.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,WAAW,EAGhB,KAAK,YAAY,EACjB,KAAK,SAAS,EAGf,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,KAAK,UAAU,EAGf,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAY3B;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc,CAkB9D;AAED,4CAA4C;AAC5C,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,EAAE,CAE3D;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAI1E;AAED,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAQrE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAQ/F;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,EAAE,CAe1D;AAED,mEAAmE;AACnE,MAAM,WAAW,QAAQ;IACvB,UAAU,CACR,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EACrC,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,cAAc,G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AACtF,wBAAgB,0BAA0B,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAE/E"}
@@ -59,6 +59,12 @@ export declare function probeOpenCodeV1Version(executable: string, options?: V1V
59
59
  */
60
60
  export declare function parseHostVersion(output: string | null | undefined): string | null;
61
61
  export declare function detectOpenCodeHostGeneration(dependencies?: HostGenerationDependencies): OpenCodeHostDetection;
62
+ /**
63
+ * The detected host as a user would name it ("OpenCode 1"), for setup and
64
+ * `doctor --fix` progress lines. "Generation V1" is internal vocabulary; the
65
+ * doctor report keeps {@link formatHostGenerations} for support diagnostics.
66
+ */
67
+ export declare function describeOpenCodeHost(detection: OpenCodeHostDetection): string;
62
68
  export declare function formatHostGenerations(detection: OpenCodeHostDetection): string;
63
69
  export {};
64
70
  //# sourceMappingURL=host-generation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"host-generation.d.ts","sourceRoot":"","sources":["../../src/setup/host-generation.ts"],"names":[],"mappings":"AAuBA,MAAM,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AACjD,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,sBAAsB,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,sBAAsB,GAAG,WAAW,GAAG,SAAS,CAAC;IACzD,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACtC,QAAQ,EAAE,oBAAoB,EAAE,CAAC;CAClC;AAOD,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,IAAI,EAA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AAK,CAAC,EAAE,CACN,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;QACvB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,OAAO,EAAE,MAAM,CAAC;KACjB,KACE,WAAW,CAAC;CAClB;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,GAAG,WAAW,EAC9B,SAAS,SAAyB,EAClC,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC3C,MAAM,GAAG,IAAI,CAEf;AAqID;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,qBAA0B,GAClC,MAAM,GAAG,IAAI,CAyDf;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAIjF;AA0CD,wBAAgB,4BAA4B,CAC1C,YAAY,GAAE,0BAA+B,GAC5C,qBAAqB,CAwEvB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,qBAAqB,GAAG,MAAM,CAK7E;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,qBAAqB,GAAG,MAAM,CAK9E"}
@@ -23,6 +23,25 @@ export declare function otherOpenCodePluginKey(key: OpenCodePluginKey): OpenCode
23
23
  */
24
24
  export declare function openCodePluginReadKeys(generation: OpenCodeConfigGeneration): OpenCodePluginKey[];
25
25
  export declare function pinnedPluginEntry(version: string): string;
26
+ /**
27
+ * Why an npm plugin entry other than this CLI's exact pin is a problem, as a
28
+ * clause that follows "the plugin entry <entry>". Doctor's OpenCode section and
29
+ * its version-skew issue share this wording so the two never disagree.
30
+ */
31
+ export declare function describePluginEntry(entry: string): string;
32
+ /**
33
+ * `@latest` or an exact version: the OpenCode 1 registrations doctor does not
34
+ * report as a problem, because the host loads them correctly. `doctor --fix`
35
+ * and setup still rewrite them to this CLI's exact version (the exact-pin
36
+ * rule); only an entry with no version at all is reported.
37
+ */
38
+ export declare function acceptV1Entry(entry: string): boolean;
39
+ /**
40
+ * The exact version an AFT npm entry is pinned to (`0.57.2` for
41
+ * `@cortexkit/aft-opencode@0.57.2`), or null for a bare entry, a dist-tag such
42
+ * as `@latest`, or a range.
43
+ */
44
+ export declare function exactPinnedVersion(entry: string): string | null;
26
45
  export declare function isAftNpmEntry(entry: unknown): entry is string;
27
46
  /** The package a config entry registers, in any shape either host accepts. */
28
47
  export declare function pluginEntryPackage(entry: unknown): string | null;
@@ -52,4 +71,38 @@ export interface PluginConfigUpdate {
52
71
  */
53
72
  export declare function ensurePinnedPluginConfig(value: Record<string | symbol, unknown>, version: string, hasLocalAftEntry?: (entry: string) => boolean, generation?: OpenCodeConfigGeneration): PluginConfigUpdate;
54
73
  export declare function pluginConfigNeedsUpdate(value: Record<string | symbol, unknown>, version: string, hasLocalAftEntry?: (entry: string) => boolean, generation?: OpenCodeConfigGeneration): boolean;
74
+ /**
75
+ * The `plugins` entry that removes OpenCode 2's built-in shell tool plugin.
76
+ *
77
+ * OpenCode 2 ships its own command tool, `shell`, and its plugin rewrites the
78
+ * description of whatever tool is named `shell` on every request. With AFT's
79
+ * `bash` registered beside it the agent is offered two command tools. A
80
+ * `plugins` entry starting with `-` removes a plugin by id, built-ins included,
81
+ * so this one entry removes the host's shell tool and its hooks together and
82
+ * leaves AFT's `bash` as the only command tool. OpenCode 1 has no such plugin.
83
+ */
84
+ export declare const OPENCODE_HOST_SHELL_DISABLE_ENTRY = "-opencode.tool.shell";
85
+ /** True when the OpenCode 2 `plugins` list removes the host's shell tool plugin. */
86
+ export declare function hostShellPluginDisabled(value: Record<string | symbol, unknown> | null): boolean;
87
+ /**
88
+ * Add or remove the host-shell removal entry in the OpenCode 2 `plugins` list.
89
+ *
90
+ * Idempotent in both directions: enabling leaves exactly one entry, disabling
91
+ * leaves none, and a list already in the requested state is not touched.
92
+ * Every other entry keeps its position. The array is edited in place so the
93
+ * JSONC writer keeps the file's comments.
94
+ */
95
+ export declare function setHostShellPluginDisabled(value: Record<string | symbol, unknown>, disabled: boolean): {
96
+ changed: boolean;
97
+ };
98
+ /**
99
+ * Whether the user config leaves AFT's `bash` tool registered and runnable.
100
+ *
101
+ * The tool is registered unless `disabled_tools` names it, and a registered
102
+ * tool refuses every command when the `bash` runtime gate is off (`bash:
103
+ * false` or `bash.enabled: false`). Disabling the host's shell only makes
104
+ * sense when AFT's bash can take its place, so this is the offer's default.
105
+ * AFT disabled as a whole (`enabled: false`) counts as bash disabled.
106
+ */
107
+ export declare function aftBashEnabled(userConfig: Record<string, unknown> | null): boolean;
55
108
  //# sourceMappingURL=opencode-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"opencode-config.d.ts","sourceRoot":"","sources":["../../src/setup/opencode-config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,6FAA6F;AAC7F,MAAM,MAAM,wBAAwB,GAAG,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,SAAS,CAAC;AAE7E,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,wBAAwB,GAAG,iBAAiB,CAEzF;AAED,iDAAiD;AACjD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,iBAAiB,GAAG,iBAAiB,CAEhF;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,wBAAwB,GAAG,iBAAiB,EAAE,CAIhG;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MA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EAAE,MAAM,EACf,gBAAgB,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAqB,EAC1D,UAAU,GAAE,wBAAoC,GAC/C,kBAAkB,CAiDpB;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,EACvC,OAAO,EAAE,MAAM,EACf,gBAAgB,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAqB,EAC1D,UAAU,GAAE,wBAAoC,GAC/C,OAAO,CAoBT;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,iCAAiC,yBAAyB,CAAC;AAExE,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,OAAO,CAG/F;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,EACvC,QAAQ,EAAE,OAAO,GAChB;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAkBtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,OAAO,CAelF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft",
3
- "version": "0.57.1",
3
+ "version": "0.58.0",
4
4
  "type": "module",
5
5
  "description": "Unified CLI for Agent File Tools (AFT) — setup, one-shot index snapshots, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
6
6
  "license": "MIT",
@@ -23,8 +23,9 @@
23
23
  "test:unit": "bun test"
24
24
  },
25
25
  "dependencies": {
26
+ "@clack/core": "^1.4.2",
26
27
  "@clack/prompts": "^1.6.0",
27
- "@cortexkit/aft-bridge": "0.57.1",
28
+ "@cortexkit/aft-bridge": "0.58.0",
28
29
  "comment-json": "^4.6.2"
29
30
  },
30
31
  "devDependencies": {