@avocadostudio-ai/orchestrator-core 0.3.3 → 0.5.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.
- package/dist/agent/agent-logger.js +2 -1
- package/dist/chat/chat-pipeline.js +16 -1
- package/dist/chat/prompts.d.ts +5 -0
- package/dist/chat/prompts.js +92 -9
- package/dist/checks/field-walk.d.ts +18 -1
- package/dist/checks/field-walk.js +46 -0
- package/dist/checks/rules-draft.js +79 -15
- package/dist/checks/run-checks.d.ts +11 -1
- package/dist/checks/run-checks.js +11 -4
- package/dist/checks/session-runner.js +4 -0
- package/dist/checks/types.d.ts +44 -0
- package/dist/cms/adapter.d.ts +74 -1
- package/dist/cms/adapter.js +1 -0
- package/dist/cms/index.d.ts +1 -1
- package/dist/cms/index.js +1 -1
- package/dist/cms/media-sources.d.ts +29 -1
- package/dist/cms/media-sources.js +188 -7
- package/dist/handler/create-orchestrator.js +247 -34
- package/dist/handler/library-mount.d.ts +6 -0
- package/dist/handler/library-mount.js +45 -0
- package/dist/http/history-actions.d.ts +43 -0
- package/dist/http/history-actions.js +122 -0
- package/dist/http/publish-actions.d.ts +11 -0
- package/dist/http/publish-actions.js +3 -3
- package/dist/image/image-helpers.js +3 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/nlp/intent-detection.d.ts +16 -0
- package/dist/nlp/intent-detection.js +15 -1
- package/dist/nlp/plan-normalizer.js +12 -26
- package/dist/publish/publish-helpers.d.ts +12 -2
- package/dist/publish/publish-helpers.js +12 -4
- package/dist/publish/publish-selection.d.ts +84 -0
- package/dist/publish/publish-selection.js +113 -0
- package/dist/publish/targets/git.js +2 -2
- package/dist/state/data-dir.d.ts +6 -0
- package/dist/state/data-dir.js +35 -0
- package/dist/state/site-assets.d.ts +41 -0
- package/dist/state/site-assets.js +40 -0
- package/dist/state/sqlite-store-singleton.js +3 -17
- package/package.json +3 -3
|
@@ -2,6 +2,7 @@ import { existsSync } from "node:fs";
|
|
|
2
2
|
import { rename, readFile, readdir, stat, unlink } from "node:fs/promises";
|
|
3
3
|
import { basename, dirname, resolve } from "node:path";
|
|
4
4
|
import { SqliteStore } from "./sqlite-store.js";
|
|
5
|
+
import { resolveDataDir } from "./data-dir.js";
|
|
5
6
|
// ---------------------------------------------------------------------------
|
|
6
7
|
// Config
|
|
7
8
|
// ---------------------------------------------------------------------------
|
|
@@ -17,23 +18,8 @@ export function resolveDbFile() {
|
|
|
17
18
|
return ":memory:";
|
|
18
19
|
if (process.env.NODE_ENV === "test")
|
|
19
20
|
return ":memory:";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
* It is right for `apps/orchestrator`, whose cwd is two levels under the repo
|
|
24
|
-
* root, and wrong for everyone else: a library-mode host running from its own
|
|
25
|
-
* project root writes two directories *above* itself. PBA's landed in
|
|
26
|
-
* `~/Projects/.data` — outside the project, outside version control, and
|
|
27
|
-
* shared with any sibling checkout that made the same mistake.
|
|
28
|
-
*
|
|
29
|
-
* The default is now the host's own `.data/`. The legacy path still wins when
|
|
30
|
-
* a database is already sitting there, so an existing monorepo checkout keeps
|
|
31
|
-
* its state without an env var and without a migration step.
|
|
32
|
-
*/
|
|
33
|
-
const legacy = resolve(process.cwd(), "../../.data/orchestrator.db");
|
|
34
|
-
if (existsSync(legacy))
|
|
35
|
-
return legacy;
|
|
36
|
-
return resolve(process.cwd(), ".data/orchestrator.db");
|
|
21
|
+
// `resolveDataDir` carries the whole story of why this is not `../../.data`.
|
|
22
|
+
return resolve(resolveDataDir(), "orchestrator.db");
|
|
37
23
|
}
|
|
38
24
|
export function resolveJsonMigrationTtlDays() {
|
|
39
25
|
const raw = Number(process.env.ORCHESTRATOR_JSON_MIGRATION_TTL_DAYS ?? 14);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avocadostudio-ai/orchestrator-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"openai": "^4.87.1",
|
|
24
24
|
"sharp": "^0.34.5",
|
|
25
25
|
"zod": "^4.3.6",
|
|
26
|
-
"@avocadostudio-ai/
|
|
27
|
-
"@avocadostudio-ai/
|
|
26
|
+
"@avocadostudio-ai/migration-sdk": "^0.5.0",
|
|
27
|
+
"@avocadostudio-ai/shared": "^0.5.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@google/genai": "^1.46.0",
|