@hasna/todos 0.15.50 → 0.15.52
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/cli/cloud-router.d.ts.map +1 -1
- package/dist/cli/commands/project-commands.d.ts +15 -0
- package/dist/cli/commands/project-commands.d.ts.map +1 -1
- package/dist/cli/commands/query-commands.d.ts.map +1 -1
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/index.js +521 -342
- package/dist/contracts.js +194 -95
- package/dist/db/task-crud.d.ts.map +1 -1
- package/dist/index.js +406 -299
- package/dist/lib/model-config.d.ts +2 -1
- package/dist/lib/model-config.d.ts.map +1 -1
- package/dist/lib/paths.d.ts +40 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/sync-utils.d.ts +7 -0
- package/dist/lib/sync-utils.d.ts.map +1 -1
- package/dist/mcp/index.js +280 -174
- package/dist/mcp.js +7 -4
- package/dist/project-registration.js +192 -93
- package/dist/registry.js +194 -95
- package/dist/release-provenance.json +5 -5
- package/dist/sdk/index.js +100 -8
- package/dist/server/index.js +449 -220
- package/dist/storage.js +183 -87
- package/dist/task-manifest.js +113 -17
- package/dist/testing.d.ts +10 -9
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -4
- package/postinstall.js +34 -0
|
@@ -4,7 +4,8 @@ export declare const DEFAULT_MODEL = "gpt-4o-mini";
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function getActiveModel(): string;
|
|
6
6
|
/**
|
|
7
|
-
* Sets the active fine-tuned model ID in
|
|
7
|
+
* Sets the active fine-tuned model ID in the effective todos data home's
|
|
8
|
+
* config.json.
|
|
8
9
|
*/
|
|
9
10
|
export declare function setActiveModel(modelId: string): void;
|
|
10
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-config.d.ts","sourceRoot":"","sources":["../../src/lib/model-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-config.d.ts","sourceRoot":"","sources":["../../src/lib/model-config.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAkC3C;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAGvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIpD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAIvC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The effective user home, honoring a runtime `HOME` override. `os.homedir()`
|
|
3
|
+
* snapshots `HOME` at process start and (under Bun) ignores later
|
|
4
|
+
* reassignment, so tests that set `process.env.HOME` to a temp dir would
|
|
5
|
+
* otherwise resolve the *real* home. In production `HOME` is set at startup,
|
|
6
|
+
* so this resolves identically.
|
|
7
|
+
*/
|
|
8
|
+
export declare function effectiveHome(env?: NodeJS.ProcessEnv): string;
|
|
9
|
+
/** Pre-XDG default data home: `~/.hasna/todos`. */
|
|
10
|
+
export declare function legacyHomeDir(env?: NodeJS.ProcessEnv): string;
|
|
11
|
+
/**
|
|
12
|
+
* The @hasna/paths-resolved data home for todos (XDG / macOS home layout).
|
|
13
|
+
* The home override mirrors the pre-existing $HOME-first resolution so the
|
|
14
|
+
* resolver follows the same home the legacy path does.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolverHome(env?: NodeJS.ProcessEnv): string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the resolver (XDG) data home should be adopted as the todos data
|
|
19
|
+
* home. Adopted only when the operator sets `HASNA_DATA_HOME` (the data-kind
|
|
20
|
+
* override — a deliberate opt-in to the XDG layout) or the store has already
|
|
21
|
+
* been physically migrated there (`todos.db` or `config.json` exists at the
|
|
22
|
+
* resolver home). A live store at the legacy home must never become invisible
|
|
23
|
+
* on upgrade.
|
|
24
|
+
*/
|
|
25
|
+
export declare function adoptResolverHome(resolved: string, env?: NodeJS.ProcessEnv): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The effective todos data dir: the @hasna/paths (XDG) data home once adopted;
|
|
28
|
+
* otherwise the legacy `~/.hasna/todos` default. The file-level store
|
|
29
|
+
* overrides (`HASNA_TODOS_DB_PATH` / `TODOS_DB_PATH`,
|
|
30
|
+
* `TODOS_SANDBOX_PROFILES_PATH`) are layered on top by the individual store
|
|
31
|
+
* layers and always win regardless.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getTodosDir(env?: NodeJS.ProcessEnv): string;
|
|
34
|
+
/** The default global database file: `<effective data dir>/todos.db`. */
|
|
35
|
+
export declare function getDefaultDbPath(env?: NodeJS.ProcessEnv): string;
|
|
36
|
+
/** The default training directory: `<effective data dir>/training`. */
|
|
37
|
+
export declare function getTrainingDir(env?: NodeJS.ProcessEnv): string;
|
|
38
|
+
/** The config file: `<effective data dir>/config.json`. */
|
|
39
|
+
export declare function getConfigPath(env?: NodeJS.ProcessEnv): string;
|
|
40
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/lib/paths.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE1E;AAED,mDAAmD;AACnD,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAEzE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAOT;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAGxE;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE7E;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE3E;AAED,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE1E"}
|
package/dist/lib/sync-utils.d.ts
CHANGED
|
@@ -2,6 +2,13 @@ import type { SyncConflict } from "./sync-types.js";
|
|
|
2
2
|
export declare const TODO_SYNC_FINGERPRINT_KEY = "todos_sync_fingerprint";
|
|
3
3
|
export declare function getHomeDir(): string;
|
|
4
4
|
export declare const HOME: string;
|
|
5
|
+
/**
|
|
6
|
+
* The effective (global) todos data dir, resolved through @hasna/paths
|
|
7
|
+
* (XDG / macOS home layout): the resolver data home once adopted, otherwise
|
|
8
|
+
* the legacy `~/.hasna/todos` default. File-level store overrides
|
|
9
|
+
* (`HASNA_TODOS_DB_PATH` / `TODOS_DB_PATH`) are layered on top by the store
|
|
10
|
+
* layers and always win regardless.
|
|
11
|
+
*/
|
|
5
12
|
export declare function getTodosGlobalDir(): string;
|
|
6
13
|
export declare function ensureDir(dir: string): void;
|
|
7
14
|
export declare function listJsonFiles(dir: string): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-utils.d.ts","sourceRoot":"","sources":["../../src/lib/sync-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-utils.d.ts","sourceRoot":"","sources":["../../src/lib/sync-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAel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