drizzy-agent 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/config-manager/config-context.d.ts +1 -1
- package/dist/cli/config-manager/generate-drizzy-config.d.ts +2 -0
- package/dist/cli/config-manager/write-drizzy-config.d.ts +2 -0
- package/dist/cli/config-manager.d.ts +2 -2
- package/dist/cli/index.js +74 -77
- package/dist/hooks/keyword-detector/constants.d.ts +1 -0
- package/dist/hooks/keyword-detector/detector.d.ts +1 -1
- package/dist/hooks/keyword-detector/git/default.d.ts +12 -0
- package/dist/hooks/keyword-detector/git/index.d.ts +1 -0
- package/dist/index.js +19 -7
- package/dist/shared/opencode-config-dir-types.d.ts +1 -1
- package/package.json +12 -12
- package/dist/cli/config-manager/generate-omo-config.d.ts +0 -2
- package/dist/cli/config-manager/write-omo-config.d.ts +0 -2
|
@@ -10,4 +10,4 @@ export declare function resetConfigContext(): void;
|
|
|
10
10
|
export declare function getConfigDir(): string;
|
|
11
11
|
export declare function getConfigJson(): string;
|
|
12
12
|
export declare function getConfigJsonc(): string;
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function getDrizzyConfigPath(): string;
|
|
@@ -3,8 +3,8 @@ export { initConfigContext, getConfigContext, resetConfigContext, } from "./conf
|
|
|
3
3
|
export { fetchNpmDistTags } from "./config-manager/npm-dist-tags";
|
|
4
4
|
export { getPluginNameWithVersion } from "./config-manager/plugin-name-with-version";
|
|
5
5
|
export { addPluginToOpenCodeConfig } from "./config-manager/add-plugin-to-opencode-config";
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
6
|
+
export { generateDrizzyConfig } from "./config-manager/generate-drizzy-config";
|
|
7
|
+
export { writeDrizzyConfig } from "./config-manager/write-drizzy-config";
|
|
8
8
|
export { isOpenCodeInstalled, getOpenCodeVersion } from "./config-manager/opencode-binary";
|
|
9
9
|
export { detectCurrentConfig } from "./config-manager/detect-current-config";
|
|
10
10
|
export type { BunInstallResult } from "./config-manager/bun-install";
|
package/dist/cli/index.js
CHANGED
|
@@ -6267,7 +6267,7 @@ function getOpenCodeConfigPaths(options) {
|
|
|
6267
6267
|
configJson: join3(configDir, "opencode.json"),
|
|
6268
6268
|
configJsonc: join3(configDir, "opencode.jsonc"),
|
|
6269
6269
|
packageJson: join3(configDir, "package.json"),
|
|
6270
|
-
|
|
6270
|
+
drizzyConfig: join3(configDir, "drizzy-agent.json")
|
|
6271
6271
|
};
|
|
6272
6272
|
}
|
|
6273
6273
|
var TAURI_APP_IDENTIFIER = "ai.opencode.desktop", TAURI_APP_IDENTIFIER_DEV = "ai.opencode.desktop.dev";
|
|
@@ -6377,7 +6377,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6377
6377
|
fallbackChain: [
|
|
6378
6378
|
{
|
|
6379
6379
|
providers: ["openai", "venice", "opencode"],
|
|
6380
|
-
model: "gpt-5.
|
|
6380
|
+
model: "gpt-5.4",
|
|
6381
6381
|
variant: "medium"
|
|
6382
6382
|
},
|
|
6383
6383
|
{ providers: ["github-copilot"], model: "gpt-5.4", variant: "medium" }
|
|
@@ -6558,7 +6558,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6558
6558
|
fallbackChain: [
|
|
6559
6559
|
{
|
|
6560
6560
|
providers: ["openai", "opencode"],
|
|
6561
|
-
model: "gpt-5.
|
|
6561
|
+
model: "gpt-5.4",
|
|
6562
6562
|
variant: "medium"
|
|
6563
6563
|
},
|
|
6564
6564
|
{
|
|
@@ -6572,7 +6572,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6572
6572
|
variant: "high"
|
|
6573
6573
|
}
|
|
6574
6574
|
],
|
|
6575
|
-
requiresModel: "gpt-5.
|
|
6575
|
+
requiresModel: "gpt-5.4"
|
|
6576
6576
|
},
|
|
6577
6577
|
artistry: {
|
|
6578
6578
|
fallbackChain: [
|
|
@@ -6611,7 +6611,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6611
6611
|
},
|
|
6612
6612
|
{
|
|
6613
6613
|
providers: ["openai", "opencode"],
|
|
6614
|
-
model: "gpt-5.
|
|
6614
|
+
model: "gpt-5.4",
|
|
6615
6615
|
variant: "medium"
|
|
6616
6616
|
},
|
|
6617
6617
|
{
|
|
@@ -7141,8 +7141,8 @@ function getConfigJson() {
|
|
|
7141
7141
|
function getConfigJsonc() {
|
|
7142
7142
|
return getConfigContext().paths.configJsonc;
|
|
7143
7143
|
}
|
|
7144
|
-
function
|
|
7145
|
-
return getConfigContext().paths.
|
|
7144
|
+
function getDrizzyConfigPath() {
|
|
7145
|
+
return getConfigContext().paths.drizzyConfig;
|
|
7146
7146
|
}
|
|
7147
7147
|
var configContext = null;
|
|
7148
7148
|
var init_config_context = __esm(() => {
|
|
@@ -7382,7 +7382,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7382
7382
|
fallbackChain: [
|
|
7383
7383
|
{
|
|
7384
7384
|
providers: ["openai", "opencode"],
|
|
7385
|
-
model: "gpt-5.
|
|
7385
|
+
model: "gpt-5.4",
|
|
7386
7386
|
variant: "medium"
|
|
7387
7387
|
}
|
|
7388
7388
|
],
|
|
@@ -7534,7 +7534,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7534
7534
|
fallbackChain: [
|
|
7535
7535
|
{
|
|
7536
7536
|
providers: ["openai", "opencode"],
|
|
7537
|
-
model: "gpt-5.
|
|
7537
|
+
model: "gpt-5.4",
|
|
7538
7538
|
variant: "xhigh"
|
|
7539
7539
|
},
|
|
7540
7540
|
{
|
|
@@ -7553,7 +7553,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7553
7553
|
fallbackChain: [
|
|
7554
7554
|
{
|
|
7555
7555
|
providers: ["openai", "opencode"],
|
|
7556
|
-
model: "gpt-5.
|
|
7556
|
+
model: "gpt-5.4",
|
|
7557
7557
|
variant: "medium"
|
|
7558
7558
|
},
|
|
7559
7559
|
{
|
|
@@ -7567,7 +7567,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7567
7567
|
variant: "high"
|
|
7568
7568
|
}
|
|
7569
7569
|
],
|
|
7570
|
-
requiresModel: "gpt-5.
|
|
7570
|
+
requiresModel: "gpt-5.4"
|
|
7571
7571
|
},
|
|
7572
7572
|
artistry: {
|
|
7573
7573
|
fallbackChain: [
|
|
@@ -7609,7 +7609,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7609
7609
|
},
|
|
7610
7610
|
{
|
|
7611
7611
|
providers: ["openai", "opencode"],
|
|
7612
|
-
model: "gpt-5.
|
|
7612
|
+
model: "gpt-5.4",
|
|
7613
7613
|
variant: "medium"
|
|
7614
7614
|
},
|
|
7615
7615
|
{
|
|
@@ -7676,7 +7676,7 @@ var init_openai_only_model_catalog = __esm(() => {
|
|
|
7676
7676
|
};
|
|
7677
7677
|
OPENAI_ONLY_CATEGORY_OVERRIDES = {
|
|
7678
7678
|
artistry: { model: "openai/gpt-5.4", variant: "xhigh" },
|
|
7679
|
-
quick: { model: "openai/gpt-5.
|
|
7679
|
+
quick: { model: "openai/gpt-5.4", variant: "low" },
|
|
7680
7680
|
"visual-engineering": { model: "openai/gpt-5.4", variant: "high" },
|
|
7681
7681
|
writing: { model: "openai/gpt-5.4", variant: "medium" }
|
|
7682
7682
|
};
|
|
@@ -7834,38 +7834,35 @@ var init_model_fallback = __esm(() => {
|
|
|
7834
7834
|
init_fallback_chain_resolution();
|
|
7835
7835
|
});
|
|
7836
7836
|
|
|
7837
|
-
// src/cli/config-manager/generate-
|
|
7838
|
-
function
|
|
7837
|
+
// src/cli/config-manager/generate-drizzy-config.ts
|
|
7838
|
+
function generateDrizzyConfig(installConfig) {
|
|
7839
7839
|
return generateModelConfig(installConfig);
|
|
7840
7840
|
}
|
|
7841
|
-
var
|
|
7841
|
+
var init_generate_drizzy_config = __esm(() => {
|
|
7842
7842
|
init_model_fallback();
|
|
7843
7843
|
});
|
|
7844
7844
|
|
|
7845
|
-
// src/cli/config-manager/
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7845
|
+
// src/cli/config-manager/write-drizzy-config.ts
|
|
7846
|
+
import { existsSync as existsSync7, readFileSync as readFileSync6, statSync as statSync2, writeFileSync as writeFileSync4 } from "fs";
|
|
7847
|
+
import { join as join7 } from "path";
|
|
7848
|
+
function isEmptyOrWhitespace2(content) {
|
|
7849
|
+
return content.trim().length === 0;
|
|
7850
|
+
}
|
|
7851
|
+
function mergeGeneratedConfigWithExisting(generated, existing) {
|
|
7852
|
+
const result = { ...existing };
|
|
7853
|
+
for (const [key, generatedValue] of Object.entries(generated)) {
|
|
7849
7854
|
if (key === "__proto__" || key === "constructor" || key === "prototype")
|
|
7850
7855
|
continue;
|
|
7851
|
-
const
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
} else if (sourceValue !== undefined) {
|
|
7856
|
-
result[key] = sourceValue;
|
|
7856
|
+
const existingValue = existing[key];
|
|
7857
|
+
if (generatedValue !== null && typeof generatedValue === "object" && !Array.isArray(generatedValue) && existingValue !== null && typeof existingValue === "object" && !Array.isArray(existingValue)) {
|
|
7858
|
+
result[key] = mergeGeneratedConfigWithExisting(generatedValue, existingValue);
|
|
7859
|
+
continue;
|
|
7857
7860
|
}
|
|
7861
|
+
result[key] = generatedValue;
|
|
7858
7862
|
}
|
|
7859
7863
|
return result;
|
|
7860
7864
|
}
|
|
7861
|
-
|
|
7862
|
-
// src/cli/config-manager/write-omo-config.ts
|
|
7863
|
-
import { existsSync as existsSync7, readFileSync as readFileSync6, statSync as statSync2, writeFileSync as writeFileSync4 } from "fs";
|
|
7864
|
-
import { join as join7 } from "path";
|
|
7865
|
-
function isEmptyOrWhitespace2(content) {
|
|
7866
|
-
return content.trim().length === 0;
|
|
7867
|
-
}
|
|
7868
|
-
function writeOmoConfig(installConfig) {
|
|
7865
|
+
function writeDrizzyConfig(installConfig) {
|
|
7869
7866
|
try {
|
|
7870
7867
|
ensureConfigDirectoryExists();
|
|
7871
7868
|
} catch (err) {
|
|
@@ -7875,55 +7872,55 @@ function writeOmoConfig(installConfig) {
|
|
|
7875
7872
|
error: formatErrorWithSuggestion(err, "create config directory")
|
|
7876
7873
|
};
|
|
7877
7874
|
}
|
|
7878
|
-
const
|
|
7875
|
+
const drizzyConfigPath = getDrizzyConfigPath();
|
|
7879
7876
|
const legacyConfigPath = join7(getConfigDir(), "oh-my-opencode.json");
|
|
7880
|
-
const existingConfigPath = existsSync7(
|
|
7877
|
+
const existingConfigPath = existsSync7(drizzyConfigPath) ? drizzyConfigPath : existsSync7(legacyConfigPath) ? legacyConfigPath : drizzyConfigPath;
|
|
7881
7878
|
try {
|
|
7882
|
-
const newConfig =
|
|
7879
|
+
const newConfig = generateDrizzyConfig(installConfig);
|
|
7883
7880
|
if (existsSync7(existingConfigPath)) {
|
|
7884
7881
|
try {
|
|
7885
7882
|
const stat = statSync2(existingConfigPath);
|
|
7886
7883
|
const content = readFileSync6(existingConfigPath, "utf-8");
|
|
7887
7884
|
if (stat.size === 0 || isEmptyOrWhitespace2(content)) {
|
|
7888
|
-
writeFileSync4(
|
|
7885
|
+
writeFileSync4(drizzyConfigPath, JSON.stringify(newConfig, null, 2) + `
|
|
7889
7886
|
`);
|
|
7890
|
-
return { success: true, configPath:
|
|
7887
|
+
return { success: true, configPath: drizzyConfigPath };
|
|
7891
7888
|
}
|
|
7892
7889
|
const existing = parseJsonc(content);
|
|
7893
7890
|
if (!existing || typeof existing !== "object" || Array.isArray(existing)) {
|
|
7894
|
-
writeFileSync4(
|
|
7891
|
+
writeFileSync4(drizzyConfigPath, JSON.stringify(newConfig, null, 2) + `
|
|
7895
7892
|
`);
|
|
7896
|
-
return { success: true, configPath:
|
|
7893
|
+
return { success: true, configPath: drizzyConfigPath };
|
|
7897
7894
|
}
|
|
7898
|
-
const merged =
|
|
7899
|
-
writeFileSync4(
|
|
7895
|
+
const merged = mergeGeneratedConfigWithExisting(newConfig, existing);
|
|
7896
|
+
writeFileSync4(drizzyConfigPath, JSON.stringify(merged, null, 2) + `
|
|
7900
7897
|
`);
|
|
7901
7898
|
} catch (parseErr) {
|
|
7902
7899
|
if (parseErr instanceof SyntaxError) {
|
|
7903
|
-
writeFileSync4(
|
|
7900
|
+
writeFileSync4(drizzyConfigPath, JSON.stringify(newConfig, null, 2) + `
|
|
7904
7901
|
`);
|
|
7905
|
-
return { success: true, configPath:
|
|
7902
|
+
return { success: true, configPath: drizzyConfigPath };
|
|
7906
7903
|
}
|
|
7907
7904
|
throw parseErr;
|
|
7908
7905
|
}
|
|
7909
7906
|
} else {
|
|
7910
|
-
writeFileSync4(
|
|
7907
|
+
writeFileSync4(drizzyConfigPath, JSON.stringify(newConfig, null, 2) + `
|
|
7911
7908
|
`);
|
|
7912
7909
|
}
|
|
7913
|
-
return { success: true, configPath:
|
|
7910
|
+
return { success: true, configPath: drizzyConfigPath };
|
|
7914
7911
|
} catch (err) {
|
|
7915
7912
|
return {
|
|
7916
7913
|
success: false,
|
|
7917
|
-
configPath:
|
|
7914
|
+
configPath: drizzyConfigPath,
|
|
7918
7915
|
error: formatErrorWithSuggestion(err, "write drizzy-agent config")
|
|
7919
7916
|
};
|
|
7920
7917
|
}
|
|
7921
7918
|
}
|
|
7922
|
-
var
|
|
7919
|
+
var init_write_drizzy_config = __esm(() => {
|
|
7923
7920
|
init_shared();
|
|
7924
7921
|
init_config_context();
|
|
7925
7922
|
init_ensure_config_directory_exists();
|
|
7926
|
-
|
|
7923
|
+
init_generate_drizzy_config();
|
|
7927
7924
|
});
|
|
7928
7925
|
|
|
7929
7926
|
// src/shared/spawn-with-windows-hide.ts
|
|
@@ -8026,19 +8023,19 @@ var init_opencode_binary = __esm(() => {
|
|
|
8026
8023
|
import { existsSync as existsSync8, readFileSync as readFileSync7 } from "fs";
|
|
8027
8024
|
import { join as join8 } from "path";
|
|
8028
8025
|
function detectProvidersFromOmoConfig() {
|
|
8029
|
-
const
|
|
8026
|
+
const drizzyConfigPath = getDrizzyConfigPath();
|
|
8030
8027
|
const legacyConfigPath = join8(getConfigDir(), "oh-my-opencode.json");
|
|
8031
|
-
const configPath = existsSync8(
|
|
8028
|
+
const configPath = existsSync8(drizzyConfigPath) ? drizzyConfigPath : legacyConfigPath;
|
|
8032
8029
|
if (!existsSync8(configPath)) {
|
|
8033
8030
|
return { hasOpenAI: true, hasOpencodeZen: true, hasZaiCodingPlan: false, hasKimiForCoding: false };
|
|
8034
8031
|
}
|
|
8035
8032
|
try {
|
|
8036
8033
|
const content = readFileSync7(configPath, "utf-8");
|
|
8037
|
-
const
|
|
8038
|
-
if (!
|
|
8034
|
+
const drizzyConfig = parseJsonc(content);
|
|
8035
|
+
if (!drizzyConfig || typeof drizzyConfig !== "object") {
|
|
8039
8036
|
return { hasOpenAI: true, hasOpencodeZen: true, hasZaiCodingPlan: false, hasKimiForCoding: false };
|
|
8040
8037
|
}
|
|
8041
|
-
const configStr = JSON.stringify(
|
|
8038
|
+
const configStr = JSON.stringify(drizzyConfig);
|
|
8042
8039
|
const hasOpenAI = configStr.includes('"openai/');
|
|
8043
8040
|
const hasOpencodeZen = configStr.includes('"opencode/');
|
|
8044
8041
|
const hasZaiCodingPlan = configStr.includes('"zai-coding-plan/');
|
|
@@ -8187,8 +8184,8 @@ var init_config_manager = __esm(() => {
|
|
|
8187
8184
|
init_config_context();
|
|
8188
8185
|
init_plugin_name_with_version();
|
|
8189
8186
|
init_add_plugin_to_opencode_config();
|
|
8190
|
-
|
|
8191
|
-
|
|
8187
|
+
init_generate_drizzy_config();
|
|
8188
|
+
init_write_drizzy_config();
|
|
8192
8189
|
init_opencode_binary();
|
|
8193
8190
|
init_detect_current_config();
|
|
8194
8191
|
init_bun_install();
|
|
@@ -9083,7 +9080,7 @@ var {
|
|
|
9083
9080
|
// package.json
|
|
9084
9081
|
var package_default = {
|
|
9085
9082
|
name: "drizzy-agent",
|
|
9086
|
-
version: "0.2.
|
|
9083
|
+
version: "0.2.1",
|
|
9087
9084
|
description: "DrizzyAgent - AI agent plugin for OpenCode",
|
|
9088
9085
|
main: "dist/index.js",
|
|
9089
9086
|
types: "dist/index.d.ts",
|
|
@@ -9159,17 +9156,17 @@ var package_default = {
|
|
|
9159
9156
|
typescript: "^5.7.3"
|
|
9160
9157
|
},
|
|
9161
9158
|
optionalDependencies: {
|
|
9162
|
-
"drizzy-agent-darwin-arm64": "0.2.
|
|
9163
|
-
"drizzy-agent-darwin-x64": "0.2.
|
|
9164
|
-
"drizzy-agent-darwin-x64-baseline": "0.2.
|
|
9165
|
-
"drizzy-agent-linux-arm64": "0.2.
|
|
9166
|
-
"drizzy-agent-linux-arm64-musl": "0.2.
|
|
9167
|
-
"drizzy-agent-linux-x64": "0.2.
|
|
9168
|
-
"drizzy-agent-linux-x64-baseline": "0.2.
|
|
9169
|
-
"drizzy-agent-linux-x64-musl": "0.2.
|
|
9170
|
-
"drizzy-agent-linux-x64-musl-baseline": "0.2.
|
|
9171
|
-
"drizzy-agent-windows-x64": "0.2.
|
|
9172
|
-
"drizzy-agent-windows-x64-baseline": "0.2.
|
|
9159
|
+
"drizzy-agent-darwin-arm64": "0.2.1",
|
|
9160
|
+
"drizzy-agent-darwin-x64": "0.2.1",
|
|
9161
|
+
"drizzy-agent-darwin-x64-baseline": "0.2.1",
|
|
9162
|
+
"drizzy-agent-linux-arm64": "0.2.1",
|
|
9163
|
+
"drizzy-agent-linux-arm64-musl": "0.2.1",
|
|
9164
|
+
"drizzy-agent-linux-x64": "0.2.1",
|
|
9165
|
+
"drizzy-agent-linux-x64-baseline": "0.2.1",
|
|
9166
|
+
"drizzy-agent-linux-x64-musl": "0.2.1",
|
|
9167
|
+
"drizzy-agent-linux-x64-musl-baseline": "0.2.1",
|
|
9168
|
+
"drizzy-agent-windows-x64": "0.2.1",
|
|
9169
|
+
"drizzy-agent-windows-x64-baseline": "0.2.1"
|
|
9173
9170
|
},
|
|
9174
9171
|
overrides: {
|
|
9175
9172
|
"@opencode-ai/sdk": "^1.2.24"
|
|
@@ -9379,12 +9376,12 @@ async function runCliInstaller(args, version) {
|
|
|
9379
9376
|
}
|
|
9380
9377
|
printSuccess(`Plugin ${isUpdate ? "verified" : "added"} ${SYMBOLS.arrow} ${import_picocolors2.default.dim(pluginResult.configPath)}`);
|
|
9381
9378
|
printStep(step++, totalSteps, "Writing drizzy-agent configuration...");
|
|
9382
|
-
const
|
|
9383
|
-
if (!
|
|
9384
|
-
printError(`Failed: ${
|
|
9379
|
+
const drizzyResult = writeDrizzyConfig(config);
|
|
9380
|
+
if (!drizzyResult.success) {
|
|
9381
|
+
printError(`Failed: ${drizzyResult.error}`);
|
|
9385
9382
|
return 1;
|
|
9386
9383
|
}
|
|
9387
|
-
printSuccess(`Config written ${SYMBOLS.arrow} ${import_picocolors2.default.dim(
|
|
9384
|
+
printSuccess(`Config written ${SYMBOLS.arrow} ${import_picocolors2.default.dim(drizzyResult.configPath)}`);
|
|
9388
9385
|
printBox(formatConfigSummary(config), isUpdate ? "Updated Configuration" : "Installation Complete");
|
|
9389
9386
|
if (!config.hasClaude) {
|
|
9390
9387
|
console.log();
|
|
@@ -10142,13 +10139,13 @@ async function runTuiInstaller(args, version) {
|
|
|
10142
10139
|
}
|
|
10143
10140
|
spinner.stop(`Plugin added to ${import_picocolors4.default.cyan(pluginResult.configPath)}`);
|
|
10144
10141
|
spinner.start("Writing drizzy-agent configuration");
|
|
10145
|
-
const
|
|
10146
|
-
if (!
|
|
10147
|
-
spinner.stop(`Failed to write config: ${
|
|
10142
|
+
const drizzyResult = writeDrizzyConfig(config);
|
|
10143
|
+
if (!drizzyResult.success) {
|
|
10144
|
+
spinner.stop(`Failed to write config: ${drizzyResult.error}`);
|
|
10148
10145
|
Se(import_picocolors4.default.red("Installation failed."));
|
|
10149
10146
|
return 1;
|
|
10150
10147
|
}
|
|
10151
|
-
spinner.stop(`Config written to ${import_picocolors4.default.cyan(
|
|
10148
|
+
spinner.stop(`Config written to ${import_picocolors4.default.cyan(drizzyResult.configPath)}`);
|
|
10152
10149
|
if (!config.hasClaude) {
|
|
10153
10150
|
console.log();
|
|
10154
10151
|
console.log(import_picocolors4.default.bgRed(import_picocolors4.default.white(import_picocolors4.default.bold(" CRITICAL WARNING "))));
|
|
@@ -3,6 +3,7 @@ export declare const INLINE_CODE_PATTERN: RegExp;
|
|
|
3
3
|
export { isPlannerAgent, getUltraworkMessage } from "./ultrawork";
|
|
4
4
|
export { SEARCH_PATTERN, SEARCH_MESSAGE } from "./search";
|
|
5
5
|
export { ANALYZE_PATTERN, ANALYZE_MESSAGE } from "./analyze";
|
|
6
|
+
export { GIT_PATTERN, GIT_MESSAGE } from "./git";
|
|
6
7
|
export type KeywordDetector = {
|
|
7
8
|
pattern: RegExp;
|
|
8
9
|
message: string | ((agentName?: string, modelID?: string) => string);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git mode keyword detector.
|
|
3
|
+
*
|
|
4
|
+
* Triggers on git-operation requests across multiple languages:
|
|
5
|
+
* - English: commit, commits, rebase, squash, cherry-pick, revert, blame, bisect, stash, amend
|
|
6
|
+
* - Korean: 커밋, 리베이스, 스쿼시, 체리픽, 리버트, 블레임, 비섹트, 스태시, 수정 커밋
|
|
7
|
+
* - Japanese: コミット, リベース, スカッシュ, チェリーピック, リバート, blame, bisect, stash
|
|
8
|
+
* - Chinese: 提交, 变基, 压缩提交, 挑拣, 回退, 追溯, 二分查找, 暂存
|
|
9
|
+
* - Vietnamese: commit, rebase, squash, cherry-pick, revert, blame, bisect, stash
|
|
10
|
+
*/
|
|
11
|
+
export declare const GIT_PATTERN: RegExp;
|
|
12
|
+
export declare const GIT_MESSAGE = "[git-mode]\nGit intent detected. Treat git work as specialized work:\n- Load the `git-master` skill before acting on git requests\n- For commit requests, inspect status, diff, and recent commit style first\n- Prefer atomic commits and follow existing repository commit conventions\n- Avoid destructive git commands unless the user explicitly asks for them";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GIT_PATTERN, GIT_MESSAGE } from "./default";
|
package/dist/index.js
CHANGED
|
@@ -5343,7 +5343,7 @@ var init_constants = __esm(() => {
|
|
|
5343
5343
|
DEFAULT_CATEGORIES = {
|
|
5344
5344
|
"visual-engineering": { model: "google/gemini-3.1-pro", variant: "high" },
|
|
5345
5345
|
ultrabrain: { model: "openai/gpt-5.4", variant: "xhigh" },
|
|
5346
|
-
deep: { model: "openai/gpt-5.
|
|
5346
|
+
deep: { model: "openai/gpt-5.4", variant: "medium" },
|
|
5347
5347
|
artistry: { model: "google/gemini-3.1-pro", variant: "high" },
|
|
5348
5348
|
quick: { model: "anthropic/claude-haiku-4-5" },
|
|
5349
5349
|
"unspecified-low": { model: "anthropic/claude-sonnet-4-6" },
|
|
@@ -16786,7 +16786,7 @@ function getOpenCodeConfigPaths(options) {
|
|
|
16786
16786
|
configJson: join5(configDir, "opencode.json"),
|
|
16787
16787
|
configJsonc: join5(configDir, "opencode.jsonc"),
|
|
16788
16788
|
packageJson: join5(configDir, "package.json"),
|
|
16789
|
-
|
|
16789
|
+
drizzyConfig: join5(configDir, "drizzy-agent.json")
|
|
16790
16790
|
};
|
|
16791
16791
|
}
|
|
16792
16792
|
// src/shared/opencode-version.ts
|
|
@@ -17186,7 +17186,7 @@ var AGENT_MODEL_REQUIREMENTS = {
|
|
|
17186
17186
|
fallbackChain: [
|
|
17187
17187
|
{
|
|
17188
17188
|
providers: ["openai", "venice", "opencode"],
|
|
17189
|
-
model: "gpt-5.
|
|
17189
|
+
model: "gpt-5.4",
|
|
17190
17190
|
variant: "medium"
|
|
17191
17191
|
},
|
|
17192
17192
|
{ providers: ["github-copilot"], model: "gpt-5.4", variant: "medium" }
|
|
@@ -17367,7 +17367,7 @@ var CATEGORY_MODEL_REQUIREMENTS = {
|
|
|
17367
17367
|
fallbackChain: [
|
|
17368
17368
|
{
|
|
17369
17369
|
providers: ["openai", "opencode"],
|
|
17370
|
-
model: "gpt-5.
|
|
17370
|
+
model: "gpt-5.4",
|
|
17371
17371
|
variant: "medium"
|
|
17372
17372
|
},
|
|
17373
17373
|
{
|
|
@@ -17381,7 +17381,7 @@ var CATEGORY_MODEL_REQUIREMENTS = {
|
|
|
17381
17381
|
variant: "high"
|
|
17382
17382
|
}
|
|
17383
17383
|
],
|
|
17384
|
-
requiresModel: "gpt-5.
|
|
17384
|
+
requiresModel: "gpt-5.4"
|
|
17385
17385
|
},
|
|
17386
17386
|
artistry: {
|
|
17387
17387
|
fallbackChain: [
|
|
@@ -17420,7 +17420,7 @@ var CATEGORY_MODEL_REQUIREMENTS = {
|
|
|
17420
17420
|
},
|
|
17421
17421
|
{
|
|
17422
17422
|
providers: ["openai", "opencode"],
|
|
17423
|
-
model: "gpt-5.
|
|
17423
|
+
model: "gpt-5.4",
|
|
17424
17424
|
variant: "medium"
|
|
17425
17425
|
},
|
|
17426
17426
|
{
|
|
@@ -42424,6 +42424,14 @@ IF COMPLEX - DO NOT STRUGGLE ALONE. Consult specialists:
|
|
|
42424
42424
|
- **Artistry**: Non-conventional problems (different approach needed)
|
|
42425
42425
|
|
|
42426
42426
|
SYNTHESIZE findings before proceeding.`;
|
|
42427
|
+
// src/hooks/keyword-detector/git/default.ts
|
|
42428
|
+
var GIT_PATTERN = /\b(commit|commits|rebase|squash|cherry[\s-]?pick|revert|blame|bisect|stash|amend)\b|\uCEE4\uBC0B|\uB9AC\uBCA0\uC774\uC2A4|\uC2A4\uCFFC\uC2DC|\uCCB4\uB9AC\uD53D|\uB9AC\uBC84\uD2B8|\uBE14\uB808\uC784|\uBE44\uC139\uD2B8|\uC2A4\uD0DC\uC2DC|\uC218\uC815\s*\uCEE4\uBC0B|\u30B3\u30DF\u30C3\u30C8|\u30EA\u30D9\u30FC\u30B9|\u30B9\u30AB\u30C3\u30B7\u30E5|\u30C1\u30A7\u30EA\u30FC\u30D4\u30C3\u30AF|\u30EA\u30D0\u30FC\u30C8|\u63D0\u4EA4|\u53D8\u57FA|\u538B\u7F29\u63D0\u4EA4|\u6311\u62E3|\u56DE\u9000|\u8FFD\u6EAF|\u4E8C\u5206\u67E5\u627E|\u6682\u5B58/i;
|
|
42429
|
+
var GIT_MESSAGE = `[git-mode]
|
|
42430
|
+
Git intent detected. Treat git work as specialized work:
|
|
42431
|
+
- Load the \`git-master\` skill before acting on git requests
|
|
42432
|
+
- For commit requests, inspect status, diff, and recent commit style first
|
|
42433
|
+
- Prefer atomic commits and follow existing repository commit conventions
|
|
42434
|
+
- Avoid destructive git commands unless the user explicitly asks for them`;
|
|
42427
42435
|
// src/hooks/keyword-detector/constants.ts
|
|
42428
42436
|
var CODE_BLOCK_PATTERN2 = /```[\s\S]*?```/g;
|
|
42429
42437
|
var INLINE_CODE_PATTERN2 = /`[^`]+`/g;
|
|
@@ -42439,6 +42447,10 @@ var KEYWORD_DETECTORS = [
|
|
|
42439
42447
|
{
|
|
42440
42448
|
pattern: ANALYZE_PATTERN,
|
|
42441
42449
|
message: ANALYZE_MESSAGE
|
|
42450
|
+
},
|
|
42451
|
+
{
|
|
42452
|
+
pattern: GIT_PATTERN,
|
|
42453
|
+
message: GIT_MESSAGE
|
|
42442
42454
|
}
|
|
42443
42455
|
];
|
|
42444
42456
|
|
|
@@ -42451,7 +42463,7 @@ function resolveMessage(message, agentName, modelID) {
|
|
|
42451
42463
|
}
|
|
42452
42464
|
function detectKeywordsWithType(text, agentName, modelID) {
|
|
42453
42465
|
const textWithoutCode = removeCodeBlocks2(text);
|
|
42454
|
-
const types6 = ["ultrawork", "search", "analyze"];
|
|
42466
|
+
const types6 = ["ultrawork", "search", "analyze", "git"];
|
|
42455
42467
|
return KEYWORD_DETECTORS.map(({ pattern, message }, index) => ({
|
|
42456
42468
|
matches: pattern.test(textWithoutCode),
|
|
42457
42469
|
type: types6[index],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzy-agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
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.2.
|
|
80
|
-
"drizzy-agent-darwin-x64": "0.2.
|
|
81
|
-
"drizzy-agent-darwin-x64-baseline": "0.2.
|
|
82
|
-
"drizzy-agent-linux-arm64": "0.2.
|
|
83
|
-
"drizzy-agent-linux-arm64-musl": "0.2.
|
|
84
|
-
"drizzy-agent-linux-x64": "0.2.
|
|
85
|
-
"drizzy-agent-linux-x64-baseline": "0.2.
|
|
86
|
-
"drizzy-agent-linux-x64-musl": "0.2.
|
|
87
|
-
"drizzy-agent-linux-x64-musl-baseline": "0.2.
|
|
88
|
-
"drizzy-agent-windows-x64": "0.2.
|
|
89
|
-
"drizzy-agent-windows-x64-baseline": "0.2.
|
|
79
|
+
"drizzy-agent-darwin-arm64": "0.2.1",
|
|
80
|
+
"drizzy-agent-darwin-x64": "0.2.1",
|
|
81
|
+
"drizzy-agent-darwin-x64-baseline": "0.2.1",
|
|
82
|
+
"drizzy-agent-linux-arm64": "0.2.1",
|
|
83
|
+
"drizzy-agent-linux-arm64-musl": "0.2.1",
|
|
84
|
+
"drizzy-agent-linux-x64": "0.2.1",
|
|
85
|
+
"drizzy-agent-linux-x64-baseline": "0.2.1",
|
|
86
|
+
"drizzy-agent-linux-x64-musl": "0.2.1",
|
|
87
|
+
"drizzy-agent-linux-x64-musl-baseline": "0.2.1",
|
|
88
|
+
"drizzy-agent-windows-x64": "0.2.1",
|
|
89
|
+
"drizzy-agent-windows-x64-baseline": "0.2.1"
|
|
90
90
|
},
|
|
91
91
|
"overrides": {
|
|
92
92
|
"@opencode-ai/sdk": "^1.2.24"
|