@codelia/config 0.1.90 → 0.1.93
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 +59 -11
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +59 -11
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -327,6 +327,7 @@ var CONFIG_GROUP_DEFAULT_WRITE_SCOPE = {
|
|
|
327
327
|
experimental: "global",
|
|
328
328
|
permissions: "project",
|
|
329
329
|
mcp: "project",
|
|
330
|
+
agents: "project",
|
|
330
331
|
skills: "project",
|
|
331
332
|
execution_environment: "project",
|
|
332
333
|
search: "project",
|
|
@@ -655,14 +656,56 @@ var parseSubagentConfig = (value, source) => {
|
|
|
655
656
|
};
|
|
656
657
|
var parseAuthConfig = (value, source) => {
|
|
657
658
|
if (!isRecord(value)) return void 0;
|
|
658
|
-
const
|
|
659
|
-
if (storage
|
|
660
|
-
|
|
661
|
-
|
|
659
|
+
const result = {};
|
|
660
|
+
if (value.storage !== void 0) {
|
|
661
|
+
const storage = value.storage;
|
|
662
|
+
if (storage === "auto" || storage === "keyring" || storage === "file") {
|
|
663
|
+
result.storage = storage;
|
|
664
|
+
} else {
|
|
665
|
+
throw new Error(
|
|
666
|
+
`${source}: auth.storage must be "auto", "keyring", or "file"`
|
|
667
|
+
);
|
|
668
|
+
}
|
|
662
669
|
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
670
|
+
if (value.oauth_browser !== void 0) {
|
|
671
|
+
const browser = value.oauth_browser;
|
|
672
|
+
if (browser === "auto" || browser === "manual") {
|
|
673
|
+
result.oauth_browser = browser;
|
|
674
|
+
} else {
|
|
675
|
+
throw new Error(
|
|
676
|
+
`${source}: auth.oauth_browser must be "auto" or "manual"`
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
return Object.keys(result).length > 0 ? result : void 0;
|
|
681
|
+
};
|
|
682
|
+
var parseTuiConfig = (value, source) => {
|
|
683
|
+
if (!isRecord(value)) return void 0;
|
|
684
|
+
const result = {};
|
|
685
|
+
const theme = pickString(value.theme);
|
|
686
|
+
if (theme) result.theme = theme;
|
|
687
|
+
if (value.color_scheme !== void 0) {
|
|
688
|
+
if (value.color_scheme === "dark" || value.color_scheme === "light") {
|
|
689
|
+
result.color_scheme = value.color_scheme;
|
|
690
|
+
} else {
|
|
691
|
+
throw new Error(`${source}: tui.color_scheme must be "dark" or "light"`);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
if (value.image_protocol !== void 0) {
|
|
695
|
+
if (value.image_protocol === "halfblocks" || value.image_protocol === "kitty") {
|
|
696
|
+
result.image_protocol = value.image_protocol;
|
|
697
|
+
} else {
|
|
698
|
+
throw new Error(
|
|
699
|
+
`${source}: tui.image_protocol must be "halfblocks" or "kitty"`
|
|
700
|
+
);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
return Object.keys(result).length > 0 ? result : void 0;
|
|
704
|
+
};
|
|
705
|
+
var parseAgentsConfig = (value) => {
|
|
706
|
+
if (!isRecord(value)) return void 0;
|
|
707
|
+
const enabled = pickBoolean(value.enabled);
|
|
708
|
+
return enabled !== void 0 ? { enabled } : void 0;
|
|
666
709
|
};
|
|
667
710
|
var parseUpdateConfig = (value, source) => {
|
|
668
711
|
if (!isRecord(value)) return void 0;
|
|
@@ -703,15 +746,14 @@ var parseConfig = (value, sourceLabel) => {
|
|
|
703
746
|
} : void 0;
|
|
704
747
|
const hasPermissions = permissions && (permissions.allow || permissions.deny) ? permissions : void 0;
|
|
705
748
|
const mcp = parseMcpConfig(value.mcp);
|
|
749
|
+
const agents = parseAgentsConfig(value.agents);
|
|
706
750
|
const skills = parseSkillsConfig(value.skills);
|
|
707
751
|
const executionEnvironment = parseExecutionEnvironmentConfig(
|
|
708
752
|
value.execution_environment
|
|
709
753
|
);
|
|
710
754
|
const experimental = parseExperimentalConfig(value.experimental);
|
|
711
755
|
const search = parseSearchConfig(value.search);
|
|
712
|
-
const tui =
|
|
713
|
-
...pickString(value.tui.theme) ? { theme: pickString(value.tui.theme) } : {}
|
|
714
|
-
} : void 0;
|
|
756
|
+
const tui = parseTuiConfig(value.tui, sourceLabel);
|
|
715
757
|
const result = { version, model };
|
|
716
758
|
if (auth) result.auth = auth;
|
|
717
759
|
if (value.providers !== void 0)
|
|
@@ -727,6 +769,9 @@ var parseConfig = (value, sourceLabel) => {
|
|
|
727
769
|
if (mcp) {
|
|
728
770
|
result.mcp = mcp;
|
|
729
771
|
}
|
|
772
|
+
if (agents) {
|
|
773
|
+
result.agents = agents;
|
|
774
|
+
}
|
|
730
775
|
if (skills) {
|
|
731
776
|
result.skills = skills;
|
|
732
777
|
}
|
|
@@ -739,7 +784,7 @@ var parseConfig = (value, sourceLabel) => {
|
|
|
739
784
|
if (search) {
|
|
740
785
|
result.search = search;
|
|
741
786
|
}
|
|
742
|
-
if (tui
|
|
787
|
+
if (tui) {
|
|
743
788
|
result.tui = tui;
|
|
744
789
|
}
|
|
745
790
|
if (update) result.update = update;
|
|
@@ -810,6 +855,9 @@ var ConfigRegistry = class {
|
|
|
810
855
|
}
|
|
811
856
|
};
|
|
812
857
|
}
|
|
858
|
+
if (layer?.agents) {
|
|
859
|
+
merged.agents = { ...merged.agents ?? {}, ...layer.agents };
|
|
860
|
+
}
|
|
813
861
|
if (layer?.skills) {
|
|
814
862
|
const nextSkills = layer.skills;
|
|
815
863
|
merged.skills ??= {};
|
package/dist/index.d.cts
CHANGED
|
@@ -176,12 +176,21 @@ type SearchConfig = {
|
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
178
|
};
|
|
179
|
+
type TuiColorScheme = "dark" | "light";
|
|
180
|
+
type TuiImageProtocol = "halfblocks" | "kitty";
|
|
179
181
|
type TuiConfig = {
|
|
180
182
|
theme?: string;
|
|
183
|
+
color_scheme?: TuiColorScheme;
|
|
184
|
+
image_protocol?: TuiImageProtocol;
|
|
181
185
|
};
|
|
182
186
|
type AuthStorageMode = "auto" | "keyring" | "file";
|
|
187
|
+
type OAuthBrowserMode = "auto" | "manual";
|
|
183
188
|
type AuthConfig = {
|
|
184
189
|
storage?: AuthStorageMode;
|
|
190
|
+
oauth_browser?: OAuthBrowserMode;
|
|
191
|
+
};
|
|
192
|
+
type AgentsFileConfig = {
|
|
193
|
+
enabled?: boolean;
|
|
185
194
|
};
|
|
186
195
|
type UpdateMode = "auto" | "notify" | "off";
|
|
187
196
|
/** Launcher-only self-update settings; read from the global config only. */
|
|
@@ -202,6 +211,7 @@ type CodeliaConfig = {
|
|
|
202
211
|
experimental?: ExperimentalConfig;
|
|
203
212
|
permissions?: PermissionsConfig;
|
|
204
213
|
mcp?: McpConfig;
|
|
214
|
+
agents?: AgentsFileConfig;
|
|
205
215
|
skills?: SkillsConfig;
|
|
206
216
|
execution_environment?: ExecutionEnvironmentConfig;
|
|
207
217
|
search?: SearchConfig;
|
|
@@ -224,6 +234,7 @@ type ConfigLayer = {
|
|
|
224
234
|
experimental?: ExperimentalConfig;
|
|
225
235
|
permissions?: PermissionsConfig;
|
|
226
236
|
mcp?: McpConfig;
|
|
237
|
+
agents?: AgentsFileConfig;
|
|
227
238
|
skills?: SkillsConfig;
|
|
228
239
|
execution_environment?: ExecutionEnvironmentConfig;
|
|
229
240
|
search?: SearchConfig;
|
|
@@ -237,4 +248,4 @@ declare class ConfigRegistry {
|
|
|
237
248
|
}
|
|
238
249
|
declare const configRegistry: ConfigRegistry;
|
|
239
250
|
|
|
240
|
-
export { type AuthConfig, type AuthStorageMode, BUILTIN_PROVIDER_NAMES, CONFIG_GROUP_DEFAULT_WRITE_SCOPE, CONFIG_VERSION, type CodeliaConfig, ConfigRegistry, type ConfigWriteGroup, type ConfigWriteScope, type ExecutionEnvironmentConfig, type ExecutionEnvironmentStartupChecksConfig, type ExecutionEnvironmentStartupChecksMode, type ExperimentalConfig, GOOGLE_IMAGE_MODELS, type GoogleImageOptions, type ImageGenerationConfig, type ImageProviderOptions, type McpConfig, type McpServerConfig, type ModelConfig, OPENAI_CODEX_IMAGE_MODELS, OPENAI_IMAGE_MODELS, type OpenAiExperimentalConfig, type OpenAiImageOptions, type OpenRouterImageOptions, type PermissionRule, type PermissionsConfig, type ResponsesModelConfig, type ResponsesProviderConfig, SUBAGENT_MAX_CONCURRENT_LIMIT, type SearchConfig, type SearchMode, type SkillsConfig, type SubagentConfig, type TuiConfig, type UpdateConfig, type UpdateMode, configRegistry, isValidUpdateChannel, normalizePermissionRule, parseConfig, parseImageGenerationConfig, parseResponsesProviders, parseUpdateMode };
|
|
251
|
+
export { type AgentsFileConfig, type AuthConfig, type AuthStorageMode, BUILTIN_PROVIDER_NAMES, CONFIG_GROUP_DEFAULT_WRITE_SCOPE, CONFIG_VERSION, type CodeliaConfig, ConfigRegistry, type ConfigWriteGroup, type ConfigWriteScope, type ExecutionEnvironmentConfig, type ExecutionEnvironmentStartupChecksConfig, type ExecutionEnvironmentStartupChecksMode, type ExperimentalConfig, GOOGLE_IMAGE_MODELS, type GoogleImageOptions, type ImageGenerationConfig, type ImageProviderOptions, type McpConfig, type McpServerConfig, type ModelConfig, type OAuthBrowserMode, OPENAI_CODEX_IMAGE_MODELS, OPENAI_IMAGE_MODELS, type OpenAiExperimentalConfig, type OpenAiImageOptions, type OpenRouterImageOptions, type PermissionRule, type PermissionsConfig, type ResponsesModelConfig, type ResponsesProviderConfig, SUBAGENT_MAX_CONCURRENT_LIMIT, type SearchConfig, type SearchMode, type SkillsConfig, type SubagentConfig, type TuiColorScheme, type TuiConfig, type TuiImageProtocol, type UpdateConfig, type UpdateMode, configRegistry, isValidUpdateChannel, normalizePermissionRule, parseConfig, parseImageGenerationConfig, parseResponsesProviders, parseUpdateMode };
|
package/dist/index.d.ts
CHANGED
|
@@ -176,12 +176,21 @@ type SearchConfig = {
|
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
178
|
};
|
|
179
|
+
type TuiColorScheme = "dark" | "light";
|
|
180
|
+
type TuiImageProtocol = "halfblocks" | "kitty";
|
|
179
181
|
type TuiConfig = {
|
|
180
182
|
theme?: string;
|
|
183
|
+
color_scheme?: TuiColorScheme;
|
|
184
|
+
image_protocol?: TuiImageProtocol;
|
|
181
185
|
};
|
|
182
186
|
type AuthStorageMode = "auto" | "keyring" | "file";
|
|
187
|
+
type OAuthBrowserMode = "auto" | "manual";
|
|
183
188
|
type AuthConfig = {
|
|
184
189
|
storage?: AuthStorageMode;
|
|
190
|
+
oauth_browser?: OAuthBrowserMode;
|
|
191
|
+
};
|
|
192
|
+
type AgentsFileConfig = {
|
|
193
|
+
enabled?: boolean;
|
|
185
194
|
};
|
|
186
195
|
type UpdateMode = "auto" | "notify" | "off";
|
|
187
196
|
/** Launcher-only self-update settings; read from the global config only. */
|
|
@@ -202,6 +211,7 @@ type CodeliaConfig = {
|
|
|
202
211
|
experimental?: ExperimentalConfig;
|
|
203
212
|
permissions?: PermissionsConfig;
|
|
204
213
|
mcp?: McpConfig;
|
|
214
|
+
agents?: AgentsFileConfig;
|
|
205
215
|
skills?: SkillsConfig;
|
|
206
216
|
execution_environment?: ExecutionEnvironmentConfig;
|
|
207
217
|
search?: SearchConfig;
|
|
@@ -224,6 +234,7 @@ type ConfigLayer = {
|
|
|
224
234
|
experimental?: ExperimentalConfig;
|
|
225
235
|
permissions?: PermissionsConfig;
|
|
226
236
|
mcp?: McpConfig;
|
|
237
|
+
agents?: AgentsFileConfig;
|
|
227
238
|
skills?: SkillsConfig;
|
|
228
239
|
execution_environment?: ExecutionEnvironmentConfig;
|
|
229
240
|
search?: SearchConfig;
|
|
@@ -237,4 +248,4 @@ declare class ConfigRegistry {
|
|
|
237
248
|
}
|
|
238
249
|
declare const configRegistry: ConfigRegistry;
|
|
239
250
|
|
|
240
|
-
export { type AuthConfig, type AuthStorageMode, BUILTIN_PROVIDER_NAMES, CONFIG_GROUP_DEFAULT_WRITE_SCOPE, CONFIG_VERSION, type CodeliaConfig, ConfigRegistry, type ConfigWriteGroup, type ConfigWriteScope, type ExecutionEnvironmentConfig, type ExecutionEnvironmentStartupChecksConfig, type ExecutionEnvironmentStartupChecksMode, type ExperimentalConfig, GOOGLE_IMAGE_MODELS, type GoogleImageOptions, type ImageGenerationConfig, type ImageProviderOptions, type McpConfig, type McpServerConfig, type ModelConfig, OPENAI_CODEX_IMAGE_MODELS, OPENAI_IMAGE_MODELS, type OpenAiExperimentalConfig, type OpenAiImageOptions, type OpenRouterImageOptions, type PermissionRule, type PermissionsConfig, type ResponsesModelConfig, type ResponsesProviderConfig, SUBAGENT_MAX_CONCURRENT_LIMIT, type SearchConfig, type SearchMode, type SkillsConfig, type SubagentConfig, type TuiConfig, type UpdateConfig, type UpdateMode, configRegistry, isValidUpdateChannel, normalizePermissionRule, parseConfig, parseImageGenerationConfig, parseResponsesProviders, parseUpdateMode };
|
|
251
|
+
export { type AgentsFileConfig, type AuthConfig, type AuthStorageMode, BUILTIN_PROVIDER_NAMES, CONFIG_GROUP_DEFAULT_WRITE_SCOPE, CONFIG_VERSION, type CodeliaConfig, ConfigRegistry, type ConfigWriteGroup, type ConfigWriteScope, type ExecutionEnvironmentConfig, type ExecutionEnvironmentStartupChecksConfig, type ExecutionEnvironmentStartupChecksMode, type ExperimentalConfig, GOOGLE_IMAGE_MODELS, type GoogleImageOptions, type ImageGenerationConfig, type ImageProviderOptions, type McpConfig, type McpServerConfig, type ModelConfig, type OAuthBrowserMode, OPENAI_CODEX_IMAGE_MODELS, OPENAI_IMAGE_MODELS, type OpenAiExperimentalConfig, type OpenAiImageOptions, type OpenRouterImageOptions, type PermissionRule, type PermissionsConfig, type ResponsesModelConfig, type ResponsesProviderConfig, SUBAGENT_MAX_CONCURRENT_LIMIT, type SearchConfig, type SearchMode, type SkillsConfig, type SubagentConfig, type TuiColorScheme, type TuiConfig, type TuiImageProtocol, type UpdateConfig, type UpdateMode, configRegistry, isValidUpdateChannel, normalizePermissionRule, parseConfig, parseImageGenerationConfig, parseResponsesProviders, parseUpdateMode };
|
package/dist/index.js
CHANGED
|
@@ -287,6 +287,7 @@ var CONFIG_GROUP_DEFAULT_WRITE_SCOPE = {
|
|
|
287
287
|
experimental: "global",
|
|
288
288
|
permissions: "project",
|
|
289
289
|
mcp: "project",
|
|
290
|
+
agents: "project",
|
|
290
291
|
skills: "project",
|
|
291
292
|
execution_environment: "project",
|
|
292
293
|
search: "project",
|
|
@@ -615,14 +616,56 @@ var parseSubagentConfig = (value, source) => {
|
|
|
615
616
|
};
|
|
616
617
|
var parseAuthConfig = (value, source) => {
|
|
617
618
|
if (!isRecord(value)) return void 0;
|
|
618
|
-
const
|
|
619
|
-
if (storage
|
|
620
|
-
|
|
621
|
-
|
|
619
|
+
const result = {};
|
|
620
|
+
if (value.storage !== void 0) {
|
|
621
|
+
const storage = value.storage;
|
|
622
|
+
if (storage === "auto" || storage === "keyring" || storage === "file") {
|
|
623
|
+
result.storage = storage;
|
|
624
|
+
} else {
|
|
625
|
+
throw new Error(
|
|
626
|
+
`${source}: auth.storage must be "auto", "keyring", or "file"`
|
|
627
|
+
);
|
|
628
|
+
}
|
|
622
629
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
630
|
+
if (value.oauth_browser !== void 0) {
|
|
631
|
+
const browser = value.oauth_browser;
|
|
632
|
+
if (browser === "auto" || browser === "manual") {
|
|
633
|
+
result.oauth_browser = browser;
|
|
634
|
+
} else {
|
|
635
|
+
throw new Error(
|
|
636
|
+
`${source}: auth.oauth_browser must be "auto" or "manual"`
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
return Object.keys(result).length > 0 ? result : void 0;
|
|
641
|
+
};
|
|
642
|
+
var parseTuiConfig = (value, source) => {
|
|
643
|
+
if (!isRecord(value)) return void 0;
|
|
644
|
+
const result = {};
|
|
645
|
+
const theme = pickString(value.theme);
|
|
646
|
+
if (theme) result.theme = theme;
|
|
647
|
+
if (value.color_scheme !== void 0) {
|
|
648
|
+
if (value.color_scheme === "dark" || value.color_scheme === "light") {
|
|
649
|
+
result.color_scheme = value.color_scheme;
|
|
650
|
+
} else {
|
|
651
|
+
throw new Error(`${source}: tui.color_scheme must be "dark" or "light"`);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
if (value.image_protocol !== void 0) {
|
|
655
|
+
if (value.image_protocol === "halfblocks" || value.image_protocol === "kitty") {
|
|
656
|
+
result.image_protocol = value.image_protocol;
|
|
657
|
+
} else {
|
|
658
|
+
throw new Error(
|
|
659
|
+
`${source}: tui.image_protocol must be "halfblocks" or "kitty"`
|
|
660
|
+
);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
return Object.keys(result).length > 0 ? result : void 0;
|
|
664
|
+
};
|
|
665
|
+
var parseAgentsConfig = (value) => {
|
|
666
|
+
if (!isRecord(value)) return void 0;
|
|
667
|
+
const enabled = pickBoolean(value.enabled);
|
|
668
|
+
return enabled !== void 0 ? { enabled } : void 0;
|
|
626
669
|
};
|
|
627
670
|
var parseUpdateConfig = (value, source) => {
|
|
628
671
|
if (!isRecord(value)) return void 0;
|
|
@@ -663,15 +706,14 @@ var parseConfig = (value, sourceLabel) => {
|
|
|
663
706
|
} : void 0;
|
|
664
707
|
const hasPermissions = permissions && (permissions.allow || permissions.deny) ? permissions : void 0;
|
|
665
708
|
const mcp = parseMcpConfig(value.mcp);
|
|
709
|
+
const agents = parseAgentsConfig(value.agents);
|
|
666
710
|
const skills = parseSkillsConfig(value.skills);
|
|
667
711
|
const executionEnvironment = parseExecutionEnvironmentConfig(
|
|
668
712
|
value.execution_environment
|
|
669
713
|
);
|
|
670
714
|
const experimental = parseExperimentalConfig(value.experimental);
|
|
671
715
|
const search = parseSearchConfig(value.search);
|
|
672
|
-
const tui =
|
|
673
|
-
...pickString(value.tui.theme) ? { theme: pickString(value.tui.theme) } : {}
|
|
674
|
-
} : void 0;
|
|
716
|
+
const tui = parseTuiConfig(value.tui, sourceLabel);
|
|
675
717
|
const result = { version, model };
|
|
676
718
|
if (auth) result.auth = auth;
|
|
677
719
|
if (value.providers !== void 0)
|
|
@@ -687,6 +729,9 @@ var parseConfig = (value, sourceLabel) => {
|
|
|
687
729
|
if (mcp) {
|
|
688
730
|
result.mcp = mcp;
|
|
689
731
|
}
|
|
732
|
+
if (agents) {
|
|
733
|
+
result.agents = agents;
|
|
734
|
+
}
|
|
690
735
|
if (skills) {
|
|
691
736
|
result.skills = skills;
|
|
692
737
|
}
|
|
@@ -699,7 +744,7 @@ var parseConfig = (value, sourceLabel) => {
|
|
|
699
744
|
if (search) {
|
|
700
745
|
result.search = search;
|
|
701
746
|
}
|
|
702
|
-
if (tui
|
|
747
|
+
if (tui) {
|
|
703
748
|
result.tui = tui;
|
|
704
749
|
}
|
|
705
750
|
if (update) result.update = update;
|
|
@@ -770,6 +815,9 @@ var ConfigRegistry = class {
|
|
|
770
815
|
}
|
|
771
816
|
};
|
|
772
817
|
}
|
|
818
|
+
if (layer?.agents) {
|
|
819
|
+
merged.agents = { ...merged.agents ?? {}, ...layer.agents };
|
|
820
|
+
}
|
|
773
821
|
if (layer?.skills) {
|
|
774
822
|
const nextSkills = layer.skills;
|
|
775
823
|
merged.skills ??= {};
|