@agentdocumentformat/cli 0.8.4 → 0.8.5
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/adf.mjs +2 -2
- package/dist/chunks/{chunk-2WIFHJV2.mjs → chunk-IHARCBZH.mjs} +8 -1
- package/dist/chunks/{claude-subscription-42L4YM5L.mjs → claude-subscription-X5EVR3Q4.mjs} +1 -1
- package/dist/chunks/{daemon-DK3KUDZJ.mjs → daemon-YRG2QUF4.mjs} +3 -3
- package/package.json +1 -1
- package/web/assets/{EditorPanel-5ZGWvexa.js → EditorPanel-YXnanvaL.js} +3 -3
- package/web/assets/{MeshGraphView-Vp2R5TLK.js → MeshGraphView-ChgwUT3O.js} +9 -9
- package/web/assets/{SettingsPage-_uHkBERV.js → SettingsPage-BTu2-Yon.js} +1 -1
- package/web/assets/{agent-window-B8X7FV4_.js → agent-window-DlJbRHzy.js} +1 -1
- package/web/assets/{agent.store-BHweGGTh.js → agent.store-CGzsE0VA.js} +1 -1
- package/web/assets/{app.store-j_-OuVPe.js → app.store-hw-ZYpyz.js} +1 -1
- package/web/assets/{document.store-CMD3_OM0.js → document.store-BcN3UW-e.js} +1 -1
- package/web/assets/{edit-recovery-Ce8tPQZl.js → edit-recovery-uWM2umPk.js} +1 -1
- package/web/assets/{index-DS9H-PJI.js → index-B0BKR-7b.js} +1 -1
- package/web/assets/{index-Ca6bEWGu.js → index-Ba28S-D0.js} +1 -1
- package/web/assets/{index-BQIEMvvt.js → index-BxmMf4oH.js} +1 -1
- package/web/assets/{index-DBFkrLao.js → index-BxrG4na5.js} +1 -1
- package/web/assets/{index-B5Eot_tL.js → index-C0ujp8ua.js} +1 -1
- package/web/assets/{index-KNnHrO8-.js → index-CBCcou8F.js} +1 -1
- package/web/assets/{index-nM_Q5x7Q.js → index-Cuc6TCV0.js} +1 -1
- package/web/assets/{index-B5FYMbFc.js → index-DlQ8IXY2.js} +1 -1
- package/web/assets/{index-C_gf4L3q.js → index-Dms-d0wP.js} +1 -1
- package/web/assets/{index-DF1leTEa.js → index-LwIi-F1W.js} +2 -2
- package/web/assets/{index-DkhbLs9K.js → index-mW7p_CTU.js} +1 -1
- package/web/assets/{main-o2ocfqUC.js → main-CR7cfmOT.js} +3 -3
- package/web/assets/{message-queue.store-ke_rFZAb.js → message-queue.store-BMjJTJTP.js} +1 -1
- package/web/assets/{react-D-F9gHrJ.js → react-wKFncLeZ.js} +1 -1
- package/web/assets/{window-kind-mxlpdE1l.js → window-kind-35FHmfEB.js} +1 -1
- package/web/assets/{with-selector-Ot-ZoUn0.js → with-selector-CBB0rjuB.js} +1 -1
- package/web/index.html +1 -1
package/dist/adf.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import "./chunks/chunk-M2RX3S2T.mjs";
|
|
|
12
12
|
|
|
13
13
|
// src/main/cli/bin.ts
|
|
14
14
|
function version() {
|
|
15
|
-
return "0.8.
|
|
15
|
+
return "0.8.5";
|
|
16
16
|
}
|
|
17
17
|
var DAEMON_HELP = `Usage: adf daemon [--port <n>] [--host <h>] [--settings <file>]
|
|
18
18
|
adf daemon start [--port <n>] [--force]
|
|
@@ -194,7 +194,7 @@ async function main(argv) {
|
|
|
194
194
|
let { daemonPaths } = await import("./chunks/daemon-control-U4OGCAAJ.mjs");
|
|
195
195
|
process.env.ADF_DAEMON_PIDFILE = daemonPaths(Number(process.env.ADF_DAEMON_PORT ?? 7385)).pidFile;
|
|
196
196
|
}
|
|
197
|
-
return await import("./chunks/daemon-
|
|
197
|
+
return await import("./chunks/daemon-YRG2QUF4.mjs"), -1;
|
|
198
198
|
}
|
|
199
199
|
let [{ runCli, tuiInvocation }, control] = await Promise.all([import("./chunks/cli-JPRYEY4J.mjs"), import("./chunks/daemon-control-U4OGCAAJ.mjs")]);
|
|
200
200
|
return tuiInvocation(argv) && process.env.NODE_ENV === void 0 && (process.env.NODE_ENV = "production", process.env.ADF_NODE_ENV_DEFAULTED = "1"), await runCli(argv, {
|
|
@@ -11190,6 +11190,13 @@ function gptEncode(text2) {
|
|
|
11190
11190
|
function anthropicCountTokens(text2) {
|
|
11191
11191
|
return anthropicCountFn || (anthropicCountFn = _require("@anthropic-ai/tokenizer").countTokens), anthropicCountFn(text2);
|
|
11192
11192
|
}
|
|
11193
|
+
var LONG_RUN = /\S{512,}/g;
|
|
11194
|
+
function countWithLongRunsEstimated(text2, count) {
|
|
11195
|
+
let total = 0, last = 0;
|
|
11196
|
+
for (let match of text2.matchAll(LONG_RUN))
|
|
11197
|
+
match.index > last && (total += count(text2.slice(last, match.index))), total += Math.ceil(match[0].length / 3), last = match.index + match[0].length;
|
|
11198
|
+
return last === 0 ? count(text2) : (last < text2.length && (total += count(text2.slice(last))), total);
|
|
11199
|
+
}
|
|
11193
11200
|
var TokenCounterService = class {
|
|
11194
11201
|
/** Settings key (or display name) → factory family, registered by provider-factory. */
|
|
11195
11202
|
providerTypesByKey = /* @__PURE__ */ new Map();
|
|
@@ -11238,7 +11245,7 @@ var TokenCounterService = class {
|
|
|
11238
11245
|
countTokens(text2, provider, model) {
|
|
11239
11246
|
if (!text2) return 0;
|
|
11240
11247
|
try {
|
|
11241
|
-
return this.resolveTokenizer(provider, model) === "anthropic" ?
|
|
11248
|
+
return this.resolveTokenizer(provider, model) === "anthropic" ? countWithLongRunsEstimated(text2, anthropicCountTokens) : countWithLongRunsEstimated(text2, (t) => gptEncode(t).length);
|
|
11242
11249
|
} catch (err) {
|
|
11243
11250
|
return console.warn(`[TokenCounter] Error counting tokens for provider ${provider}:`, err), Math.ceil(text2.length / 4);
|
|
11244
11251
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
CLAUDE_SUBSCRIPTION_MODELS,
|
|
9
9
|
createClaudeSubscriptionProvider,
|
|
10
10
|
listClaudeSubscriptionModels
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IHARCBZH.mjs";
|
|
12
12
|
import "./chunk-RIAB37IS.mjs";
|
|
13
13
|
import "./chunk-NZ7JTHEO.mjs";
|
|
14
14
|
import "./chunk-JZFONJSL.mjs";
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
getTokenCounterService,
|
|
131
131
|
seedMandatoryReasoningModels,
|
|
132
132
|
setMandatoryReasoningPersister
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-IHARCBZH.mjs";
|
|
134
134
|
import {
|
|
135
135
|
executeNode
|
|
136
136
|
} from "./chunk-XP4U4A2W.mjs";
|
|
@@ -136846,7 +136846,7 @@ async function listProviderModels(runtime2, settingsStore, providerId, agentId,
|
|
|
136846
136846
|
return { provider: providerId, models: await listGrokSubscriptionModels(getGrokAuthManager()) };
|
|
136847
136847
|
}
|
|
136848
136848
|
if (cfg.type === "claude-subscription") {
|
|
136849
|
-
let { listClaudeSubscriptionModels } = await import("./claude-subscription-
|
|
136849
|
+
let { listClaudeSubscriptionModels } = await import("./claude-subscription-X5EVR3Q4.mjs");
|
|
136850
136850
|
return { provider: providerId, models: await listClaudeSubscriptionModels() };
|
|
136851
136851
|
}
|
|
136852
136852
|
if (cfg.type === "anthropic") {
|
|
@@ -138416,7 +138416,7 @@ process.on("uncaughtException", (err) => {
|
|
|
138416
138416
|
process.on("unhandledRejection", (reason) => {
|
|
138417
138417
|
console.error("[ADF Daemon] Unhandled rejection:", reason instanceof Error ? reason.stack : reason);
|
|
138418
138418
|
});
|
|
138419
|
-
var port = Number(process.env.ADF_DAEMON_PORT ?? 7385), host = process.env.ADF_DAEMON_HOST ?? "127.0.0.1", pidFile = process.env.ADF_DAEMON_PIDFILE, settingsPath = process.env.ADF_DAEMON_SETTINGS ?? defaultSettingsPath(), daemonVersion = "0.8.
|
|
138419
|
+
var port = Number(process.env.ADF_DAEMON_PORT ?? 7385), host = process.env.ADF_DAEMON_HOST ?? "127.0.0.1", pidFile = process.env.ADF_DAEMON_PIDFILE, settingsPath = process.env.ADF_DAEMON_SETTINGS ?? defaultSettingsPath(), daemonVersion = "0.8.5", startedBy = takeLaunchEnv();
|
|
138420
138420
|
console.log(`[ADF Daemon] Version ${daemonVersion} (pid ${process.pid}, started by ${startedBy})`);
|
|
138421
138421
|
var settings = new FileSettingsStore(settingsPath);
|
|
138422
138422
|
processAgentLeases().configure({ kind: "daemon", settingsPath, version: daemonVersion });
|
package/package.json
CHANGED