dominds 1.26.3 → 1.26.4
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.js +10 -8
- package/dist/llm/kernel-driver/drive.js +2 -0
- package/dist/llm/kernel-driver/reminder-context.d.ts +2 -1
- package/dist/llm/kernel-driver/reminder-context.js +1 -0
- package/dist/minds/system-prompt.js +8 -0
- package/dist/runtime/driver-messages.d.ts +6 -0
- package/dist/runtime/driver-messages.js +46 -6
- package/dist/server/api-routes.js +7 -2
- package/dist/server/dominds-self-update.d.ts +1 -0
- package/dist/server/dominds-self-update.js +113 -56
- package/dist/supervisor-protocol.d.ts +2 -3
- package/package.json +3 -3
- package/webapp/dist/assets/{_basePickBy-DTJFxmut.js → _basePickBy-mFK6EVZU.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-DTJFxmut.js.map → _basePickBy-mFK6EVZU.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-CVu4lo4P.js → _baseUniq-C8zyOqn7.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-CVu4lo4P.js.map → _baseUniq-C8zyOqn7.js.map} +1 -1
- package/webapp/dist/assets/{arc-4mEKx1Qr.js → arc-Vdl3uhV8.js} +2 -2
- package/webapp/dist/assets/{arc-4mEKx1Qr.js.map → arc-Vdl3uhV8.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CmUkdSiN.js → architectureDiagram-2XIMDMQ5-D3Xtb8u_.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-CmUkdSiN.js.map → architectureDiagram-2XIMDMQ5-D3Xtb8u_.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-CijmZ89y.js → blockDiagram-WCTKOSBZ-Bozcnodw.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-CijmZ89y.js.map → blockDiagram-WCTKOSBZ-Bozcnodw.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-D0GcQMKs.js → c4Diagram-IC4MRINW-CLkxlY6N.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-D0GcQMKs.js.map → c4Diagram-IC4MRINW-CLkxlY6N.js.map} +1 -1
- package/webapp/dist/assets/{channel-6pgfGez4.js → channel-CqGyLCM_.js} +2 -2
- package/webapp/dist/assets/{channel-6pgfGez4.js.map → channel-CqGyLCM_.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-BQDAaqXK.js → chunk-4BX2VUAB-BNsJpMh4.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-BQDAaqXK.js.map → chunk-4BX2VUAB-BNsJpMh4.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-DGYbZ_6j.js → chunk-55IACEB6-B59p6vzX.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-DGYbZ_6j.js.map → chunk-55IACEB6-B59p6vzX.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-EVNnQ_SU.js → chunk-FMBD7UC4-CB17a_Ki.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-EVNnQ_SU.js.map → chunk-FMBD7UC4-CB17a_Ki.js.map} +1 -1
- package/webapp/dist/assets/{chunk-JSJVCQXG-BSQe2NHw.js → chunk-JSJVCQXG-DVnVflN-.js} +2 -2
- package/webapp/dist/assets/{chunk-JSJVCQXG-BSQe2NHw.js.map → chunk-JSJVCQXG-DVnVflN-.js.map} +1 -1
- package/webapp/dist/assets/{chunk-KX2RTZJC-I1LMYfrr.js → chunk-KX2RTZJC-D9_5LvIO.js} +2 -2
- package/webapp/dist/assets/{chunk-KX2RTZJC-I1LMYfrr.js.map → chunk-KX2RTZJC-D9_5LvIO.js.map} +1 -1
- package/webapp/dist/assets/{chunk-NQ4KR5QH-C9HmN9dA.js → chunk-NQ4KR5QH-CZWI2G2c.js} +4 -4
- package/webapp/dist/assets/{chunk-NQ4KR5QH-C9HmN9dA.js.map → chunk-NQ4KR5QH-CZWI2G2c.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-73ijGXNd.js → chunk-QZHKN3VN-WCLg8cNX.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-73ijGXNd.js.map → chunk-QZHKN3VN-WCLg8cNX.js.map} +1 -1
- package/webapp/dist/assets/{chunk-WL4C6EOR-DeVu-9ac.js → chunk-WL4C6EOR-BFkz_P__.js} +6 -6
- package/webapp/dist/assets/{chunk-WL4C6EOR-DeVu-9ac.js.map → chunk-WL4C6EOR-BFkz_P__.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-2HURCFLk.js → classDiagram-VBA2DB6C-DWQ1VnaI.js} +7 -7
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-2HURCFLk.js.map → classDiagram-VBA2DB6C-DWQ1VnaI.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-2HURCFLk.js → classDiagram-v2-RAHNMMFH-DWQ1VnaI.js} +7 -7
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-2HURCFLk.js.map → classDiagram-v2-RAHNMMFH-DWQ1VnaI.js.map} +1 -1
- package/webapp/dist/assets/{clone-BNPlfGMh.js → clone-D3QHqx6z.js} +2 -2
- package/webapp/dist/assets/{clone-BNPlfGMh.js.map → clone-D3QHqx6z.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BeoZCFA5.js → cose-bilkent-S5V4N54A-D2dZHRG3.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-BeoZCFA5.js.map → cose-bilkent-S5V4N54A-D2dZHRG3.js.map} +1 -1
- package/webapp/dist/assets/{dagre-KLK3FWXG-DYxCt50h.js → dagre-KLK3FWXG-Cwz7pFDo.js} +7 -7
- package/webapp/dist/assets/{dagre-KLK3FWXG-DYxCt50h.js.map → dagre-KLK3FWXG-Cwz7pFDo.js.map} +1 -1
- package/webapp/dist/assets/{diagram-E7M64L7V-BWxcTI3B.js → diagram-E7M64L7V-C6z0VVoW.js} +8 -8
- package/webapp/dist/assets/{diagram-E7M64L7V-BWxcTI3B.js.map → diagram-E7M64L7V-C6z0VVoW.js.map} +1 -1
- package/webapp/dist/assets/{diagram-IFDJBPK2-BAIPE4Rn.js → diagram-IFDJBPK2-CZ1KR1hO.js} +7 -7
- package/webapp/dist/assets/{diagram-IFDJBPK2-BAIPE4Rn.js.map → diagram-IFDJBPK2-CZ1KR1hO.js.map} +1 -1
- package/webapp/dist/assets/{diagram-P4PSJMXO-CvcxPsVp.js → diagram-P4PSJMXO-ChwZDZYa.js} +7 -7
- package/webapp/dist/assets/{diagram-P4PSJMXO-CvcxPsVp.js.map → diagram-P4PSJMXO-ChwZDZYa.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-INFDFZHY-BDO90e-f.js → erDiagram-INFDFZHY-DCnHsk_Z.js} +5 -5
- package/webapp/dist/assets/{erDiagram-INFDFZHY-BDO90e-f.js.map → erDiagram-INFDFZHY-DCnHsk_Z.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-hd4TorKR.js → flowDiagram-PKNHOUZH-C5Hi85ST.js} +7 -7
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-hd4TorKR.js.map → flowDiagram-PKNHOUZH-C5Hi85ST.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-mID1sFSl.js → ganttDiagram-A5KZAMGK-vT15RP6A.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-mID1sFSl.js.map → ganttDiagram-A5KZAMGK-vT15RP6A.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-DaA7yodM.js → gitGraphDiagram-K3NZZRJ6-Ct5XDpFu.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-DaA7yodM.js.map → gitGraphDiagram-K3NZZRJ6-Ct5XDpFu.js.map} +1 -1
- package/webapp/dist/assets/{graph-B86JxOkQ.js → graph-CqFTrHii.js} +3 -3
- package/webapp/dist/assets/{graph-B86JxOkQ.js.map → graph-CqFTrHii.js.map} +1 -1
- package/webapp/dist/assets/{index-DYO4ZL8y.js → index-C_PzQ5W5.js} +264 -44
- package/webapp/dist/assets/{index-DYO4ZL8y.js.map → index-C_PzQ5W5.js.map} +1 -1
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DxF36W9g.js → infoDiagram-LFFYTUFH-DlyOw8IT.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-DxF36W9g.js.map → infoDiagram-LFFYTUFH-DlyOw8IT.js.map} +1 -1
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-wvAzRzSO.js → ishikawaDiagram-PHBUUO56-iZCVn19K.js} +2 -2
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-wvAzRzSO.js.map → ishikawaDiagram-PHBUUO56-iZCVn19K.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-CIBXsttK.js → journeyDiagram-4ABVD52K-B95gnBKj.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-CIBXsttK.js.map → journeyDiagram-4ABVD52K-B95gnBKj.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-DQTPyM5m.js → kanban-definition-K7BYSVSG-DQ2gfPUK.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-DQTPyM5m.js.map → kanban-definition-K7BYSVSG-DQ2gfPUK.js.map} +1 -1
- package/webapp/dist/assets/{layout-BG7IzQAG.js → layout-VOBFudHV.js} +5 -5
- package/webapp/dist/assets/{layout-BG7IzQAG.js.map → layout-VOBFudHV.js.map} +1 -1
- package/webapp/dist/assets/{linear-5XR-mXYw.js → linear-BtBp93s2.js} +2 -2
- package/webapp/dist/assets/{linear-5XR-mXYw.js.map → linear-BtBp93s2.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-BwTQE6uN.js → mindmap-definition-YRQLILUH-m2w1nBbY.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-BwTQE6uN.js.map → mindmap-definition-YRQLILUH-m2w1nBbY.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-ZYB35zd5.js → pieDiagram-SKSYHLDU-ByoyS2as.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-ZYB35zd5.js.map → pieDiagram-SKSYHLDU-ByoyS2as.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-BM041Q-W.js → quadrantDiagram-337W2JSQ-BnKSsLfA.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-BM041Q-W.js.map → quadrantDiagram-337W2JSQ-BnKSsLfA.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-r_xMoroM.js → requirementDiagram-Z7DCOOCP-jU2C7qJN.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP-r_xMoroM.js.map → requirementDiagram-Z7DCOOCP-jU2C7qJN.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Ju2-t24N.js → sankeyDiagram-WA2Y5GQK-R175tX8b.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-Ju2-t24N.js.map → sankeyDiagram-WA2Y5GQK-R175tX8b.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-D83Bocd1.js → sequenceDiagram-2WXFIKYE-CBhN4j2Q.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-D83Bocd1.js.map → sequenceDiagram-2WXFIKYE-CBhN4j2Q.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-mTmpZzpU.js → stateDiagram-RAJIS63D-DZSAyRfJ.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-RAJIS63D-mTmpZzpU.js.map → stateDiagram-RAJIS63D-DZSAyRfJ.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BCn7mFeH.js → stateDiagram-v2-FVOUBMTO-x29lKJpl.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-BCn7mFeH.js.map → stateDiagram-v2-FVOUBMTO-x29lKJpl.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-C1QBcYz8.js → timeline-definition-YZTLITO2-BQR2qEXt.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-C1QBcYz8.js.map → timeline-definition-YZTLITO2-BQR2qEXt.js.map} +1 -1
- package/webapp/dist/assets/{treemap-KZPCXAKY-BEyfK-Fo.js → treemap-KZPCXAKY-b823qTE1.js} +5 -5
- package/webapp/dist/assets/{treemap-KZPCXAKY-BEyfK-Fo.js.map → treemap-KZPCXAKY-b823qTE1.js.map} +1 -1
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-C6SZhLMq.js → vennDiagram-LZ73GAT5-BrxPNUYz.js} +2 -2
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-C6SZhLMq.js.map → vennDiagram-LZ73GAT5-BrxPNUYz.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-BUlvexnm.js → xychartDiagram-JWTSCODW-BgOzlz6Z.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-BUlvexnm.js.map → xychartDiagram-JWTSCODW-BgOzlz6Z.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
package/dist/cli.js
CHANGED
|
@@ -93,8 +93,8 @@ function parseSupervisorArgs(argv) {
|
|
|
93
93
|
function isRecord(value) {
|
|
94
94
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return value === '
|
|
96
|
+
function isRestartStrategy(value) {
|
|
97
|
+
return value === 'current_entrypoint' || value === 'npx_latest';
|
|
98
98
|
}
|
|
99
99
|
function parseRunnerMessage(message) {
|
|
100
100
|
if (!isRecord(message))
|
|
@@ -108,7 +108,7 @@ function parseRunnerMessage(message) {
|
|
|
108
108
|
const debugDir = message['debugDir'];
|
|
109
109
|
const currentVersion = message['currentVersion'];
|
|
110
110
|
const targetVersion = message['targetVersion'];
|
|
111
|
-
const
|
|
111
|
+
const restartStrategy = message['restartStrategy'];
|
|
112
112
|
const invalid = (reason) => ({
|
|
113
113
|
kind: 'invalid',
|
|
114
114
|
reason,
|
|
@@ -131,8 +131,9 @@ function parseRunnerMessage(message) {
|
|
|
131
131
|
if (targetVersion !== null && typeof targetVersion !== 'string') {
|
|
132
132
|
return invalid('targetVersion must be a string or null');
|
|
133
133
|
}
|
|
134
|
-
if (!
|
|
135
|
-
return invalid('
|
|
134
|
+
if (!isRestartStrategy(restartStrategy)) {
|
|
135
|
+
return invalid('restartStrategy must be current_entrypoint or npx_latest');
|
|
136
|
+
}
|
|
136
137
|
return {
|
|
137
138
|
kind: 'restart',
|
|
138
139
|
message: {
|
|
@@ -144,7 +145,7 @@ function parseRunnerMessage(message) {
|
|
|
144
145
|
debugDir,
|
|
145
146
|
currentVersion,
|
|
146
147
|
targetVersion,
|
|
147
|
-
|
|
148
|
+
restartStrategy,
|
|
148
149
|
},
|
|
149
150
|
};
|
|
150
151
|
}
|
|
@@ -186,7 +187,7 @@ function appendInvalidSupervisorTraceSoon(parsed, event = 'supervisor.invalid_re
|
|
|
186
187
|
debugDir: parsed.debugDir,
|
|
187
188
|
currentVersion: 'unknown',
|
|
188
189
|
targetVersion: null,
|
|
189
|
-
|
|
190
|
+
restartStrategy: 'current_entrypoint',
|
|
190
191
|
};
|
|
191
192
|
appendSupervisorTraceSoon(message, event, {
|
|
192
193
|
...details,
|
|
@@ -490,6 +491,7 @@ async function runSupervised(params) {
|
|
|
490
491
|
cwd: message.cwd,
|
|
491
492
|
host: message.host,
|
|
492
493
|
port: message.port,
|
|
494
|
+
restartStrategy: message.restartStrategy,
|
|
493
495
|
});
|
|
494
496
|
scheduleRestartExitEnforcement(child, message);
|
|
495
497
|
});
|
|
@@ -540,7 +542,7 @@ async function runSupervised(params) {
|
|
|
540
542
|
return 0;
|
|
541
543
|
backoffMs = Math.min(backoffMs * 2, MAX_RESTART_BACKOFF_MS);
|
|
542
544
|
}
|
|
543
|
-
if (restart.
|
|
545
|
+
if (restart.restartStrategy === 'npx_latest') {
|
|
544
546
|
while (true) {
|
|
545
547
|
try {
|
|
546
548
|
const runnerEntrypoint = await resolveNpxLatestRunnerEntrypoint();
|
|
@@ -269,7 +269,9 @@ async function resolveReminderContextFooterState(args) {
|
|
|
269
269
|
const hasCompletedHandoffWithoutPendingReply = latest?.sideDialogFinalResponse !== undefined &&
|
|
270
270
|
!hasDeferredReplyReassertion &&
|
|
271
271
|
!hasActiveReplyObligation;
|
|
272
|
+
const dialogScope = args.dlg instanceof dialog_1.SideDialog ? { kind: 'side_dialog' } : { kind: 'main_dialog' };
|
|
272
273
|
return (0, reminder_context_1.resolveReminderContextFooterStateFromSignals)({
|
|
274
|
+
dialogScope,
|
|
273
275
|
prompt: args.prompt,
|
|
274
276
|
currentTurnDialogMsgsForContext: args.currentTurnDialogMsgsForContext,
|
|
275
277
|
contextHealth: args.dlg.getLastContextHealth(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContextHealthSnapshot } from '@longrun-ai/kernel/types/context-health';
|
|
2
|
-
import type { ReminderContextBusiness, ReminderContextFollowingMessage, ReminderContextFooterState, ReminderContextHealth } from '../../runtime/driver-messages';
|
|
2
|
+
import type { ReminderContextBusiness, ReminderContextDialogScope, ReminderContextFollowingMessage, ReminderContextFooterState, ReminderContextHealth } from '../../runtime/driver-messages';
|
|
3
3
|
import type { ChatMessage } from '../client';
|
|
4
4
|
import type { KernelDriverPrompt } from './types';
|
|
5
5
|
export declare function resolveReminderContextFollowingMessage(args: {
|
|
@@ -15,6 +15,7 @@ export declare function resolveReminderContextBusinessState(args: {
|
|
|
15
15
|
hasActiveReplyObligation: boolean;
|
|
16
16
|
}): ReminderContextBusiness;
|
|
17
17
|
export declare function resolveReminderContextFooterStateFromSignals(args: {
|
|
18
|
+
dialogScope: ReminderContextDialogScope;
|
|
18
19
|
prompt: KernelDriverPrompt | undefined;
|
|
19
20
|
currentTurnDialogMsgsForContext: readonly ChatMessage[];
|
|
20
21
|
contextHealth: ContextHealthSnapshot | undefined;
|
|
@@ -70,6 +70,7 @@ function resolveReminderContextFooterStateFromSignals(args) {
|
|
|
70
70
|
return {
|
|
71
71
|
followingMessage,
|
|
72
72
|
contextHealth: resolveReminderContextHealth(args.contextHealth),
|
|
73
|
+
dialogScope: args.dialogScope,
|
|
73
74
|
business: resolveReminderContextBusinessState({
|
|
74
75
|
followingMessage,
|
|
75
76
|
pendingUserInterjectionReply: args.pendingUserInterjectionReply,
|
|
@@ -367,6 +367,12 @@ function buildSystemPrompt(input) {
|
|
|
367
367
|
const fbrGuidelines = buildFbrGuidelines(input.language, input.dialogScope, input.contextHealthPromptMode);
|
|
368
368
|
const tellaskInteractionRules = buildTellaskInteractionRules(input.language);
|
|
369
369
|
const functionToolRules = buildFunctionToolRules(input.language, input.funcToolRulesText);
|
|
370
|
+
// Business scenario: many runtime notices say "Dominds has reminded / decided / injected ..."
|
|
371
|
+
// because Dominds, not the human user, maintains dialog state, reminder projection, course
|
|
372
|
+
// transitions, and inter-dialog routing. Without a plain glossary definition, models may treat
|
|
373
|
+
// "Dominds" as a user request source, a third-party product name, or an abstract platform.
|
|
374
|
+
// Define it once near the top of the system prompt so later Dominds notices read as state and
|
|
375
|
+
// guidance from the current autonomous runtime.
|
|
370
376
|
if (input.language === 'zh') {
|
|
371
377
|
return `
|
|
372
378
|
# Agent 系统提示
|
|
@@ -390,6 +396,7 @@ function buildSystemPrompt(input) {
|
|
|
390
396
|
|
|
391
397
|
## 术语表
|
|
392
398
|
|
|
399
|
+
- Dominds:你当前所在的智能体自主运行环境;它负责维护对话、提醒项、换程、队友诉请和系统提示。看到“Dominds 提示”时,把它当作当前运行环境给你的状态说明或行动引导,不是用户的新诉求。
|
|
393
400
|
- 诉请:对智能体的结构化请求。
|
|
394
401
|
- 诉请内容(tellaskContent):tellask 系列函数的正文参数,用于承载上下文/约束/验收。
|
|
395
402
|
- 提及列表(mentionList):仅用于 \`tellask\` / \`tellaskSessionless\` 的队友目标列表(\`@<agentId>\`)。
|
|
@@ -488,6 +495,7 @@ System notices convey important state changes (e.g., context caution/critical, D
|
|
|
488
495
|
|
|
489
496
|
## Glossary
|
|
490
497
|
|
|
498
|
+
- Dominds: your current autonomous agent runtime. It maintains dialogs, reminders, course transitions, teammate tellasks, and system notices. When you see a "Dominds notice", treat it as state or action guidance from the current runtime, not as a new user request.
|
|
491
499
|
- Tellask: a structured request addressed to an agent.
|
|
492
500
|
- Mention list (\`mentionList\`): teammate targets for \`tellask\` / \`tellaskSessionless\` only (\`@<agentId>\`).
|
|
493
501
|
- Tellask content (\`tellaskContent\`): main call payload carrying context/constraints/acceptance.
|
|
@@ -28,6 +28,11 @@ export type ReminderContextHealth = Readonly<{
|
|
|
28
28
|
}> | Readonly<{
|
|
29
29
|
kind: 'critical';
|
|
30
30
|
}>;
|
|
31
|
+
export type ReminderContextDialogScope = Readonly<{
|
|
32
|
+
kind: 'main_dialog';
|
|
33
|
+
}> | Readonly<{
|
|
34
|
+
kind: 'side_dialog';
|
|
35
|
+
}>;
|
|
31
36
|
export type ReminderContextBusiness = Readonly<{
|
|
32
37
|
kind: 'none';
|
|
33
38
|
}> | Readonly<{
|
|
@@ -44,6 +49,7 @@ export type ReminderContextBusiness = Readonly<{
|
|
|
44
49
|
export type ReminderContextFooterState = Readonly<{
|
|
45
50
|
followingMessage: ReminderContextFollowingMessage;
|
|
46
51
|
contextHealth: ReminderContextHealth;
|
|
52
|
+
dialogScope: ReminderContextDialogScope;
|
|
47
53
|
business: ReminderContextBusiness;
|
|
48
54
|
}>;
|
|
49
55
|
export declare function formatReminderContextFooter(language: LanguageCode, state: ReminderContextFooterState): string;
|
|
@@ -328,6 +328,44 @@ function joinReminderFooterTails(language, tails) {
|
|
|
328
328
|
return '';
|
|
329
329
|
return language === 'zh' ? nonEmptyTails.join('') : nonEmptyTails.join(' ');
|
|
330
330
|
}
|
|
331
|
+
function formatZhNormalAutoContinueByDialogScope(scope) {
|
|
332
|
+
switch (scope.kind) {
|
|
333
|
+
case 'main_dialog':
|
|
334
|
+
// Main Dialogs own the broad task and do not have a requester to tellaskBack. When the only
|
|
335
|
+
// apparent action is reminder maintenance, ask the human only for genuinely missing human
|
|
336
|
+
// input/authorization; otherwise hand control back to the Main Dialog keep-alive setting
|
|
337
|
+
// instead of making up work.
|
|
338
|
+
return '当前是主线对话。请基于提醒项之外的已有任务状态判断下一步:若已有明确、相关且有价值的任务动作,就继续执行;若唯一看似可做的只是新增、更新、删除、压缩或整理提醒项,不要把提醒项维护当成续推动作。若确实缺少人类本人澄清、裁决、验收口径、授权或输入,才用 `askHuman({ tellaskContent })` 提出一个最小且可回答的问题。若不缺这些信息、也没有真实任务动作,不要为了避免停顿而寻找无关小事;让主线按 Dominds 的主线机制处理,鞭策开启时会继续续推,鞭策关闭且没有真实动作时可以自然收住。';
|
|
339
|
+
case 'side_dialog':
|
|
340
|
+
// Side Dialogs are answering a requester. If blocked on requirement clarification, a business
|
|
341
|
+
// decision, acceptance criteria, or requester-held input, tellaskBack is the local loop and
|
|
342
|
+
// askHuman is only for information that truly must come from the human.
|
|
343
|
+
return '当前是支线对话。请基于提醒项之外的已有任务状态判断下一步:若已有明确、相关且有价值的任务动作,就继续执行;若唯一看似可做的只是新增、更新、删除、压缩或整理提醒项,不要把提醒项维护当成续推动作。若缺少需求澄清、业务裁决、验收口径、授权或输入,先判断缺的东西该由谁补:如果诉请者能补需求澄清/业务裁决/验收口径/缺失输入,先按当前工具规则考虑 `tellaskBack({ tellaskContent })` 回问诉请者;只有确实需要人类本人澄清、决策、授权或输入时,才用 `askHuman({ tellaskContent })` 提出一个最小且可回答的问题。若不缺这些信息、也没有真实任务动作,不要为了避免停顿而寻找无关小事;让支线按 Dominds 的支线机制处理:需要回贴时会收到回贴提醒,已完成且无新诉求时可以自然收住。';
|
|
344
|
+
default: {
|
|
345
|
+
const _exhaustive = scope;
|
|
346
|
+
throw new Error(`Unhandled zh reminder dialog scope: ${String(_exhaustive)}`);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function formatEnNormalAutoContinueByDialogScope(scope) {
|
|
351
|
+
switch (scope.kind) {
|
|
352
|
+
case 'main_dialog':
|
|
353
|
+
// Main Dialogs own the broad task and do not have a requester to tellaskBack. When the only
|
|
354
|
+
// apparent action is reminder maintenance, ask the human only for genuinely missing human
|
|
355
|
+
// input/authorization; otherwise hand control back to the Main Dialog keep-alive setting
|
|
356
|
+
// instead of making up work.
|
|
357
|
+
return "This is a Main Dialog. Judge the next step from existing task state outside the reminder items: if there is a clear, relevant, valuable actual task action, continue with it; if the only apparent action is to add, update, delete, compress, or organize reminders, do not treat reminder maintenance as task progress. Use `askHuman({ tellaskContent })` only when you truly need clarification, a decision, acceptance criteria, authorization, or input from the human; ask one minimal, answerable question. If you do not need any of that and there is no real task action, do not invent unrelated work just to avoid a pause; let the Main Dialog follow Dominds' mainline mechanism: diligence can continue it when enabled, and when diligence is disabled with no real action, it may naturally settle.";
|
|
358
|
+
case 'side_dialog':
|
|
359
|
+
// Side Dialogs are answering a requester. If blocked on requirement clarification, a business
|
|
360
|
+
// decision, acceptance criteria, or requester-held input, tellaskBack is the local loop and
|
|
361
|
+
// askHuman is only for information that truly must come from the human.
|
|
362
|
+
return "This is a Side Dialog. Judge the next step from existing task state outside the reminder items: if there is a clear, relevant, valuable actual task action, continue with it; if the only apparent action is to add, update, delete, compress, or organize reminders, do not treat reminder maintenance as task progress. If you are missing clarification, a business decision, acceptance criteria, authorization, or input, first identify who should provide it: when the requester can provide the missing requirement clarification, business decision, acceptance criteria, or missing input, follow the current tool rules and consider `tellaskBack({ tellaskContent })` first; use `askHuman({ tellaskContent })` only when the needed clarification, decision, authorization, or input truly must come from the human. If you do not need any of that and there is no real task action, do not invent unrelated work just to avoid a pause; let the Side Dialog follow Dominds' sideline mechanism: it can receive reply reminders when a reply is needed, and when it is complete with no new request, it may naturally settle.";
|
|
363
|
+
default: {
|
|
364
|
+
const _exhaustive = scope;
|
|
365
|
+
throw new Error(`Unhandled en reminder dialog scope: ${String(_exhaustive)}`);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
331
369
|
function formatReminderContextFooter(language, state) {
|
|
332
370
|
const contextHealthIsNormal = state.contextHealth.kind === 'normal';
|
|
333
371
|
if (language === 'zh') {
|
|
@@ -360,10 +398,11 @@ function formatReminderContextFooter(language, state) {
|
|
|
360
398
|
`不要把“没有新消息”理解为空系统提示。${statusTail}`);
|
|
361
399
|
}
|
|
362
400
|
// Normal tool-followup rounds may continue real business work, but reminder maintenance
|
|
363
|
-
// paths are merely references.
|
|
364
|
-
//
|
|
401
|
+
// paths are merely references. Runtime already knows whether this is a Main Dialog or Side
|
|
402
|
+
// Dialog, so do not ask the model to self-classify before choosing askHuman vs tellaskBack.
|
|
403
|
+
const scopeTail = formatZhNormalAutoContinueByDialogScope(state.dialogScope);
|
|
365
404
|
return (`${base}本轮没有新的用户消息或 Dominds 提示;这是工具调用后的自动续推。` +
|
|
366
|
-
|
|
405
|
+
scopeTail +
|
|
367
406
|
`不要把“没有新消息”理解为空系统提示。${businessTail}`);
|
|
368
407
|
default: {
|
|
369
408
|
const _exhaustive = state.followingMessage;
|
|
@@ -402,10 +441,11 @@ function formatReminderContextFooter(language, state) {
|
|
|
402
441
|
`Do not interpret the absence of a new message as an empty system notice. ${statusTail}`);
|
|
403
442
|
}
|
|
404
443
|
// Normal tool-followup rounds may continue real business work, but reminder maintenance
|
|
405
|
-
// paths are merely references.
|
|
406
|
-
//
|
|
444
|
+
// paths are merely references. Runtime already knows whether this is a Main Dialog or Side
|
|
445
|
+
// Dialog, so do not ask the model to self-classify before choosing askHuman vs tellaskBack.
|
|
446
|
+
const scopeTail = formatEnNormalAutoContinueByDialogScope(state.dialogScope);
|
|
407
447
|
return (`${base}There is no new user message or Dominds notice in this round; this is an automatic continuation after a tool call. ` +
|
|
408
|
-
|
|
448
|
+
`${scopeTail} ` +
|
|
409
449
|
`Do not interpret the absence of a new message as an empty system notice. ${businessTail}`);
|
|
410
450
|
default: {
|
|
411
451
|
const _exhaustive = state.followingMessage;
|
|
@@ -414,7 +414,7 @@ function parseDomindsSelfUpdateAction(body) {
|
|
|
414
414
|
if (!isRecord(body))
|
|
415
415
|
return null;
|
|
416
416
|
const action = body['action'];
|
|
417
|
-
if (action === 'install' || action === 'restart')
|
|
417
|
+
if (action === 'install' || action === 'restart' || action === 'force_restart')
|
|
418
418
|
return action;
|
|
419
419
|
return null;
|
|
420
420
|
}
|
|
@@ -1084,7 +1084,7 @@ async function handleApiRoute(req, res, pathname, context) {
|
|
|
1084
1084
|
if (action === null) {
|
|
1085
1085
|
respondJson(res, 400, {
|
|
1086
1086
|
success: false,
|
|
1087
|
-
error: "Invalid action. Expected 'install' or '
|
|
1087
|
+
error: "Invalid action. Expected 'install', 'restart', or 'force_restart'",
|
|
1088
1088
|
});
|
|
1089
1089
|
return true;
|
|
1090
1090
|
}
|
|
@@ -1094,6 +1094,11 @@ async function handleApiRoute(req, res, pathname, context) {
|
|
|
1094
1094
|
respondJson(res, 200, { success: true, update: status });
|
|
1095
1095
|
return true;
|
|
1096
1096
|
}
|
|
1097
|
+
if (action === 'force_restart') {
|
|
1098
|
+
const status = await (0, dominds_self_update_1.forceRestartDominds)();
|
|
1099
|
+
respondJson(res, 202, { success: true, update: status });
|
|
1100
|
+
return true;
|
|
1101
|
+
}
|
|
1097
1102
|
const status = await (0, dominds_self_update_1.restartDomindsIntoLatest)();
|
|
1098
1103
|
respondJson(res, 202, { success: true, update: status });
|
|
1099
1104
|
return true;
|
|
@@ -12,4 +12,5 @@ export declare function setDomindsSelfUpdateBroadcaster(next: ((status: DomindsS
|
|
|
12
12
|
export declare function getDomindsSelfUpdateStatus(): Promise<DomindsSelfUpdateStatus>;
|
|
13
13
|
export declare function installLatestDominds(): Promise<DomindsSelfUpdateStatus>;
|
|
14
14
|
export declare function restartDomindsIntoLatest(): Promise<DomindsSelfUpdateStatus>;
|
|
15
|
+
export declare function forceRestartDominds(): Promise<DomindsSelfUpdateStatus>;
|
|
15
16
|
export {};
|
|
@@ -9,6 +9,7 @@ exports.setDomindsSelfUpdateBroadcaster = setDomindsSelfUpdateBroadcaster;
|
|
|
9
9
|
exports.getDomindsSelfUpdateStatus = getDomindsSelfUpdateStatus;
|
|
10
10
|
exports.installLatestDominds = installLatestDominds;
|
|
11
11
|
exports.restartDomindsIntoLatest = restartDomindsIntoLatest;
|
|
12
|
+
exports.forceRestartDominds = forceRestartDominds;
|
|
12
13
|
const child_process_1 = require("child_process");
|
|
13
14
|
const crypto_1 = require("crypto");
|
|
14
15
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
@@ -1099,10 +1100,11 @@ async function getDomindsSelfUpdateStatus() {
|
|
|
1099
1100
|
});
|
|
1100
1101
|
}
|
|
1101
1102
|
if (restartPromise !== null) {
|
|
1103
|
+
const targetVersion = latestObservation.kind === 'ok' ? latestObservation.latestVersion : null;
|
|
1102
1104
|
return buildStatus({
|
|
1103
1105
|
currentVersion: runningVersion,
|
|
1104
|
-
installedVersion: runningVersion,
|
|
1105
|
-
latestVersion:
|
|
1106
|
+
installedVersion: targetVersion ?? runningVersion,
|
|
1107
|
+
latestVersion: targetVersion,
|
|
1106
1108
|
checkedAt: latestObservation.kind === 'unknown' ? null : latestObservation.checkedAt,
|
|
1107
1109
|
mode: cfg.mode,
|
|
1108
1110
|
runKind,
|
|
@@ -1110,7 +1112,7 @@ async function getDomindsSelfUpdateStatus() {
|
|
|
1110
1112
|
busy: 'restarting',
|
|
1111
1113
|
reason: 'restart_required',
|
|
1112
1114
|
message: 'Dominds restart is in progress',
|
|
1113
|
-
targetVersion
|
|
1115
|
+
targetVersion,
|
|
1114
1116
|
});
|
|
1115
1117
|
}
|
|
1116
1118
|
if (latestObservation.kind === 'unknown') {
|
|
@@ -1353,7 +1355,7 @@ async function requestSupervisorRestart(params) {
|
|
|
1353
1355
|
debugDir: params.trace.debugDir,
|
|
1354
1356
|
currentVersion: params.currentVersion,
|
|
1355
1357
|
targetVersion: params.targetVersion,
|
|
1356
|
-
|
|
1358
|
+
restartStrategy: params.restartStrategy,
|
|
1357
1359
|
};
|
|
1358
1360
|
await new Promise((resolve, reject) => {
|
|
1359
1361
|
process.send?.(message, (error) => {
|
|
@@ -1422,6 +1424,69 @@ async function stopAndExitForRestart() {
|
|
|
1422
1424
|
}
|
|
1423
1425
|
process.exit(0);
|
|
1424
1426
|
}
|
|
1427
|
+
async function requestDomindsRestart(params) {
|
|
1428
|
+
const cfg = assertRuntimeConfig();
|
|
1429
|
+
const runKind = detectRunKind(cfg.mode);
|
|
1430
|
+
if (runKind === 'disabled') {
|
|
1431
|
+
throw new Error('Dominds restart requires a production run kind');
|
|
1432
|
+
}
|
|
1433
|
+
restartState = { kind: 'restarting', targetVersion: params.targetVersion };
|
|
1434
|
+
publishStatusUpdateSoon();
|
|
1435
|
+
const restartCwd = process.cwd();
|
|
1436
|
+
const trace = buildRestartTraceContext();
|
|
1437
|
+
activeRestartTraceFile = trace.traceFile;
|
|
1438
|
+
try {
|
|
1439
|
+
await appendRestartTraceBestEffort(trace, params.traceEvent, {
|
|
1440
|
+
runKind,
|
|
1441
|
+
restartStrategy: params.restartStrategy,
|
|
1442
|
+
currentVersion: params.currentVersion,
|
|
1443
|
+
targetVersion: params.targetVersion,
|
|
1444
|
+
restartCwd,
|
|
1445
|
+
host: cfg.host,
|
|
1446
|
+
port: cfg.port,
|
|
1447
|
+
traceFile: trace.traceFile,
|
|
1448
|
+
});
|
|
1449
|
+
await requestSupervisorRestart({
|
|
1450
|
+
trace,
|
|
1451
|
+
restartStrategy: params.restartStrategy,
|
|
1452
|
+
currentVersion: params.currentVersion,
|
|
1453
|
+
targetVersion: params.targetVersion,
|
|
1454
|
+
});
|
|
1455
|
+
await appendRestartTraceBestEffort(trace, 'parent.supervisor_restart_requested', {
|
|
1456
|
+
retiringPid: process.pid,
|
|
1457
|
+
host: cfg.host,
|
|
1458
|
+
port: cfg.port,
|
|
1459
|
+
});
|
|
1460
|
+
log.info('Dominds supervisor restart requested', undefined, {
|
|
1461
|
+
traceFile: trace.traceFile,
|
|
1462
|
+
forced: params.traceEvent === 'parent.force_restart_requested',
|
|
1463
|
+
restartStrategy: params.restartStrategy,
|
|
1464
|
+
});
|
|
1465
|
+
setImmediate(() => {
|
|
1466
|
+
void stopAndExitForRestart().catch((error) => {
|
|
1467
|
+
void appendRestartTraceBestEffort(trace, 'parent.stop_and_exit.error', {
|
|
1468
|
+
message: error instanceof Error ? error.message : String(error),
|
|
1469
|
+
stack: error instanceof Error ? (error.stack ?? null) : null,
|
|
1470
|
+
});
|
|
1471
|
+
log.error('Failed to stop Dominds server during restart', error);
|
|
1472
|
+
restartState = params.rollbackState;
|
|
1473
|
+
activeRestartTraceFile = null;
|
|
1474
|
+
publishStatusUpdateSoon();
|
|
1475
|
+
});
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
catch (error) {
|
|
1479
|
+
await appendRestartTraceBestEffort(trace, 'parent.restart_error', {
|
|
1480
|
+
message: error instanceof Error ? error.message : String(error),
|
|
1481
|
+
stack: error instanceof Error ? (error.stack ?? null) : null,
|
|
1482
|
+
});
|
|
1483
|
+
restartState = params.rollbackState;
|
|
1484
|
+
activeRestartTraceFile = null;
|
|
1485
|
+
publishStatusUpdateSoon();
|
|
1486
|
+
throw error;
|
|
1487
|
+
}
|
|
1488
|
+
return await getDomindsSelfUpdateStatus();
|
|
1489
|
+
}
|
|
1425
1490
|
async function restartDomindsIntoLatest() {
|
|
1426
1491
|
const cfg = assertRuntimeConfig();
|
|
1427
1492
|
if (cfg.mode !== 'production') {
|
|
@@ -1452,63 +1517,55 @@ async function restartDomindsIntoLatest() {
|
|
|
1452
1517
|
else if (previousRestartRequiredState === null) {
|
|
1453
1518
|
throw new Error('Dominds restart requires a completed install or a restartable session');
|
|
1454
1519
|
}
|
|
1455
|
-
|
|
1520
|
+
return await requestDomindsRestart({
|
|
1521
|
+
traceEvent: 'parent.restart_requested',
|
|
1522
|
+
restartStrategy: runKind === 'npx' ? 'npx_latest' : 'current_entrypoint',
|
|
1523
|
+
currentVersion: status.currentVersion,
|
|
1524
|
+
targetVersion: status.targetVersion,
|
|
1525
|
+
rollbackState: previousRestartRequiredState ?? IDLE_RESTART_STATE,
|
|
1526
|
+
});
|
|
1527
|
+
})()
|
|
1528
|
+
.catch((error) => {
|
|
1529
|
+
const statusSnapshot = restartState.kind === 'restarting' ? restartState : null;
|
|
1530
|
+
log.error('Dominds version restart failed', error, {
|
|
1531
|
+
runKind: detectRunKind(cfg.mode),
|
|
1532
|
+
restartState: statusSnapshot,
|
|
1533
|
+
});
|
|
1534
|
+
throw error;
|
|
1535
|
+
})
|
|
1536
|
+
.finally(() => {
|
|
1537
|
+
restartPromise = null;
|
|
1456
1538
|
publishStatusUpdateSoon();
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
});
|
|
1470
|
-
await requestSupervisorRestart({
|
|
1471
|
-
trace,
|
|
1472
|
-
runKind,
|
|
1473
|
-
currentVersion: status.currentVersion,
|
|
1474
|
-
targetVersion: status.targetVersion,
|
|
1475
|
-
});
|
|
1476
|
-
await appendRestartTraceBestEffort(trace, 'parent.supervisor_restart_requested', {
|
|
1477
|
-
retiringPid: process.pid,
|
|
1478
|
-
host: cfg.host,
|
|
1479
|
-
port: cfg.port,
|
|
1480
|
-
});
|
|
1481
|
-
log.info('Dominds supervisor restart requested', undefined, {
|
|
1482
|
-
traceFile: trace.traceFile,
|
|
1483
|
-
});
|
|
1484
|
-
setImmediate(() => {
|
|
1485
|
-
void stopAndExitForRestart().catch((error) => {
|
|
1486
|
-
void appendRestartTraceBestEffort(trace, 'parent.stop_and_exit.error', {
|
|
1487
|
-
message: error instanceof Error ? error.message : String(error),
|
|
1488
|
-
stack: error instanceof Error ? (error.stack ?? null) : null,
|
|
1489
|
-
});
|
|
1490
|
-
log.error('Failed to stop Dominds server during restart', error);
|
|
1491
|
-
restartState = previousRestartRequiredState ?? IDLE_RESTART_STATE;
|
|
1492
|
-
activeRestartTraceFile = null;
|
|
1493
|
-
publishStatusUpdateSoon();
|
|
1494
|
-
});
|
|
1495
|
-
});
|
|
1496
|
-
}
|
|
1497
|
-
catch (error) {
|
|
1498
|
-
await appendRestartTraceBestEffort(trace, 'parent.restart_error', {
|
|
1499
|
-
message: error instanceof Error ? error.message : String(error),
|
|
1500
|
-
stack: error instanceof Error ? (error.stack ?? null) : null,
|
|
1501
|
-
});
|
|
1502
|
-
restartState = previousRestartRequiredState ?? IDLE_RESTART_STATE;
|
|
1503
|
-
activeRestartTraceFile = null;
|
|
1504
|
-
publishStatusUpdateSoon();
|
|
1505
|
-
throw error;
|
|
1506
|
-
}
|
|
1539
|
+
});
|
|
1540
|
+
return await restartPromise;
|
|
1541
|
+
}
|
|
1542
|
+
async function forceRestartDominds() {
|
|
1543
|
+
const cfg = assertRuntimeConfig();
|
|
1544
|
+
if (cfg.mode !== 'production') {
|
|
1545
|
+
throw new Error('Dominds force restart is disabled in development mode');
|
|
1546
|
+
}
|
|
1547
|
+
if (installPromise !== null) {
|
|
1548
|
+
throw new Error('Dominds force restart is blocked while installation is in progress');
|
|
1549
|
+
}
|
|
1550
|
+
if (restartPromise !== null) {
|
|
1507
1551
|
return await getDomindsSelfUpdateStatus();
|
|
1552
|
+
}
|
|
1553
|
+
if (restartState.kind === 'restarting') {
|
|
1554
|
+
return await getDomindsSelfUpdateStatus();
|
|
1555
|
+
}
|
|
1556
|
+
restartPromise = (async () => {
|
|
1557
|
+
const runningVersion = getRunningVersion();
|
|
1558
|
+
return await requestDomindsRestart({
|
|
1559
|
+
traceEvent: 'parent.force_restart_requested',
|
|
1560
|
+
restartStrategy: 'current_entrypoint',
|
|
1561
|
+
currentVersion: runningVersion,
|
|
1562
|
+
targetVersion: runningVersion,
|
|
1563
|
+
rollbackState: IDLE_RESTART_STATE,
|
|
1564
|
+
});
|
|
1508
1565
|
})()
|
|
1509
1566
|
.catch((error) => {
|
|
1510
1567
|
const statusSnapshot = restartState.kind === 'restarting' ? restartState : null;
|
|
1511
|
-
log.error('Dominds
|
|
1568
|
+
log.error('Dominds force restart failed', error, {
|
|
1512
1569
|
runKind: detectRunKind(cfg.mode),
|
|
1513
1570
|
restartState: statusSnapshot,
|
|
1514
1571
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { DomindsSelfUpdateRunKind } from '@longrun-ai/kernel/types';
|
|
2
1
|
export declare const DOMINDS_SUPERVISOR_RESTART_WEBUI = "dominds.supervisor.restart_webui.v1";
|
|
3
|
-
export type
|
|
2
|
+
export type DomindsSupervisorRestartStrategy = 'current_entrypoint' | 'npx_latest';
|
|
4
3
|
export type DomindsSupervisorRestartWebuiMessage = Readonly<{
|
|
5
4
|
type: typeof DOMINDS_SUPERVISOR_RESTART_WEBUI;
|
|
6
5
|
cwd: string;
|
|
@@ -10,6 +9,6 @@ export type DomindsSupervisorRestartWebuiMessage = Readonly<{
|
|
|
10
9
|
debugDir: string;
|
|
11
10
|
currentVersion: string;
|
|
12
11
|
targetVersion: string | null;
|
|
13
|
-
|
|
12
|
+
restartStrategy: DomindsSupervisorRestartStrategy;
|
|
14
13
|
}>;
|
|
15
14
|
export type DomindsRunnerToSupervisorMessage = DomindsSupervisorRestartWebuiMessage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominds",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.4",
|
|
4
4
|
"description": "Dominds CLI and aggregation shell for the LongRun AI kernel/runtime packages.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"publishConfig": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"yaml": "^2.8.2",
|
|
56
56
|
"zod": "^4.3.6",
|
|
57
57
|
"@longrun-ai/codex-auth": "0.13.0",
|
|
58
|
-
"@longrun-ai/
|
|
59
|
-
"@longrun-ai/
|
|
58
|
+
"@longrun-ai/shell": "1.16.0",
|
|
59
|
+
"@longrun-ai/kernel": "1.16.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/node": "^25.3.5",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as isSymbol, c as baseFlatten, g as baseIteratee, k as keys, h as baseFindIndex, j as baseEach, l as arrayMap, m as hasPath, n as castPath, t as toKey, o as baseGet } from "./_baseUniq-
|
|
2
|
-
import { aU as isObject, aC as baseRest, aV as isIterateeCall, aW as keysIn, aX as eq, aY as isArrayLike, aZ as isArray, a_ as identity, a$ as isIndex, b0 as assignValue } from "./index-
|
|
1
|
+
import { e as isSymbol, c as baseFlatten, g as baseIteratee, k as keys, h as baseFindIndex, j as baseEach, l as arrayMap, m as hasPath, n as castPath, t as toKey, o as baseGet } from "./_baseUniq-C8zyOqn7.js";
|
|
2
|
+
import { aU as isObject, aC as baseRest, aV as isIterateeCall, aW as keysIn, aX as eq, aY as isArrayLike, aZ as isArray, a_ as identity, a$ as isIndex, b0 as assignValue } from "./index-C_PzQ5W5.js";
|
|
3
3
|
var reWhitespace = /\s/;
|
|
4
4
|
function trimmedEndIndex(string) {
|
|
5
5
|
var index = string.length;
|
|
@@ -193,4 +193,4 @@ export {
|
|
|
193
193
|
map as m,
|
|
194
194
|
toFinite as t
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=_basePickBy-
|
|
196
|
+
//# sourceMappingURL=_basePickBy-mFK6EVZU.js.map
|