🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opencode_weave/weave

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode_weave/weave - npm Package Compare versions

Comparing version
0.7.6
to
0.8.0
+37
dist/config/json-schema.d.ts
export type JsonSchemaObject = Record<string, unknown>;
export declare const WEAVE_CONFIG_JSON_SCHEMA_RELATIVE_PATH = "schema/weave-config.schema.json";
export declare const WEAVE_CONFIG_JSON_SCHEMA_ID = "https://raw.githubusercontent.com/pgermishuys/opencode-weave/main/schema/weave-config.schema.json";
export declare const WEAVE_CONFIG_JSON_SCHEMA_DRAFT = "https://json-schema.org/draft/2020-12/schema";
export declare const WEAVE_CONFIG_JSON_SCHEMA_TITLE = "Weave Config";
export declare const WEAVE_CONFIG_JSON_SCHEMA_DESCRIPTION = "Configuration for the @opencode_weave/weave OpenCode plugin. Runtime loading accepts JSONC, while the generated schema artifact is plain JSON Schema.";
export declare const WEAVE_CONFIG_JSON_SCHEMA_VERSION_KEY = "x-weave-version";
export declare const WEAVE_CONFIG_JSON_SCHEMA_ROOT_NAME = "WeaveConfig";
export declare const WEAVE_CONFIG_JSON_SCHEMA_DEFINITION_PATH = "$defs";
export declare const WEAVE_CONFIG_JSON_SCHEMA_REF_STRATEGY = "root";
export declare const WEAVE_CONFIG_JSON_SCHEMA_ZOD_TO_JSON_SCHEMA_TARGET = "jsonSchema2019-09";
export declare const WEAVE_CONFIG_JSON_SCHEMA_FALLBACK_TARGET = "draft-2020-12";
export declare const SAFE_RELATIVE_PATH_PATTERN = "^(?![\\\\/])(?![A-Za-z]:[\\\\/])(?!.*(?:^|[\\\\/])\\.\\.(?:[\\\\/]|$)).+$";
export declare const SAFE_RELATIVE_PATH_DESCRIPTION = "Relative directory path only. Absolute paths, leading backslashes/UNC paths, and '..' traversal segments are rejected at runtime.";
/**
* Root-level metadata contract shared by the config schema generator, tests,
* and docs. The artifact stays at one stable repository path; version
* traceability is embedded as metadata instead of versioning filenames.
*/
export declare function getWeaveConfigJsonSchemaMetadata(version: string): {
$schema: string;
$id: string;
title: string;
description: string;
"x-weave-version": string;
};
export declare function getWeaveConfigJsonSchemaArtifactPath(rootDir: string): string;
type GenerateWeaveConfigJsonSchemaOptions = {
version: string;
};
/**
* Applies the repository's agreed root metadata contract to a generated
* Weave config schema object. Pure so scripts and tests can share it.
*/
export declare function generateWeaveConfigJsonSchema({ version }: GenerateWeaveConfigJsonSchemaOptions): JsonSchemaObject;
export declare function stringifyWeaveConfigJsonSchema(schema: JsonSchemaObject): string;
export {};
import type { WeaveConfig } from "../../config/schema";
/**
* Derives the full set of enabled agent keys from a WeaveConfig.
*
* Includes:
* - Built-in agents that are not disabled
* - Custom agents that are not disabled
* - `shuttle-{category}` agents for all defined categories (patterns only affect
* routing hints in Tapestry's prompt, not agent existence),
* as long as the base `shuttle` agent is not disabled and the specific
* `shuttle-{category}` key is not disabled
*/
export declare function buildEnabledAgentKeys(pluginConfig: WeaveConfig): Set<string>;
export declare function hasWindowsDrivePrefix(path: string): boolean;
export declare function hasLeadingBackslash(path: string): boolean;
+3
-2

@@ -5,8 +5,9 @@ import type { AgentConfig } from "@opencode-ai/sdk";

