@a4hgehad/weave-mcp 0.8.12 → 0.9.0

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.
Files changed (104) hide show
  1. package/dist/agents/agent-builder.d.ts +31 -15
  2. package/dist/agents/builtin-agents.d.ts +35 -24
  3. package/dist/agents/custom-agent-factory.d.ts +16 -9
  4. package/dist/agents/dynamic-prompt-builder.d.ts +27 -15
  5. package/dist/agents/index.d.ts +29 -5
  6. package/dist/agents/loom/index.d.ts +6 -1
  7. package/dist/agents/loom/prompt-composer.d.ts +16 -9
  8. package/dist/agents/model-resolution.d.ts +20 -14
  9. package/dist/agents/prompt-loader.d.ts +4 -1
  10. package/dist/agents/prompt-utils.d.ts +4 -1
  11. package/dist/agents/tapestry/index.d.ts +4 -1
  12. package/dist/agents/tapestry/prompt-composer.d.ts +11 -5
  13. package/dist/agents/types.d.ts +41 -27
  14. package/dist/config/loader.d.ts +5 -1
  15. package/dist/config/merge.d.ts +4 -1
  16. package/dist/config/schema.d.ts +458 -242
  17. package/dist/create-managers.d.ts +17 -17
  18. package/dist/create-tools.d.ts +6 -6
  19. package/dist/features/analytics/adherence.d.ts +4 -1
  20. package/dist/features/analytics/fingerprint.d.ts +15 -5
  21. package/dist/features/analytics/format-metrics.d.ts +5 -1
  22. package/dist/features/analytics/generate-metrics-report.d.ts +4 -1
  23. package/dist/features/analytics/git-diff.d.ts +4 -1
  24. package/dist/features/analytics/index.d.ts +48 -9
  25. package/dist/features/analytics/plan-token-aggregator.d.ts +4 -1
  26. package/dist/features/analytics/session-tracker.d.ts +65 -52
  27. package/dist/features/analytics/storage.d.ts +23 -6
  28. package/dist/features/analytics/suggestions.d.ts +6 -2
  29. package/dist/features/analytics/token-report.d.ts +3 -1
  30. package/dist/features/analytics/types.d.ts +142 -142
  31. package/dist/features/builtin-commands/commands.d.ts +4 -1
  32. package/dist/features/builtin-commands/templates/metrics.d.ts +2 -1
  33. package/dist/features/builtin-commands/templates/run-workflow.d.ts +2 -1
  34. package/dist/features/builtin-commands/templates/start-work.d.ts +2 -1
  35. package/dist/features/builtin-commands/types.d.ts +15 -11
  36. package/dist/features/evals/baseline.d.ts +17 -4
  37. package/dist/features/evals/evaluators/deterministic.d.ts +4 -1
  38. package/dist/features/evals/evaluators/llm-judge.d.ts +9 -2
  39. package/dist/features/evals/executors/model-response.d.ts +11 -2
  40. package/dist/features/evals/executors/prompt-renderer.d.ts +11 -2
  41. package/dist/features/evals/index.d.ts +38 -5
  42. package/dist/features/evals/loader.d.ts +17 -5
  43. package/dist/features/evals/runner.d.ts +6 -4
  44. package/dist/features/evals/schema.d.ts +631 -305
  45. package/dist/features/evals/storage.d.ts +9 -2
  46. package/dist/features/evals/targets/builtin-agent-target.d.ts +3 -1
  47. package/dist/features/evals/types.d.ts +185 -141
  48. package/dist/features/skill-loader/discovery.d.ts +7 -5
  49. package/dist/features/skill-loader/index.d.ts +12 -2
  50. package/dist/features/skill-loader/loader.d.ts +7 -5
  51. package/dist/features/skill-loader/opencode-client.d.ts +4 -1
  52. package/dist/features/skill-loader/resolver.d.ts +12 -3
  53. package/dist/features/skill-loader/types.d.ts +11 -11
  54. package/dist/features/task-system/index.d.ts +23 -4
  55. package/dist/features/task-system/storage.d.ts +21 -6
  56. package/dist/features/task-system/todo-sync.d.ts +16 -8
  57. package/dist/features/task-system/tools/task-create.d.ts +3 -3
  58. package/dist/features/task-system/tools/task-list.d.ts +2 -2
  59. package/dist/features/task-system/tools/task-update.d.ts +3 -3
  60. package/dist/features/task-system/types.d.ts +31 -20
  61. package/dist/features/work-state/index.d.ts +25 -3
  62. package/dist/features/work-state/storage.d.ts +14 -3
  63. package/dist/features/work-state/types.d.ts +24 -24
  64. package/dist/features/work-state/validation-types.d.ts +16 -10
  65. package/dist/features/work-state/validation.d.ts +4 -1
  66. package/dist/features/workflow/commands.d.ts +10 -7
  67. package/dist/features/workflow/completion.d.ts +20 -17
  68. package/dist/features/workflow/context.d.ts +19 -4
  69. package/dist/features/workflow/discovery.d.ts +9 -5
  70. package/dist/features/workflow/engine.d.ts +17 -14
  71. package/dist/features/workflow/hook.d.ts +17 -16
  72. package/dist/features/workflow/index.d.ts +53 -6
  73. package/dist/features/workflow/schema.d.ts +155 -73
  74. package/dist/features/workflow/storage.d.ts +34 -8
  75. package/dist/features/workflow/types.d.ts +97 -81
  76. package/dist/hooks/context-window-monitor.d.ts +16 -11
  77. package/dist/hooks/create-hooks.d.ts +61 -28
  78. package/dist/hooks/index.d.ts +52 -9
  79. package/dist/hooks/keyword-detector.d.ts +14 -5
  80. package/dist/hooks/pattern-md-only.d.ts +7 -3
  81. package/dist/hooks/rules-injector.d.ts +7 -2
  82. package/dist/hooks/session-token-state.d.ts +13 -5
  83. package/dist/hooks/start-work-hook.d.ts +10 -8
  84. package/dist/hooks/verification-reminder.d.ts +12 -10
  85. package/dist/hooks/work-continuation.d.ts +7 -5
  86. package/dist/hooks/write-existing-file-guard.d.ts +13 -7
  87. package/dist/index.js +1814 -1784
  88. package/dist/managers/background-manager.d.ts +55 -52
  89. package/dist/managers/config-handler.d.ts +40 -40
  90. package/dist/managers/index.d.ts +14 -3
  91. package/dist/managers/skill-mcp-manager.d.ts +30 -22
  92. package/dist/mcp/agent-defaults.d.ts +4 -1
  93. package/dist/mcp/index.d.ts +7 -5
  94. package/dist/mcp/types.d.ts +23 -19
  95. package/dist/plugin/index.d.ts +6 -1
  96. package/dist/plugin/plugin-interface.d.ts +15 -15
  97. package/dist/plugin/types.d.ts +15 -2
  98. package/dist/shared/agent-display-names.d.ts +8 -2
  99. package/dist/shared/index.d.ts +8 -1
  100. package/dist/shared/log.d.ts +6 -6
  101. package/dist/shared/types.d.ts +9 -4
  102. package/dist/tools/permissions.d.ts +5 -3
  103. package/dist/tools/registry.d.ts +12 -10
  104. package/package.json +13 -11
