@cortexkit/aft 0.27.0 → 0.28.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.
@@ -16,4 +16,23 @@ export declare function readJsoncFile(path: string): {
16
16
  * `comment-json`'s `parse`, embedded comments are retained via `stringifyJsonc`.
17
17
  */
18
18
  export declare function writeJsoncFile(path: string, value: Record<string, unknown>, format?: JsoncFormat): void;
19
+ /** Canonical URL of the published AFT config schema. */
20
+ export declare const AFT_SCHEMA_URL = "https://raw.githubusercontent.com/cortexkit/aft/master/assets/aft.schema.json";
21
+ export type AftSchemaAction = "added" | "updated" | "unchanged";
22
+ /**
23
+ * Ensure `aft.jsonc` (or `aft.json`) contains a top-level `$schema` field
24
+ * pointing at the published AFT JSON Schema. Editor tooling (VS Code, Cursor,
25
+ * etc.) uses this for autocomplete and validation.
26
+ *
27
+ * Creates the file with `{"$schema": "..."}` if missing. Preserves existing
28
+ * comments and field ordering when the file exists.
29
+ *
30
+ * `format` follows the harness adapter contract: `"none"` means no file
31
+ * existed before — written as `.json` by default so editors that don't grok
32
+ * JSONC still parse it. Pass `"jsonc"` to keep existing JSONC files as JSONC.
33
+ */
34
+ export declare function ensureAftSchemaUrl(path: string, format: JsoncFormat): {
35
+ action: AftSchemaAction;
36
+ message: string;
37
+ };
19
38
  //# sourceMappingURL=jsonc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsonc.d.ts","sourceRoot":"","sources":["../../src/lib/jsonc.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CAW9E;AAED,8EAA8E;AAC9E,wBAAgB,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AAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAoC9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "type": "module",
5
5
  "description": "Unified CLI for Agent File Tools (AFT) — setup, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
6
6
  "license": "MIT",
@@ -23,6 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@clack/prompts": "^1.2.0",
26
+ "@cortexkit/aft-bridge": "workspace:*",
26
27
  "comment-json": "^4.6.2"
27
28
  },
28
29
  "devDependencies": {