@agentskit/cli 0.13.44 → 0.13.45
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/bin.cjs +9 -24
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-Q5HTPRTW.js → chunk-KVCEIHMN.js} +9 -24
- package/dist/chunk-KVCEIHMN.js.map +1 -0
- package/dist/index.cjs +9 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +11 -11
- package/dist/chunk-Q5HTPRTW.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -3,7 +3,8 @@ import { readdir, stat, glob, readFile, mkdir, lstat, mkdtemp, writeFile, rename
|
|
|
3
3
|
import { homedir } from 'os';
|
|
4
4
|
import path, { join, resolve, isAbsolute, basename, dirname, relative, sep } from 'path';
|
|
5
5
|
import { openrouter, groq, kimi, grok, deepseek, ollama, gemini, anthropic, openai } from '@agentskit/adapters';
|
|
6
|
-
import { randomBytes, randomUUID
|
|
6
|
+
import { randomBytes, randomUUID } from 'crypto';
|
|
7
|
+
import { sha256Hex, canonicalJson as canonicalJson$1 } from '@agentskit/core/hash';
|
|
7
8
|
import { writeFileSync, chmodSync, existsSync, readdirSync, statSync, readFileSync, mkdirSync, rmSync } from 'fs';
|
|
8
9
|
import { runShell, spawnNodeChild, killProcessTree } from '@agentskit/cross-platform';
|
|
9
10
|
import React2, { useMemo, useState, useEffect, useRef } from 'react';
|
|
@@ -238,7 +239,7 @@ function resolveChatProvider(options) {
|
|
|
238
239
|
var ROOT = join(homedir(), ".agentskit", "sessions");
|
|
239
240
|
var META_SUFFIX = ".meta.json";
|
|
240
241
|
function cwdHash(cwd = process.cwd()) {
|
|
241
|
-
return
|
|
242
|
+
return sha256Hex(cwd).slice(0, 12);
|
|
242
243
|
}
|
|
243
244
|
function dirFor(cwd = process.cwd()) {
|
|
244
245
|
return join(ROOT, cwdHash(cwd));
|
|
@@ -3701,7 +3702,7 @@ async function indexSources(rag, config, cwd) {
|
|
|
3701
3702
|
|
|
3702
3703
|
// package.json
|
|
3703
3704
|
var package_default = {
|
|
3704
|
-
version: "0.13.
|
|
3705
|
+
version: "0.13.45"};
|
|
3705
3706
|
|
|
3706
3707
|
// src/commands/shared.ts
|
|
3707
3708
|
function mergeWithConfig(options, config) {
|
|
@@ -5519,9 +5520,6 @@ function resolveAuthHeader(base, config, env = {}) {
|
|
|
5519
5520
|
}
|
|
5520
5521
|
return {};
|
|
5521
5522
|
}
|
|
5522
|
-
function sha256Hex(content) {
|
|
5523
|
-
return createHash("sha256").update(content, "utf8").digest("hex");
|
|
5524
|
-
}
|
|
5525
5523
|
function verifyChecksums(files) {
|
|
5526
5524
|
const bad = files.filter((f) => sha256Hex(f.content) !== f.sha256).map((f) => f.path);
|
|
5527
5525
|
if (bad.length > 0) {
|
|
@@ -5710,8 +5708,6 @@ function validateInstall(input2) {
|
|
|
5710
5708
|
}
|
|
5711
5709
|
return { ok: !issues.some((i) => i.severity === "error"), port, issues };
|
|
5712
5710
|
}
|
|
5713
|
-
|
|
5714
|
-
// src/components/marker.ts
|
|
5715
5711
|
function assertUniquePaths(files) {
|
|
5716
5712
|
const seen = /* @__PURE__ */ new Set();
|
|
5717
5713
|
for (const f of files) {
|
|
@@ -5727,8 +5723,8 @@ function sameKey(entry, id, installPath) {
|
|
|
5727
5723
|
function upsertInstalled(config, entry) {
|
|
5728
5724
|
const current = config.installed ?? [];
|
|
5729
5725
|
const idx = current.findIndex((e) => sameKey(e, entry.id, entry.installPath));
|
|
5730
|
-
|
|
5731
|
-
return { ...config, installed };
|
|
5726
|
+
if (idx === -1) return { ...config, installed: [...current, entry] };
|
|
5727
|
+
return { ...config, installed: current.map((e, i) => i === idx ? entry : e) };
|
|
5732
5728
|
}
|
|
5733
5729
|
function buildInstalledComponent(args) {
|
|
5734
5730
|
assertUniquePaths(args.files);
|
|
@@ -5746,19 +5742,8 @@ function buildInstalledComponent(args) {
|
|
|
5746
5742
|
files
|
|
5747
5743
|
};
|
|
5748
5744
|
}
|
|
5749
|
-
function canonicalize(value) {
|
|
5750
|
-
if (Array.isArray(value)) return value.map(canonicalize);
|
|
5751
|
-
if (value !== null && typeof value === "object") {
|
|
5752
|
-
const sorted = {};
|
|
5753
|
-
for (const key of Object.keys(value).sort()) {
|
|
5754
|
-
sorted[key] = canonicalize(value[key]);
|
|
5755
|
-
}
|
|
5756
|
-
return sorted;
|
|
5757
|
-
}
|
|
5758
|
-
return value;
|
|
5759
|
-
}
|
|
5760
5745
|
function canonicalJson(value) {
|
|
5761
|
-
return JSON.stringify(
|
|
5746
|
+
return JSON.stringify(JSON.parse(canonicalJson$1(value)));
|
|
5762
5747
|
}
|
|
5763
5748
|
function hashEntry(entry) {
|
|
5764
5749
|
return sha256Hex(canonicalJson(entry));
|
|
@@ -6146,5 +6131,5 @@ function createCli() {
|
|
|
6146
6131
|
}
|
|
6147
6132
|
|
|
6148
6133
|
export { ChatApp, HookDispatcher, McpClient, applyPolicyToTool, applyPolicyToTools, bridgeMcpServers, buildRagFromConfig, computeCost, configHooksToHandlers, createCli, createOpenAiEmbedder, defaultPolicy, derivePreview, disposeMcpClients, evaluatePolicy, findLatestSession, findSession, forkSession, generateSessionId, getPricing, indexSources, listSessions, loadConfig, loadPlugins, mergePluginsIntoBundle, registerPricing, renameSession, renderChatHeader, renderReport, resolveChatProvider, resolveSession, runAgent, runDoctor, sessionFilePath, startDev, startTunnel, writeSessionMeta, writeStarterProject2 as writeStarterProject };
|
|
6149
|
-
//# sourceMappingURL=chunk-
|
|
6150
|
-
//# sourceMappingURL=chunk-
|
|
6134
|
+
//# sourceMappingURL=chunk-KVCEIHMN.js.map
|
|
6135
|
+
//# sourceMappingURL=chunk-KVCEIHMN.js.map
|