@fractary/codex 0.12.2 → 0.12.4
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 +15 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -460,7 +460,7 @@ declare const CodexConfigSchema: z.ZodObject<{
|
|
|
460
460
|
include: string[];
|
|
461
461
|
exclude?: string[] | undefined;
|
|
462
462
|
}>>;
|
|
463
|
-
from_codex: z.ZodOptional<z.ZodObject<{
|
|
463
|
+
from_codex: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
464
464
|
include: z.ZodArray<z.ZodString, "many">;
|
|
465
465
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
466
466
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -469,6 +469,12 @@ declare const CodexConfigSchema: z.ZodObject<{
|
|
|
469
469
|
}, {
|
|
470
470
|
include: string[];
|
|
471
471
|
exclude?: string[] | undefined;
|
|
472
|
+
}>, {
|
|
473
|
+
include: string[];
|
|
474
|
+
exclude?: string[] | undefined;
|
|
475
|
+
}, {
|
|
476
|
+
include: string[];
|
|
477
|
+
exclude?: string[] | undefined;
|
|
472
478
|
}>>;
|
|
473
479
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
474
480
|
default_to_codex: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -923,7 +929,7 @@ declare const UnifiedConfigSchema: z.ZodObject<{
|
|
|
923
929
|
include: string[];
|
|
924
930
|
exclude?: string[] | undefined;
|
|
925
931
|
}>>;
|
|
926
|
-
from_codex: z.ZodOptional<z.ZodObject<{
|
|
932
|
+
from_codex: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
927
933
|
include: z.ZodArray<z.ZodString, "many">;
|
|
928
934
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
929
935
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -932,6 +938,12 @@ declare const UnifiedConfigSchema: z.ZodObject<{
|
|
|
932
938
|
}, {
|
|
933
939
|
include: string[];
|
|
934
940
|
exclude?: string[] | undefined;
|
|
941
|
+
}>, {
|
|
942
|
+
include: string[];
|
|
943
|
+
exclude?: string[] | undefined;
|
|
944
|
+
}, {
|
|
945
|
+
include: string[];
|
|
946
|
+
exclude?: string[] | undefined;
|
|
935
947
|
}>>;
|
|
936
948
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
937
949
|
default_to_codex: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
package/dist/index.d.ts
CHANGED
|
@@ -460,7 +460,7 @@ declare const CodexConfigSchema: z.ZodObject<{
|
|
|
460
460
|
include: string[];
|
|
461
461
|
exclude?: string[] | undefined;
|
|
462
462
|
}>>;
|
|
463
|
-
from_codex: z.ZodOptional<z.ZodObject<{
|
|
463
|
+
from_codex: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
464
464
|
include: z.ZodArray<z.ZodString, "many">;
|
|
465
465
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
466
466
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -469,6 +469,12 @@ declare const CodexConfigSchema: z.ZodObject<{
|
|
|
469
469
|
}, {
|
|
470
470
|
include: string[];
|
|
471
471
|
exclude?: string[] | undefined;
|
|
472
|
+
}>, {
|
|
473
|
+
include: string[];
|
|
474
|
+
exclude?: string[] | undefined;
|
|
475
|
+
}, {
|
|
476
|
+
include: string[];
|
|
477
|
+
exclude?: string[] | undefined;
|
|
472
478
|
}>>;
|
|
473
479
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
474
480
|
default_to_codex: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -923,7 +929,7 @@ declare const UnifiedConfigSchema: z.ZodObject<{
|
|
|
923
929
|
include: string[];
|
|
924
930
|
exclude?: string[] | undefined;
|
|
925
931
|
}>>;
|
|
926
|
-
from_codex: z.ZodOptional<z.ZodObject<{
|
|
932
|
+
from_codex: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
927
933
|
include: z.ZodArray<z.ZodString, "many">;
|
|
928
934
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
929
935
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -932,6 +938,12 @@ declare const UnifiedConfigSchema: z.ZodObject<{
|
|
|
932
938
|
}, {
|
|
933
939
|
include: string[];
|
|
934
940
|
exclude?: string[] | undefined;
|
|
941
|
+
}>, {
|
|
942
|
+
include: string[];
|
|
943
|
+
exclude?: string[] | undefined;
|
|
944
|
+
}, {
|
|
945
|
+
include: string[];
|
|
946
|
+
exclude?: string[] | undefined;
|
|
935
947
|
}>>;
|
|
936
948
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
937
949
|
default_to_codex: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
package/dist/index.js
CHANGED
|
@@ -899,12 +899,24 @@ var DirectionalSyncConfigSchema = z.object({
|
|
|
899
899
|
/** Patterns to exclude (optional) */
|
|
900
900
|
exclude: z.array(z.string()).optional()
|
|
901
901
|
});
|
|
902
|
+
var FromCodexSyncConfigSchema = DirectionalSyncConfigSchema.refine(
|
|
903
|
+
(config) => {
|
|
904
|
+
const includeValid = config.include.every(
|
|
905
|
+
(pattern) => pattern.startsWith("codex://")
|
|
906
|
+
);
|
|
907
|
+
const excludeValid = !config.exclude || config.exclude.every((pattern) => pattern.startsWith("codex://"));
|
|
908
|
+
return includeValid && excludeValid;
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
message: 'from_codex patterns must use codex:// URI format (e.g., "codex://{org}/{codex_repo}/docs/**"). Plain paths like "docs/**" are not valid for from_codex.'
|
|
912
|
+
}
|
|
913
|
+
);
|
|
902
914
|
var DirectionalSyncSchema = z.object({
|
|
903
915
|
// New format (v0.7.0+) - Recommended
|
|
904
|
-
// Patterns for files to push from this project to codex
|
|
916
|
+
// Patterns for files to push from this project to codex (plain paths)
|
|
905
917
|
to_codex: DirectionalSyncConfigSchema.optional(),
|
|
906
|
-
// Patterns for files to pull from codex to this project
|
|
907
|
-
from_codex:
|
|
918
|
+
// Patterns for files to pull from codex to this project (codex:// URIs required)
|
|
919
|
+
from_codex: FromCodexSyncConfigSchema.optional(),
|
|
908
920
|
// Global exclude patterns (applied to both directions)
|
|
909
921
|
exclude: z.array(z.string()).optional(),
|
|
910
922
|
// Legacy format (deprecated, backward compatible)
|