@rudderhq/cli 0.2.10-canary.25 → 0.2.10-canary.27

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 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 isValidLibraryRelativePath(locator) {
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
- return !PROTECTED_LIBRARY_RESOURCE_ROOTS.has(parts[0] ?? "");
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 && !isValidLibraryRelativePath(value.locator)) {
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 relative path inside the organization Library.",
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, PROTECTED_LIBRARY_RESOURCE_ROOTS, createOrganizationResourceBaseSchema, createOrganizationResourceSchema, updateOrganizationResourceSchema, projectResourceAttachmentInputSchema, updateProjectResourceAttachmentSchema, createProjectInlineResourceSchema;
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,
@@ -10597,7 +10598,7 @@ var AGENT_CLI_CAPABILITIES = [
10597
10598
  id: "issue.documents.put",
10598
10599
  command: "rudder issue documents put <issue> <key> --body-file <path>",
10599
10600
  category: "issue",
10600
- description: "Legacy create or update of a DB-backed issue document; prefer `rudder library file put` for new docs.",
10601
+ description: "Legacy create or update of a DB-backed issue document; prefer `rudder library file put` for durable project files.",
10601
10602
  mutating: true,
10602
10603
  contract: "compat",
10603
10604
  requiresOrgId: false,
@@ -11607,15 +11608,11 @@ var RUDDER_AGENT_OPERATING_CONTRACT = [
11607
11608
  "- Personal skills live under `$AGENT_HOME/skills`.",
11608
11609
  "- Shared organization workspace root lives under `$RUDDER_ORG_WORKSPACE_ROOT`.",
11609
11610
  "- Shared organization skills live under `$RUDDER_ORG_SKILLS_DIR`.",
11610
- "- Shared organization plans live under `$RUDDER_ORG_PLANS_DIR`.",
11611
- "- Shared organization artifacts live under `$RUDDER_ORG_ARTIFACTS_DIR`.",
11612
- '- Library-backed project resources use `sourceType: "library"`; their `locator` is a safe path relative to `$RUDDER_ORG_WORKSPACE_ROOT`, usually under `docs/`, so read them from `$RUDDER_ORG_WORKSPACE_ROOT/<locator>` when that root is available. Rudder does not use protected system roots such as `agents/`, `artifacts/`, `plans/`, or `skills/` as project Library resources.',
11613
- "- Project Context is explicit operator-curated context, not the whole knowledge boundary. When it is insufficient, inspect broader Library docs and org workspace know-how before concluding context is missing.",
11614
- "- 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`.",
11615
- "- 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.",
11616
- "- 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.",
11617
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.",
11618
- "- Durable shared work output should prefer these managed workspace paths instead of ad-hoc top-level `projects/` folders.",
11619
11616
  "",
11620
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.",
11621
11618
  "",
@@ -11625,9 +11622,9 @@ var RUDDER_AGENT_OPERATING_CONTRACT = [
11625
11622
  "",
11626
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.",
11627
11624
  "",
11628
- "## Memory and Planning",
11625
+ "## Memory and Shared Work Notes",
11629
11626
  "",
11630
- "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 plans. 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/planning conventions.",
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.",
11631
11628
  "",
11632
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.",
11633
11630
  "",
@@ -12544,7 +12541,7 @@ function registerLibraryCommands(program) {
12544
12541
  const library = program.command("library").description("Library file operations");
12545
12542
  const file = library.command("file").description("Path-based Library file operations");
12546
12543
  addCommonClientOptions(
12547
- file.command("list").description(getAgentCliCapabilityById("library.file.list").description).argument("[directoryPath]", "Library directory path", "docs").action(async (directoryPath, opts) => {
12544
+ file.command("list").description(getAgentCliCapabilityById("library.file.list").description).argument("[directoryPath]", "Library directory path", "projects").action(async (directoryPath, opts) => {
12548
12545
  try {
12549
12546
  const ctx = resolveCommandContext(opts, { requireCompany: true });
12550
12547
  const search = new URLSearchParams();