import type { ProjectFingerprint } from "../../features/analytics/types";
import type { CategoriesConfig } from "../../config/schema";
export { composeLoomPrompt } from "./prompt-composer";
export type { LoomPromptOptions } from "./prompt-composer";
/**
* Create a Loom agent config with optional disabled agents, fingerprint, and custom agents for prompt composition.
* Create a Loom agent config with optional disabled agents, fingerprint, custom agents, and categories for prompt composition.
*/
export declare function createLoomAgentWithOptions(model: string, disabledAgents?: Set<string>, fingerprint?: ProjectFingerprint | null, customAgents?: AvailableAgent[]): AgentConfig;
export declare function createLoomAgentWithOptions(model: string, disabledAgents?: Set<string>, fingerprint?: ProjectFingerprint | null, customAgents?: AvailableAgent[], categories?: CategoriesConfig): AgentConfig;
export declare const createLoomAgent: AgentFactory;

@@ -10,2 +10,3 @@ /**

import type { AvailableAgent } from "../dynamic-prompt-builder";
import type { CategoriesConfig } from "../../config/schema";
export interface LoomPromptOptions {

@@ -18,2 +19,4 @@ /** Set of disabled agent names (lowercase config keys) */

customAgents?: AvailableAgent[];
/** Categories config for category-aware shuttle routing */
categories?: CategoriesConfig;
}

@@ -29,2 +32,9 @@ export declare function buildRoleSection(): string;

/**
* Build a category routing section listing shuttle-{category} agents.
* Categories with patterns get file-pattern routing guidance.
* Categories without patterns are still listed as available specialists.
* Returns empty string when no categories exist or shuttle is disabled.
*/
export declare function buildCategoryRoutingSection(categories: CategoriesConfig | undefined, disabled: Set<string>): string;
/**
* Build a delegation section for custom agents.

@@ -31,0 +41,0 @@ * Returns empty string if no enabled custom agents exist.

+2
-1
import type { AgentConfig } from "@opencode-ai/sdk";
import type { ResolvedContinuationConfig } from "../../config/continuation";
import type { CategoriesConfig } from "../../config/schema";
import type { AgentFactory } from "../types";

@@ -9,3 +10,3 @@ export { composeTapestryPrompt } from "./prompt-composer";

*/
export declare function createTapestryAgentWithOptions(model: string, disabledAgents?: Set<string>, continuation?: ResolvedContinuationConfig): AgentConfig;
export declare function createTapestryAgentWithOptions(model: string, disabledAgents?: Set<string>, continuation?: ResolvedContinuationConfig, categories?: CategoriesConfig): AgentConfig;
export declare const createTapestryAgent: AgentFactory;

@@ -9,2 +9,3 @@ /**

import type { ResolvedContinuationConfig } from "../../config/continuation";
import type { CategoriesConfig } from "../../config/schema";
export interface TapestryPromptOptions {

@@ -15,7 +16,13 @@ /** Set of disabled agent names (lowercase config keys) */

continuation?: ResolvedContinuationConfig;
/** Categories config for dynamic category routing section */
categories?: CategoriesConfig;
}
export declare function buildTapestryRoleSection(): string;
export declare function buildTapestryInvariantSection(): string;
export declare function buildTapestryInvariantSection(disabled?: Set<string>): string;
export declare function buildTapestryDisciplineSection(): string;
export declare function buildTapestrySidebarTodosSection(): string;
export declare function buildTapestryDelegationSection(categoryNames?: string[]): string;
export declare function buildTapestryParallelismSection(): string;
export declare function buildTapestryCategoryRoutingSection(categories: CategoriesConfig): string | null;
export declare function buildTapestryErrorHandlingSection(): string;
export declare function buildTapestryPlanExecutionSection(disabled?: Set<string>): string;

@@ -22,0 +29,0 @@ export declare function buildTapestryContinuationHintSection(continuation?: ResolvedContinuationConfig): string | null;

export * from "./schema";
export { generateWeaveConfigJsonSchema, getWeaveConfigJsonSchemaArtifactPath, getWeaveConfigJsonSchemaMetadata, SAFE_RELATIVE_PATH_DESCRIPTION, SAFE_RELATIVE_PATH_PATTERN, stringifyWeaveConfigJsonSchema, WEAVE_CONFIG_JSON_SCHEMA_DEFINITION_PATH, WEAVE_CONFIG_JSON_SCHEMA_DESCRIPTION, WEAVE_CONFIG_JSON_SCHEMA_DRAFT, WEAVE_CONFIG_JSON_SCHEMA_FALLBACK_TARGET, WEAVE_CONFIG_JSON_SCHEMA_ID, WEAVE_CONFIG_JSON_SCHEMA_REF_STRATEGY, WEAVE_CONFIG_JSON_SCHEMA_RELATIVE_PATH, WEAVE_CONFIG_JSON_SCHEMA_ROOT_NAME, WEAVE_CONFIG_JSON_SCHEMA_TITLE, WEAVE_CONFIG_JSON_SCHEMA_VERSION_KEY, WEAVE_CONFIG_JSON_SCHEMA_ZOD_TO_JSON_SCHEMA_TARGET, type JsonSchemaObject, } from "./json-schema";
export { loadWeaveConfig } from "./loader";
export { mergeConfigs } from "./merge";
export * from "./continuation";

