@massa-ai/opencode-plugin 1.8.0 → 1.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.
- package/dist/config-cli.js +12 -12
- package/dist/index.js +15 -15
- package/package.json +3 -3
package/dist/config-cli.js
CHANGED
|
@@ -713,8 +713,8 @@ try {
|
|
|
713
713
|
if (cfg.database?.url && !process.env.DATABASE_URL) {
|
|
714
714
|
process.env.DATABASE_URL = cfg.database.url;
|
|
715
715
|
}
|
|
716
|
-
if (cfg.llm?.apiKey && !process.env.
|
|
717
|
-
process.env.
|
|
716
|
+
if (cfg.llm?.apiKey && !process.env.MASSA_AI_LLM_API_KEY) {
|
|
717
|
+
process.env.MASSA_AI_LLM_API_KEY = cfg.llm.apiKey;
|
|
718
718
|
}
|
|
719
719
|
if (cfg.embedding?.apiKey && !process.env.OLLAMA_API_KEY) {
|
|
720
720
|
process.env.OLLAMA_API_KEY = cfg.embedding.apiKey;
|
|
@@ -886,15 +886,15 @@ var defaultConfig = {
|
|
|
886
886
|
}
|
|
887
887
|
},
|
|
888
888
|
llm: {
|
|
889
|
-
enabled: envBool("
|
|
890
|
-
baseUrl: envString("
|
|
891
|
-
apiKey: envString("
|
|
892
|
-
model: envString("
|
|
893
|
-
codeModel: envString("
|
|
894
|
-
temperature: envNum("
|
|
895
|
-
maxOutputTokens: envNum("
|
|
896
|
-
timeoutMs: envNum("
|
|
897
|
-
disableThink: envBool("
|
|
889
|
+
enabled: envBool("MASSA_AI_LLM_ENABLED", fileConfig.llm?.enabled ?? false),
|
|
890
|
+
baseUrl: envString("MASSA_AI_LLM_BASE_URL", fileConfig.llm?.baseUrl ?? "http://localhost:11434/v1"),
|
|
891
|
+
apiKey: envString("MASSA_AI_LLM_API_KEY", fileConfig.llm?.apiKey ?? "ollama"),
|
|
892
|
+
model: envString("MASSA_AI_LLM_MODEL", fileConfig.llm?.model ?? DEFAULT_LLM_MODEL),
|
|
893
|
+
codeModel: envString("MASSA_AI_LLM_CODE_MODEL", fileConfig.llm?.codeModel ?? DEFAULT_LLM_CODE_MODEL),
|
|
894
|
+
temperature: envNum("MASSA_AI_LLM_TEMPERATURE", fileConfig.llm?.temperature ?? 0.2),
|
|
895
|
+
maxOutputTokens: envNum("MASSA_AI_LLM_MAX_OUTPUT_TOKENS", fileConfig.llm?.maxOutputTokens ?? 8000),
|
|
896
|
+
timeoutMs: envNum("MASSA_AI_LLM_TIMEOUT_MS", fileConfig.llm?.timeoutMs ?? 90000),
|
|
897
|
+
disableThink: envBool("MASSA_AI_LLM_DISABLE_THINK", fileConfig.llm?.disableThink ?? true)
|
|
898
898
|
},
|
|
899
899
|
memory: {
|
|
900
900
|
decay: {
|
|
@@ -944,7 +944,7 @@ var defaultConfig = {
|
|
|
944
944
|
defaultStrategy: fileConfig.compression?.defaultStrategy ?? "code_structure",
|
|
945
945
|
minTokensForCompression: envNum("MIN_TOKENS_FOR_COMPRESSION", fileConfig.compression?.minTokensForCompression ?? 100),
|
|
946
946
|
targetCompressionRatio: envNum("TARGET_COMPRESSION_RATIO", fileConfig.compression?.targetCompressionRatio ?? 0.7),
|
|
947
|
-
prompt: process.env.
|
|
947
|
+
prompt: process.env.MASSA_AI_LLM_PROMPT || fileConfig.compression?.prompt || undefined
|
|
948
948
|
},
|
|
949
949
|
impact: {
|
|
950
950
|
bfsCteEnabled: envBool("MASSA_AI_IMPACT_BFS_CTE", fileConfig.impact?.bfsCteEnabled ?? false)
|
package/dist/index.js
CHANGED
|
@@ -13032,8 +13032,8 @@ try {
|
|
|
13032
13032
|
if (cfg.database?.url && !process.env.DATABASE_URL) {
|
|
13033
13033
|
process.env.DATABASE_URL = cfg.database.url;
|
|
13034
13034
|
}
|
|
13035
|
-
if (cfg.llm?.apiKey && !process.env.
|
|
13036
|
-
process.env.
|
|
13035
|
+
if (cfg.llm?.apiKey && !process.env.MASSA_AI_LLM_API_KEY) {
|
|
13036
|
+
process.env.MASSA_AI_LLM_API_KEY = cfg.llm.apiKey;
|
|
13037
13037
|
}
|
|
13038
13038
|
if (cfg.embedding?.apiKey && !process.env.OLLAMA_API_KEY) {
|
|
13039
13039
|
process.env.OLLAMA_API_KEY = cfg.embedding.apiKey;
|
|
@@ -13205,15 +13205,15 @@ var defaultConfig = {
|
|
|
13205
13205
|
}
|
|
13206
13206
|
},
|
|
13207
13207
|
llm: {
|
|
13208
|
-
enabled: envBool("
|
|
13209
|
-
baseUrl: envString("
|
|
13210
|
-
apiKey: envString("
|
|
13211
|
-
model: envString("
|
|
13212
|
-
codeModel: envString("
|
|
13213
|
-
temperature: envNum("
|
|
13214
|
-
maxOutputTokens: envNum("
|
|
13215
|
-
timeoutMs: envNum("
|
|
13216
|
-
disableThink: envBool("
|
|
13208
|
+
enabled: envBool("MASSA_AI_LLM_ENABLED", fileConfig.llm?.enabled ?? false),
|
|
13209
|
+
baseUrl: envString("MASSA_AI_LLM_BASE_URL", fileConfig.llm?.baseUrl ?? "http://localhost:11434/v1"),
|
|
13210
|
+
apiKey: envString("MASSA_AI_LLM_API_KEY", fileConfig.llm?.apiKey ?? "ollama"),
|
|
13211
|
+
model: envString("MASSA_AI_LLM_MODEL", fileConfig.llm?.model ?? DEFAULT_LLM_MODEL),
|
|
13212
|
+
codeModel: envString("MASSA_AI_LLM_CODE_MODEL", fileConfig.llm?.codeModel ?? DEFAULT_LLM_CODE_MODEL),
|
|
13213
|
+
temperature: envNum("MASSA_AI_LLM_TEMPERATURE", fileConfig.llm?.temperature ?? 0.2),
|
|
13214
|
+
maxOutputTokens: envNum("MASSA_AI_LLM_MAX_OUTPUT_TOKENS", fileConfig.llm?.maxOutputTokens ?? 8000),
|
|
13215
|
+
timeoutMs: envNum("MASSA_AI_LLM_TIMEOUT_MS", fileConfig.llm?.timeoutMs ?? 90000),
|
|
13216
|
+
disableThink: envBool("MASSA_AI_LLM_DISABLE_THINK", fileConfig.llm?.disableThink ?? true)
|
|
13217
13217
|
},
|
|
13218
13218
|
memory: {
|
|
13219
13219
|
decay: {
|
|
@@ -13263,7 +13263,7 @@ var defaultConfig = {
|
|
|
13263
13263
|
defaultStrategy: fileConfig.compression?.defaultStrategy ?? "code_structure",
|
|
13264
13264
|
minTokensForCompression: envNum("MIN_TOKENS_FOR_COMPRESSION", fileConfig.compression?.minTokensForCompression ?? 100),
|
|
13265
13265
|
targetCompressionRatio: envNum("TARGET_COMPRESSION_RATIO", fileConfig.compression?.targetCompressionRatio ?? 0.7),
|
|
13266
|
-
prompt: process.env.
|
|
13266
|
+
prompt: process.env.MASSA_AI_LLM_PROMPT || fileConfig.compression?.prompt || undefined
|
|
13267
13267
|
},
|
|
13268
13268
|
impact: {
|
|
13269
13269
|
bfsCteEnabled: envBool("MASSA_AI_IMPACT_BFS_CTE", fileConfig.impact?.bfsCteEnabled ?? false)
|
|
@@ -13770,7 +13770,7 @@ async function massaAiGetWithQuery(endpoint, params, timeoutMs = FETCH_TIMEOUT_M
|
|
|
13770
13770
|
}
|
|
13771
13771
|
var MassaAiPlugin = async ({ project, directory, worktree, client }) => {
|
|
13772
13772
|
ensureConfig();
|
|
13773
|
-
|
|
13773
|
+
loadConfig();
|
|
13774
13774
|
const projectPath = worktree || directory;
|
|
13775
13775
|
const projectPins = new SessionProjectPin({
|
|
13776
13776
|
computeProjectId: () => computePluginProjectId({
|
|
@@ -13985,7 +13985,7 @@ var MassaAiPlugin = async ({ project, directory, worktree, client }) => {
|
|
|
13985
13985
|
includeSymbols: tool.schema.boolean().optional().default(true).describe("Include symbol metadata from graph"),
|
|
13986
13986
|
includeImports: tool.schema.boolean().optional().default(true).describe("Extract and show import statements")
|
|
13987
13987
|
},
|
|
13988
|
-
async execute(args,
|
|
13988
|
+
async execute(args, _ctx) {
|
|
13989
13989
|
const result = await massaAiFetch("/api/v1/file/read", {
|
|
13990
13990
|
filePath: args.filePath,
|
|
13991
13991
|
projectId: args.projectId || projectId,
|
|
@@ -14048,7 +14048,7 @@ var MassaAiPlugin = async ({ project, directory, worktree, client }) => {
|
|
|
14048
14048
|
exportedOnly: tool.schema.boolean().optional().default(false).describe("Return only exported symbols"),
|
|
14049
14049
|
maxResults: tool.schema.number().optional().default(20).describe("Maximum number of results to return (default: 20)")
|
|
14050
14050
|
},
|
|
14051
|
-
async execute(args,
|
|
14051
|
+
async execute(args, _ctx) {
|
|
14052
14052
|
const result = await massaAiGetWithQuery("/api/v1/symbol/definitions", {
|
|
14053
14053
|
projectId,
|
|
14054
14054
|
search: args.query,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massa-ai/opencode-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "massa-ai plugin for OpenCode - Semantic code search, memory, and context compression",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@opencode-ai/plugin": "^1.2.15",
|
|
23
23
|
"@opencode-ai/sdk": "^1.2.15",
|
|
24
|
-
"@massa-ai/core": "^1.
|
|
25
|
-
"@massa-ai/shared": "^1.
|
|
24
|
+
"@massa-ai/core": "^1.9.0",
|
|
25
|
+
"@massa-ai/shared": "^1.9.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.10.5",
|