@fractary/codex 0.10.0 → 0.11.1

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 CHANGED
@@ -888,12 +888,21 @@ var SyncRulesSchema = zod.z.object({
888
888
  defaultInclude: zod.z.array(zod.z.string()).optional(),
889
889
  defaultExclude: zod.z.array(zod.z.string()).optional()
890
890
  });
891
+ var DirectionalSyncConfigSchema = zod.z.object({
892
+ /** Patterns to include (required) */
893
+ include: zod.z.array(zod.z.string()),
894
+ /** Patterns to exclude (optional) */
895
+ exclude: zod.z.array(zod.z.string()).optional()
896
+ });
891
897
  var DirectionalSyncSchema = zod.z.object({
898
+ // New format (v0.7.0+) - Recommended
892
899
  // Patterns for files to push from this project to codex
893
- to_codex: zod.z.array(zod.z.string()).optional(),
900
+ to_codex: DirectionalSyncConfigSchema.optional(),
894
901
  // Patterns for files to pull from codex to this project
895
- // Format: "project-name/path/pattern" or "project-name/**"
896
- from_codex: zod.z.array(zod.z.string()).optional(),
902
+ from_codex: DirectionalSyncConfigSchema.optional(),
903
+ // Global exclude patterns (applied to both directions)
904
+ exclude: zod.z.array(zod.z.string()).optional(),
905
+ // Legacy format (deprecated, backward compatible)
897
906
  // Org-level defaults (only in codex repository config)
898
907
  default_to_codex: zod.z.array(zod.z.string()).optional(),
899
908
  default_from_codex: zod.z.array(zod.z.string()).optional()
@@ -3700,6 +3709,24 @@ var SyncManager = class {
3700
3709
  }
3701
3710
  return this.config.default_to_codex || [];
3702
3711
  }
3712
+ /**
3713
+ * Get resolved to-codex include patterns (public accessor)
3714
+ *
3715
+ * Returns the resolved patterns from config, handling both new format
3716
+ * (to_codex.include) and legacy format (default_to_codex).
3717
+ */
3718
+ getToCodexPatterns() {
3719
+ return this.resolveToCodexPatterns();
3720
+ }
3721
+ /**
3722
+ * Get resolved from-codex include patterns (public accessor)
3723
+ *
3724
+ * Returns the resolved patterns from config, handling both new format
3725
+ * (from_codex.include) and legacy format (default_from_codex).
3726
+ */
3727
+ getFromCodexPatterns() {
3728
+ return this.resolveFromCodexPatterns();
3729
+ }
3703
3730
  /**
3704
3731
  * Load the sync manifest
3705
3732
  */