@openma/deepseek-harness-acp 0.4.0 → 0.4.1
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/bridge.js +22 -0
- package/dist/index.js +23 -1
- package/package.json +1 -1
package/dist/bridge.js
CHANGED
|
@@ -960,6 +960,24 @@ async function apply(ctx, config = {}) {
|
|
|
960
960
|
};
|
|
961
961
|
const configOptions = async (record) => {
|
|
962
962
|
const result = [];
|
|
963
|
+
{
|
|
964
|
+
const permission = permissionService();
|
|
965
|
+
const levels = permission !== void 0 && permission.names.length > 0 ? permission.names.map((name3) => {
|
|
966
|
+
const spec = permission.resolve(name3);
|
|
967
|
+
return { value: name3, name: spec.name, description: spec.description };
|
|
968
|
+
}) : SANDBOX_MODES2.map((mode) => {
|
|
969
|
+
const label = MODE_LABELS[mode] ?? { name: mode, description: "" };
|
|
970
|
+
return { value: mode, name: label.name, description: label.description };
|
|
971
|
+
});
|
|
972
|
+
result.push({
|
|
973
|
+
type: "select",
|
|
974
|
+
id: "mode",
|
|
975
|
+
name: "Permissions",
|
|
976
|
+
category: "mode",
|
|
977
|
+
currentValue: record.modeId,
|
|
978
|
+
options: levels
|
|
979
|
+
});
|
|
980
|
+
}
|
|
963
981
|
const models = await modelChoices(record);
|
|
964
982
|
if (models.length >= 2) {
|
|
965
983
|
result.push({
|
|
@@ -1434,6 +1452,10 @@ async function apply(ctx, config = {}) {
|
|
|
1434
1452
|
const value = typeof params.value === "string" ? params.value : void 0;
|
|
1435
1453
|
if (value === void 0) throw invalidParams(`invalid value: ${String(params.value)}`);
|
|
1436
1454
|
switch (params.configId) {
|
|
1455
|
+
case "mode": {
|
|
1456
|
+
applyMode(record, params.sessionId, value);
|
|
1457
|
+
break;
|
|
1458
|
+
}
|
|
1437
1459
|
case "preset": {
|
|
1438
1460
|
await switchPreset(record, params.sessionId, value);
|
|
1439
1461
|
break;
|
package/dist/index.js
CHANGED
|
@@ -985,6 +985,24 @@ async function apply(ctx, config = {}) {
|
|
|
985
985
|
};
|
|
986
986
|
const configOptions = async (record) => {
|
|
987
987
|
const result = [];
|
|
988
|
+
{
|
|
989
|
+
const permission = permissionService();
|
|
990
|
+
const levels = permission !== void 0 && permission.names.length > 0 ? permission.names.map((name3) => {
|
|
991
|
+
const spec = permission.resolve(name3);
|
|
992
|
+
return { value: name3, name: spec.name, description: spec.description };
|
|
993
|
+
}) : SANDBOX_MODES2.map((mode) => {
|
|
994
|
+
const label = MODE_LABELS[mode] ?? { name: mode, description: "" };
|
|
995
|
+
return { value: mode, name: label.name, description: label.description };
|
|
996
|
+
});
|
|
997
|
+
result.push({
|
|
998
|
+
type: "select",
|
|
999
|
+
id: "mode",
|
|
1000
|
+
name: "Permissions",
|
|
1001
|
+
category: "mode",
|
|
1002
|
+
currentValue: record.modeId,
|
|
1003
|
+
options: levels
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
988
1006
|
const models = await modelChoices(record);
|
|
989
1007
|
if (models.length >= 2) {
|
|
990
1008
|
result.push({
|
|
@@ -1459,6 +1477,10 @@ async function apply(ctx, config = {}) {
|
|
|
1459
1477
|
const value = typeof params.value === "string" ? params.value : void 0;
|
|
1460
1478
|
if (value === void 0) throw invalidParams(`invalid value: ${String(params.value)}`);
|
|
1461
1479
|
switch (params.configId) {
|
|
1480
|
+
case "mode": {
|
|
1481
|
+
applyMode(record, params.sessionId, value);
|
|
1482
|
+
break;
|
|
1483
|
+
}
|
|
1462
1484
|
case "preset": {
|
|
1463
1485
|
await switchPreset(record, params.sessionId, value);
|
|
1464
1486
|
break;
|
|
@@ -2061,7 +2083,7 @@ async function bootAcpProfile(host, overrides) {
|
|
|
2061
2083
|
let rootConfigPath = join2(ownRoot(), "profile-root.cordis.yml");
|
|
2062
2084
|
let bareModuleBaseUrl = pathToFileURL2(dshDir + sep2).href;
|
|
2063
2085
|
const distBridge = join2(ownRoot(), "dist", "bridge.js");
|
|
2064
|
-
const bridgeEntry = existsSync2(distBridge) ?
|
|
2086
|
+
const bridgeEntry = import.meta.url.endsWith(".ts") || !existsSync2(distBridge) ? join2(ownRoot(), "src", "bundle.ts") : distBridge;
|
|
2065
2087
|
const realProfileDir = join2(home, "profiles", "acp");
|
|
2066
2088
|
if (existsSync2(join2(realProfileDir, "package.json"))) {
|
|
2067
2089
|
appBoot.healProfilesModuleFallback(dshPkgPath);
|