@@ -1,15 +1,18 @@
1
- import type { AgentConfig } from '@opencode-ai/sdk';
2
- import type { CategoriesConfig } from '../config/schema';
3
- import type { AgentSource } from './types';
4
- export type ResolveSkillsFn = (skillNames: string[], disabledSkills?: Set<string>) => string;
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ import type { CategoriesConfig } from "../config/schema";
3
+ import type { AgentSource } from "./types";
4
+ export type ResolveSkillsFn = (
5
+ skillNames: string[],
6
+ disabledSkills?: Set<string>
7
+ ) => string;
5
8
  export type BuildAgentOptions = {
6
- categories?: CategoriesConfig;
7
- disabledSkills?: Set<string>;
8
- resolveSkills?: ResolveSkillsFn;
9
- disabledAgents?: Set<string>;
10
- agentName?: string;
11
- mcpConfig?: string[];
12
- enabledMcps?: Set<string>;
9
+ categories?: CategoriesConfig;
10
+ disabledSkills?: Set<string>;
11
+ resolveSkills?: ResolveSkillsFn;
12
+ disabledAgents?: Set<string>;
13
+ agentName?: string;
14
+ mcpConfig?: string[];
15
+ enabledMcps?: Set<string>;
13
16
  };
14
17
  /**
15
18
  * Map from agent config key (lowercase) to display name variants that
@@ -30,7 +33,10 @@ export declare function resetNameVariants(): void;
30
33
  * `stripDisabledAgentReferences` can strip its references from prompts.
31
34
  * Does not override existing (builtin) entries.
32
35
  */
