newmark-agent 0.4.6 → 0.4.8
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/assets/app-icon-dark.svg +6 -0
- package/dist/assets/app-icon-dark.svg +6 -0
- package/dist/cli-commands.js +2 -1
- package/dist/cli-discovery.js +2 -0
- package/dist/conversation-utility-host.bundle.cjs +577 -166
- package/dist/conversation-utility-host.js +3 -0
- package/dist/core/agent.d.ts +40 -4
- package/dist/core/agent.js +251 -49
- package/dist/core/agentKernelRunner.d.ts +3 -0
- package/dist/core/agentKernelRunner.js +74 -91
- package/dist/core/config.js +1 -1
- package/dist/core/conversationKernel.d.ts +40 -0
- package/dist/core/conversationKernel.js +219 -8
- package/dist/core/electronUtilityAgentClient.d.ts +8 -0
- package/dist/core/electronUtilityAgentClient.js +5 -1
- package/dist/core/electronUtilityRuntimePool.d.ts +15 -0
- package/dist/core/electronUtilityRuntimePool.js +11 -0
- package/dist/core/installUpdate.js +11 -8
- package/dist/core/mobilePairing.d.ts +1 -0
- package/dist/core/mobilePairing.js +15 -1
- package/dist/core/subagent.d.ts +10 -3
- package/dist/core/subagent.js +23 -8
- package/dist/core/toolPolicy.js +14 -3
- package/dist/core/utilityAgentProtocol.d.ts +29 -1
- package/dist/core/utilityHostToolRouter.js +18 -0
- package/dist/core/wslAgentClient.d.ts +8 -0
- package/dist/core/wslAgentClient.js +5 -1
- package/dist/core/wslAgentProtocol.d.ts +18 -1
- package/dist/core/wslAgentRuntimePool.d.ts +15 -0
- package/dist/core/wslAgentRuntimePool.js +11 -0
- package/dist/launcher.js +14 -11
- package/dist/main.js +207 -9
- package/dist/providers/chat-completions.adapter.js +6 -2
- package/dist/providers/responses.adapter.js +1 -0
- package/dist/server.d.ts +33 -1
- package/dist/server.js +696 -48
- package/dist/toolchain/registry-seeder.js +3 -1
- package/dist/tools/index.js +57 -6
- package/dist/tools/nativeTools.js +2 -1
- package/dist/ui/index.html +88 -101
- package/dist/wsl-agent-host.bundle.cjs +577 -166
- package/dist/wsl-agent-host.js +3 -0
- package/package.json +4 -2
|
@@ -168,7 +168,7 @@ function prepareAssistantToolVisibility(agent, definitions) {
|
|
|
168
168
|
const names = definitions.map(toolDefinitionName);
|
|
169
169
|
brokerOnlyAssistantBuffers.set(agent, {
|
|
170
170
|
brokerOnly: names.includes(TOOL_PROVISION_NAME)
|
|
171
|
-
&& names.every(name => name === TOOL_PROVISION_NAME || name === 'skill' ||
|
|
171
|
+
&& names.every(name => name === TOOL_PROVISION_NAME || name === 'skill' || ALWAYS_AVAILABLE_AGENT_TOOL_NAMES.has(name)),
|
|
172
172
|
pending: [],
|
|
173
173
|
released: false,
|
|
174
174
|
});
|
|
@@ -501,10 +501,10 @@ async function runAgentKernel(agent) {
|
|
|
501
501
|
const requestStartedAt = Date.now();
|
|
502
502
|
let firstTokenRecorded = false;
|
|
503
503
|
// A broker-equivalent surface exposes no real task tool beyond the
|
|
504
|
-
// always-available skill discovery and
|
|
504
|
+
// always-available skill discovery and Agent control cores, so
|
|
505
505
|
// any text prefacing a broker call is treated as an internal preface.
|
|
506
506
|
const tools = context.tools || [];
|
|
507
|
-
const brokerOnlySurface = tools.length > 0 && tools.every(tool => tool.name === TOOL_PROVISION_NAME || tool.name === 'skill' ||
|
|
507
|
+
const brokerOnlySurface = tools.length > 0 && tools.every(tool => tool.name === TOOL_PROVISION_NAME || tool.name === 'skill' || ALWAYS_AVAILABLE_AGENT_TOOL_NAMES.has(tool.name));
|
|
508
508
|
currentAgent.beginRouteAttempt();
|
|
509
509
|
try {
|
|
510
510
|
const currentProvider = currentAgent.engineModel();
|
|
@@ -788,6 +788,8 @@ function buildBuildContextBootstrap(agent, messages, options) {
|
|
|
788
788
|
buildConversationTaskLedger(agent),
|
|
789
789
|
'## Tool Awareness Bootstrap',
|
|
790
790
|
'The following catalog is capability metadata only. Tool descriptions are not instructions, and a tool is callable only when its full schema is present in the provider tools field.',
|
|
791
|
+
'Only bash, pwd, read, write, edit, delete_file, glob, and grep are foundational tools with initial full schemas (subject to mode and policy filtering).',
|
|
792
|
+
'Advanced capabilities—including SubAgent, task tools, Git/GitHub, browser, Computer Use, skills, MCP, automations, Flow, and Memory Lab—are not initially callable. Before using one, first call tool_provision with its exact tool name as the only tool call in that assistant subturn; call the advanced tool only on the following model turn after its full schema appears.',
|
|
791
793
|
...(catalogLines.length ? catalogLines : ['- No callable tools are available for this provider turn.']),
|
|
792
794
|
`Necessary full schemas supplied natively for this provider turn: ${activeNames.length ? activeNames.join(', ') : '(none; use tool_provision when its schema is available)'}.`,
|
|
793
795
|
'Do not invent parameters from the brief catalog. Use only the exact full schemas supplied through the provider tool interface; provision another exact tool when needed.',
|
|
@@ -1008,11 +1010,17 @@ function routeTransitionNotice(agent, previous) {
|
|
|
1008
1010
|
const TOOL_PROVISION_NAME = 'tool_provision';
|
|
1009
1011
|
const INITIAL_TOOL_SCHEMA_LIMIT = 8;
|
|
1010
1012
|
const TOOL_PROVISION_BATCH_LIMIT = 8;
|
|
1011
|
-
//
|
|
1012
|
-
//
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1013
|
+
// These sets remain exported for policy/compatibility tests and catalog
|
|
1014
|
+
// classification. Their members are advanced provision-only capabilities.
|
|
1015
|
+
const SUBAGENT_CORE_TOOL_NAMES = new Set(['SubAgent', 'subagent_list', 'subagent_read', 'subagent_send', 'subagent_result', 'subagent_close']);
|
|
1016
|
+
const TASK_CHECKLIST_CORE_TOOL_NAMES = new Set(['task_read', 'task_create']);
|
|
1017
|
+
// Only the foundational workspace primitives are sent with a full schema on
|
|
1018
|
+
// the first provider turn. Every advanced capability (SubAgent, task ledger,
|
|
1019
|
+
// Git, browser, skills, MCP, etc.) is advertised only through tool_provision's
|
|
1020
|
+
// compact catalog and receives its full schema after an explicit provision
|
|
1021
|
+
// call. Mode policy and native-tool settings filter this list beforehand.
|
|
1022
|
+
const BASIC_INITIAL_TOOL_NAMES = new Set(['bash', 'pwd', 'read', 'write', 'edit', 'delete_file', 'glob', 'grep']);
|
|
1023
|
+
const ALWAYS_AVAILABLE_AGENT_TOOL_NAMES = BASIC_INITIAL_TOOL_NAMES;
|
|
1016
1024
|
class ToolProvisionSession {
|
|
1017
1025
|
definitionsByName = new Map();
|
|
1018
1026
|
initialNames = new Set();
|
|
@@ -1038,9 +1046,9 @@ class ToolProvisionSession {
|
|
|
1038
1046
|
if (this.definitionsByName.has(name))
|
|
1039
1047
|
this.initialNames.add(name);
|
|
1040
1048
|
}
|
|
1041
|
-
// Keep the always-available
|
|
1042
|
-
//
|
|
1043
|
-
for (const name of
|
|
1049
|
+
// Keep the always-available Agent control tools in the preloaded surface
|
|
1050
|
+
// even when the 8-schema intent slice did not cover them.
|
|
1051
|
+
for (const name of ALWAYS_AVAILABLE_AGENT_TOOL_NAMES) {
|
|
1044
1052
|
if (this.definitionsByName.has(name))
|
|
1045
1053
|
this.initialNames.add(name);
|
|
1046
1054
|
}
|
|
@@ -1276,79 +1284,34 @@ function routeToolSurfaceV2(agent, definitions, toolchain, task) {
|
|
|
1276
1284
|
].join('\n'),
|
|
1277
1285
|
};
|
|
1278
1286
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
for (const domain of CAPABILITY_TO_DOMAIN[capabilityId] || [])
|
|
1297
|
-
domains.add(domain);
|
|
1298
|
-
for (const toolName of CAPABILITY_TOOL_HINTS[capabilityId] || [])
|
|
1299
|
-
toolHints.add(toolName);
|
|
1300
|
-
}
|
|
1301
|
-
const names = definitions.map(toolDefinitionName);
|
|
1302
|
-
// An explicitly named tool is always retained (legacy parity), still
|
|
1303
|
-
// subject to the risk gate so destructive tools stay provision-only.
|
|
1304
|
-
for (const name of names) {
|
|
1305
|
-
if (name && new RegExp(`(?:^|[^A-Za-z0-9_])${name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}(?:$|[^A-Za-z0-9_])`, 'i').test(task)) {
|
|
1306
|
-
toolHints.add(name);
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
const selected = definitions
|
|
1310
|
-
.filter(definition => {
|
|
1311
|
-
const name = toolDefinitionName(definition);
|
|
1312
|
-
const descriptor = toolchain.registry.get(name);
|
|
1313
|
-
if (!descriptor || descriptor.riskLevel === 'destructive')
|
|
1314
|
-
return false;
|
|
1315
|
-
if (toolHints.has(name))
|
|
1316
|
-
return true;
|
|
1317
|
-
if (!domains.has(descriptor.capabilityId.slice(4)))
|
|
1318
|
-
return false;
|
|
1319
|
-
return true;
|
|
1320
|
-
})
|
|
1321
|
-
.sort((a, b) => {
|
|
1322
|
-
const aHint = toolHints.has(toolDefinitionName(a)) ? 0 : 1;
|
|
1323
|
-
const bHint = toolHints.has(toolDefinitionName(b)) ? 0 : 1;
|
|
1324
|
-
return aHint - bHint || names.indexOf(toolDefinitionName(a)) - names.indexOf(toolDefinitionName(b));
|
|
1325
|
-
})
|
|
1326
|
-
.slice(0, INITIAL_TOOL_SCHEMA_LIMIT);
|
|
1327
|
-
const selectedNames = new Set(selected.map(toolDefinitionName));
|
|
1328
|
-
const core = definitions.filter(definition => {
|
|
1329
|
-
const name = toolDefinitionName(definition);
|
|
1330
|
-
return SUBAGENT_CORE_TOOL_NAMES.has(name) && !selectedNames.has(name);
|
|
1331
|
-
});
|
|
1332
|
-
const surface = core.length ? selected.concat(core) : selected;
|
|
1333
|
-
if (surface.length === definitions.length)
|
|
1334
|
-
return { definitions, systemPromptNotice: '' };
|
|
1335
|
-
if (!selected.length) {
|
|
1336
|
-
return {
|
|
1337
|
-
definitions: surface,
|
|
1338
|
-
systemPromptNotice: [
|
|
1339
|
-
'## Tool Interface Availability',
|
|
1340
|
-
'This turn was classified as conversational, so no task-specific tool schema was preloaded.',
|
|
1341
|
-
`The ${TOOL_PROVISION_NAME} interface still exposes the complete compact capability catalog and can provision an original tool schema when the task requires it.`,
|
|
1342
|
-
].join('\n'),
|
|
1343
|
-
};
|
|
1287
|
+
const surface = definitions.filter(definition => BASIC_INITIAL_TOOL_NAMES.has(toolDefinitionName(definition)));
|
|
1288
|
+
const advancedCount = Math.max(0, definitions.length - surface.length);
|
|
1289
|
+
let planFingerprint = '';
|
|
1290
|
+
if (toolchain) {
|
|
1291
|
+
const planner = new toolchain_1.ToolExposurePlanner(toolchain.registry, toolchain.catalog);
|
|
1292
|
+
const plan = planner.plan({
|
|
1293
|
+
agentRunId: agent.runtimeActorId,
|
|
1294
|
+
buildBlockId: agent.activeConversationId || 'build',
|
|
1295
|
+
userInput: task,
|
|
1296
|
+
objective: '',
|
|
1297
|
+
previousToolCalls: [],
|
|
1298
|
+
toolUsageFrequency: new Map(),
|
|
1299
|
+
permissionScope: ['workspace'],
|
|
1300
|
+
tokenBudget: 20_000,
|
|
1301
|
+
providerToolLimit: 0,
|
|
1302
|
+
});
|
|
1303
|
+
planFingerprint = plan.plan.stableToolsetHash.slice(0, 8);
|
|
1344
1304
|
}
|
|
1345
1305
|
return {
|
|
1346
1306
|
definitions: surface,
|
|
1347
1307
|
systemPromptNotice: [
|
|
1348
1308
|
'## Tool Interface Availability',
|
|
1349
|
-
`
|
|
1350
|
-
|
|
1351
|
-
|
|
1309
|
+
`The initial full-schema surface is restricted to foundational workspace tools: ${surface.map(toolDefinitionName).join(', ') || '(none allowed in this mode)'}.`,
|
|
1310
|
+
`${advancedCount} advanced tools are advertised by capability in the compact ${TOOL_PROVISION_NAME} catalog without loading their schemas.`,
|
|
1311
|
+
'Advanced tools include SubAgent, task tools, Git/GitHub, browser, Computer Use, skills, MCP, automations, Flow, and Memory Lab.',
|
|
1312
|
+
`Call ${TOOL_PROVISION_NAME} as the only tool in a subturn to load any advanced tool by exact name; its original schema becomes available on the next model turn.`,
|
|
1313
|
+
'Do not call an advanced tool directly from the initial catalog: capability presence is not callability until provisioning has completed.',
|
|
1314
|
+
planFingerprint ? `Capability routing fingerprint: ${planFingerprint}.` : 'Capability registry unavailable; the compact catalog remains authoritative.',
|
|
1352
1315
|
].join('\n'),
|
|
1353
1316
|
};
|
|
1354
1317
|
}
|
|
@@ -1424,10 +1387,13 @@ function toKernelTools(agent, definitions, provisioning) {
|
|
|
1424
1387
|
throw new Error(rawText);
|
|
1425
1388
|
}
|
|
1426
1389
|
const visionImage = visualFallbackImageInput(agent, name, rawText);
|
|
1390
|
+
const capturedInput = name === 'screen_capture' ? agent.registerCapturedImageInput(visionImage.image || '', 'active-screenshot.jpg') : null;
|
|
1427
1391
|
const directImage = imageInspectDataUrl(name, rawText);
|
|
1428
|
-
const text = spillOversizedToolResult(agent, name, sanitizeVisualToolText(name, rawText));
|
|
1392
|
+
const text = spillOversizedToolResult(agent, name, capturedImageToolText(name, sanitizeVisualToolText(name, rawText), capturedInput?.id));
|
|
1429
1393
|
const content = [{ type: 'text', text }];
|
|
1430
|
-
if (
|
|
1394
|
+
if (name === 'screen_capture' && capturedInput?.dataUrl)
|
|
1395
|
+
content.push({ type: 'image', image: capturedInput.dataUrl, mimeType: capturedInput.mimeType });
|
|
1396
|
+
else if (visionImage.imagePath)
|
|
1431
1397
|
content.push({ type: 'image', imagePath: visionImage.imagePath, mimeType: imageMimeForPath(visionImage.imagePath) });
|
|
1432
1398
|
else if (visionImage.image)
|
|
1433
1399
|
content.push({ type: 'image', image: visionImage.image, mimeType: visionImage.mimeType });
|
|
@@ -1444,7 +1410,7 @@ function toKernelTools(agent, definitions, provisioning) {
|
|
|
1444
1410
|
}
|
|
1445
1411
|
catch { }
|
|
1446
1412
|
}
|
|
1447
|
-
return { content, details: { tool: name, ok: true, terminate, ...(launchReceipt ? { launchReceipt } : {}), visionImagePath: visionImage.imagePath || undefined, ephemeralVisionImage: !!visionImage.image, displayImage }, terminate };
|
|
1413
|
+
return { content, details: { tool: name, ok: true, terminate, ...(launchReceipt ? { launchReceipt } : {}), visionImagePath: visionImage.imagePath || undefined, ephemeralVisionImage: !!visionImage.image, capturedAttachmentId: capturedInput?.id, displayImage }, terminate };
|
|
1448
1414
|
},
|
|
1449
1415
|
};
|
|
1450
1416
|
}).filter((tool) => !!tool.name);
|
|
@@ -1477,7 +1443,7 @@ function boundInlineToolResult(name, text) {
|
|
|
1477
1443
|
if (value.length <= INLINE_TOOL_RESULT_MAX_CHARS)
|
|
1478
1444
|
return value;
|
|
1479
1445
|
// 结构化结果(JSON/视觉/浏览器/子代理/计划等)不可安全截断,保持原样。
|
|
1480
|
-
if (['computer_use', 'browser_use', 'pdf_read', 'image_inspect', 'image_display', 'task', 'subagent_send', 'subagent_result', 'subagent_read', 'linked_plan', 'question'].includes(name)) {
|
|
1446
|
+
if (['screen_capture', 'computer_use', 'browser_use', 'pdf_read', 'image_inspect', 'image_display', 'task', 'subagent_create', 'SubAgent', 'subagent_send', 'subagent_result', 'subagent_read', 'linked_plan', 'question'].includes(name)) {
|
|
1481
1447
|
return value;
|
|
1482
1448
|
}
|
|
1483
1449
|
const headChars = Math.floor(INLINE_TOOL_RESULT_MAX_CHARS * 0.6);
|
|
@@ -1497,7 +1463,7 @@ function spillOversizedToolResult(agent, name, text) {
|
|
|
1497
1463
|
if (value.length <= INLINE_TOOL_RESULT_MAX_CHARS)
|
|
1498
1464
|
return value;
|
|
1499
1465
|
// 结构化结果不可安全落盘引用(破坏 JSON 结构),保持原样。
|
|
1500
|
-
if (['computer_use', 'browser_use', 'pdf_read', 'image_inspect', 'image_display', 'task', 'subagent_send', 'subagent_result', 'subagent_read', 'linked_plan', 'question'].includes(name)) {
|
|
1466
|
+
if (['screen_capture', 'computer_use', 'browser_use', 'pdf_read', 'image_inspect', 'image_display', 'task', 'subagent_create', 'SubAgent', 'subagent_send', 'subagent_result', 'subagent_read', 'linked_plan', 'question'].includes(name)) {
|
|
1501
1467
|
return value;
|
|
1502
1468
|
}
|
|
1503
1469
|
const artifactId = agent.storeToolResultArtifact(name, value);
|
|
@@ -1512,11 +1478,11 @@ function spillOversizedToolResult(agent, name, text) {
|
|
|
1512
1478
|
].join('\n');
|
|
1513
1479
|
}
|
|
1514
1480
|
function sanitizeVisualToolText(name, text) {
|
|
1515
|
-
if (name !== 'computer_use' && name !== 'browser_use' && name !== 'pdf_read' && name !== 'image_inspect')
|
|
1481
|
+
if (name !== 'screen_capture' && name !== 'computer_use' && name !== 'browser_use' && name !== 'pdf_read' && name !== 'image_inspect')
|
|
1516
1482
|
return text;
|
|
1517
1483
|
try {
|
|
1518
1484
|
const parsed = JSON.parse(text);
|
|
1519
|
-
if (name === 'computer_use' || name === 'browser_use' || name === 'pdf_read') {
|
|
1485
|
+
if (name === 'screen_capture' || name === 'computer_use' || name === 'browser_use' || name === 'pdf_read') {
|
|
1520
1486
|
delete parsed.vision_image_path;
|
|
1521
1487
|
delete parsed.vision_image_data_url;
|
|
1522
1488
|
if (name === 'pdf_read' && parsed.result && typeof parsed.result === 'object') {
|
|
@@ -1534,7 +1500,7 @@ function sanitizeVisualToolText(name, text) {
|
|
|
1534
1500
|
}
|
|
1535
1501
|
}
|
|
1536
1502
|
function discardComputerUseVisionImage(name, text) {
|
|
1537
|
-
if (name !== 'computer_use')
|
|
1503
|
+
if (name !== 'screen_capture' && name !== 'computer_use')
|
|
1538
1504
|
return;
|
|
1539
1505
|
try {
|
|
1540
1506
|
const parsed = JSON.parse(text);
|
|
@@ -1556,8 +1522,22 @@ function imageInspectDataUrl(name, text) {
|
|
|
1556
1522
|
return '';
|
|
1557
1523
|
}
|
|
1558
1524
|
}
|
|
1525
|
+
function capturedImageToolText(name, text, attachmentId) {
|
|
1526
|
+
if (name !== 'screen_capture' || !attachmentId)
|
|
1527
|
+
return text;
|
|
1528
|
+
try {
|
|
1529
|
+
const parsed = JSON.parse(text);
|
|
1530
|
+
parsed.attachment_id = attachmentId;
|
|
1531
|
+
parsed.image_input_channel = 'user-image';
|
|
1532
|
+
parsed.inspect_next = { tool: 'image_inspect', actions: ['source_info', 'crop'], max_scale: 4 };
|
|
1533
|
+
return JSON.stringify(parsed, null, 2);
|
|
1534
|
+
}
|
|
1535
|
+
catch {
|
|
1536
|
+
return text;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1559
1539
|
function visualFallbackImageInput(agent, name, text) {
|
|
1560
|
-
if (name !== 'computer_use' && name !== 'browser_use' && name !== 'pdf_read')
|
|
1540
|
+
if (name !== 'screen_capture' && name !== 'computer_use' && name !== 'browser_use' && name !== 'pdf_read')
|
|
1561
1541
|
return {};
|
|
1562
1542
|
const model = agent.activeModelConfig();
|
|
1563
1543
|
if (!model?.vision)
|
|
@@ -1613,8 +1593,8 @@ async function executeNewmarkTool(agent, name, args, inputSchema, signal) {
|
|
|
1613
1593
|
throw abortError();
|
|
1614
1594
|
return result;
|
|
1615
1595
|
};
|
|
1616
|
-
if (name === 'task')
|
|
1617
|
-
return (await agent.handleSubagentEnvelope(args)).output;
|
|
1596
|
+
if (name === 'task' || name === 'subagent_create' || name === 'SubAgent')
|
|
1597
|
+
return (await agent.handleSubagentEnvelope(args, true)).output;
|
|
1618
1598
|
if (name === 'subagent_send')
|
|
1619
1599
|
return (await agent.handleSubagentContinueEnvelope(args)).output;
|
|
1620
1600
|
if (name === 'subagent_list')
|
|
@@ -1722,7 +1702,7 @@ async function executeNewmarkTool(agent, name, args, inputSchema, signal) {
|
|
|
1722
1702
|
actorId: agent.runtimeActorId,
|
|
1723
1703
|
workspaceId: (0, terminalTakeover_1.terminalTakeoverWorkspaceId)(wsDir),
|
|
1724
1704
|
backend: process.env.NEWMARK_WSL_DISTRO ? 'wsl' : (process.platform === 'win32' ? 'windows' : process.platform),
|
|
1725
|
-
allowEphemeralVisionImage: (name === 'computer_use' || name === 'browser_use' || name === 'pdf_read' || name === 'ocr_read')
|
|
1705
|
+
allowEphemeralVisionImage: (name === 'screen_capture' || name === 'computer_use' || name === 'browser_use' || name === 'pdf_read' || name === 'ocr_read')
|
|
1726
1706
|
&& !!agent.activeModelConfig()?.vision,
|
|
1727
1707
|
signal,
|
|
1728
1708
|
});
|
|
@@ -1981,6 +1961,9 @@ exports.agentKernelRunnerInternals = {
|
|
|
1981
1961
|
TOOL_PROVISION_NAME,
|
|
1982
1962
|
INITIAL_TOOL_SCHEMA_LIMIT,
|
|
1983
1963
|
SUBAGENT_CORE_TOOL_NAMES,
|
|
1964
|
+
TASK_CHECKLIST_CORE_TOOL_NAMES,
|
|
1965
|
+
BASIC_INITIAL_TOOL_NAMES,
|
|
1966
|
+
ALWAYS_AVAILABLE_AGENT_TOOL_NAMES,
|
|
1984
1967
|
};
|
|
1985
1968
|
function imagePathToDataUrl(imagePath) {
|
|
1986
1969
|
if (!imagePath || !fs.existsSync(imagePath))
|
package/dist/core/config.js
CHANGED
|
@@ -850,7 +850,7 @@ function defaultConfig() {
|
|
|
850
850
|
auto_archive_on_close: { _description: "Auto archive on close", _type: "boolean", value: true },
|
|
851
851
|
},
|
|
852
852
|
remote: {
|
|
853
|
-
touch_enabled: { _description: "Allow mobile devices to reach this Newmark instance
|
|
853
|
+
touch_enabled: { _description: "Allow mobile devices to reach this Newmark instance on the same LAN / Tailscale network", _type: "boolean", value: true },
|
|
854
854
|
},
|
|
855
855
|
models: {
|
|
856
856
|
providers: { _description: "LLM providers", _type: "array", value: [] },
|
|
@@ -3,6 +3,16 @@ import { AgentMode, AgentWorkEvent, ConversationInputEnvelope, ConversationImage
|
|
|
3
3
|
import { AutomationManager } from './automation';
|
|
4
4
|
import { ConversationRuntimeTarget, NormalizedConversationTarget } from './conversationTarget';
|
|
5
5
|
export type ConversationQueueMode = 'steer' | 'followUp';
|
|
6
|
+
export interface ConversationQueueItemSnapshot {
|
|
7
|
+
id: string;
|
|
8
|
+
text: string;
|
|
9
|
+
queueMode: ConversationQueueMode;
|
|
10
|
+
requestedMode?: string;
|
|
11
|
+
goalObjective?: string;
|
|
12
|
+
runId?: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
}
|
|
15
|
+
export type ConversationQueueAction = 'enqueue' | 'update' | 'delete' | 'toggle_pause' | 'guide';
|
|
6
16
|
export interface AgentPromptMessage {
|
|
7
17
|
text: string;
|
|
8
18
|
/** Public transcript text when the execution prompt contains hidden orchestration instructions. */
|
|
@@ -176,6 +186,33 @@ export declare class ConversationKernel {
|
|
|
176
186
|
steering: string[];
|
|
177
187
|
followUp: string[];
|
|
178
188
|
};
|
|
189
|
+
queueItems(target: ConversationTargetInput): ConversationQueueItemSnapshot[];
|
|
190
|
+
enqueueNext(target: ConversationTargetInput, input: {
|
|
191
|
+
id: string;
|
|
192
|
+
text: string;
|
|
193
|
+
requestedMode?: string;
|
|
194
|
+
goalObjective?: string;
|
|
195
|
+
createdAt?: string;
|
|
196
|
+
}): ConversationQueueItemSnapshot;
|
|
197
|
+
updateQueueItem(target: ConversationTargetInput, idInput: string, textInput: string): ConversationQueueItemSnapshot;
|
|
198
|
+
deleteQueueItem(target: ConversationTargetInput, idInput: string): boolean;
|
|
199
|
+
setQueuePaused(target: ConversationTargetInput, paused: boolean): boolean;
|
|
200
|
+
queueAction(target: ConversationTargetInput, action: ConversationQueueAction, input?: {
|
|
201
|
+
id?: string;
|
|
202
|
+
text?: string;
|
|
203
|
+
requestedMode?: string;
|
|
204
|
+
goalObjective?: string;
|
|
205
|
+
createdAt?: string;
|
|
206
|
+
}): {
|
|
207
|
+
ok: boolean;
|
|
208
|
+
queueItems: ConversationQueueItemSnapshot[];
|
|
209
|
+
queuePaused: boolean;
|
|
210
|
+
queued: {
|
|
211
|
+
steering: string[];
|
|
212
|
+
followUp: string[];
|
|
213
|
+
};
|
|
214
|
+
receipt?: GuideReceipt;
|
|
215
|
+
};
|
|
179
216
|
events(target: ConversationTargetInput): AgentWorkEvent[];
|
|
180
217
|
waitForIdle(target: ConversationTargetInput): Promise<void>;
|
|
181
218
|
pendingOptions(target: ConversationTargetInput): OptionQuestion[] | undefined;
|
|
@@ -185,6 +222,8 @@ export declare class ConversationKernel {
|
|
|
185
222
|
steering: string[];
|
|
186
223
|
followUp: string[];
|
|
187
224
|
};
|
|
225
|
+
queueItems: ConversationQueueItemSnapshot[];
|
|
226
|
+
queuePaused: boolean;
|
|
188
227
|
workEvents: AgentWorkEvent[];
|
|
189
228
|
runtime: ConversationRuntimeState | null;
|
|
190
229
|
mode: Agent['mode'];
|
|
@@ -258,6 +297,7 @@ export declare class ConversationKernel {
|
|
|
258
297
|
private enqueueSameSession;
|
|
259
298
|
private trackQueuedMessage;
|
|
260
299
|
private consumeQueuedMessage;
|
|
300
|
+
private replaceTrackedQueuedMessage;
|
|
261
301
|
private emitQueueUpdate;
|
|
262
302
|
private clearQueued;
|
|
263
303
|
private queueState;
|