@antelopejs/dms-assistant 0.2.2 → 0.2.4
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 +1 -1
- package/dist/builder/driver-install.d.ts +13 -0
- package/dist/builder/driver-install.js +58 -0
- package/dist/builder/driver-install.js.map +1 -0
- package/dist/builder/routes/database.d.ts +2 -1
- package/dist/builder/routes/database.js +21 -1
- package/dist/builder/routes/database.js.map +1 -1
- package/frontend-vue/app/onboarding/database-checks.ts +8 -1
- package/frontend-vue/app/views/onboarding/OnboardingDatabase.vue +44 -1
- package/frontend-vue/builder/app/runtime/database-types.ts +2 -0
- package/frontend-vue/i18n/locales/dms-assistant-views-en-GB.json +2 -0
- package/frontend-vue/i18n/locales/dms-assistant-views-fr-FR.json +2 -0
- package/frontend-vue/package.json +4 -4
- package/frontend-vue/pnpm-lock.yaml +31 -43
- package/frontend-vue/tests/onboarding-database-driver-install.test.ts +112 -0
- package/package.json +3 -3
- package/sidecar/dist/agent/project-secrets.d.ts +3 -0
- package/sidecar/dist/agent/project-secrets.js +24 -2
- package/sidecar/dist/agent/project-secrets.js.map +1 -1
- package/sidecar/dist/constants/project-secrets.d.ts +2 -0
- package/sidecar/dist/constants/project-secrets.js +5 -0
- package/sidecar/dist/constants/project-secrets.js.map +1 -1
- package/sidecar/dist/providers/claude/secret-files.js +57 -7
- package/sidecar/dist/providers/claude/secret-files.js.map +1 -1
- package/sidecar/dist/providers/codex/secret-file-globs.js +1 -10
- package/sidecar/dist/providers/codex/secret-file-globs.js.map +1 -1
- package/sidecar/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ Start the backend with `ajs project dev -w`, then the frontend with `ajs dms dev
|
|
|
78
78
|
| Package | Supported | Tested with |
|
|
79
79
|
| ----------------------------------- | ------------------ | ----------- |
|
|
80
80
|
| `@antelopejs/agent-skills` | `>=0.3.0 <0.4.0` | `0.3.0` |
|
|
81
|
-
| `@antelopejs/dms` | `>=0.20.
|
|
81
|
+
| `@antelopejs/dms` | `>=0.20.5 <0.21.0` | `0.20.5` |
|
|
82
82
|
| `@antelopejs/interface-api` | `>=0.3.3 <0.4.0` | `0.3.3` |
|
|
83
83
|
| `@antelopejs/interface-core` | `>=0.5.1 <0.6.0` | `0.5.1` |
|
|
84
84
|
| `@antelopejs/interface-dms` | `>=0.14.0 <0.15.0` | `0.14.0` |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DatabaseAccess, DatabaseEngine } from "@antelopejs/interface-dms-builder";
|
|
2
|
+
export type PackageManager = "pnpm" | "yarn" | "bun" | "npm";
|
|
3
|
+
export interface DriverInstall {
|
|
4
|
+
package: string;
|
|
5
|
+
command: string;
|
|
6
|
+
}
|
|
7
|
+
export type CheckedAccess = DatabaseAccess & {
|
|
8
|
+
install?: DriverInstall;
|
|
9
|
+
};
|
|
10
|
+
export declare function projectPackageManager(projectPath: string): Promise<PackageManager>;
|
|
11
|
+
export declare function installCommand(manager: PackageManager, driver: string, version: string | undefined): string;
|
|
12
|
+
export declare function driverPackageName(engine: DatabaseEngine): string;
|
|
13
|
+
export declare function missesDriver(access: DatabaseAccess, driver: string): boolean;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.projectPackageManager = projectPackageManager;
|
|
7
|
+
exports.installCommand = installCommand;
|
|
8
|
+
exports.driverPackageName = driverPackageName;
|
|
9
|
+
exports.missesDriver = missesDriver;
|
|
10
|
+
const promises_1 = require("node:fs/promises");
|
|
11
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
+
const zod_1 = require("zod");
|
|
13
|
+
const ADD_VERBS = {
|
|
14
|
+
pnpm: "pnpm add --save-prefix=~",
|
|
15
|
+
yarn: "yarn add",
|
|
16
|
+
bun: "bun add",
|
|
17
|
+
npm: "npm install --save-prefix=~",
|
|
18
|
+
};
|
|
19
|
+
const LOCKFILES = [
|
|
20
|
+
["pnpm-lock.yaml", "pnpm"],
|
|
21
|
+
["yarn.lock", "yarn"],
|
|
22
|
+
["bun.lock", "bun"],
|
|
23
|
+
["bun.lockb", "bun"],
|
|
24
|
+
["package-lock.json", "npm"],
|
|
25
|
+
];
|
|
26
|
+
const ManifestSchema = zod_1.z.object({
|
|
27
|
+
packageManager: zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.transform((spec) => spec.split("@")[0])
|
|
30
|
+
.pipe(zod_1.z.enum(["pnpm", "yarn", "bun", "npm"])),
|
|
31
|
+
});
|
|
32
|
+
async function exists(file) {
|
|
33
|
+
return (0, promises_1.stat)(file).then(() => true, () => false);
|
|
34
|
+
}
|
|
35
|
+
async function projectPackageManager(projectPath) {
|
|
36
|
+
const named = await (0, promises_1.readFile)(node_path_1.default.join(projectPath, "package.json"), "utf8")
|
|
37
|
+
.then((text) => ManifestSchema.safeParse(JSON.parse(text)).data)
|
|
38
|
+
.catch(() => undefined);
|
|
39
|
+
if (named !== undefined)
|
|
40
|
+
return named.packageManager;
|
|
41
|
+
for (const [lockfile, manager] of LOCKFILES) {
|
|
42
|
+
if (await exists(node_path_1.default.join(projectPath, lockfile)))
|
|
43
|
+
return manager;
|
|
44
|
+
}
|
|
45
|
+
return "npm";
|
|
46
|
+
}
|
|
47
|
+
function installCommand(manager, driver, version) {
|
|
48
|
+
const spec = version === undefined ? driver : `"${driver}@${version}"`;
|
|
49
|
+
return `${ADD_VERBS[manager]} ${spec}`;
|
|
50
|
+
}
|
|
51
|
+
function driverPackageName(engine) {
|
|
52
|
+
return `@antelopejs/${engine}`;
|
|
53
|
+
}
|
|
54
|
+
function missesDriver(access, driver) {
|
|
55
|
+
return (!access.reachable &&
|
|
56
|
+
(access.reason?.startsWith(`Install ${driver} to connect `) ?? false));
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=driver-install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver-install.js","sourceRoot":"","sources":["../../src/builder/driver-install.ts"],"names":[],"mappings":";;;;;AAkDA,sDAWC;AAGD,wCAOC;AAGD,8CAEC;AAGD,oCAKC;AApFD,+CAAkD;AAClD,0DAA6B;AAK7B,6BAAwB;AAcxB,MAAM,SAAS,GAAmC;IAChD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,UAAU;IAChB,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,6BAA6B;CACnC,CAAC;AAEF,MAAM,SAAS,GAAmD;IAChE,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAC1B,CAAC,WAAW,EAAE,MAAM,CAAC;IACrB,CAAC,UAAU,EAAE,KAAK,CAAC;IACnB,CAAC,WAAW,EAAE,KAAK,CAAC;IACpB,CAAC,mBAAmB,EAAE,KAAK,CAAC;CAC7B,CAAC;AAEF,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,cAAc,EAAE,OAAC;SACd,MAAM,EAAE;SACR,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SACvC,IAAI,CAAC,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CAChD,CAAC,CAAC;AAEH,KAAK,UAAU,MAAM,CAAC,IAAY;IAChC,OAAO,IAAA,eAAI,EAAC,IAAI,CAAC,CAAC,IAAI,CACpB,GAAG,EAAE,CAAC,IAAI,EACV,GAAG,EAAE,CAAC,KAAK,CACZ,CAAC;AACJ,CAAC;AAGM,KAAK,UAAU,qBAAqB,CACzC,WAAmB;IAEnB,MAAM,KAAK,GAAG,MAAM,IAAA,mBAAQ,EAAC,mBAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC;SACzE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;SAC/D,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC1B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,cAAc,CAAC;IACrD,KAAK,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,SAAS,EAAE,CAAC;QAC5C,IAAI,MAAM,MAAM,CAAC,mBAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;YAAE,OAAO,OAAO,CAAC;IACrE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAGD,SAAgB,cAAc,CAC5B,OAAuB,EACvB,MAAc,EACd,OAA2B;IAE3B,MAAM,IAAI,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,IAAI,OAAO,GAAG,CAAC;IACvE,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;AACzC,CAAC;AAGD,SAAgB,iBAAiB,CAAC,MAAsB;IACtD,OAAO,eAAe,MAAM,EAAE,CAAC;AACjC,CAAC;AAGD,SAAgB,YAAY,CAAC,MAAsB,EAAE,MAAc;IACjE,OAAO,CACL,CAAC,MAAM,CAAC,SAAS;QACjB,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,MAAM,cAAc,CAAC,IAAI,KAAK,CAAC,CACtE,CAAC;AACJ,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { HTTPResult } from "@antelopejs/interface-api";
|
|
|
2
2
|
import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
3
3
|
import { type QueryValue } from "../../routes/query-text";
|
|
4
4
|
import { type AnalyseDatabaseInput, type DatabaseCheckInput, type MapResourcesInput, type OpResult, type ProjectConfigOpts, type ProjectConfigStep, type ProjectVariable } from "@antelopejs/interface-dms-builder";
|
|
5
|
+
import { type CheckedAccess } from "../driver-install";
|
|
5
6
|
interface RemoveConnectionBody {
|
|
6
7
|
connection: string;
|
|
7
8
|
dryRun?: boolean;
|
|
@@ -19,7 +20,7 @@ declare const DatabaseController_base: import("@antelopejs/interface-api").Contr
|
|
|
19
20
|
export declare class DatabaseController extends DatabaseController_base {
|
|
20
21
|
connections(_user: User): Promise<HTTPResult | import("@antelopejs/interface-dms-builder").CatalogConnectionEntry[]>;
|
|
21
22
|
repairConnections(_user: User, body: ProjectConfigOpts | undefined): Promise<HTTPResult | OpResult<import("@antelopejs/interface-dms-builder").ProjectConfigResult>>;
|
|
22
|
-
checkConnection(_user: User, body: DatabaseCheckInput): Promise<HTTPResult |
|
|
23
|
+
checkConnection(_user: User, body: DatabaseCheckInput): Promise<HTTPResult | CheckedAccess>;
|
|
23
24
|
analyse(_user: User, body: AnalyseDatabaseInput): Promise<HTTPResult | OpResult<import("@antelopejs/interface-dms-builder").AnalysisState>>;
|
|
24
25
|
analysis(_user: User, id: QueryValue, connection: QueryValue): Promise<HTTPResult | OpResult<import("@antelopejs/interface-dms-builder").AnalysisState>>;
|
|
25
26
|
map(_user: User, body: MapResourcesInput): Promise<HTTPResult | OpResult<import("@antelopejs/interface-dms-builder").MapResourcesResult>>;
|
|
@@ -14,12 +14,14 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.DatabaseController = void 0;
|
|
16
16
|
const interface_api_1 = require("@antelopejs/interface-api");
|
|
17
|
+
const runtime_1 = require("@antelopejs/interface-core/runtime");
|
|
17
18
|
const guards_1 = require("@antelopejs/interface-dms/guards");
|
|
18
19
|
const query_text_1 = require("../../routes/query-text");
|
|
19
20
|
const interface_dms_builder_1 = require("@antelopejs/interface-dms-builder");
|
|
20
21
|
const zod_1 = require("zod");
|
|
21
22
|
const routes_1 = require("../constants/routes");
|
|
22
23
|
const dms_answer_1 = require("../dms-answer");
|
|
24
|
+
const driver_install_1 = require("../driver-install");
|
|
23
25
|
const refusal_1 = require("../refusal");
|
|
24
26
|
const reload_1 = require("../reload");
|
|
25
27
|
const HTTP_BAD_REQUEST = 400;
|
|
@@ -64,6 +66,24 @@ async function fromDms(operation) {
|
|
|
64
66
|
return unavailable(message);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
69
|
+
async function withInstall(access, input) {
|
|
70
|
+
const driver = (0, driver_install_1.driverPackageName)(input.engine);
|
|
71
|
+
if (!(0, driver_install_1.missesDriver)(access, driver))
|
|
72
|
+
return access;
|
|
73
|
+
const project = await (0, interface_dms_builder_1.GetDatabaseProject)();
|
|
74
|
+
const version = project.ok
|
|
75
|
+
? project.data.drivers[input.engine]?.version
|
|
76
|
+
: undefined;
|
|
77
|
+
const { projectPath } = await (0, runtime_1.GetRuntimeInfo)();
|
|
78
|
+
const manager = await (0, driver_install_1.projectPackageManager)(projectPath);
|
|
79
|
+
return {
|
|
80
|
+
...access,
|
|
81
|
+
install: {
|
|
82
|
+
package: driver,
|
|
83
|
+
command: (0, driver_install_1.installCommand)(manager, driver, version),
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
67
87
|
function dataOrStatus(result) {
|
|
68
88
|
if (result.ok)
|
|
69
89
|
return result.data;
|
|
@@ -89,7 +109,7 @@ class DatabaseController extends (0, interface_api_1.Controller)(routes_1.DEFAUL
|
|
|
89
109
|
return fromDms(async () => {
|
|
90
110
|
const result = await (0, interface_dms_builder_1.CheckDatabaseConnection)(body);
|
|
91
111
|
if (result.ok)
|
|
92
|
-
return result.data;
|
|
112
|
+
return withInstall(result.data, body);
|
|
93
113
|
return result.error.code === "unsupported"
|
|
94
114
|
? new interface_api_1.HTTPResult(HTTP_FORBIDDEN, {
|
|
95
115
|
code: "forbidden",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../../src/builder/routes/database.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAOmC;AACnC,6DAAmE;AAEnE,wDAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../../src/builder/routes/database.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAOmC;AACnC,gEAAoE;AACpE,6DAAmE;AAEnE,wDAAqE;AACrE,6EAuB2C;AAC3C,6BAAwB;AACxB,gDAAmE;AACnE,8CAAiD;AACjD,sDAM2B;AAC3B,wCAA4C;AAC5C,sCAAsC;AAEtC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,MAAM,WAAW,GACf,mIAAmI,CAAC;AAEtI,MAAM,qBAAqB,GACzB,oDAAoD,CAAC;AAEvD,MAAM,yBAAyB,GAAG,OAAC;KAChC,MAAM,CAAC,EAAE,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,EAAE,CAAC;KACjE,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;AAEvC,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC;CAC1C,CAAC,CAAC;AAEH,IAAI,UAAmD,CAAC;AAExD,KAAK,UAAU,YAAY;IACzB,MAAM,OAAO,GAAG,IAAA,0CAAkB,GAAE,CAAC,IAAI,CACvC,GAAG,EAAE,CAAC,SAAS,EACf,CAAC,KAAc,EAAE,EAAE,CACjB,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC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;AAIK;IADL,IAAA,mBAAG,EAAC,eAAM,CAAC,cAAc,CAAC;IACb,WAAA,IAAA,wBAAe,GAAE,CAAA;;;;gDAE9B"}
|
|
@@ -10,6 +10,8 @@ export type ConnectCheck =
|
|
|
10
10
|
status: CheckStatus;
|
|
11
11
|
latencyMs?: number;
|
|
12
12
|
error?: string;
|
|
13
|
+
/** The command that installs the engine's driver, when the project lacks it. */
|
|
14
|
+
install?: string;
|
|
13
15
|
}
|
|
14
16
|
| { key: "signed-in"; status: CheckStatus; user?: string; error?: string }
|
|
15
17
|
| { key: "read"; status: CheckStatus; canWrite?: boolean; error?: string }
|
|
@@ -53,7 +55,12 @@ function accessChecks(access: DatabaseAccess | null): ConnectCheck[] {
|
|
|
53
55
|
}
|
|
54
56
|
if (!access.reachable) {
|
|
55
57
|
return [
|
|
56
|
-
{
|
|
58
|
+
{
|
|
59
|
+
key: "reachable",
|
|
60
|
+
status: "failed",
|
|
61
|
+
error: access.reason,
|
|
62
|
+
install: access.install?.command,
|
|
63
|
+
},
|
|
57
64
|
{ key: "signed-in", status: "pending" },
|
|
58
65
|
{ key: "read", status: "pending" },
|
|
59
66
|
];
|
|
@@ -107,6 +107,9 @@ function checkText(check: ConnectCheck): string {
|
|
|
107
107
|
if (check.status === "running") {
|
|
108
108
|
return t("dms_assistant.views.onboarding.database.reachable_running");
|
|
109
109
|
}
|
|
110
|
+
if (check.status === "failed" && check.install !== undefined) {
|
|
111
|
+
return check.error ?? "";
|
|
112
|
+
}
|
|
110
113
|
if (check.status === "failed") {
|
|
111
114
|
return t("dms_assistant.views.onboarding.database.unreachable", {
|
|
112
115
|
error: check.error ?? "",
|
|
@@ -161,6 +164,17 @@ function checkText(check: ConnectCheck): string {
|
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
166
|
|
|
167
|
+
const copiedInstall = ref(false);
|
|
168
|
+
|
|
169
|
+
async function copyInstall(command: string): Promise<void> {
|
|
170
|
+
try {
|
|
171
|
+
await navigator.clipboard.writeText(command);
|
|
172
|
+
} catch {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
copiedInstall.value = true;
|
|
176
|
+
}
|
|
177
|
+
|
|
164
178
|
const urlHint = computed(() => {
|
|
165
179
|
const problem = urlProblem.value;
|
|
166
180
|
if (problem === null) return null;
|
|
@@ -195,6 +209,7 @@ async function connect(): Promise<void> {
|
|
|
195
209
|
await database.choose(access.value);
|
|
196
210
|
return;
|
|
197
211
|
}
|
|
212
|
+
copiedInstall.value = false;
|
|
198
213
|
urlProblem.value = await database.connect(engine.value, url.value);
|
|
199
214
|
}
|
|
200
215
|
|
|
@@ -279,7 +294,35 @@ watch(database.phase, (phase) => {
|
|
|
279
294
|
class="mt-0.5 size-3.5 shrink-0"
|
|
280
295
|
:class="STATUS_ICONS[check.status].tone"
|
|
281
296
|
/>
|
|
282
|
-
|
|
297
|
+
<span class="min-w-0">
|
|
298
|
+
{{ checkText(check) }}
|
|
299
|
+
<span
|
|
300
|
+
v-if="check.key === 'reachable' && check.install !== undefined"
|
|
301
|
+
class="text-default mt-1.5 block"
|
|
302
|
+
data-driver-install
|
|
303
|
+
>
|
|
304
|
+
<span class="flex items-center gap-1.5">
|
|
305
|
+
<code
|
|
306
|
+
class="bg-elevated select-all rounded px-1.5 py-0.5 font-mono text-xs"
|
|
307
|
+
>
|
|
308
|
+
{{ check.install }}
|
|
309
|
+
</code>
|
|
310
|
+
<UButton
|
|
311
|
+
size="xs"
|
|
312
|
+
color="neutral"
|
|
313
|
+
variant="ghost"
|
|
314
|
+
:icon="copiedInstall ? 'i-ph-check' : 'i-ph-copy'"
|
|
315
|
+
:aria-label="
|
|
316
|
+
t('dms_assistant.views.onboarding.database.install_copy')
|
|
317
|
+
"
|
|
318
|
+
@click="copyInstall(check.install)"
|
|
319
|
+
/>
|
|
320
|
+
</span>
|
|
321
|
+
<span class="text-muted mt-1 block text-xs">
|
|
322
|
+
{{ t("dms_assistant.views.onboarding.database.install_retry") }}
|
|
323
|
+
</span>
|
|
324
|
+
</span>
|
|
325
|
+
</span>
|
|
283
326
|
</li>
|
|
284
327
|
</ul>
|
|
285
328
|
<fieldset v-if="choosing" class="mt-4" data-access-choice>
|
|
@@ -194,6 +194,8 @@ export interface DatabaseAccess {
|
|
|
194
194
|
canWrite: boolean
|
|
195
195
|
/** Why the database cannot be read, in a sentence that never holds the URL or the password. */
|
|
196
196
|
reason?: string
|
|
197
|
+
/** Set when the project lacks the engine's driver: the package, and the command that installs it with the project's package manager. */
|
|
198
|
+
install?: { package: string; command: string }
|
|
197
199
|
}
|
|
198
200
|
|
|
199
201
|
export interface ModuleEntryInput {
|
|
@@ -263,6 +263,8 @@
|
|
|
263
263
|
"reachable": "Server reachable",
|
|
264
264
|
"reachable_latency": "Server reachable · {ms} ms",
|
|
265
265
|
"unreachable": "Server not reachable: {error}",
|
|
266
|
+
"install_copy": "Copy the install command",
|
|
267
|
+
"install_retry": "Run it in the project folder, then select Connect and analyse again.",
|
|
266
268
|
"signed_in": "Signed in as {user}",
|
|
267
269
|
"signed_in_pending": "Signing in",
|
|
268
270
|
"signed_in_no_user": "Signed in, no account needed",
|
|
@@ -263,6 +263,8 @@
|
|
|
263
263
|
"reachable": "Serveur joignable",
|
|
264
264
|
"reachable_latency": "Serveur joignable · {ms} ms",
|
|
265
265
|
"unreachable": "Serveur injoignable : {error}",
|
|
266
|
+
"install_copy": "Copier la commande d'installation",
|
|
267
|
+
"install_retry": "Lancez-la dans le dossier du projet, puis cliquez de nouveau sur Connecter et analyser.",
|
|
266
268
|
"signed_in": "Connecté en tant que {user}",
|
|
267
269
|
"signed_in_pending": "Connexion",
|
|
268
270
|
"signed_in_no_user": "Connecté, sans compte requis",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"packageManager": "pnpm@10.6.5",
|
|
8
8
|
"engines": {
|
|
9
|
-
"@antelopejs/dms-frontend": ">=0.11.
|
|
9
|
+
"@antelopejs/dms-frontend": ">=0.11.4 <0.12.0"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "pnpm --dir \"${DMS_FRONTEND_WORKSPACE:?Set DMS_FRONTEND_WORKSPACE to the generated Inertia workspace}\" build",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"zod": "^4.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@antelopejs/core": "~1.
|
|
32
|
-
"@antelopejs/dms": ">=0.20.
|
|
33
|
-
"@antelopejs/dms-frontend": ">=0.11.
|
|
31
|
+
"@antelopejs/core": "~1.24.0",
|
|
32
|
+
"@antelopejs/dms": ">=0.20.5 <0.21.0",
|
|
33
|
+
"@antelopejs/dms-frontend": ">=0.11.4 <0.12.0",
|
|
34
34
|
"@antelopejs/interface-api": ">=0.3.3 <0.4.0",
|
|
35
35
|
"@antelopejs/interface-api-util": ">=0.3.2 <0.4.0",
|
|
36
36
|
"@antelopejs/interface-data-api": ">=0.8.0 <0.9.0",
|
|
@@ -31,14 +31,14 @@ importers:
|
|
|
31
31
|
version: 4.6.7
|
|
32
32
|
devDependencies:
|
|
33
33
|
'@antelopejs/core':
|
|
34
|
-
specifier: ~1.
|
|
35
|
-
version: 1.
|
|
34
|
+
specifier: ~1.24.0
|
|
35
|
+
version: 1.24.0
|
|
36
36
|
'@antelopejs/dms':
|
|
37
|
-
specifier: '>=0.20.
|
|
38
|
-
version: 0.20.
|
|
37
|
+
specifier: '>=0.20.5 <0.21.0'
|
|
38
|
+
version: 0.20.5(@antelopejs/core@1.24.0)(bare-buffer@3.7.1)(typescript@5.9.3)
|
|
39
39
|
'@antelopejs/dms-frontend':
|
|
40
|
-
specifier: '>=0.11.
|
|
41
|
-
version: 0.11.
|
|
40
|
+
specifier: '>=0.11.4 <0.12.0'
|
|
41
|
+
version: 0.11.4(@antelopejs/core@1.24.0)
|
|
42
42
|
'@antelopejs/interface-api':
|
|
43
43
|
specifier: '>=0.3.3 <0.4.0'
|
|
44
44
|
version: 0.3.3(@antelopejs/interface-core@0.5.1)
|
|
@@ -102,40 +102,28 @@ packages:
|
|
|
102
102
|
2fa@0.1.2:
|
|
103
103
|
resolution: {integrity: sha512-PbQttc6USc2TmZwOPE/zlNWTJTySLt50rWhUbZgPkZ5LAOLpgShT3yclbxwHPfHGUXEjfLrTo3Lunyx8onGnXw==}
|
|
104
104
|
|
|
105
|
-
'@antelopejs/core@1.
|
|
106
|
-
resolution: {integrity: sha512-
|
|
105
|
+
'@antelopejs/core@1.24.0':
|
|
106
|
+
resolution: {integrity: sha512-lYw0iwu8pMohkWvU+aRTHRsZvRi2YXph+ALF3lwCyjilxeXlMxoCDwHroGP3iWXrAhqK8G/8iTloOz/b0WGUKw==}
|
|
107
107
|
engines: {node: ^20.19.0 || >=22.12.0}
|
|
108
108
|
hasBin: true
|
|
109
109
|
|
|
110
|
-
'@antelopejs/dms-frontend@0.11.
|
|
111
|
-
resolution: {integrity: sha512
|
|
110
|
+
'@antelopejs/dms-frontend@0.11.4':
|
|
111
|
+
resolution: {integrity: sha512-/YD6LapIXKonGsyiru+zuI1kFvLlh+KwhPW41SxowYmPPMP9DyYg+n5jSKEx+ht3P3BPixPVr79VTguZCjJAAg==}
|
|
112
112
|
engines: {node: '>=20.19.0'}
|
|
113
113
|
hasBin: true
|
|
114
114
|
peerDependencies:
|
|
115
|
-
'@antelopejs/core': ~1.
|
|
115
|
+
'@antelopejs/core': ~1.24.0
|
|
116
116
|
|
|
117
|
-
'@antelopejs/dms@0.20.
|
|
118
|
-
resolution: {integrity: sha512-
|
|
117
|
+
'@antelopejs/dms@0.20.5':
|
|
118
|
+
resolution: {integrity: sha512-tifNLc4aQShOj3P+hn1jFBuhfdfYsHiwNODX0gCXoAeae/96vIjG39Pl1s9ErMrA1WVRVd34eVfD6jm9jWBBYg==}
|
|
119
119
|
engines: {node: ^20.19.0 || >=22.12.0}
|
|
120
120
|
hasBin: true
|
|
121
121
|
peerDependencies:
|
|
122
|
-
'@antelopejs/core': ~1.
|
|
123
|
-
mongodb: ^6.21.0 || ^7.0.0
|
|
124
|
-
mysql2: ^3.24.6
|
|
125
|
-
pg: ^8.22.0
|
|
126
|
-
rethinkdb-ts: ^2.7.0
|
|
122
|
+
'@antelopejs/core': ~1.24.0
|
|
127
123
|
typescript: '>=5.8.0 <7.0.0'
|
|
128
124
|
peerDependenciesMeta:
|
|
129
125
|
'@antelopejs/core':
|
|
130
126
|
optional: true
|
|
131
|
-
mongodb:
|
|
132
|
-
optional: true
|
|
133
|
-
mysql2:
|
|
134
|
-
optional: true
|
|
135
|
-
pg:
|
|
136
|
-
optional: true
|
|
137
|
-
rethinkdb-ts:
|
|
138
|
-
optional: true
|
|
139
127
|
typescript:
|
|
140
128
|
optional: true
|
|
141
129
|
|
|
@@ -162,10 +150,10 @@ packages:
|
|
|
162
150
|
'@antelopejs/interface-database': '>=0.4.0 <0.5.0'
|
|
163
151
|
'@antelopejs/interface-database-decorators': '>=0.5.0 <0.6.0'
|
|
164
152
|
|
|
165
|
-
'@antelopejs/interface-database-catalog@0.0
|
|
166
|
-
resolution: {integrity: sha512-
|
|
153
|
+
'@antelopejs/interface-database-catalog@0.1.0':
|
|
154
|
+
resolution: {integrity: sha512-R5SL72JKD7u63UwBumWt18YsGXVnnWfKbBVwc323CgKvDcLS7Qfz+Eo/ko2ybr8wHq7Izi7maSTPhJn3fp91ug==}
|
|
167
155
|
peerDependencies:
|
|
168
|
-
'@antelopejs/interface-core': '>=0.
|
|
156
|
+
'@antelopejs/interface-core': '>=0.5.0 <0.6.0'
|
|
169
157
|
|
|
170
158
|
'@antelopejs/interface-database-decorators@0.5.2':
|
|
171
159
|
resolution: {integrity: sha512-o89zRhY8MT6nXNLz+8G/Yj4f/hQsYqrVPZCMyTrttnQuMjGVEqbIANf9t/KmgNSUVagf34LZDpsfQ2LgeeQa9Q==}
|
|
@@ -184,8 +172,8 @@ packages:
|
|
|
184
172
|
peerDependencies:
|
|
185
173
|
'@antelopejs/interface-core': '>=0.5.1 <0.6.0'
|
|
186
174
|
|
|
187
|
-
'@antelopejs/interface-dms-builder@0.5.
|
|
188
|
-
resolution: {integrity: sha512-
|
|
175
|
+
'@antelopejs/interface-dms-builder@0.5.0':
|
|
176
|
+
resolution: {integrity: sha512-BlNSGyIWYP96630jdDu3jmi34cDC+ul43VI/itVZVqHdE5+3TNeCu/e8Nawm4EiwA18JaL+eqoEFqLbdu4gf9w==}
|
|
189
177
|
peerDependencies:
|
|
190
178
|
'@antelopejs/interface-core': '>=0.5.1 <1.0.0'
|
|
191
179
|
|
|
@@ -3032,7 +3020,7 @@ snapshots:
|
|
|
3032
3020
|
qr-image: 3.2.0
|
|
3033
3021
|
thirty-two: 0.0.2
|
|
3034
3022
|
|
|
3035
|
-
'@antelopejs/core@1.
|
|
3023
|
+
'@antelopejs/core@1.24.0':
|
|
3036
3024
|
dependencies:
|
|
3037
3025
|
'@antelopejs/interface-core': 0.5.1
|
|
3038
3026
|
'@clack/prompts': 1.9.0
|
|
@@ -3044,17 +3032,17 @@ snapshots:
|
|
|
3044
3032
|
picocolors: 1.1.1
|
|
3045
3033
|
proper-lockfile: 4.1.2
|
|
3046
3034
|
reflect-metadata: 0.2.2
|
|
3047
|
-
semver: 7.
|
|
3035
|
+
semver: 7.8.6
|
|
3048
3036
|
typescript: 5.9.3
|
|
3049
3037
|
|
|
3050
|
-
'@antelopejs/dms-frontend@0.11.
|
|
3038
|
+
'@antelopejs/dms-frontend@0.11.4(@antelopejs/core@1.24.0)':
|
|
3051
3039
|
dependencies:
|
|
3052
|
-
'@antelopejs/core': 1.
|
|
3040
|
+
'@antelopejs/core': 1.24.0
|
|
3053
3041
|
'@intlify/message-compiler': 11.4.18
|
|
3054
3042
|
chokidar: 4.0.3
|
|
3055
3043
|
commander: 13.1.0
|
|
3056
3044
|
ignore: 7.0.5
|
|
3057
|
-
semver: 7.
|
|
3045
|
+
semver: 7.8.6
|
|
3058
3046
|
yaml: 2.9.1
|
|
3059
3047
|
optionalDependencies:
|
|
3060
3048
|
'@oxc-parser/binding-darwin-arm64': 0.95.0
|
|
@@ -3063,7 +3051,7 @@ snapshots:
|
|
|
3063
3051
|
'@oxc-parser/binding-linux-x64-gnu': 0.95.0
|
|
3064
3052
|
'@oxc-parser/binding-win32-x64-msvc': 0.95.0
|
|
3065
3053
|
|
|
3066
|
-
'@antelopejs/dms@0.20.
|
|
3054
|
+
'@antelopejs/dms@0.20.5(@antelopejs/core@1.24.0)(bare-buffer@3.7.1)(typescript@5.9.3)':
|
|
3067
3055
|
dependencies:
|
|
3068
3056
|
2fa: 0.1.2
|
|
3069
3057
|
'@antelopejs/interface-api': 0.3.3(@antelopejs/interface-core@0.5.1)
|
|
@@ -3073,7 +3061,7 @@ snapshots:
|
|
|
3073
3061
|
'@antelopejs/interface-database': 0.4.0(@antelopejs/interface-core@0.5.1)
|
|
3074
3062
|
'@antelopejs/interface-database-decorators': 0.5.2(@antelopejs/interface-api@0.3.3(@antelopejs/interface-core@0.5.1))(@antelopejs/interface-core@0.5.1)(@antelopejs/interface-database@0.4.0(@antelopejs/interface-core@0.5.1))
|
|
3075
3063
|
'@antelopejs/interface-dms': 0.14.0(f5da06a0c98a7b29fb38c747917eadf0)
|
|
3076
|
-
'@antelopejs/interface-dms-builder': 0.5.
|
|
3064
|
+
'@antelopejs/interface-dms-builder': 0.5.0(@antelopejs/interface-core@0.5.1)
|
|
3077
3065
|
'@antelopejs/interface-email': 0.2.1(@antelopejs/interface-core@0.5.1)
|
|
3078
3066
|
'@antelopejs/interface-file-storage': 0.1.7(@antelopejs/interface-core@0.5.1)
|
|
3079
3067
|
'@csstools/css-tokenizer': 4.0.0
|
|
@@ -3097,8 +3085,8 @@ snapshots:
|
|
|
3097
3085
|
zod: 3.25.76
|
|
3098
3086
|
zod-to-json-schema: 3.24.6(zod@3.25.76)
|
|
3099
3087
|
optionalDependencies:
|
|
3100
|
-
'@antelopejs/core': 1.
|
|
3101
|
-
'@antelopejs/interface-database-catalog': 0.0
|
|
3088
|
+
'@antelopejs/core': 1.24.0
|
|
3089
|
+
'@antelopejs/interface-database-catalog': 0.1.0(@antelopejs/interface-core@0.5.1)
|
|
3102
3090
|
'@antelopejs/interface-dms-automation': 0.7.0(@antelopejs/interface-core@0.5.1)
|
|
3103
3091
|
'@antelopejs/interface-redis': 0.0.9(@antelopejs/interface-core@0.5.1)
|
|
3104
3092
|
playwright-core: 1.65.0
|
|
@@ -3132,7 +3120,7 @@ snapshots:
|
|
|
3132
3120
|
'@antelopejs/interface-database': 0.4.0(@antelopejs/interface-core@0.5.1)
|
|
3133
3121
|
'@antelopejs/interface-database-decorators': 0.5.2(@antelopejs/interface-api@0.3.3(@antelopejs/interface-core@0.5.1))(@antelopejs/interface-core@0.5.1)(@antelopejs/interface-database@0.4.0(@antelopejs/interface-core@0.5.1))
|
|
3134
3122
|
|
|
3135
|
-
'@antelopejs/interface-database-catalog@0.0
|
|
3123
|
+
'@antelopejs/interface-database-catalog@0.1.0(@antelopejs/interface-core@0.5.1)':
|
|
3136
3124
|
dependencies:
|
|
3137
3125
|
'@antelopejs/interface-core': 0.5.1
|
|
3138
3126
|
optional: true
|
|
@@ -3154,7 +3142,7 @@ snapshots:
|
|
|
3154
3142
|
'@antelopejs/interface-core': 0.5.1
|
|
3155
3143
|
optional: true
|
|
3156
3144
|
|
|
3157
|
-
'@antelopejs/interface-dms-builder@0.5.
|
|
3145
|
+
'@antelopejs/interface-dms-builder@0.5.0(@antelopejs/interface-core@0.5.1)':
|
|
3158
3146
|
dependencies:
|
|
3159
3147
|
'@antelopejs/interface-core': 0.5.1
|
|
3160
3148
|
|
|
@@ -5073,7 +5061,7 @@ snapshots:
|
|
|
5073
5061
|
is-path-inside: 4.0.0
|
|
5074
5062
|
is-unicode-supported: 0.1.0
|
|
5075
5063
|
js-yaml: 5.5.0
|
|
5076
|
-
minimatch: 10.2.
|
|
5064
|
+
minimatch: 10.2.6
|
|
5077
5065
|
ms: 2.1.3
|
|
5078
5066
|
picocolors: 1.1.1
|
|
5079
5067
|
serialize-javascript: 7.1.4
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
import { flushPromises, mount, type VueWrapper } from "@vue/test-utils";
|
|
3
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
import OnboardingDatabase from "../app/views/onboarding/OnboardingDatabase.vue";
|
|
5
|
+
import views from "../i18n/locales/dms-assistant-views-en-GB.json";
|
|
6
|
+
import {
|
|
7
|
+
createOnboardingHarness,
|
|
8
|
+
ONBOARDING_STUBS,
|
|
9
|
+
} from "./support/onboarding";
|
|
10
|
+
|
|
11
|
+
const builder = vi.hoisted(() => ({
|
|
12
|
+
projectModules: vi.fn<() => Promise<unknown>>(),
|
|
13
|
+
checkConnection: vi.fn<(engine: string, url: string) => Promise<unknown>>(),
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
vi.mock("../builder/app/runtime/api", () => ({
|
|
17
|
+
useBuilderApi: () => ({
|
|
18
|
+
projectModules: builder.projectModules,
|
|
19
|
+
checkConnection: builder.checkConnection,
|
|
20
|
+
failure: (error: unknown) => ({ detail: String(error) }),
|
|
21
|
+
}),
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
const PROJECT = {
|
|
25
|
+
modules: ["dms", "mongodb"],
|
|
26
|
+
self: "dms",
|
|
27
|
+
databasePins: [],
|
|
28
|
+
drivers: {
|
|
29
|
+
postgres: { package: "@antelopejs/postgres", version: ">=0.4.2 <0.5.0" },
|
|
30
|
+
mysql: { package: "@antelopejs/mysql", version: ">=0.2.4 <0.3.0" },
|
|
31
|
+
mongodb: { package: "@antelopejs/mongodb", version: "~1.8.5" },
|
|
32
|
+
rethinkdb: { package: "@antelopejs/rethinkdb", version: "~1.10.4" },
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const REASON = "Install @antelopejs/postgres to connect a PostgreSQL database.";
|
|
37
|
+
const COMMAND =
|
|
38
|
+
'pnpm add --save-prefix=~ "@antelopejs/postgres@>=0.4.2 <0.5.0"';
|
|
39
|
+
const MISSING_DRIVER = {
|
|
40
|
+
reachable: false,
|
|
41
|
+
canRead: false,
|
|
42
|
+
canWrite: false,
|
|
43
|
+
reason: REASON,
|
|
44
|
+
install: { package: "@antelopejs/postgres", command: COMMAND },
|
|
45
|
+
};
|
|
46
|
+
const TEXT = views.dms_assistant.views.onboarding.database;
|
|
47
|
+
|
|
48
|
+
let wrapper: VueWrapper | undefined;
|
|
49
|
+
|
|
50
|
+
async function checked(): Promise<VueWrapper> {
|
|
51
|
+
builder.projectModules.mockResolvedValue(PROJECT);
|
|
52
|
+
const harness = createOnboardingHarness();
|
|
53
|
+
wrapper = mount(OnboardingDatabase, {
|
|
54
|
+
global: { provide: harness.provide, stubs: ONBOARDING_STUBS },
|
|
55
|
+
});
|
|
56
|
+
await flushPromises();
|
|
57
|
+
await wrapper.find("input").setValue("postgres://app@db.example.com/shop");
|
|
58
|
+
await wrapper.find("input").trigger("keydown", { key: "Enter" });
|
|
59
|
+
await flushPromises();
|
|
60
|
+
return wrapper;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function connectButton(picker: VueWrapper): HTMLButtonElement {
|
|
64
|
+
const found = picker
|
|
65
|
+
.findAll<HTMLButtonElement>("button")
|
|
66
|
+
.find((candidate) => candidate.text() === TEXT.connect);
|
|
67
|
+
if (found === undefined) throw new Error("no Connect button");
|
|
68
|
+
return found.element;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
afterEach(() => {
|
|
72
|
+
wrapper?.unmount();
|
|
73
|
+
wrapper = undefined;
|
|
74
|
+
builder.projectModules.mockReset();
|
|
75
|
+
builder.checkConnection.mockReset();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
describe("a check that finds no driver", () => {
|
|
79
|
+
/** Fails on a missing driver shown as an unreachable server, without the install command or the way to retry. */
|
|
80
|
+
it("shows the sentence, the install command and how to retry", async () => {
|
|
81
|
+
builder.checkConnection.mockResolvedValue(MISSING_DRIVER);
|
|
82
|
+
const picker = await checked();
|
|
83
|
+
const reachable = picker.find('[data-check="reachable"]');
|
|
84
|
+
expect(reachable.attributes("data-status")).toBe("failed");
|
|
85
|
+
expect(reachable.text()).toContain(REASON);
|
|
86
|
+
expect(reachable.text()).not.toContain("Server not reachable");
|
|
87
|
+
expect(picker.find("[data-driver-install] code").text()).toBe(COMMAND);
|
|
88
|
+
expect(picker.find("[data-driver-install]").text()).toContain(
|
|
89
|
+
TEXT.install_retry,
|
|
90
|
+
);
|
|
91
|
+
expect(connectButton(picker).disabled).toBe(false);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/** Fails on a retry that does not run the check again, or keeps the install step once the driver loads. */
|
|
95
|
+
it("runs the check again on Connect and drops the install step once the driver loads", async () => {
|
|
96
|
+
builder.checkConnection.mockResolvedValueOnce(MISSING_DRIVER);
|
|
97
|
+
builder.checkConnection.mockResolvedValueOnce({
|
|
98
|
+
reachable: false,
|
|
99
|
+
canRead: false,
|
|
100
|
+
canWrite: false,
|
|
101
|
+
reason: "Nothing is listening at this host and port.",
|
|
102
|
+
});
|
|
103
|
+
const picker = await checked();
|
|
104
|
+
connectButton(picker).click();
|
|
105
|
+
await flushPromises();
|
|
106
|
+
expect(builder.checkConnection).toHaveBeenCalledTimes(2);
|
|
107
|
+
expect(picker.find("[data-driver-install]").exists()).toBe(false);
|
|
108
|
+
expect(picker.find('[data-check="reachable"]').text()).toContain(
|
|
109
|
+
"Nothing is listening at this host and port.",
|
|
110
|
+
);
|
|
111
|
+
});
|
|
112
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-assistant",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Development assistant for the AntelopeJS DMS: a chat panel and coding agent that edit the project in reviewable, undoable change sets, and an onboarding that starts a project from scratch or from a database you already run.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"@antelopejs/agent-skills": ">=0.3.0 <0.4.0",
|
|
89
|
-
"@antelopejs/dms": ">=0.20.
|
|
89
|
+
"@antelopejs/dms": ">=0.20.5 <0.21.0",
|
|
90
90
|
"@antelopejs/interface-api": ">=0.3.3 <0.4.0",
|
|
91
91
|
"@antelopejs/interface-core": ">=0.5.1 <0.6.0",
|
|
92
92
|
"@antelopejs/interface-dms": ">=0.14.0 <0.15.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"zod": "^4.0.0"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@antelopejs/core": "~1.
|
|
101
|
+
"@antelopejs/core": "~1.24.0",
|
|
102
102
|
"@antelopejs/interface-data-api": ">=0.8.0 <0.9.0",
|
|
103
103
|
"@antelopejs/interface-database-decorators": ">=0.5.2 <0.6.0",
|
|
104
104
|
"@antelopejs/tooling-configs": ">=0.7.1 <0.8.0",
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
type Environment = Record<string, string | undefined>;
|
|
2
|
+
export declare function caselessGlob(text: string): string;
|
|
2
3
|
export declare function isSecretFile(filePath: string): boolean;
|
|
3
4
|
export declare function reachesSecretFile(filePath: string, cwd: string): Promise<boolean>;
|
|
5
|
+
export declare function globReachesSecretFile(pattern: string): boolean;
|
|
6
|
+
export declare const SECRET_FILE_SEARCH_EXCLUSIONS: readonly string[];
|
|
4
7
|
export declare function agentEnvironment(baseEnv: Environment, projectRoot: string): {
|
|
5
8
|
[k: string]: string | undefined;
|
|
6
9
|
};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { readdirSync, readFileSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
2
|
+
import { join, matchesGlob } from "node:path";
|
|
3
3
|
import { parseEnv } from "node:util";
|
|
4
|
-
import { AGENT_REQUIRED_ENV_NAMES, SECRET_FILE_NAME, SECRET_FILE_NAME_PREFIX, SECRET_FILE_TEMPLATE_NAMES, } from "../constants/project-secrets.js";
|
|
4
|
+
import { AGENT_REQUIRED_ENV_NAMES, SECRET_FILE_NAME, SECRET_FILE_NAME_PREFIX, SECRET_FILE_SAMPLE_NAME, SECRET_FILE_TEMPLATE_NAMES, } from "../constants/project-secrets.js";
|
|
5
5
|
import { writeTarget } from "./write-target.js";
|
|
6
6
|
const PATH_SEPARATOR = /[\\/]/;
|
|
7
|
+
const GLOB_SYNTAX = /[*?[{]/;
|
|
8
|
+
export function caselessGlob(text) {
|
|
9
|
+
return text
|
|
10
|
+
.split("")
|
|
11
|
+
.map((character) => {
|
|
12
|
+
const lower = character.toLowerCase();
|
|
13
|
+
const upper = character.toUpperCase();
|
|
14
|
+
return lower === upper ? character : `[${lower}${upper}]`;
|
|
15
|
+
})
|
|
16
|
+
.join("");
|
|
17
|
+
}
|
|
7
18
|
export function isSecretFile(filePath) {
|
|
8
19
|
const name = (filePath.split(PATH_SEPARATOR).at(-1) ?? "").toLowerCase();
|
|
9
20
|
if (SECRET_FILE_TEMPLATE_NAMES.has(name))
|
|
@@ -16,6 +27,17 @@ export async function reachesSecretFile(filePath, cwd) {
|
|
|
16
27
|
const target = writeTarget(filePath, cwd);
|
|
17
28
|
return target === undefined || isSecretFile(target);
|
|
18
29
|
}
|
|
30
|
+
export function globReachesSecretFile(pattern) {
|
|
31
|
+
if (pattern.startsWith("!"))
|
|
32
|
+
return false;
|
|
33
|
+
const name = (pattern.split(PATH_SEPARATOR).at(-1) ?? "").toLowerCase();
|
|
34
|
+
const literalStart = name.split(GLOB_SYNTAX)[0] ?? "";
|
|
35
|
+
return [SECRET_FILE_NAME, SECRET_FILE_SAMPLE_NAME, literalStart].some((candidate) => isSecretFile(candidate) && matchesGlob(candidate, name));
|
|
36
|
+
}
|
|
37
|
+
export const SECRET_FILE_SEARCH_EXCLUSIONS = [
|
|
38
|
+
SECRET_FILE_NAME,
|
|
39
|
+
`${SECRET_FILE_NAME_PREFIX}*`,
|
|
40
|
+
].map((glob) => `!${caselessGlob(glob)}`);
|
|
19
41
|
function readSecretFile(path) {
|
|
20
42
|
try {
|
|
21
43
|
return readFileSync(path, "utf8");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-secrets.js","sourceRoot":"","sources":["../../src/agent/project-secrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"project-secrets.js","sourceRoot":"","sources":["../../src/agent/project-secrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,cAAc,GAAG,OAAO,CAAC;AAC/B,MAAM,WAAW,GAAG,QAAQ,CAAC;AAG7B,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,IAAI;SACR,KAAK,CAAC,EAAE,CAAC;SACT,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;QACjB,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;QACtC,OAAO,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,KAAK,GAAG,CAAC;IAC5D,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CA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AAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAC9D,CACF,CAAC;AACJ,CAAC;AAOD,MAAM,UAAU,gBAAgB,CAAC,OAAoB,EAAE,WAAmB;IACxE,OAAO,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const SECRET_FILE_NAME = ".env";
|
|
2
2
|
export declare const SECRET_FILE_NAME_PREFIX = ".env.";
|
|
3
|
+
export declare const SECRET_FILE_SAMPLE_NAME = ".env.local";
|
|
4
|
+
export declare const SEARCH_TOOL_GLOB_KEYS: ReadonlyMap<string, "glob" | "pattern">;
|
|
3
5
|
export declare const SECRET_FILE_TEMPLATE_NAMES: ReadonlySet<string>;
|
|
4
6
|
export declare const AGENT_REQUIRED_ENV_NAMES: ReadonlySet<string>;
|
|
5
7
|
export declare const SECRET_FILE_DENIED_MESSAGE = "Values in .env are kept from the assistant, so it may not read or change this file. Use the variable names from the project configuration, or from .env.example when there is one, and ask the user for the values.";
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export const SECRET_FILE_NAME = ".env";
|
|
2
2
|
export const SECRET_FILE_NAME_PREFIX = ".env.";
|
|
3
|
+
export const SECRET_FILE_SAMPLE_NAME = ".env.local";
|
|
4
|
+
export const SEARCH_TOOL_GLOB_KEYS = new Map([
|
|
5
|
+
["Grep", "glob"],
|
|
6
|
+
["Glob", "pattern"],
|
|
7
|
+
]);
|
|
3
8
|
export const SECRET_FILE_TEMPLATE_NAMES = new Set([
|
|
4
9
|
".env.example",
|
|
5
10
|
".env.sample",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-secrets.js","sourceRoot":"","sources":["../../src/constants/project-secrets.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"project-secrets.js","sourceRoot":"","sources":["../../src/constants/project-secrets.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;AAG/C,MAAM,CAAC,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAGpD,MAAM,CAAC,MAAM,qBAAqB,GAChC,IAAI,GAAG,CAAC;IACN,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,MAAM,EAAE,SAAS,CAAC;CACpB,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,0BAA0B,GAAwB,IAAI,GAAG,CAAC;IACrE,cAAc;IACd,aAAa;IACb,eAAe;CAChB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAC;IACnE,mBAAmB;IACnB,sBAAsB;IACtB,yBAAyB;IACzB,MAAM;IACN,MAAM;IACN,YAAY;IACZ,aAAa;IACb,UAAU;IACV,WAAW;CACZ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GACrC,qNAAqN,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join } from "node:path";
|
|
1
3
|
import { z } from "zod";
|
|
2
|
-
import { reachesSecretFile } from "../../agent/project-secrets.js";
|
|
4
|
+
import { globReachesSecretFile, reachesSecretFile, SECRET_FILE_SEARCH_EXCLUSIONS, } from "../../agent/project-secrets.js";
|
|
3
5
|
import { PRE_TOOL_USE_HOOK_EVENT } from "../../constants/claude.js";
|
|
4
6
|
import { SDK_PERMISSION_BEHAVIOR } from "../../constants/permissions.js";
|
|
5
|
-
import { SECRET_FILE_DENIED_MESSAGE } from "../../constants/project-secrets.js";
|
|
7
|
+
import { SEARCH_TOOL_GLOB_KEYS, SECRET_FILE_DENIED_MESSAGE, } from "../../constants/project-secrets.js";
|
|
6
8
|
const SECRET_FILE_DENIAL = {
|
|
7
9
|
hookSpecificOutput: {
|
|
8
10
|
hookEventName: PRE_TOOL_USE_HOOK_EVENT,
|
|
@@ -11,33 +13,81 @@ const SECRET_FILE_DENIAL = {
|
|
|
11
13
|
},
|
|
12
14
|
};
|
|
13
15
|
const NO_DECISION = { continue: true };
|
|
16
|
+
const GREP_TOOL_NAME = "Grep";
|
|
14
17
|
const optionalString = z.string().optional().catch(undefined);
|
|
15
18
|
const toolCallSchema = z.object({
|
|
16
19
|
cwd: optionalString,
|
|
20
|
+
tool_name: z.string().catch(""),
|
|
17
21
|
tool_input: z
|
|
18
22
|
.looseObject({
|
|
19
23
|
file_path: optionalString,
|
|
20
24
|
path: optionalString,
|
|
21
25
|
notebook_path: optionalString,
|
|
26
|
+
glob: optionalString,
|
|
27
|
+
pattern: optionalString,
|
|
22
28
|
})
|
|
23
29
|
.default({}),
|
|
24
30
|
});
|
|
25
|
-
|
|
31
|
+
const HOME_PREFIX = "~/";
|
|
32
|
+
function asTheCliReadsIt(path) {
|
|
33
|
+
const trimmed = path.trim();
|
|
34
|
+
if (trimmed === "~")
|
|
35
|
+
return homedir();
|
|
36
|
+
return trimmed.startsWith(HOME_PREFIX)
|
|
37
|
+
? join(homedir(), trimmed.slice(HOME_PREFIX.length))
|
|
38
|
+
: trimmed;
|
|
39
|
+
}
|
|
40
|
+
async function pathReachesSecret({ cwd, tool_input, }) {
|
|
26
41
|
const paths = [
|
|
27
42
|
tool_input.file_path,
|
|
28
43
|
tool_input.path,
|
|
29
44
|
tool_input.notebook_path,
|
|
30
45
|
];
|
|
31
46
|
const checks = paths.map(async (path) => path !== undefined &&
|
|
32
|
-
(await reachesSecretFile(path, cwd ?? process.cwd())));
|
|
47
|
+
(await reachesSecretFile(asTheCliReadsIt(path), cwd ?? process.cwd())));
|
|
33
48
|
return (await Promise.all(checks)).some(Boolean);
|
|
34
49
|
}
|
|
50
|
+
function searchGlob({ tool_name, tool_input }) {
|
|
51
|
+
const key = SEARCH_TOOL_GLOB_KEYS.get(tool_name);
|
|
52
|
+
return key === undefined ? undefined : tool_input[key];
|
|
53
|
+
}
|
|
54
|
+
function globPatterns(glob) {
|
|
55
|
+
return glob
|
|
56
|
+
.split(/\s+/)
|
|
57
|
+
.flatMap((pattern) => pattern.includes("{") && pattern.includes("}")
|
|
58
|
+
? [pattern]
|
|
59
|
+
: pattern.split(","))
|
|
60
|
+
.filter((pattern) => pattern !== "");
|
|
61
|
+
}
|
|
62
|
+
function globReachesSecret(call) {
|
|
63
|
+
const glob = searchGlob(call);
|
|
64
|
+
return glob !== undefined && globPatterns(glob).some(globReachesSecretFile);
|
|
65
|
+
}
|
|
66
|
+
function grepWithoutSecretFiles(call) {
|
|
67
|
+
const glob = [searchGlob(call), ...SECRET_FILE_SEARCH_EXCLUSIONS]
|
|
68
|
+
.filter((pattern) => pattern !== undefined)
|
|
69
|
+
.join(" ");
|
|
70
|
+
return {
|
|
71
|
+
hookSpecificOutput: {
|
|
72
|
+
hookEventName: PRE_TOOL_USE_HOOK_EVENT,
|
|
73
|
+
updatedInput: { ...call.tool_input, glob },
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
async function decide(call) {
|
|
78
|
+
if (globReachesSecret(call) || (await pathReachesSecret(call))) {
|
|
79
|
+
return SECRET_FILE_DENIAL;
|
|
80
|
+
}
|
|
81
|
+
return call.tool_name === GREP_TOOL_NAME
|
|
82
|
+
? grepWithoutSecretFiles(call)
|
|
83
|
+
: NO_DECISION;
|
|
84
|
+
}
|
|
35
85
|
export function withSecretFileGuard(hooks) {
|
|
36
86
|
const guard = async (input) => {
|
|
37
87
|
const parsed = toolCallSchema.safeParse(input);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
88
|
+
if (!parsed.success)
|
|
89
|
+
return NO_DECISION;
|
|
90
|
+
return decide(parsed.data).catch(() => SECRET_FILE_DENIAL);
|
|
41
91
|
};
|
|
42
92
|
return {
|
|
43
93
|
...hooks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-files.js","sourceRoot":"","sources":["../../../src/providers/claude/secret-files.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"secret-files.js","sourceRoot":"","sources":["../../../src/providers/claude/secret-files.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,6BAA6B,GAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EACL,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,oCAAoC,CAAC;AAG5C,MAAM,kBAAkB,GAAuB;IAC7C,kBAAkB,EAAE;QAClB,aAAa,EAAE,uBAAuB;QACtC,kBAAkB,EAAE,uBAAuB,CAAC,IAAI;QAChD,wBAAwB,EAAE,0BAA0B;KACrD;CACF,CAAC;AAEF,MAAM,WAAW,GAAuB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE3D,MAAM,cAAc,GAAG,MAAM,CAAC;AAE9B,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAE9D,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,GAAG,EAAE,cAAc;IACnB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,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C;IAC5B,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,KAAK,cAAc;QACtC,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,WAAW,CAAC;AAClB,CAAC;AAaD,MAAM,UAAU,mBAAmB,CAAC,KAAe;IACjD,MAAM,KAAK,GAAiB,KAAK,EAAE,KAAK,EAAE,EAAE;QAC1C,MAAM,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,CAAC,OAAO;YAAE,OAAO,WAAW,CAAC;QACxC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,CAAC;IAC7D,CAAC,CAAC;IACF,OAAO;QACL,GAAG,KAAK;QACR,CAAC,uBAAuB,CAAC,EAAE;YACzB,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAC;YACzC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE;SACnB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
+
import { caselessGlob as caseless } from "../../agent/project-secrets.js";
|
|
1
2
|
import { SECRET_FILE_NAME, SECRET_FILE_NAME_PREFIX, SECRET_FILE_TEMPLATE_NAMES, } from "../../constants/project-secrets.js";
|
|
2
3
|
const TEMPLATE_SUFFIXES = [...SECRET_FILE_TEMPLATE_NAMES].map((name) => name.slice(SECRET_FILE_NAME_PREFIX.length));
|
|
3
|
-
function caseless(text) {
|
|
4
|
-
return text
|
|
5
|
-
.split("")
|
|
6
|
-
.map((character) => {
|
|
7
|
-
const lower = character.toLowerCase();
|
|
8
|
-
const upper = character.toUpperCase();
|
|
9
|
-
return lower === upper ? character : `[${lower}${upper}]`;
|
|
10
|
-
})
|
|
11
|
-
.join("");
|
|
12
|
-
}
|
|
13
4
|
function noneOf(characters) {
|
|
14
5
|
const cases = [...characters].flatMap((character) => [
|
|
15
6
|
character.toLowerCase(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-file-globs.js","sourceRoot":"","sources":["../../../src/providers/codex/secret-file-globs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,oCAAoC,CAAC;AAE5C,MAAM,iBAAiB,GAAG,CAAC,GAAG,0BAA0B,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACrE,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAC3C,CAAC;AAEF,SAAS,
|
|
1
|
+
{"version":3,"file":"secret-file-globs.js","sourceRoot":"","sources":["../../../src/providers/codex/secret-file-globs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,oCAAoC,CAAC;AAE5C,MAAM,iBAAiB,GAAG,CAAC,GAAG,0BAA0B,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACrE,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAC3C,CAAC;AAEF,SAAS,MAAM,CAAC,UAA+B;IAC7C,MAAM,KAAK,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC;QACnD,SAAS,CAAC,WAAW,EAAE;QACvB,SAAS,CAAC,WAAW,EAAE;KACxB,CAAC,CAAC;IACH,OAAO,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC;AAC9C,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,IAAI,GAAG,CACZ,iBAAiB,CAAC,MAAM,CAC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gB,CAAC;IAC1B,GAAG,WAAW,CAAC,EAAE,CAAC;CACnB,CAAC"}
|
package/sidecar/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"knip:all": "knip"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@antelopejs/dms": ">=0.20.
|
|
22
|
+
"@antelopejs/dms": ">=0.20.5 <0.21.0",
|
|
23
23
|
"@anthropic-ai/claude-agent-sdk": "^0.3.316",
|
|
24
24
|
"@anthropic-ai/claude-code": "^2.1.316",
|
|
25
25
|
"@modelcontextprotocol/sdk": "1.29.0",
|