Add MindSpace page live edit, chat skills, and H5 deploy tooling.
Introduce page edit sessions with draft preview and patch API, chat skill picker, user memory profile, h5ApiBase resolution, voice WAV transport, and scripts for 105/g2 deployment and Plaza local dev. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+28
-14
@@ -1,5 +1,6 @@
|
||||
import path from 'node:path';
|
||||
import { developerToolsFromPolicy } from './capabilities.mjs';
|
||||
import { buildSessionMemoryEntries } from './user-memory-profile.mjs';
|
||||
import { buildSandboxSessionConstraints } from './user-publish.mjs';
|
||||
|
||||
function extensionName(config) {
|
||||
@@ -72,7 +73,7 @@ async function readJson(upstream) {
|
||||
export async function reconcileAgentSession(
|
||||
apiFetch,
|
||||
sessionId,
|
||||
{ workingDir, sessionPolicy, sandboxConstraints = null },
|
||||
{ workingDir, sessionPolicy, sandboxConstraints = null, userContext = null },
|
||||
) {
|
||||
if (sessionPolicy?.unrestricted) return;
|
||||
|
||||
@@ -143,19 +144,32 @@ export async function reconcileAgentSession(
|
||||
}),
|
||||
);
|
||||
|
||||
if (sandboxConstraints?.trim()) {
|
||||
const sandboxText = buildSandboxSessionConstraints({
|
||||
baseConstraints: sandboxConstraints,
|
||||
developerTools: developerToolsFromPolicy(sessionPolicy),
|
||||
});
|
||||
await apiFetch('/agent/harness_remember', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
sessionId,
|
||||
content: sandboxText,
|
||||
title: 'TKMind 用户空间沙箱',
|
||||
}),
|
||||
});
|
||||
const sandboxText = sandboxConstraints?.trim()
|
||||
? buildSandboxSessionConstraints({
|
||||
baseConstraints: sandboxConstraints,
|
||||
developerTools: developerToolsFromPolicy(sessionPolicy),
|
||||
})
|
||||
: null;
|
||||
|
||||
const memoryEntries = buildSessionMemoryEntries({
|
||||
workingDir,
|
||||
sessionPolicy,
|
||||
sandboxConstraints: sandboxText,
|
||||
userContext,
|
||||
});
|
||||
|
||||
if (memoryEntries.length > 0) {
|
||||
for (const entry of memoryEntries) {
|
||||
if (!entry.content?.trim()) continue;
|
||||
await apiFetch('/agent/harness_remember', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
sessionId,
|
||||
content: entry.content,
|
||||
title: entry.title,
|
||||
}),
|
||||
});
|
||||
}
|
||||
await apiFetch('/agent/harness_bootstrap', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user