dominds 1.7.2 → 1.8.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/cli/read.js +4 -1
- package/dist/llm/gen/anthropic.js +2 -2
- package/dist/llm/gen/codex.js +8 -4
- package/dist/llm/gen/mock.js +2 -2
- package/dist/llm/gen/openai-compatible.js +2 -2
- package/dist/llm/gen/openai.js +2 -2
- package/dist/llm/kernel-driver/drive.js +10 -2
- package/dist/tools/team_mgmt.js +4 -1
- package/package.json +2 -2
package/dist/cli/read.js
CHANGED
|
@@ -98,7 +98,10 @@ async function runFuxiAuditCall(runtime, userContent) {
|
|
|
98
98
|
},
|
|
99
99
|
};
|
|
100
100
|
const context = [{ type: 'environment_msg', role: 'user', content: userContent }];
|
|
101
|
-
await runtime.llmGen.genToReceiver(runtime.providerCfg, runtime.auditAgent, runtime.auditorSystemPrompt, [],
|
|
101
|
+
await runtime.llmGen.genToReceiver(runtime.providerCfg, runtime.auditAgent, runtime.auditorSystemPrompt, [], {
|
|
102
|
+
dialogSelfId: 'cli-read-audit',
|
|
103
|
+
dialogRootId: 'cli-read-audit',
|
|
104
|
+
}, context, receiver, 0);
|
|
102
105
|
const trimmed = output.trim();
|
|
103
106
|
if (trimmed.length > 0)
|
|
104
107
|
return trimmed;
|
|
@@ -907,7 +907,7 @@ class AnthropicGen {
|
|
|
907
907
|
get apiType() {
|
|
908
908
|
return 'anthropic';
|
|
909
909
|
}
|
|
910
|
-
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, context, receiver, _genseq, abortSignal) {
|
|
910
|
+
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, receiver, _genseq, abortSignal) {
|
|
911
911
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
912
912
|
if (!apiKey)
|
|
913
913
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
|
@@ -957,7 +957,7 @@ class AnthropicGen {
|
|
|
957
957
|
const stream = client.messages.stream(streamParams);
|
|
958
958
|
return consumeAnthropicStream(stream, receiver, abortSignal, forceJsonResponse ? ANTHROPIC_JSON_RESPONSE_TOOL_NAME : undefined);
|
|
959
959
|
}
|
|
960
|
-
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, context, genseq, abortSignal) {
|
|
960
|
+
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, genseq, abortSignal) {
|
|
961
961
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
962
962
|
if (!apiKey)
|
|
963
963
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
package/dist/llm/gen/codex.js
CHANGED
|
@@ -432,7 +432,7 @@ async function buildCodexInput(context, providerConfig) {
|
|
|
432
432
|
}
|
|
433
433
|
return input;
|
|
434
434
|
}
|
|
435
|
-
async function buildCodexRequest(providerConfig, agent, instructions, assistantPrelude, funcTools, context) {
|
|
435
|
+
async function buildCodexRequest(providerConfig, agent, instructions, assistantPrelude, funcTools, requestContext, context) {
|
|
436
436
|
if (!agent.model) {
|
|
437
437
|
throw new Error(`Internal error: Model is undefined for agent '${agent.id}'`);
|
|
438
438
|
}
|
|
@@ -469,6 +469,10 @@ async function buildCodexRequest(providerConfig, agent, instructions, assistantP
|
|
|
469
469
|
store: false,
|
|
470
470
|
stream: true,
|
|
471
471
|
include,
|
|
472
|
+
...(requestContext.promptCacheKey !== undefined &&
|
|
473
|
+
requestContext.promptCacheKey.trim().length > 0
|
|
474
|
+
? { prompt_cache_key: requestContext.promptCacheKey }
|
|
475
|
+
: {}),
|
|
472
476
|
text,
|
|
473
477
|
};
|
|
474
478
|
}
|
|
@@ -476,7 +480,7 @@ class CodexGen {
|
|
|
476
480
|
get apiType() {
|
|
477
481
|
return 'codex';
|
|
478
482
|
}
|
|
479
|
-
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, context, receiver, _genseq, abortSignal) {
|
|
483
|
+
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, requestContext, context, receiver, _genseq, abortSignal) {
|
|
480
484
|
const codexHomeValue = process.env[providerConfig.apiKeyEnvVar] || '~/.codex';
|
|
481
485
|
const codexHome = codexHomeValue.startsWith('~')
|
|
482
486
|
? process.env['HOME'] + codexHomeValue.substring(1)
|
|
@@ -492,7 +496,7 @@ class CodexGen {
|
|
|
492
496
|
throw new Error(`Internal error: Model is undefined for agent '${agent.id}'`);
|
|
493
497
|
}
|
|
494
498
|
const resolvedInstructions = await resolveCodexInstructions(agent.model, systemPrompt, codexAuth.loadCodexPrompt);
|
|
495
|
-
const payload = await buildCodexRequest(providerConfig, agent, resolvedInstructions.instructions, resolvedInstructions.assistantPrelude, funcTools, context);
|
|
499
|
+
const payload = await buildCodexRequest(providerConfig, agent, resolvedInstructions.instructions, resolvedInstructions.assistantPrelude, funcTools, requestContext, context);
|
|
496
500
|
let sayingStarted = false;
|
|
497
501
|
let thinkingStarted = false;
|
|
498
502
|
let sawOutputText = false;
|
|
@@ -843,7 +847,7 @@ class CodexGen {
|
|
|
843
847
|
}
|
|
844
848
|
return { usage, llmGenModel: returnedModel };
|
|
845
849
|
}
|
|
846
|
-
async genMoreMessages(_providerConfig, _agent, _systemPrompt, _funcTools, _context, _genseq) {
|
|
850
|
+
async genMoreMessages(_providerConfig, _agent, _systemPrompt, _funcTools, _requestContext, _context, _genseq) {
|
|
847
851
|
throw new Error('Codex generator only supports streaming mode.');
|
|
848
852
|
}
|
|
849
853
|
}
|
package/dist/llm/gen/mock.js
CHANGED
|
@@ -289,7 +289,7 @@ responses:
|
|
|
289
289
|
response: "Your response here"
|
|
290
290
|
\`\`\``;
|
|
291
291
|
}
|
|
292
|
-
async genToReceiver(providerConfig, agent, systemPrompt, _funcTools, context, receiver, _genseq, abortSignal) {
|
|
292
|
+
async genToReceiver(providerConfig, agent, systemPrompt, _funcTools, _requestContext, context, receiver, _genseq, abortSignal) {
|
|
293
293
|
const dbPath = providerConfig.baseUrl;
|
|
294
294
|
if (!agent.model) {
|
|
295
295
|
throw new Error('Model undefined for agent: ' + agent.id);
|
|
@@ -384,7 +384,7 @@ responses:
|
|
|
384
384
|
}
|
|
385
385
|
return { usage, llmGenModel: modelName };
|
|
386
386
|
}
|
|
387
|
-
async genMoreMessages(providerConfig, agent, systemPrompt, _funcTools, context, genseq, abortSignal) {
|
|
387
|
+
async genMoreMessages(providerConfig, agent, systemPrompt, _funcTools, _requestContext, context, genseq, abortSignal) {
|
|
388
388
|
if (abortSignal?.aborted) {
|
|
389
389
|
throw new Error('AbortError');
|
|
390
390
|
}
|
|
@@ -534,7 +534,7 @@ class OpenAiCompatibleGen {
|
|
|
534
534
|
get apiType() {
|
|
535
535
|
return 'openai-compatible';
|
|
536
536
|
}
|
|
537
|
-
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, context, receiver, genseq, abortSignal) {
|
|
537
|
+
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, receiver, genseq, abortSignal) {
|
|
538
538
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
539
539
|
if (!apiKey)
|
|
540
540
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
|
@@ -738,7 +738,7 @@ class OpenAiCompatibleGen {
|
|
|
738
738
|
}
|
|
739
739
|
return { usage, ...(returnedModel ? { llmGenModel: returnedModel } : {}) };
|
|
740
740
|
}
|
|
741
|
-
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, context, genseq, abortSignal) {
|
|
741
|
+
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, genseq, abortSignal) {
|
|
742
742
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
743
743
|
if (!apiKey)
|
|
744
744
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
package/dist/llm/gen/openai.js
CHANGED
|
@@ -522,7 +522,7 @@ class OpenAiGen {
|
|
|
522
522
|
get apiType() {
|
|
523
523
|
return 'openai';
|
|
524
524
|
}
|
|
525
|
-
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, context, receiver, _genseq, abortSignal) {
|
|
525
|
+
async genToReceiver(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, receiver, _genseq, abortSignal) {
|
|
526
526
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
527
527
|
if (!apiKey)
|
|
528
528
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
|
@@ -977,7 +977,7 @@ class OpenAiGen {
|
|
|
977
977
|
}
|
|
978
978
|
return { usage, llmGenModel: returnedModel };
|
|
979
979
|
}
|
|
980
|
-
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, context, genseq, abortSignal) {
|
|
980
|
+
async genMoreMessages(providerConfig, agent, systemPrompt, funcTools, _requestContext, context, genseq, abortSignal) {
|
|
981
981
|
const apiKey = process.env[providerConfig.apiKeyEnvVar];
|
|
982
982
|
if (!apiKey)
|
|
983
983
|
throw new Error(`Missing API key env var ${providerConfig.apiKeyEnvVar}`);
|
|
@@ -1162,7 +1162,11 @@ async function driveDialogStreamCore(dlg, humanPrompt, driveOptions, callbacks)
|
|
|
1162
1162
|
retryMaxDelayMs: retryPolicy.maxDelayMs,
|
|
1163
1163
|
canRetry: () => true,
|
|
1164
1164
|
doRequest: async () => {
|
|
1165
|
-
const batchResult = await llmGen.genMoreMessages(providerCfg, agent, systemPrompt, funcTools,
|
|
1165
|
+
const batchResult = await llmGen.genMoreMessages(providerCfg, agent, systemPrompt, funcTools, {
|
|
1166
|
+
dialogSelfId: dlg.id.selfId,
|
|
1167
|
+
dialogRootId: dlg.id.rootId,
|
|
1168
|
+
promptCacheKey: dlg.id.selfId,
|
|
1169
|
+
}, ctxMsgs, dlg.activeGenSeq, abortSignal);
|
|
1166
1170
|
if (!hasMeaningfulBatchOutput(batchResult.messages)) {
|
|
1167
1171
|
throw {
|
|
1168
1172
|
status: 503,
|
|
@@ -1328,7 +1332,11 @@ async function driveDialogStreamCore(dlg, humanPrompt, driveOptions, callbacks)
|
|
|
1328
1332
|
streamSawWebSearchCall = false;
|
|
1329
1333
|
streamedFuncCalls.length = 0;
|
|
1330
1334
|
newMsgs.length = 0;
|
|
1331
|
-
const streamResult = await llmGen.genToReceiver(providerCfg, agent, systemPrompt, funcTools,
|
|
1335
|
+
const streamResult = await llmGen.genToReceiver(providerCfg, agent, systemPrompt, funcTools, {
|
|
1336
|
+
dialogSelfId: dlg.id.selfId,
|
|
1337
|
+
dialogRootId: dlg.id.rootId,
|
|
1338
|
+
promptCacheKey: dlg.id.selfId,
|
|
1339
|
+
}, ctxMsgs, receiver, dlg.activeGenSeq, abortSignal);
|
|
1332
1340
|
const hasThinkingContent = currentThinkingContent.trim() !== '';
|
|
1333
1341
|
const hasSayingContent = (streamAttemptSayingContent ?? '').trim() !== '';
|
|
1334
1342
|
const hasFunctionCall = streamedFuncCalls.length > 0;
|
package/dist/tools/team_mgmt.js
CHANGED
|
@@ -710,7 +710,10 @@ exports.teamMgmtCheckProviderTool = {
|
|
|
710
710
|
];
|
|
711
711
|
const systemPrompt = 'Connectivity check: reply with a short confirmation (e.g. "ok").';
|
|
712
712
|
try {
|
|
713
|
-
await llmGen.genToReceiver(providerCfg, agent, systemPrompt, [],
|
|
713
|
+
await llmGen.genToReceiver(providerCfg, agent, systemPrompt, [], {
|
|
714
|
+
dialogSelfId: 'team-mgmt-connectivity-check',
|
|
715
|
+
dialogRootId: 'team-mgmt-connectivity-check',
|
|
716
|
+
}, context, receiver, 0);
|
|
714
717
|
const details = out.trim().length > 0
|
|
715
718
|
? out.trim().slice(0, 120)
|
|
716
719
|
: sawFuncCall
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominds",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "DevOps Mindsets — Sustainable Agentic Product Lifecycle",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"private": false,
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"pnpm": ">=10.30.3"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@longrun-ai/codex-auth": "^0.
|
|
56
|
+
"@longrun-ai/codex-auth": "^0.10.0",
|
|
57
57
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
58
58
|
"openai": "^6.27.0",
|
|
59
59
|
"@modelcontextprotocol/sdk": "^1.27.1",
|