33
- export declare function registerAgentNameVariants(name: string, variants?: string[]): void;
36
+ export declare function registerAgentNameVariants(
37
+ name: string,
38
+ variants?: string[]
39
+ ): void;
34
40
  /**
35
41
  * Add additional name variants for a builtin agent.
36
42
  * Used when a user sets a custom display_name — the custom name
@@ -38,12 +44,22 @@ export declare function registerAgentNameVariants(name: string, variants?: strin
38
44
  * can match it when the agent is disabled.
39
45
  * No-op if the config key has no existing variant entry or the variant is already present.
40
46
  */
41
- export declare function addBuiltinNameVariant(configKey: string, variant: string): void;
47
+ export declare function addBuiltinNameVariant(
48
+ configKey: string,
49
+ variant: string
50
+ ): void;
42
51
  /**
43
52
  * Remove lines from a prompt that reference disabled agents.
44
53
  * Only strips lines where an agent name appears as a standalone concept
45
54
  * (e.g. "Use thread (codebase explorer)"), not incidental word matches.
46
55
  * Uses word-boundary matching to avoid false positives.
47
56
  */
48
- export declare function stripDisabledAgentReferences(prompt: string, disabled: Set<string>): string;
49
- export declare function buildAgent(source: AgentSource, model: string, options?: BuildAgentOptions): AgentConfig;
57
+ export declare function stripDisabledAgentReferences(
58
+ prompt: string,
59
+ disabled: Set<string>
60
+ ): string;
61
+ export declare function buildAgent(
62
+ source: AgentSource,
63
+ model: string,
64
+ options?: BuildAgentOptions
65
+ ): AgentConfig;
@@ -1,34 +1,45 @@
1
- import type { AgentConfig } from '@opencode-ai/sdk';
2
- import type { AgentOverrideConfig, CategoriesConfig } from '../config/schema';
3
- import type { ProjectFingerprint } from '../features/analytics/types';
4
- import type { ResolveSkillsFn } from './agent-builder';
5
- import type { AvailableAgent } from './dynamic-prompt-builder';
6
- import type { AgentPromptMetadata, WeaveAgentName } from './types';
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ import type { AgentOverrideConfig, CategoriesConfig } from "../config/schema";
3
+ import type { ProjectFingerprint } from "../features/analytics/types";
4
+ import type { ResolveSkillsFn } from "./agent-builder";
5
+ import type { AvailableAgent } from "./dynamic-prompt-builder";
6
+ import type { AgentPromptMetadata, WeaveAgentName } from "./types";
7
7
  export interface CreateBuiltinAgentsOptions {
8
- disabledAgents?: string[];
9
- agentOverrides?: Record<string, AgentOverrideConfig>;
10
- categories?: CategoriesConfig;
11
- uiSelectedModel?: string;
12
- systemDefaultModel?: string;
13
- availableModels?: Set<string>;
14
- disabledSkills?: Set<string>;
15
- resolveSkills?: ResolveSkillsFn;
16
- /** Project fingerprint for injecting project context into agent prompts */
17
- fingerprint?: ProjectFingerprint | null;
18
- /** Custom agent metadata for Loom's dynamic delegation prompt */
19
- customAgentMetadata?: AvailableAgent[];
20
- /** Set of enabled MCP servers */
21
- enabledMcps?: Set<string>;
8
+ disabledAgents?: string[];
9
+ agentOverrides?: Record<string, AgentOverrideConfig>;
10
+ categories?: CategoriesConfig;
11
+ uiSelectedModel?: string;
12
+ systemDefaultModel?: string;
13
+ availableModels?: Set<string>;
14
+ disabledSkills?: Set<string>;
15
+ resolveSkills?: ResolveSkillsFn;
16
+ /** Project fingerprint for injecting project context into agent prompts */
17
+ fingerprint?: ProjectFingerprint | null;
18
+ /** Custom agent metadata for Loom's dynamic delegation prompt */
19
+ customAgentMetadata?: AvailableAgent[];
20
+ /** Set of enabled MCP servers */
21
+ enabledMcps?: Set<string>;
22
22
  }
23
- export declare const AGENT_METADATA: Record<WeaveAgentName, AgentPromptMetadata>;
23
+ export declare const AGENT_METADATA: Record<
24
+ WeaveAgentName,
25
+ AgentPromptMetadata
26
+ >;
24
27
  /**
25
28
  * Register metadata for a custom agent. Used by create-managers.ts
26
29
  * to integrate custom agents into Loom's dynamic prompt builder.
27
30
  */
