@arcbridge/core 0.4.0 → 0.4.2
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/index.d.ts +9 -4
- package/dist/index.js +20 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ declare const ArcBridgeConfigSchema: z.ZodObject<{
|
|
|
43
43
|
tsconfig?: string | undefined;
|
|
44
44
|
csproj?: string | undefined;
|
|
45
45
|
}>, "many">>;
|
|
46
|
-
platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<["claude", "copilot", "gemini", "codex"]>, "many">>;
|
|
46
|
+
platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<["claude", "copilot", "gemini", "codex", "opencode"]>, "many">>;
|
|
47
47
|
quality_priorities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
48
48
|
indexing: z.ZodDefault<z.ZodObject<{
|
|
49
49
|
include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -109,7 +109,7 @@ declare const ArcBridgeConfigSchema: z.ZodObject<{
|
|
|
109
109
|
tsconfig?: string | undefined;
|
|
110
110
|
csproj?: string | undefined;
|
|
111
111
|
}[];
|
|
112
|
-
platforms: ("claude" | "copilot" | "gemini" | "codex")[];
|
|
112
|
+
platforms: ("claude" | "copilot" | "gemini" | "codex" | "opencode")[];
|
|
113
113
|
quality_priorities: string[];
|
|
114
114
|
indexing: {
|
|
115
115
|
include: string[];
|
|
@@ -143,7 +143,7 @@ declare const ArcBridgeConfigSchema: z.ZodObject<{
|
|
|
143
143
|
tsconfig?: string | undefined;
|
|
144
144
|
csproj?: string | undefined;
|
|
145
145
|
}[] | undefined;
|
|
146
|
-
platforms?: ("claude" | "copilot" | "gemini" | "codex")[] | undefined;
|
|
146
|
+
platforms?: ("claude" | "copilot" | "gemini" | "codex" | "opencode")[] | undefined;
|
|
147
147
|
quality_priorities?: string[] | undefined;
|
|
148
148
|
indexing?: {
|
|
149
149
|
include?: string[] | undefined;
|
|
@@ -668,14 +668,17 @@ declare const AgentRoleSchema: z.ZodObject<{
|
|
|
668
668
|
claude: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
669
669
|
copilot: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
670
670
|
codex: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
671
|
+
opencode: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
671
672
|
}, "strip", z.ZodTypeAny, {
|
|
672
673
|
claude?: Record<string, unknown> | undefined;
|
|
673
674
|
copilot?: Record<string, unknown> | undefined;
|
|
674
675
|
codex?: Record<string, unknown> | undefined;
|
|
676
|
+
opencode?: Record<string, unknown> | undefined;
|
|
675
677
|
}, {
|
|
676
678
|
claude?: Record<string, unknown> | undefined;
|
|
677
679
|
copilot?: Record<string, unknown> | undefined;
|
|
678
680
|
codex?: Record<string, unknown> | undefined;
|
|
681
|
+
opencode?: Record<string, unknown> | undefined;
|
|
679
682
|
}>>;
|
|
680
683
|
system_prompt: z.ZodString;
|
|
681
684
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -700,6 +703,7 @@ declare const AgentRoleSchema: z.ZodObject<{
|
|
|
700
703
|
claude?: Record<string, unknown> | undefined;
|
|
701
704
|
copilot?: Record<string, unknown> | undefined;
|
|
702
705
|
codex?: Record<string, unknown> | undefined;
|
|
706
|
+
opencode?: Record<string, unknown> | undefined;
|
|
703
707
|
};
|
|
704
708
|
system_prompt: string;
|
|
705
709
|
}, {
|
|
@@ -725,6 +729,7 @@ declare const AgentRoleSchema: z.ZodObject<{
|
|
|
725
729
|
claude?: Record<string, unknown> | undefined;
|
|
726
730
|
copilot?: Record<string, unknown> | undefined;
|
|
727
731
|
codex?: Record<string, unknown> | undefined;
|
|
732
|
+
opencode?: Record<string, unknown> | undefined;
|
|
728
733
|
} | undefined;
|
|
729
734
|
}>;
|
|
730
735
|
type AgentRole = z.infer<typeof AgentRoleSchema>;
|
|
@@ -743,7 +748,7 @@ declare function openMemoryDatabase(): Database;
|
|
|
743
748
|
*/
|
|
744
749
|
declare function transaction<T>(db: Database, fn: () => T): T;
|
|
745
750
|
|
|
746
|
-
declare const CURRENT_SCHEMA_VERSION =
|
|
751
|
+
declare const CURRENT_SCHEMA_VERSION = 4;
|
|
747
752
|
declare function initializeSchema(db: Database): void;
|
|
748
753
|
|
|
749
754
|
declare function migrate(db: Database): void;
|
package/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ var ArcBridgeConfigSchema = z2.object({
|
|
|
57
57
|
"angular-app"
|
|
58
58
|
]).default("nextjs-app-router"),
|
|
59
59
|
services: z2.array(ServiceSchema).default([]),
|
|
60
|
-
platforms: z2.array(z2.enum(["claude", "copilot", "gemini", "codex"])).default(["claude"]),
|
|
60
|
+
platforms: z2.array(z2.enum(["claude", "copilot", "gemini", "codex", "opencode"])).default(["claude"]),
|
|
61
61
|
quality_priorities: z2.array(QualityCategorySchema).default(["security", "performance", "accessibility"]).describe(QUALITY_PRIORITIES_DESCRIPTION),
|
|
62
62
|
indexing: z2.object({
|
|
63
63
|
include: z2.array(z2.string()).default(["src/**/*", "app/**/*"]),
|
|
@@ -195,7 +195,8 @@ var AgentRoleSchema = z6.object({
|
|
|
195
195
|
platform_overrides: z6.object({
|
|
196
196
|
claude: z6.record(z6.string(), z6.unknown()).optional(),
|
|
197
197
|
copilot: z6.record(z6.string(), z6.unknown()).optional(),
|
|
198
|
-
codex: z6.record(z6.string(), z6.unknown()).optional()
|
|
198
|
+
codex: z6.record(z6.string(), z6.unknown()).optional(),
|
|
199
|
+
opencode: z6.record(z6.string(), z6.unknown()).optional()
|
|
199
200
|
}).default({}),
|
|
200
201
|
// The markdown body (system prompt) is stored separately
|
|
201
202
|
system_prompt: z6.string().min(1)
|
|
@@ -292,7 +293,7 @@ function transaction(db, fn) {
|
|
|
292
293
|
}
|
|
293
294
|
|
|
294
295
|
// src/db/schema.ts
|
|
295
|
-
var CURRENT_SCHEMA_VERSION =
|
|
296
|
+
var CURRENT_SCHEMA_VERSION = 4;
|
|
296
297
|
var SCHEMA_SQL = `
|
|
297
298
|
-- Metadata
|
|
298
299
|
CREATE TABLE IF NOT EXISTS arcbridge_meta (
|
|
@@ -447,6 +448,9 @@ CREATE TABLE IF NOT EXISTS tasks (
|
|
|
447
448
|
completed_at TEXT
|
|
448
449
|
);
|
|
449
450
|
|
|
451
|
+
CREATE INDEX IF NOT EXISTS idx_tasks_phase ON tasks(phase_id);
|
|
452
|
+
CREATE INDEX IF NOT EXISTS idx_phases_status ON phases(status);
|
|
453
|
+
|
|
450
454
|
CREATE TABLE IF NOT EXISTS drift_log (
|
|
451
455
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
452
456
|
detected_at TEXT NOT NULL,
|
|
@@ -560,6 +564,15 @@ var migrations = [
|
|
|
560
564
|
ALTER TABLE tasks_new RENAME TO tasks;
|
|
561
565
|
`);
|
|
562
566
|
}
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
version: 4,
|
|
570
|
+
up: (db) => {
|
|
571
|
+
db.exec(`
|
|
572
|
+
CREATE INDEX IF NOT EXISTS idx_tasks_phase ON tasks(phase_id);
|
|
573
|
+
CREATE INDEX IF NOT EXISTS idx_phases_status ON phases(status);
|
|
574
|
+
`);
|
|
575
|
+
}
|
|
563
576
|
}
|
|
564
577
|
];
|
|
565
578
|
function migrate(db) {
|
|
@@ -7593,7 +7606,7 @@ function detectMissingModules(db, entries) {
|
|
|
7593
7606
|
const paths = safeParseJson(block.code_paths, []);
|
|
7594
7607
|
for (const cp of paths) {
|
|
7595
7608
|
const prefix = normalizePath(cp);
|
|
7596
|
-
const match = db.prepare("SELECT 1 FROM symbols WHERE file_path LIKE ? LIMIT 1").get(`${escapeLike(prefix)}%`);
|
|
7609
|
+
const match = db.prepare("SELECT 1 FROM symbols WHERE file_path LIKE ? ESCAPE '\\' LIMIT 1").get(`${escapeLike(prefix)}%`);
|
|
7597
7610
|
if (!match) {
|
|
7598
7611
|
entries.push({
|
|
7599
7612
|
kind: "missing_module",
|
|
@@ -7697,7 +7710,7 @@ function detectStaleAdrs(db, entries) {
|
|
|
7697
7710
|
if (files.length === 0) continue;
|
|
7698
7711
|
for (const file of files) {
|
|
7699
7712
|
const prefix = normalizePath(file);
|
|
7700
|
-
const match = db.prepare("SELECT 1 FROM symbols WHERE file_path LIKE ? LIMIT 1").get(`${escapeLike(prefix)}%`);
|
|
7713
|
+
const match = db.prepare("SELECT 1 FROM symbols WHERE file_path LIKE ? ESCAPE '\\' LIMIT 1").get(`${escapeLike(prefix)}%`);
|
|
7701
7714
|
if (!match) {
|
|
7702
7715
|
entries.push({
|
|
7703
7716
|
kind: "stale_adr",
|
|
@@ -7781,7 +7794,7 @@ function fileMatchesPath(filePath, prefix) {
|
|
|
7781
7794
|
return filePath === prefix || filePath.startsWith(prefix);
|
|
7782
7795
|
}
|
|
7783
7796
|
function escapeLike(value) {
|
|
7784
|
-
return value.replace(/%/g, "\\%").replace(/_/g, "\\_");
|
|
7797
|
+
return value.replace(/\\/g, "\\\\").replace(/%/g, "\\%").replace(/_/g, "\\_");
|
|
7785
7798
|
}
|
|
7786
7799
|
function safeParseJson(value, fallback) {
|
|
7787
7800
|
if (value === null || value === void 0) return fallback;
|
|
@@ -8096,7 +8109,7 @@ function inferSingleTask(db, task) {
|
|
|
8096
8109
|
return null;
|
|
8097
8110
|
}
|
|
8098
8111
|
function escapeLike2(value) {
|
|
8099
|
-
return value.replace(/%/g, "\\%").replace(/_/g, "\\_");
|
|
8112
|
+
return value.replace(/\\/g, "\\\\").replace(/%/g, "\\%").replace(/_/g, "\\_");
|
|
8100
8113
|
}
|
|
8101
8114
|
function safeParseJson2(value, fallback) {
|
|
8102
8115
|
if (value === null || value === void 0) return fallback;
|