agent-switchboard 0.1.10 → 0.1.12
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/README.md +49 -1
- package/dist/commands/distribution.js +22 -10
- package/dist/commands/distribution.js.map +1 -1
- package/dist/config/agent-config.d.ts +35 -0
- package/dist/config/agent-config.js +88 -0
- package/dist/config/agent-config.js.map +1 -0
- package/dist/config/schemas.d.ts +293 -6
- package/dist/config/schemas.js +53 -2
- package/dist/config/schemas.js.map +1 -1
- package/dist/index.js +22 -14
- package/dist/index.js.map +1 -1
- package/dist/library/distribute-bundle.d.ts +5 -0
- package/dist/library/distribute-bundle.js +6 -2
- package/dist/library/distribute-bundle.js.map +1 -1
- package/dist/library/distribute.d.ts +5 -0
- package/dist/library/distribute.js +6 -2
- package/dist/library/distribute.js.map +1 -1
- package/dist/library/state.d.ts +6 -0
- package/dist/library/state.js +13 -0
- package/dist/library/state.js.map +1 -1
- package/dist/rules/composer.d.ts +4 -0
- package/dist/rules/composer.js +18 -0
- package/dist/rules/composer.js.map +1 -1
- package/dist/rules/distribution.d.ts +1 -1
- package/dist/rules/distribution.js +10 -4
- package/dist/rules/distribution.js.map +1 -1
- package/dist/skills/distribution.d.ts +1 -0
- package/dist/skills/distribution.js +17 -6
- package/dist/skills/distribution.js.map +1 -1
- package/dist/subagents/distribution.js +22 -10
- package/dist/subagents/distribution.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,8 @@ Create the file if it does not exist:
|
|
|
37
37
|
|
|
38
38
|
```toml
|
|
39
39
|
# ~/.agent-switchboard/config.toml
|
|
40
|
-
agents
|
|
40
|
+
[agents]
|
|
41
|
+
active = ["codex", "cursor"]
|
|
41
42
|
|
|
42
43
|
[rules]
|
|
43
44
|
includeDelimiters = false
|
|
@@ -60,6 +61,35 @@ Toggle `rules.includeDelimiters` to `true` if you want each snippet surrounded b
|
|
|
60
61
|
|
|
61
62
|
Run `agent-switchboard mcp` again after updating the list.
|
|
62
63
|
|
|
64
|
+
### Per-Agent Overrides
|
|
65
|
+
|
|
66
|
+
You can customize which rules, commands, subagents, and skills are active for each agent using `add` and `remove` syntax:
|
|
67
|
+
|
|
68
|
+
```toml
|
|
69
|
+
[agents]
|
|
70
|
+
active = ["claude-code", "codex", "opencode"]
|
|
71
|
+
|
|
72
|
+
# Codex: exclude skill-codex (avoid self-reference)
|
|
73
|
+
codex.skills.remove = ["skill-codex"]
|
|
74
|
+
codex.rules.remove = ["skill-codex"]
|
|
75
|
+
|
|
76
|
+
# OpenCode: same exclusions
|
|
77
|
+
opencode.skills.remove = ["skill-codex"]
|
|
78
|
+
opencode.rules.remove = ["skill-codex"]
|
|
79
|
+
|
|
80
|
+
# Gemini: add extra command, remove a skill
|
|
81
|
+
gemini.commands.add = ["cmd-gemini-only"]
|
|
82
|
+
gemini.skills.remove = ["skill-go"]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
| Syntax | Behavior |
|
|
86
|
+
|--------|----------|
|
|
87
|
+
| `<agent>.<section>.active = [...]` | Completely override the global list |
|
|
88
|
+
| `<agent>.<section>.add = [...]` | Append to the global list |
|
|
89
|
+
| `<agent>.<section>.remove = [...]` | Remove from the global list |
|
|
90
|
+
|
|
91
|
+
Sections: `mcp`, `commands`, `subagents`, `skills`, `rules`
|
|
92
|
+
|
|
63
93
|
### Layered configuration & scope
|
|
64
94
|
|
|
65
95
|
Agent Switchboard merges configuration from three TOML layers (higher priority wins):
|
|
@@ -212,6 +242,24 @@ The command merges the layered configuration, prints a warning that files will b
|
|
|
212
242
|
|
|
213
243
|
- `ASB_HOME`: overrides `~/.agent-switchboard` for library/state files.
|
|
214
244
|
|
|
245
|
+
## Development
|
|
246
|
+
|
|
247
|
+
Install dependencies, build, and link globally:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
pnpm install
|
|
251
|
+
pnpm build
|
|
252
|
+
pnpm link --global
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
After linking, the global `agent-switchboard` command points to your local build. Code changes take effect after running `pnpm build` again.
|
|
256
|
+
|
|
257
|
+
To unlink:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
pnpm uninstall -g agent-switchboard
|
|
261
|
+
```
|
|
262
|
+
|
|
215
263
|
## License
|
|
216
264
|
|
|
217
265
|
MIT
|
|
@@ -2,9 +2,15 @@ import path from 'node:path';
|
|
|
2
2
|
import { stringify as toToml } from '@iarna/toml';
|
|
3
3
|
import { getClaudeDir, getCodexDir, getGeminiDir, getOpencodePath, getProjectClaudeDir, getProjectGeminiDir, getProjectOpencodePath, } from '../config/paths.js';
|
|
4
4
|
import { distributeLibrary, } from '../library/distribute.js';
|
|
5
|
-
import {
|
|
5
|
+
import { loadLibraryStateSectionForAgent } from '../library/state.js';
|
|
6
6
|
import { wrapFrontmatter } from '../util/frontmatter.js';
|
|
7
7
|
import { loadCommandLibrary } from './library.js';
|
|
8
|
+
/**
|
|
9
|
+
* Map platform to agent ID for per-agent configuration lookup
|
|
10
|
+
*/
|
|
11
|
+
function platformToAgentId(platform) {
|
|
12
|
+
return platform;
|
|
13
|
+
}
|
|
8
14
|
export function resolveCommandFilePath(platform, id, scope) {
|
|
9
15
|
return path.join(resolveCommandTargetDir(platform, scope), getCommandFilename(platform, id));
|
|
10
16
|
}
|
|
@@ -95,15 +101,7 @@ function renderForPlatform(platform, entry) {
|
|
|
95
101
|
}
|
|
96
102
|
export function distributeCommands(scope) {
|
|
97
103
|
const entries = loadCommandLibrary();
|
|
98
|
-
const state = loadLibraryStateSection('commands', scope);
|
|
99
|
-
const activeIds = state.active;
|
|
100
104
|
const byId = new Map(entries.map((e) => [e.id, e]));
|
|
101
|
-
const selected = [];
|
|
102
|
-
for (const id of activeIds) {
|
|
103
|
-
const e = byId.get(id);
|
|
104
|
-
if (e)
|
|
105
|
-
selected.push(e);
|
|
106
|
-
}
|
|
107
105
|
const platforms = ['claude-code', 'codex', 'gemini', 'opencode'];
|
|
108
106
|
// Cleanup config to remove orphan command files
|
|
109
107
|
const cleanup = {
|
|
@@ -117,15 +115,29 @@ export function distributeCommands(scope) {
|
|
|
117
115
|
return null;
|
|
118
116
|
},
|
|
119
117
|
};
|
|
118
|
+
// Filter entries based on per-agent configuration
|
|
119
|
+
const filterSelected = (platform, _allEntries) => {
|
|
120
|
+
const agentId = platformToAgentId(platform);
|
|
121
|
+
const state = loadLibraryStateSectionForAgent('commands', agentId, scope);
|
|
122
|
+
const activeIds = state.active;
|
|
123
|
+
const selected = [];
|
|
124
|
+
for (const id of activeIds) {
|
|
125
|
+
const e = byId.get(id);
|
|
126
|
+
if (e)
|
|
127
|
+
selected.push(e);
|
|
128
|
+
}
|
|
129
|
+
return selected;
|
|
130
|
+
};
|
|
120
131
|
return distributeLibrary({
|
|
121
132
|
section: 'commands',
|
|
122
|
-
selected,
|
|
133
|
+
selected: entries, // Pass all entries, filtering happens per-platform
|
|
123
134
|
platforms,
|
|
124
135
|
resolveFilePath: (p, e) => resolveCommandFilePath(p, e.id, scope),
|
|
125
136
|
render: (p, e) => renderForPlatform(p, e),
|
|
126
137
|
getId: (e) => e.id,
|
|
127
138
|
cleanup,
|
|
128
139
|
scope,
|
|
140
|
+
filterSelected,
|
|
129
141
|
});
|
|
130
142
|
}
|
|
131
143
|
//# sourceMappingURL=distribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.js","sourceRoot":"","sources":["../../src/commands/distribution.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAIL,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,
|
|
1
|
+
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,EAAE,EAAE,KAAK,CAAC;QACjE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;QACzC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE;QAClB,OAAO;QACP,KAAK;QACL,cAAc;KACf,CAAuD,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent-specific configuration resolution
|
|
3
|
+
* Supports per-agent overrides using add/remove incremental syntax
|
|
4
|
+
*/
|
|
5
|
+
import type { IncrementalSelection, SwitchboardConfig } from './schemas.js';
|
|
6
|
+
import type { ConfigScope } from './scope.js';
|
|
7
|
+
export type ConfigSection = 'mcp' | 'commands' | 'subagents' | 'skills' | 'rules';
|
|
8
|
+
export interface ResolvedSectionConfig {
|
|
9
|
+
active: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Merge incremental selection with base active list
|
|
13
|
+
*
|
|
14
|
+
* Priority: active > add/remove
|
|
15
|
+
* Formula: (base - remove) ∪ add
|
|
16
|
+
*/
|
|
17
|
+
export declare function mergeIncrementalSelection(base: string[], override?: IncrementalSelection): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Get per-agent override configuration for a specific section
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAgentOverride(config: SwitchboardConfig, agentId: string, section: ConfigSection): IncrementalSelection | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve effective configuration for a specific agent and section
|
|
24
|
+
*
|
|
25
|
+
* Applies per-agent overrides to the global section config
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveAgentSectionConfig(section: ConfigSection, agentId: string, scope?: ConfigScope): ResolvedSectionConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Check if an agent has any overrides configured
|
|
30
|
+
*/
|
|
31
|
+
export declare function hasAgentOverrides(config: SwitchboardConfig, agentId: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Get list of agents that have overrides configured
|
|
34
|
+
*/
|
|
35
|
+
export declare function getAgentsWithOverrides(config: SwitchboardConfig): string[];
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent-specific configuration resolution
|
|
3
|
+
* Supports per-agent overrides using add/remove incremental syntax
|
|
4
|
+
*/
|
|
5
|
+
import { loadMergedSwitchboardConfig } from './layered-config.js';
|
|
6
|
+
import { scopeToLayerOptions } from './scope.js';
|
|
7
|
+
/**
|
|
8
|
+
* Merge incremental selection with base active list
|
|
9
|
+
*
|
|
10
|
+
* Priority: active > add/remove
|
|
11
|
+
* Formula: (base - remove) ∪ add
|
|
12
|
+
*/
|
|
13
|
+
export function mergeIncrementalSelection(base, override) {
|
|
14
|
+
if (!override)
|
|
15
|
+
return base;
|
|
16
|
+
// If active is specified, use it as complete override
|
|
17
|
+
if (override.active && override.active.length > 0) {
|
|
18
|
+
return override.active;
|
|
19
|
+
}
|
|
20
|
+
let result = [...base];
|
|
21
|
+
// Apply remove first
|
|
22
|
+
if (override.remove && override.remove.length > 0) {
|
|
23
|
+
const removeSet = new Set(override.remove);
|
|
24
|
+
result = result.filter((id) => !removeSet.has(id));
|
|
25
|
+
}
|
|
26
|
+
// Then apply add
|
|
27
|
+
if (override.add && override.add.length > 0) {
|
|
28
|
+
const existing = new Set(result);
|
|
29
|
+
for (const id of override.add) {
|
|
30
|
+
if (!existing.has(id)) {
|
|
31
|
+
result.push(id);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get per-agent override configuration for a specific section
|
|
39
|
+
*/
|
|
40
|
+
export function getAgentOverride(config, agentId, section) {
|
|
41
|
+
// agents object may contain per-agent overrides as additional keys (via passthrough)
|
|
42
|
+
const agents = config.agents;
|
|
43
|
+
const agentOverrides = agents[agentId];
|
|
44
|
+
if (!agentOverrides || typeof agentOverrides !== 'object') {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
const overrideObj = agentOverrides;
|
|
48
|
+
return overrideObj[section];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Resolve effective configuration for a specific agent and section
|
|
52
|
+
*
|
|
53
|
+
* Applies per-agent overrides to the global section config
|
|
54
|
+
*/
|
|
55
|
+
export function resolveAgentSectionConfig(section, agentId, scope) {
|
|
56
|
+
const layerOptions = scopeToLayerOptions(scope);
|
|
57
|
+
const { config } = loadMergedSwitchboardConfig(layerOptions);
|
|
58
|
+
// Get global active list for the section
|
|
59
|
+
const globalActive = [...config[section].active];
|
|
60
|
+
// Get agent-specific override
|
|
61
|
+
const override = getAgentOverride(config, agentId, section);
|
|
62
|
+
// Merge and return
|
|
63
|
+
return {
|
|
64
|
+
active: mergeIncrementalSelection(globalActive, override),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check if an agent has any overrides configured
|
|
69
|
+
*/
|
|
70
|
+
export function hasAgentOverrides(config, agentId) {
|
|
71
|
+
const agents = config.agents;
|
|
72
|
+
const agentOverrides = agents[agentId];
|
|
73
|
+
return agentOverrides !== undefined && typeof agentOverrides === 'object';
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get list of agents that have overrides configured
|
|
77
|
+
*/
|
|
78
|
+
export function getAgentsWithOverrides(config) {
|
|
79
|
+
const agents = config.agents;
|
|
80
|
+
const result = [];
|
|
81
|
+
for (const key of Object.keys(agents)) {
|
|
82
|
+
if (key !== 'active' && typeof agents[key] === 'object') {
|
|
83
|
+
result.push(key);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=agent-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-config.js","sourceRoot":"","sources":["../../src/config/agent-config.ts"],"names":[],"mappings":"AAAA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AAC;IAC5B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,IAAI,GAAG,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;YACxD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/config/schemas.d.ts
CHANGED
|
@@ -73,6 +73,253 @@ export declare const selectionSectionSchema: z.ZodObject<{} & {
|
|
|
73
73
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{} & {
|
|
74
74
|
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
75
75
|
}, z.ZodTypeAny, "passthrough">>;
|
|
76
|
+
/**
|
|
77
|
+
* Incremental selection schema for per-agent overrides
|
|
78
|
+
* - active: completely override the global list
|
|
79
|
+
* - add: append to the global list
|
|
80
|
+
* - remove: remove from the global list
|
|
81
|
+
*/
|
|
82
|
+
export declare const incrementalSelectionSchema: z.ZodObject<{
|
|
83
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
84
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
85
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
86
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
87
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
88
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
89
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
90
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
91
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
92
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
93
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
94
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
95
|
+
/**
|
|
96
|
+
* Per-agent configuration override schema
|
|
97
|
+
* Allows overriding mcp, commands, subagents, skills, rules for a specific agent
|
|
98
|
+
*/
|
|
99
|
+
export declare const agentConfigOverrideSchema: z.ZodObject<{
|
|
100
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
102
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
103
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
104
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
105
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
106
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
107
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
108
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
109
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
110
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
111
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
112
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
113
|
+
commands: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
115
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
116
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
117
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
118
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
119
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
120
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
121
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
122
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
123
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
124
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
125
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
126
|
+
subagents: z.ZodOptional<z.ZodObject<{
|
|
127
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
128
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
129
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
130
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
131
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
132
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
133
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
134
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
135
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
136
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
137
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
138
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
139
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
141
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
142
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
143
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
144
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
145
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
146
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
147
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
148
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
149
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
150
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
151
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
152
|
+
rules: z.ZodOptional<z.ZodObject<{
|
|
153
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
154
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
155
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
156
|
+
} & {
|
|
157
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
158
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
159
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
160
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
161
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
162
|
+
} & {
|
|
163
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
165
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
166
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
167
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
168
|
+
} & {
|
|
169
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
171
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
172
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
174
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
175
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
176
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
177
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
178
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
179
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
180
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
181
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
182
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
183
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
184
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
185
|
+
commands: z.ZodOptional<z.ZodObject<{
|
|
186
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
187
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
188
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
189
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
190
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
191
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
192
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
193
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
194
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
195
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
196
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
197
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
198
|
+
subagents: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
200
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
201
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
202
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
203
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
204
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
205
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
206
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
207
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
208
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
209
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
210
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
211
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
212
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
213
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
214
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
215
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
216
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
217
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
218
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
219
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
220
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
221
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
222
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
223
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
224
|
+
rules: z.ZodOptional<z.ZodObject<{
|
|
225
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
226
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
227
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
228
|
+
} & {
|
|
229
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
230
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
231
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
232
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
233
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
234
|
+
} & {
|
|
235
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
236
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
237
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
238
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
239
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
240
|
+
} & {
|
|
241
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
243
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
244
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
245
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
246
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
247
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
248
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
249
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
250
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
251
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
252
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
253
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
254
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
255
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
256
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
257
|
+
commands: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
259
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
260
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
261
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
262
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
263
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
264
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
265
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
266
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
267
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
268
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
269
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
270
|
+
subagents: z.ZodOptional<z.ZodObject<{
|
|
271
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
272
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
273
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
274
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
275
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
276
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
277
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
278
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
279
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
280
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
281
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
282
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
283
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
285
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
286
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
287
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
288
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
289
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
290
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
291
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
292
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
293
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
294
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
295
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
296
|
+
rules: z.ZodOptional<z.ZodObject<{
|
|
297
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
298
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
299
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
300
|
+
} & {
|
|
301
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
302
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
303
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
304
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
305
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
306
|
+
} & {
|
|
307
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
309
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
310
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
311
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
312
|
+
} & {
|
|
313
|
+
includeDelimiters: z.ZodOptional<z.ZodBoolean>;
|
|
314
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
315
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
316
|
+
declare const agentsSectionSchema: z.ZodObject<{
|
|
317
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
318
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
319
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
320
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
321
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
322
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
76
323
|
export declare const rulesSectionSchema: z.ZodObject<{} & {
|
|
77
324
|
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
78
325
|
includeDelimiters: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -94,7 +341,13 @@ export declare const uiSectionSchema: z.ZodObject<{} & {
|
|
|
94
341
|
* Schema for Agent Switchboard configuration file (~/.agent-switchboard/config.toml)
|
|
95
342
|
*/
|
|
96
343
|
export declare const switchboardConfigSchema: z.ZodObject<{
|
|
97
|
-
agents: z.ZodDefault<z.
|
|
344
|
+
agents: z.ZodDefault<z.ZodObject<{
|
|
345
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
346
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
347
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
348
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
349
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
350
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
98
351
|
mcp: z.ZodDefault<z.ZodObject<{} & {
|
|
99
352
|
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
100
353
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
|
|
@@ -141,7 +394,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
|
|
|
141
394
|
page_size: z.ZodDefault<z.ZodNumber>;
|
|
142
395
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
143
396
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
144
|
-
agents: z.ZodDefault<z.
|
|
397
|
+
agents: z.ZodDefault<z.ZodObject<{
|
|
398
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
399
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
400
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
401
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
402
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
403
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
145
404
|
mcp: z.ZodDefault<z.ZodObject<{} & {
|
|
146
405
|
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
147
406
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
|
|
@@ -188,7 +447,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
|
|
|
188
447
|
page_size: z.ZodDefault<z.ZodNumber>;
|
|
189
448
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
190
449
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
191
|
-
agents: z.ZodDefault<z.
|
|
450
|
+
agents: z.ZodDefault<z.ZodObject<{
|
|
451
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
452
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
453
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
454
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
455
|
+
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
456
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
192
457
|
mcp: z.ZodDefault<z.ZodObject<{} & {
|
|
193
458
|
active: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
194
459
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{} & {
|
|
@@ -239,7 +504,13 @@ export declare const switchboardConfigSchema: z.ZodObject<{
|
|
|
239
504
|
* Input schema for partial config layers (no defaults)
|
|
240
505
|
*/
|
|
241
506
|
export declare const switchboardConfigLayerSchema: z.ZodObject<{
|
|
242
|
-
agents: z.ZodOptional<z.
|
|
507
|
+
agents: z.ZodOptional<z.ZodObject<{
|
|
508
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
509
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
510
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
511
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
512
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
513
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
243
514
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
244
515
|
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
245
516
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -289,7 +560,13 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
|
|
|
289
560
|
page_size: z.ZodOptional<z.ZodNumber>;
|
|
290
561
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
291
562
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
292
|
-
agents: z.ZodOptional<z.
|
|
563
|
+
agents: z.ZodOptional<z.ZodObject<{
|
|
564
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
565
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
566
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
567
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
568
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
569
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
293
570
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
294
571
|
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
295
572
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -339,7 +616,13 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
|
|
|
339
616
|
page_size: z.ZodOptional<z.ZodNumber>;
|
|
340
617
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
341
618
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
342
|
-
agents: z.ZodOptional<z.
|
|
619
|
+
agents: z.ZodOptional<z.ZodObject<{
|
|
620
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
621
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
622
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
623
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
624
|
+
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
625
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
343
626
|
mcp: z.ZodOptional<z.ZodObject<{
|
|
344
627
|
active: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
345
628
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -395,7 +678,11 @@ export declare const switchboardConfigLayerSchema: z.ZodObject<{
|
|
|
395
678
|
export type McpServer = z.infer<typeof mcpServerSchema>;
|
|
396
679
|
export type McpConfig = z.infer<typeof mcpConfigSchema>;
|
|
397
680
|
export type SelectionSection = z.infer<typeof selectionSectionSchema>;
|
|
681
|
+
export type IncrementalSelection = z.infer<typeof incrementalSelectionSchema>;
|
|
682
|
+
export type AgentConfigOverride = z.infer<typeof agentConfigOverrideSchema>;
|
|
683
|
+
export type AgentsSection = z.infer<typeof agentsSectionSchema>;
|
|
398
684
|
export type RulesSection = z.infer<typeof rulesSectionSchema>;
|
|
399
685
|
export type UiSection = z.infer<typeof uiSectionSchema>;
|
|
400
686
|
export type SwitchboardConfig = z.infer<typeof switchboardConfigSchema>;
|
|
401
687
|
export type SwitchboardConfigLayer = z.infer<typeof switchboardConfigLayerSchema>;
|
|
688
|
+
export {};
|