@deployxai/dxc 0.1.4 → 0.1.6

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.
@@ -1,14 +1,14 @@
1
1
  import { createRequire as __dxcCreateRequire } from "node:module"; const require = __dxcCreateRequire(import.meta.url);
2
2
  import {
3
3
  sourceFetchResultSchema
4
- } from "./chunk-JGUPNE36.js";
4
+ } from "./chunk-N4CMLINP.js";
5
5
 
6
6
  // apps/cli/src/source.ts
7
7
  import { createHash } from "node:crypto";
8
8
  import { lookup as systemLookup } from "node:dns/promises";
9
9
  import { isIP } from "node:net";
10
10
 
11
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/util.js
11
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/util.js
12
12
  var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
13
13
  var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
14
14
  var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*";
@@ -36,7 +36,7 @@ function isExist(v) {
36
36
  return typeof v !== "undefined";
37
37
  }
38
38
 
39
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/validator.js
39
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/validator.js
40
40
  var defaultOptions = {
41
41
  allowBooleanAttributes: false,
42
42
  //A tag can have attributes without any value
@@ -342,7 +342,7 @@ function getPositionFromMatch(match) {
342
342
  return match.startIndex + match[1].length;
343
343
  }
344
344
 
345
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js
345
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js
346
346
  var defaultOptions2 = {
347
347
  preserveOrder: false,
348
348
  attributeNamePrefix: "@_",
@@ -392,7 +392,7 @@ var buildOptions = function(options) {
392
392
  return Object.assign({}, defaultOptions2, options);
393
393
  };
394
394
 
395
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js
395
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js
396
396
  var METADATA_SYMBOL;
397
397
  if (typeof Symbol !== "function") {
398
398
  METADATA_SYMBOL = "@@xmlMetadata";
@@ -426,7 +426,7 @@ var XmlNode = class {
426
426
  }
427
427
  };
428
428
 
429
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js
429
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js
430
430
  var DocTypeReader = class {
431
431
  constructor(processEntities) {
432
432
  this.suppressValidationErr = !processEntities;
@@ -688,7 +688,7 @@ function validateEntityName(name) {
688
688
  throw new Error(`Invalid entity name ${name}`);
689
689
  }
690
690
 
691
- // node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/digitTable.js
691
+ // ../../../../Code/dxc/node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/digitTable.js
692
692
  var SCRIPT_ZEROS = [
693
693
  // Basic Latin (ASCII) — included for completeness / pass-through
694
694
  48,
@@ -838,7 +838,7 @@ for (const zero of SCRIPT_ZEROS) {
838
838
  }
839
839
  }
840
840
 
841
- // node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/anynum.js
841
+ // ../../../../Code/dxc/node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/anynum.js
842
842
  var CHAR_0 = 48;
843
843
  var CHAR_9 = 57;
844
844
  var CHAR_MINUS = 45;
@@ -916,7 +916,7 @@ function anynum(str) {
916
916
  }
917
917
  var anynum_default = anynum;
918
918
 
919
- // node_modules/.pnpm/strnum@2.4.1/node_modules/strnum/strnum.js
919
+ // ../../../../Code/dxc/node_modules/.pnpm/strnum@2.4.1/node_modules/strnum/strnum.js
920
920
  var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;
921
921
  var binRegex = /^0b[01]+$/;
922
922
  var octRegex = /^0o[0-7]+$/;
@@ -1052,7 +1052,7 @@ function handleInfinity(str, num, options) {
1052
1052
  }
1053
1053
  }
1054
1054
 
1055
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/ignoreAttributes.js
1055
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/ignoreAttributes.js
1056
1056
  function getIgnoreAttributesFn(ignoreAttributes) {
1057
1057
  if (typeof ignoreAttributes === "function") {
1058
1058
  return ignoreAttributes;
@@ -1072,7 +1072,7 @@ function getIgnoreAttributesFn(ignoreAttributes) {
1072
1072
  return () => false;
1073
1073
  }
1074
1074
 
1075
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
1075
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
1076
1076
  var OrderedObjParser = class {
1077
1077
  constructor(options) {
1078
1078
  this.options = options;
@@ -1580,7 +1580,7 @@ function parseValue(val, shouldParse, options) {
1580
1580
  }
1581
1581
  }
1582
1582
 
1583
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/node2json.js
1583
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/node2json.js
1584
1584
  var METADATA_SYMBOL2 = XmlNode.getMetaDataSymbol();
1585
1585
  function prettify(node, options) {
1586
1586
  return compress(node, options);
@@ -1665,7 +1665,7 @@ function isLeafTag(obj, options) {
1665
1665
  return false;
1666
1666
  }
1667
1667
 
1668
- // node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
1668
+ // ../../../../Code/dxc/node_modules/.pnpm/fast-xml-parser@5.3.3/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
1669
1669
  var XMLParser = class {
1670
1670
  constructor(options) {
1671
1671
  this.externalEntities = {};
@@ -605,9 +605,21 @@ var publishingApprovalSchema = z4.object({
605
605
  accountId: z4.uuid(),
606
606
  confirmedAt: z4.iso.datetime(),
607
607
  id: z4.uuid(),
608
+ rootSnapshotHash: sha256Schema,
609
+ rootSnapshotId: z4.uuid(),
610
+ selectedSnapshotHash: sha256Schema,
611
+ selectedSnapshotId: z4.uuid(),
608
612
  snapshotHash: sha256Schema,
609
- snapshotId: z4.uuid()
610
- }).strict();
613
+ snapshotId: z4.uuid(),
614
+ templateId: wechatTemplateIdSchema
615
+ }).strict().superRefine((approval, context) => {
616
+ if (approval.snapshotId !== approval.selectedSnapshotId || approval.snapshotHash !== approval.selectedSnapshotHash) {
617
+ context.addIssue({
618
+ code: "custom",
619
+ message: "legacy snapshot aliases must identify the selected snapshot"
620
+ });
621
+ }
622
+ });
611
623
  var createPublishingDraftIntentRequestSchema = z4.object({
612
624
  approvalId: z4.uuid()
613
625
  }).strict();
@@ -668,33 +680,33 @@ var contentArtifactKindSchema = z5.enum(CONTENT_ARTIFACT_KINDS);
668
680
  var CONTENT_STAGE_SKILLS = {
669
681
  article: { name: "dxc-article-write", version: "0.1.0" },
670
682
  brief: { name: "dxc-content-brief", version: "0.1.0" },
671
- delivery: { name: "dxc-wechat-publisher", version: "0.5.0" },
683
+ delivery: { name: "dxc-wechat-publisher", version: "0.6.0" },
672
684
  outline: { name: "dxc-article-outline", version: "0.1.0" },
673
685
  "quality-review": { name: "dxc-content-review", version: "0.3.0" },
674
- research: { name: "dxc-research", version: "0.1.0" },
686
+ research: { name: "dxc-research", version: "0.2.0" },
675
687
  titles: { name: "dxc-title-write", version: "0.3.0" },
676
688
  "visual-plan": { name: "dxc-visual-plan", version: "0.3.0" }
677
689
  };
678
690
  var CONTENT_STAGE_INPUTS = {
679
691
  article: {
680
- optional: ["research"],
681
- required: ["brief", "outline"]
692
+ optional: [],
693
+ required: ["research", "brief", "outline"]
682
694
  },
683
695
  brief: {
684
696
  optional: [],
685
697
  required: ["research"]
686
698
  },
687
699
  delivery: {
688
- optional: ["visual-plan", "quality-review"],
689
- required: ["article", "titles"]
700
+ optional: [],
701
+ required: ["article", "titles", "visual-plan", "quality-review"]
690
702
  },
691
703
  outline: {
692
- optional: ["research"],
693
- required: ["brief"]
704
+ optional: [],
705
+ required: ["research", "brief"]
694
706
  },
695
707
  "quality-review": {
696
- optional: ["research", "visual-plan"],
697
- required: ["article", "titles"]
708
+ optional: ["visual-plan"],
709
+ required: ["research", "article", "titles"]
698
710
  },
699
711
  research: {
700
712
  optional: [],
@@ -824,14 +836,128 @@ var contentStageMetadataBaseShape = {
824
836
  skill: z5.string().regex(/^dxc-[a-z0-9]+(?:-[a-z0-9]+)*@\d+\.\d+\.\d+$/u),
825
837
  workflowId: z5.literal(CONTENT_WORKFLOW_ID)
826
838
  };
839
+ var researchSourceSchema = z5.object({
840
+ id: z5.string().regex(/^source-[a-z0-9][a-z0-9-]{0,63}$/u),
841
+ locator: z5.string().trim().min(1).max(2048),
842
+ observedAt: z5.iso.datetime(),
843
+ stance: z5.enum(["support", "oppose", "supplement", "neutral", "not-applicable"]),
844
+ type: z5.enum(["primary", "public-fact", "public-opinion", "local-history", "user-provided"]),
845
+ verification: z5.enum(["verified", "unverified"])
846
+ }).strict().superRefine((value, context) => {
847
+ if (["primary", "public-fact", "public-opinion"].includes(value.type)) {
848
+ try {
849
+ const url = new URL(value.locator);
850
+ if (url.protocol !== "http:" && url.protocol !== "https:") {
851
+ throw new Error("unsupported protocol");
852
+ }
853
+ } catch {
854
+ context.addIssue({
855
+ code: "custom",
856
+ message: "public research sources require a complete HTTP(S) URL",
857
+ path: ["locator"]
858
+ });
859
+ }
860
+ }
861
+ if (value.type === "public-opinion" && !["support", "oppose", "supplement"].includes(value.stance)) {
862
+ context.addIssue({
863
+ code: "custom",
864
+ message: "public opinion sources require a stance",
865
+ path: ["stance"]
866
+ });
867
+ }
868
+ });
869
+ var researchStanceCoverageSchema = z5.object({
870
+ oppose: z5.enum(["covered", "not-found", "not-applicable"]),
871
+ supplement: z5.enum(["covered", "not-found", "not-applicable"]),
872
+ support: z5.enum(["covered", "not-found", "not-applicable"])
873
+ }).strict();
827
874
  var researchStageArtifactFrontmatterSchema = z5.object({
875
+ coverageNote: z5.string().trim().min(1).max(1e3),
828
876
  dxc: z5.object({
829
877
  ...contentStageMetadataBaseShape,
830
878
  stage: z5.literal("research")
831
879
  }).strict(),
880
+ externalOpinionStatus: z5.enum(["covered", "not-applicable", "user-skipped"]),
832
881
  origin: z5.enum(["hotspot", "article", "keywords", "intent"]),
833
- sourceCount: z5.number().int().nonnegative()
834
- }).strict();
882
+ researchMode: z5.enum(["fact-only", "viewpoint-scan"]),
883
+ sourceCount: z5.number().int().nonnegative(),
884
+ sources: z5.array(researchSourceSchema).max(100),
885
+ stanceCoverage: researchStanceCoverageSchema
886
+ }).strict().superRefine((value, context) => {
887
+ if (value.sourceCount !== value.sources.length) {
888
+ context.addIssue({
889
+ code: "custom",
890
+ message: "sourceCount must equal the number of structured sources",
891
+ path: ["sourceCount"]
892
+ });
893
+ }
894
+ if (new Set(value.sources.map((source) => source.id)).size !== value.sources.length) {
895
+ context.addIssue({
896
+ code: "custom",
897
+ message: "research source ids must be unique",
898
+ path: ["sources"]
899
+ });
900
+ }
901
+ if (new Set(value.sources.map((source) => source.locator)).size !== value.sources.length) {
902
+ context.addIssue({
903
+ code: "custom",
904
+ message: "research source locators must be unique",
905
+ path: ["sources"]
906
+ });
907
+ }
908
+ if (value.researchMode === "fact-only") {
909
+ const expectedStatus = value.origin === "hotspot" ? "user-skipped" : "not-applicable";
910
+ if (value.externalOpinionStatus !== expectedStatus) {
911
+ context.addIssue({
912
+ code: "custom",
913
+ message: `fact-only ${value.origin} research requires externalOpinionStatus ${expectedStatus}`,
914
+ path: ["externalOpinionStatus"]
915
+ });
916
+ }
917
+ if (Object.values(value.stanceCoverage).some((coverage) => coverage !== "not-applicable")) {
918
+ context.addIssue({
919
+ code: "custom",
920
+ message: "fact-only research must mark stance coverage not-applicable",
921
+ path: ["stanceCoverage"]
922
+ });
923
+ }
924
+ return;
925
+ }
926
+ if (value.externalOpinionStatus !== "covered") {
927
+ context.addIssue({
928
+ code: "custom",
929
+ message: "viewpoint-scan research requires covered external opinions",
930
+ path: ["externalOpinionStatus"]
931
+ });
932
+ }
933
+ const opinionSources = value.sources.filter(
934
+ (source) => source.type === "public-opinion" && source.verification === "verified"
935
+ );
936
+ if (opinionSources.length < 3) {
937
+ context.addIssue({
938
+ code: "custom",
939
+ message: "viewpoint-scan research requires at least three verified public opinions",
940
+ path: ["sources"]
941
+ });
942
+ }
943
+ for (const stance of ["support", "supplement"]) {
944
+ if (value.stanceCoverage[stance] !== "covered" || !opinionSources.some((source) => source.stance === stance)) {
945
+ context.addIssue({
946
+ code: "custom",
947
+ message: `viewpoint-scan research requires covered ${stance} material`,
948
+ path: ["stanceCoverage", stance]
949
+ });
950
+ }
951
+ }
952
+ const hasOpposition = opinionSources.some((source) => source.stance === "oppose");
953
+ if (hasOpposition && value.stanceCoverage.oppose !== "covered" || !hasOpposition && value.stanceCoverage.oppose !== "not-found") {
954
+ context.addIssue({
955
+ code: "custom",
956
+ message: "opposition coverage must be covered or explicitly recorded as not-found",
957
+ path: ["stanceCoverage", "oppose"]
958
+ });
959
+ }
960
+ });
835
961
  var briefStageArtifactFrontmatterSchema = z5.object({
836
962
  dxc: z5.object({
837
963
  ...contentStageMetadataBaseShape,
@@ -866,6 +992,7 @@ var articleStageArtifactFrontmatterSchema = z5.object({
866
992
  quoteSnapshots: z5.array(contentQuoteSnapshotSchema).max(50).default([]),
867
993
  stage: z5.literal("article")
868
994
  }).strict(),
995
+ dxc_wechat_template_hint: z5.string().trim().min(1).optional(),
869
996
  goldenLinesPath: portableRelativePathSchema,
870
997
  goldenLinesSha256: z5.string().regex(/^[a-f0-9]{64}$/u),
871
998
  tags: z5.array(z5.string().trim().min(1)).default([]),
@@ -932,6 +1059,7 @@ var qualityReviewStageArtifactFrontmatterSchema = z5.object({
932
1059
  stage: z5.literal("quality-review")
933
1060
  }).strict(),
934
1061
  verdict: z5.enum(["pass", "block"]),
1062
+ researchCoverage: z5.enum(["not-applicable", "pass", "warning"]),
935
1063
  warningCount: z5.number().int().nonnegative()
936
1064
  }).strict().superRefine((value, context) => {
937
1065
  if (value.verdict === "pass" && value.blockerCount !== 0) {
@@ -948,6 +1076,13 @@ var qualityReviewStageArtifactFrontmatterSchema = z5.object({
948
1076
  path: ["blockerCount"]
949
1077
  });
950
1078
  }
1079
+ if (value.researchCoverage === "warning" && value.warningCount === 0) {
1080
+ context.addIssue({
1081
+ code: "custom",
1082
+ message: "research coverage warnings must be counted",
1083
+ path: ["warningCount"]
1084
+ });
1085
+ }
951
1086
  });
952
1087
  var deliveryStageArtifactFrontmatterSchema = z5.object({
953
1088
  accountId: z5.uuid(),
@@ -959,9 +1094,12 @@ var deliveryStageArtifactFrontmatterSchema = z5.object({
959
1094
  intentId: z5.uuid().nullable(),
960
1095
  mediaId: z5.string().trim().min(1).max(256).nullable().optional(),
961
1096
  previewExpiresAt: z5.iso.datetime(),
962
- snapshotHash: z5.string().regex(/^[a-f0-9]{64}$/u),
963
- snapshotId: z5.uuid(),
964
- state: z5.enum(["previewed", "processing", "completed", "requires-attention", "failed"])
1097
+ rootSnapshotHash: z5.string().regex(/^[a-f0-9]{64}$/u),
1098
+ rootSnapshotId: z5.uuid(),
1099
+ selectedSnapshotHash: z5.string().regex(/^[a-f0-9]{64}$/u),
1100
+ selectedSnapshotId: z5.uuid(),
1101
+ state: z5.enum(["previewed", "processing", "completed", "requires-attention", "failed"]),
1102
+ templateId: z5.string().regex(/^wechat-[a-z0-9-]+@\d+$/u)
965
1103
  }).strict().superRefine((value, context) => {
966
1104
  if (value.dxc.artifactStatus === "complete" && (value.state !== "completed" || value.intentId === null || value.mediaId === void 0 || value.mediaId === null)) {
967
1105
  context.addIssue({
@@ -1476,6 +1614,8 @@ var contentProfileErrorResultSchema = z5.object({
1476
1614
  command: contentProfileCommandSchema,
1477
1615
  error: z5.object({
1478
1616
  code: z5.enum(["DXC_PROFILE_INPUT_INVALID", "DXC_PROFILE_INVALID", "DXC_PROFILE_IO_FAILED"]),
1617
+ fields: z5.array(z5.string().trim().min(1)).optional(),
1618
+ hint: z5.string().trim().min(1).optional(),
1479
1619
  message: z5.string().trim().min(1)
1480
1620
  }).strict(),
1481
1621
  ok: z5.literal(false)
@@ -0,0 +1,37 @@
1
+ import { createRequire as __dxcCreateRequire } from "node:module"; const require = __dxcCreateRequire(import.meta.url);
2
+
3
+ // apps/cli/src/user-path.ts
4
+ import path from "node:path";
5
+ function expandHome(input, homeDirectory, pathApi) {
6
+ if (input === "~") {
7
+ return homeDirectory;
8
+ }
9
+ if (input.startsWith("~/") || input.startsWith("~\\")) {
10
+ return pathApi.join(homeDirectory, input.slice(2));
11
+ }
12
+ return input;
13
+ }
14
+ function windowsShellPath(input) {
15
+ const msys = /^\/([a-z])(?:\/(.*))?$/iu.exec(input);
16
+ if (msys !== null) {
17
+ return `${msys[1]?.toUpperCase()}:\\${(msys[2] ?? "").replaceAll("/", "\\")}`;
18
+ }
19
+ const mounted = /^\/(?:cygdrive|mnt)\/([a-z])(?:\/(.*))?$/iu.exec(input);
20
+ if (mounted !== null) {
21
+ return `${mounted[1]?.toUpperCase()}:\\${(mounted[2] ?? "").replaceAll("/", "\\")}`;
22
+ }
23
+ return input;
24
+ }
25
+ function resolveUserPath(options) {
26
+ const platform = options.platform ?? process.platform;
27
+ const pathApi = platform === "win32" ? path.win32 : path.posix;
28
+ const expanded = expandHome(options.input, options.homeDirectory, pathApi);
29
+ if (platform === "win32") {
30
+ return pathApi.resolve(options.currentDirectory, windowsShellPath(expanded));
31
+ }
32
+ return pathApi.resolve(options.currentDirectory, expanded);
33
+ }
34
+
35
+ export {
36
+ resolveUserPath
37
+ };
@@ -1,4 +1,7 @@
1
1
  import { createRequire as __dxcCreateRequire } from "node:module"; const require = __dxcCreateRequire(import.meta.url);
2
+ import {
3
+ resolveUserPath
4
+ } from "./chunk-ZKJQWR2J.js";
2
5
  import {
3
6
  CONTENT_KNOWLEDGE_CHUNKER_VERSION,
4
7
  CONTENT_KNOWLEDGE_EMBEDDING_DIMENSIONS,
@@ -24,7 +27,7 @@ import {
24
27
  readPrivateFile,
25
28
  writePrivateBuffer,
26
29
  writePrivateJson
27
- } from "./chunk-JGUPNE36.js";
30
+ } from "./chunk-N4CMLINP.js";
28
31
 
29
32
  // apps/cli/src/knowledge.ts
30
33
  import { createHash as createHash2, randomUUID } from "node:crypto";
@@ -588,8 +591,8 @@ ${paragraph.text}`;
588
591
  sha256: sha2562(chunk.body)
589
592
  }));
590
593
  }
591
- async function prepareArticle(currentDirectory, inputPath) {
592
- const absolutePath = path2.resolve(currentDirectory, inputPath);
594
+ async function prepareArticle(currentDirectory, homeDirectory, inputPath) {
595
+ const absolutePath = resolveUserPath({ currentDirectory, homeDirectory, input: inputPath });
593
596
  const extension = path2.extname(absolutePath).toLowerCase();
594
597
  if (!SUPPORTED_EXTENSIONS.has(extension)) {
595
598
  throw new KnowledgeCliError(
@@ -640,8 +643,8 @@ async function prepareArticle(currentDirectory, inputPath) {
640
643
  title: extractTitle(content, sourceLabel)
641
644
  };
642
645
  }
643
- async function directoryArticles(currentDirectory, directoryInput) {
644
- const root = path2.resolve(currentDirectory, directoryInput);
646
+ async function directoryArticles(currentDirectory, homeDirectory, directoryInput) {
647
+ const root = resolveUserPath({ currentDirectory, homeDirectory, input: directoryInput });
645
648
  let metadata;
646
649
  try {
647
650
  metadata = await lstat(root);
@@ -1726,7 +1729,7 @@ var KnowledgeCli = class {
1726
1729
  for (const file of options.files) {
1727
1730
  let article;
1728
1731
  try {
1729
- article = await prepareArticle(this.#currentDirectory, file);
1732
+ article = await prepareArticle(this.#currentDirectory, this.#homeDirectory, file);
1730
1733
  } catch (error) {
1731
1734
  const skippedItem = skippedArticle(error, file);
1732
1735
  if (skippedItem !== void 0) {
@@ -1782,7 +1785,7 @@ var KnowledgeCli = class {
1782
1785
  }
1783
1786
  async importDirectory(directory, lexicalOnly) {
1784
1787
  return this.importArticles({
1785
- files: await directoryArticles(this.#currentDirectory, directory),
1788
+ files: await directoryArticles(this.#currentDirectory, this.#homeDirectory, directory),
1786
1789
  lexicalOnly
1787
1790
  });
1788
1791
  }
@@ -2,7 +2,7 @@ import { createRequire as __dxcCreateRequire } from "node:module"; const require
2
2
  import {
3
3
  SourceCli,
4
4
  SourceCliError
5
- } from "./chunk-GCGIIKQJ.js";
5
+ } from "./chunk-GOEELHST.js";
6
6
  import {
7
7
  CONTENT_MONITOR_SCHEMA_VERSION,
8
8
  LocalStateError,
@@ -14,7 +14,7 @@ import {
14
14
  contentMonitorStatusResultSchema,
15
15
  ensurePrivateRegularFile,
16
16
  sourceFetchKindSchema
17
- } from "./chunk-JGUPNE36.js";
17
+ } from "./chunk-N4CMLINP.js";
18
18
 
19
19
  // apps/cli/src/monitor.ts
20
20
  import { createHash, randomUUID as systemRandomUUID } from "node:crypto";