dominds 1.25.2 → 1.25.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/tui.js +2 -0
- package/dist/cli/webui.js +2 -0
- package/dist/cli.js +2 -0
- package/dist/dialog-display-state.js +6 -7
- package/dist/docs/dialog-system.md +15 -29
- package/dist/docs/dialog-system.zh.md +15 -29
- package/dist/evt-registry.js +2 -0
- package/dist/llm/kernel-driver/drive.js +137 -7
- package/dist/llm/kernel-driver/flow.js +46 -20
- package/dist/llm/kernel-driver/reply-guidance.js +5 -5
- package/dist/persistence-errors.d.ts +1 -1
- package/dist/persistence.d.ts +50 -1
- package/dist/persistence.js +549 -4
- package/dist/process-title.d.ts +2 -0
- package/dist/process-title.js +13 -0
- package/dist/runtime/driver-messages.d.ts +7 -1
- package/dist/runtime/driver-messages.js +33 -11
- package/dist/runtime/interjection-pause-stop.js +8 -7
- package/dist/server/api-routes.js +14 -0
- package/dist/server/dominds-self-update.d.ts +1 -0
- package/dist/server/dominds-self-update.js +17 -0
- package/dist/server/websocket-handler.js +73 -6
- package/dist/tools/cmd-runner-protocol.d.ts +1 -0
- package/dist/tools/cmd-runner-protocol.js +6 -0
- package/dist/tools/cmd-runner.js +1 -0
- package/dist/tools/os.d.ts +2 -4
- package/dist/tools/os.js +79 -4
- package/package.json +3 -3
- package/webapp/dist/assets/{_basePickBy-CbWZ8qnS.js → _basePickBy-fZ31r-iF.js} +3 -3
- package/webapp/dist/assets/_basePickBy-fZ31r-iF.js.map +1 -0
- package/webapp/dist/assets/{_baseUniq-IY-Vfzx1.js → _baseUniq-CI1keLoL.js} +2 -2
- package/webapp/dist/assets/_baseUniq-CI1keLoL.js.map +1 -0
- package/webapp/dist/assets/{arc--U2Vks6y.js → arc-1NeUqzoV.js} +2 -2
- package/webapp/dist/assets/arc-1NeUqzoV.js.map +1 -0
- package/webapp/dist/assets/{architectureDiagram-VXUJARFQ-DpryGqjy.js → architectureDiagram-2XIMDMQ5-C7SdzYIh.js} +26 -8
- package/webapp/dist/assets/architectureDiagram-2XIMDMQ5-C7SdzYIh.js.map +1 -0
- package/webapp/dist/assets/{blockDiagram-VD42YOAC-TTufCfiE.js → blockDiagram-WCTKOSBZ-Cmpu3kIy.js} +187 -170
- package/webapp/dist/assets/blockDiagram-WCTKOSBZ-Cmpu3kIy.js.map +1 -0
- package/webapp/dist/assets/{c4Diagram-YG6GDRKO-B4RPsw5H.js → c4Diagram-IC4MRINW-ChGTHIor.js} +4 -4
- package/webapp/dist/assets/c4Diagram-IC4MRINW-ChGTHIor.js.map +1 -0
- package/webapp/dist/assets/{channel-DAtGYJHZ.js → channel-ndS-XTQQ.js} +2 -2
- package/webapp/dist/assets/channel-ndS-XTQQ.js.map +1 -0
- package/webapp/dist/assets/{chunk-4BX2VUAB-JtO__vAF.js → chunk-4BX2VUAB-Cw5FtBd_.js} +2 -2
- package/webapp/dist/assets/chunk-4BX2VUAB-Cw5FtBd_.js.map +1 -0
- package/webapp/dist/assets/{chunk-55IACEB6-JMRC8yG1.js → chunk-55IACEB6-D3G71JdA.js} +2 -2
- package/webapp/dist/assets/chunk-55IACEB6-D3G71JdA.js.map +1 -0
- package/webapp/dist/assets/{chunk-FMBD7UC4-DFXKLjHC.js → chunk-FMBD7UC4-BcugPyy7.js} +2 -2
- package/webapp/dist/assets/chunk-FMBD7UC4-BcugPyy7.js.map +1 -0
- package/webapp/dist/assets/{chunk-TZMSLE5B-BaE4C244.js → chunk-JSJVCQXG-DvuxYuNq.js} +14 -6
- package/webapp/dist/assets/chunk-JSJVCQXG-DvuxYuNq.js.map +1 -0
- package/webapp/dist/assets/{chunk-QN33PNHL-BKzkeJ-b.js → chunk-KX2RTZJC-BQ42xd4s.js} +2 -2
- package/webapp/dist/assets/chunk-KX2RTZJC-BQ42xd4s.js.map +1 -0
- package/webapp/dist/assets/{chunk-DI55MBZ5-j9B4rifK.js → chunk-NQ4KR5QH-CGEMYTch.js} +9 -7
- package/webapp/dist/assets/chunk-NQ4KR5QH-CGEMYTch.js.map +1 -0
- package/webapp/dist/assets/{chunk-QZHKN3VN-DiZd3UNl.js → chunk-QZHKN3VN-CxNTVm5w.js} +2 -2
- package/webapp/dist/assets/chunk-QZHKN3VN-CxNTVm5w.js.map +1 -0
- package/webapp/dist/assets/{chunk-B4BG7PRW-BDIpf8Iz.js → chunk-WL4C6EOR-CIwdSg5q.js} +171 -121
- package/webapp/dist/assets/chunk-WL4C6EOR-CIwdSg5q.js.map +1 -0
- package/webapp/dist/assets/{classDiagram-2ON5EDUG-CNF8ZohD.js → classDiagram-VBA2DB6C-Dl05PJAP.js} +7 -6
- package/webapp/dist/assets/classDiagram-VBA2DB6C-Dl05PJAP.js.map +1 -0
- package/webapp/dist/assets/{classDiagram-v2-WZHVMYZB-CNF8ZohD.js → classDiagram-v2-RAHNMMFH-Dl05PJAP.js} +7 -6
- package/webapp/dist/assets/classDiagram-v2-RAHNMMFH-Dl05PJAP.js.map +1 -0
- package/webapp/dist/assets/{clone-Nq0Ko0Gv.js → clone-KCj1-QMr.js} +2 -2
- package/webapp/dist/assets/clone-KCj1-QMr.js.map +1 -0
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-uHPLSeKv.js → cose-bilkent-S5V4N54A-BttciCz5.js} +2 -2
- package/webapp/dist/assets/cose-bilkent-S5V4N54A-BttciCz5.js.map +1 -0
- package/webapp/dist/assets/cytoscape.esm-Bm8DJGmZ.js.map +1 -1
- package/webapp/dist/assets/{dagre-6UL2VRFP-C1awWpU3.js → dagre-KLK3FWXG-Dm5yE9k2.js} +7 -7
- package/webapp/dist/assets/dagre-KLK3FWXG-Dm5yE9k2.js.map +1 -0
- package/webapp/dist/assets/defaultLocale-B2RvLBDe.js.map +1 -1
- package/webapp/dist/assets/{diagram-PSM6KHXK-Bf69p76M.js → diagram-E7M64L7V-C80ZsiBG.js} +10 -10
- package/webapp/dist/assets/diagram-E7M64L7V-C80ZsiBG.js.map +1 -0
- package/webapp/dist/assets/{diagram-QEK2KX5R-Bvlbx8Jp.js → diagram-IFDJBPK2-CqKidH4n.js} +9 -8
- package/webapp/dist/assets/diagram-IFDJBPK2-CqKidH4n.js.map +1 -0
- package/webapp/dist/assets/{diagram-S2PKOQOG-CGjGalBu.js → diagram-P4PSJMXO-EHVjfzUV.js} +8 -8
- package/webapp/dist/assets/diagram-P4PSJMXO-EHVjfzUV.js.map +1 -0
- package/webapp/dist/assets/{erDiagram-Q2GNP2WA-Ds3qhwkG.js → erDiagram-INFDFZHY-7MrtsOIt.js} +96 -75
- package/webapp/dist/assets/erDiagram-INFDFZHY-7MrtsOIt.js.map +1 -0
- package/webapp/dist/assets/{flowDiagram-NV44I4VS-B1wDG_l5.js → flowDiagram-PKNHOUZH-D6hXqCy7.js} +98 -81
- package/webapp/dist/assets/flowDiagram-PKNHOUZH-D6hXqCy7.js.map +1 -0
- package/webapp/dist/assets/{ganttDiagram-JELNMOA3-BwuYt2bO.js → ganttDiagram-A5KZAMGK-DLO0XCDk.js} +28 -3
- package/webapp/dist/assets/ganttDiagram-A5KZAMGK-DLO0XCDk.js.map +1 -0
- package/webapp/dist/assets/{gitGraphDiagram-V2S2FVAM-B2Tw773z.js → gitGraphDiagram-K3NZZRJ6-BmVD_nQP.js} +38 -46
- package/webapp/dist/assets/gitGraphDiagram-K3NZZRJ6-BmVD_nQP.js.map +1 -0
- package/webapp/dist/assets/graph-DQTj8O0Q.js +782 -0
- package/webapp/dist/assets/graph-DQTj8O0Q.js.map +1 -0
- package/webapp/dist/assets/{index-yycTJNYb.css → index-BQoNJEGT.css} +1 -1
- package/webapp/dist/assets/{index-arD81Nnh.js → index-BXjq-k48.js} +1512 -1097
- package/webapp/dist/assets/{index-arD81Nnh.js.map → index-BXjq-k48.js.map} +1 -1
- package/webapp/dist/assets/{infoDiagram-HS3SLOUP-C9_JKYhm.js → infoDiagram-LFFYTUFH-D2fqM9Fn.js} +7 -7
- package/webapp/dist/assets/infoDiagram-LFFYTUFH-D2fqM9Fn.js.map +1 -0
- package/webapp/dist/assets/init-ZxktEp_H.js.map +1 -1
- package/webapp/dist/assets/ishikawaDiagram-PHBUUO56-kp7lB6-f.js +966 -0
- package/webapp/dist/assets/ishikawaDiagram-PHBUUO56-kp7lB6-f.js.map +1 -0
- package/webapp/dist/assets/{journeyDiagram-XKPGCS4Q-BhZggYOL.js → journeyDiagram-4ABVD52K-DmbA52J-.js} +5 -5
- package/webapp/dist/assets/journeyDiagram-4ABVD52K-DmbA52J-.js.map +1 -0
- package/webapp/dist/assets/{kanban-definition-3W4ZIXB7-B-R2Xm4Y.js → kanban-definition-K7BYSVSG-DRUw-P-d.js} +5 -3
- package/webapp/dist/assets/kanban-definition-K7BYSVSG-DRUw-P-d.js.map +1 -0
- package/webapp/dist/assets/{layout-BzMatxDa.js → layout-BUoHHXzn.js} +5 -5
- package/webapp/dist/assets/layout-BUoHHXzn.js.map +1 -0
- package/webapp/dist/assets/{linear-BuuJkw_U.js → linear-xVSAq8rI.js} +2 -2
- package/webapp/dist/assets/linear-xVSAq8rI.js.map +1 -0
- package/webapp/dist/assets/{mindmap-definition-VGOIOE7T-BR7oDKBR.js → mindmap-definition-YRQLILUH-BcajbGmW.js} +7 -5
- package/webapp/dist/assets/mindmap-definition-YRQLILUH-BcajbGmW.js.map +1 -0
- package/webapp/dist/assets/ordinal-CxptdPJm.js.map +1 -1
- package/webapp/dist/assets/{pieDiagram-ADFJNKIX--QWeT2vZ.js → pieDiagram-SKSYHLDU-Bu8kmCW6.js} +8 -8
- package/webapp/dist/assets/pieDiagram-SKSYHLDU-Bu8kmCW6.js.map +1 -0
- package/webapp/dist/assets/{quadrantDiagram-AYHSOK5B-BpqtmN3r.js → quadrantDiagram-337W2JSQ-DIBSNUGa.js} +3 -3
- package/webapp/dist/assets/quadrantDiagram-337W2JSQ-DIBSNUGa.js.map +1 -0
- package/webapp/dist/assets/{requirementDiagram-UZGBJVZJ-CIXjIi4F.js → requirementDiagram-Z7DCOOCP-CkrDkbBt.js} +16 -6
- package/webapp/dist/assets/requirementDiagram-Z7DCOOCP-CkrDkbBt.js.map +1 -0
- package/webapp/dist/assets/{sankeyDiagram-TZEHDZUN-DJIt7SRz.js → sankeyDiagram-WA2Y5GQK-BZ-1R8pc.js} +2 -2
- package/webapp/dist/assets/sankeyDiagram-WA2Y5GQK-BZ-1R8pc.js.map +1 -0
- package/webapp/dist/assets/{sequenceDiagram-WL72ISMW-BpDK1ROT.js → sequenceDiagram-2WXFIKYE-DYoNARdO.js} +601 -201
- package/webapp/dist/assets/sequenceDiagram-2WXFIKYE-DYoNARdO.js.map +1 -0
- package/webapp/dist/assets/{stateDiagram-FKZM4ZOC-BoKGfmHf.js → stateDiagram-RAJIS63D-D9v19nvh.js} +9 -9
- package/webapp/dist/assets/stateDiagram-RAJIS63D-D9v19nvh.js.map +1 -0
- package/webapp/dist/assets/{stateDiagram-v2-4FDKWEC3--haXC2JK.js → stateDiagram-v2-FVOUBMTO-BYw5ZwtH.js} +5 -5
- package/webapp/dist/assets/stateDiagram-v2-FVOUBMTO-BYw5ZwtH.js.map +1 -0
- package/webapp/dist/assets/{timeline-definition-IT6M3QCI-BmSg3Hjf.js → timeline-definition-YZTLITO2-BT10dRIJ.js} +3 -3
- package/webapp/dist/assets/timeline-definition-YZTLITO2-BT10dRIJ.js.map +1 -0
- package/webapp/dist/assets/{treemap-GDKQZRPO-D9OuyDVA.js → treemap-KZPCXAKY-yPoPC5hc.js} +37 -24
- package/webapp/dist/assets/treemap-KZPCXAKY-yPoPC5hc.js.map +1 -0
- package/webapp/dist/assets/vennDiagram-LZ73GAT5-tryg3OaY.js +2487 -0
- package/webapp/dist/assets/vennDiagram-LZ73GAT5-tryg3OaY.js.map +1 -0
- package/webapp/dist/assets/{xychartDiagram-PRI3JC2R-CVqSvO_S.js → xychartDiagram-JWTSCODW-BWLUzo9S.js} +4 -4
- package/webapp/dist/assets/xychartDiagram-JWTSCODW-BWLUzo9S.js.map +1 -0
- package/webapp/dist/index.html +2 -2
- package/webapp/dist/assets/_basePickBy-CbWZ8qnS.js.map +0 -1
- package/webapp/dist/assets/_baseUniq-IY-Vfzx1.js.map +0 -1
- package/webapp/dist/assets/arc--U2Vks6y.js.map +0 -1
- package/webapp/dist/assets/architectureDiagram-VXUJARFQ-DpryGqjy.js.map +0 -1
- package/webapp/dist/assets/blockDiagram-VD42YOAC-TTufCfiE.js.map +0 -1
- package/webapp/dist/assets/c4Diagram-YG6GDRKO-B4RPsw5H.js.map +0 -1
- package/webapp/dist/assets/channel-DAtGYJHZ.js.map +0 -1
- package/webapp/dist/assets/chunk-4BX2VUAB-JtO__vAF.js.map +0 -1
- package/webapp/dist/assets/chunk-55IACEB6-JMRC8yG1.js.map +0 -1
- package/webapp/dist/assets/chunk-B4BG7PRW-BDIpf8Iz.js.map +0 -1
- package/webapp/dist/assets/chunk-DI55MBZ5-j9B4rifK.js.map +0 -1
- package/webapp/dist/assets/chunk-FMBD7UC4-DFXKLjHC.js.map +0 -1
- package/webapp/dist/assets/chunk-QN33PNHL-BKzkeJ-b.js.map +0 -1
- package/webapp/dist/assets/chunk-QZHKN3VN-DiZd3UNl.js.map +0 -1
- package/webapp/dist/assets/chunk-TZMSLE5B-BaE4C244.js.map +0 -1
- package/webapp/dist/assets/classDiagram-2ON5EDUG-CNF8ZohD.js.map +0 -1
- package/webapp/dist/assets/classDiagram-v2-WZHVMYZB-CNF8ZohD.js.map +0 -1
- package/webapp/dist/assets/clone-Nq0Ko0Gv.js.map +0 -1
- package/webapp/dist/assets/cose-bilkent-S5V4N54A-uHPLSeKv.js.map +0 -1
- package/webapp/dist/assets/dagre-6UL2VRFP-C1awWpU3.js.map +0 -1
- package/webapp/dist/assets/diagram-PSM6KHXK-Bf69p76M.js.map +0 -1
- package/webapp/dist/assets/diagram-QEK2KX5R-Bvlbx8Jp.js.map +0 -1
- package/webapp/dist/assets/diagram-S2PKOQOG-CGjGalBu.js.map +0 -1
- package/webapp/dist/assets/erDiagram-Q2GNP2WA-Ds3qhwkG.js.map +0 -1
- package/webapp/dist/assets/flowDiagram-NV44I4VS-B1wDG_l5.js.map +0 -1
- package/webapp/dist/assets/ganttDiagram-JELNMOA3-BwuYt2bO.js.map +0 -1
- package/webapp/dist/assets/gitGraphDiagram-V2S2FVAM-B2Tw773z.js.map +0 -1
- package/webapp/dist/assets/graph-CS_H7jBi.js +0 -425
- package/webapp/dist/assets/graph-CS_H7jBi.js.map +0 -1
- package/webapp/dist/assets/infoDiagram-HS3SLOUP-C9_JKYhm.js.map +0 -1
- package/webapp/dist/assets/journeyDiagram-XKPGCS4Q-BhZggYOL.js.map +0 -1
- package/webapp/dist/assets/kanban-definition-3W4ZIXB7-B-R2Xm4Y.js.map +0 -1
- package/webapp/dist/assets/layout-BzMatxDa.js.map +0 -1
- package/webapp/dist/assets/linear-BuuJkw_U.js.map +0 -1
- package/webapp/dist/assets/mindmap-definition-VGOIOE7T-BR7oDKBR.js.map +0 -1
- package/webapp/dist/assets/pieDiagram-ADFJNKIX--QWeT2vZ.js.map +0 -1
- package/webapp/dist/assets/quadrantDiagram-AYHSOK5B-BpqtmN3r.js.map +0 -1
- package/webapp/dist/assets/requirementDiagram-UZGBJVZJ-CIXjIi4F.js.map +0 -1
- package/webapp/dist/assets/sankeyDiagram-TZEHDZUN-DJIt7SRz.js.map +0 -1
- package/webapp/dist/assets/sequenceDiagram-WL72ISMW-BpDK1ROT.js.map +0 -1
- package/webapp/dist/assets/stateDiagram-FKZM4ZOC-BoKGfmHf.js.map +0 -1
- package/webapp/dist/assets/stateDiagram-v2-4FDKWEC3--haXC2JK.js.map +0 -1
- package/webapp/dist/assets/timeline-definition-IT6M3QCI-BmSg3Hjf.js.map +0 -1
- package/webapp/dist/assets/treemap-GDKQZRPO-D9OuyDVA.js.map +0 -1
- package/webapp/dist/assets/xychartDiagram-PRI3JC2R-CVqSvO_S.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setProcessTitle = setProcessTitle;
|
|
4
|
+
exports.setRtwsProcessTitle = setRtwsProcessTitle;
|
|
5
|
+
function setProcessTitle(title) {
|
|
6
|
+
const normalizedTitle = title.trim();
|
|
7
|
+
if (normalizedTitle === '')
|
|
8
|
+
return;
|
|
9
|
+
process.title = normalizedTitle;
|
|
10
|
+
}
|
|
11
|
+
function setRtwsProcessTitle(rtwsRootAbs = process.cwd()) {
|
|
12
|
+
setProcessTitle(`Dominds: ${rtwsRootAbs}`);
|
|
13
|
+
}
|
|
@@ -13,7 +13,13 @@ export declare function formatNewCourseStartPrompt(language: LanguageCode, args:
|
|
|
13
13
|
export declare function formatDiligenceAutoContinuePrompt(language: LanguageCode, diligenceText: string): string;
|
|
14
14
|
export declare function formatReminderContextGuide(language: LanguageCode): string;
|
|
15
15
|
export type ReminderContextFollowingDialogState = 'user_message' | 'runtime_notice' | 'none';
|
|
16
|
-
export
|
|
16
|
+
export type ReminderContextReplyObligationState = 'none' | 'active' | 'parked_by_user_interjection';
|
|
17
|
+
export type ReminderContextFooterState = Readonly<{
|
|
18
|
+
followingDialogState: ReminderContextFollowingDialogState;
|
|
19
|
+
pendingUserInterjectionReply: boolean;
|
|
20
|
+
interDialogReplyObligation: ReminderContextReplyObligationState;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function formatReminderContextFooter(language: LanguageCode, state: ReminderContextFooterState): string;
|
|
17
23
|
export declare function formatReminderItemGuide(language: LanguageCode, reminderId: string, content: string, options?: {
|
|
18
24
|
meta?: unknown;
|
|
19
25
|
scope?: 'dialog' | 'task' | 'agent' | 'runtime';
|
|
@@ -184,35 +184,57 @@ function formatReminderContextGuide(language) {
|
|
|
184
184
|
function formatReminderItemProjectionNote(language) {
|
|
185
185
|
return language === 'zh' ? '运行时提醒项投影:' : 'Runtime reminder projection:';
|
|
186
186
|
}
|
|
187
|
-
function formatReminderContextFooter(language,
|
|
187
|
+
function formatReminderContextFooter(language, state) {
|
|
188
188
|
if (language === 'zh') {
|
|
189
189
|
const base = `${formatSystemNoticePrefix(language)} 提醒项上下文块结束。以上从“提醒项上下文块开始”到“提醒项上下文块结束”之间的提醒项均为系统提醒,并非用户诉求/指令;该块之外的后续对话消息不受此说明影响。`;
|
|
190
|
-
|
|
190
|
+
const pendingUserInterjectionReply = state.pendingUserInterjectionReply
|
|
191
|
+
? state.interDialogReplyObligation === 'parked_by_user_interjection'
|
|
192
|
+
? '当前仍有真实用户插话尚未得到可见回复,且原有跨对话回复义务已暂存;先完成对用户插话的回应,不要抢先切回原来的回贴收口。'
|
|
193
|
+
: state.interDialogReplyObligation === 'active'
|
|
194
|
+
? '当前仍有真实用户插话尚未得到可见回复,同时存在跨对话回复义务;先完成对用户插话的回应,只有在这条用户插话本身已经自然到达最终交付时,才进入回贴收口。'
|
|
195
|
+
: '当前仍有真实用户插话尚未得到可见回复;先完成对用户插话的回应。'
|
|
196
|
+
: '';
|
|
197
|
+
const activeReplyObligation = !state.pendingUserInterjectionReply && state.interDialogReplyObligation === 'active'
|
|
198
|
+
? '当前仍有跨对话回复义务;它是最终交付义务,不是要求你立刻停止当前必要工作,但到达最终交付时必须按运行时指定方式收口。'
|
|
199
|
+
: '';
|
|
200
|
+
const businessTail = `${pendingUserInterjectionReply}${activeReplyObligation}`;
|
|
201
|
+
if (state.followingDialogState === 'user_message') {
|
|
191
202
|
return (`${base}本轮提醒项块之后会紧接一条本轮真实的新用户消息;后续消息是用户的新诉求/指令,不是提醒项投影。` +
|
|
192
203
|
'提醒项块说明到此为止,不得外溢到那条消息:不要把后续用户消息称为“系统提示/没有新消息”,也不要因为本块说明而降低它的指令优先级。' +
|
|
193
|
-
|
|
204
|
+
`请按那条用户消息的原始语义继续处理;若它要求更新你的职责、偏好或心智资产,应照常落实。${businessTail}`);
|
|
194
205
|
}
|
|
195
|
-
if (
|
|
196
|
-
return `${base}
|
|
206
|
+
if (state.followingDialogState === 'runtime_notice') {
|
|
207
|
+
return `${base}本轮提醒项块之后会接着出现一条运行时提示;它不是用户的新诉求/指令,请按其中的运行时要求继续推进。${businessTail}`;
|
|
197
208
|
}
|
|
198
209
|
return (`${base}本轮没有新的用户消息或运行时提示;这是工具调用后的自动续推。` +
|
|
199
210
|
'请基于已有任务状态判断下一步:若已有明确、相关且有价值的动作,就继续执行;若当前确实只能等待外部结果或用户输入,不要为了避免“等待”而寻找无关小事。' +
|
|
200
|
-
|
|
211
|
+
`不要把“没有新消息”理解为空系统提示。${businessTail}`);
|
|
201
212
|
}
|
|
202
213
|
const base = `${formatSystemNoticePrefix(language)} Reminder context block ends. The reminder items between ` +
|
|
203
214
|
'"Reminder context block begins" and "Reminder context block ends" are system reminders, ' +
|
|
204
215
|
'not user requests/instructions; this reminder-block guidance does not apply to subsequent dialog messages outside this block. ';
|
|
205
|
-
|
|
216
|
+
const pendingUserInterjectionReply = state.pendingUserInterjectionReply
|
|
217
|
+
? state.interDialogReplyObligation === 'parked_by_user_interjection'
|
|
218
|
+
? "There is still a real user interjection without a visible reply, and the earlier inter-dialog reply obligation is parked; finish answering the user's interjection first, and do not switch back to closing the earlier reply yet. "
|
|
219
|
+
: state.interDialogReplyObligation === 'active'
|
|
220
|
+
? "There is still a real user interjection without a visible reply, while an inter-dialog reply obligation also exists; finish answering the user's interjection first, and enter reply closure only if this user interjection itself naturally reaches final delivery. "
|
|
221
|
+
: "There is still a real user interjection without a visible reply; finish answering the user's interjection first. "
|
|
222
|
+
: '';
|
|
223
|
+
const activeReplyObligation = !state.pendingUserInterjectionReply && state.interDialogReplyObligation === 'active'
|
|
224
|
+
? 'An inter-dialog reply obligation is still active; it is a final delivery obligation, not a demand to stop necessary current work immediately, but final delivery must close through the runtime-specified path. '
|
|
225
|
+
: '';
|
|
226
|
+
const businessTail = `${pendingUserInterjectionReply}${activeReplyObligation}`;
|
|
227
|
+
if (state.followingDialogState === 'user_message') {
|
|
206
228
|
return (`${base}A real new user message for this round immediately follows this reminder block; the following message is a new user request/instruction, not a reminder projection. ` +
|
|
207
229
|
'The reminder-block guidance ends here and must not spill over onto that message: do not label the following user message as a "system notice" or "no new message", and do not lower its instruction priority because of this block. ' +
|
|
208
|
-
|
|
230
|
+
`Handle that user message according to its original meaning; if it asks you to update your responsibilities, preferences, or mind assets, carry that out normally. ${businessTail}`);
|
|
209
231
|
}
|
|
210
|
-
if (
|
|
211
|
-
return `${base}A runtime notice follows this reminder block in this round; it is not a new user request/instruction, so follow that runtime guidance and continue the work
|
|
232
|
+
if (state.followingDialogState === 'runtime_notice') {
|
|
233
|
+
return `${base}A runtime notice follows this reminder block in this round; it is not a new user request/instruction, so follow that runtime guidance and continue the work. ${businessTail}`;
|
|
212
234
|
}
|
|
213
235
|
return (`${base}There is no new user message or runtime notice in this round; this is an automatic continuation after a tool call. ` +
|
|
214
236
|
'Judge the next step from the existing task state: if there is a clear, relevant, valuable action, continue with it; if the work genuinely can only wait for an external result or user input, do not invent unrelated work just to avoid "waiting". ' +
|
|
215
|
-
|
|
237
|
+
`Do not interpret the absence of a new message as an empty system notice. ${businessTail}`);
|
|
216
238
|
}
|
|
217
239
|
function formatReminderItemGuide(language, reminderId, content, options) {
|
|
218
240
|
function isRecord(value) {
|
|
@@ -4,9 +4,10 @@ exports.buildUserInterjectionPauseStopReason = buildUserInterjectionPauseStopRea
|
|
|
4
4
|
exports.isUserInterjectionPauseStopReason = isUserInterjectionPauseStopReason;
|
|
5
5
|
const USER_INTERJECTION_PAUSE_STOP_DETAIL = 'user_interjection_pause_resume_original_task';
|
|
6
6
|
// WARNING:
|
|
7
|
-
// This special stop reason is only a UI/run-control projection for
|
|
8
|
-
//
|
|
9
|
-
//
|
|
7
|
+
// This special stop reason is only a UI/run-control projection for legacy paused-interjection
|
|
8
|
+
// state. New answered-interjection flow reasserts the reply obligation automatically instead of
|
|
9
|
+
// depending on this stop reason. It is intentionally encoded as `system_stop`, but it does NOT mean
|
|
10
|
+
// the same thing as ordinary system-stop failure semantics.
|
|
10
11
|
//
|
|
11
12
|
// Not every user interjection should use this reason. If there is no parked original task to
|
|
12
13
|
// resume afterwards, the interjection should simply complete and the dialog should fall back to
|
|
@@ -18,8 +19,8 @@ const USER_INTERJECTION_PAUSE_STOP_DETAIL = 'user_interjection_pause_resume_orig
|
|
|
18
19
|
//
|
|
19
20
|
// Do not change this file in isolation. The complete behavior depends on coordinated logic across:
|
|
20
21
|
// - `reply-guidance.ts` suppressing tellasker reply obligation during interjection chat
|
|
21
|
-
// - `flow.ts`
|
|
22
|
-
// - `dialog-display-state.ts` preserving
|
|
22
|
+
// - `flow.ts` answering locally, then automatically reasserting reply obligation
|
|
23
|
+
// - `dialog-display-state.ts` preserving legacy paused projection until Continue
|
|
23
24
|
// - `websocket-handler.ts` treating Continue as "resume attempt" rather than immediate success
|
|
24
25
|
//
|
|
25
26
|
// Reading only this stop reason or only `displayState.kind === 'stopped'` gives an incomplete and
|
|
@@ -29,8 +30,8 @@ function buildUserInterjectionPauseStopReason() {
|
|
|
29
30
|
kind: 'system_stop',
|
|
30
31
|
detail: USER_INTERJECTION_PAUSE_STOP_DETAIL,
|
|
31
32
|
i18nStopReason: {
|
|
32
|
-
zh: '
|
|
33
|
-
en: 'Interjection handled; the original task is paused.
|
|
33
|
+
zh: '插话已处理;原任务已暂停。“继续”会重新检查最新任务状态,继续发送新消息则继续这段临时对话。',
|
|
34
|
+
en: 'Interjection handled; the original task is paused. Continue will recheck the latest task state, or send another message to keep this temporary side conversation going.',
|
|
34
35
|
},
|
|
35
36
|
};
|
|
36
37
|
}
|
|
@@ -1099,6 +1099,20 @@ async function handleApiRoute(req, res, pathname, context) {
|
|
|
1099
1099
|
return true;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
|
+
if (pathname === '/api/dominds/self-update/check' && req.method === 'POST') {
|
|
1103
|
+
try {
|
|
1104
|
+
const status = await (0, dominds_self_update_1.checkLatestDomindsVersionNow)();
|
|
1105
|
+
respondJson(res, 200, { success: true, update: status });
|
|
1106
|
+
return true;
|
|
1107
|
+
}
|
|
1108
|
+
catch (error) {
|
|
1109
|
+
respondJson(res, 409, {
|
|
1110
|
+
success: false,
|
|
1111
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1112
|
+
});
|
|
1113
|
+
return true;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1102
1116
|
// Team configuration endpoint (renamed)
|
|
1103
1117
|
if (pathname === '/api/team/config' && req.method === 'GET') {
|
|
1104
1118
|
return await handleGetTeamConfig(res);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DomindsSelfUpdateStatus } from '@longrun-ai/kernel/types';
|
|
2
2
|
type ServerMode = 'development' | 'production';
|
|
3
|
+
export declare function checkLatestDomindsVersionNow(): Promise<DomindsSelfUpdateStatus>;
|
|
3
4
|
export declare function configureDomindsSelfUpdate(params: {
|
|
4
5
|
host: string;
|
|
5
6
|
port: number;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.checkLatestDomindsVersionNow = checkLatestDomindsVersionNow;
|
|
6
7
|
exports.configureDomindsSelfUpdate = configureDomindsSelfUpdate;
|
|
7
8
|
exports.setDomindsSelfUpdateBroadcaster = setDomindsSelfUpdateBroadcaster;
|
|
8
9
|
exports.getDomindsSelfUpdateStatus = getDomindsSelfUpdateStatus;
|
|
@@ -179,6 +180,22 @@ async function runBackgroundCheck() {
|
|
|
179
180
|
scheduleBackgroundCheck(BACKGROUND_CHECK_INTERVAL_MS);
|
|
180
181
|
}
|
|
181
182
|
}
|
|
183
|
+
async function checkLatestDomindsVersionNow() {
|
|
184
|
+
const cfg = assertRuntimeConfig();
|
|
185
|
+
if (cfg.mode !== 'production') {
|
|
186
|
+
return await getDomindsSelfUpdateStatus();
|
|
187
|
+
}
|
|
188
|
+
if (installPromise !== null || restartPromise !== null) {
|
|
189
|
+
return await getDomindsSelfUpdateStatus();
|
|
190
|
+
}
|
|
191
|
+
if (restartState.kind === 'restart_required' || restartState.kind === 'restarting') {
|
|
192
|
+
return await getDomindsSelfUpdateStatus();
|
|
193
|
+
}
|
|
194
|
+
latestObservation = await queryLatestVersion();
|
|
195
|
+
publishStatusUpdateSoon();
|
|
196
|
+
scheduleBackgroundCheck(BACKGROUND_CHECK_INTERVAL_MS);
|
|
197
|
+
return await getDomindsSelfUpdateStatus();
|
|
198
|
+
}
|
|
182
199
|
function assertRuntimeConfig() {
|
|
183
200
|
if (runtimeConfig === null) {
|
|
184
201
|
throw new Error('Dominds self-update runtime is not configured');
|
|
@@ -224,8 +224,8 @@ function buildResumeIneligibleMessage(latest) {
|
|
|
224
224
|
// WARNING:
|
|
225
225
|
// `resume_dialog` eligibility is intentionally based on the freshly healed projection, not on a
|
|
226
226
|
// naive local check of raw suspension facts. In particular, the paused-interjection stopped state
|
|
227
|
-
//
|
|
228
|
-
// dialog may still be suspended by Q4H.
|
|
227
|
+
// remains resumable here so explicit Continue can re-evaluate the true state even while the
|
|
228
|
+
// underlying dialog may still be suspended by Q4H.
|
|
229
229
|
//
|
|
230
230
|
// The actual outcome of that Continue attempt is decided later in `flow.ts` from fresh facts:
|
|
231
231
|
// it may restore Q4H suspension, or it may immediately continue driving. Do not reinterpret a
|
|
@@ -479,6 +479,9 @@ async function handleWebSocketMessage(ws, packet) {
|
|
|
479
479
|
case 'get_q4h_state':
|
|
480
480
|
await handleGetQ4HState(ws, packet);
|
|
481
481
|
break;
|
|
482
|
+
case 'ack_a2h':
|
|
483
|
+
await handleAckA2H(ws, packet);
|
|
484
|
+
break;
|
|
482
485
|
case 'display_reminders':
|
|
483
486
|
await handleDisplayReminders(ws, packet);
|
|
484
487
|
break;
|
|
@@ -1142,6 +1145,7 @@ async function handleDisplayDialog(ws, packet) {
|
|
|
1142
1145
|
// delivery paths and blur event semantics.
|
|
1143
1146
|
try {
|
|
1144
1147
|
const allQuestions = await persistence_1.DialogPersistence.loadAllQ4HState();
|
|
1148
|
+
const allAnswers = await persistence_1.DialogPersistence.loadAllA2HState();
|
|
1145
1149
|
const response = {
|
|
1146
1150
|
type: 'q4h_state_response',
|
|
1147
1151
|
questions: allQuestions.map((q) => ({
|
|
@@ -1155,6 +1159,17 @@ async function handleDisplayDialog(ws, packet) {
|
|
|
1155
1159
|
callId: q.callId,
|
|
1156
1160
|
callSiteRef: q.callSiteRef,
|
|
1157
1161
|
})),
|
|
1162
|
+
answers: allAnswers.map((a) => ({
|
|
1163
|
+
id: a.id,
|
|
1164
|
+
selfId: a.selfId,
|
|
1165
|
+
rootId: a.rootId,
|
|
1166
|
+
agentId: a.agentId,
|
|
1167
|
+
taskDocPath: a.taskDocPath,
|
|
1168
|
+
content: a.content,
|
|
1169
|
+
answeredAt: a.answeredAt,
|
|
1170
|
+
userInterjection: a.userInterjection,
|
|
1171
|
+
answerRef: a.answerRef,
|
|
1172
|
+
})),
|
|
1158
1173
|
};
|
|
1159
1174
|
ws.send(JSON.stringify(response));
|
|
1160
1175
|
}
|
|
@@ -1183,6 +1198,7 @@ async function handleGetQ4HState(ws, _packet) {
|
|
|
1183
1198
|
try {
|
|
1184
1199
|
// Load Q4H from all running dialogs
|
|
1185
1200
|
const allQuestions = await persistence_1.DialogPersistence.loadAllQ4HState();
|
|
1201
|
+
const allAnswers = await persistence_1.DialogPersistence.loadAllA2HState();
|
|
1186
1202
|
// Transform to wire `Q4HStateResponse` question entries.
|
|
1187
1203
|
// `selfId` + `rootId` uniquely identify the originating dialog (including sideDialogs).
|
|
1188
1204
|
const questions = allQuestions.map((q) => ({
|
|
@@ -1196,10 +1212,22 @@ async function handleGetQ4HState(ws, _packet) {
|
|
|
1196
1212
|
callId: q.callId,
|
|
1197
1213
|
callSiteRef: q.callSiteRef,
|
|
1198
1214
|
}));
|
|
1215
|
+
const answers = allAnswers.map((a) => ({
|
|
1216
|
+
id: a.id,
|
|
1217
|
+
selfId: a.selfId,
|
|
1218
|
+
rootId: a.rootId,
|
|
1219
|
+
agentId: a.agentId,
|
|
1220
|
+
taskDocPath: a.taskDocPath,
|
|
1221
|
+
content: a.content,
|
|
1222
|
+
answeredAt: a.answeredAt,
|
|
1223
|
+
userInterjection: a.userInterjection,
|
|
1224
|
+
answerRef: a.answerRef,
|
|
1225
|
+
}));
|
|
1199
1226
|
// Send single response packet with all questions (not PubChan events)
|
|
1200
1227
|
const response = {
|
|
1201
1228
|
type: 'q4h_state_response',
|
|
1202
1229
|
questions,
|
|
1230
|
+
answers,
|
|
1203
1231
|
};
|
|
1204
1232
|
ws.send(JSON.stringify(response));
|
|
1205
1233
|
}
|
|
@@ -1211,6 +1239,46 @@ async function handleGetQ4HState(ws, _packet) {
|
|
|
1211
1239
|
}));
|
|
1212
1240
|
}
|
|
1213
1241
|
}
|
|
1242
|
+
async function handleAckA2H(ws, packet) {
|
|
1243
|
+
try {
|
|
1244
|
+
const dialogIdent = packet.dialog;
|
|
1245
|
+
const answerId = packet.answerId;
|
|
1246
|
+
if (!dialogIdent || typeof answerId !== 'string' || answerId.trim() === '') {
|
|
1247
|
+
ws.send(JSON.stringify({ type: 'error', message: 'dialog and answerId are required for A2H Ack' }));
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1250
|
+
if (typeof dialogIdent.selfId !== 'string' || typeof dialogIdent.rootId !== 'string') {
|
|
1251
|
+
ws.send(JSON.stringify({
|
|
1252
|
+
type: 'error',
|
|
1253
|
+
message: 'Invalid dialog identifiers for A2H Ack: selfId/rootId must be strings',
|
|
1254
|
+
}));
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1257
|
+
const dialogId = new dialog_1.DialogID(dialogIdent.selfId, dialogIdent.rootId);
|
|
1258
|
+
const removed = await persistence_1.DialogPersistence.acknowledgeAnswerToHumanState(dialogId, answerId);
|
|
1259
|
+
if (!removed.found) {
|
|
1260
|
+
ws.send(JSON.stringify({
|
|
1261
|
+
type: 'error',
|
|
1262
|
+
message: `A2H answer ${answerId} not found in dialog ${dialogIdent.selfId}`,
|
|
1263
|
+
}));
|
|
1264
|
+
return;
|
|
1265
|
+
}
|
|
1266
|
+
const event = {
|
|
1267
|
+
type: 'a2h_acknowledged',
|
|
1268
|
+
answerId,
|
|
1269
|
+
selfId: dialogIdent.selfId,
|
|
1270
|
+
rootId: dialogIdent.rootId,
|
|
1271
|
+
};
|
|
1272
|
+
(0, evt_registry_1.postDialogEventById)(dialogId, event);
|
|
1273
|
+
}
|
|
1274
|
+
catch (error) {
|
|
1275
|
+
log.error('Error processing A2H Ack:', error);
|
|
1276
|
+
ws.send(JSON.stringify({
|
|
1277
|
+
type: 'error',
|
|
1278
|
+
message: `Failed to acknowledge A2H answer: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
1279
|
+
}));
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1214
1282
|
async function handleDisplayReminders(ws, packet) {
|
|
1215
1283
|
try {
|
|
1216
1284
|
const live = wsLiveDlg.get(ws);
|
|
@@ -1503,10 +1571,9 @@ async function handleResumeDialog(ws, packet) {
|
|
|
1503
1571
|
const dialogIdObj = new dialog_1.DialogID(dialog.selfId, dialog.rootId);
|
|
1504
1572
|
const latest = await (0, dialog_display_state_1.refreshRunControlProjectionFromPersistenceFacts)(dialogIdObj, 'resume_dialog');
|
|
1505
1573
|
// WARNING:
|
|
1506
|
-
// Passing this gate only means "a
|
|
1507
|
-
//
|
|
1508
|
-
//
|
|
1509
|
-
// instead of proceeding.
|
|
1574
|
+
// Passing this gate only means "a Continue attempt is allowed". It does not mean the dialog is
|
|
1575
|
+
// guaranteed to re-enter proceeding immediately; the resumed drive may still land in true
|
|
1576
|
+
// `blocked` after re-reading fresh persistence facts.
|
|
1510
1577
|
if (!(0, dialog_display_state_1.isDialogLatestResumable)(latest)) {
|
|
1511
1578
|
const ineligible = buildResumeIneligibleMessage(latest);
|
|
1512
1579
|
log.warn('resume_dialog rejected after fresh fact scan', undefined, {
|
|
@@ -119,6 +119,7 @@ function parseCmdRunnerInitMessage(raw) {
|
|
|
119
119
|
}
|
|
120
120
|
const command = asString(spawnSpecRaw['command']);
|
|
121
121
|
const shellLabel = asString(spawnSpecRaw['shellLabel']);
|
|
122
|
+
const windowsVerbatimArgumentsRaw = spawnSpecRaw['windowsVerbatimArguments'];
|
|
122
123
|
const argsRaw = spawnSpecRaw['args'];
|
|
123
124
|
if (command === null || command.trim() === '') {
|
|
124
125
|
throw new Error('Invalid cmd_runner init message: spawnSpec.command required');
|
|
@@ -126,6 +127,10 @@ function parseCmdRunnerInitMessage(raw) {
|
|
|
126
127
|
if (shellLabel === null || shellLabel.trim() === '') {
|
|
127
128
|
throw new Error('Invalid cmd_runner init message: spawnSpec.shellLabel required');
|
|
128
129
|
}
|
|
130
|
+
if (windowsVerbatimArgumentsRaw !== undefined &&
|
|
131
|
+
typeof windowsVerbatimArgumentsRaw !== 'boolean') {
|
|
132
|
+
throw new Error('Invalid cmd_runner init message: spawnSpec.windowsVerbatimArguments must be boolean');
|
|
133
|
+
}
|
|
129
134
|
if (!Array.isArray(argsRaw) || !argsRaw.every((item) => typeof item === 'string')) {
|
|
130
135
|
throw new Error('Invalid cmd_runner init message: spawnSpec.args must be string[]');
|
|
131
136
|
}
|
|
@@ -138,6 +143,7 @@ function parseCmdRunnerInitMessage(raw) {
|
|
|
138
143
|
command,
|
|
139
144
|
args: [...argsRaw],
|
|
140
145
|
shellLabel,
|
|
146
|
+
...(windowsVerbatimArgumentsRaw === true ? { windowsVerbatimArguments: true } : {}),
|
|
141
147
|
},
|
|
142
148
|
};
|
|
143
149
|
}
|
package/dist/tools/cmd-runner.js
CHANGED
|
@@ -141,6 +141,7 @@ async function main() {
|
|
|
141
141
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
142
142
|
detached: false,
|
|
143
143
|
env: (0, shell_capture_env_1.buildCapturedShellEnv)(),
|
|
144
|
+
windowsVerbatimArguments: init.spawnSpec.windowsVerbatimArguments === true,
|
|
144
145
|
});
|
|
145
146
|
const daemonPid = childProcess.pid;
|
|
146
147
|
if (typeof daemonPid !== 'number') {
|
package/dist/tools/os.d.ts
CHANGED
|
@@ -10,12 +10,10 @@ type ShellSpawnSpec = Readonly<{
|
|
|
10
10
|
command: string;
|
|
11
11
|
args: string[];
|
|
12
12
|
shellLabel: string;
|
|
13
|
+
windowsVerbatimArguments?: boolean;
|
|
13
14
|
}>;
|
|
14
15
|
export declare function resolveShellCmdSpawnSpecForTests(command: string, shell: string | undefined, platform: NodeJS.Platform): ShellSpawnSpec;
|
|
15
|
-
export declare function resolveReadonlyShellSpawnSpecForTests(command: string, platform: NodeJS.Platform):
|
|
16
|
-
command: string;
|
|
17
|
-
args: string[];
|
|
18
|
-
}>;
|
|
16
|
+
export declare function resolveReadonlyShellSpawnSpecForTests(command: string, platform: NodeJS.Platform): ShellSpawnSpec;
|
|
19
17
|
export declare const shellCmdReminderOwner: ReminderOwner;
|
|
20
18
|
export declare const shellCmdTool: FuncTool;
|
|
21
19
|
export declare const readonlyShellTool: FuncTool;
|
package/dist/tools/os.js
CHANGED
|
@@ -821,9 +821,73 @@ function parseGetDaemonOutputArgs(args) {
|
|
|
821
821
|
function encodePowerShellCommand(command) {
|
|
822
822
|
return Buffer.from(command, 'utf16le').toString('base64');
|
|
823
823
|
}
|
|
824
|
+
function stripMatchingOuterQuotes(value) {
|
|
825
|
+
const trimmed = value.trim();
|
|
826
|
+
if (trimmed.length < 2) {
|
|
827
|
+
return trimmed;
|
|
828
|
+
}
|
|
829
|
+
const first = trimmed[0] ?? '';
|
|
830
|
+
const last = trimmed[trimmed.length - 1] ?? '';
|
|
831
|
+
if ((first === '"' && last === '"') || (first === "'" && last === "'")) {
|
|
832
|
+
return trimmed.slice(1, -1);
|
|
833
|
+
}
|
|
834
|
+
return trimmed;
|
|
835
|
+
}
|
|
836
|
+
function resolveDirectWindowsPowerShellCommand(command) {
|
|
837
|
+
const match = /^\s*(powershell(?:\.exe)?|pwsh(?:\.exe)?)\s+(?:-(?:NoLogo|NoProfile|NonInteractive)\s+)*(?:-|\/)(?:Command|c)\s+([\s\S]+?)\s*$/iu.exec(command);
|
|
838
|
+
if (match === null) {
|
|
839
|
+
return null;
|
|
840
|
+
}
|
|
841
|
+
const shellCommand = match[1] ?? '';
|
|
842
|
+
const encodedCommand = encodePowerShellCommand(stripMatchingOuterQuotes(match[2] ?? ''));
|
|
843
|
+
return {
|
|
844
|
+
command: shellCommand,
|
|
845
|
+
args: ['-NoLogo', '-NoProfile', '-EncodedCommand', encodedCommand],
|
|
846
|
+
shellLabel: shellCommand,
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
function unwrapNestedWindowsCmd(command) {
|
|
850
|
+
const match = /^\s*cmd(?:\.exe)?\s+(?:\/d\s+)?(?:\/s\s+)?\/c\s+([\s\S]+?)\s*$/iu.exec(command);
|
|
851
|
+
if (match === null) {
|
|
852
|
+
return null;
|
|
853
|
+
}
|
|
854
|
+
const inner = (match[1] ?? '').trim();
|
|
855
|
+
if (inner.length < 2) {
|
|
856
|
+
return inner;
|
|
857
|
+
}
|
|
858
|
+
const first = inner[0] ?? '';
|
|
859
|
+
const last = inner[inner.length - 1] ?? '';
|
|
860
|
+
if ((first === '"' && last === '"') || (first === "'" && last === "'")) {
|
|
861
|
+
return inner.slice(1, -1);
|
|
862
|
+
}
|
|
863
|
+
return inner;
|
|
864
|
+
}
|
|
865
|
+
function normalizeWindowsCmdCommand(command) {
|
|
866
|
+
const directPowerShell = resolveDirectWindowsPowerShellCommand(command);
|
|
867
|
+
if (directPowerShell !== null) {
|
|
868
|
+
return command;
|
|
869
|
+
}
|
|
870
|
+
const nestedCmd = unwrapNestedWindowsCmd(command);
|
|
871
|
+
if (nestedCmd !== null) {
|
|
872
|
+
return nestedCmd.replace(/\\"/g, '"').replace(/^(\s*if\s+(?:not\s+)?exist\s+)'([^'\r\n]+)'/iu, (_whole, prefix, quotedPath) => `${prefix}"${normalizeWindowsPathLiteral(quotedPath)}"`);
|
|
873
|
+
}
|
|
874
|
+
return command.replace(/\\"/g, '"').replace(/^(\s*if\s+(?:not\s+)?exist\s+)'([^'\r\n]+)'/iu, (_whole, prefix, quotedPath) => `${prefix}"${normalizeWindowsPathLiteral(quotedPath)}"`);
|
|
875
|
+
}
|
|
876
|
+
function normalizeWindowsPathLiteral(pathLiteral) {
|
|
877
|
+
if (pathLiteral.startsWith('\\\\')) {
|
|
878
|
+
return pathLiteral;
|
|
879
|
+
}
|
|
880
|
+
return pathLiteral.replace(/\\{2,}/g, '\\');
|
|
881
|
+
}
|
|
824
882
|
function resolveShellCmdSpawnSpec(command, shell, platform = process.platform) {
|
|
825
883
|
const preferredShell = typeof shell === 'string' && shell.trim() !== '' ? shell.trim() : undefined;
|
|
826
884
|
if (platform === 'win32') {
|
|
885
|
+
if (!preferredShell) {
|
|
886
|
+
const directPowerShell = resolveDirectWindowsPowerShellCommand(command);
|
|
887
|
+
if (directPowerShell !== null) {
|
|
888
|
+
return directPowerShell;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
827
891
|
if (preferredShell) {
|
|
828
892
|
const base = path_1.default.basename(preferredShell).toLowerCase();
|
|
829
893
|
if (base === 'powershell' ||
|
|
@@ -839,8 +903,9 @@ function resolveShellCmdSpawnSpec(command, shell, platform = process.platform) {
|
|
|
839
903
|
if (base === 'cmd' || base === 'cmd.exe') {
|
|
840
904
|
return {
|
|
841
905
|
command: preferredShell,
|
|
842
|
-
args: ['/d', '/c', command],
|
|
906
|
+
args: ['/d', '/c', normalizeWindowsCmdCommand(command)],
|
|
843
907
|
shellLabel: preferredShell,
|
|
908
|
+
windowsVerbatimArguments: true,
|
|
844
909
|
};
|
|
845
910
|
}
|
|
846
911
|
return {
|
|
@@ -851,8 +916,9 @@ function resolveShellCmdSpawnSpec(command, shell, platform = process.platform) {
|
|
|
851
916
|
}
|
|
852
917
|
return {
|
|
853
918
|
command: 'cmd.exe',
|
|
854
|
-
args: ['/d', '/c', command],
|
|
919
|
+
args: ['/d', '/c', normalizeWindowsCmdCommand(command)],
|
|
855
920
|
shellLabel: 'cmd.exe',
|
|
921
|
+
windowsVerbatimArguments: true,
|
|
856
922
|
};
|
|
857
923
|
}
|
|
858
924
|
const resolvedShell = preferredShell ?? 'bash';
|
|
@@ -867,9 +933,14 @@ function resolveShellCmdSpawnSpecForTests(command, shell, platform) {
|
|
|
867
933
|
}
|
|
868
934
|
function resolveReadonlyShellSpawnSpec(command, platform = process.platform) {
|
|
869
935
|
if (platform === 'win32') {
|
|
870
|
-
return {
|
|
936
|
+
return {
|
|
937
|
+
command: 'cmd.exe',
|
|
938
|
+
args: ['/d', '/c', normalizeWindowsCmdCommand(command)],
|
|
939
|
+
shellLabel: 'cmd.exe',
|
|
940
|
+
windowsVerbatimArguments: true,
|
|
941
|
+
};
|
|
871
942
|
}
|
|
872
|
-
return { command: 'bash', args: ['-c', command] };
|
|
943
|
+
return { command: 'bash', args: ['-c', command], shellLabel: 'bash' };
|
|
873
944
|
}
|
|
874
945
|
function resolveReadonlyShellSpawnSpecForTests(command, platform) {
|
|
875
946
|
return resolveReadonlyShellSpawnSpec(command, platform);
|
|
@@ -1485,6 +1556,9 @@ exports.shellCmdTool = {
|
|
|
1485
1556
|
command: spawnSpec.command,
|
|
1486
1557
|
args: spawnSpec.args,
|
|
1487
1558
|
shellLabel: spawnSpec.shellLabel,
|
|
1559
|
+
...(spawnSpec.windowsVerbatimArguments === true
|
|
1560
|
+
? { windowsVerbatimArguments: true }
|
|
1561
|
+
: {}),
|
|
1488
1562
|
},
|
|
1489
1563
|
timeoutSeconds,
|
|
1490
1564
|
scrollbackLines,
|
|
@@ -2177,6 +2251,7 @@ exports.readonlyShellTool = {
|
|
|
2177
2251
|
const childProcess = (0, child_process_1.spawn)(spawnSpec.command, spawnSpec.args, {
|
|
2178
2252
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
2179
2253
|
env: (0, shell_capture_env_1.buildCapturedShellEnv)(),
|
|
2254
|
+
windowsVerbatimArguments: spawnSpec.windowsVerbatimArguments === true,
|
|
2180
2255
|
});
|
|
2181
2256
|
childProcess.stdout?.on('data', (data) => {
|
|
2182
2257
|
stdoutBuffer.addBytes(data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominds",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.4",
|
|
4
4
|
"description": "Dominds CLI and aggregation shell for the LongRun AI kernel/runtime packages.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"publishConfig": {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"yaml": "^2.8.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
55
|
"@longrun-ai/codex-auth": "0.13.0",
|
|
56
|
-
"@longrun-ai/kernel": "1.15.
|
|
57
|
-
"@longrun-ai/shell": "1.15.
|
|
56
|
+
"@longrun-ai/kernel": "1.15.4",
|
|
57
|
+
"@longrun-ai/shell": "1.15.4"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@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 {
|
|
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-CI1keLoL.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-BXjq-k48.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-fZ31r-iF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_basePickBy-fZ31r-iF.js","sources":["../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toFinite.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toInteger.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/defaults.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createFind.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/findIndex.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/find.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMap.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/map.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseHas.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/has.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseLt.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseExtremum.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/min.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSet.js","../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_basePickBy.js"],"sourcesContent":["/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import toNumber from './toNumber.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nexport default toFinite;\n","import toFinite from './toFinite.js';\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nexport default toInteger;\n","import baseFlatten from './_baseFlatten.js';\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nexport default flatten;\n","import baseRest from './_baseRest.js';\nimport eq from './eq.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport keysIn from './keysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nexport default defaults;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nexport default last;\n","import baseIteratee from './_baseIteratee.js';\nimport isArrayLike from './isArrayLike.js';\nimport keys from './keys.js';\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nexport default createFind;\n","import baseFindIndex from './_baseFindIndex.js';\nimport baseIteratee from './_baseIteratee.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nexport default findIndex;\n","import createFind from './_createFind.js';\nimport findIndex from './findIndex.js';\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nexport default find;\n","import baseEach from './_baseEach.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nexport default baseMap;\n","import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nexport default map;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nexport default baseHas;\n","import baseHas from './_baseHas.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nexport default has;\n","/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nexport default baseLt;\n","import isSymbol from './isSymbol.js';\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n}\n\nexport default baseExtremum;\n","import baseExtremum from './_baseExtremum.js';\nimport baseLt from './_baseLt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\nfunction min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n}\n\nexport default min;\n","import assignValue from './_assignValue.js';\nimport castPath from './_castPath.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nexport default baseSet;\n","import baseGet from './_baseGet.js';\nimport baseSet from './_baseSet.js';\nimport castPath from './_castPath.js';\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nexport default basePickBy;\n"],"names":["objectProto","hasOwnProperty","collection"],"mappings":";;AACA,IAAI,eAAe;AAUnB,SAAS,gBAAgB,QAAQ;AAC/B,MAAI,QAAQ,OAAO;AAEnB,SAAO,WAAW,aAAa,KAAK,OAAO,OAAO,KAAK,CAAC,GAAG;AAAA,EA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