28
- export declare function registerCustomAgentMetadata(name: string, metadata: AgentPromptMetadata): void;
31
+ export declare function registerCustomAgentMetadata(
32
+ name: string,
33
+ metadata: AgentPromptMetadata
34
+ ): void;
29
35
  /**
30
36
  * Get all agent metadata — builtins + registered custom agents.
31
37
  * Returns a new merged record on each call.
32
38
  */
33
- export declare function getAllAgentMetadata(): Record<string, AgentPromptMetadata>;
34
- export declare function createBuiltinAgents(options?: CreateBuiltinAgentsOptions): Record<string, AgentConfig>;
39
+ export declare function getAllAgentMetadata(): Record<
40
+ string,
41
+ AgentPromptMetadata
42
+ >;
43
+ export declare function createBuiltinAgents(
44
+ options?: CreateBuiltinAgentsOptions
45
+ ): Record<string, AgentConfig>;
@@ -3,22 +3,29 @@ import type { CustomAgentConfig } from "../config/schema";
3
3
  import type { AgentPromptMetadata } from "./types";
4
4
  import type { ResolveSkillsFn } from "./agent-builder";
5
5
  export interface BuildCustomAgentOptions {
6
- resolveSkills?: ResolveSkillsFn;
7
- disabledSkills?: Set<string>;
8
- availableModels?: Set<string>;
9
- systemDefaultModel?: string;
10
- uiSelectedModel?: string;
11
- /** Base directory for resolving relative prompt_file paths */
12
- configDir?: string;
6
+ resolveSkills?: ResolveSkillsFn;
7
+ disabledSkills?: Set<string>;
8
+ availableModels?: Set<string>;
9
+ systemDefaultModel?: string;
10
+ uiSelectedModel?: string;
11
+ /** Base directory for resolving relative prompt_file paths */
12
+ configDir?: string;
13
13
  }
14
14
  /**
15
15
  * Build an AgentConfig from a custom agent definition.
16
16
  * Handles prompt resolution (inline, file, or skills), model resolution,
17
17
  * and display name registration.
18
18
  */
19
- export declare function buildCustomAgent(name: string, config: CustomAgentConfig, options?: BuildCustomAgentOptions): AgentConfig;
19
+ export declare function buildCustomAgent(
20
+ name: string,
21
+ config: CustomAgentConfig,
22
+ options?: BuildCustomAgentOptions
23
+ ): AgentConfig;
20
24
  /**
21
25
  * Build AgentPromptMetadata for a custom agent from its config.
22
26
  * Used to integrate custom agents into Loom's delegation table.
23
27
  */
24
- export declare function buildCustomAgentMetadata(name: string, config: CustomAgentConfig): AgentPromptMetadata;
28
+ export declare function buildCustomAgentMetadata(
29
+ name: string,
30
+ config: CustomAgentConfig
31
+ ): AgentPromptMetadata;
@@ -1,35 +1,47 @@
1
1
  import type { AgentPromptMetadata } from "./types";
2
2
  import type { ProjectFingerprint } from "../features/analytics/types";
3
3
  export interface AvailableAgent {
4
- name: string;
5
- description: string;
6
- metadata: AgentPromptMetadata;
4
+ name: string;
5
+ description: string;
6
+ metadata: AgentPromptMetadata;
7
7
  }
8
8
  export interface AvailableTool {
9
- name: string;
10
- category: "lsp" | "ast" | "search" | "session" | "command" | "other";
9
+ name: string;
10
+ category: "lsp" | "ast" | "search" | "session" | "command" | "other";
11
11
  }
12
12
  export interface AvailableSkill {
13
- name: string;
14
- description: string;
15
- location: "user" | "project" | "builtin";
13
+ name: string;
14
+ description: string;
15
+ location: "user" | "project" | "builtin";
16
16
  }
17
17
  export interface AvailableCategory {
18
- name: string;
19
- description: string;
20
- model?: string;
18
+ name: string;
19
+ description: string;
20
+ model?: string;
21
21
  }
22
22
  export declare function categorizeTools(toolNames: string[]): AvailableTool[];
