newmark-agent 0.5.12 → 0.5.13
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/conversation-utility-host.bundle.cjs +75276 -26574
- package/dist/core/agent.d.ts +42 -17
- package/dist/core/agent.js +297 -64
- package/dist/core/browserUse.d.ts +7 -0
- package/dist/core/browserUse.js +24 -7
- package/dist/core/displayImages.d.ts +10 -0
- package/dist/core/displayImages.js +31 -8
- package/dist/core/electronBrowserUseHost.d.ts +4 -0
- package/dist/core/electronBrowserUseHost.js +32 -6
- package/dist/core/electronUtilityAgentClient.d.ts +1 -0
- package/dist/core/electronUtilityAgentClient.js +50 -3
- package/dist/core/runtimeDiagnostics.d.ts +18 -0
- package/dist/core/runtimeDiagnostics.js +89 -0
- package/dist/core/runtimeLifecycle.d.ts +7 -1
- package/dist/core/runtimeLifecycle.js +29 -0
- package/dist/core/searchMcpPool.d.ts +80 -0
- package/dist/core/searchMcpPool.js +419 -0
- package/dist/main.js +72 -1
- package/dist/server.js +35 -0
- package/dist/tools/index.d.ts +17 -1
- package/dist/tools/index.js +203 -64
- package/dist/tui/src/data.js +2 -2
- package/dist/ui/index.html +80 -17
- package/dist/wsl-agent-host.bundle.cjs +75283 -26581
- package/package.json +11 -2
package/dist/core/agent.d.ts
CHANGED
|
@@ -331,6 +331,13 @@ export declare class Agent {
|
|
|
331
331
|
private branchMailbox;
|
|
332
332
|
private nextBranchMessageSequence;
|
|
333
333
|
private branchCommunicationEnabled;
|
|
334
|
+
/**
|
|
335
|
+
* Title/model availability is a hard gate for the first formal response.
|
|
336
|
+
* These values mirror the current conversation's persisted gate state so a
|
|
337
|
+
* failed first attempt cannot be bypassed by a second ordinary user send.
|
|
338
|
+
*/
|
|
339
|
+
private titleRequestMessageId;
|
|
340
|
+
private firstAgentResponseStarted;
|
|
334
341
|
private compressionArchiveCountCache;
|
|
335
342
|
private nextCompressionCacheId;
|
|
336
343
|
private readonly compressionHistoryArchive;
|
|
@@ -512,6 +519,12 @@ export declare class Agent {
|
|
|
512
519
|
private conversationEntryForDisk;
|
|
513
520
|
private normalizeWorkRuns;
|
|
514
521
|
private recoverPersistedWorkRuns;
|
|
522
|
+
/** Close tool calls left without results by a hard worker exit. */
|
|
523
|
+
private repairDanglingToolCalls;
|
|
524
|
+
repairDanglingToolCallsForTest(messages: Array<Record<string, unknown>>): {
|
|
525
|
+
messages: Array<Record<string, unknown>>;
|
|
526
|
+
changed: boolean;
|
|
527
|
+
};
|
|
515
528
|
private pauseFlowAfterUnexpectedExit;
|
|
516
529
|
beginConversationWorkRun(runId: string, target?: ConversationTarget, startedAt?: string, managed?: boolean, runtimeKey?: string): ConversationWorkRun;
|
|
517
530
|
private buildHistoryStatus;
|
|
@@ -678,16 +691,16 @@ export declare class Agent {
|
|
|
678
691
|
title: string;
|
|
679
692
|
};
|
|
680
693
|
/**
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
*
|
|
694
|
+
* Compatibility query for callers that still expose the rename affordance.
|
|
695
|
+
* Automatic naming itself is a hard pre-response gate: until the persisted
|
|
696
|
+
* firstAgentResponseStarted flag is true, every ordinary send must finish a
|
|
697
|
+
* title probe for the first persisted user message before formal execution.
|
|
685
698
|
*/
|
|
686
699
|
shouldPromptConversationRename(): boolean;
|
|
687
700
|
/**
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
*
|
|
701
|
+
* Legacy explicit-rename sanitizer retained for compatibility tests only.
|
|
702
|
+
* Automatic naming must never use an Agent/Build summary as a fallback;
|
|
703
|
+
* the independent first-input title probe is the sole automatic source.
|
|
691
704
|
*/
|
|
692
705
|
private deriveConversationTitleFromSummary;
|
|
693
706
|
/**
|
|
@@ -696,19 +709,27 @@ export declare class Agent {
|
|
|
696
709
|
*/
|
|
697
710
|
private normalizeConversationRenameTitle;
|
|
698
711
|
/**
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
712
|
+
* Run the independent, tool-free title/model-availability probe. It shares
|
|
713
|
+
* the frozen deployment selected for this send, but no main Agent history or
|
|
714
|
+
* tool schema. An empty result keeps the formal response hard-blocked.
|
|
702
715
|
*/
|
|
703
716
|
private deriveConversationTitleFromProvider;
|
|
717
|
+
/** Legacy completion hook retained as a no-op; naming is pre-response only. */
|
|
718
|
+
private maybeAutoRenameConversationFromRun;
|
|
719
|
+
private startFirstInputConversationTitle;
|
|
720
|
+
private firstPersistedUserForTitleGate;
|
|
704
721
|
/**
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
* 在首轮 prompt 注入一次性 tool-call 指令。
|
|
722
|
+
* Conversations saved before the durable title gate existed have no explicit
|
|
723
|
+
* flag. Prior assistant history or any persisted WorkRun proves that their
|
|
724
|
+
* first formal response already started. An explicit false is authoritative:
|
|
725
|
+
* it represents a failed title probe that must remain blocked across reloads.
|
|
710
726
|
*/
|
|
711
|
-
private
|
|
727
|
+
private restoredFirstAgentResponseStarted;
|
|
728
|
+
getConversationTitleGateState(): {
|
|
729
|
+
titleRequestMessageId: string;
|
|
730
|
+
firstAgentResponseStarted: boolean;
|
|
731
|
+
};
|
|
732
|
+
private markFirstAgentResponseStarted;
|
|
712
733
|
reorderConversations(ids: string[]): boolean;
|
|
713
734
|
/** Reorder one pinned group inside an explicit workspace without changing membership. */
|
|
714
735
|
reorderWorkspaceConversationGroup(ids: string[], ws: WorkspaceInfo | null): boolean;
|
|
@@ -826,11 +847,15 @@ export declare class Agent {
|
|
|
826
847
|
handleContextHistoryManage(args: string): NewmarkToolResult;
|
|
827
848
|
recordContextCompressionStep(): void;
|
|
828
849
|
compressionContinuationPrompt(): string;
|
|
829
|
-
mirrorConversationStateFrom(id: string, source: Pick<Agent, 'chatMessages' | 'history' | 'conversationPlan'> & Partial<Pick<Agent, 'linkedPlan' | 'subagents' | 'workRuns' | 'continuations'>> & {
|
|
850
|
+
mirrorConversationStateFrom(id: string, source: Pick<Agent, 'chatMessages' | 'history' | 'conversationPlan'> & Partial<Pick<Agent, 'linkedPlan' | 'subagents' | 'workRuns' | 'continuations' | 'getConversationTitleGateState'>> & {
|
|
830
851
|
modelSelection?: ConversationModelSelection;
|
|
831
852
|
inputMode?: InputMode;
|
|
832
853
|
mode?: AgentMode;
|
|
833
854
|
goal?: StoredGoalState | null;
|
|
855
|
+
titleGateState?: {
|
|
856
|
+
titleRequestMessageId?: string;
|
|
857
|
+
firstAgentResponseStarted?: boolean;
|
|
858
|
+
};
|
|
834
859
|
}): void;
|
|
835
860
|
getConversationPlan(conversationId?: string): ConversationPlanState;
|
|
836
861
|
updateConversationPlan(plan: Partial<ConversationPlanState>, conversationId?: string): ConversationPlanState;
|