@adaptiqai/deepseek-harness 0.2.11 → 0.2.12
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 +2 -0
- package/lib/client.js +1 -1
- package/lib/host.js +183 -25
- package/lib/types/host/release-age.d.ts +57 -0
- package/package.json +10 -10
package/lib/host.js
CHANGED
|
@@ -17,7 +17,7 @@ var __runInitializers = (array, flags, self, value) => {
|
|
|
17
17
|
return value;
|
|
18
18
|
};
|
|
19
19
|
var __decorateElement = (array, flags, name2, decorators, target, extra) => {
|
|
20
|
-
var fn, it, done, ctx,
|
|
20
|
+
var fn, it, done, ctx, access2, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
|
|
21
21
|
var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
|
|
22
22
|
var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
|
|
23
23
|
var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name2]() {
|
|
@@ -29,9 +29,9 @@ var __decorateElement = (array, flags, name2, decorators, target, extra) => {
|
|
|
29
29
|
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
30
30
|
ctx = __decoratorContext(k, name2, done = {}, array[3], extraInitializers);
|
|
31
31
|
if (k) {
|
|
32
|
-
ctx.static = s, ctx.private = p,
|
|
33
|
-
if (k ^ 3)
|
|
34
|
-
if (k > 2)
|
|
32
|
+
ctx.static = s, ctx.private = p, access2 = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name2 in x };
|
|
33
|
+
if (k ^ 3) access2.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name2];
|
|
34
|
+
if (k > 2) access2.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name2] = y;
|
|
35
35
|
}
|
|
36
36
|
it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
|
|
37
37
|
if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
|
|
@@ -491,13 +491,13 @@ var AuthManager = class {
|
|
|
491
491
|
if (!response.ok)
|
|
492
492
|
throw new Error(`AdaptiqAI could not refresh the sign-in (HTTP ${response.status}).`);
|
|
493
493
|
const body = await readJson(response);
|
|
494
|
-
const
|
|
494
|
+
const access2 = String(body?.access_token ?? "");
|
|
495
495
|
const refresh = String(body?.refresh_token ?? "");
|
|
496
|
-
if (!
|
|
496
|
+
if (!access2.startsWith("ak_") || !refresh.startsWith("akr_"))
|
|
497
497
|
throw new Error("AdaptiqAI returned an invalid refreshed credential.");
|
|
498
498
|
return {
|
|
499
499
|
...current,
|
|
500
|
-
access,
|
|
500
|
+
access: access2,
|
|
501
501
|
refresh,
|
|
502
502
|
expiresAt: this.now() + Math.max(60, Number(body?.expires_in ?? 3600)) * 1e3,
|
|
503
503
|
workspaceLabel: typeof body?.workspace_label === "string" && body.workspace_label !== "" ? body.workspace_label : current.workspaceLabel
|
|
@@ -627,9 +627,9 @@ var AuthManager = class {
|
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
629
629
|
const body = await readJson(response);
|
|
630
|
-
const
|
|
630
|
+
const access2 = String(body?.access_token ?? "");
|
|
631
631
|
const refresh = String(body?.refresh_token ?? "");
|
|
632
|
-
if (!
|
|
632
|
+
if (!access2.startsWith("ak_") || !refresh.startsWith("akr_")) {
|
|
633
633
|
this.fail(flow, { code: "failed", message: "AdaptiqAI returned an invalid credential." });
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
@@ -637,7 +637,7 @@ var AuthManager = class {
|
|
|
637
637
|
const grant = {
|
|
638
638
|
schema: "adaptiq-dsh-grant-v1",
|
|
639
639
|
apiBase: this.options.apiBase,
|
|
640
|
-
access,
|
|
640
|
+
access: access2,
|
|
641
641
|
refresh,
|
|
642
642
|
clientProof,
|
|
643
643
|
expiresAt: this.now() + Math.max(60, Number(body?.expires_in ?? 3600)) * 1e3,
|
|
@@ -1783,9 +1783,9 @@ function isYes(reply) {
|
|
|
1783
1783
|
const name2 = reply.slice(at).replace(/^[,,::;;.。]\s*/u, "");
|
|
1784
1784
|
return YES_PHRASES.has(words(reply.slice(0, at))) && NAMED.test(name2);
|
|
1785
1785
|
}
|
|
1786
|
-
function createRefusal(
|
|
1787
|
-
const reason = typeof
|
|
1788
|
-
const owners = [].concat(
|
|
1786
|
+
function createRefusal(access2) {
|
|
1787
|
+
const reason = typeof access2?.reason === "string" ? access2.reason : null;
|
|
1788
|
+
const owners = [].concat(access2?.owners ?? access2?.owner ?? []).map((owner) => typeof owner === "string" ? owner : typeof owner?.name === "string" ? owner.name : typeof owner?.email === "string" ? owner.email : "").filter((owner) => owner !== "");
|
|
1789
1789
|
const ask = owners.length === 0 ? "ask a workspace owner" : `ask ${owners.join(" or ")}`;
|
|
1790
1790
|
switch (reason) {
|
|
1791
1791
|
case "role":
|
|
@@ -2505,9 +2505,10 @@ var Workspace = class {
|
|
|
2505
2505
|
};
|
|
2506
2506
|
}
|
|
2507
2507
|
/**
|
|
2508
|
-
* Read the newest published version. It is announced
|
|
2509
|
-
*
|
|
2510
|
-
*
|
|
2508
|
+
* Read the newest published version. It is announced at once where the
|
|
2509
|
+
* plugin installs it itself and the harness exempts it from its package
|
|
2510
|
+
* manager's wait; otherwise only once it is old enough (pnpm refuses a
|
|
2511
|
+
* version younger than a day), and the check comes back when it is.
|
|
2511
2512
|
*/
|
|
2512
2513
|
async checkForUpdate() {
|
|
2513
2514
|
if (!this.deps.updateCheck || this.now() - this.updateCheckedAt < 24 * 36e5)
|
|
@@ -2526,7 +2527,7 @@ var Workspace = class {
|
|
|
2526
2527
|
const published = Date.parse(str4(obj4(body.time)?.[version]) ?? "");
|
|
2527
2528
|
if (!Number.isFinite(published))
|
|
2528
2529
|
return;
|
|
2529
|
-
if (this.now() - published < RELEASE_AGE_MS) {
|
|
2530
|
+
if (this.now() - published < RELEASE_AGE_MS && !await this.installsFreshReleases()) {
|
|
2530
2531
|
this.updateCheckedAt = published + RELEASE_AGE_MS - 24 * 36e5 + 6e4;
|
|
2531
2532
|
return;
|
|
2532
2533
|
}
|
|
@@ -2536,6 +2537,13 @@ var Workspace = class {
|
|
|
2536
2537
|
} catch {
|
|
2537
2538
|
}
|
|
2538
2539
|
}
|
|
2540
|
+
/** Whether the one-click update installs a release younger than the package manager's wait. */
|
|
2541
|
+
async installsFreshReleases() {
|
|
2542
|
+
const updater = this.deps.updater;
|
|
2543
|
+
if (updater?.canInstall !== true || updater.installsFreshReleases === void 0)
|
|
2544
|
+
return false;
|
|
2545
|
+
return await updater.installsFreshReleases().catch(() => false);
|
|
2546
|
+
}
|
|
2539
2547
|
/** The update toast: once a newer version is out and not installed yet. */
|
|
2540
2548
|
announceUpdate() {
|
|
2541
2549
|
const plugin = this.pluginState();
|
|
@@ -2742,11 +2750,11 @@ var Workspace = class {
|
|
|
2742
2750
|
* Waits while no model is running yet; never fails a refresh.
|
|
2743
2751
|
*/
|
|
2744
2752
|
async applyFirstDefault() {
|
|
2745
|
-
const
|
|
2746
|
-
if (this.state.defaultModel !== "pending" ||
|
|
2753
|
+
const access2 = this.deps.defaultModel;
|
|
2754
|
+
if (this.state.defaultModel !== "pending" || access2 === void 0)
|
|
2747
2755
|
return;
|
|
2748
2756
|
try {
|
|
2749
|
-
const current =
|
|
2757
|
+
const current = access2.current();
|
|
2750
2758
|
if (current === void 0)
|
|
2751
2759
|
return;
|
|
2752
2760
|
let choice = firstDefaultModel(current, this.deps.route, this.catalog);
|
|
@@ -2764,7 +2772,7 @@ var Workspace = class {
|
|
|
2764
2772
|
}
|
|
2765
2773
|
if (choice === null)
|
|
2766
2774
|
return;
|
|
2767
|
-
await
|
|
2775
|
+
await access2.save(choice);
|
|
2768
2776
|
this.deps.log?.("info", `adaptiq: default model set to ${choice.model}`);
|
|
2769
2777
|
} catch (error) {
|
|
2770
2778
|
this.deps.log?.("warn", `adaptiq: could not set the default model: ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -3815,9 +3823,9 @@ var Workspace = class {
|
|
|
3815
3823
|
if (this.memoryModel(session) === void 0)
|
|
3816
3824
|
await this.ensureModels().catch(() => {
|
|
3817
3825
|
});
|
|
3818
|
-
const
|
|
3819
|
-
if (
|
|
3820
|
-
throw new Error(createRefusal(
|
|
3826
|
+
const access2 = await this.deps.api.json("/v1/cli-auth/knowledge/status", { allow: [404] }).catch(() => null);
|
|
3827
|
+
if (access2 !== null && access2.create_allowed === false)
|
|
3828
|
+
throw new Error(createRefusal(access2));
|
|
3821
3829
|
const body = await this.deps.api.json("/v1/memories", {
|
|
3822
3830
|
method: "POST",
|
|
3823
3831
|
headers: { ...this.memoryHeaders(session), "idempotency-key": idempotencyKey },
|
|
@@ -5881,6 +5889,150 @@ ${hash}`).digest("hex").slice(0, 48);
|
|
|
5881
5889
|
})), "adaptiq: adaptiq_create_knowledge tool");
|
|
5882
5890
|
}
|
|
5883
5891
|
|
|
5892
|
+
// src/host/release-age.ts
|
|
5893
|
+
import { constants } from "node:fs";
|
|
5894
|
+
import { access, readFile as readFile3, rename as rename2, rm, stat as stat2, writeFile as writeFile2 } from "node:fs/promises";
|
|
5895
|
+
import { isAbsolute as isAbsolute2, join } from "node:path";
|
|
5896
|
+
import { randomBytes } from "node:crypto";
|
|
5897
|
+
var KEY = "minimumReleaseAgeExclude";
|
|
5898
|
+
var FILE = "pnpm-workspace.yaml";
|
|
5899
|
+
var PACKAGE_NAME = /^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*$/u;
|
|
5900
|
+
var TOP_KEY = /^(?:([A-Za-z_][\w-]*)|'([^']*)'|"([^"\\]*)") *:(?: +(.*))?$/u;
|
|
5901
|
+
var ITEM = /^( *)- +(\S.*)$/u;
|
|
5902
|
+
var ENTRY = /^(?:'([^']*)'|"([^"\\]*)"|([\w.][\w@./~^<>=*|+ -]*?)) *(?: #.*)?$/u;
|
|
5903
|
+
var COMMENT = /^ *(?:#.*)?$/u;
|
|
5904
|
+
function singleLineValue(value) {
|
|
5905
|
+
if (value.startsWith('"')) return /^"(?:[^"\\]|\\.)*" *(?:#.*)?$/u.test(value);
|
|
5906
|
+
if (value.startsWith("'")) return /^'(?:[^']|'')*' *(?:#.*)?$/u.test(value);
|
|
5907
|
+
if (value.startsWith("{")) return /^\{[^{}[\]]*\} *(?:#.*)?$/u.test(value);
|
|
5908
|
+
if (value.startsWith("[")) return /^\[[^{}[\]]*\] *(?:#.*)?$/u.test(value);
|
|
5909
|
+
return !/^[|>]/u.test(value) || /^[|>][-+]?\d? *(?:#.*)?$/u.test(value);
|
|
5910
|
+
}
|
|
5911
|
+
function readExcludeList(text2) {
|
|
5912
|
+
if (/[\r\t\uFEFF]/u.test(text2)) return null;
|
|
5913
|
+
const lines = text2.split("\n");
|
|
5914
|
+
if (lines.at(-1) === "") lines.pop();
|
|
5915
|
+
let keyLine = -1;
|
|
5916
|
+
let blockKey = null;
|
|
5917
|
+
let listOpen = false;
|
|
5918
|
+
let blockValue = false;
|
|
5919
|
+
const entries = [];
|
|
5920
|
+
let indent = null;
|
|
5921
|
+
for (const [index, line] of lines.entries()) {
|
|
5922
|
+
if (COMMENT.test(line)) continue;
|
|
5923
|
+
if (line.startsWith(" ")) {
|
|
5924
|
+
if (!listOpen) continue;
|
|
5925
|
+
const item = ITEM.exec(line);
|
|
5926
|
+
if (item === null || indent !== null && item[1] !== indent) return null;
|
|
5927
|
+
const entry = ENTRY.exec(item[2]);
|
|
5928
|
+
if (entry === null) return null;
|
|
5929
|
+
indent = item[1];
|
|
5930
|
+
entries.push({ line: index, value: (entry[1] ?? entry[2] ?? entry[3]).trim() });
|
|
5931
|
+
continue;
|
|
5932
|
+
}
|
|
5933
|
+
if (line.startsWith("- ")) {
|
|
5934
|
+
if (!blockValue) return null;
|
|
5935
|
+
if (listOpen) {
|
|
5936
|
+
if (indent !== null && indent !== "") return null;
|
|
5937
|
+
const entry = ENTRY.exec(line.slice(2).trimStart());
|
|
5938
|
+
if (entry === null) return null;
|
|
5939
|
+
indent = "";
|
|
5940
|
+
entries.push({ line: index, value: (entry[1] ?? entry[2] ?? entry[3]).trim() });
|
|
5941
|
+
}
|
|
5942
|
+
continue;
|
|
5943
|
+
}
|
|
5944
|
+
const key = TOP_KEY.exec(line);
|
|
5945
|
+
if (key === null) return null;
|
|
5946
|
+
const name2 = key[1] ?? key[2] ?? key[3];
|
|
5947
|
+
const value = key[4] ?? "";
|
|
5948
|
+
listOpen = false;
|
|
5949
|
+
blockValue = COMMENT.test(value);
|
|
5950
|
+
if (name2 !== KEY) {
|
|
5951
|
+
if (!blockValue && !singleLineValue(value)) return null;
|
|
5952
|
+
continue;
|
|
5953
|
+
}
|
|
5954
|
+
if (keyLine !== -1) return null;
|
|
5955
|
+
keyLine = index;
|
|
5956
|
+
const flow = /^\[\] *(#.*)?$/u.exec(value);
|
|
5957
|
+
if (flow !== null) blockKey = `${line.slice(0, line.indexOf(":"))}:${flow[1] === void 0 ? "" : ` ${flow[1]}`}`;
|
|
5958
|
+
else if (!blockValue) return null;
|
|
5959
|
+
listOpen = blockValue;
|
|
5960
|
+
}
|
|
5961
|
+
return { lines, keyLine, blockKey, entries, indent: indent ?? " " };
|
|
5962
|
+
}
|
|
5963
|
+
function excludeRelease(text2, name2, version) {
|
|
5964
|
+
if (!PACKAGE_NAME.test(name2) || !RELEASE_VERSION.test(version)) return null;
|
|
5965
|
+
const list = readExcludeList(text2);
|
|
5966
|
+
if (list === null) return null;
|
|
5967
|
+
const spec = `${name2}@${version}`;
|
|
5968
|
+
const ours = list.entries.filter((entry) => entry.value.startsWith(`${name2}@`));
|
|
5969
|
+
if (ours.length === 1 && ours[0].value === spec) return text2;
|
|
5970
|
+
const item = `${list.indent}- '${spec}'`;
|
|
5971
|
+
const drop = new Set(ours.map((entry) => entry.line));
|
|
5972
|
+
const out = [];
|
|
5973
|
+
if (list.keyLine === -1) {
|
|
5974
|
+
out.push(...list.lines, `${KEY}:`, ` - '${spec}'`);
|
|
5975
|
+
} else {
|
|
5976
|
+
const after = list.entries.length > 0 ? list.entries.at(-1).line : list.keyLine;
|
|
5977
|
+
for (const [index, line] of list.lines.entries()) {
|
|
5978
|
+
if (index === list.keyLine && list.blockKey !== null) out.push(list.blockKey);
|
|
5979
|
+
else if (!drop.has(index)) out.push(line);
|
|
5980
|
+
if (index === after) out.push(item);
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
return `${out.join("\n")}
|
|
5984
|
+
`;
|
|
5985
|
+
}
|
|
5986
|
+
function profileDir(ctx) {
|
|
5987
|
+
const profile = ctx.get("profileContext");
|
|
5988
|
+
return typeof profile?.dir === "string" && isAbsolute2(profile.dir) ? profile.dir : null;
|
|
5989
|
+
}
|
|
5990
|
+
async function canExcludeRelease(dir, name2) {
|
|
5991
|
+
try {
|
|
5992
|
+
const file = join(dir, FILE);
|
|
5993
|
+
if (excludeRelease(await readFile3(file, "utf8"), name2, "0.0.0") === null) return false;
|
|
5994
|
+
await access(file, constants.W_OK);
|
|
5995
|
+
await access(dir, constants.W_OK);
|
|
5996
|
+
return true;
|
|
5997
|
+
} catch {
|
|
5998
|
+
return false;
|
|
5999
|
+
}
|
|
6000
|
+
}
|
|
6001
|
+
async function writeReleaseExclusion(dir, name2, version, waitMs = 5e3) {
|
|
6002
|
+
const file = join(dir, FILE);
|
|
6003
|
+
const lock = join(dir, "package.json.lock");
|
|
6004
|
+
const deadline = Date.now() + waitMs;
|
|
6005
|
+
for (; ; ) {
|
|
6006
|
+
try {
|
|
6007
|
+
await writeFile2(lock, `${process.pid}
|
|
6008
|
+
`, { mode: 384, flag: "wx" });
|
|
6009
|
+
break;
|
|
6010
|
+
} catch (error) {
|
|
6011
|
+
if (error.code !== "EEXIST" || Date.now() >= deadline) return false;
|
|
6012
|
+
await new Promise((resolve2) => setTimeout(resolve2, 100));
|
|
6013
|
+
}
|
|
6014
|
+
}
|
|
6015
|
+
try {
|
|
6016
|
+
const before = await readFile3(file, "utf8");
|
|
6017
|
+
const after = excludeRelease(before, name2, version);
|
|
6018
|
+
if (after === null) return false;
|
|
6019
|
+
if (after === before) return true;
|
|
6020
|
+
const temp = `${file}.${randomBytes(6).toString("hex")}.tmp`;
|
|
6021
|
+
try {
|
|
6022
|
+
await writeFile2(temp, after, { mode: (await stat2(file)).mode & 511, flag: "wx" });
|
|
6023
|
+
await rename2(temp, file);
|
|
6024
|
+
} catch (error) {
|
|
6025
|
+
await rm(temp, { force: true });
|
|
6026
|
+
throw error;
|
|
6027
|
+
}
|
|
6028
|
+
return true;
|
|
6029
|
+
} catch {
|
|
6030
|
+
return false;
|
|
6031
|
+
} finally {
|
|
6032
|
+
await rm(lock, { force: true });
|
|
6033
|
+
}
|
|
6034
|
+
}
|
|
6035
|
+
|
|
5884
6036
|
// src/host/updater.ts
|
|
5885
6037
|
function pluginManager(ctx) {
|
|
5886
6038
|
const service = ctx.get("pluginManager");
|
|
@@ -5905,6 +6057,10 @@ function harnessUpdater(ctx, name2, runtime) {
|
|
|
5905
6057
|
get canInstall() {
|
|
5906
6058
|
return pluginManager(ctx) !== void 0;
|
|
5907
6059
|
},
|
|
6060
|
+
async installsFreshReleases() {
|
|
6061
|
+
const dir = profileDir(ctx);
|
|
6062
|
+
return pluginManager(ctx) !== void 0 && dir !== null && await canExcludeRelease(dir, name2);
|
|
6063
|
+
},
|
|
5908
6064
|
async installed() {
|
|
5909
6065
|
const local = runtime?.installedVersion() ?? null;
|
|
5910
6066
|
if (local !== null) return local;
|
|
@@ -5915,6 +6071,8 @@ function harnessUpdater(ctx, name2, runtime) {
|
|
|
5915
6071
|
if (!RELEASE_VERSION.test(version)) throw new UpdateFailure("failed", `${version} is not a release version`);
|
|
5916
6072
|
const manager = pluginManager(ctx);
|
|
5917
6073
|
if (manager === void 0) throw new UpdateFailure("failed", "this harness has no plugin manager");
|
|
6074
|
+
const dir = profileDir(ctx);
|
|
6075
|
+
if (dir !== null) await writeReleaseExclusion(dir, name2, version);
|
|
5918
6076
|
const result = await manager.installBundle(`${name2}@${version}`, { enabled: true });
|
|
5919
6077
|
if (result.application === "failed" || result.application === "cancelled" || result.error !== void 0) throw installFailure(result);
|
|
5920
6078
|
},
|
|
@@ -5933,7 +6091,7 @@ Open **Settings \u2192 AdaptiqAI** to connect, or run \`/adaptiq signin\`.
|
|
|
5933
6091
|
var ENTRY_PROTOCOL = 1;
|
|
5934
6092
|
var RELOAD_SIGNATURE = true ? "ada3dfffa1b3d7b1" : "source";
|
|
5935
6093
|
function pluginVersion() {
|
|
5936
|
-
if (true) return "0.2.
|
|
6094
|
+
if (true) return "0.2.12";
|
|
5937
6095
|
try {
|
|
5938
6096
|
return createRequire(import.meta.url)("../package.json").version;
|
|
5939
6097
|
} catch {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
/** Where the entries of `minimumReleaseAgeExclude` sit in the file's lines. */
|
|
3
|
+
interface ExcludeList {
|
|
4
|
+
readonly lines: readonly string[];
|
|
5
|
+
/** The key's line, or -1 when the key is absent. */
|
|
6
|
+
readonly keyLine: number;
|
|
7
|
+
/** The key line rewritten for a block list, when it held an empty flow list (`[]`). */
|
|
8
|
+
readonly blockKey: string | null;
|
|
9
|
+
/** Line index and value of each entry. */
|
|
10
|
+
readonly entries: readonly {
|
|
11
|
+
readonly line: number;
|
|
12
|
+
readonly value: string;
|
|
13
|
+
}[];
|
|
14
|
+
readonly indent: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Read the exclusion list out of pnpm-workspace.yaml.
|
|
18
|
+
* @param text - the file's contents.
|
|
19
|
+
* @returns where the list is, or null when the layout is not one this edits with certainty.
|
|
20
|
+
*/
|
|
21
|
+
export declare function readExcludeList(text: string): ExcludeList | null;
|
|
22
|
+
/**
|
|
23
|
+
* The file with exactly `name@version` listed for this package: older entries
|
|
24
|
+
* of the same package are replaced, every other line stays as it is.
|
|
25
|
+
* @param text - pnpm-workspace.yaml as it is.
|
|
26
|
+
* @param name - the plugin's package name.
|
|
27
|
+
* @param version - the release about to be installed.
|
|
28
|
+
* @returns the new text (the same text when nothing needs to change), or null when it cannot be edited with certainty.
|
|
29
|
+
*/
|
|
30
|
+
export declare function excludeRelease(text: string, name: string, version: string): string | null;
|
|
31
|
+
/**
|
|
32
|
+
* The profile directory pnpm installs plugins in: the same `profileContext`
|
|
33
|
+
* the plugin manager installs through. Environment variables are not used: a
|
|
34
|
+
* harness started from another profile's shell inherits that profile's.
|
|
35
|
+
* @param ctx - the plugin context.
|
|
36
|
+
* @returns the directory, or null outside a dsh profile.
|
|
37
|
+
*/
|
|
38
|
+
export declare function profileDir(ctx: Context): string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the exclusion can be written: the file exists, reads with certainty and is writable.
|
|
41
|
+
* @param dir - the profile directory.
|
|
42
|
+
* @param name - the plugin's package name.
|
|
43
|
+
* @returns true when {@link writeReleaseExclusion} would succeed short of a race.
|
|
44
|
+
*/
|
|
45
|
+
export declare function canExcludeRelease(dir: string, name: string): Promise<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* List exactly `name@version` in the profile's `minimumReleaseAgeExclude`,
|
|
48
|
+
* under the profile's package lock (the one the plugin manager holds while it
|
|
49
|
+
* changes the profile), with an atomic replace.
|
|
50
|
+
* @param dir - the profile directory.
|
|
51
|
+
* @param name - the plugin's package name.
|
|
52
|
+
* @param version - the release about to be installed.
|
|
53
|
+
* @param waitMs - how long to wait for another package operation in the profile.
|
|
54
|
+
* @returns true when the file lists the version; false when it was left as it was.
|
|
55
|
+
*/
|
|
56
|
+
export declare function writeReleaseExclusion(dir: string, name: string, version: string, waitMs?: number): Promise<boolean>;
|
|
57
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptiqai/deepseek-harness",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "AdaptiqAI for DeepSeek Harness: models with 5M-token native memory and Knowledge. Sign up, get a model and work without leaving the harness",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh-plugin",
|
|
@@ -90,7 +90,14 @@
|
|
|
90
90
|
"react-dom": "~18.3.1",
|
|
91
91
|
"typescript": "~5.9.3",
|
|
92
92
|
"vitest": "~3.2.7",
|
|
93
|
-
"@adaptiqai/core": "
|
|
93
|
+
"@adaptiqai/core": "workspace:*"
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"link-dsh": "node scripts/link-dsh.mjs",
|
|
97
|
+
"build": "node scripts/gen-typert.mjs && node scripts/build.mjs",
|
|
98
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
99
|
+
"test": "vitest run",
|
|
100
|
+
"pack:local": "npm run build && pnpm pack --pack-destination ../../dist"
|
|
94
101
|
},
|
|
95
102
|
"repository": {
|
|
96
103
|
"type": "git",
|
|
@@ -99,12 +106,5 @@
|
|
|
99
106
|
},
|
|
100
107
|
"publishConfig": {
|
|
101
108
|
"access": "public"
|
|
102
|
-
},
|
|
103
|
-
"scripts": {
|
|
104
|
-
"link-dsh": "node scripts/link-dsh.mjs",
|
|
105
|
-
"build": "node scripts/gen-typert.mjs && node scripts/build.mjs",
|
|
106
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
107
|
-
"test": "vitest run",
|
|
108
|
-
"pack:local": "npm run build && pnpm pack --pack-destination ../../dist"
|
|
109
109
|
}
|
|
110
|
-
}
|
|
110
|
+
}
|