23
- export declare function buildKeyTriggersSection(agents: AvailableAgent[], _skills?: AvailableSkill[]): string;
24
- export declare function buildToolSelectionTable(agents: AvailableAgent[], tools?: AvailableTool[], _skills?: AvailableSkill[]): string;
23
+ export declare function buildKeyTriggersSection(
24
+ agents: AvailableAgent[],
25
+ _skills?: AvailableSkill[]
26
+ ): string;
27
+ export declare function buildToolSelectionTable(
28
+ agents: AvailableAgent[],
29
+ tools?: AvailableTool[],
30
+ _skills?: AvailableSkill[]
31
+ ): string;
25
32
  export declare function buildThreadSection(agents: AvailableAgent[]): string;
26
33
  export declare function buildSpindleSection(agents: AvailableAgent[]): string;
27
34
  export declare function buildWeftSection(agents: AvailableAgent[]): string;
28
35
  export declare function buildWarpSection(agents: AvailableAgent[]): string;
29
36
  export declare function buildDelegationTable(agents: AvailableAgent[]): string;
30
- export declare function buildCategorySkillsDelegationGuide(categories: AvailableCategory[], skills: AvailableSkill[]): string;
37
+ export declare function buildCategorySkillsDelegationGuide(
38
+ categories: AvailableCategory[],
39
+ skills: AvailableSkill[]
40
+ ): string;
31
41
  /**
32
42
  * Build a project context section from a codebase fingerprint.
33
43
  * Returns an empty string if no fingerprint is available.
34
44
  */
35
- export declare function buildProjectContextSection(fingerprint: ProjectFingerprint | null | undefined): string;
45
+ export declare function buildProjectContextSection(
46
+ fingerprint: ProjectFingerprint | null | undefined
47
+ ): string;
@@ -1,12 +1,36 @@
1
- export { createBuiltinAgents, AGENT_METADATA, registerCustomAgentMetadata, getAllAgentMetadata } from "./builtin-agents";
1
+ export {
2
+ createBuiltinAgents,
3
+ AGENT_METADATA,
4
+ registerCustomAgentMetadata,
5
+ getAllAgentMetadata
6
+ } from "./builtin-agents";
2
7
  export type { CreateBuiltinAgentsOptions } from "./builtin-agents";
3
8
  export { buildAgent, stripDisabledAgentReferences } from "./agent-builder";
4
9
  export type { BuildAgentOptions, ResolveSkillsFn } from "./agent-builder";
5
- export { resolveAgentModel, AGENT_MODEL_REQUIREMENTS } from "./model-resolution";
6
- export type { FallbackEntry, AgentModelRequirement, ResolveAgentModelOptions } from "./model-resolution";
7
- export { buildCustomAgent, buildCustomAgentMetadata } from "./custom-agent-factory";
10
+ export {
11
+ resolveAgentModel,
12
+ AGENT_MODEL_REQUIREMENTS
13
+ } from "./model-resolution";
14
+ export type {
15
+ FallbackEntry,
16
+ AgentModelRequirement,
17
+ ResolveAgentModelOptions
18
+ } from "./model-resolution";
19
+ export {
20
+ buildCustomAgent,
21
+ buildCustomAgentMetadata
22
+ } from "./custom-agent-factory";
8
23
  export type { BuildCustomAgentOptions } from "./custom-agent-factory";
9
24
  export { loadPromptFile } from "./prompt-loader";
10
25
  export * from "./dynamic-prompt-builder";
11
- export type { AgentMode, AgentFactory, AgentSource, AgentCategory, AgentCost, DelegationTrigger, AgentPromptMetadata, WeaveAgentName, } from "./types";
26
+ export type {
27
+ AgentMode,
28
+ AgentFactory,
29
+ AgentSource,
30
+ AgentCategory,
31
+ AgentCost,
32
+ DelegationTrigger,
33
+ AgentPromptMetadata,
34
+ WeaveAgentName
35
+ } from "./types";
12
36
  export { isFactory, isGptModel } from "./types";
@@ -7,5 +7,10 @@ export type { LoomPromptOptions } from "./prompt-composer";
7
7
  /**
8
8
  * Create a Loom agent config with optional disabled agents, fingerprint, and custom agents for prompt composition.
9
9
  */
10
- export declare function createLoomAgentWithOptions(model: string, disabledAgents?: Set<string>, fingerprint?: ProjectFingerprint | null, customAgents?: AvailableAgent[]): AgentConfig;
10
+ export declare function createLoomAgentWithOptions(
11
+ model: string,
12
+ disabledAgents?: Set<string>,
13
+ fingerprint?: ProjectFingerprint | null,
14
+ customAgents?: AvailableAgent[]
15
+ ): AgentConfig;
11
16
  export declare const createLoomAgent: AgentFactory;