@@ -13,2 +13,3 @@ import { z } from "zod";

tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
disable: z.ZodOptional<z.ZodBoolean>;

@@ -34,2 +35,3 @@ mode: z.ZodOptional<z.ZodEnum<{

tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
disable: z.ZodOptional<z.ZodBoolean>;

@@ -55,2 +57,3 @@ mode: z.ZodOptional<z.ZodEnum<{

disable: z.ZodOptional<z.ZodBoolean>;
patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;

@@ -68,2 +71,3 @@ export declare const CategoriesConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{

disable: z.ZodOptional<z.ZodBoolean>;
patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;

@@ -121,2 +125,3 @@ export declare const BackgroundConfigSchema: z.ZodObject<{

maxTokens: z.ZodOptional<z.ZodNumber>;
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;

@@ -155,2 +160,3 @@ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;

maxTokens: z.ZodOptional<z.ZodNumber>;
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;

@@ -205,2 +211,3 @@ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;

tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
disable: z.ZodOptional<z.ZodBoolean>;

@@ -240,2 +247,3 @@ mode: z.ZodOptional<z.ZodEnum<{

maxTokens: z.ZodOptional<z.ZodNumber>;
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;

@@ -260,2 +268,3 @@ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;

disable: z.ZodOptional<z.ZodBoolean>;
patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;

@@ -262,0 +271,0 @@ disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodString>>;

@@ -1,1 +0,1 @@

export declare const START_WORK_TEMPLATE = "You are being activated by the /start-work command to execute a Weave plan.\n\n## Your Mission\nRead and execute the work plan, completing each unchecked task until every checkbox is checked.\n\nExecution is non-terminal while any `- [ ]` task remains.\nDo not stop, ask what to do next, or wait for acknowledgment while unchecked tasks remain.\n\n## Startup Procedure\n\n1. **Check for active work state**: Read `.weave/state.json` to see if there's a plan already in progress.\n2. **If resuming**: The system has injected context below with the active plan path and progress. Read the plan file, find the first unchecked `- [ ]` task, and continue from there.\n3. **If starting fresh**: The system has selected a plan and created work state. Read the plan file and begin from the first unchecked task.\n\n## Execution Loop\n\nFor each unchecked `- [ ]` task in the plan:\n\n1. **Read** the task description, acceptance criteria, and any references\n2. **Execute** the task \u2014 write code, run commands, create files as needed\n3. **Verify** the work \u2014 run tests, check for errors, validate acceptance criteria\n4. **Mark complete** \u2014 use the Edit tool to change `- [ ]` to `- [x]` in the plan file\n5. **Report progress** \u2014 \"Completed task N/M: [title]\"\n6. **Continue immediately** \u2014 find the next unchecked task and begin it without waiting for user acknowledgment\n\n## Rules\n\n- Work through tasks **top to bottom** unless dependencies require a different order\n- **Verify every task** before marking it complete\n- A progress update is **not** a stopping point\n- Do **not** ask the user what to do next while unchecked tasks remain\n- Do **not** mention terminal validation, review, reviewers, final summary, completion, or post-execution steps while unchecked tasks remain\n- If asked what to do now while unchecked tasks remain, answer with only the immediate next execution action\n- Keep mid-plan responses to one sentence or one short bullet\n- If the current task is blocked, document the reason and move to the next unchecked task that is not blocked\n- Stop only when:\n 1. all checkboxes are checked, or\n 2. the user explicitly tells you to stop, or\n 3. every remaining unchecked task is truly blocked\n- When all tasks are complete, switch to terminal-state behavior";
export declare const START_WORK_TEMPLATE = "You are being activated by the /start-work command to execute a Weave plan.\n\n## Your Mission\nRead the plan and execute it by delegating each unchecked task to Shuttle via the Task tool.\nYou do NOT implement work directly \u2014 you coordinate, delegate, verify, and track progress.\n\nExecution is non-terminal while any `- [ ]` task remains.\nDo not stop, ask what to do next, or wait for acknowledgment while unchecked tasks remain.\n\n## Startup Procedure\n\n1. **Check for active work state**: Read `.weave/state.json` to see if there's a plan already in progress.\n2. **If resuming**: The system has injected context below with the active plan path and progress. Read the plan file, find the first unchecked `- [ ]` task, and continue from there.\n3. **If starting fresh**: The system has selected a plan and created work state. Read the plan file and begin from the first unchecked task.\n\n## Execution Loop\n\nFor each unchecked `- [ ]` task in the plan:\n\n1. **Read** the task description, acceptance criteria, and any references\n2. **Delegate** the task to Shuttle via the Task tool using this prompt format:\n ```\n Task [N/M]: [Task Title]\n **What**: [full task description from plan]\n **Files**: [file paths from plan]\n **Acceptance**: [acceptance criteria from plan]\n **Context from completed tasks**: [any output or decisions from prior tasks that affect this one]\n **Learnings**: [relevant entries from .weave/learnings/{plan-name}.md if the file exists]\n ```\n3. **Verify** Shuttle's result \u2014 re-read modified files, check acceptance criteria are met\n4. **Mark complete** \u2014 use the Edit tool to change `- [ ]` to `- [x]` in the plan file\n5. **Report progress** \u2014 \"Completed task N/M: [title]\"\n6. **Continue immediately** \u2014 find the next unchecked task and delegate it without waiting for user acknowledgment\n\n## Rules\n\n- Work through tasks **top to bottom** unless dependencies require a different order\n- **Delegate every task to Shuttle** \u2014 do not implement work directly yourself\n- **Verify every task** before marking it complete; if verification fails, re-delegate to Shuttle with the failure details\n- A progress update is **not** a stopping point\n- Do **not** ask the user what to do next while unchecked tasks remain\n- Do **not** mention terminal validation, review, reviewers, final summary, completion, or post-execution steps while unchecked tasks remain\n- If asked what to do now while unchecked tasks remain, answer with only the immediate next delegation action\n- Keep mid-plan responses to one sentence or one short bullet\n- If the current task is blocked, document the reason and move to the next unchecked task that is not blocked\n- Stop only when:\n 1. all checkboxes are checked, or\n 2. the user explicitly tells you to stop, or\n 3. every remaining unchecked task is truly blocked\n- When all tasks are complete, switch to terminal-state behavior";

@@ -29,2 +29,15 @@ import { z } from "zod";

disabledAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
categories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
model: z.ZodOptional<z.ZodString>;
fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
variant: z.ZodOptional<z.ZodString>;
temperature: z.ZodOptional<z.ZodNumber>;
top_p: z.ZodOptional<z.ZodNumber>;
maxTokens: z.ZodOptional<z.ZodNumber>;
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
prompt_append: z.ZodOptional<z.ZodString>;
disable: z.ZodOptional<z.ZodBoolean>;
patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
}, z.core.$strip>;

@@ -45,2 +58,15 @@ export declare const BuiltinAgentPromptTargetSchema: z.ZodObject<{

disabledAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
categories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
model: z.ZodOptional<z.ZodString>;
fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
variant: z.ZodOptional<z.ZodString>;
temperature: z.ZodOptional<z.ZodNumber>;
top_p: z.ZodOptional<z.ZodNumber>;
maxTokens: z.ZodOptional<z.ZodNumber>;
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
prompt_append: z.ZodOptional<z.ZodString>;
disable: z.ZodOptional<z.ZodBoolean>;
patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
}, z.core.$strip>>;

@@ -76,2 +102,15 @@ }, z.core.$strip>;

disabledAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
categories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
model: z.ZodOptional<z.ZodString>;
fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
variant: z.ZodOptional<z.ZodString>;
temperature: z.ZodOptional<z.ZodNumber>;
top_p: z.ZodOptional<z.ZodNumber>;
maxTokens: z.ZodOptional<z.ZodNumber>;
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
prompt_append: z.ZodOptional<z.ZodString>;
disable: z.ZodOptional<z.ZodBoolean>;
patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
}, z.core.$strip>>;

@@ -179,4 +218,7 @@ }, z.core.$strip>, z.ZodObject<{

expectedSequence: z.ZodOptional<z.ZodArray<z.ZodString>>;
expectedDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
requiredAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
requiredDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
forbiddenAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
forbiddenDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
minTurns: z.ZodOptional<z.ZodNumber>;

@@ -213,2 +255,33 @@ maxTurns: z.ZodOptional<z.ZodNumber>;

}, z.core.$strip>;
export declare const TrajectoryTurnResultSchema: z.ZodObject<{
turn: z.ZodNumber;
agent: z.ZodString;
role: z.ZodEnum<{
user: "user";
assistant: "assistant";
}>;
response: z.ZodString;
expectedDelegation: z.ZodOptional<z.ZodString>;
observedDelegation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
durationMs: z.ZodNumber;
}, z.core.$strip>;
export declare const TrajectoryTraceSchema: z.ZodObject<{
scenarioId: z.ZodString;
turns: z.ZodArray<z.ZodObject<{
turn: z.ZodNumber;
agent: z.ZodString;
role: z.ZodEnum<{
user: "user";
assistant: "assistant";
}>;
response: z.ZodString;
expectedDelegation: z.ZodOptional<z.ZodString>;
observedDelegation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
durationMs: z.ZodNumber;
}, z.core.$strip>>;
delegationSequence: z.ZodArray<z.ZodString>;
delegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
totalTurns: z.ZodNumber;
completedTurns: z.ZodNumber;
}, z.core.$strip>;
export declare const EvaluatorSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{

@@ -263,4 +336,7 @@ weight: z.ZodOptional<z.ZodNumber>;

expectedSequence: z.ZodOptional<z.ZodArray<z.ZodString>>;
expectedDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
requiredAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
requiredDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
forbiddenAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
forbiddenDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
minTurns: z.ZodOptional<z.ZodNumber>;

@@ -293,2 +369,15 @@ maxTurns: z.ZodOptional<z.ZodNumber>;

disabledAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
categories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
model: z.ZodOptional<z.ZodString>;
fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
variant: z.ZodOptional<z.ZodString>;
temperature: z.ZodOptional<z.ZodNumber>;
top_p: z.ZodOptional<z.ZodNumber>;
maxTokens: z.ZodOptional<z.ZodNumber>;
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
prompt_append: z.ZodOptional<z.ZodString>;
disable: z.ZodOptional<z.ZodBoolean>;
patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>>;
}, z.core.$strip>>;

@@ -370,4 +459,7 @@ }, z.core.$strip>, z.ZodObject<{

expectedSequence: z.ZodOptional<z.ZodArray<z.ZodString>>;
expectedDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
requiredAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
requiredDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
forbiddenAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
forbiddenDelegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
minTurns: z.ZodOptional<z.ZodNumber>;

@@ -437,3 +529,21 @@ maxTurns: z.ZodOptional<z.ZodNumber>;

judgeOutput: z.ZodOptional<z.ZodString>;
trace: z.ZodOptional<z.ZodUnknown>;
trace: z.ZodOptional<z.ZodObject<{
scenarioId: z.ZodString;
turns: z.ZodArray<z.ZodObject<{
turn: z.ZodNumber;
agent: z.ZodString;
role: z.ZodEnum<{
user: "user";
assistant: "assistant";
}>;
response: z.ZodString;
expectedDelegation: z.ZodOptional<z.ZodString>;
observedDelegation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
durationMs: z.ZodNumber;
}, z.core.$strip>>;
delegationSequence: z.ZodArray<z.ZodString>;
delegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
totalTurns: z.ZodNumber;
completedTurns: z.ZodNumber;
}, z.core.$strip>>;
tokens: z.ZodOptional<z.ZodNumber>;

@@ -469,3 +579,21 @@ cost: z.ZodOptional<z.ZodNumber>;

judgeOutput: z.ZodOptional<z.ZodString>;
trace: z.ZodOptional<z.ZodUnknown>;
trace: z.ZodOptional<z.ZodObject<{
scenarioId: z.ZodString;
turns: z.ZodArray<z.ZodObject<{
turn: z.ZodNumber;
agent: z.ZodString;
role: z.ZodEnum<{
user: "user";
assistant: "assistant";
}>;
response: z.ZodString;
expectedDelegation: z.ZodOptional<z.ZodString>;
observedDelegation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
durationMs: z.ZodNumber;
}, z.core.$strip>>;
delegationSequence: z.ZodArray<z.ZodString>;
delegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
totalTurns: z.ZodNumber;
completedTurns: z.ZodNumber;
}, z.core.$strip>>;
tokens: z.ZodOptional<z.ZodNumber>;

@@ -600,3 +728,21 @@ cost: z.ZodOptional<z.ZodNumber>;

judgeOutput: z.ZodOptional<z.ZodString>;
trace: z.ZodOptional<z.ZodUnknown>;
trace: z.ZodOptional<z.ZodObject<{
scenarioId: z.ZodString;
turns: z.ZodArray<z.ZodObject<{
turn: z.ZodNumber;
agent: z.ZodString;
role: z.ZodEnum<{
user: "user";
assistant: "assistant";
}>;
response: z.ZodString;
expectedDelegation: z.ZodOptional<z.ZodString>;
observedDelegation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
durationMs: z.ZodNumber;
}, z.core.$strip>>;
delegationSequence: z.ZodArray<z.ZodString>;
delegationTargets: z.ZodOptional<z.ZodArray<z.ZodString>>;
totalTurns: z.ZodNumber;
completedTurns: z.ZodNumber;
}, z.core.$strip>>;
tokens: z.ZodOptional<z.ZodNumber>;

@@ -603,0 +749,0 @@ cost: z.ZodOptional<z.ZodNumber>;

import type { WeaveAgentName } from "../../agents/types";
import type { CategoriesConfig } from "../../config/schema";
export declare const EVAL_PHASES: readonly ["prompt", "routing", "trajectory", "experimental"];

@@ -15,2 +16,3 @@ export type EvalPhase = (typeof EVAL_PHASES)[number];

disabledAgents?: string[];
categories?: CategoriesConfig;
}

