@dipoleml/dcode-cli 1.2.0 → 1.2.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/dcode.cjs
CHANGED
|
@@ -69653,6 +69653,102 @@ WHERE id IN (SELECT id FROM repairs);
|
|
|
69653
69653
|
}
|
|
69654
69654
|
});
|
|
69655
69655
|
|
|
69656
|
+
// ../adapters/dist/storage/session-store/migrations/0023-official-raven-model-rename.js
|
|
69657
|
+
var RAVEN_MODEL_RENAME_MIGRATION_SQL;
|
|
69658
|
+
var init_official_raven_model_rename = __esm({
|
|
69659
|
+
"../adapters/dist/storage/session-store/migrations/0023-official-raven-model-rename.js"() {
|
|
69660
|
+
"use strict";
|
|
69661
|
+
RAVEN_MODEL_RENAME_MIGRATION_SQL = `
|
|
69662
|
+
UPDATE session_entry
|
|
69663
|
+
SET data = json_set(data, '$.modelSelection.modelId',
|
|
69664
|
+
CASE lower(json_extract(data, '$.modelSelection.modelId'))
|
|
69665
|
+
WHEN 'raven-max' THEN 'raven-max'
|
|
69666
|
+
WHEN 'raven-flash' THEN 'raven-flash'
|
|
69667
|
+
ELSE json_extract(data, '$.modelSelection.modelId')
|
|
69668
|
+
END)
|
|
69669
|
+
WHERE json_valid(data) and json_type(data) = 'object'
|
|
69670
|
+
and json_type(data, '$.modelSelection') = 'object'
|
|
69671
|
+
and lower(coalesce(json_extract(data, '$.modelSelection.modelId'), '')) IN ('raven-max', 'raven-flash');
|
|
69672
|
+
|
|
69673
|
+
UPDATE message
|
|
69674
|
+
SET data = json_set(data, '$.modelSelection.modelId',
|
|
69675
|
+
CASE lower(json_extract(data, '$.modelSelection.modelId'))
|
|
69676
|
+
WHEN 'raven-max' THEN 'raven-max'
|
|
69677
|
+
WHEN 'raven-flash' THEN 'raven-flash'
|
|
69678
|
+
ELSE json_extract(data, '$.modelSelection.modelId')
|
|
69679
|
+
END)
|
|
69680
|
+
WHERE json_valid(data) and json_type(data) = 'object'
|
|
69681
|
+
and json_type(data, '$.modelSelection') = 'object'
|
|
69682
|
+
and lower(coalesce(json_extract(data, '$.modelSelection.modelId'), '')) IN ('raven-max', 'raven-flash');
|
|
69683
|
+
|
|
69684
|
+
UPDATE message
|
|
69685
|
+
SET data = json_set(data, '$.modelID',
|
|
69686
|
+
CASE lower(json_extract(data, '$.modelID'))
|
|
69687
|
+
WHEN 'raven-max' THEN 'raven-max'
|
|
69688
|
+
WHEN 'raven-flash' THEN 'raven-flash'
|
|
69689
|
+
ELSE json_extract(data, '$.modelID')
|
|
69690
|
+
END)
|
|
69691
|
+
WHERE json_valid(data) and json_type(data) = 'object'
|
|
69692
|
+
and lower(coalesce(json_extract(data, '$.modelID'), '')) IN ('raven-max', 'raven-flash');
|
|
69693
|
+
|
|
69694
|
+
UPDATE message
|
|
69695
|
+
SET data = json_set(data, '$.toModelSelection.modelId',
|
|
69696
|
+
CASE lower(json_extract(data, '$.toModelSelection.modelId'))
|
|
69697
|
+
WHEN 'raven-max' THEN 'raven-max'
|
|
69698
|
+
WHEN 'raven-flash' THEN 'raven-flash'
|
|
69699
|
+
ELSE json_extract(data, '$.toModelSelection.modelId')
|
|
69700
|
+
END)
|
|
69701
|
+
WHERE json_valid(data) and json_type(data) = 'object'
|
|
69702
|
+
and json_type(data, '$.toModelSelection') = 'object'
|
|
69703
|
+
and lower(coalesce(json_extract(data, '$.toModelSelection.modelId'), '')) IN ('raven-max', 'raven-flash');
|
|
69704
|
+
|
|
69705
|
+
UPDATE message
|
|
69706
|
+
SET data = json_set(data, '$.fromModelSelection.modelId',
|
|
69707
|
+
CASE lower(json_extract(data, '$.fromModelSelection.modelId'))
|
|
69708
|
+
WHEN 'raven-max' THEN 'raven-max'
|
|
69709
|
+
WHEN 'raven-flash' THEN 'raven-flash'
|
|
69710
|
+
ELSE json_extract(data, '$.fromModelSelection.modelId')
|
|
69711
|
+
END)
|
|
69712
|
+
WHERE json_valid(data) and json_type(data) = 'object'
|
|
69713
|
+
and json_type(data, '$.fromModelSelection') = 'object'
|
|
69714
|
+
and lower(coalesce(json_extract(data, '$.fromModelSelection.modelId'), '')) IN ('raven-max', 'raven-flash');
|
|
69715
|
+
|
|
69716
|
+
UPDATE message
|
|
69717
|
+
SET data = json_set(data, '$.model.modelID',
|
|
69718
|
+
CASE lower(json_extract(data, '$.model.modelID'))
|
|
69719
|
+
WHEN 'raven-max' THEN 'raven-max'
|
|
69720
|
+
WHEN 'raven-flash' THEN 'raven-flash'
|
|
69721
|
+
ELSE json_extract(data, '$.model.modelID')
|
|
69722
|
+
END)
|
|
69723
|
+
WHERE json_valid(data) and json_type(data) = 'object'
|
|
69724
|
+
and json_type(data, '$.model') = 'object'
|
|
69725
|
+
and lower(coalesce(json_extract(data, '$.model.modelID'), '')) IN ('raven-max', 'raven-flash');
|
|
69726
|
+
|
|
69727
|
+
UPDATE message
|
|
69728
|
+
SET data = json_set(data, '$.toModel.modelID',
|
|
69729
|
+
CASE lower(json_extract(data, '$.toModel.modelID'))
|
|
69730
|
+
WHEN 'raven-max' THEN 'raven-max'
|
|
69731
|
+
WHEN 'raven-flash' THEN 'raven-flash'
|
|
69732
|
+
ELSE json_extract(data, '$.toModel.modelID')
|
|
69733
|
+
END)
|
|
69734
|
+
WHERE json_valid(data) and json_type(data) = 'object'
|
|
69735
|
+
and json_type(data, '$.toModel') = 'object'
|
|
69736
|
+
and lower(coalesce(json_extract(data, '$.toModel.modelID'), '')) IN ('raven-max', 'raven-flash');
|
|
69737
|
+
|
|
69738
|
+
UPDATE message
|
|
69739
|
+
SET data = json_set(data, '$.fromModel.modelID',
|
|
69740
|
+
CASE lower(json_extract(data, '$.fromModel.modelID'))
|
|
69741
|
+
WHEN 'raven-max' THEN 'raven-max'
|
|
69742
|
+
WHEN 'raven-flash' THEN 'raven-flash'
|
|
69743
|
+
ELSE json_extract(data, '$.fromModel.modelID')
|
|
69744
|
+
END)
|
|
69745
|
+
WHERE json_valid(data) and json_type(data) = 'object'
|
|
69746
|
+
and json_type(data, '$.fromModel') = 'object'
|
|
69747
|
+
and lower(coalesce(json_extract(data, '$.fromModel.modelID'), '')) IN ('raven-max', 'raven-flash');
|
|
69748
|
+
`;
|
|
69749
|
+
}
|
|
69750
|
+
});
|
|
69751
|
+
|
|
69656
69752
|
// ../adapters/dist/storage/session-store/migrations.js
|
|
69657
69753
|
var SQLITE_MIGRATIONS;
|
|
69658
69754
|
var init_migrations = __esm({
|
|
@@ -69661,6 +69757,7 @@ var init_migrations = __esm({
|
|
|
69661
69757
|
init_provider_model_selection();
|
|
69662
69758
|
init_official_glm_selection();
|
|
69663
69759
|
init_backfilled_session_reasoning();
|
|
69760
|
+
init_official_raven_model_rename();
|
|
69664
69761
|
SQLITE_MIGRATIONS = [
|
|
69665
69762
|
{
|
|
69666
69763
|
appVersion: "0.2.0",
|
|
@@ -70579,6 +70676,11 @@ var init_migrations = __esm({
|
|
|
70579
70676
|
appVersion: "0.16.5",
|
|
70580
70677
|
id: "0022_backfilled_session_reasoning",
|
|
70581
70678
|
sql: BACKFILLED_SESSION_REASONING_MIGRATION_SQL
|
|
70679
|
+
},
|
|
70680
|
+
{
|
|
70681
|
+
appVersion: "1.2.1",
|
|
70682
|
+
id: "0023_official_raven_model_rename",
|
|
70683
|
+
sql: RAVEN_MODEL_RENAME_MIGRATION_SQL
|
|
70582
70684
|
}
|
|
70583
70685
|
];
|
|
70584
70686
|
}
|
|
@@ -70686,7 +70788,7 @@ function* migrationSteps(db, dbPath, lockTimeoutMs) {
|
|
|
70686
70788
|
const checksum = migrationChecksum(migration.sql);
|
|
70687
70789
|
const applied = readAppliedMigration(db, migration.id);
|
|
70688
70790
|
if (applied) {
|
|
70689
|
-
ensureMigrationChecksum(migration.id, applied.checksum,
|
|
70791
|
+
ensureMigrationChecksum(migration.id, applied.checksum, migration.sql, dbPath);
|
|
70690
70792
|
completed++;
|
|
70691
70793
|
continue;
|
|
70692
70794
|
}
|
|
@@ -70771,10 +70873,15 @@ function readAppliedMigration(db, id3) {
|
|
|
70771
70873
|
return db.prepare("select id, checksum from schema_migration where id = ?").get(id3);
|
|
70772
70874
|
}
|
|
70773
70875
|
function migrationChecksum(sql) {
|
|
70774
|
-
return (0, import_node_crypto11.createHash)("sha256").update(sql.trim()).digest("hex");
|
|
70876
|
+
return (0, import_node_crypto11.createHash)("sha256").update(sql.replace(/\r\n/g, "\n").trim()).digest("hex");
|
|
70775
70877
|
}
|
|
70776
|
-
function ensureMigrationChecksum(id3, applied,
|
|
70777
|
-
if (applied ===
|
|
70878
|
+
function ensureMigrationChecksum(id3, applied, sql, dbPath) {
|
|
70879
|
+
if (applied === migrationChecksum(sql))
|
|
70880
|
+
return;
|
|
70881
|
+
const crlfFlavor = (0, import_node_crypto11.createHash)("sha256").update(sql.replace(/\r\n/g, "\n").replace(/\n/g, "\r\n").trim()).digest("hex");
|
|
70882
|
+
if (applied === crlfFlavor)
|
|
70883
|
+
return;
|
|
70884
|
+
if (MIGRATION_ALIAS_CHECKSUMS[id3]?.includes(applied))
|
|
70778
70885
|
return;
|
|
70779
70886
|
throw new SqliteSessionMigrationError(`SQLite migration checksum mismatch for ${id3}. Historical migrations are immutable; add a new migration instead.`, {
|
|
70780
70887
|
dbPath,
|
|
@@ -70788,7 +70895,7 @@ function inspectMigrationKind(db, dbPath) {
|
|
|
70788
70895
|
for (const migration of SQLITE_MIGRATIONS) {
|
|
70789
70896
|
const row = hasLedger ? readAppliedMigration(db, migration.id) : void 0;
|
|
70790
70897
|
if (row)
|
|
70791
|
-
ensureMigrationChecksum(migration.id, row.checksum,
|
|
70898
|
+
ensureMigrationChecksum(migration.id, row.checksum, migration.sql, dbPath);
|
|
70792
70899
|
else
|
|
70793
70900
|
pending = true;
|
|
70794
70901
|
}
|
|
@@ -70797,7 +70904,7 @@ function inspectMigrationKind(db, dbPath) {
|
|
|
70797
70904
|
const hasDataTables = db.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name NOT IN ('schema_migration', 'sqlite_sequence') LIMIT 1").get();
|
|
70798
70905
|
return hasDataTables ? "upgrade" : "initialize";
|
|
70799
70906
|
}
|
|
70800
|
-
var import_node_crypto11, DEFAULT_SQLITE_STARTUP_LOCK_TIMEOUT_MS, SQLITE_BUSY, WAL_RETRY_INITIAL_DELAY_MS, WAL_RETRY_MAX_DELAY_MS, waitBuffer, DEFAULT_SQLITE_MIGRATION_WAIT_MS, ASYNC_NATIVE_BUSY_TIMEOUT_MS;
|
|
70907
|
+
var import_node_crypto11, DEFAULT_SQLITE_STARTUP_LOCK_TIMEOUT_MS, SQLITE_BUSY, WAL_RETRY_INITIAL_DELAY_MS, WAL_RETRY_MAX_DELAY_MS, waitBuffer, DEFAULT_SQLITE_MIGRATION_WAIT_MS, ASYNC_NATIVE_BUSY_TIMEOUT_MS, MIGRATION_ALIAS_CHECKSUMS;
|
|
70801
70908
|
var init_migration_runner = __esm({
|
|
70802
70909
|
"../adapters/dist/storage/session-store/migration-runner.js"() {
|
|
70803
70910
|
"use strict";
|
|
@@ -70812,6 +70919,20 @@ var init_migration_runner = __esm({
|
|
|
70812
70919
|
waitBuffer = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));
|
|
70813
70920
|
DEFAULT_SQLITE_MIGRATION_WAIT_MS = 60 * 6e4;
|
|
70814
70921
|
ASYNC_NATIVE_BUSY_TIMEOUT_MS = 25;
|
|
70922
|
+
MIGRATION_ALIAS_CHECKSUMS = {
|
|
70923
|
+
"0021_official_glm_selection": [
|
|
70924
|
+
"bb57ac77da3babad5821eb4346f9ea9c964f42f66e004a4d3f5550906b0f3d46",
|
|
70925
|
+
// GLM-era (tsc dist)
|
|
70926
|
+
"a87d3b138ab93ee6a7f4a4ab6afd0291efd9a8e903aaf5be838719dca1f419eb"
|
|
70927
|
+
// raven-scrubbed era
|
|
70928
|
+
],
|
|
70929
|
+
"0022_backfilled_session_reasoning": [
|
|
70930
|
+
"fdd5e7bbd65cacb695aeb838754761f16651a1af7d8867b2d218e8b993b45c4f",
|
|
70931
|
+
// GLM-era (tsc dist)
|
|
70932
|
+
"17cedf88f7e76a1d2e9910f39d6c699aaf8a4873e2a64491bac1513c48114b3c"
|
|
70933
|
+
// raven-scrubbed era
|
|
70934
|
+
]
|
|
70935
|
+
};
|
|
70815
70936
|
}
|
|
70816
70937
|
});
|
|
70817
70938
|
|
|
@@ -633123,7 +633244,7 @@ async function ensureSeaPlaywrightRuntime(sea) {
|
|
|
633123
633244
|
const manifest = readManifest3(sea);
|
|
633124
633245
|
const cacheDirectory = (0, import_node_path132.join)(
|
|
633125
633246
|
cacheBaseDirectory(),
|
|
633126
|
-
"1.2.
|
|
633247
|
+
"1.2.2",
|
|
633127
633248
|
manifest.target,
|
|
633128
633249
|
`playwright-${manifest.packageVersion}-${manifest.hash}`
|
|
633129
633250
|
);
|
|
@@ -635738,7 +635859,7 @@ var init_tui_runtime_loader = __esm({
|
|
|
635738
635859
|
const manifest = readManifest4(sea);
|
|
635739
635860
|
const cacheDirectory = (0, import_node_path135.join)(
|
|
635740
635861
|
cacheBaseDirectory2(),
|
|
635741
|
-
"1.2.
|
|
635862
|
+
"1.2.2",
|
|
635742
635863
|
manifest.target,
|
|
635743
635864
|
manifest.hash
|
|
635744
635865
|
);
|
|
@@ -636182,7 +636303,7 @@ var init_run = __esm({
|
|
|
636182
636303
|
init_skills_command();
|
|
636183
636304
|
init_tui_command();
|
|
636184
636305
|
init_workflow_mode();
|
|
636185
|
-
version3 = true ? "1.2.
|
|
636306
|
+
version3 = true ? "1.2.2" : "0.0.0";
|
|
636186
636307
|
EMPTY_TARGET_ERROR = "--target requires non-empty text.";
|
|
636187
636308
|
DEFAULT_HEADLESS_PROMPT_MODE = "yolo";
|
|
636188
636309
|
FORCE_MCS_SCOPE_ERROR = "--force-mcs can only be used with --prompt, --target, or tui.";
|
|
@@ -637194,7 +637315,7 @@ init_arguments();
|
|
|
637194
637315
|
|
|
637195
637316
|
// src/self-update.ts
|
|
637196
637317
|
var import_node_child_process = require("node:child_process");
|
|
637197
|
-
var CLI_VERSION = true ? "1.2.
|
|
637318
|
+
var CLI_VERSION = true ? "1.2.2" : "0.0.0";
|
|
637198
637319
|
var PACKAGE = "@dipoleml/dcode-cli";
|
|
637199
637320
|
var DIST_TAGS_URL = "https://registry.npmjs.org/-/package/@dipoleml%2Fdcode-cli/dist-tags";
|
|
637200
637321
|
var CHECK_TIMEOUT_MS = 1500;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dipoleml/dcode-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "DCode: the agentic coding CLI from DipoleML, powered by the raven model family.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dcode",
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
"dependencies": {
|
|
123
123
|
"@dcode/contracts": "0.1.0",
|
|
124
124
|
"@dcode/i18n": "0.1.0",
|
|
125
|
-
"@dcode/model-option-map": "1.2.
|
|
126
|
-
"@dcode/shared": "1.2.
|
|
125
|
+
"@dcode/model-option-map": "1.2.2",
|
|
126
|
+
"@dcode/shared": "1.2.2",
|
|
127
127
|
"@dcode/tui": "0.1.0",
|
|
128
128
|
"@mbears/opentui-core": "0.2.15",
|
|
129
129
|
"@mbears/opentui-core-darwin-arm64": "0.2.15",
|