@@ -8,26 +8,33 @@
8
8
  import type { ProjectFingerprint } from "../../features/analytics/types";
9
9
  import type { AvailableAgent } from "../dynamic-prompt-builder";
10
10
  export interface LoomPromptOptions {
11
- /** Set of disabled agent names (lowercase config keys) */
12
- disabledAgents?: Set<string>;
13
- /** Project fingerprint for injecting project context into the prompt */
14
- fingerprint?: ProjectFingerprint | null;
15
- /** Custom agent metadata for dynamic delegation sections */
16
- customAgents?: AvailableAgent[];
11
+ /** Set of disabled agent names (lowercase config keys) */
12
+ disabledAgents?: Set<string>;
13
+ /** Project fingerprint for injecting project context into the prompt */
14
+ fingerprint?: ProjectFingerprint | null;
15
+ /** Custom agent metadata for dynamic delegation sections */
16
+ customAgents?: AvailableAgent[];
17
17
  }
18
18
  export declare function buildRoleSection(): string;
19
19
  export declare function buildDisciplineSection(): string;
20
20
  export declare function buildSidebarTodosSection(): string;
21
21
  export declare function buildDelegationSection(disabled: Set<string>): string;
22
- export declare function buildDelegationNarrationSection(disabled?: Set<string>): string;
22
+ export declare function buildDelegationNarrationSection(
23
+ disabled?: Set<string>
24
+ ): string;
23
25
  export declare function buildPlanWorkflowSection(disabled: Set<string>): string;
24
- export declare function buildReviewWorkflowSection(disabled: Set<string>): string;
26
+ export declare function buildReviewWorkflowSection(
27
+ disabled: Set<string>
28
+ ): string;
25
29
  export declare function buildStyleSection(): string;
26
30
  /**
27
31
  * Build a delegation section for custom agents.
28
32
  * Returns empty string if no enabled custom agents exist.
29
33
  */
30
- export declare function buildCustomAgentDelegationSection(customAgents: AvailableAgent[], disabled: Set<string>): string;
34
+ export declare function buildCustomAgentDelegationSection(
35
+ customAgents: AvailableAgent[],
36
+ disabled: Set<string>
37
+ ): string;
31
38
  /**
32
39
  * Compose the full Loom system prompt from sections.
33
40
  * When no agents are disabled, produces identical output to LOOM_DEFAULTS.prompt.
@@ -1,22 +1,25 @@
1
1
  import type { AgentMode, WeaveAgentName } from "./types";
2
2
  export type FallbackEntry = {
3
- providers: string[];
4
- model: string;
5
- variant?: string;
3
+ providers: string[];
4
+ model: string;
5
+ variant?: string;
6
6
  };
7
7
  export type AgentModelRequirement = {
8
- fallbackChain: FallbackEntry[];
8
+ fallbackChain: FallbackEntry[];
9
9
  };
10
- export declare const AGENT_MODEL_REQUIREMENTS: Record<WeaveAgentName, AgentModelRequirement>;
10
+ export declare const AGENT_MODEL_REQUIREMENTS: Record<
11
+ WeaveAgentName,
12
+ AgentModelRequirement
13
+ >;
11
14
  export type ResolveAgentModelOptions = {
12
- availableModels: Set<string>;
13
- agentMode: AgentMode;
14
- uiSelectedModel?: string;
15
- categoryModel?: string;
16
- overrideModel?: string;
17
- systemDefaultModel?: string;
18
- /** Custom fallback chain for agents not in AGENT_MODEL_REQUIREMENTS */
19
- customFallbackChain?: FallbackEntry[];
15
+ availableModels: Set<string>;
16
+ agentMode: AgentMode;
17
+ uiSelectedModel?: string;
18
+ categoryModel?: string;
19
+ overrideModel?: string;
20
+ systemDefaultModel?: string;
21
+ /** Custom fallback chain for agents not in AGENT_MODEL_REQUIREMENTS */
22
+ customFallbackChain?: FallbackEntry[];
20
23
  };
21
24
  /**
22
25
  * Resolve the model for an agent. Accepts any string agent name.
@@ -24,4 +27,7 @@ export type ResolveAgentModelOptions = {
24
27
  * Custom agents use the customFallbackChain option, or fall through
25
28
  * to system default / hardcoded fallback.
26
29
  */