@@ -110,4 +112,7 @@ export interface BuiltinAgentPromptTarget {

expectedSequence?: string[];
expectedDelegationTargets?: string[];
requiredAgents?: string[];
requiredDelegationTargets?: string[];
forbiddenAgents?: string[];
forbiddenDelegationTargets?: string[];
minTurns?: number;

@@ -295,2 +300,3 @@ maxTurns?: number;

delegationSequence: string[];
delegationTargets?: string[];
totalTurns: number;

@@ -297,0 +303,0 @@ completedTurns: number;

@@ -8,2 +8,3 @@ /**

* - Absolute paths are rejected (must be relative to projectRoot)
* - Leading backslashes and Windows drive roots are rejected cross-platform
* - Resolved path must start with projectRoot (prevents `../../` traversal)

@@ -10,0 +11,0 @@ *

{
"name": "@opencode_weave/weave",
"version": "0.7.6",
"version": "0.8.0",
"description": "Weave — lean OpenCode plugin with multi-agent orchestration",
"author": "Weave",
"license": "MIT",
"homepage": "https://github.com/pgermishuys/weave#readme",
"homepage": "https://github.com/pgermishuys/opencode-weave#readme",
"repository": {
"type": "git",
"url": "https://github.com/pgermishuys/weave.git"
"url": "https://github.com/pgermishuys/opencode-weave.git"
},

@@ -27,2 +27,5 @@ "main": "dist/index.js",

"clean": "rm -rf dist",
"schema:config": "bun run script/generate-config-schema.ts",
"schema:config:check": "bun run script/generate-config-schema.ts --check",
"verify": "bun run script/verify.ts",
"typecheck": "tsc --noEmit",

@@ -56,4 +59,5 @@ "test": "bun test",

"bun-types": "^1.3.11",
"typescript": "^6.0.2"
"typescript": "^6.0.2",
"zod-to-json-schema": "^3.25.2"
}
}

@@ -25,2 +25,12 @@ <p align="center">

### Config schema
Weave ships a generated config schema at `schema/weave-config.schema.json` in this repository.
- Regenerate it: `bun run schema:config`
- Verify it is current: `bun run schema:config:check`
- Use it in config files via `$schema`, preferably pinned to a release tag such as `https://raw.githubusercontent.com/pgermishuys/opencode-weave/v0.7.6/schema/weave-config.schema.json`
The npm package currently publishes `dist/` only, so if you want a local `$schema` path you should vendor `schema/weave-config.schema.json` into your own repository. Runtime config still supports JSONC comments and trailing commas even though the published schema artifact is plain JSON.
## Agents

@@ -27,0 +37,0 @@

Sorry, the diff of this file is too big to display