drizzy-agent 0.3.0 → 0.4.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.
@@ -0,0 +1,12 @@
1
+ import type { InstallDefaultsSnapshot } from "./shared/install-defaults-contract";
2
+ export declare class PluginConfigFixture {
3
+ readonly rootDir: string;
4
+ readonly userConfigDir: string;
5
+ readonly projectDir: string;
6
+ constructor();
7
+ writeUserConfig(config: Record<string, unknown>): void;
8
+ writeProjectConfig(config: Record<string, unknown>): void;
9
+ cleanup(): void;
10
+ private writeConfig;
11
+ }
12
+ export declare function createInstallDefaultsSnapshot(overrides?: Record<string, unknown>): InstallDefaultsSnapshot;
@@ -0,0 +1,12 @@
1
+ import type { AgentConfig, CategoryConfig, ProviderAvailability } from "../cli/model-fallback-types";
2
+ import type { InstallDefaultsProviders } from "./install-defaults-contract";
3
+ export interface ComputedInstallDefaults {
4
+ agents: Record<string, AgentConfig>;
5
+ categories: Record<string, CategoryConfig>;
6
+ }
7
+ type ComputedInstallDefaultsOptions = {
8
+ isMaxPlan?: boolean;
9
+ };
10
+ export declare function toComputedProviderAvailability(providers: InstallDefaultsProviders, options?: ComputedInstallDefaultsOptions): ProviderAvailability;
11
+ export declare function computeDefaultsFromProviders(providers: InstallDefaultsProviders, options?: ComputedInstallDefaultsOptions): ComputedInstallDefaults;
12
+ export {};
@@ -54,4 +54,6 @@ export * from "./session-directory-resolver";
54
54
  export * from "./prompt-tools";
55
55
  export * from "./internal-initiator-marker";
56
56
  export * from "./plugin-command-discovery";
57
+ export * from "./install-defaults-contract";
58
+ export * from "./computed-install-defaults";
57
59
  export { SessionCategoryRegistry } from "./session-category-registry";
@@ -0,0 +1,35 @@
1
+ export declare const INSTALL_DEFAULTS_ROOT_KEY: "_install_defaults";
2
+ export declare const INSTALL_DEFAULTS_SNAPSHOT_VERSION: 1;
3
+ export declare const INSTALL_DEFAULTS_PRECEDENCE: readonly ["project-explicit-override", "user-explicit-override", "snapshot-derived-default", "built-in-default"];
4
+ export type InstallDefaultsPrecedence = (typeof INSTALL_DEFAULTS_PRECEDENCE)[number];
5
+ export type InstallDefaultsClaudeProvider = "no" | "yes" | "max20";
6
+ export declare const INSTALL_DEFAULTS_PROVIDER_KEYS: readonly ["claude", "openai", "gemini", "copilot", "opencode_zen", "zai_coding_plan", "kimi_for_coding"];
7
+ /**
8
+ * Minimal install-owned snapshot persisted in user config.
9
+ *
10
+ * Persist only `_install_defaults.snapshot_version` plus normalized provider
11
+ * availability under `_install_defaults.providers`. Expanded generated
12
+ * `agents` and `categories` defaults are intentionally out of scope so runtime
13
+ * can recompute them from current fallback rules.
14
+ */
15
+ export interface InstallDefaultsProviders {
16
+ claude: InstallDefaultsClaudeProvider;
17
+ openai: boolean;
18
+ gemini: boolean;
19
+ copilot: boolean;
20
+ opencode_zen: boolean;
21
+ zai_coding_plan: boolean;
22
+ kimi_for_coding: boolean;
23
+ }
24
+ export interface InstallDefaultsSnapshot {
25
+ snapshot_version: typeof INSTALL_DEFAULTS_SNAPSHOT_VERSION;
26
+ providers: InstallDefaultsProviders;
27
+ }
28
+ /**
29
+ * Explicit overrides stay sparse. Omitting `model` or `variant` means "use the
30
+ * computed default" rather than pinning an empty value in config.
31
+ */
32
+ export interface ComputedDefaultOverride {
33
+ model?: string;
34
+ variant?: string;
35
+ }
@@ -1 +1,3 @@
1
- export declare function migrateConfigFile(configPath: string, rawConfig: Record<string, unknown>): boolean;
1
+ export declare function migrateConfigFile(configPath: string, rawConfig: Record<string, unknown>, options?: {
2
+ writeToDisk?: boolean;
3
+ }): boolean;
@@ -1,5 +1,4 @@
1
1
  export { AGENT_NAME_MAP, BUILTIN_AGENT_NAMES, migrateAgentNames } from "./migration/agent-names";