27
- export declare function resolveAgentModel(agentName: string, options: ResolveAgentModelOptions): string;
30
+ export declare function resolveAgentModel(
31
+ agentName: string,
32
+ options: ResolveAgentModelOptions
33
+ ): string;
@@ -6,4 +6,7 @@
6
6
  * @param basePath - Base directory for resolving relative paths (defaults to cwd)
7
7
  * @returns The file contents as a string, or null if the file doesn't exist or path escapes the sandbox
8
8
  */
9
- export declare function loadPromptFile(promptFilePath: string, basePath?: string): string | null;
9
+ export declare function loadPromptFile(
10
+ promptFilePath: string,
11
+ basePath?: string
12
+ ): string | null;
@@ -1,2 +1,5 @@
1
1
  /** Check whether an agent is enabled (not in the disabled set). */
2
- export declare function isAgentEnabled(name: string, disabled: Set<string>): boolean;
2
+ export declare function isAgentEnabled(
3
+ name: string,
4
+ disabled: Set<string>
5
+ ): boolean;
@@ -5,5 +5,8 @@ export type { TapestryPromptOptions } from "./prompt-composer";
5
5
  /**
6
6
  * Create a Tapestry agent config with optional disabled agents for prompt composition.
7
7
  */
8
- export declare function createTapestryAgentWithOptions(model: string, disabledAgents?: Set<string>): AgentConfig;
8
+ export declare function createTapestryAgentWithOptions(
9
+ model: string,
10
+ disabledAgents?: Set<string>
11
+ ): AgentConfig;
9
12
  export declare const createTapestryAgent: AgentFactory;
@@ -6,19 +6,25 @@
6
6
  * hardcoded TAPESTRY_DEFAULTS.prompt string.
7
7
  */
8
8
  export interface TapestryPromptOptions {
9
- /** Set of disabled agent names (lowercase config keys) */
10
- disabledAgents?: Set<string>;
9
+ /** Set of disabled agent names (lowercase config keys) */
10
+ disabledAgents?: Set<string>;
11
11
  }
12
12
  export declare function buildTapestryRoleSection(): string;
13
13
  export declare function buildTapestryDisciplineSection(): string;
14
14
  export declare function buildTapestrySidebarTodosSection(): string;
15
- export declare function buildTapestryPlanExecutionSection(disabled?: Set<string>): string;
15
+ export declare function buildTapestryPlanExecutionSection(
16
+ disabled?: Set<string>
17
+ ): string;
16
18
  export declare function buildTapestryVerificationSection(): string;
17
- export declare function buildTapestryPostExecutionReviewSection(disabled: Set<string>): string;
19
+ export declare function buildTapestryPostExecutionReviewSection(
20
+ disabled: Set<string>
21
+ ): string;
18
22
  export declare function buildTapestryExecutionSection(): string;
19
23
  export declare function buildTapestryStyleSection(): string;
20
24
  /**
21
25
  * Compose the full Tapestry system prompt from sections.
22
26
  * When no agents are disabled, produces identical output to TAPESTRY_DEFAULTS.prompt.
23
27
  */
24
- export declare function composeTapestryPrompt(options?: TapestryPromptOptions): string;
28
+ export declare function composeTapestryPrompt(
29
+ options?: TapestryPromptOptions
30
+ ): string;
@@ -11,7 +11,7 @@ export type AgentMode = "primary" | "subagent" | "all";
11
11
  * Mode is exposed as static property for pre-instantiation access.
12
12
  */
13
13
  export type AgentFactory = ((model: string) => AgentConfig) & {
14
- mode: AgentMode;
14
+ mode: AgentMode;
15
15
  };
16
16
  /**
17
17
  * Agent source is either a factory (called with model) or a static config (cloned)
@@ -20,7 +20,11 @@ export type AgentSource = AgentFactory | AgentConfig;
20
20
  /**
21
21
  * Agent category for grouping in Loom prompt sections
22
22
  */
23
- export type AgentCategory = "exploration" | "specialist" | "advisor" | "utility";
23
+ export type AgentCategory =
24
+ | "exploration"
25
+ | "specialist"
26
+ | "advisor"
27
+ | "utility";
24
28
  /**
25
29
  * Cost classification for Tool Selection table
26
30
  */
@@ -29,49 +33,59 @@ export type AgentCost = "FREE" | "CHEAP" | "EXPENSIVE";
29
33
  * Delegation trigger for Loom prompt's Delegation Table
30
34
  */
