oleander-cli 0.21.0 → 0.25.0
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/index.cjs +215 -45
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17494,7 +17494,7 @@ var require_buffer_list = __commonJS({
|
|
|
17494
17494
|
}
|
|
17495
17495
|
}, {
|
|
17496
17496
|
key: "join",
|
|
17497
|
-
value: function
|
|
17497
|
+
value: function join8(s) {
|
|
17498
17498
|
if (this.length === 0) return "";
|
|
17499
17499
|
var p2 = this.head;
|
|
17500
17500
|
var ret = "" + p2.data;
|
|
@@ -45416,7 +45416,136 @@ var import_node_child_process2 = require("child_process");
|
|
|
45416
45416
|
var import_fs5 = require("fs");
|
|
45417
45417
|
var import_node_os4 = require("os");
|
|
45418
45418
|
var import_path5 = require("path");
|
|
45419
|
+
var import_node_fs4 = require("fs");
|
|
45420
|
+
|
|
45421
|
+
// src/utils/duckdb-runtime.ts
|
|
45422
|
+
var import_node_crypto2 = require("crypto");
|
|
45419
45423
|
var import_node_fs3 = require("fs");
|
|
45424
|
+
var import_node_path4 = require("path");
|
|
45425
|
+
var import_node_zlib = require("zlib");
|
|
45426
|
+
var DUCKDB_VERSION = "v2.0.0";
|
|
45427
|
+
var OLEANDER_EXTENSION_RELEASE = "v0.3.1";
|
|
45428
|
+
var OLEANDER_EXTENSION_REPOSITORY = `https://oleander-cli-releases.s3.amazonaws.com/duckdb/${OLEANDER_EXTENSION_RELEASE}`;
|
|
45429
|
+
var CLI_JOB_NAMESPACE = "oleander.cli";
|
|
45430
|
+
var DUCKDB_BINARIES = {
|
|
45431
|
+
"darwin-arm64": {
|
|
45432
|
+
asset: "duckdb-cli-osx-arm64.tar.gz",
|
|
45433
|
+
sha256: "188a36fe8883ef52e69165a0cbb6031ef679c8e6c448a1ce22951964149b7f96",
|
|
45434
|
+
extensionPlatform: "osx_arm64"
|
|
45435
|
+
},
|
|
45436
|
+
"linux-x64": {
|
|
45437
|
+
asset: "duckdb-cli-linux-amd64.tar.gz",
|
|
45438
|
+
sha256: "c6507206baf7793c6013dbd82368469a45f20dc0e17a6f92f204602f652ed2bc",
|
|
45439
|
+
extensionPlatform: "linux_amd64"
|
|
45440
|
+
},
|
|
45441
|
+
"linux-arm64": {
|
|
45442
|
+
asset: "duckdb-cli-linux-arm64.tar.gz",
|
|
45443
|
+
sha256: "859e1875d2a9515fbb4bf8871061437a14af82320da68c753f094c4b776348fe",
|
|
45444
|
+
extensionPlatform: "linux_arm64"
|
|
45445
|
+
}
|
|
45446
|
+
};
|
|
45447
|
+
function duckdbPlatform(platform = process.platform, arch = process.arch, glibc = hasGlibc()) {
|
|
45448
|
+
if (platform === "linux" && !glibc) return null;
|
|
45449
|
+
return DUCKDB_BINARIES[`${platform}-${arch}`] ?? null;
|
|
45450
|
+
}
|
|
45451
|
+
function hasGlibc() {
|
|
45452
|
+
const report = process.report?.getReport();
|
|
45453
|
+
return Boolean(report?.header?.glibcVersionRuntime);
|
|
45454
|
+
}
|
|
45455
|
+
function runtimeDir() {
|
|
45456
|
+
return (0, import_node_path4.join)(configDir(), "duckdb", DUCKDB_VERSION);
|
|
45457
|
+
}
|
|
45458
|
+
function extensionDirectory() {
|
|
45459
|
+
return (0, import_node_path4.join)(runtimeDir(), "extensions");
|
|
45460
|
+
}
|
|
45461
|
+
async function ensureDuckdb(target) {
|
|
45462
|
+
const binary = (0, import_node_path4.join)(runtimeDir(), "duckdb");
|
|
45463
|
+
if ((0, import_node_fs3.existsSync)(binary)) return binary;
|
|
45464
|
+
const url = `https://github.com/duckdb/duckdb/releases/download/${DUCKDB_VERSION}/${target.asset}`;
|
|
45465
|
+
const response = await fetch(url);
|
|
45466
|
+
if (!response.ok) {
|
|
45467
|
+
throw new Error(
|
|
45468
|
+
`Downloading DuckDB ${DUCKDB_VERSION} failed: HTTP ${response.status}`
|
|
45469
|
+
);
|
|
45470
|
+
}
|
|
45471
|
+
const archive = Buffer.from(await response.arrayBuffer());
|
|
45472
|
+
const digest = (0, import_node_crypto2.createHash)("sha256").update(archive).digest("hex");
|
|
45473
|
+
if (digest !== target.sha256) {
|
|
45474
|
+
throw new Error(
|
|
45475
|
+
`DuckDB ${DUCKDB_VERSION} download did not match its checksum`
|
|
45476
|
+
);
|
|
45477
|
+
}
|
|
45478
|
+
const executable = tarEntry((0, import_node_zlib.gunzipSync)(archive), "duckdb");
|
|
45479
|
+
if (!executable) {
|
|
45480
|
+
throw new Error(`DuckDB ${DUCKDB_VERSION} download held no duckdb binary`);
|
|
45481
|
+
}
|
|
45482
|
+
(0, import_node_fs3.mkdirSync)(runtimeDir(), { recursive: true });
|
|
45483
|
+
const partial = `${binary}.partial`;
|
|
45484
|
+
(0, import_node_fs3.writeFileSync)(partial, executable, { mode: 493 });
|
|
45485
|
+
(0, import_node_fs3.chmodSync)(partial, 493);
|
|
45486
|
+
(0, import_node_fs3.renameSync)(partial, binary);
|
|
45487
|
+
return binary;
|
|
45488
|
+
}
|
|
45489
|
+
function tarEntry(archive, path2) {
|
|
45490
|
+
let offset = 0;
|
|
45491
|
+
while (offset + 512 <= archive.length) {
|
|
45492
|
+
const header = archive.subarray(offset, offset + 512);
|
|
45493
|
+
if (header.every((byte) => byte === 0)) return null;
|
|
45494
|
+
const field = (start2, length) => {
|
|
45495
|
+
const value = header.subarray(start2, start2 + length);
|
|
45496
|
+
const nul = value.indexOf(0);
|
|
45497
|
+
return value.toString("utf8", 0, nul === -1 ? length : nul);
|
|
45498
|
+
};
|
|
45499
|
+
const size = parseInt(field(124, 12).trim() || "0", 8);
|
|
45500
|
+
const type = field(156, 1);
|
|
45501
|
+
const start = offset + 512;
|
|
45502
|
+
if ((type === "0" || type === "") && field(0, 100).replace(/^\.\//, "") === path2) {
|
|
45503
|
+
return archive.subarray(start, start + size);
|
|
45504
|
+
}
|
|
45505
|
+
offset = start + Math.ceil(size / 512) * 512;
|
|
45506
|
+
}
|
|
45507
|
+
return null;
|
|
45508
|
+
}
|
|
45509
|
+
function installedExtensionRelease(path2) {
|
|
45510
|
+
if (!(0, import_node_fs3.existsSync)(path2)) return null;
|
|
45511
|
+
const fd = (0, import_node_fs3.openSync)(path2, "r");
|
|
45512
|
+
try {
|
|
45513
|
+
const size = (0, import_node_fs3.fstatSync)(fd).size;
|
|
45514
|
+
const end = size - 256 - 3 * 32;
|
|
45515
|
+
if (end < 32) return null;
|
|
45516
|
+
const field = Buffer.alloc(32);
|
|
45517
|
+
(0, import_node_fs3.readSync)(fd, field, 0, 32, end - 32);
|
|
45518
|
+
const nul = field.indexOf(0);
|
|
45519
|
+
return field.toString("utf8", 0, nul === -1 ? 32 : nul) || null;
|
|
45520
|
+
} finally {
|
|
45521
|
+
(0, import_node_fs3.closeSync)(fd);
|
|
45522
|
+
}
|
|
45523
|
+
}
|
|
45524
|
+
function installedExtensionPath(target) {
|
|
45525
|
+
return (0, import_node_path4.join)(
|
|
45526
|
+
extensionDirectory(),
|
|
45527
|
+
DUCKDB_VERSION,
|
|
45528
|
+
target.extensionPlatform,
|
|
45529
|
+
"oleander.duckdb_extension"
|
|
45530
|
+
);
|
|
45531
|
+
}
|
|
45532
|
+
function catalogAliases(catalogNames) {
|
|
45533
|
+
return catalogNames.map(
|
|
45534
|
+
(name) => name.toLowerCase() === "oleander" ? `${name}=oleander.lake` : `${name}=oleander.lake#${name}`
|
|
45535
|
+
).join(";");
|
|
45536
|
+
}
|
|
45537
|
+
var sqlString = (value) => `'${value.replace(/'/g, "''")}'`;
|
|
45538
|
+
function lineageInitSql(target, catalogNames) {
|
|
45539
|
+
const install = installedExtensionRelease(installedExtensionPath(target)) === OLEANDER_EXTENSION_RELEASE ? "" : `FORCE INSTALL oleander FROM ${sqlString(OLEANDER_EXTENSION_REPOSITORY)};
|
|
45540
|
+
`;
|
|
45541
|
+
return install + `LOAD oleander;
|
|
45542
|
+
SET openlineage_namespace = ${sqlString(CLI_JOB_NAMESPACE)};
|
|
45543
|
+
SET openlineage_batch_size = 100;
|
|
45544
|
+
SET openlineage_catalog_aliases = ${sqlString(catalogAliases(catalogNames))};
|
|
45545
|
+
`;
|
|
45546
|
+
}
|
|
45547
|
+
|
|
45548
|
+
// src/commands/duckdb.ts
|
|
45420
45549
|
var HORIZON_CATALOG_PATH = "/polaris/api/catalog";
|
|
45421
45550
|
function getHorizonCatalogBaseUrl(catalogUri) {
|
|
45422
45551
|
const url = new URL(catalogUri);
|
|
@@ -45493,7 +45622,7 @@ function catalogAttachSql(catalog, credJson) {
|
|
|
45493
45622
|
}
|
|
45494
45623
|
return null;
|
|
45495
45624
|
}
|
|
45496
|
-
async function duckdbTerminal() {
|
|
45625
|
+
async function duckdbTerminal(options) {
|
|
45497
45626
|
let apiKey;
|
|
45498
45627
|
try {
|
|
45499
45628
|
const cfg = await config.load();
|
|
@@ -45520,7 +45649,29 @@ async function duckdbTerminal() {
|
|
|
45520
45649
|
spinner.fail("Failed to load catalogs.");
|
|
45521
45650
|
return;
|
|
45522
45651
|
}
|
|
45523
|
-
|
|
45652
|
+
const target = duckdbPlatform();
|
|
45653
|
+
let duckdb = "duckdb";
|
|
45654
|
+
let lineage = options.lineage !== false;
|
|
45655
|
+
const notices = [];
|
|
45656
|
+
if (target) {
|
|
45657
|
+
spinner.text = `Preparing DuckDB ${DUCKDB_VERSION}...`;
|
|
45658
|
+
try {
|
|
45659
|
+
duckdb = await ensureDuckdb(target);
|
|
45660
|
+
} catch (error) {
|
|
45661
|
+
notices.push(
|
|
45662
|
+
`${error instanceof Error ? error.message : String(error)}; starting your own duckdb without lineage.`
|
|
45663
|
+
);
|
|
45664
|
+
lineage = false;
|
|
45665
|
+
}
|
|
45666
|
+
} else if (lineage) {
|
|
45667
|
+
notices.push(
|
|
45668
|
+
`Lineage needs DuckDB ${DUCKDB_VERSION} on Apple silicon macOS or glibc Linux; starting your own duckdb without it.`
|
|
45669
|
+
);
|
|
45670
|
+
lineage = false;
|
|
45671
|
+
}
|
|
45672
|
+
let initSql = duckdb === "duckdb" ? "" : `SET extension_directories = [${sqlString(extensionDirectory())}];
|
|
45673
|
+
`;
|
|
45674
|
+
initSql += `
|
|
45524
45675
|
INSTALL httpfs; LOAD httpfs;
|
|
45525
45676
|
INSTALL iceberg; LOAD iceberg;
|
|
45526
45677
|
INSTALL aws; LOAD aws;
|
|
@@ -45528,6 +45679,7 @@ async function duckdbTerminal() {
|
|
|
45528
45679
|
const catalogsJson = await catalogResp.json();
|
|
45529
45680
|
const catalogs = catalogsJson.registeredCatalogs ?? [];
|
|
45530
45681
|
const skipped = [];
|
|
45682
|
+
const attached = [];
|
|
45531
45683
|
for (const catalog of catalogs) {
|
|
45532
45684
|
spinner.text = `Loading catalog: ${catalog.name}`;
|
|
45533
45685
|
const credResp = await fetch(
|
|
@@ -45554,21 +45706,35 @@ async function duckdbTerminal() {
|
|
|
45554
45706
|
continue;
|
|
45555
45707
|
}
|
|
45556
45708
|
initSql += attachSql;
|
|
45709
|
+
attached.push(catalog.name);
|
|
45557
45710
|
}
|
|
45558
45711
|
if (catalogs.length > 0 && skipped.length === catalogs.length) {
|
|
45559
45712
|
spinner.fail("Failed to load any catalog.");
|
|
45560
45713
|
for (const message of skipped) logger.warn(message);
|
|
45561
45714
|
process.exit(1);
|
|
45562
45715
|
}
|
|
45716
|
+
if (lineage && target) {
|
|
45717
|
+
initSql += lineageInitSql(target, attached);
|
|
45718
|
+
}
|
|
45563
45719
|
const tempDir = (0, import_fs5.mkdtempSync)((0, import_path5.join)((0, import_node_os4.tmpdir)(), "oleander-duckdb-init-"));
|
|
45564
45720
|
const initPath = (0, import_path5.join)(tempDir, "init.sql");
|
|
45565
|
-
(0,
|
|
45566
|
-
spinner.succeed(
|
|
45567
|
-
|
|
45568
|
-
|
|
45569
|
-
|
|
45570
|
-
|
|
45571
|
-
|
|
45721
|
+
(0, import_node_fs4.writeFileSync)(initPath, initSql.trimStart(), { encoding: "utf-8" });
|
|
45722
|
+
spinner.succeed(
|
|
45723
|
+
lineage ? `Starting DuckDB ${DUCKDB_VERSION} for oleander lake, reporting lineage.` : "Starting duckdb terminal for oleander lake."
|
|
45724
|
+
);
|
|
45725
|
+
for (const message of [...skipped, ...notices]) logger.warn(message);
|
|
45726
|
+
const p2 = (0, import_node_child_process2.spawn)(
|
|
45727
|
+
duckdb,
|
|
45728
|
+
lineage ? ["-unsigned", "-init", initPath] : ["-init", initPath],
|
|
45729
|
+
{
|
|
45730
|
+
stdio: "inherit",
|
|
45731
|
+
env: lineage ? {
|
|
45732
|
+
...process.env,
|
|
45733
|
+
OPENLINEAGE_URL: getEndpoint(),
|
|
45734
|
+
OPENLINEAGE_API_KEY: apiKey
|
|
45735
|
+
} : process.env
|
|
45736
|
+
}
|
|
45737
|
+
);
|
|
45572
45738
|
p2.on("exit", (code, signal) => {
|
|
45573
45739
|
if (signal) {
|
|
45574
45740
|
process.kill(process.pid, signal);
|
|
@@ -45595,7 +45761,7 @@ var import_fs7 = require("fs");
|
|
|
45595
45761
|
// package.json
|
|
45596
45762
|
var package_default = {
|
|
45597
45763
|
name: "oleander-cli",
|
|
45598
|
-
version: "0.
|
|
45764
|
+
version: "0.25.0",
|
|
45599
45765
|
description: "oleander CLI",
|
|
45600
45766
|
keywords: [
|
|
45601
45767
|
"cli",
|
|
@@ -46440,8 +46606,8 @@ function registerQueriesCommands(program3) {
|
|
|
46440
46606
|
// src/utils/skills.ts
|
|
46441
46607
|
var import_node_child_process3 = require("child_process");
|
|
46442
46608
|
var import_node_os5 = require("os");
|
|
46443
|
-
var
|
|
46444
|
-
var
|
|
46609
|
+
var import_node_fs5 = require("fs");
|
|
46610
|
+
var import_node_path5 = require("path");
|
|
46445
46611
|
var SKILLS_REPO = "OleanderHQ/skills";
|
|
46446
46612
|
var OLEANDER_SKILLS_DIR = ".oleander/skills";
|
|
46447
46613
|
var OLEANDER_SKILL_NAMES = [
|
|
@@ -46474,12 +46640,12 @@ var SkillsInstallError = class extends Error {
|
|
|
46474
46640
|
}
|
|
46475
46641
|
};
|
|
46476
46642
|
function oleanderSkillsDir(homeDir = (0, import_node_os5.homedir)()) {
|
|
46477
|
-
return (0,
|
|
46643
|
+
return (0, import_node_path5.join)(homeDir, OLEANDER_SKILLS_DIR);
|
|
46478
46644
|
}
|
|
46479
46645
|
function readSkillVersion(skillDir) {
|
|
46480
46646
|
try {
|
|
46481
46647
|
const parsed = JSON.parse(
|
|
46482
|
-
(0,
|
|
46648
|
+
(0, import_node_fs5.readFileSync)((0, import_node_path5.join)(skillDir, "metadata.json"), "utf8")
|
|
46483
46649
|
);
|
|
46484
46650
|
return typeof parsed.version === "string" ? parsed.version : null;
|
|
46485
46651
|
} catch {
|
|
@@ -46488,7 +46654,7 @@ function readSkillVersion(skillDir) {
|
|
|
46488
46654
|
}
|
|
46489
46655
|
function skillPresent(skillDir) {
|
|
46490
46656
|
try {
|
|
46491
|
-
(0,
|
|
46657
|
+
(0, import_node_fs5.lstatSync)((0, import_node_path5.join)(skillDir, "SKILL.md"));
|
|
46492
46658
|
return true;
|
|
46493
46659
|
} catch {
|
|
46494
46660
|
return false;
|
|
@@ -46496,19 +46662,19 @@ function skillPresent(skillDir) {
|
|
|
46496
46662
|
}
|
|
46497
46663
|
function isSymlink(path2) {
|
|
46498
46664
|
try {
|
|
46499
|
-
return (0,
|
|
46665
|
+
return (0, import_node_fs5.lstatSync)(path2).isSymbolicLink();
|
|
46500
46666
|
} catch {
|
|
46501
46667
|
return false;
|
|
46502
46668
|
}
|
|
46503
46669
|
}
|
|
46504
46670
|
function presentSkillNames(skillsDir) {
|
|
46505
46671
|
return OLEANDER_SKILL_NAMES.filter(
|
|
46506
|
-
(name) => skillPresent((0,
|
|
46672
|
+
(name) => skillPresent((0, import_node_path5.join)(skillsDir, name))
|
|
46507
46673
|
);
|
|
46508
46674
|
}
|
|
46509
46675
|
function versionFromSkillsDir(skillsDir) {
|
|
46510
46676
|
for (const name of presentSkillNames(skillsDir)) {
|
|
46511
|
-
const version = readSkillVersion((0,
|
|
46677
|
+
const version = readSkillVersion((0, import_node_path5.join)(skillsDir, name));
|
|
46512
46678
|
if (version) {
|
|
46513
46679
|
return version;
|
|
46514
46680
|
}
|
|
@@ -46516,25 +46682,25 @@ function versionFromSkillsDir(skillsDir) {
|
|
|
46516
46682
|
return null;
|
|
46517
46683
|
}
|
|
46518
46684
|
function isInside(path2, dir) {
|
|
46519
|
-
const rel = (0,
|
|
46520
|
-
return rel === "" || !rel.startsWith("..") && !(0,
|
|
46685
|
+
const rel = (0, import_node_path5.relative)(dir, path2);
|
|
46686
|
+
return rel === "" || !rel.startsWith("..") && !(0, import_node_path5.isAbsolute)(rel);
|
|
46521
46687
|
}
|
|
46522
46688
|
function samePath(left2, right2) {
|
|
46523
46689
|
try {
|
|
46524
|
-
return (0,
|
|
46690
|
+
return (0, import_node_fs5.realpathSync)(left2) === (0, import_node_fs5.realpathSync)(right2);
|
|
46525
46691
|
} catch {
|
|
46526
|
-
return (0,
|
|
46692
|
+
return (0, import_node_path5.resolve)(left2) === (0, import_node_path5.resolve)(right2);
|
|
46527
46693
|
}
|
|
46528
46694
|
}
|
|
46529
46695
|
function findRealSkillSource(home, name, storeDir, agentRoots) {
|
|
46530
46696
|
for (const root of agentRoots) {
|
|
46531
|
-
const candidate = (0,
|
|
46697
|
+
const candidate = (0, import_node_path5.join)(home, root.relativeDir, name);
|
|
46532
46698
|
if (!skillPresent(candidate)) {
|
|
46533
46699
|
continue;
|
|
46534
46700
|
}
|
|
46535
46701
|
try {
|
|
46536
|
-
if ((0,
|
|
46537
|
-
const real = (0,
|
|
46702
|
+
if ((0, import_node_fs5.lstatSync)(candidate).isSymbolicLink()) {
|
|
46703
|
+
const real = (0, import_node_fs5.realpathSync)(candidate);
|
|
46538
46704
|
if (isInside(real, storeDir)) {
|
|
46539
46705
|
continue;
|
|
46540
46706
|
}
|
|
@@ -46548,46 +46714,46 @@ function findRealSkillSource(home, name, storeDir, agentRoots) {
|
|
|
46548
46714
|
continue;
|
|
46549
46715
|
}
|
|
46550
46716
|
}
|
|
46551
|
-
const stored = (0,
|
|
46717
|
+
const stored = (0, import_node_path5.join)(storeDir, name);
|
|
46552
46718
|
return skillPresent(stored) ? stored : null;
|
|
46553
46719
|
}
|
|
46554
46720
|
function ensureSymlink(linkPath, dest) {
|
|
46555
|
-
const resolvedDest = (0,
|
|
46721
|
+
const resolvedDest = (0, import_node_path5.resolve)(dest);
|
|
46556
46722
|
try {
|
|
46557
|
-
const stat2 = (0,
|
|
46723
|
+
const stat2 = (0, import_node_fs5.lstatSync)(linkPath);
|
|
46558
46724
|
if (stat2.isSymbolicLink()) {
|
|
46559
|
-
const current = (0,
|
|
46725
|
+
const current = (0, import_node_path5.resolve)((0, import_node_path5.dirname)(linkPath), (0, import_node_fs5.readlinkSync)(linkPath));
|
|
46560
46726
|
if (current === resolvedDest) {
|
|
46561
46727
|
return;
|
|
46562
46728
|
}
|
|
46563
|
-
(0,
|
|
46729
|
+
(0, import_node_fs5.unlinkSync)(linkPath);
|
|
46564
46730
|
} else {
|
|
46565
|
-
(0,
|
|
46731
|
+
(0, import_node_fs5.rmSync)(linkPath, { recursive: true, force: true });
|
|
46566
46732
|
}
|
|
46567
46733
|
} catch {
|
|
46568
46734
|
}
|
|
46569
|
-
(0,
|
|
46735
|
+
(0, import_node_fs5.symlinkSync)(resolvedDest, linkPath, "junction");
|
|
46570
46736
|
}
|
|
46571
46737
|
function syncOleanderSkillStore(homeDir, agentRoots = AGENT_SKILL_ROOTS) {
|
|
46572
46738
|
const storeDir = oleanderSkillsDir(homeDir);
|
|
46573
46739
|
for (const name of OLEANDER_SKILL_NAMES) {
|
|
46574
|
-
const dest = (0,
|
|
46740
|
+
const dest = (0, import_node_path5.join)(storeDir, name);
|
|
46575
46741
|
const source = findRealSkillSource(homeDir, name, storeDir, agentRoots);
|
|
46576
46742
|
if (!source) {
|
|
46577
46743
|
continue;
|
|
46578
46744
|
}
|
|
46579
|
-
(0,
|
|
46745
|
+
(0, import_node_fs5.mkdirSync)(storeDir, { recursive: true });
|
|
46580
46746
|
if (!samePath(source, dest)) {
|
|
46581
|
-
(0,
|
|
46582
|
-
(0,
|
|
46747
|
+
(0, import_node_fs5.rmSync)(dest, { recursive: true, force: true });
|
|
46748
|
+
(0, import_node_fs5.cpSync)(source, dest, { recursive: true, dereference: true });
|
|
46583
46749
|
}
|
|
46584
46750
|
}
|
|
46585
46751
|
for (const name of presentSkillNames(storeDir)) {
|
|
46586
|
-
const dest = (0,
|
|
46752
|
+
const dest = (0, import_node_path5.join)(storeDir, name);
|
|
46587
46753
|
for (const root of agentRoots) {
|
|
46588
|
-
const agentDir = (0,
|
|
46589
|
-
(0,
|
|
46590
|
-
ensureSymlink((0,
|
|
46754
|
+
const agentDir = (0, import_node_path5.join)(homeDir, root.relativeDir);
|
|
46755
|
+
(0, import_node_fs5.mkdirSync)(agentDir, { recursive: true });
|
|
46756
|
+
ensureSymlink((0, import_node_path5.join)(agentDir, name), dest);
|
|
46591
46757
|
}
|
|
46592
46758
|
}
|
|
46593
46759
|
}
|
|
@@ -46606,13 +46772,13 @@ function getSkillsStatus(options = {}) {
|
|
|
46606
46772
|
const agentRoots = options.agentRoots ?? AGENT_SKILL_ROOTS;
|
|
46607
46773
|
const storeNames = presentSkillNames(storeDir);
|
|
46608
46774
|
const agents = agentRoots.map((root) => {
|
|
46609
|
-
const path2 = (0,
|
|
46775
|
+
const path2 = (0, import_node_path5.join)(home, root.relativeDir);
|
|
46610
46776
|
const names = presentSkillNames(path2);
|
|
46611
46777
|
return {
|
|
46612
46778
|
label: root.label,
|
|
46613
46779
|
path: path2,
|
|
46614
46780
|
present: names.length > 0,
|
|
46615
|
-
symlinked: names.length > 0 && names.every((name) => isSymlink((0,
|
|
46781
|
+
symlinked: names.length > 0 && names.every((name) => isSymlink((0, import_node_path5.join)(path2, name)))
|
|
46616
46782
|
};
|
|
46617
46783
|
});
|
|
46618
46784
|
return {
|
|
@@ -46901,10 +47067,14 @@ Examples:
|
|
|
46901
47067
|
`
|
|
46902
47068
|
).action(polarsCommand);
|
|
46903
47069
|
addOutputOption(polars, { formats: TABLE_JSON_CSV_FORMATS });
|
|
46904
|
-
program2.command("duckdb").description("Starts a local DuckDB shell").addHelpText(
|
|
47070
|
+
program2.command("duckdb").description("Starts a local DuckDB shell").option("--no-lineage", "Do not report the shell's lineage to oleander").addHelpText(
|
|
46905
47071
|
"after",
|
|
46906
47072
|
`
|
|
46907
|
-
|
|
47073
|
+
Runs DuckDB ${DUCKDB_VERSION}, downloaded to ~/.oleander on first use, with every catalog attached. Each
|
|
47074
|
+
statement that reads or writes a table reports its lineage to oleander (the oleander DuckDB extension,
|
|
47075
|
+
which DuckDB loads as an unsigned extension). Where no build is published (Intel Macs, Windows, musl
|
|
47076
|
+
Linux) your own duckdb starts, without lineage. For one-shot SQL on DuckDB, use oleander query --engine
|
|
47077
|
+
duckdb.
|
|
46908
47078
|
`
|
|
46909
47079
|
).action(duckdbTerminal);
|
|
46910
47080
|
registerSparkCommands(program2);
|