@rudderhq/cli 0.2.10-canary.24 → 0.2.10-canary.26
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.js +185 -27
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -723,7 +723,7 @@ var init_organization_intelligence_profile = __esm({
|
|
|
723
723
|
|
|
724
724
|
// ../packages/shared/dist/validators/resource.js
|
|
725
725
|
import { z as z7 } from "zod";
|
|
726
|
-
function
|
|
726
|
+
function isValidLibraryProjectPath(locator, kind) {
|
|
727
727
|
const trimmed = locator.trim();
|
|
728
728
|
if (!trimmed)
|
|
729
729
|
return false;
|
|
@@ -736,7 +736,9 @@ function isValidLibraryRelativePath(locator) {
|
|
|
736
736
|
const parts = trimmed.split("/");
|
|
737
737
|
if (!parts.every((part) => part.length > 0 && part !== "." && part !== ".."))
|
|
738
738
|
return false;
|
|
739
|
-
|
|
739
|
+
if (parts[0] !== "projects")
|
|
740
|
+
return false;
|
|
741
|
+
return kind === "directory" ? parts.length >= 2 : parts.length >= 3;
|
|
740
742
|
}
|
|
741
743
|
function validateLibraryResourceContract(value, ctx) {
|
|
742
744
|
if (value.sourceType !== "library")
|
|
@@ -748,15 +750,15 @@ function validateLibraryResourceContract(value, ctx) {
|
|
|
748
750
|
path: ["kind"]
|
|
749
751
|
});
|
|
750
752
|
}
|
|
751
|
-
if (value.locator !== void 0 && !
|
|
753
|
+
if (value.locator !== void 0 && !isValidLibraryProjectPath(value.locator, value.kind)) {
|
|
752
754
|
ctx.addIssue({
|
|
753
755
|
code: z7.ZodIssueCode.custom,
|
|
754
|
-
message: "Library resource locator must be a normalized
|
|
756
|
+
message: "Library resource locator must be a normalized project Library path.",
|
|
755
757
|
path: ["locator"]
|
|
756
758
|
});
|
|
757
759
|
}
|
|
758
760
|
}
|
|
759
|
-
var organizationResourceKindSchema, organizationResourceSourceTypeSchema, projectResourceAttachmentRoleSchema, LIBRARY_PATH_SCHEME_RE,
|
|
761
|
+
var organizationResourceKindSchema, organizationResourceSourceTypeSchema, projectResourceAttachmentRoleSchema, LIBRARY_PATH_SCHEME_RE, createOrganizationResourceBaseSchema, createOrganizationResourceSchema, updateOrganizationResourceSchema, projectResourceAttachmentInputSchema, updateProjectResourceAttachmentSchema, createProjectInlineResourceSchema;
|
|
760
762
|
var init_resource = __esm({
|
|
761
763
|
"../packages/shared/dist/validators/resource.js"() {
|
|
762
764
|
"use strict";
|
|
@@ -765,7 +767,6 @@ var init_resource = __esm({
|
|
|
765
767
|
organizationResourceSourceTypeSchema = z7.enum(ORGANIZATION_RESOURCE_SOURCE_TYPES);
|
|
766
768
|
projectResourceAttachmentRoleSchema = z7.enum(PROJECT_RESOURCE_ATTACHMENT_ROLES);
|
|
767
769
|
LIBRARY_PATH_SCHEME_RE = /^[a-z][a-z0-9+.-]*:/i;
|
|
768
|
-
PROTECTED_LIBRARY_RESOURCE_ROOTS = /* @__PURE__ */ new Set(["agents", "artifacts", "plans", "skills"]);
|
|
769
770
|
createOrganizationResourceBaseSchema = z7.object({
|
|
770
771
|
name: z7.string().min(1),
|
|
771
772
|
kind: organizationResourceKindSchema,
|
|
@@ -4291,10 +4292,10 @@ var init_install = __esm({
|
|
|
4291
4292
|
init_home();
|
|
4292
4293
|
RUNTIME_NPM_PACKAGE_NAME = "@rudderhq/server";
|
|
4293
4294
|
RUNTIME_METADATA_FILE = "runtime.json";
|
|
4294
|
-
DEFAULT_RUNTIME_CACHE_MAX_ENTRIES =
|
|
4295
|
+
DEFAULT_RUNTIME_CACHE_MAX_ENTRIES = 2;
|
|
4295
4296
|
DEFAULT_RUNTIME_CACHE_MAX_AGE_MS = 14 * 24 * 60 * 60 * 1e3;
|
|
4296
4297
|
DEFAULT_RUNTIME_CACHE_MAX_BYTES = 2 * 1024 * 1024 * 1024;
|
|
4297
|
-
DEFAULT_RUNTIME_CACHE_KEEP_PREVIOUS =
|
|
4298
|
+
DEFAULT_RUNTIME_CACHE_KEEP_PREVIOUS = 0;
|
|
4298
4299
|
RUNTIME_NPM_INSTALL_FLAGS = ["--omit=dev", "--include=optional", "--no-audit", "--no-fund"];
|
|
4299
4300
|
RuntimeInstallError = class extends Error {
|
|
4300
4301
|
cacheDir;
|
|
@@ -6546,7 +6547,7 @@ init_install();
|
|
|
6546
6547
|
import { spawn, spawnSync as spawnSync3 } from "node:child_process";
|
|
6547
6548
|
import { createHash } from "node:crypto";
|
|
6548
6549
|
import { constants as fsConstants, createWriteStream, mkdirSync, readFileSync as readFileSync2 } from "node:fs";
|
|
6549
|
-
import { access, chmod, copyFile, cp, mkdtemp, mkdir as mkdir2, readFile as readFile2, readdir as readdir2, rm as rm2, writeFile as writeFile2 } from "node:fs/promises";
|
|
6550
|
+
import { access, chmod, copyFile, cp, mkdtemp, mkdir as mkdir2, readFile as readFile2, readdir as readdir2, rm as rm2, stat as stat2, utimes, writeFile as writeFile2 } from "node:fs/promises";
|
|
6550
6551
|
import { homedir, tmpdir } from "node:os";
|
|
6551
6552
|
import path11 from "node:path";
|
|
6552
6553
|
import { Readable, Transform } from "node:stream";
|
|
@@ -6677,6 +6678,10 @@ var DESKTOP_METADATA_FILE = ".rudder-desktop-install.json";
|
|
|
6677
6678
|
var DESKTOP_CHECKSUM_ASSET_NAME = "SHASUMS256.txt";
|
|
6678
6679
|
var DESKTOP_ASSET_CACHE_DIR = "desktop-assets";
|
|
6679
6680
|
var GITHUB_ASSET_DOWNLOAD_ACCEPT = "application/octet-stream";
|
|
6681
|
+
var DEFAULT_DESKTOP_ASSET_CACHE_MAX_ENTRIES = 2;
|
|
6682
|
+
var DEFAULT_DESKTOP_ASSET_CACHE_MAX_AGE_MS = 14 * 24 * 60 * 60 * 1e3;
|
|
6683
|
+
var DEFAULT_DESKTOP_ASSET_CACHE_MAX_BYTES = 768 * 1024 * 1024;
|
|
6684
|
+
var DEFAULT_DESKTOP_ASSET_CACHE_KEEP_PREVIOUS = 1;
|
|
6680
6685
|
function normalizeProgressTotal(totalBytes) {
|
|
6681
6686
|
return typeof totalBytes === "number" && Number.isFinite(totalBytes) && totalBytes > 0 ? totalBytes : null;
|
|
6682
6687
|
}
|
|
@@ -7141,12 +7146,158 @@ function resolveDesktopAssetCacheDir(assetChecksum, homeDir = resolveRudderHomeD
|
|
|
7141
7146
|
function resolveDesktopCachedAssetPath(assetName, assetChecksum, homeDir = resolveRudderHomeDir()) {
|
|
7142
7147
|
return path11.join(resolveDesktopAssetCacheDir(assetChecksum, homeDir), path11.basename(assetName));
|
|
7143
7148
|
}
|
|
7149
|
+
async function pruneDesktopAssetCache(options = {}) {
|
|
7150
|
+
const homeDir = options.homeDir ?? resolveRudderHomeDir();
|
|
7151
|
+
const entries = await scanDesktopAssetCacheEntries(homeDir);
|
|
7152
|
+
const protectedChecksums = resolveProtectedDesktopAssetChecksums(entries, {
|
|
7153
|
+
protectedChecksums: options.protectedChecksums ?? [],
|
|
7154
|
+
keepPreviousEntries: options.keepPreviousEntries ?? DEFAULT_DESKTOP_ASSET_CACHE_KEEP_PREVIOUS
|
|
7155
|
+
});
|
|
7156
|
+
const protectedSet = new Set(protectedChecksums);
|
|
7157
|
+
const deletions = planDesktopAssetCacheDeletions(entries, {
|
|
7158
|
+
nowMs: (options.now ?? /* @__PURE__ */ new Date()).getTime(),
|
|
7159
|
+
protectedChecksums: protectedSet,
|
|
7160
|
+
maxEntries: options.maxEntries ?? DEFAULT_DESKTOP_ASSET_CACHE_MAX_ENTRIES,
|
|
7161
|
+
maxAgeMs: options.maxAgeMs ?? DEFAULT_DESKTOP_ASSET_CACHE_MAX_AGE_MS,
|
|
7162
|
+
maxTotalBytes: options.maxTotalBytes ?? DEFAULT_DESKTOP_ASSET_CACHE_MAX_BYTES
|
|
7163
|
+
});
|
|
7164
|
+
const deleted = [];
|
|
7165
|
+
const warnings = [];
|
|
7166
|
+
for (const entry of deletions) {
|
|
7167
|
+
try {
|
|
7168
|
+
await rm2(entry.cacheDir, { recursive: true, force: true });
|
|
7169
|
+
deleted.push({
|
|
7170
|
+
cacheDir: entry.cacheDir,
|
|
7171
|
+
checksum: entry.checksum,
|
|
7172
|
+
sizeBytes: entry.sizeBytes
|
|
7173
|
+
});
|
|
7174
|
+
} catch (error) {
|
|
7175
|
+
warnings.push(
|
|
7176
|
+
`Failed to remove Desktop asset cache ${entry.cacheDir}: ${error instanceof Error ? error.message : String(error)}`
|
|
7177
|
+
);
|
|
7178
|
+
}
|
|
7179
|
+
}
|
|
7180
|
+
return {
|
|
7181
|
+
scanned: entries.length,
|
|
7182
|
+
deleted,
|
|
7183
|
+
protectedChecksums,
|
|
7184
|
+
freedBytes: deleted.reduce((total, entry) => total + entry.sizeBytes, 0),
|
|
7185
|
+
warnings
|
|
7186
|
+
};
|
|
7187
|
+
}
|
|
7188
|
+
async function maybePruneDesktopAssetCache(options) {
|
|
7189
|
+
const result = await pruneDesktopAssetCache(options);
|
|
7190
|
+
return result.deleted.length > 0 || result.warnings.length > 0 ? result : null;
|
|
7191
|
+
}
|
|
7192
|
+
async function scanDesktopAssetCacheEntries(homeDir) {
|
|
7193
|
+
const cacheRoot = path11.join(homeDir, DESKTOP_ASSET_CACHE_DIR);
|
|
7194
|
+
const dirents = await readdir2(cacheRoot, { withFileTypes: true }).catch(() => null);
|
|
7195
|
+
if (!dirents) return [];
|
|
7196
|
+
const entries = [];
|
|
7197
|
+
for (const dirent of dirents) {
|
|
7198
|
+
if (!dirent.isDirectory()) continue;
|
|
7199
|
+
let checksum;
|
|
7200
|
+
try {
|
|
7201
|
+
checksum = normalizeDesktopAssetChecksum(dirent.name);
|
|
7202
|
+
} catch {
|
|
7203
|
+
continue;
|
|
7204
|
+
}
|
|
7205
|
+
const cacheDir = path11.join(cacheRoot, dirent.name);
|
|
7206
|
+
const stats = await desktopCacheDirectoryStats(cacheDir);
|
|
7207
|
+
entries.push({
|
|
7208
|
+
cacheDir,
|
|
7209
|
+
checksum,
|
|
7210
|
+
lastUsedAtMs: stats.lastUsedAtMs,
|
|
7211
|
+
sizeBytes: stats.sizeBytes
|
|
7212
|
+
});
|
|
7213
|
+
}
|
|
7214
|
+
return entries;
|
|
7215
|
+
}
|
|
7216
|
+
async function desktopCacheDirectoryStats(targetPath) {
|
|
7217
|
+
const fallbackStat = await stat2(targetPath).catch(() => null);
|
|
7218
|
+
const dirents = await readdir2(targetPath, { withFileTypes: true }).catch(() => null);
|
|
7219
|
+
if (!dirents) {
|
|
7220
|
+
return {
|
|
7221
|
+
sizeBytes: 0,
|
|
7222
|
+
lastUsedAtMs: Number(fallbackStat?.mtimeMs ?? 0)
|
|
7223
|
+
};
|
|
7224
|
+
}
|
|
7225
|
+
let sizeBytes = 0;
|
|
7226
|
+
let lastUsedAtMs = Number(fallbackStat?.mtimeMs ?? 0);
|
|
7227
|
+
for (const dirent of dirents) {
|
|
7228
|
+
if (dirent.isSymbolicLink()) continue;
|
|
7229
|
+
const entryPath = path11.join(targetPath, dirent.name);
|
|
7230
|
+
const entryStat = await stat2(entryPath).catch(() => null);
|
|
7231
|
+
if (!entryStat) continue;
|
|
7232
|
+
lastUsedAtMs = Math.max(lastUsedAtMs, Number(entryStat.mtimeMs ?? 0));
|
|
7233
|
+
if (dirent.isDirectory()) {
|
|
7234
|
+
const nested = await desktopCacheDirectoryStats(entryPath);
|
|
7235
|
+
sizeBytes += nested.sizeBytes;
|
|
7236
|
+
lastUsedAtMs = Math.max(lastUsedAtMs, nested.lastUsedAtMs);
|
|
7237
|
+
continue;
|
|
7238
|
+
}
|
|
7239
|
+
sizeBytes += Number(entryStat.size ?? 0);
|
|
7240
|
+
}
|
|
7241
|
+
return { sizeBytes, lastUsedAtMs };
|
|
7242
|
+
}
|
|
7243
|
+
function resolveProtectedDesktopAssetChecksums(entries, options) {
|
|
7244
|
+
const protectedChecksums = /* @__PURE__ */ new Set();
|
|
7245
|
+
for (const checksum of options.protectedChecksums) {
|
|
7246
|
+
try {
|
|
7247
|
+
protectedChecksums.add(normalizeDesktopAssetChecksum(checksum));
|
|
7248
|
+
} catch {
|
|
7249
|
+
continue;
|
|
7250
|
+
}
|
|
7251
|
+
}
|
|
7252
|
+
const previousEntries = [...entries].filter((entry) => !protectedChecksums.has(entry.checksum)).sort((a, b) => b.lastUsedAtMs - a.lastUsedAtMs);
|
|
7253
|
+
for (const entry of previousEntries.slice(0, Math.max(0, options.keepPreviousEntries))) {
|
|
7254
|
+
protectedChecksums.add(entry.checksum);
|
|
7255
|
+
}
|
|
7256
|
+
return [...protectedChecksums].sort();
|
|
7257
|
+
}
|
|
7258
|
+
function planDesktopAssetCacheDeletions(entries, options) {
|
|
7259
|
+
const deletions = /* @__PURE__ */ new Set();
|
|
7260
|
+
const oldestFirst = [...entries].sort((a, b) => a.lastUsedAtMs - b.lastUsedAtMs);
|
|
7261
|
+
const canDelete = (entry) => !options.protectedChecksums.has(entry.checksum) && !deletions.has(entry.cacheDir);
|
|
7262
|
+
const mark = (entry) => {
|
|
7263
|
+
if (canDelete(entry)) deletions.add(entry.cacheDir);
|
|
7264
|
+
};
|
|
7265
|
+
if (options.maxAgeMs >= 0) {
|
|
7266
|
+
for (const entry of oldestFirst) {
|
|
7267
|
+
if (options.nowMs - entry.lastUsedAtMs > options.maxAgeMs) mark(entry);
|
|
7268
|
+
}
|
|
7269
|
+
}
|
|
7270
|
+
if (options.maxEntries > 0) {
|
|
7271
|
+
for (const entry of oldestFirst) {
|
|
7272
|
+
if (entries.length - deletions.size <= options.maxEntries) break;
|
|
7273
|
+
mark(entry);
|
|
7274
|
+
}
|
|
7275
|
+
}
|
|
7276
|
+
if (options.maxTotalBytes > 0) {
|
|
7277
|
+
let remainingBytes = entries.reduce((total, entry) => total + entry.sizeBytes, 0) - [...deletions].reduce((total, cacheDir) => total + (entries.find((entry) => entry.cacheDir === cacheDir)?.sizeBytes ?? 0), 0);
|
|
7278
|
+
for (const entry of oldestFirst) {
|
|
7279
|
+
if (remainingBytes <= options.maxTotalBytes) break;
|
|
7280
|
+
if (!canDelete(entry)) continue;
|
|
7281
|
+
deletions.add(entry.cacheDir);
|
|
7282
|
+
remainingBytes -= entry.sizeBytes;
|
|
7283
|
+
}
|
|
7284
|
+
}
|
|
7285
|
+
return entries.filter((entry) => deletions.has(entry.cacheDir));
|
|
7286
|
+
}
|
|
7287
|
+
async function touchDesktopCachedAsset(cachePath) {
|
|
7288
|
+
try {
|
|
7289
|
+
const now = /* @__PURE__ */ new Date();
|
|
7290
|
+
await utimes(cachePath, now, now);
|
|
7291
|
+
} catch {
|
|
7292
|
+
}
|
|
7293
|
+
}
|
|
7144
7294
|
async function downloadDesktopAssetWithCache(asset, expectedChecksum, options = {}) {
|
|
7145
7295
|
const normalizedChecksum = normalizeDesktopAssetChecksum(expectedChecksum);
|
|
7146
7296
|
const cachePath = resolveDesktopCachedAssetPath(asset.name, normalizedChecksum, options.homeDir);
|
|
7147
7297
|
if (await pathExists(cachePath)) {
|
|
7148
7298
|
try {
|
|
7149
7299
|
const checksum = assertChecksumMatch(cachePath, normalizedChecksum);
|
|
7300
|
+
await touchDesktopCachedAsset(cachePath);
|
|
7150
7301
|
return { path: cachePath, checksum, cacheStatus: "hit" };
|
|
7151
7302
|
} catch {
|
|
7152
7303
|
await rm2(cachePath, { force: true });
|
|
@@ -7753,6 +7904,17 @@ async function startCommand(opts) {
|
|
|
7753
7904
|
);
|
|
7754
7905
|
await writeInstallMetadata(installPaths, releaseTag, selectedAsset.name, checksum, selectedAssetKind);
|
|
7755
7906
|
}
|
|
7907
|
+
const desktopAssetPrune = await maybePruneDesktopAssetCache({
|
|
7908
|
+
protectedChecksums: [expectedChecksum]
|
|
7909
|
+
});
|
|
7910
|
+
if (desktopAssetPrune) {
|
|
7911
|
+
if (desktopAssetPrune.deleted.length > 0) {
|
|
7912
|
+
p13.log.success(
|
|
7913
|
+
`Pruned ${desktopAssetPrune.deleted.length} old Desktop asset cache(s), freed ${formatBytes(desktopAssetPrune.freedBytes)}.`
|
|
7914
|
+
);
|
|
7915
|
+
}
|
|
7916
|
+
for (const warning of desktopAssetPrune.warnings) p13.log.warn(warning);
|
|
7917
|
+
}
|
|
7756
7918
|
if (opts.open !== false) {
|
|
7757
7919
|
await runStartPhase(
|
|
7758
7920
|
"Launching Rudder Desktop...",
|
|
@@ -8858,7 +9020,7 @@ function registerContextCommands(program) {
|
|
|
8858
9020
|
}
|
|
8859
9021
|
|
|
8860
9022
|
// src/commands/client/company.ts
|
|
8861
|
-
import { mkdir as mkdir3, readdir as readdir3, readFile as readFile3, stat as
|
|
9023
|
+
import { mkdir as mkdir3, readdir as readdir3, readFile as readFile3, stat as stat3, writeFile as writeFile3 } from "node:fs/promises";
|
|
8862
9024
|
import path15 from "node:path";
|
|
8863
9025
|
import * as p15 from "@clack/prompts";
|
|
8864
9026
|
import pc14 from "picocolors";
|
|
@@ -9593,7 +9755,7 @@ function normalizeGithubImportSource(input, refOverride) {
|
|
|
9593
9755
|
}
|
|
9594
9756
|
async function pathExists2(inputPath) {
|
|
9595
9757
|
try {
|
|
9596
|
-
await
|
|
9758
|
+
await stat3(path15.resolve(inputPath));
|
|
9597
9759
|
return true;
|
|
9598
9760
|
} catch {
|
|
9599
9761
|
return false;
|
|
@@ -9616,7 +9778,7 @@ async function collectPackageFiles(root, current, files) {
|
|
|
9616
9778
|
}
|
|
9617
9779
|
async function resolveInlineSourceFromPath(inputPath) {
|
|
9618
9780
|
const resolved = path15.resolve(inputPath);
|
|
9619
|
-
const resolvedStat = await
|
|
9781
|
+
const resolvedStat = await stat3(resolved);
|
|
9620
9782
|
if (resolvedStat.isFile() && path15.extname(resolved).toLowerCase() === ".zip") {
|
|
9621
9783
|
const archive = await readZipArchive(await readFile3(resolved));
|
|
9622
9784
|
const filteredFiles = Object.fromEntries(
|
|
@@ -9652,7 +9814,7 @@ async function writeExportToFolder(outDir, exported) {
|
|
|
9652
9814
|
}
|
|
9653
9815
|
async function confirmOverwriteExportDirectory(outDir) {
|
|
9654
9816
|
const root = path15.resolve(outDir);
|
|
9655
|
-
const stats = await
|
|
9817
|
+
const stats = await stat3(root).catch(() => null);
|
|
9656
9818
|
if (!stats) return;
|
|
9657
9819
|
if (!stats.isDirectory()) {
|
|
9658
9820
|
throw new Error(`Export output path ${root} exists and is not a directory.`);
|
|
@@ -10079,7 +10241,7 @@ ${organizationUrl}`);
|
|
|
10079
10241
|
|
|
10080
10242
|
// src/commands/client/issue.ts
|
|
10081
10243
|
init_dist();
|
|
10082
|
-
import { readFile as readFile4, stat as
|
|
10244
|
+
import { readFile as readFile4, stat as stat4 } from "node:fs/promises";
|
|
10083
10245
|
import path16 from "node:path";
|
|
10084
10246
|
|
|
10085
10247
|
// src/agent-v1-registry.ts
|
|
@@ -10436,7 +10598,7 @@ var AGENT_CLI_CAPABILITIES = [
|
|
|
10436
10598
|
id: "issue.documents.put",
|
|
10437
10599
|
command: "rudder issue documents put <issue> <key> --body-file <path>",
|
|
10438
10600
|
category: "issue",
|
|
10439
|
-
description: "Legacy create or update of a DB-backed issue document; prefer `rudder library file put` for
|
|
10601
|
+
description: "Legacy create or update of a DB-backed issue document; prefer `rudder library file put` for durable project files.",
|
|
10440
10602
|
mutating: true,
|
|
10441
10603
|
contract: "compat",
|
|
10442
10604
|
requiresOrgId: false,
|
|
@@ -11199,7 +11361,7 @@ ${imageBlock}` : imageBlock;
|
|
|
11199
11361
|
}
|
|
11200
11362
|
async function uploadIssueCommentImage(ctx, issue, imagePath) {
|
|
11201
11363
|
const resolvedPath = path16.resolve(process.cwd(), imagePath);
|
|
11202
|
-
const stats = await
|
|
11364
|
+
const stats = await stat4(resolvedPath).catch((err) => {
|
|
11203
11365
|
throw new Error(`Unable to read image ${imagePath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
11204
11366
|
});
|
|
11205
11367
|
if (!stats.isFile()) {
|
|
@@ -11446,15 +11608,11 @@ var RUDDER_AGENT_OPERATING_CONTRACT = [
|
|
|
11446
11608
|
"- Personal skills live under `$AGENT_HOME/skills`.",
|
|
11447
11609
|
"- Shared organization workspace root lives under `$RUDDER_ORG_WORKSPACE_ROOT`.",
|
|
11448
11610
|
"- Shared organization skills live under `$RUDDER_ORG_SKILLS_DIR`.",
|
|
11449
|
-
|
|
11450
|
-
"-
|
|
11451
|
-
|
|
11452
|
-
"-
|
|
11453
|
-
"- Durable generated Markdown documents, plans, design docs, and decision notes should be written under `$RUDDER_ORG_WORKSPACE_ROOT/docs/` when available, preferably through `rudder library file put docs/<file>.md --body-file <path> --json`.",
|
|
11454
|
-
"- Durable generated assets such as screenshots, images, mockups, reports, CSVs, handoff logs, and other user-visible non-doc files should be written under `$RUDDER_ORG_ARTIFACTS_DIR` when available.",
|
|
11455
|
-
"- Use `/tmp` only for transient scratch files and temporary verification artifacts; do not put durable work product there.",
|
|
11611
|
+
'- Library-backed project resources use `sourceType: "library"`; their `locator` points into `library:projects/<project-name>/`.',
|
|
11612
|
+
"- Project Context is explicit operator-curated context, not the whole knowledge boundary. When it is insufficient, inspect broader Library and org workspace know-how before concluding context is missing.",
|
|
11613
|
+
"- Durable generated project work files should be written under `library:projects/<project-name>/`.",
|
|
11614
|
+
"- Use `/tmp` only for transient scratch files and temporary verification files; do not put durable work product there.",
|
|
11456
11615
|
"- Local trusted runtimes may expose the host operator home as `$RUDDER_OPERATOR_HOME`; use it only when a local skill or script intentionally needs operator-owned desktop app or CLI state. Do not replace `$HOME` with it.",
|
|
11457
|
-
"- Durable shared work output should prefer these managed workspace paths instead of ad-hoc top-level `projects/` folders.",
|
|
11458
11616
|
"",
|
|
11459
11617
|
"When you create or copy a skill under `$AGENT_HOME/skills/<slug>/`, check the agent's Skills snapshot before claiming it will load in future runs. If it is installed but not enabled, say exactly that future runs will not load it until enabled, and offer to enable it with `rudder agent skills enable <agent-id> <selection-ref>` when you have permission.",
|
|
11460
11618
|
"",
|
|
@@ -11464,9 +11622,9 @@ var RUDDER_AGENT_OPERATING_CONTRACT = [
|
|
|
11464
11622
|
"",
|
|
11465
11623
|
"When an issue comment, done comment, or blocker comment cites visual evidence from a local screenshot/image path, attach the image with the Rudder CLI `--image <path>` option instead of leaving only the filesystem path in the text.",
|
|
11466
11624
|
"",
|
|
11467
|
-
"## Memory and
|
|
11625
|
+
"## Memory and Shared Work Notes",
|
|
11468
11626
|
"",
|
|
11469
|
-
"You MUST use the `para-memory-files` skill for all memory operations: storing facts, writing daily notes, creating entities, running weekly synthesis, recalling past context, and managing
|
|
11627
|
+
"You MUST use the `para-memory-files` skill for all memory operations: storing facts, writing daily notes, creating entities, running weekly synthesis, recalling past context, and managing shared work notes. The skill defines your three-layer memory system (knowledge graph, daily notes, tacit knowledge), the PARA folder structure, atomic fact schemas, memory decay rules, and recall conventions.",
|
|
11470
11628
|
"",
|
|
11471
11629
|
"Keep stable preferences and operating lessons in `$AGENT_HOME/instructions/MEMORY.md`. Use `$AGENT_HOME/memory/YYYY-MM-DD.md` for daily notes and `$AGENT_HOME/life/` for structured long-term memory; those files are not auto-loaded.",
|
|
11472
11630
|
"",
|
|
@@ -12383,7 +12541,7 @@ function registerLibraryCommands(program) {
|
|
|
12383
12541
|
const library = program.command("library").description("Library file operations");
|
|
12384
12542
|
const file = library.command("file").description("Path-based Library file operations");
|
|
12385
12543
|
addCommonClientOptions(
|
|
12386
|
-
file.command("list").description(getAgentCliCapabilityById("library.file.list").description).argument("[directoryPath]", "Library directory path", "
|
|
12544
|
+
file.command("list").description(getAgentCliCapabilityById("library.file.list").description).argument("[directoryPath]", "Library directory path", "projects").action(async (directoryPath, opts) => {
|
|
12387
12545
|
try {
|
|
12388
12546
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
12389
12547
|
const search = new URLSearchParams();
|