31
35
  export interface DelegationTrigger {
32
- /** Domain of work (e.g., "Frontend UI/UX") */
33
- domain: string;
34
- /** When to delegate (e.g., "Visual changes only...") */
35
- trigger: string;
36
+ /** Domain of work (e.g., "Frontend UI/UX") */
37
+ domain: string;
38
+ /** When to delegate (e.g., "Visual changes only...") */
39
+ trigger: string;
36
40
  }
37
41
  /**
38
42
  * Metadata for generating Loom prompt sections dynamically.
39
43
  * Allows adding/removing agents without manually updating the Loom prompt.
40
44
  */
41
45
  export interface AgentPromptMetadata {
42
- /** Category for grouping in prompt sections */
43
- category: AgentCategory;
44
- /** Cost classification for Tool Selection table */
45
- cost: AgentCost;
46
- /** Domain triggers for Delegation Table */
47
- triggers: DelegationTrigger[];
48
- /** When to use this agent (for detailed sections) */
49
- useWhen?: string[];
50
- /** When NOT to use this agent */
51
- avoidWhen?: string[];
52
- /** Optional dedicated prompt section (markdown) */
53
- dedicatedSection?: string;
54
- /** Nickname/alias used in prompt (e.g., "Pattern" instead of "pattern") */
55
- promptAlias?: string;
56
- /** Key trigger that should appear in Phase 0 quick checks */
57
- keyTrigger?: string;
46
+ /** Category for grouping in prompt sections */
47
+ category: AgentCategory;
48
+ /** Cost classification for Tool Selection table */
49
+ cost: AgentCost;
50
+ /** Domain triggers for Delegation Table */
51
+ triggers: DelegationTrigger[];
52
+ /** When to use this agent (for detailed sections) */
53
+ useWhen?: string[];
54
+ /** When NOT to use this agent */
55
+ avoidWhen?: string[];
56
+ /** Optional dedicated prompt section (markdown) */
57
+ dedicatedSection?: string;
58
+ /** Nickname/alias used in prompt (e.g., "Pattern" instead of "pattern") */
59
+ promptAlias?: string;
60
+ /** Key trigger that should appear in Phase 0 quick checks */
61
+ keyTrigger?: string;
58
62
  }
59
63
  /**
60
64
  * The 8 built-in Weave agent names
61
65
  */
62
- export type WeaveAgentName = "loom" | "tapestry" | "shuttle" | "pattern" | "thread" | "spindle" | "weft" | "warp";
66
+ export type WeaveAgentName =
67
+ | "loom"
68
+ | "tapestry"
69
+ | "shuttle"
70
+ | "pattern"
71
+ | "thread"
72
+ | "spindle"
73
+ | "weft"
74
+ | "warp";
63
75
  /**
64
76
  * Override config for a single agent — all fields optional
65
77
  */
66
78
  export type AgentOverrideConfig = Partial<AgentConfig> & {
67
- prompt_append?: string;
68
- variant?: string;
69
- fallback_models?: string | string[];
79
+ prompt_append?: string;
80
+ variant?: string;
81
+ fallback_models?: string | string[];
70
82
  };
71
83
  /**
72
84
  * Map of agent name to override config
73
85
  */
74
- export type AgentOverrides = Partial<Record<WeaveAgentName, AgentOverrideConfig>>;
86
+ export type AgentOverrides = Partial<
87
+ Record<WeaveAgentName, AgentOverrideConfig>
88
+ >;
75
89
  /**
76
90
  * Returns true if the model string identifies a GPT/OpenAI model.
77
91
  */
@@ -1,2 +1,6 @@
1
1
  import { type WeaveConfig } from "./schema";
2
- export declare function loadWeaveConfig(directory: string, _ctx?: unknown, _homeDir?: string): WeaveConfig;
2
+ export declare function loadWeaveConfig(
3
+ directory: string,
4
+ _ctx?: unknown,
5
+ _homeDir?: string
6
+ ): WeaveConfig;
@@ -1,3 +1,6 @@
1
1
  import type { WeaveConfig } from "./schema";
2
2
  import type { DeepPartial } from "../shared/types";
3
- export declare function mergeConfigs(user: DeepPartial<WeaveConfig>, project: DeepPartial<WeaveConfig>): DeepPartial<WeaveConfig>;
3
+ export declare function mergeConfigs(
4
+ user: DeepPartial<WeaveConfig>,
5
+ project: DeepPartial<WeaveConfig>
6
+ ): DeepPartial<WeaveConfig>;