2
2
  export { HOOK_NAME_MAP, migrateHookNames } from "./migration/hook-names";
3
3
  export { MODEL_VERSION_MAP, migrateModelVersions } from "./migration/model-versions";
4
- export { MODEL_TO_CATEGORY_MAP, migrateAgentConfigToCategory, shouldDeleteAgentConfig } from "./migration/agent-category";
5
4
  export { migrateConfigFile } from "./migration/config-migration";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzy-agent",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "DrizzyAgent - AI agent plugin for OpenCode",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -76,17 +76,17 @@
76
76
  "typescript": "^5.7.3"
77
77
  },
78
78
  "optionalDependencies": {
79
- "drizzy-agent-darwin-arm64": "0.3.0",
80
- "drizzy-agent-darwin-x64": "0.3.0",
81
- "drizzy-agent-darwin-x64-baseline": "0.3.0",
82
- "drizzy-agent-linux-arm64": "0.3.0",
83
- "drizzy-agent-linux-arm64-musl": "0.3.0",
84
- "drizzy-agent-linux-x64": "0.3.0",
85
- "drizzy-agent-linux-x64-baseline": "0.3.0",
86
- "drizzy-agent-linux-x64-musl": "0.3.0",
87
- "drizzy-agent-linux-x64-musl-baseline": "0.3.0",
88
- "drizzy-agent-windows-x64": "0.3.0",
89
- "drizzy-agent-windows-x64-baseline": "0.3.0"
79
+ "drizzy-agent-darwin-arm64": "0.4.0",
80
+ "drizzy-agent-darwin-x64": "0.4.0",
81
+ "drizzy-agent-darwin-x64-baseline": "0.4.0",
82
+ "drizzy-agent-linux-arm64": "0.4.0",
83
+ "drizzy-agent-linux-arm64-musl": "0.4.0",
84
+ "drizzy-agent-linux-x64": "0.4.0",
85
+ "drizzy-agent-linux-x64-baseline": "0.4.0",
86
+ "drizzy-agent-linux-x64-musl": "0.4.0",
87
+ "drizzy-agent-linux-x64-musl-baseline": "0.4.0",
88
+ "drizzy-agent-windows-x64": "0.4.0",
89
+ "drizzy-agent-windows-x64-baseline": "0.4.0"
90
90
  },
91
91
  "overrides": {
92
92
  "@opencode-ai/sdk": "^1.2.24"
@@ -1,19 +0,0 @@
1
- /**
2
- * @deprecated LEGACY MIGRATION ONLY
3
- *
4
- * This map exists solely for migrating old configs that used hardcoded model strings.
5
- * It maps legacy model strings to semantic category names, allowing users to migrate
6
- * from explicit model configs to category-based configs.
7
- *
8
- * DO NOT add new entries here. New agents should use:
9
- * - Category-based config (preferred): { category: "unspecified-high" }
10
- * - Or inherit from OpenCode's config.model
11
- *
12
- * This map will be removed in a future major version once migration period ends.
13
- */
14
- export declare const MODEL_TO_CATEGORY_MAP: Record<string, string>;
15
- export declare function migrateAgentConfigToCategory(config: Record<string, unknown>): {
16
- migrated: Record<string, unknown>;
17
- changed: boolean;
18
- };
19
- export declare function shouldDeleteAgentConfig(config: Record<string, unknown>, category: string): boolean;