dsh-ptc-plus 0.5.1 → 0.5.2
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/README.en.md +7 -3
- package/README.md +7 -3
- package/client.cjs +1467 -84
- package/compiler-core.cjs +132 -132
- package/compiler-core.cjs.map +3 -3
- package/docs/adr/0005-temporary-rejected-cell-edit-transport.md +2 -0
- package/docs/adr/0027-run-the-session-kernel-in-a-killable-helper-process.md +11 -1
- package/docs/adr/0032-own-session-log-facts-in-a-host-only-projection.md +31 -1
- package/docs/adr/0045-customize-model-visible-prompt-text.md +38 -0
- package/docs/adr/0046-gate-the-commit-with-the-semantic-evidence-tier.md +35 -0
- package/docs/adr/0047-store-journal-argument-digests-in-the-projection.md +88 -0
- package/docs/architecture.md +2 -2
- package/docs/client-ui.md +5 -2
- package/docs/durability-design.md +7 -1
- package/docs/releases/v0.5.2.md +79 -0
- package/docs/runtime-reference.md +36 -2
- package/docs/unmeasured-cell-recovery-repair-proposal.md +387 -0
- package/docs/verification.md +6 -2
- package/index.js +36 -15
- package/internal/bounded-literal.js +85 -0
- package/internal/capability-environment.js +162 -10
- package/internal/capability-plan.js +11 -8
- package/internal/cell-error.js +13 -0
- package/internal/config-spec.js +113 -2
- package/internal/direct-surface-owner.js +14 -10
- package/internal/edit-transport-owner.js +79 -14
- package/internal/isolated-worker.js +134 -17
- package/internal/kernel-worker.js +167 -3
- package/internal/legacy-cell-analysis.js +14 -2
- package/internal/legacy-repl-convenience.js +16 -3
- package/internal/projection-retention.js +238 -0
- package/internal/prompt-text.js +858 -0
- package/internal/recovery-tips.js +50 -11
- package/internal/rejected-cell-editor.js +3 -2
- package/internal/runtime-bridge-owner.js +1 -1
- package/internal/runtime-config.js +2 -0
- package/internal/runtime-contexts.js +14 -5
- package/internal/runtime-messages.js +43 -15
- package/internal/session-cell-executor.js +132 -11
- package/internal/session-journal-recovery.js +1009 -99
- package/internal/session-journal-schema.js +7 -5
- package/internal/session-journal.js +177 -14
- package/internal/session-log-view.js +111 -24
- package/internal/session-runtime.js +674 -33
- package/internal/session-state.js +27 -0
- package/internal/stateful-root-compiler.js +11 -0
- package/internal/stateful-root-runtime.js +17 -0
- package/internal/user-binding-console.js +7 -0
- package/internal/user-bindings-owner.js +3 -0
- package/internal/user-bindings.js +2 -2
- package/internal/validated-parse-repair.js +6 -1
- package/internal/worker-client.js +27 -4
- package/package.json +3 -1
- package/src/client-activity.js +24 -4
- package/src/client-capabilities-view.js +459 -24
- package/src/client-copy.js +163 -2
- package/src/client-repl-view.js +6 -1
- package/src/client-styles.js +64 -2
package/client.cjs
CHANGED
|
@@ -1208,6 +1208,582 @@ function changeCapabilityRule(policy, id2, dimension, choice) {
|
|
|
1208
1208
|
return validateCapabilityPolicy(next);
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
|
+
// internal/repl-rewrite-contract.js
|
|
1212
|
+
var MIXED_REDECLARATION_REWRITE = "split a mixed top-level declaration while preserving native pattern initialization";
|
|
1213
|
+
var FUNCTION_REDECLARATION_REWRITE = "reassigned an existing top-level function declaration for REPL continuity";
|
|
1214
|
+
var CLASS_REDECLARATION_REWRITE = "reassigned an existing top-level class declaration for REPL continuity";
|
|
1215
|
+
var LEGACY_DEFAULT_EXPORT_BINDING = "legacy-variable";
|
|
1216
|
+
var LIVE_DEFAULT_EXPORT_BINDING = "live-readonly";
|
|
1217
|
+
var LEGACY_IMPORT_EXPRESSION_BOUNDARY = "legacy";
|
|
1218
|
+
var LIVE_IMPORT_EXPRESSION_BOUNDARY = "statement-safe";
|
|
1219
|
+
var LIVE_MODULE_SEMANTICS = Object.freeze({
|
|
1220
|
+
defaultExportBinding: LIVE_DEFAULT_EXPORT_BINDING,
|
|
1221
|
+
importExpressionBoundary: LIVE_IMPORT_EXPRESSION_BOUNDARY
|
|
1222
|
+
});
|
|
1223
|
+
|
|
1224
|
+
// internal/prompt-text.js
|
|
1225
|
+
var PROMPT_TEXT_SCHEMA = "ptc-prompt-text/v1";
|
|
1226
|
+
var PROMPT_TEXT_MAX_SLOT_BYTES = 4096;
|
|
1227
|
+
var PROMPT_TEXT_MAX_ANCHOR_BYTES = 16384;
|
|
1228
|
+
var PROMPT_TEXT_MAX_DOCUMENT_BYTES = 65536;
|
|
1229
|
+
var PROMPT_CHANNELS = Object.freeze(["prompt", "install", "plan", "runtime", "result"]);
|
|
1230
|
+
var PROMPT_SLOT_KINDS = Object.freeze(["literal", "aggregate", "projected"]);
|
|
1231
|
+
var PROMPT_REASON_CODES = Object.freeze([
|
|
1232
|
+
"fact-derived",
|
|
1233
|
+
"aggregate-frozen",
|
|
1234
|
+
"protocol-exact-text",
|
|
1235
|
+
"protocol-structural",
|
|
1236
|
+
"shadows-host",
|
|
1237
|
+
"other-owner"
|
|
1238
|
+
]);
|
|
1239
|
+
var STATE_PREFIX = "PTC Plus recovery status. Replaces earlier PTC recovery status, including PTC state in runtime-context snapshots. Global binding APIs are unchanged.";
|
|
1240
|
+
var PREVIOUS_STATE_PREFIX = "PTC Plus runtime recovery state. This replaces only earlier PTC state snapshots and PTC sections in historical aggregate snapshots; it does not replace the global binding API catalog, tasks, Skill instructions, tool results, or other producers.";
|
|
1241
|
+
var LEGACY_STATE_PREFIX = "PTC Plus current state. This replaces only earlier PTC state snapshots and PTC sections in historical aggregate snapshots; it does not replace tasks, Skill instructions, tool results, or other producers.";
|
|
1242
|
+
var CATALOG_PREFIX = "Global binding API reference for run_code (replaces the previous global binding reference):";
|
|
1243
|
+
var EMPTY_CATALOG = "No entries documented.";
|
|
1244
|
+
var TIP_BODY = "Inspect bounded runtime facts with {platformFacts}, then choose the executable and path in the current execution world. Use direct argv or a shell only when required; do not assume Windows, WSL, POSIX, or one shell. Do not dump process.env.";
|
|
1245
|
+
var TIP_BODY_PLATFORM_DETAILED = "Re-check the active execution world and the actual executable before retrying. First inspect bounded runtime facts with {platformFacts}; use the result to choose the executable and path. Use direct argv for a normal executable; use a shell only when its syntax or resolution is required. Windows, WSL, POSIX, and package shims have different paths and launch rules. Do not dump process.env.";
|
|
1246
|
+
var TIP_BODY_REPEATED_BINDING = "Inspect the visible cell source and results for the local name, scope, initialization, or declaration conflict. Correct that expression before continuing; capability discovery does not list session-local variables.{detail}";
|
|
1247
|
+
var TIP_BODY_REPEATED_BINDING_CAPABILITY = "Inspect the live request with `capabilities.tree()`, `capabilities.find()`, or `capabilities.inspect()`, then call the typed member through `tools.*`.{detail}";
|
|
1248
|
+
var TIP_DETAIL_BINDING = " Earlier statements may have run; use current expression evidence without assuming a failed declaration initialized its binding.";
|
|
1249
|
+
var TIP_DETAIL_CAPABILITY = " Do not invent hidden bindings or repeat the same failing expression.";
|
|
1250
|
+
var TIP_PREFIX_REPEATED_BINDING = "The same binding failure has recurred.";
|
|
1251
|
+
var TIP_PREFIX_PLATFORM_COMMAND = "An executable, shell, or path failed in the current execution world.";
|
|
1252
|
+
var PLAN_NAVIGATION = "Use capabilities.search({query}) to retrieve complete tool, Skill and MCP contracts. Unlisted capabilities remain discoverable. Skill descriptions are summaries; follow each Skill's declared invocation eligibility to load its body before following it.";
|
|
1253
|
+
var PLAN_CATEGORY_LINES = Object.freeze({
|
|
1254
|
+
tool: "Tools: search by task or tools.<name> for parameters and results.",
|
|
1255
|
+
skill: "Skills: search by task or skills.<name> for when to use and how to load instructions.",
|
|
1256
|
+
resource: "MCP resources: search by server or resource purpose.",
|
|
1257
|
+
"resource-template": "MCP templates: search by server or resource purpose.",
|
|
1258
|
+
task: "Tasks: search by the operation you need."
|
|
1259
|
+
});
|
|
1260
|
+
var PLAN_OVERAGE = "Explicit full contracts exceed the configured budget by {overageBytes} UTF-8 bytes.";
|
|
1261
|
+
var RESULT_ENVELOPE = "output exceeded {maxOutputBytes} bytes; this cell was discarded and the worker reset. Only bindings in the verified recovery frontier can be restored. External effects may already have occurred and are not undone. For future cells, bound console output and return a smaller value; do not assume this cell's values remain available.";
|
|
1262
|
+
var GUIDANCE_OPENING = "`run_code` continues one persistent PTC REPL. Use Node.js modules in the cell; use external processes when their environment is needed. Ordinary top-level bindings remain available to later cells, so reuse them instead of resending setup code. Choose the smallest cell that answers the request and return only the value the next step needs.";
|
|
1263
|
+
var GUIDANCE_ERROR_RECOVERY = "After an execution error, earlier statements may have taken effect. Inspect relevant values in a short cell, then continue from them; repeat external operations only when their retry rules and current results establish safety. `edit_run_code` edits and reruns a complete cell.";
|
|
1264
|
+
var GUIDANCE_CELL_CONVENTIONS = "## Cell conventions\nUse `return` for an explicit result and `console` for logs. Return supported values directly, including undefined, NaN, infinities, -0 and BigInt; JSON.stringify loses distinctions or rejects BigInt. Do not mix BigInt with Number arithmetic; use a BigInt literal or convert explicitly. Keep functions, Date, Map and other unsupported values in bindings; return needed data or type observations. Native `tools.*` arguments must satisfy their own JSON schemas; PTC value transport does not widen those contracts. Keep large inspection results in bindings or reduce them to targeted excerpts: `tools.read` is bounded inspection, not a lossless whole-file reader. Relative filesystem, path and default child-process operations use the current working directory at the time they run; a successful in-cell `tools.working_directory({ cd })` applies to the rest of that cell, while cell imports and `import.meta` keep the directory the cell started in, and `process.chdir` is unavailable.";
|
|
1265
|
+
var GUIDANCE_CAPABILITIES = "## Available capabilities\nUse `capabilities.tree()`, `capabilities.find()`, and `capabilities.inspect()` for unfamiliar program APIs; Reserve `code.run` for isolated execution of source held as data.\nProgram API references expire when their cell ends. Reusable helpers must read the current namespace when called, for example `async function readNow(args) { return tools.read(args) }`, instead of retaining an earlier `tools` object or method. Completed-cell callbacks cannot call program APIs.";
|
|
1266
|
+
var GUIDANCE_EXECUTION_WORLD = "Native tool availability depends on the current DSH profile and execution world; inspect executables, shells, and paths instead of assuming Windows, WSL, POSIX, or a particular shell.";
|
|
1267
|
+
var RUN_CODE_TOOL_DESCRIPTION = "Evaluate the next TypeScript cell in this session-bound persistent REPL, reusing earlier top-level bindings. Use `code` for the cell and `description` for its short UI summary. Successful image-bearing subtool results are attached after the cell.";
|
|
1268
|
+
var RUN_CODE_CODE_DESCRIPTION = "Code for the next PTC TypeScript cell, following the selected language conventions.";
|
|
1269
|
+
var RUN_CODE_DESCRIPTION_DESCRIPTION = "Short active-voice summary of what this cell does, 5-10 words (shown in the UI).";
|
|
1270
|
+
var EDIT_RUN_CODE_DESCRIPTION = "Call this from within a run_code cell. It accepts an edit of the most recent eligible cell captured at nested dispatch and returns { accepted, scheduled, target_call_seq } when scheduled. The corrected cell runs after the current run_code cell releases its worker; its result is reported with that cell, and a successful edit becomes the next target. This reruns the entire target cell, including prior effects; use it after pre-execution rejection or when repeating those effects is safe under the called API's retry rules. Otherwise continue in a new run_code cell using retained values. A diagnostic may supply a localized correction; use it when it matches your intent and preserve its expected_target_call_seq. Send exactly one edits or regex_edits array: edits replaces unique literal fragments; regex_edits replaces a counted set of pattern matches. All ranges must be non-overlapping in the original cell. Regex replacements use JavaScript $1/$<name> captures, not \\1.";
|
|
1271
|
+
var USER_BINDINGS_ENTRY_LABEL = "Binding";
|
|
1272
|
+
function editableSlot(id2, kind, omittable, defaultText) {
|
|
1273
|
+
if (!PROMPT_SLOT_KINDS.includes(kind)) throw new TypeError(`ptc-plus: unknown prompt slot kind ${kind} (${id2})`);
|
|
1274
|
+
return Object.freeze({
|
|
1275
|
+
id: id2,
|
|
1276
|
+
kind,
|
|
1277
|
+
owner: "A",
|
|
1278
|
+
level: "prose",
|
|
1279
|
+
reason: null,
|
|
1280
|
+
omittable,
|
|
1281
|
+
defaultText,
|
|
1282
|
+
source: "registry-literal"
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
function readOnlySlot(id2, kind, reason, { source, defaultText = null, omittable = false, owner = "B" }) {
|
|
1286
|
+
if (!PROMPT_SLOT_KINDS.includes(kind)) throw new TypeError(`ptc-plus: unknown prompt slot kind ${kind} (${id2})`);
|
|
1287
|
+
if (!PROMPT_REASON_CODES.includes(reason)) throw new TypeError(`ptc-plus: unknown prompt reason code ${reason}`);
|
|
1288
|
+
if (owner !== "B" && owner !== "C") throw new TypeError(`ptc-plus: read-only slot ${id2} must belong to B or C`);
|
|
1289
|
+
return Object.freeze({
|
|
1290
|
+
id: id2,
|
|
1291
|
+
kind,
|
|
1292
|
+
owner,
|
|
1293
|
+
level: "protocol",
|
|
1294
|
+
reason,
|
|
1295
|
+
omittable,
|
|
1296
|
+
defaultText,
|
|
1297
|
+
source
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
function aggregateSlot(id2, items) {
|
|
1301
|
+
return Object.freeze({
|
|
1302
|
+
id: id2,
|
|
1303
|
+
kind: "aggregate",
|
|
1304
|
+
owner: "B",
|
|
1305
|
+
level: "protocol",
|
|
1306
|
+
reason: "aggregate-frozen",
|
|
1307
|
+
omittable: false,
|
|
1308
|
+
defaultText: null,
|
|
1309
|
+
source: "registry-set",
|
|
1310
|
+
items: Object.freeze(items)
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
var PROMPT_ANCHORS = Object.freeze([
|
|
1314
|
+
Object.freeze({
|
|
1315
|
+
id: "tools:ptc-plus-repl",
|
|
1316
|
+
channel: "prompt",
|
|
1317
|
+
wired: true,
|
|
1318
|
+
presence: "run_code \u5DF2\u6CE8\u518C",
|
|
1319
|
+
slots: Object.freeze([
|
|
1320
|
+
editableSlot("guidance.opening", "literal", false, GUIDANCE_OPENING),
|
|
1321
|
+
editableSlot("guidance.errorRecovery", "literal", true, GUIDANCE_ERROR_RECOVERY),
|
|
1322
|
+
editableSlot("guidance.cellConventions", "literal", true, GUIDANCE_CELL_CONVENTIONS),
|
|
1323
|
+
editableSlot("guidance.capabilities", "literal", true, GUIDANCE_CAPABILITIES),
|
|
1324
|
+
editableSlot("guidance.executionWorld", "literal", true, GUIDANCE_EXECUTION_WORLD),
|
|
1325
|
+
readOnlySlot("guidance.derivedPolicy", "projected", "fact-derived", {
|
|
1326
|
+
source: "internal/binding-update-policy.js guidancePolicies()"
|
|
1327
|
+
})
|
|
1328
|
+
])
|
|
1329
|
+
}),
|
|
1330
|
+
Object.freeze({
|
|
1331
|
+
id: "tools:ptc-plus-user-binding-defaults",
|
|
1332
|
+
channel: "prompt",
|
|
1333
|
+
wired: true,
|
|
1334
|
+
presence: "\u5168\u5C40\u7ED1\u5B9A\u542F\u7528",
|
|
1335
|
+
slots: Object.freeze([
|
|
1336
|
+
editableSlot("userBindings.entryLabel", "literal", false, USER_BINDINGS_ENTRY_LABEL),
|
|
1337
|
+
readOnlySlot("userBindings.entryInstructions", "literal", "other-owner", {
|
|
1338
|
+
owner: "C",
|
|
1339
|
+
source: "internal/user-bindings.js (entry instructions supplied by the user)"
|
|
1340
|
+
})
|
|
1341
|
+
])
|
|
1342
|
+
}),
|
|
1343
|
+
Object.freeze({
|
|
1344
|
+
id: "run_code",
|
|
1345
|
+
channel: "prompt",
|
|
1346
|
+
wired: true,
|
|
1347
|
+
presence: "\u6BCF\u6B21\u8BF7\u6C42",
|
|
1348
|
+
slots: Object.freeze([
|
|
1349
|
+
editableSlot("runCode.description", "literal", false, RUN_CODE_TOOL_DESCRIPTION),
|
|
1350
|
+
editableSlot("runCode.codeArg", "literal", false, RUN_CODE_CODE_DESCRIPTION),
|
|
1351
|
+
editableSlot("runCode.descriptionArg", "literal", false, RUN_CODE_DESCRIPTION_DESCRIPTION)
|
|
1352
|
+
])
|
|
1353
|
+
}),
|
|
1354
|
+
Object.freeze({
|
|
1355
|
+
id: "edit_run_code",
|
|
1356
|
+
channel: "install",
|
|
1357
|
+
wired: true,
|
|
1358
|
+
presence: "\u4E0B\u4E00\u6B21 agent \u5B89\u88C5",
|
|
1359
|
+
slots: Object.freeze([
|
|
1360
|
+
editableSlot("editRunCode.description", "literal", false, EDIT_RUN_CODE_DESCRIPTION)
|
|
1361
|
+
])
|
|
1362
|
+
}),
|
|
1363
|
+
Object.freeze({
|
|
1364
|
+
id: "binding-catalog",
|
|
1365
|
+
channel: "runtime",
|
|
1366
|
+
wired: true,
|
|
1367
|
+
presence: "\u6709\u7ED1\u5B9A\u6761\u76EE",
|
|
1368
|
+
slots: Object.freeze([
|
|
1369
|
+
readOnlySlot("catalog.prefix", "literal", "protocol-exact-text", { source: "registry-literal", defaultText: CATALOG_PREFIX }),
|
|
1370
|
+
editableSlot("catalog.empty", "literal", false, EMPTY_CATALOG),
|
|
1371
|
+
// The previous-generation empty sentence is historical wording, not delivered
|
|
1372
|
+
// text: no composer emits it, and `HISTORICAL_EMPTY_CATALOGS` keeps it readable
|
|
1373
|
+
// for records written by another version. It is therefore deliberately not a
|
|
1374
|
+
// slot — an editable slot nobody delivers would inflate the accounting.
|
|
1375
|
+
readOnlySlot("catalog.entryInstructions", "literal", "other-owner", {
|
|
1376
|
+
owner: "C",
|
|
1377
|
+
source: "internal/user-bindings.js (entry instructions supplied by the user)"
|
|
1378
|
+
})
|
|
1379
|
+
])
|
|
1380
|
+
}),
|
|
1381
|
+
Object.freeze({
|
|
1382
|
+
id: "tools:sdk#capability-appendix",
|
|
1383
|
+
channel: "prompt",
|
|
1384
|
+
wired: false,
|
|
1385
|
+
presence: "\u80FD\u529B\u7BA1\u7406\u542F\u7528",
|
|
1386
|
+
slots: Object.freeze([
|
|
1387
|
+
readOnlySlot("capabilities.appendixProse", "literal", "shadows-host", {
|
|
1388
|
+
source: "internal/direct-surface-owner.js capabilitySdk()"
|
|
1389
|
+
}),
|
|
1390
|
+
readOnlySlot("capabilities.declarations", "literal", "protocol-structural", {
|
|
1391
|
+
source: "internal/direct-surface-owner.js capabilitySdk() declare block"
|
|
1392
|
+
})
|
|
1393
|
+
])
|
|
1394
|
+
}),
|
|
1395
|
+
Object.freeze({
|
|
1396
|
+
id: "plan.navigation",
|
|
1397
|
+
channel: "plan",
|
|
1398
|
+
wired: true,
|
|
1399
|
+
presence: "\u65B0\u4F1A\u8BDD\u6216 /capabilities refresh",
|
|
1400
|
+
slots: Object.freeze([
|
|
1401
|
+
editableSlot("plan.navigationSentence", "literal", false, PLAN_NAVIGATION)
|
|
1402
|
+
])
|
|
1403
|
+
}),
|
|
1404
|
+
Object.freeze({
|
|
1405
|
+
id: "plan.categories",
|
|
1406
|
+
channel: "plan",
|
|
1407
|
+
wired: true,
|
|
1408
|
+
presence: "\u65B0\u4F1A\u8BDD\u6216 /capabilities refresh",
|
|
1409
|
+
slots: Object.freeze([
|
|
1410
|
+
aggregateSlot("plan.categories.set", Object.keys(PLAN_CATEGORY_LINES).map((category) => `plan.category.${category}`)),
|
|
1411
|
+
...Object.entries(PLAN_CATEGORY_LINES).map(([category, line]) => editableSlot(`plan.category.${category}`, "literal", false, line))
|
|
1412
|
+
])
|
|
1413
|
+
}),
|
|
1414
|
+
Object.freeze({
|
|
1415
|
+
id: "plan.overage",
|
|
1416
|
+
channel: "plan",
|
|
1417
|
+
wired: true,
|
|
1418
|
+
presence: "\u9884\u7B97\u8D85\u9650\u65F6",
|
|
1419
|
+
slots: Object.freeze([
|
|
1420
|
+
editableSlot("plan.overageSentence", "projected", false, PLAN_OVERAGE)
|
|
1421
|
+
])
|
|
1422
|
+
}),
|
|
1423
|
+
Object.freeze({
|
|
1424
|
+
id: "runtime.recovery-snapshot",
|
|
1425
|
+
channel: "runtime",
|
|
1426
|
+
wired: true,
|
|
1427
|
+
presence: "\u6062\u590D\u4EE3\u9645\u89E6\u53D1",
|
|
1428
|
+
slots: Object.freeze([
|
|
1429
|
+
readOnlySlot("recovery.snapshotPrefix", "literal", "protocol-exact-text", { source: "registry-literal", defaultText: STATE_PREFIX }),
|
|
1430
|
+
readOnlySlot("recovery.previousStatePrefix", "literal", "protocol-exact-text", { source: "registry-literal", defaultText: PREVIOUS_STATE_PREFIX }),
|
|
1431
|
+
readOnlySlot("recovery.legacyStatePrefix", "literal", "protocol-exact-text", { source: "registry-literal", defaultText: LEGACY_STATE_PREFIX })
|
|
1432
|
+
])
|
|
1433
|
+
}),
|
|
1434
|
+
Object.freeze({
|
|
1435
|
+
id: "runtime.tip",
|
|
1436
|
+
channel: "runtime",
|
|
1437
|
+
wired: true,
|
|
1438
|
+
presence: "\u89E6\u53D1\u547D\u4E2D",
|
|
1439
|
+
slots: Object.freeze([
|
|
1440
|
+
editableSlot("tip.body.platform", "projected", false, TIP_BODY),
|
|
1441
|
+
editableSlot("tip.body.platformDetailed", "projected", false, TIP_BODY_PLATFORM_DETAILED),
|
|
1442
|
+
editableSlot("tip.body.repeatedBinding", "projected", false, TIP_BODY_REPEATED_BINDING),
|
|
1443
|
+
editableSlot("tip.body.repeatedBindingCapability", "projected", false, TIP_BODY_REPEATED_BINDING_CAPABILITY),
|
|
1444
|
+
readOnlySlot("tip.prefix.repeatedBinding", "literal", "protocol-structural", {
|
|
1445
|
+
source: "registry-literal",
|
|
1446
|
+
defaultText: TIP_PREFIX_REPEATED_BINDING
|
|
1447
|
+
}),
|
|
1448
|
+
readOnlySlot("tip.prefix.platformCommand", "literal", "protocol-structural", {
|
|
1449
|
+
source: "registry-literal",
|
|
1450
|
+
defaultText: TIP_PREFIX_PLATFORM_COMMAND
|
|
1451
|
+
}),
|
|
1452
|
+
// The detail sentences fill the body's `{detail}` hole when a failure escalates.
|
|
1453
|
+
// Escalation stays a code decision; the sentences are registered so their bytes
|
|
1454
|
+
// are accounted and claimed rather than silently delivered outside the registry.
|
|
1455
|
+
readOnlySlot("tip.detail.binding", "projected", "fact-derived", {
|
|
1456
|
+
source: "registry-literal",
|
|
1457
|
+
defaultText: TIP_DETAIL_BINDING
|
|
1458
|
+
}),
|
|
1459
|
+
readOnlySlot("tip.detail.capability", "projected", "fact-derived", {
|
|
1460
|
+
source: "registry-literal",
|
|
1461
|
+
defaultText: TIP_DETAIL_CAPABILITY
|
|
1462
|
+
})
|
|
1463
|
+
])
|
|
1464
|
+
}),
|
|
1465
|
+
Object.freeze({
|
|
1466
|
+
id: "result.rewrite-feedback",
|
|
1467
|
+
channel: "result",
|
|
1468
|
+
wired: true,
|
|
1469
|
+
presence: "\u6539\u5199\u53D1\u751F",
|
|
1470
|
+
slots: Object.freeze([
|
|
1471
|
+
editableSlot("rewrite.mixed", "literal", false, MIXED_REDECLARATION_REWRITE),
|
|
1472
|
+
editableSlot("rewrite.function", "literal", false, FUNCTION_REDECLARATION_REWRITE),
|
|
1473
|
+
editableSlot("rewrite.class", "literal", false, CLASS_REDECLARATION_REWRITE)
|
|
1474
|
+
])
|
|
1475
|
+
}),
|
|
1476
|
+
Object.freeze({
|
|
1477
|
+
id: "result.diagnostics-and-budget",
|
|
1478
|
+
channel: "result",
|
|
1479
|
+
wired: true,
|
|
1480
|
+
presence: "\u5931\u8D25\u6216\u8D85\u9650",
|
|
1481
|
+
slots: Object.freeze([
|
|
1482
|
+
readOnlySlot("result.diagnosticsProse", "literal", "fact-derived", {
|
|
1483
|
+
source: "internal/recovery-tips.js advice and budget prose"
|
|
1484
|
+
}),
|
|
1485
|
+
readOnlySlot("result.diagnosticsCodes", "literal", "protocol-structural", {
|
|
1486
|
+
source: "internal/session-journal-schema.js PTC-* codes and help structure"
|
|
1487
|
+
}),
|
|
1488
|
+
// The envelope template is measured (the plugin writes every byte of it)
|
|
1489
|
+
// but not writable: the recognizer reads the byte count it reports.
|
|
1490
|
+
readOnlySlot("result.envelope", "projected", "fact-derived", {
|
|
1491
|
+
source: "registry-literal",
|
|
1492
|
+
defaultText: RESULT_ENVELOPE
|
|
1493
|
+
})
|
|
1494
|
+
])
|
|
1495
|
+
})
|
|
1496
|
+
]);
|
|
1497
|
+
var PROMPT_SLOTS = Object.freeze(PROMPT_ANCHORS.flatMap((anchor) => anchor.slots));
|
|
1498
|
+
var slotConstantName = (id2) => id2.replace(/[.:-]+(.)?/gu, (_, next) => (next ?? "").toUpperCase());
|
|
1499
|
+
var PROMPT_SLOT_IDS = Object.freeze(Object.fromEntries(
|
|
1500
|
+
PROMPT_SLOTS.filter((slot) => slot.source === "registry-literal").map((slot) => [slotConstantName(slot.id), slot.id])
|
|
1501
|
+
));
|
|
1502
|
+
var PROMPT_ASSETS = PROMPT_SLOTS;
|
|
1503
|
+
var ANCHORS_BY_ID = new Map(PROMPT_ANCHORS.map((anchor) => [anchor.id, anchor]));
|
|
1504
|
+
var SLOTS_BY_ID = new Map(PROMPT_SLOTS.map((slot) => [slot.id, slot]));
|
|
1505
|
+
var ANCHOR_OF_SLOT = new Map(PROMPT_ANCHORS.flatMap((anchor) => anchor.slots.map((slot) => [slot.id, anchor.id])));
|
|
1506
|
+
var PROMPT_TEXT_DEFAULT = JSON.stringify({ schema: PROMPT_TEXT_SCHEMA, overrides: {} });
|
|
1507
|
+
var PROMPT_COMPOSER_FILES = Object.freeze([
|
|
1508
|
+
"index.js",
|
|
1509
|
+
"internal/direct-surface-owner.js",
|
|
1510
|
+
"internal/edit-transport-owner.js",
|
|
1511
|
+
"internal/capability-plan.js",
|
|
1512
|
+
"internal/capability-environment.js",
|
|
1513
|
+
"internal/runtime-messages.js",
|
|
1514
|
+
"internal/recovery-tips.js"
|
|
1515
|
+
]);
|
|
1516
|
+
function promptSlot(id2) {
|
|
1517
|
+
const slot = SLOTS_BY_ID.get(id2);
|
|
1518
|
+
if (slot === void 0) throw new TypeError(`ptc-plus: unknown prompt slot ${id2}`);
|
|
1519
|
+
return slot;
|
|
1520
|
+
}
|
|
1521
|
+
var byteLength = (value) => new TextEncoder().encode(value).length;
|
|
1522
|
+
var holeTokens = (text) => typeof text === "string" ? text.match(/\{[a-zA-Z][a-zA-Z0-9]*\}/gu) ?? [] : [];
|
|
1523
|
+
function effectiveBytes(slot, overrides2) {
|
|
1524
|
+
const text = overrides2.has(slot.id) ? overrides2.get(slot.id) : slot.defaultText;
|
|
1525
|
+
return typeof text === "string" ? byteLength(text) : 0;
|
|
1526
|
+
}
|
|
1527
|
+
function sumEffectiveBytes(overrides2) {
|
|
1528
|
+
let total = 0;
|
|
1529
|
+
for (const slot of PROMPT_SLOTS) total += effectiveBytes(slot, overrides2);
|
|
1530
|
+
return total;
|
|
1531
|
+
}
|
|
1532
|
+
function unknownOverrideBytes(overrides2) {
|
|
1533
|
+
let total = 0;
|
|
1534
|
+
for (const [id2, text] of overrides2) {
|
|
1535
|
+
if (SLOTS_BY_ID.has(id2)) continue;
|
|
1536
|
+
total += byteLength(text);
|
|
1537
|
+
}
|
|
1538
|
+
return total;
|
|
1539
|
+
}
|
|
1540
|
+
function isRecord2(value) {
|
|
1541
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1542
|
+
}
|
|
1543
|
+
function parsePromptTextDocument(value) {
|
|
1544
|
+
if (typeof value !== "string") throw new TypeError("ptc-plus: promptText must be a JSON string");
|
|
1545
|
+
let parsed;
|
|
1546
|
+
try {
|
|
1547
|
+
parsed = JSON.parse(value);
|
|
1548
|
+
} catch {
|
|
1549
|
+
throw new TypeError("ptc-plus: promptText must contain valid JSON");
|
|
1550
|
+
}
|
|
1551
|
+
if (!isRecord2(parsed) || parsed.schema !== PROMPT_TEXT_SCHEMA || !isRecord2(parsed.overrides)) {
|
|
1552
|
+
throw new TypeError(`ptc-plus: promptText must be a ${PROMPT_TEXT_SCHEMA} document with an overrides object`);
|
|
1553
|
+
}
|
|
1554
|
+
for (const [id2, text] of Object.entries(parsed.overrides)) {
|
|
1555
|
+
if (!id2.trim()) throw new TypeError("ptc-plus: promptText override ids must not be empty");
|
|
1556
|
+
if (typeof text !== "string") throw new TypeError(`ptc-plus: promptText override ${id2} must be a string`);
|
|
1557
|
+
}
|
|
1558
|
+
return parsed;
|
|
1559
|
+
}
|
|
1560
|
+
function validatePromptTextDocument(value) {
|
|
1561
|
+
const parsed = parsePromptTextDocument(value);
|
|
1562
|
+
const overrides2 = /* @__PURE__ */ new Map();
|
|
1563
|
+
for (const [id2, text] of Object.entries(parsed.overrides)) {
|
|
1564
|
+
const slot = SLOTS_BY_ID.get(id2);
|
|
1565
|
+
if (slot === void 0) {
|
|
1566
|
+
overrides2.set(id2, text);
|
|
1567
|
+
continue;
|
|
1568
|
+
}
|
|
1569
|
+
if (slot.owner !== "A") {
|
|
1570
|
+
throw new TypeError(`ptc-plus: promptText slot ${id2} is read-only (${slot.reason}); its bytes belong to another owner`);
|
|
1571
|
+
}
|
|
1572
|
+
const bytes = byteLength(text);
|
|
1573
|
+
if (bytes > PROMPT_TEXT_MAX_SLOT_BYTES) {
|
|
1574
|
+
throw new TypeError(`ptc-plus: promptText slot ${id2} would deliver ${bytes} bytes, over the ${PROMPT_TEXT_MAX_SLOT_BYTES} byte slot limit`);
|
|
1575
|
+
}
|
|
1576
|
+
if (text.trim().length === 0 && !slot.omittable) {
|
|
1577
|
+
throw new TypeError(`ptc-plus: promptText slot ${id2} must not be empty`);
|
|
1578
|
+
}
|
|
1579
|
+
if (slot.kind === "projected") {
|
|
1580
|
+
for (const hole of holeTokens(slot.defaultText)) {
|
|
1581
|
+
if (text.split(hole).length - 1 !== 1) {
|
|
1582
|
+
throw new TypeError(`ptc-plus: promptText slot ${id2} must keep exactly one ${hole} placeholder`);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
overrides2.set(id2, text);
|
|
1587
|
+
}
|
|
1588
|
+
for (const anchor of PROMPT_ANCHORS) {
|
|
1589
|
+
let total = 0;
|
|
1590
|
+
for (const slot of anchor.slots) {
|
|
1591
|
+
total += effectiveBytes(slot, overrides2);
|
|
1592
|
+
if (total > PROMPT_TEXT_MAX_ANCHOR_BYTES) {
|
|
1593
|
+
throw new TypeError(`ptc-plus: promptText anchor ${anchor.id} would deliver ${total} bytes, over the ${PROMPT_TEXT_MAX_ANCHOR_BYTES} byte anchor limit (at slot ${slot.id})`);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
let document2 = sumEffectiveBytes(overrides2) + unknownOverrideBytes(overrides2);
|
|
1598
|
+
if (document2 > PROMPT_TEXT_MAX_DOCUMENT_BYTES) {
|
|
1599
|
+
throw new TypeError(`ptc-plus: promptText would deliver ${document2} bytes, over the ${PROMPT_TEXT_MAX_DOCUMENT_BYTES} byte document limit`);
|
|
1600
|
+
}
|
|
1601
|
+
return parsed;
|
|
1602
|
+
}
|
|
1603
|
+
function resolvePromptText(value) {
|
|
1604
|
+
const overrides2 = /* @__PURE__ */ new Map();
|
|
1605
|
+
const reported = [];
|
|
1606
|
+
if (value !== void 0 && typeof value !== "string") {
|
|
1607
|
+
reported.push({ slotId: void 0, anchorId: void 0, reason: "invalid-document-type" });
|
|
1608
|
+
return freezeResolved(overrides2, reported);
|
|
1609
|
+
}
|
|
1610
|
+
let parsed;
|
|
1611
|
+
try {
|
|
1612
|
+
parsed = parsePromptTextDocument(value ?? PROMPT_TEXT_DEFAULT);
|
|
1613
|
+
} catch (error) {
|
|
1614
|
+
reported.push({ slotId: void 0, anchorId: void 0, reason: error.message });
|
|
1615
|
+
return freezeResolved(overrides2, reported);
|
|
1616
|
+
}
|
|
1617
|
+
const anchorTotals = /* @__PURE__ */ new Map();
|
|
1618
|
+
let document2 = 0;
|
|
1619
|
+
for (const [id2, text] of Object.entries(parsed.overrides)) {
|
|
1620
|
+
const bytes = byteLength(text);
|
|
1621
|
+
const slot = SLOTS_BY_ID.get(id2);
|
|
1622
|
+
if (slot === void 0) {
|
|
1623
|
+
document2 += bytes;
|
|
1624
|
+
reported.push({ slotId: id2, anchorId: void 0, reason: "unknown-slot" });
|
|
1625
|
+
continue;
|
|
1626
|
+
}
|
|
1627
|
+
const anchorId = ANCHOR_OF_SLOT.get(id2);
|
|
1628
|
+
if (slot.owner !== "A") {
|
|
1629
|
+
reported.push({ slotId: id2, anchorId, reason: "not-writable" });
|
|
1630
|
+
continue;
|
|
1631
|
+
}
|
|
1632
|
+
if (bytes > PROMPT_TEXT_MAX_SLOT_BYTES) {
|
|
1633
|
+
reported.push({ slotId: id2, anchorId, reason: "slot-exceeds-limit" });
|
|
1634
|
+
continue;
|
|
1635
|
+
}
|
|
1636
|
+
if (text.trim().length === 0 && !slot.omittable) {
|
|
1637
|
+
reported.push({ slotId: id2, anchorId, reason: "required-slot-empty" });
|
|
1638
|
+
continue;
|
|
1639
|
+
}
|
|
1640
|
+
if (slot.kind === "projected") {
|
|
1641
|
+
const holes = holeTokens(slot.defaultText ?? "");
|
|
1642
|
+
const kept = holes.filter((hole) => text.includes(hole));
|
|
1643
|
+
const duplicates = kept.some((hole) => text.split(hole).length - 1 > 1);
|
|
1644
|
+
if (holes.length > 0 && (kept.length !== holes.length || duplicates)) {
|
|
1645
|
+
reported.push({ slotId: id2, anchorId, reason: "missing-hole" });
|
|
1646
|
+
continue;
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
const total = (anchorTotals.get(anchorId) ?? 0) + bytes;
|
|
1650
|
+
if (total > PROMPT_TEXT_MAX_ANCHOR_BYTES) {
|
|
1651
|
+
reported.push({ slotId: id2, anchorId, reason: "anchor-exceeds-limit" });
|
|
1652
|
+
continue;
|
|
1653
|
+
}
|
|
1654
|
+
anchorTotals.set(anchorId, total);
|
|
1655
|
+
overrides2.set(id2, text);
|
|
1656
|
+
document2 += bytes;
|
|
1657
|
+
}
|
|
1658
|
+
if (document2 > PROMPT_TEXT_MAX_DOCUMENT_BYTES) {
|
|
1659
|
+
reported.push({ slotId: void 0, anchorId: void 0, reason: "document-exceeds-limit" });
|
|
1660
|
+
overrides2.clear();
|
|
1661
|
+
}
|
|
1662
|
+
enforceEffectiveCeilings(overrides2, reported);
|
|
1663
|
+
return freezeResolved(overrides2, reported);
|
|
1664
|
+
}
|
|
1665
|
+
function enforceEffectiveCeilings(overrides2, reported) {
|
|
1666
|
+
for (const anchor of PROMPT_ANCHORS) {
|
|
1667
|
+
const overridden = anchor.slots.filter((slot) => overrides2.has(slot.id));
|
|
1668
|
+
if (overridden.length === 0) continue;
|
|
1669
|
+
const total = anchor.slots.reduce((sum, slot) => sum + effectiveBytes(slot, overrides2), 0);
|
|
1670
|
+
if (total <= PROMPT_TEXT_MAX_ANCHOR_BYTES) continue;
|
|
1671
|
+
for (const slot of overridden) {
|
|
1672
|
+
reported.push({ slotId: slot.id, anchorId: anchor.id, reason: "anchor-exceeds-limit" });
|
|
1673
|
+
overrides2.delete(slot.id);
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
if (sumEffectiveBytes(overrides2) + unknownOverrideBytes(overrides2) <= PROMPT_TEXT_MAX_DOCUMENT_BYTES) return;
|
|
1677
|
+
for (const id2 of [...overrides2.keys()]) {
|
|
1678
|
+
reported.push({ slotId: id2, anchorId: ANCHOR_OF_SLOT.get(id2), reason: "document-exceeds-limit" });
|
|
1679
|
+
}
|
|
1680
|
+
overrides2.clear();
|
|
1681
|
+
}
|
|
1682
|
+
function freezeResolved(overrides2, reported) {
|
|
1683
|
+
const text = (id2) => {
|
|
1684
|
+
const slot = promptSlot(id2);
|
|
1685
|
+
if (overrides2.has(id2)) return overrides2.get(id2);
|
|
1686
|
+
return slot.defaultText;
|
|
1687
|
+
};
|
|
1688
|
+
return Object.freeze({
|
|
1689
|
+
text,
|
|
1690
|
+
omitted: (id2) => overrides2.get(id2) === "",
|
|
1691
|
+
overridden: (id2) => overrides2.has(id2),
|
|
1692
|
+
reported: Object.freeze(reported)
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
function accountPromptText(resolved) {
|
|
1696
|
+
const slots = [];
|
|
1697
|
+
const anchors = [];
|
|
1698
|
+
const owners = { A: 0, B: 0, C: 0 };
|
|
1699
|
+
const counts = { pure: { A: 0, B: 0, C: 0 }, mixed: 0, total: 0 };
|
|
1700
|
+
const channels = /* @__PURE__ */ new Map();
|
|
1701
|
+
const slotsByOwner = { A: 0, B: 0, C: 0 };
|
|
1702
|
+
const unmeasuredByOwner = { A: 0, B: 0, C: 0 };
|
|
1703
|
+
const dynamicByOwner = { A: 0, B: 0, C: 0 };
|
|
1704
|
+
for (const anchor of PROMPT_ANCHORS) {
|
|
1705
|
+
const anchorOwners = /* @__PURE__ */ new Set();
|
|
1706
|
+
let anchorBytes = 0;
|
|
1707
|
+
const anchorSlots = [];
|
|
1708
|
+
for (const slot of anchor.slots) {
|
|
1709
|
+
const declared = resolved.text(slot.id);
|
|
1710
|
+
const container = slot.kind === "aggregate";
|
|
1711
|
+
const measured = !container && anchor.wired === true && typeof declared === "string";
|
|
1712
|
+
const bytes = measured ? byteLength(declared) : 0;
|
|
1713
|
+
const unwired = !container && !measured && anchor.wired !== true;
|
|
1714
|
+
const dynamic = !container && !measured && anchor.wired === true;
|
|
1715
|
+
anchorOwners.add(slot.owner);
|
|
1716
|
+
owners[slot.owner] += bytes;
|
|
1717
|
+
slotsByOwner[slot.owner] += 1;
|
|
1718
|
+
if (unwired) unmeasuredByOwner[slot.owner] += 1;
|
|
1719
|
+
if (dynamic) dynamicByOwner[slot.owner] += 1;
|
|
1720
|
+
anchorBytes += bytes;
|
|
1721
|
+
const row = Object.freeze({
|
|
1722
|
+
slotId: slot.id,
|
|
1723
|
+
anchorId: anchor.id,
|
|
1724
|
+
owner: slot.owner,
|
|
1725
|
+
reason: slot.reason,
|
|
1726
|
+
kind: slot.kind,
|
|
1727
|
+
bytes,
|
|
1728
|
+
measured,
|
|
1729
|
+
unwired,
|
|
1730
|
+
dynamic,
|
|
1731
|
+
overridden: resolved.overridden(slot.id)
|
|
1732
|
+
});
|
|
1733
|
+
slots.push(row);
|
|
1734
|
+
anchorSlots.push(row);
|
|
1735
|
+
}
|
|
1736
|
+
const pure = anchorOwners.size === 1 ? [...anchorOwners][0] : void 0;
|
|
1737
|
+
if (pure === void 0) counts.mixed += 1;
|
|
1738
|
+
else counts.pure[pure] += 1;
|
|
1739
|
+
counts.total += 1;
|
|
1740
|
+
const anchorUnmeasured = anchorSlots.filter((slot) => slot.unwired).length;
|
|
1741
|
+
const anchorDynamic = anchorSlots.filter((slot) => slot.dynamic).length;
|
|
1742
|
+
const perChannel = channels.get(anchor.channel) ?? { anchors: 0, wired: 0, bytes: 0, unmeasuredSlots: 0, dynamicSlots: 0 };
|
|
1743
|
+
perChannel.anchors += 1;
|
|
1744
|
+
if (anchor.wired === true) perChannel.wired += 1;
|
|
1745
|
+
perChannel.bytes += anchorBytes;
|
|
1746
|
+
perChannel.unmeasuredSlots += anchorUnmeasured;
|
|
1747
|
+
perChannel.dynamicSlots += anchorDynamic;
|
|
1748
|
+
channels.set(anchor.channel, perChannel);
|
|
1749
|
+
anchors.push(Object.freeze({
|
|
1750
|
+
anchorId: anchor.id,
|
|
1751
|
+
channel: anchor.channel,
|
|
1752
|
+
presence: anchor.presence,
|
|
1753
|
+
wired: anchor.wired === true,
|
|
1754
|
+
owner: pure ?? "mixed",
|
|
1755
|
+
bytes: anchorBytes,
|
|
1756
|
+
unmeasuredSlots: anchorUnmeasured,
|
|
1757
|
+
dynamicSlots: anchorDynamic,
|
|
1758
|
+
slots: Object.freeze(anchorSlots)
|
|
1759
|
+
}));
|
|
1760
|
+
}
|
|
1761
|
+
return Object.freeze({
|
|
1762
|
+
slots: Object.freeze(slots),
|
|
1763
|
+
anchors: Object.freeze(anchors),
|
|
1764
|
+
owners: Object.freeze(owners),
|
|
1765
|
+
channels: Object.freeze(PROMPT_CHANNELS.map((channel) => Object.freeze({
|
|
1766
|
+
channel,
|
|
1767
|
+
anchors: channels.get(channel)?.anchors ?? 0,
|
|
1768
|
+
wired: channels.get(channel)?.wired ?? 0,
|
|
1769
|
+
bytes: channels.get(channel)?.bytes ?? 0,
|
|
1770
|
+
unmeasuredSlots: channels.get(channel)?.unmeasuredSlots ?? 0,
|
|
1771
|
+
dynamicSlots: channels.get(channel)?.dynamicSlots ?? 0
|
|
1772
|
+
}))),
|
|
1773
|
+
counts: Object.freeze({
|
|
1774
|
+
pure: Object.freeze(counts.pure),
|
|
1775
|
+
mixed: counts.mixed,
|
|
1776
|
+
total: counts.total,
|
|
1777
|
+
slots: Object.freeze(slotsByOwner),
|
|
1778
|
+
unmeasured: Object.freeze(unmeasuredByOwner),
|
|
1779
|
+
dynamic: Object.freeze(dynamicByOwner),
|
|
1780
|
+
// Flat totals so a caller never sums two maps by hand.
|
|
1781
|
+
unmeasuredSlots: Object.values(unmeasuredByOwner).reduce((sum, value) => sum + value, 0),
|
|
1782
|
+
dynamicSlots: Object.values(dynamicByOwner).reduce((sum, value) => sum + value, 0)
|
|
1783
|
+
})
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1211
1787
|
// internal/config-spec.js
|
|
1212
1788
|
var MAX_TIMER_DELAY_MS = 2147483647;
|
|
1213
1789
|
var SETTINGS_NAMESPACE = "ptc-plus";
|
|
@@ -1494,6 +2070,68 @@ var CONFIG_FIELDS = Object.freeze([
|
|
|
1494
2070
|
description: "worker \u91CD\u542F\u540E\u4ECE session journal \u91CD\u5EFA\u53EF\u6062\u590D\u7684 REPL \u72B6\u6001\u3002",
|
|
1495
2071
|
descriptionEn: "Rebuilds recoverable REPL state from the session journal after a worker restart."
|
|
1496
2072
|
},
|
|
2073
|
+
{
|
|
2074
|
+
key: "retentionPayloadRuns",
|
|
2075
|
+
type: "integer",
|
|
2076
|
+
default: 8,
|
|
2077
|
+
min: 8,
|
|
2078
|
+
max: 512,
|
|
2079
|
+
label: "\u4FDD\u7559\u6700\u8FD1\u5355\u5143\u683C\u6570",
|
|
2080
|
+
labelEn: "Retained recent cells",
|
|
2081
|
+
description: "\u68C0\u67E5\u70B9\u4FDD\u7559\u6700\u8FD1\u591A\u5C11\u4E2A\u5355\u5143\u683C\u7684\u53C2\u6570\u539F\u6587\u3002\u8C03\u5927\u80FD\u76F4\u63A5\u7F16\u8F91\u66F4\u4E45\u4EE5\u524D\u7684\u8BA1\u7B97\uFF0C\u4F46\u68C0\u67E5\u70B9\u66F4\u5927\uFF1B\u66F4\u65E9\u7684\u5355\u5143\u683C\u9700\u8981\u4ECE\u4F1A\u8BDD\u65E5\u5FD7\u91CD\u65B0\u6298\u53E0\u624D\u80FD\u7F16\u8F91\u6216\u91CD\u65B0\u53D1\u5E03\u3002",
|
|
2082
|
+
descriptionEn: "How many recent cells keep their argument text in the checkpoint. A larger window keeps more history editable without a log read but grows the checkpoint; older cells must be refolded from the session log to be edited or republished."
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
key: "retentionPayloadBytes",
|
|
2086
|
+
type: "integer",
|
|
2087
|
+
default: 8388608,
|
|
2088
|
+
min: 1048576,
|
|
2089
|
+
max: 16777216,
|
|
2090
|
+
label: "\u4FDD\u7559\u8F7D\u8377\u9884\u7B97 (UTF-8 bytes)",
|
|
2091
|
+
labelEn: "Retained payload budget (UTF-8 bytes)",
|
|
2092
|
+
description: "\u4FDD\u7559\u5355\u5143\u683C\u53C2\u6570\u539F\u6587\u7684\u7D2F\u8BA1\u4E0A\u9650\u3002\u8FBE\u5230\u4E0A\u9650\u540E\u6700\u65E7\u7684\u539F\u6587\u88AB\u79FB\u9664\uFF0C\u68C0\u67E5\u70B9\u4F53\u79EF\u56E0\u6B64\u4E0E\u4F1A\u8BDD\u5199\u5165\u603B\u91CF\u65E0\u5173\uFF1B\u5355\u4E2A\u8D85\u8FC7\u9884\u7B97\u7684\u5355\u5143\u683C\u4E5F\u4F1A\u88AB\u79FB\u9664\u5E76\u4ECE\u65E5\u5FD7\u91CD\u6298\u3002\u68C0\u67E5\u70B9\u4F53\u79EF\u7EA6\u4E3A\u672C\u9884\u7B97\u7684\u4E24\u500D\uFF0C\u4E0A\u9650 16 MiB \u5BF9\u5E94\u7EA6 32 MB \u7684\u6700\u574F\u60C5\u51B5\u3002",
|
|
2093
|
+
descriptionEn: "Cumulative budget for the retained argument text. Past it the oldest payload is removed, which keeps the checkpoint independent of how much the session wrote; a single cell larger than the budget is removed as well and refolded from the log. A checkpoint is roughly twice this budget, so the 16 MiB maximum bounds the worst case near 32 MB."
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
key: "retentionClusters",
|
|
2097
|
+
type: "integer",
|
|
2098
|
+
default: 8,
|
|
2099
|
+
min: 0,
|
|
2100
|
+
max: 5e4,
|
|
2101
|
+
label: "\u4FDD\u7559\u5355\u5143\u683C\u7C07\u4E0A\u9650",
|
|
2102
|
+
labelEn: "Retained cluster limit",
|
|
2103
|
+
description: '\u68C0\u67E5\u70B9\u4FDD\u7559\u591A\u5C11\u4E2A\u5355\u5143\u683C\u7C07\u7684\u8EAB\u4EFD\u4E0E\u89C2\u6D4B\uFF0C\u8D85\u8FC7\u540E\u6700\u65E7\u7684\u7C07\u6298\u8FDB\u533A\u95F4\u6458\u8981\uFF08\u5176\u540E\u7EED\u64CD\u4F5C\u9700\u8981\u4ECE\u65E5\u5FD7\u91CD\u6298\uFF09\u3002\u9ED8\u8BA4\u4E0E"\u4FDD\u7559\u6700\u8FD1\u5355\u5143\u683C\u6570"\u4E00\u81F4\uFF0C\u6240\u4EE5\u68C0\u67E5\u70B9\u4E0D\u4F1A\u968F\u4F1A\u8BDD\u957F\u5EA6\u7EBF\u6027\u589E\u957F\uFF1B\u8C03\u5927\u80FD\u4FDD\u7559\u66F4\u591A\u65E0\u9700\u91CD\u6298\u7684\u6062\u590D\u8BC1\u636E\uFF0C\u4F46\u68C0\u67E5\u70B9\u66F4\u5927\u3002\u586B 0 \u8868\u793A\u4E0D\u9650\u5236\uFF1A\u4E0D\u505A\u6309\u6570\u91CF\u7684\u6298\u53E0\uFF0C\u53EA\u7531\u8F7D\u8377\u9884\u7B97\u7EA6\u675F\u4F53\u79EF\u3002',
|
|
2104
|
+
descriptionEn: "How many cell clusters keep their identity and observations in the checkpoint; older ones fold into an interval summary and need a log refold afterwards. It defaults to the retained-cells window, which is what keeps a long session from growing linearly; a larger value keeps more recovery evidence without a refold at the cost of a bigger checkpoint. 0 means unlimited: no count-based folding, with the payload budget as the only bound."
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
key: "capabilityPromptTextEnabled",
|
|
2108
|
+
type: "boolean",
|
|
2109
|
+
default: true,
|
|
2110
|
+
label: "\u63D0\u793A\u6587\u672C",
|
|
2111
|
+
labelEn: "Prompt text",
|
|
2112
|
+
description: "\u628A\u300C\u63D0\u793A\u6587\u672C\u300D\u9875\u7B7E\u91CC\u6539\u5199\u7684\u56FA\u5B9A\u53E5\u5B50\u5E94\u7528\u5230\u6A21\u578B\u7684\u8BF7\u6C42\u3001\u5DE5\u5177\u8BF4\u660E\u3001\u80FD\u529B\u65B9\u6848\u4E0E\u63D0\u793A\uFF1B\u5173\u95ED\u540E\u8FD9\u4E9B\u6E20\u9053\u4E00\u5F8B\u56DE\u5230\u5185\u7F6E\u6587\u672C\uFF0C\u5DF2\u4FDD\u5B58\u7684\u6539\u5199\u4FDD\u7559\u4F46\u6682\u505C\u751F\u6548\u3002",
|
|
2113
|
+
descriptionEn: "Applies the sentences edited in the Prompt text tab to model requests, tool descriptions, the capability plan and tips. When off, those channels use the built-in text; saved edits are kept but paused."
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
key: "promptText",
|
|
2117
|
+
type: "string",
|
|
2118
|
+
default: PROMPT_TEXT_DEFAULT,
|
|
2119
|
+
label: "\u63D0\u793A\u6587\u672C\u8986\u76D6",
|
|
2120
|
+
labelEn: "Prompt text overrides",
|
|
2121
|
+
description: "\u6309\u69FD\u4F4D id \u8986\u76D6\u63D2\u4EF6\u5199\u7ED9\u6A21\u578B\u7684\u56FA\u5B9A\u63D0\u793A\u6587\u672C\uFF1B\u7A7A\u5BF9\u8C61\u8868\u793A\u4F7F\u7528\u5185\u7F6E\u6587\u672C\u3002\u8BCA\u65AD\u3001\u4FE1\u5C01\u4E0E\u7531\u914D\u7F6E\u6D3E\u751F\u7684\u7B56\u7565\u53E5\u59CB\u7EC8\u53EA\u8BFB\u3002",
|
|
2122
|
+
descriptionEn: "Override the fixed prompt text the plugin writes for the model, keyed by slot id; an empty document keeps the built-in text. Diagnostics, message envelopes and configuration-derived policy sentences stay read-only."
|
|
2123
|
+
},
|
|
2124
|
+
{
|
|
2125
|
+
key: "unmeasuredCellLimit",
|
|
2126
|
+
type: "integer",
|
|
2127
|
+
default: 2,
|
|
2128
|
+
min: 1,
|
|
2129
|
+
max: Number.MAX_SAFE_INTEGER,
|
|
2130
|
+
label: "\u8FDE\u7EED\u672A\u6D4B\u91CF cell \u4E22\u5F03\u9608\u503C",
|
|
2131
|
+
labelEn: "Consecutive unmeasured cells before the worker is dropped",
|
|
2132
|
+
description: "\u8FDE\u7EED\u7B2C\u51E0\u4E2A\u672A\u6D4B\u91CF cell \u89E6\u53D1\u4E22\u5F03 live worker\uFF08\u9ED8\u8BA4 2\uFF1A\u7B2C\u4E00\u4E2A\u4FDD\u7559\uFF0C\u7B2C\u4E8C\u4E2A\u4E22\u5F03\uFF09\uFF1B\u5DF2\u8BC1\u660E\u7684 frontier \u4FDD\u7559\u7ED9\u4E0B\u4E00 cell \u91CD\u653E\u3002",
|
|
2133
|
+
descriptionEn: "The consecutive unmeasured cell that drops the live worker (default 2: the first is kept, the second drops it). The proved frontier stays replayable for the next cell."
|
|
2134
|
+
},
|
|
1497
2135
|
{
|
|
1498
2136
|
key: "officialReplPriority",
|
|
1499
2137
|
type: "boolean",
|
|
@@ -1567,6 +2205,50 @@ var CONFIG_FIELDS = Object.freeze([
|
|
|
1567
2205
|
description: "\u9650\u5236\u5355\u4E2A cell \u7684\u65E5\u5FD7\u548C\u8FD4\u56DE\u7ED3\u679C\u7684\u5408\u8BA1\u5927\u5C0F\u3002",
|
|
1568
2206
|
descriptionEn: "Limits the combined size of one cell's logs and returned result."
|
|
1569
2207
|
},
|
|
2208
|
+
{
|
|
2209
|
+
key: "sampleBoundMs",
|
|
2210
|
+
type: "integer",
|
|
2211
|
+
default: 1e3,
|
|
2212
|
+
min: 1,
|
|
2213
|
+
max: MAX_TIMER_DELAY_MS,
|
|
2214
|
+
label: "\u8BA1\u7B97\u57FA\u7EBF\u91C7\u6837\u7B49\u5F85\u4E0A\u9650 (ms)",
|
|
2215
|
+
labelEn: "Compute-baseline sample wait limit (ms)",
|
|
2216
|
+
description: "\u7B49\u5F85 worker \u56DE\u7B54\u8BA1\u7B97\u57FA\u7EBF\u91C7\u6837\u7684\u4E0A\u9650\uFF1B\u5BBF\u4E3B\u5FD9\u788C\u65F6\u5148\u8BFB\u7A7A helper \u901A\u9053\u518D\u5224\u65AD\u7F3A\u5931\uFF0C\u672A\u89C2\u5BDF\u5230\u7684\u91C7\u6837\u6309\u672A\u6D4B\u91CF no-op \u7ED3\u7B97\uFF0C\u662F\u5426\u4FDD\u7559 worker \u7531 unmeasuredCellLimit \u51B3\u5B9A\uFF1Btransport \u62A5\u544A\u9000\u51FA\u3001\u65AD\u8FDE\u6216\u65E0\u6CD5\u53D1\u9001\u65F6\u4ECD\u8D70 worker-exit \u91CD\u7F6E\u3002",
|
|
2217
|
+
descriptionEn: "Bounds the wait for the worker compute-baseline answer. A busy host reads the helper channel out before concluding an answer is missing; an unobserved sample settles as an unmeasured no-op and unmeasuredCellLimit decides whether the worker stays; a transport-reported exit, disconnect or unsendable request keeps the worker-exit reset route."
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
key: "workerReclaimMs",
|
|
2221
|
+
type: "integer",
|
|
2222
|
+
default: 5e3,
|
|
2223
|
+
min: 1e3,
|
|
2224
|
+
max: MAX_TIMER_DELAY_MS,
|
|
2225
|
+
label: "worker \u56DE\u6536\u786E\u8BA4\u4E0A\u9650 (ms)",
|
|
2226
|
+
labelEn: "Worker reclamation confirmation limit (ms)",
|
|
2227
|
+
description: "\u505C\u6B62 helper \u7684\u5173\u95ED\u9636\u6BB5\u4E0A\u9650\uFF08\u81F3\u5C11 1000ms\uFF09\uFF1Bexit \u786E\u8BA4\u4E0E\u5176\u540E\u7684\u8F93\u51FA\u5173\u95ED\u5404\u81EA\u4EE5\u6B64\u4E3A\u4E0A\u754C\uFF0Crelease grace \u4F1A\u88AB\u538B\u7F29\u4EE5\u7ED9 kill \u9884\u7559\u81F3\u5C11 1000ms \u7684\u786E\u8BA4\u7A97\u53E3\u3002worker \u521B\u5EFA\u4E0E\u5173\u95ED\u65F6\u8BFB\u53D6\u5F53\u524D\u914D\u7F6E\u3002cell \u89E6\u53D1\u7684 session kernel exit \u8D85\u65F6\u4F1A\u4FDD\u7559 helper \u5E76\u5728\u4F1A\u8BDD\u91CA\u653E\u524D\u963B\u6B62\u540E\u7EED cell\uFF1Bstartup\u3001idle \u6216\u8F93\u51FA\u5173\u95ED\u8DEF\u5F84\u7684\u5931\u8D25\uFF0C\u4EE5\u53CA binding console \u4E0E candidate helper\uFF0C\u53EA\u4FDD\u7559\u5B9E\u4F8B\u5E76\u5728\u91CA\u653E\u65F6\u62A5\u544A\u3002",
|
|
2228
|
+
descriptionEn: "Bounds one close stage of a stopped helper (at least 1000 ms): exit confirmation and the following output close are each bounded by it, with the release grace capped so the kill keeps at least a 1000 ms confirmation window. Read from the current configuration when a worker is created or closed. A cell-driven session-kernel exit miss retains the helper and blocks later cells until the session is released; a startup, idle or output-close miss, and the binding console and candidate helpers, only retain the instance and report it at release."
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
key: "startupProbeMs",
|
|
2232
|
+
type: "integer",
|
|
2233
|
+
default: 5e3,
|
|
2234
|
+
min: 1,
|
|
2235
|
+
max: MAX_TIMER_DELAY_MS,
|
|
2236
|
+
label: "REPL \u542F\u52A8\u63A2\u9488\u4E0A\u9650 (ms)",
|
|
2237
|
+
labelEn: "REPL startup probe limit (ms)",
|
|
2238
|
+
description: "worker \u542F\u52A8\u65F6\u6821\u9A8C REPL \u5951\u7EA6\u7684\u7B49\u5F85\u4E0A\u9650\uFF1B\u8D85\u65F6\u6309\u542F\u52A8\u5931\u8D25\u7ED3\u7B97\uFF0C\u4E0D\u6267\u884C\u4EFB\u4F55 cell\u3002worker \u521B\u5EFA\u65F6\u8BFB\u53D6\u5F53\u524D\u914D\u7F6E\u3002",
|
|
2239
|
+
descriptionEn: "Bounds the worker startup check of the REPL contract. A timeout settles as a startup failure and no cell executes. Read from the current configuration when a worker is created."
|
|
2240
|
+
},
|
|
2241
|
+
{
|
|
2242
|
+
key: "executionSeamTimeoutMs",
|
|
2243
|
+
type: "integer",
|
|
2244
|
+
default: 3e4,
|
|
2245
|
+
min: 1,
|
|
2246
|
+
max: MAX_TIMER_DELAY_MS,
|
|
2247
|
+
label: "\u7B49\u5F85\u5BBF\u4E3B\u6267\u884C\u5165\u53E3\u4E0A\u9650 (ms)",
|
|
2248
|
+
labelEn: "Host execution-seam wait limit (ms)",
|
|
2249
|
+
description: "\u6FC0\u6D3B\u65F6\u7B49\u5F85\u5BBF\u4E3B\u6CE8\u518C\u6267\u884C\u5165\u53E3\u7684\u4E0A\u9650\uFF1B\u8D85\u65F6\u628A\u5F53\u524D\u90E8\u7F72\u62A5\u544A\u4E3A\u4E0D\u652F\u6301\u3002\u53EA\u5728\u63D2\u4EF6\u6FC0\u6D3B\u6216\u91CD\u8F7D\u65F6\u8BFB\u53D6\uFF0C\u8FD0\u884C\u4E2D\u7684\u4FEE\u6539\u5728\u4E0B\u6B21\u6FC0\u6D3B\u751F\u6548\u3002",
|
|
2250
|
+
descriptionEn: "Bounds the activation wait for the host to register its execution seam. A timeout reports the deployment as unsupported. Read only when the plugin activates or reloads; a live change applies at the next activation."
|
|
2251
|
+
},
|
|
1570
2252
|
{
|
|
1571
2253
|
key: "maxValueNodes",
|
|
1572
2254
|
type: "integer",
|
|
@@ -1653,7 +2335,7 @@ var CONFIG_GROUPS = Object.freeze([
|
|
|
1653
2335
|
key: "recovery",
|
|
1654
2336
|
label: "\u72B6\u6001\u4E0E\u6062\u590D",
|
|
1655
2337
|
labelEn: "State and recovery",
|
|
1656
|
-
fields: Object.freeze(["durableReplay", "officialReplPriority", "tipsEnabled", "tipCooldownMessages", "tipEscalationFailures"])
|
|
2338
|
+
fields: Object.freeze(["durableReplay", "unmeasuredCellLimit", "officialReplPriority", "tipsEnabled", "tipCooldownMessages", "tipEscalationFailures"])
|
|
1657
2339
|
},
|
|
1658
2340
|
{
|
|
1659
2341
|
key: "extensions",
|
|
@@ -1683,6 +2365,10 @@ var CONFIG_GROUPS = Object.freeze([
|
|
|
1683
2365
|
"maxOldGenerationSizeMb",
|
|
1684
2366
|
"maxNestedRunCodeDepth",
|
|
1685
2367
|
"maxOutputBytes",
|
|
2368
|
+
"sampleBoundMs",
|
|
2369
|
+
"workerReclaimMs",
|
|
2370
|
+
"startupProbeMs",
|
|
2371
|
+
"executionSeamTimeoutMs",
|
|
1686
2372
|
"maxValueNodes",
|
|
1687
2373
|
"maxValueEdges",
|
|
1688
2374
|
"maxValueArrayLength",
|
|
@@ -1706,7 +2392,12 @@ var CONFIG_GROUPS = Object.freeze([
|
|
|
1706
2392
|
"capabilityBudgetBytes",
|
|
1707
2393
|
"capabilityDirectoryBytes",
|
|
1708
2394
|
"capabilityRecoveryBytes",
|
|
1709
|
-
"modelPreviewTokens"
|
|
2395
|
+
"modelPreviewTokens",
|
|
2396
|
+
"retentionPayloadRuns",
|
|
2397
|
+
"retentionPayloadBytes",
|
|
2398
|
+
"retentionClusters",
|
|
2399
|
+
"capabilityPromptTextEnabled",
|
|
2400
|
+
"promptText"
|
|
1710
2401
|
])
|
|
1711
2402
|
}
|
|
1712
2403
|
]);
|
|
@@ -1720,16 +2411,6 @@ var CONFIG_DEFAULTS = Object.freeze(
|
|
|
1720
2411
|
Object.fromEntries(CONFIG_FIELDS.map((field) => [field.key, field.default]))
|
|
1721
2412
|
);
|
|
1722
2413
|
|
|
1723
|
-
// internal/repl-rewrite-contract.js
|
|
1724
|
-
var LEGACY_DEFAULT_EXPORT_BINDING = "legacy-variable";
|
|
1725
|
-
var LIVE_DEFAULT_EXPORT_BINDING = "live-readonly";
|
|
1726
|
-
var LEGACY_IMPORT_EXPRESSION_BOUNDARY = "legacy";
|
|
1727
|
-
var LIVE_IMPORT_EXPRESSION_BOUNDARY = "statement-safe";
|
|
1728
|
-
var LIVE_MODULE_SEMANTICS = Object.freeze({
|
|
1729
|
-
defaultExportBinding: LIVE_DEFAULT_EXPORT_BINDING,
|
|
1730
|
-
importExpressionBoundary: LIVE_IMPORT_EXPRESSION_BOUNDARY
|
|
1731
|
-
});
|
|
1732
|
-
|
|
1733
2414
|
// internal/session-journal-schema.js
|
|
1734
2415
|
var IMPORT_BOUNDARY_JOURNAL_VERSION = 7;
|
|
1735
2416
|
var PER_NAME_USER_BINDINGS_JOURNAL_VERSION = 8;
|
|
@@ -1753,7 +2434,7 @@ var WHOLE_ENTRY_JOURNAL_FIELDS = /* @__PURE__ */ new Set(["version", "bindingPol
|
|
|
1753
2434
|
var PER_NAME_JOURNAL_FIELDS = /* @__PURE__ */ new Set([...WHOLE_ENTRY_JOURNAL_FIELDS, "userBindingsShadowPolicy", "userBindingNames"]);
|
|
1754
2435
|
var LANGUAGE_SEMANTICS_JOURNAL_FIELDS = /* @__PURE__ */ new Set([...PER_NAME_JOURNAL_FIELDS, "languageSemantics"]);
|
|
1755
2436
|
var MODULE_TRANSFORM_JOURNAL_FIELDS = /* @__PURE__ */ new Set([...LANGUAGE_SEMANTICS_JOURNAL_FIELDS, "moduleTransform"]);
|
|
1756
|
-
var JOURNAL_FIELDS = /* @__PURE__ */ new Set([...MODULE_TRANSFORM_JOURNAL_FIELDS, "executionCwd"]);
|
|
2437
|
+
var JOURNAL_FIELDS = /* @__PURE__ */ new Set([...MODULE_TRANSFORM_JOURNAL_FIELDS, "executionCwd", "values", "unrecordedBindings"]);
|
|
1757
2438
|
var FINGERPRINT_REUSE_JOURNAL_FIELDS = new Set([...WHOLE_ENTRY_JOURNAL_FIELDS].filter((field) => field !== "userBindingsReusePolicy"));
|
|
1758
2439
|
var RELATIONLESS_JOURNAL_FIELDS = new Set([...FINGERPRINT_REUSE_JOURNAL_FIELDS].filter((field) => field !== "userBindingsFingerprint"));
|
|
1759
2440
|
var PREDECESSOR_JOURNAL_FIELDS = /* @__PURE__ */ new Set(["version", "bindingMode", "rewritePolicy", "status", "calls", "operations", "confirms", "diagnostics", "completion", "volatileReason"]);
|
|
@@ -1770,14 +2451,14 @@ var DEFAULT_EXPORT_BINDINGS = /* @__PURE__ */ new Set([
|
|
|
1770
2451
|
LEGACY_DEFAULT_EXPORT_BINDING,
|
|
1771
2452
|
LIVE_DEFAULT_EXPORT_BINDING
|
|
1772
2453
|
]);
|
|
1773
|
-
var CALL_SUCCESS_FIELDS = /* @__PURE__ */ new Set(["global", "member", "args", "ok", "value", "settle"]);
|
|
1774
|
-
var CALL_ERROR_FIELDS = /* @__PURE__ */ new Set(["global", "member", "args", "ok", "error", "settle"]);
|
|
1775
|
-
var OPERATION_FIELDS = /* @__PURE__ */ new Set(["action", "name"]);
|
|
2454
|
+
var CALL_SUCCESS_FIELDS = /* @__PURE__ */ new Set(["global", "member", "args", "argsDigest", "argsBytes", "ok", "value", "settle"]);
|
|
2455
|
+
var CALL_ERROR_FIELDS = /* @__PURE__ */ new Set(["global", "member", "args", "argsDigest", "argsBytes", "ok", "error", "settle"]);
|
|
2456
|
+
var OPERATION_FIELDS = /* @__PURE__ */ new Set(["action", "name", "kind"]);
|
|
1776
2457
|
var RETURN_FIELDS = /* @__PURE__ */ new Set(["kind", "hasValue", "value"]);
|
|
1777
2458
|
var THROW_FIELDS = /* @__PURE__ */ new Set(["kind", "error"]);
|
|
1778
2459
|
var ERROR_FIELDS = /* @__PURE__ */ new Set(["kind", "message"]);
|
|
1779
2460
|
var EDIT_TARGET_FIELDS = /* @__PURE__ */ new Set(["targetCallSeq"]);
|
|
1780
|
-
var DERIVED_RUN_FIELDS = /* @__PURE__ */ new Set(["code", "description"]);
|
|
2461
|
+
var DERIVED_RUN_FIELDS = /* @__PURE__ */ new Set(["code", "codeDigest", "codeBytes", "description"]);
|
|
1781
2462
|
var JOURNAL_VERSIONS = /* @__PURE__ */ new Set([LEGACY_JOURNAL_VERSION, INTERMEDIATE_JOURNAL_VERSION, PREVIOUS_JOURNAL_VERSION, USER_BINDING_RELATIONLESS_JOURNAL_VERSION, FINGERPRINT_REUSE_JOURNAL_VERSION, VERSIONED_BINDING_REUSE_JOURNAL_VERSION, IMPORT_BOUNDARY_JOURNAL_VERSION, PER_NAME_USER_BINDINGS_JOURNAL_VERSION, LANGUAGE_SEMANTICS_JOURNAL_VERSION, MODULE_TRANSFORM_JOURNAL_VERSION, JOURNAL_VERSION]);
|
|
1782
2463
|
var USER_BINDINGS_REUSE_POLICIES = /* @__PURE__ */ new Set([LEGACY_USER_BINDINGS_REUSE_POLICY, LIVE_USER_BINDINGS_REUSE_POLICY]);
|
|
1783
2464
|
var USER_BINDINGS_SHADOW_POLICIES = /* @__PURE__ */ new Set([LEGACY_USER_BINDINGS_SHADOW_POLICY, LIVE_USER_BINDINGS_SHADOW_POLICY]);
|
|
@@ -1923,11 +2604,11 @@ var {
|
|
|
1923
2604
|
maxStringBytes: MAX_STRING_BYTES
|
|
1924
2605
|
} = DEFAULT_VALUE_LIMITS;
|
|
1925
2606
|
var textEncoder = new TextEncoder();
|
|
1926
|
-
function
|
|
2607
|
+
function isRecord3(value) {
|
|
1927
2608
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1928
2609
|
}
|
|
1929
2610
|
function hasClosedFields(value, allowed, required = []) {
|
|
1930
|
-
if (!
|
|
2611
|
+
if (!isRecord3(value)) return false;
|
|
1931
2612
|
const keys2 = Reflect.ownKeys(value);
|
|
1932
2613
|
if (keys2.some((key) => typeof key !== "string" || !allowed.has(key) || !Object.prototype.propertyIsEnumerable.call(value, key))) return false;
|
|
1933
2614
|
return [...required].every((key) => Object.hasOwn(value, key));
|
|
@@ -1936,7 +2617,7 @@ function hasExactFields(value, fields) {
|
|
|
1936
2617
|
return hasClosedFields(value, fields, fields) && Reflect.ownKeys(value).length === fields.size;
|
|
1937
2618
|
}
|
|
1938
2619
|
function hasExactOrderedFields(value, fields) {
|
|
1939
|
-
if (!
|
|
2620
|
+
if (!isRecord3(value)) return false;
|
|
1940
2621
|
const keys2 = Reflect.ownKeys(value);
|
|
1941
2622
|
const ordered = [...fields];
|
|
1942
2623
|
return keys2.length === ordered.length && keys2.every((key, index2) => key === ordered[index2] && Object.prototype.propertyIsEnumerable.call(value, key));
|
|
@@ -1951,7 +2632,7 @@ function isValidPosition(value) {
|
|
|
1951
2632
|
return hasExactFields(value, POSITION_FIELDS) && Number.isSafeInteger(value.line) && value.line >= 1 && Number.isSafeInteger(value.column) && value.column >= 1;
|
|
1952
2633
|
}
|
|
1953
2634
|
function isValidDiagnosticCause(value, depth) {
|
|
1954
|
-
if (depth > 16 || !
|
|
2635
|
+
if (depth > 16 || !isRecord3(value)) return false;
|
|
1955
2636
|
if (Object.hasOwn(value, "severity")) return isValidDiagnostic(value, depth + 1);
|
|
1956
2637
|
return hasClosedFields(value, CAUSE_FIELDS, ["message"]) && (value.code === void 0 || isLine(value.code)) && isLine(value.message);
|
|
1957
2638
|
}
|
|
@@ -1985,7 +2666,7 @@ function isValidValueAtom(value, state) {
|
|
|
1985
2666
|
if (value === null || typeof value === "boolean") return true;
|
|
1986
2667
|
if (typeof value === "string") return accountText(value, state);
|
|
1987
2668
|
if (typeof value === "number") return Number.isFinite(value) && !Object.is(value, -0);
|
|
1988
|
-
if (!
|
|
2669
|
+
if (!isRecord3(value) || typeof value.tag !== "string") return false;
|
|
1989
2670
|
if (value.tag === "undefined") return hasExactOrderedFields(value, VALUE_UNDEFINED_FIELDS);
|
|
1990
2671
|
if (value.tag === "number") {
|
|
1991
2672
|
return hasExactOrderedFields(value, VALUE_NUMBER_FIELDS) && ["nan", "infinity", "-infinity", "-0"].includes(value.value);
|
|
@@ -2013,7 +2694,7 @@ function isValidValueWire(value) {
|
|
|
2013
2694
|
};
|
|
2014
2695
|
if (!isValidValueAtom(value.root, state)) return false;
|
|
2015
2696
|
for (const [nodeIndex, node] of value.nodes.entries()) {
|
|
2016
|
-
if (!state.discovered.has(nodeIndex) || !
|
|
2697
|
+
if (!state.discovered.has(nodeIndex) || !isRecord3(node)) return false;
|
|
2017
2698
|
if (node.type === "array") {
|
|
2018
2699
|
if (!hasExactOrderedFields(node, VALUE_ARRAY_FIELDS) || !Number.isSafeInteger(node.length) || node.length < 0 || node.length > MAX_ARRAY_LENGTH || !Array.isArray(node.entries)) return false;
|
|
2019
2700
|
state.arraySlots += node.length;
|
|
@@ -2057,10 +2738,18 @@ function isValidModuleSemantics(value, version) {
|
|
|
2057
2738
|
const legacy = version <= VERSIONED_BINDING_REUSE_JOURNAL_VERSION;
|
|
2058
2739
|
return hasExactFields(value, legacy ? LEGACY_MODULE_SEMANTICS_FIELDS : MODULE_SEMANTICS_FIELDS) && DEFAULT_EXPORT_BINDINGS.has(value.defaultExportBinding) && (legacy || IMPORT_EXPRESSION_BOUNDARIES.has(value.importExpressionBoundary));
|
|
2059
2740
|
}
|
|
2741
|
+
function payloadShape(value, textField, digestField, bytesField) {
|
|
2742
|
+
if (Object.hasOwn(value, textField)) {
|
|
2743
|
+
return Object.hasOwn(value, digestField) || Object.hasOwn(value, bytesField) ? void 0 : "text";
|
|
2744
|
+
}
|
|
2745
|
+
return typeof value[digestField] === "string" && /^[a-f0-9]{64}$/u.test(value[digestField]) && isSafeSequence(value[bytesField]) ? "digest" : void 0;
|
|
2746
|
+
}
|
|
2060
2747
|
function isValidCall(value) {
|
|
2061
|
-
if (!
|
|
2748
|
+
if (!isRecord3(value) || value.ok !== true && value.ok !== false) return false;
|
|
2062
2749
|
const fields = value.ok ? CALL_SUCCESS_FIELDS : CALL_ERROR_FIELDS;
|
|
2063
|
-
|
|
2750
|
+
const argsShape = payloadShape(value, "args", "argsDigest", "argsBytes");
|
|
2751
|
+
if (argsShape === void 0 || !hasClosedFields(value, fields) || typeof value.global !== "string" || typeof value.member !== "string" || !isSafeSequence(value.settle)) return false;
|
|
2752
|
+
if (argsShape === "text" && !isValidValueWire(value.args)) return false;
|
|
2064
2753
|
return value.ok ? isValidValueWire(value.value) : typeof value.error === "string";
|
|
2065
2754
|
}
|
|
2066
2755
|
function isValidOperation(value) {
|
|
@@ -2069,7 +2758,7 @@ function isValidOperation(value) {
|
|
|
2069
2758
|
return typeof value.name === "string" && /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.test(value.name);
|
|
2070
2759
|
}
|
|
2071
2760
|
function isValidCompletion(value) {
|
|
2072
|
-
if (!
|
|
2761
|
+
if (!isRecord3(value) || !["return", "throw"].includes(value.kind)) return false;
|
|
2073
2762
|
if (value.kind === "return") {
|
|
2074
2763
|
if (!hasClosedFields(value, RETURN_FIELDS, ["kind", "hasValue"]) || typeof value.hasValue !== "boolean") return false;
|
|
2075
2764
|
return value.hasValue ? Object.hasOwn(value, "value") && isValidValueWire(value.value) : !Object.hasOwn(value, "value");
|
|
@@ -2083,7 +2772,7 @@ function isValidConfirms(value, version) {
|
|
|
2083
2772
|
return value.every(isSafeSequence);
|
|
2084
2773
|
}
|
|
2085
2774
|
function isReadableJournalUnchecked(value) {
|
|
2086
|
-
if (!
|
|
2775
|
+
if (!isRecord3(value) || !JOURNAL_VERSIONS.has(value.version) || !STATUSES.has(value.status)) {
|
|
2087
2776
|
return false;
|
|
2088
2777
|
}
|
|
2089
2778
|
const predecessor = value.version < 4;
|
|
@@ -2139,7 +2828,9 @@ function isValidEditTarget(value) {
|
|
|
2139
2828
|
}
|
|
2140
2829
|
function isValidDerivedRun(value) {
|
|
2141
2830
|
try {
|
|
2142
|
-
|
|
2831
|
+
if (!isRecord3(value) || !hasClosedFields(value, DERIVED_RUN_FIELDS) || typeof value.description !== "string") return false;
|
|
2832
|
+
const codeShape = payloadShape(value, "code", "codeDigest", "codeBytes");
|
|
2833
|
+
return codeShape === "digest" || codeShape === "text" && typeof value.code === "string";
|
|
2143
2834
|
} catch {
|
|
2144
2835
|
return false;
|
|
2145
2836
|
}
|
|
@@ -2153,7 +2844,7 @@ function isValidRecoveryBoundaries(value) {
|
|
|
2153
2844
|
}
|
|
2154
2845
|
function isValidEditRelation(meta2, args, journal) {
|
|
2155
2846
|
try {
|
|
2156
|
-
if (!
|
|
2847
|
+
if (!isRecord3(meta2) || !isRecord3(args) || !isValidEditTarget(meta2.dshPtcPlusEdit) || !isValidDerivedRun(meta2.dshPtcPlusDerivedRun) || journal.status === "noop") return false;
|
|
2157
2848
|
if (Object.hasOwn(meta2, "dshPtcPlusRecoveryBoundaries") && !isValidRecoveryBoundaries(meta2.dshPtcPlusRecoveryBoundaries)) return false;
|
|
2158
2849
|
return !Object.hasOwn(args, "expected_target_call_seq") || args.expected_target_call_seq === meta2.dshPtcPlusEdit.targetCallSeq;
|
|
2159
2850
|
} catch {
|
|
@@ -2167,7 +2858,7 @@ function rawArguments(block, settled) {
|
|
|
2167
2858
|
function parseArguments(raw) {
|
|
2168
2859
|
try {
|
|
2169
2860
|
const value = JSON.parse(raw);
|
|
2170
|
-
return
|
|
2861
|
+
return isRecord3(value) ? value : void 0;
|
|
2171
2862
|
} catch {
|
|
2172
2863
|
return void 0;
|
|
2173
2864
|
}
|
|
@@ -2176,7 +2867,7 @@ function resultText(block) {
|
|
|
2176
2867
|
if (!Array.isArray(block.content)) return "";
|
|
2177
2868
|
try {
|
|
2178
2869
|
const parts = block.content.map((item) => item?.type === "text" && typeof item.text === "string" ? item.text : JSON.stringify(item, null, 2));
|
|
2179
|
-
if (parts.length === 0 &&
|
|
2870
|
+
if (parts.length === 0 && isRecord3(block.error)) {
|
|
2180
2871
|
return [block.error.name, block.error.code].filter((value) => typeof value === "string").join(": ");
|
|
2181
2872
|
}
|
|
2182
2873
|
return parts.filter((value) => typeof value === "string").join("\n");
|
|
@@ -2216,17 +2907,17 @@ function isDurableRecoveryDiagnostic(diagnostic) {
|
|
|
2216
2907
|
return diagnostic.code === "PTC-R002" && diagnostic.severity === "warning" && diagnostic.phase === "recover" && diagnostic.stateEffect === "rolled-back";
|
|
2217
2908
|
}
|
|
2218
2909
|
function derivePtcToolView(block, toolName = void 0) {
|
|
2219
|
-
const settled =
|
|
2220
|
-
const argsRaw =
|
|
2910
|
+
const settled = isRecord3(block) && block.kind === "tool-result";
|
|
2911
|
+
const argsRaw = isRecord3(block) ? rawArguments(block, settled) : "";
|
|
2221
2912
|
const args = parseArguments(argsRaw);
|
|
2222
2913
|
const code2 = typeof args?.code === "string" ? args.code : argsRaw;
|
|
2223
2914
|
const explicitDescription = typeof args?.description === "string" && args.description.length > 0 ? args.description : void 0;
|
|
2224
|
-
const generatedDescription = settled &&
|
|
2915
|
+
const generatedDescription = settled && isRecord3(block.meta) && typeof block.meta[GENERATED_RUN_CODE_DESCRIPTION_KEY] === "string" && block.meta[GENERATED_RUN_CODE_DESCRIPTION_KEY].length > 0 ? block.meta[GENERATED_RUN_CODE_DESCRIPTION_KEY] : void 0;
|
|
2225
2916
|
const description = (explicitDescription ?? generatedDescription)?.split(/\r?\n/, 1)[0] ?? "";
|
|
2226
2917
|
const descriptionGenerated = explicitDescription === void 0 && generatedDescription !== void 0;
|
|
2227
2918
|
const output = settled ? resultText(block) : "";
|
|
2228
2919
|
const state = !settled ? "running" : block.error?.code === "interrupted" ? "stopped" : block.isError === true ? "error" : "ok";
|
|
2229
|
-
const journal = settled &&
|
|
2920
|
+
const journal = settled && isRecord3(block.meta) && isCountableJournal(block.meta.dshPtcPlus) ? block.meta.dshPtcPlus : void 0;
|
|
2230
2921
|
if (journal === void 0) {
|
|
2231
2922
|
return Object.freeze({ state, description, descriptionGenerated, code: code2, output, ptc: false, features: Object.freeze([]) });
|
|
2232
2923
|
}
|
|
@@ -2834,6 +3525,7 @@ function resolveConfig(config2 = {}) {
|
|
|
2834
3525
|
}
|
|
2835
3526
|
for (const field of CONFIG_FIELDS) assertField(field, resolved[field.key]);
|
|
2836
3527
|
validateCapabilityProfiles(JSON.parse(resolved.capabilityProfiles));
|
|
3528
|
+
validatePromptTextDocument(resolved.promptText);
|
|
2837
3529
|
for (const [key, array] of [["capabilityBaseline", true], ["capabilityOverrides", false]]) {
|
|
2838
3530
|
let value;
|
|
2839
3531
|
try {
|
|
@@ -8467,6 +9159,12 @@ function capabilityCommandText(t2, text) {
|
|
|
8467
9159
|
const receipt = readCapabilityCommandReceipt(text);
|
|
8468
9160
|
return receipt ? t2(`capabilities.receipt.${receipt.state}`, { session: receipt.sessionId, error: receipt.error ?? "" }) : text;
|
|
8469
9161
|
}
|
|
9162
|
+
var HOST_CONTEXT_SECTIONS = Object.freeze([
|
|
9163
|
+
Object.freeze({ id: "host:system-prompt", presence: "capabilities.prompt.hostPresenceEvery" }),
|
|
9164
|
+
Object.freeze({ id: "host:tools:sdk", presence: "capabilities.prompt.hostPresenceCapabilities" })
|
|
9165
|
+
]);
|
|
9166
|
+
var PROMPT_TABLE_COLUMN_KEYS = Object.freeze(["channel", "anchor", "presence", "bytes", "reason", "kind"]);
|
|
9167
|
+
var PROMPT_TABLE_COLUMNS = PROMPT_TABLE_COLUMN_KEYS.length;
|
|
8470
9168
|
function capabilityChoiceLabel(t2, value) {
|
|
8471
9169
|
return t2(value === "inherit" ? "capabilities.quick.noOverride" : ["enabled", "pending", "unknown"].includes(value) ? `capabilities.quick.${value}` : [...selections, ...CAPABILITY_DISCLOSURES].includes(value) ? `capabilities.${value}` : "capabilities.quick.unknown");
|
|
8472
9170
|
}
|
|
@@ -8477,13 +9175,38 @@ function capabilityRuleLabel(t2, rule, empty2 = "capabilities.policy.inheritRule
|
|
|
8477
9175
|
function validCatalogRule(rule, temporary = false) {
|
|
8478
9176
|
return rule !== null && typeof rule === "object" && !Array.isArray(rule) && Object.entries(rule).every(([dimension, choice]) => ["availability", "disclosure"].includes(dimension) && (temporary && choice === "automatic" || (dimension === "availability" ? ["enabled", "closed"].includes(choice) : CAPABILITY_DISCLOSURES.includes(choice))));
|
|
8479
9177
|
}
|
|
9178
|
+
var noSnapshot = () => void 0;
|
|
9179
|
+
function firstHumanMessageSeq(nodes) {
|
|
9180
|
+
if (nodes === null || nodes === void 0 || typeof nodes.values !== "function") return null;
|
|
9181
|
+
let first = null;
|
|
9182
|
+
for (const node of nodes.values()) {
|
|
9183
|
+
if (node?.kind !== "user" || node.data?.source?.kind !== "user") continue;
|
|
9184
|
+
const seq = node.anchorSeq ?? node.data?.seq;
|
|
9185
|
+
if (!Number.isSafeInteger(seq)) continue;
|
|
9186
|
+
if (first === null || seq < first) first = seq;
|
|
9187
|
+
}
|
|
9188
|
+
return first;
|
|
9189
|
+
}
|
|
9190
|
+
function capabilityReceiptVisible(node, { blank = false, firstUserSeq = null, windowComplete = true } = {}) {
|
|
9191
|
+
if (blank === true) return false;
|
|
9192
|
+
if (windowComplete !== true) return true;
|
|
9193
|
+
return !(Number.isSafeInteger(node?.seq) && Number.isSafeInteger(firstUserSeq) && node.seq < firstUserSeq);
|
|
9194
|
+
}
|
|
8480
9195
|
function createCapabilityCommandCard(React32) {
|
|
8481
9196
|
const h = React32.createElement;
|
|
8482
|
-
return function CapabilityCommandCard({ node, t: t2 }) {
|
|
9197
|
+
return function CapabilityCommandCard({ node, t: t2, useChat, useSession }) {
|
|
8483
9198
|
const [showSource, setShowSource] = React32.useState(false);
|
|
9199
|
+
const readSession = typeof useSession === "function" ? useSession : noSnapshot;
|
|
9200
|
+
const blank = readSession((snapshot2) => snapshot2?.blank === true) === true;
|
|
9201
|
+
const windowComplete = readSession((snapshot2) => snapshot2?.hasMore !== true);
|
|
9202
|
+
const readChat = typeof useChat === "function" ? useChat : noSnapshot;
|
|
9203
|
+
const firstUserSeq = readChat((snapshot2) => firstHumanMessageSeq(snapshot2?.nodes));
|
|
9204
|
+
if (typeof node.args !== "string") return null;
|
|
9205
|
+
if (!capabilityReceiptVisible(node, { blank, firstUserSeq, windowComplete })) return null;
|
|
8484
9206
|
const command2 = `/${node.name ?? "capabilities"}${node.args ? ` ${String(node.args).trim()}` : ""}`;
|
|
8485
9207
|
const text = node.outcome?.text;
|
|
8486
9208
|
const receipt = readCapabilityCommandReceipt(text);
|
|
9209
|
+
if (receipt?.state === "pending") return null;
|
|
8487
9210
|
const legacyRefresh = text === "Session capability environment refreshed; the model-visible notification is recorded.";
|
|
8488
9211
|
if (receipt || String(node.args ?? "").trim() === "refresh" || legacyRefresh) {
|
|
8489
9212
|
const outcome2 = receipt ? t2(`capabilities.card.${receipt.state}`, { error: receipt.error ?? "" }) : legacyRefresh ? t2("capabilities.card.recorded") : node.outcome ? (typeof text === "string" && !text.trim() ? void 0 : capabilityCommandText(t2, text)) ?? t2(node.outcome.kind === "error" ? "capabilities.commandFailed" : "capabilities.refreshAcknowledged") : t2("capabilities.refreshing");
|
|
@@ -8605,12 +9328,7 @@ function capabilityPlanReason(t2, entry) {
|
|
|
8605
9328
|
function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, Modal = createFallbackModal(React32) }) {
|
|
8606
9329
|
const h = React32.createElement;
|
|
8607
9330
|
const field = (key) => CONFIG_FIELDS.find((item) => item.key === key);
|
|
8608
|
-
const
|
|
8609
|
-
{ tab: "manual", keys: ["rules"] },
|
|
8610
|
-
{ tab: "budgets", keys: ["description", "recovery", "preview"] },
|
|
8611
|
-
{ tab: "statistics", keys: ["statistics"] }
|
|
8612
|
-
];
|
|
8613
|
-
const responsibilities = responsibilityGroups.flatMap((group) => group.keys);
|
|
9331
|
+
const responsibilities = ["rules", "description", "recovery", "preview", "statistics", "promptText"];
|
|
8614
9332
|
const choicesFor = (configuration, plan) => {
|
|
8615
9333
|
const historical = plan && ["ptc-capability-plan/v1", "ptc-capability-plan/v3"].includes(plan.schema) && configuration && configuration.capabilityPolicy === void 0;
|
|
8616
9334
|
let statistics;
|
|
@@ -8625,7 +9343,10 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8625
9343
|
enabled: configuration?.capabilityManagementEnabled ?? plan?.enabled,
|
|
8626
9344
|
statistics,
|
|
8627
9345
|
recoveryEnabled: configuration?.capabilityRecoveryEnabled ?? (historical ? plan.enabled : void 0),
|
|
8628
|
-
previewEnabled: configuration?.modelPreviewEnabled ?? (historical ? plan.enabled : void 0)
|
|
9346
|
+
previewEnabled: configuration?.modelPreviewEnabled ?? (historical ? plan.enabled : void 0),
|
|
9347
|
+
// The switch is new: a stored configuration without it means "on", the
|
|
9348
|
+
// documented default, while an unreadable configuration stays unknown.
|
|
9349
|
+
promptTextEnabled: configuration === void 0 ? void 0 : configuration.capabilityPromptTextEnabled !== false
|
|
8629
9350
|
};
|
|
8630
9351
|
};
|
|
8631
9352
|
const flagsFor = (settings) => ({
|
|
@@ -8633,7 +9354,8 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8633
9354
|
description: settings.enabled,
|
|
8634
9355
|
statistics: settings.statistics?.enabled,
|
|
8635
9356
|
recovery: settings.recoveryEnabled,
|
|
8636
|
-
preview: settings.previewEnabled
|
|
9357
|
+
preview: settings.previewEnabled,
|
|
9358
|
+
promptText: settings.promptTextEnabled
|
|
8637
9359
|
});
|
|
8638
9360
|
const choiceState = (retained, applied, key) => typeof retained[key] !== "boolean" ? "unknown" : retained[key] ? typeof applied[key] !== "boolean" ? "unknown" : applied[key] === false ? "paused" : "selected" : key === "rules" || key === "description" ? "host" : "unselected";
|
|
8639
9361
|
function CombinationSummary({
|
|
@@ -8677,32 +9399,23 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8677
9399
|
h("h4", null, t2("capabilities.combination.saved")),
|
|
8678
9400
|
h("span", { className: "ptcPlusCapabilitySaveState", role: "status" }, feedback)
|
|
8679
9401
|
),
|
|
8680
|
-
h("div", { className: "ptcPlusCombinationChoices" }, ...
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
"data-state": state,
|
|
8698
|
-
"aria-controls": key === "rules" || key === "statistics" ? `${id2}-pane-${group.tab}` : `${id2}-context-pane-${key}`,
|
|
8699
|
-
onClick: () => onNavigate(key)
|
|
8700
|
-
},
|
|
8701
|
-
h("span", null, t2(`capabilities.combination.${key}`)),
|
|
8702
|
-
h("small", null, t2(`capabilities.combination.state.${state}`))
|
|
8703
|
-
);
|
|
8704
|
-
}))
|
|
8705
|
-
))),
|
|
9402
|
+
h("div", { className: "ptcPlusCombinationChoices" }, ...responsibilities.map((key) => {
|
|
9403
|
+
const state = choiceState(retained, applied, key);
|
|
9404
|
+
return h(
|
|
9405
|
+
"button",
|
|
9406
|
+
{
|
|
9407
|
+
key,
|
|
9408
|
+
type: "button",
|
|
9409
|
+
className: "ptcPlusCombinationChoice",
|
|
9410
|
+
"data-state": state,
|
|
9411
|
+
"data-choice": key,
|
|
9412
|
+
"aria-controls": key === "promptText" ? `${id2}-pane-prompt` : key === "rules" || key === "statistics" ? `${id2}-pane-${key === "rules" ? "manual" : "statistics"}` : `${id2}-context-pane-${key}`,
|
|
9413
|
+
onClick: () => onNavigate(key)
|
|
9414
|
+
},
|
|
9415
|
+
h("span", null, t2(`capabilities.combination.${key}`)),
|
|
9416
|
+
h("small", null, t2(`capabilities.combination.state.${state}`))
|
|
9417
|
+
);
|
|
9418
|
+
})),
|
|
8706
9419
|
h("p", { className: "ptcPlusDetail", role: "status" }, effect),
|
|
8707
9420
|
h(
|
|
8708
9421
|
"details",
|
|
@@ -10041,6 +10754,451 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10041
10754
|
update(tabs[next]);
|
|
10042
10755
|
event.currentTarget.parentElement.querySelectorAll("[role=tab]")[next].focus({ preventScroll: true });
|
|
10043
10756
|
}
|
|
10757
|
+
const PROMPT_REASON_KEYS = Object.freeze({
|
|
10758
|
+
"fact-derived": "factDerived",
|
|
10759
|
+
"aggregate-frozen": "aggregateFrozen",
|
|
10760
|
+
"protocol-exact-text": "protocolExactText",
|
|
10761
|
+
"protocol-structural": "protocolStructural",
|
|
10762
|
+
"shadows-host": "shadowsHost",
|
|
10763
|
+
"other-owner": "otherOwner"
|
|
10764
|
+
});
|
|
10765
|
+
function promptReasonLabel(t2, reason) {
|
|
10766
|
+
const key = PROMPT_REASON_KEYS[reason];
|
|
10767
|
+
return key === void 0 ? reason : t2(`capabilities.prompt.reason.${key}`);
|
|
10768
|
+
}
|
|
10769
|
+
function promptKindLabel(t2, kind) {
|
|
10770
|
+
return kind === void 0 ? "" : t2(`capabilities.prompt.kind.${kind}`);
|
|
10771
|
+
}
|
|
10772
|
+
function PromptTextSettings({ value, disabled, onChange, t: t2, id: id2 }) {
|
|
10773
|
+
let document2;
|
|
10774
|
+
let readError;
|
|
10775
|
+
try {
|
|
10776
|
+
document2 = parsePromptTextDocument(value.promptText);
|
|
10777
|
+
} catch (error) {
|
|
10778
|
+
readError = error.message;
|
|
10779
|
+
document2 = { schema: PROMPT_TEXT_SCHEMA, overrides: {} };
|
|
10780
|
+
}
|
|
10781
|
+
const paused = value.capabilityPromptTextEnabled === false;
|
|
10782
|
+
const blocked = paused || disabled === true || typeof disabled === "function" && disabled("promptText") === true;
|
|
10783
|
+
const resolved = resolvePromptText(value.promptText);
|
|
10784
|
+
const account = accountPromptText(resolved);
|
|
10785
|
+
const [draft, setDraft] = React32.useState(null);
|
|
10786
|
+
const [selectedAnchorId, setSelectedAnchorId] = React32.useState(null);
|
|
10787
|
+
const anchorPanelRef = React32.useRef(null);
|
|
10788
|
+
const [openSlots, setOpenSlots] = React32.useState({});
|
|
10789
|
+
const overrides2 = draft ?? document2.overrides;
|
|
10790
|
+
const byteCount = (text) => new TextEncoder().encode(text).length;
|
|
10791
|
+
const group = (number2) => String(Math.round(number2)).replace(/\B(?=(\d{3})+(?!\d))/gu, " ");
|
|
10792
|
+
const bytePair = (bytes) => t2("capabilities.prompt.bytesPair", {
|
|
10793
|
+
bytes: group(bytes),
|
|
10794
|
+
kb: (bytes / 1024).toFixed(1)
|
|
10795
|
+
});
|
|
10796
|
+
const write2 = (next) => onChange(
|
|
10797
|
+
CONFIG_FIELDS.find((field2) => field2.key === "promptText"),
|
|
10798
|
+
JSON.stringify({ schema: PROMPT_TEXT_SCHEMA, overrides: next })
|
|
10799
|
+
);
|
|
10800
|
+
const update = (slotId, next) => {
|
|
10801
|
+
const base2 = { ...overrides2 };
|
|
10802
|
+
if (next === void 0) delete base2[slotId];
|
|
10803
|
+
else base2[slotId] = next;
|
|
10804
|
+
setDraft(base2);
|
|
10805
|
+
};
|
|
10806
|
+
const save = () => {
|
|
10807
|
+
if (draft === null) return;
|
|
10808
|
+
write2(draft);
|
|
10809
|
+
setDraft(null);
|
|
10810
|
+
};
|
|
10811
|
+
const cancel = () => setDraft(null);
|
|
10812
|
+
const pending = draft !== null;
|
|
10813
|
+
const unmeasuredSlots = account.counts.unmeasuredSlots;
|
|
10814
|
+
const dynamicSlots = account.counts.dynamicSlots;
|
|
10815
|
+
const unwiredAnchors = account.anchors.filter((anchor) => anchor.wired !== true);
|
|
10816
|
+
const measuredBytes = account.owners.A + account.owners.B + account.owners.C;
|
|
10817
|
+
const ownerOf = (anchor) => anchor.owner === "mixed" ? "mixed" : anchor.owner;
|
|
10818
|
+
const ownerAnchors = (key) => account.anchors.filter((anchor) => ownerOf(anchor) === key).length;
|
|
10819
|
+
const icon = (path) => h("svg", {
|
|
10820
|
+
viewBox: "0 0 20 20",
|
|
10821
|
+
width: 16,
|
|
10822
|
+
height: 16,
|
|
10823
|
+
fill: "none",
|
|
10824
|
+
stroke: "currentColor",
|
|
10825
|
+
"stroke-width": 1.6,
|
|
10826
|
+
"stroke-linecap": "round",
|
|
10827
|
+
"stroke-linejoin": "round",
|
|
10828
|
+
"aria-hidden": "true"
|
|
10829
|
+
}, ...path.map((d, index2) => h("path", { key: index2, d })));
|
|
10830
|
+
const card = (key, labelKey, glyph) => {
|
|
10831
|
+
const mixed = key === "mixed";
|
|
10832
|
+
const bytes = account.owners[key] ?? 0;
|
|
10833
|
+
const value_ = mixed ? t2("capabilities.prompt.cardMixed", { count: ownerAnchors("mixed") }) : bytes > 0 ? `${bytePair(bytes)} \xB7 ${t2("capabilities.prompt.cardMetaAnchors", { count: ownerAnchors(key) })}` : t2("capabilities.prompt.cardMetaAnchors", { count: ownerAnchors(key) });
|
|
10834
|
+
return h(
|
|
10835
|
+
"div",
|
|
10836
|
+
{ key, className: "ptcPlusPromptCard", "data-owner": key },
|
|
10837
|
+
h("span", { className: "ptcPlusPromptCardIcon" }, glyph),
|
|
10838
|
+
h(
|
|
10839
|
+
"span",
|
|
10840
|
+
{ className: "ptcPlusPromptCardBody" },
|
|
10841
|
+
h("span", { className: "ptcPlusPromptCardLabel" }, t2(labelKey)),
|
|
10842
|
+
mixed ? h("span", { className: "ptcPlusPromptCardMeta" }, value_) : h("span", { className: "ptcPlusPromptCardValue", "data-owner-bytes": String(account.owners[key] ?? 0) }, value_)
|
|
10843
|
+
)
|
|
10844
|
+
);
|
|
10845
|
+
};
|
|
10846
|
+
const cards = h(
|
|
10847
|
+
"div",
|
|
10848
|
+
{ className: "ptcPlusPromptCards" },
|
|
10849
|
+
card("A", "capabilities.prompt.ownerEditable", icon(["M4 16h3l9-9-3-3-9 9v3Z", "M12.5 4.5 15.5 7.5"])),
|
|
10850
|
+
card("B", "capabilities.prompt.ownerReadOnly", icon(["M5.5 9V6.5a4.5 4.5 0 0 1 9 0V9", "M4.5 9h11v7h-11Z"])),
|
|
10851
|
+
card("C", "capabilities.prompt.ownerOther", icon(["M10 10a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z", "M4 17c0-3 2.7-5 6-5s6 2 6 5"])),
|
|
10852
|
+
card("mixed", "capabilities.prompt.ownerMixed", icon(["M4 6h12", "M4 10h12", "M4 14h12", "M13 4v4", "M7 8v4"]))
|
|
10853
|
+
);
|
|
10854
|
+
const strip = h(
|
|
10855
|
+
"p",
|
|
10856
|
+
{ className: "ptcPlusPromptStrip", "data-prompt-strip": String(unwiredAnchors.length) },
|
|
10857
|
+
t2("capabilities.prompt.strip", {
|
|
10858
|
+
anchors: unwiredAnchors.length,
|
|
10859
|
+
bytes: group(measuredBytes),
|
|
10860
|
+
kb: (measuredBytes / 1024).toFixed(1),
|
|
10861
|
+
total: account.counts.total
|
|
10862
|
+
})
|
|
10863
|
+
);
|
|
10864
|
+
const reasonsOf = (anchor) => {
|
|
10865
|
+
const reasons = [...new Set(anchor.slots.map((slot) => slot.reason).filter(Boolean))];
|
|
10866
|
+
return reasons.length === 0 ? "\u2014" : reasons.map((reason) => promptReasonLabel(t2, reason)).join(" + ");
|
|
10867
|
+
};
|
|
10868
|
+
const kindsOf = (anchor) => [...new Set(anchor.slots.map((slot) => slot.kind))].map((kind) => promptKindLabel(t2, kind)).join(" + ");
|
|
10869
|
+
const splitOf = (anchor) => {
|
|
10870
|
+
const measured = anchor.slots.filter((slot) => slot.measured === true && slot.bytes > 0);
|
|
10871
|
+
return measured.length > 1 ? t2("capabilities.prompt.anchorBytesSplit", {
|
|
10872
|
+
parts: measured.map((slot) => `${slot.slotId.split(".").pop()} ${slot.bytes}`).join(" / ")
|
|
10873
|
+
}) : null;
|
|
10874
|
+
};
|
|
10875
|
+
const select = (anchorId) => setSelectedAnchorId(anchorId);
|
|
10876
|
+
React32.useEffect(() => {
|
|
10877
|
+
if (selectedAnchorId === null) return;
|
|
10878
|
+
const node = anchorPanelRef.current;
|
|
10879
|
+
if (node === null || typeof node.scrollIntoView !== "function") return;
|
|
10880
|
+
node.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
10881
|
+
}, [selectedAnchorId]);
|
|
10882
|
+
const rowKey = (event, anchorId) => {
|
|
10883
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
10884
|
+
event.preventDefault();
|
|
10885
|
+
select(anchorId);
|
|
10886
|
+
};
|
|
10887
|
+
const anchorRow = (anchor, index2) => {
|
|
10888
|
+
const split = splitOf(anchor);
|
|
10889
|
+
return h(
|
|
10890
|
+
"tr",
|
|
10891
|
+
{
|
|
10892
|
+
key: anchor.anchorId,
|
|
10893
|
+
className: "ptcPlusPromptRow",
|
|
10894
|
+
"data-anchor-id": anchor.anchorId,
|
|
10895
|
+
"data-wired": anchor.wired === true ? "true" : "false",
|
|
10896
|
+
// A plain <table> row cannot carry aria-selected (that needs role="grid"),
|
|
10897
|
+
// so the expanded row is announced with aria-current instead.
|
|
10898
|
+
"data-selected": selectedAnchorId === anchor.anchorId ? "true" : "false",
|
|
10899
|
+
"aria-current": selectedAnchorId === anchor.anchorId ? "true" : void 0,
|
|
10900
|
+
tabIndex: 0,
|
|
10901
|
+
onClick: () => select(anchor.anchorId),
|
|
10902
|
+
onKeyDown: (event) => rowKey(event, anchor.anchorId)
|
|
10903
|
+
},
|
|
10904
|
+
h("td", { className: "ptcPlusPromptIndex" }, String(index2)),
|
|
10905
|
+
h("td", null, h("span", { className: "ptcPlusPromptChannel", "data-channel": anchor.channel }, anchor.channel)),
|
|
10906
|
+
h("td", null, h("code", { className: "ptcPlusPromptAnchorId", title: anchor.anchorId }, anchor.anchorId)),
|
|
10907
|
+
h("td", null, h("span", { className: "ptcPlusPromptPresence", title: t2(anchor.presence) }, t2(anchor.presence))),
|
|
10908
|
+
h(
|
|
10909
|
+
"td",
|
|
10910
|
+
{ className: "ptcPlusPromptBytesCell" },
|
|
10911
|
+
anchor.wired !== true ? h("span", { "data-anchor-bytes": "unwired" }, t2("capabilities.prompt.unwiredRow", { slots: anchor.unmeasuredSlots })) : h(
|
|
10912
|
+
"span",
|
|
10913
|
+
{ "data-anchor-bytes": String(anchor.bytes) },
|
|
10914
|
+
paused ? t2("capabilities.prompt.pausedBytes", { bytes: anchor.bytes }) : t2("capabilities.prompt.cardBytes", { bytes: anchor.bytes }),
|
|
10915
|
+
split === null ? null : h("small", { className: "ptcPlusPromptSplit", "data-anchor-split": "true" }, split)
|
|
10916
|
+
)
|
|
10917
|
+
),
|
|
10918
|
+
h("td", { className: "ptcPlusPromptReasonCell" }, reasonsOf(anchor)),
|
|
10919
|
+
h(
|
|
10920
|
+
"td",
|
|
10921
|
+
{ className: "ptcPlusPromptKindCell" },
|
|
10922
|
+
kindsOf(anchor),
|
|
10923
|
+
anchor.wired !== true ? h(
|
|
10924
|
+
"span",
|
|
10925
|
+
{ className: "ptcPlusPromptTag", "data-prompt-unwired-tag": "true" },
|
|
10926
|
+
t2("capabilities.prompt.unwiredTag")
|
|
10927
|
+
) : null
|
|
10928
|
+
)
|
|
10929
|
+
);
|
|
10930
|
+
};
|
|
10931
|
+
const hostRow = (section, index2) => h(
|
|
10932
|
+
"tr",
|
|
10933
|
+
{
|
|
10934
|
+
key: section.id,
|
|
10935
|
+
className: "ptcPlusPromptRow ptcPlusPromptHostRow",
|
|
10936
|
+
"data-host-row": section.id
|
|
10937
|
+
},
|
|
10938
|
+
h("td", { className: "ptcPlusPromptIndex" }, String(index2)),
|
|
10939
|
+
h("td", null, h("span", { className: "ptcPlusPromptChannel" }, "prompt")),
|
|
10940
|
+
h("td", null, h("code", { className: "ptcPlusPromptAnchorId", title: section.id }, section.id)),
|
|
10941
|
+
h("td", null, h("span", { className: "ptcPlusPromptPresence" }, t2(section.presence))),
|
|
10942
|
+
h("td", { className: "ptcPlusPromptBytesCell" }, t2("capabilities.prompt.hostUnavailable")),
|
|
10943
|
+
h("td", { className: "ptcPlusPromptReasonCell" }, "\u2014"),
|
|
10944
|
+
h("td", { className: "ptcPlusPromptKindCell" }, t2("capabilities.prompt.ownerHost"))
|
|
10945
|
+
);
|
|
10946
|
+
const table = h(
|
|
10947
|
+
"table",
|
|
10948
|
+
{ className: "ptcPlusPromptTable" },
|
|
10949
|
+
h(
|
|
10950
|
+
"colgroup",
|
|
10951
|
+
null,
|
|
10952
|
+
h("col", { className: "ptcPlusPromptColIndex" }),
|
|
10953
|
+
h("col", { className: "ptcPlusPromptColChannel" }),
|
|
10954
|
+
h("col", { className: "ptcPlusPromptColAnchor" }),
|
|
10955
|
+
h("col", { className: "ptcPlusPromptColPresence" }),
|
|
10956
|
+
h("col", { className: "ptcPlusPromptColBytes" }),
|
|
10957
|
+
h("col", { className: "ptcPlusPromptColReason" }),
|
|
10958
|
+
h("col", { className: "ptcPlusPromptColKind" })
|
|
10959
|
+
),
|
|
10960
|
+
h("thead", null, h(
|
|
10961
|
+
"tr",
|
|
10962
|
+
null,
|
|
10963
|
+
h("th", { scope: "col", className: "ptcPlusPromptIndex" }, ""),
|
|
10964
|
+
h("th", { scope: "col" }, t2("capabilities.prompt.columnChannel")),
|
|
10965
|
+
h("th", { scope: "col" }, t2("capabilities.prompt.columnAnchor")),
|
|
10966
|
+
h("th", { scope: "col" }, t2("capabilities.prompt.columnPresence")),
|
|
10967
|
+
h("th", { scope: "col" }, t2("capabilities.prompt.columnBytesSplit")),
|
|
10968
|
+
h("th", { scope: "col" }, t2("capabilities.prompt.columnReason")),
|
|
10969
|
+
h("th", { scope: "col" }, t2("capabilities.prompt.columnKind"))
|
|
10970
|
+
)),
|
|
10971
|
+
h(
|
|
10972
|
+
"tbody",
|
|
10973
|
+
null,
|
|
10974
|
+
...account.anchors.map((anchor, index2) => anchorRow(anchor, index2 + 1)),
|
|
10975
|
+
...HOST_CONTEXT_SECTIONS.map((section, index2) => hostRow(section, account.anchors.length + index2 + 1))
|
|
10976
|
+
)
|
|
10977
|
+
);
|
|
10978
|
+
const chip = (anchor, slot) => {
|
|
10979
|
+
const templateBytes = slot.measured === true && slot.kind === "projected";
|
|
10980
|
+
const aggregateSet = slot.kind === "aggregate";
|
|
10981
|
+
const shared = {
|
|
10982
|
+
className: "ptcPlusPromptChip",
|
|
10983
|
+
"data-slot-id": slot.slotId,
|
|
10984
|
+
"data-slot-kind": slot.kind,
|
|
10985
|
+
...templateBytes ? { "data-prompt-template-bytes": "true" } : {},
|
|
10986
|
+
...aggregateSet ? { "data-prompt-aggregate-set": "true" } : {},
|
|
10987
|
+
title: templateBytes ? `${slot.slotId} \xB7 ${t2("capabilities.prompt.templateBytes")}` : aggregateSet ? `${slot.slotId} \xB7 ${t2("capabilities.prompt.aggregateFrozen")}` : slot.slotId
|
|
10988
|
+
};
|
|
10989
|
+
if (slot.owner !== "A") {
|
|
10990
|
+
return h(
|
|
10991
|
+
"span",
|
|
10992
|
+
{ key: slot.slotId, ...shared, "data-readonly": "true" },
|
|
10993
|
+
h("span", { className: "ptcPlusPromptChipLabel" }, slot.slotId),
|
|
10994
|
+
h(
|
|
10995
|
+
"span",
|
|
10996
|
+
{ className: "ptcPlusPromptChipNote" },
|
|
10997
|
+
t2("capabilities.prompt.readonlyReason", { reason: promptReasonLabel(t2, slot.reason), kind: promptKindLabel(t2, slot.kind) })
|
|
10998
|
+
)
|
|
10999
|
+
);
|
|
11000
|
+
}
|
|
11001
|
+
const selected = (openSlots[anchor.anchorId] ?? editableSlots(anchor)[0]?.slotId) === slot.slotId;
|
|
11002
|
+
return h("button", {
|
|
11003
|
+
key: slot.slotId,
|
|
11004
|
+
...shared,
|
|
11005
|
+
type: "button",
|
|
11006
|
+
disabled: blocked,
|
|
11007
|
+
"aria-pressed": selected,
|
|
11008
|
+
onClick: () => setOpenSlots((previous) => ({ ...previous, [anchor.anchorId]: slot.slotId }))
|
|
11009
|
+
}, h("span", { className: "ptcPlusPromptChipLabel" }, slot.slotId));
|
|
11010
|
+
};
|
|
11011
|
+
const editableSlots = (anchor) => anchor.slots.filter((slot) => slot.owner === "A" && PROMPT_ASSETS.find((candidate) => candidate.id === slot.slotId)?.defaultText !== null);
|
|
11012
|
+
const editorFor = (anchor) => {
|
|
11013
|
+
const slots = editableSlots(anchor);
|
|
11014
|
+
if (anchor.wired !== true || slots.length === 0) return null;
|
|
11015
|
+
const selectedId = openSlots[anchor.anchorId] ?? slots[0].slotId;
|
|
11016
|
+
const slot = slots.find((candidate) => candidate.slotId === selectedId) ?? slots[0];
|
|
11017
|
+
const asset = PROMPT_ASSETS.find((candidate) => candidate.id === slot.slotId);
|
|
11018
|
+
const override = Object.hasOwn(overrides2, slot.slotId) ? overrides2[slot.slotId] : void 0;
|
|
11019
|
+
const current = override ?? asset.defaultText;
|
|
11020
|
+
return h(
|
|
11021
|
+
"div",
|
|
11022
|
+
{ key: slot.slotId, className: "ptcPlusPromptEditor", "data-editor-slot": slot.slotId },
|
|
11023
|
+
h("textarea", {
|
|
11024
|
+
id: `${id2}-prompt-${slot.slotId}`,
|
|
11025
|
+
rows: 3,
|
|
11026
|
+
disabled: blocked,
|
|
11027
|
+
spellCheck: false,
|
|
11028
|
+
className: "ptcPlusPromptTextarea",
|
|
11029
|
+
"aria-label": slot.slotId,
|
|
11030
|
+
value: current,
|
|
11031
|
+
onChange: (event) => update(slot.slotId, event.target.value === "" ? void 0 : event.target.value)
|
|
11032
|
+
}),
|
|
11033
|
+
h(
|
|
11034
|
+
"div",
|
|
11035
|
+
{ className: "ptcPlusPromptEditorFoot" },
|
|
11036
|
+
h(
|
|
11037
|
+
"span",
|
|
11038
|
+
{ className: "ptcPlusPromptHint" },
|
|
11039
|
+
t2("capabilities.prompt.bytesOfLimit", { used: byteCount(current), max: PROMPT_TEXT_MAX_SLOT_BYTES })
|
|
11040
|
+
),
|
|
11041
|
+
h(
|
|
11042
|
+
"span",
|
|
11043
|
+
{ className: "ptcPlusPromptEditorActions" },
|
|
11044
|
+
asset.omittable ? h("button", {
|
|
11045
|
+
type: "button",
|
|
11046
|
+
className: "ptcPlusButton",
|
|
11047
|
+
disabled: blocked,
|
|
11048
|
+
onClick: () => update(slot.slotId, "")
|
|
11049
|
+
}, t2("capabilities.prompt.omit")) : null,
|
|
11050
|
+
h("button", {
|
|
11051
|
+
type: "button",
|
|
11052
|
+
className: "ptcPlusButton",
|
|
11053
|
+
disabled: blocked || override === void 0,
|
|
11054
|
+
onClick: () => update(slot.slotId, void 0)
|
|
11055
|
+
}, t2("capabilities.prompt.reset"))
|
|
11056
|
+
)
|
|
11057
|
+
)
|
|
11058
|
+
);
|
|
11059
|
+
};
|
|
11060
|
+
const defaultAnchor = account.anchors.find((anchor) => anchor.wired === true && editableSlots(anchor).length > 0);
|
|
11061
|
+
const selectedAnchor = account.anchors.find((anchor) => anchor.anchorId === selectedAnchorId) ?? defaultAnchor;
|
|
11062
|
+
const selectedIndex = selectedAnchor === void 0 ? 0 : account.anchors.indexOf(selectedAnchor) + 1;
|
|
11063
|
+
const anchorPanel = h(
|
|
11064
|
+
"section",
|
|
11065
|
+
{ className: "ptcPlusPromptPanel", "data-prompt-panel": "anchor", ref: anchorPanelRef },
|
|
11066
|
+
h(
|
|
11067
|
+
"h5",
|
|
11068
|
+
{ className: "ptcPlusPromptPanelTitle" },
|
|
11069
|
+
t2("capabilities.prompt.rowExpand", { index: selectedIndex })
|
|
11070
|
+
),
|
|
11071
|
+
selectedAnchor === void 0 ? h("p", { className: "ptcPlusPromptHint" }, t2("capabilities.prompt.rowExpandHint")) : h(
|
|
11072
|
+
"div",
|
|
11073
|
+
{ className: "ptcPlusPromptPanelBody" },
|
|
11074
|
+
h(
|
|
11075
|
+
"div",
|
|
11076
|
+
{ className: "ptcPlusPromptChips", "data-anchor-chips": selectedAnchor.anchorId },
|
|
11077
|
+
...selectedAnchor.slots.map((slot) => chip(selectedAnchor, slot))
|
|
11078
|
+
),
|
|
11079
|
+
selectedAnchor.wired !== true ? h("p", { className: "ptcPlusPromptHint" }, t2("capabilities.prompt.unwiredRow", { slots: selectedAnchor.unmeasuredSlots })) : editorFor(selectedAnchor)
|
|
11080
|
+
)
|
|
11081
|
+
);
|
|
11082
|
+
const changes = account.anchors.flatMap((anchor) => anchor.slots.map((slot) => ({ slot, builtin: PROMPT_ASSETS.find((asset) => asset.id === slot.slotId)?.defaultText })).filter((entry) => typeof entry.builtin === "string" && Object.hasOwn(overrides2, entry.slot.slotId) && overrides2[entry.slot.slotId] !== entry.builtin).map((entry) => {
|
|
11083
|
+
const effective = overrides2[entry.slot.slotId];
|
|
11084
|
+
const effect = anchor.channel === "plan" ? t2("capabilities.prompt.effectPlan") : anchor.channel === "install" ? t2("capabilities.prompt.effectInstall") : anchor.channel === "prompt" ? t2("capabilities.prompt.effectPrompt") : t2("capabilities.prompt.effectTrigger");
|
|
11085
|
+
return {
|
|
11086
|
+
anchor,
|
|
11087
|
+
slot: entry.slot,
|
|
11088
|
+
effect,
|
|
11089
|
+
before: byteCount(entry.builtin),
|
|
11090
|
+
after: byteCount(effective),
|
|
11091
|
+
delta: byteCount(effective) - byteCount(entry.builtin)
|
|
11092
|
+
};
|
|
11093
|
+
}));
|
|
11094
|
+
const restoreSlot = (slotId) => update(slotId, void 0);
|
|
11095
|
+
const diffPanel = h(
|
|
11096
|
+
"section",
|
|
11097
|
+
{
|
|
11098
|
+
className: "ptcPlusPromptPanel",
|
|
11099
|
+
...changes.length === 0 ? {} : { "data-prompt-diff": "true" },
|
|
11100
|
+
"data-prompt-diff-panel": "true"
|
|
11101
|
+
},
|
|
11102
|
+
h("h5", { className: "ptcPlusPromptPanelTitle" }, t2("capabilities.prompt.diffTitle")),
|
|
11103
|
+
changes.length === 0 ? h("p", { className: "ptcPlusPromptHint" }, t2("capabilities.prompt.diffEmpty")) : h(
|
|
11104
|
+
"ul",
|
|
11105
|
+
{ className: "ptcPlusPromptDiffList" },
|
|
11106
|
+
...changes.map((entry, index2) => h(
|
|
11107
|
+
"li",
|
|
11108
|
+
{
|
|
11109
|
+
key: entry.slot.slotId,
|
|
11110
|
+
className: "ptcPlusPromptDiffRow",
|
|
11111
|
+
"data-diff-anchor": entry.anchor.anchorId,
|
|
11112
|
+
"data-diff-slot": entry.slot.slotId
|
|
11113
|
+
},
|
|
11114
|
+
h("span", { className: "ptcPlusPromptDot", "data-tone": String(index2 % 3) }),
|
|
11115
|
+
h(
|
|
11116
|
+
"span",
|
|
11117
|
+
{ className: "ptcPlusPromptDiffBody" },
|
|
11118
|
+
h(
|
|
11119
|
+
"span",
|
|
11120
|
+
{ className: "ptcPlusPromptDiffHead" },
|
|
11121
|
+
h("code", { className: "ptcPlusPromptDiffSlot" }, entry.slot.slotId),
|
|
11122
|
+
h("span", { className: "ptcPlusPromptHint" }, entry.effect)
|
|
11123
|
+
),
|
|
11124
|
+
h(
|
|
11125
|
+
"span",
|
|
11126
|
+
{ className: "ptcPlusPromptDiffDelta" },
|
|
11127
|
+
t2("capabilities.prompt.diffBytes", {
|
|
11128
|
+
before: group(entry.before),
|
|
11129
|
+
after: group(entry.after),
|
|
11130
|
+
delta: entry.delta > 0 ? `+${group(entry.delta)}` : group(entry.delta)
|
|
11131
|
+
}),
|
|
11132
|
+
h("button", {
|
|
11133
|
+
type: "button",
|
|
11134
|
+
className: "ptcPlusButton",
|
|
11135
|
+
disabled: blocked,
|
|
11136
|
+
onClick: () => restoreSlot(entry.slot.slotId)
|
|
11137
|
+
}, t2("capabilities.prompt.reset"))
|
|
11138
|
+
)
|
|
11139
|
+
)
|
|
11140
|
+
))
|
|
11141
|
+
),
|
|
11142
|
+
h(
|
|
11143
|
+
"div",
|
|
11144
|
+
{ className: "ptcPlusPromptActions" },
|
|
11145
|
+
h("button", {
|
|
11146
|
+
type: "button",
|
|
11147
|
+
className: "ptcPlusButton",
|
|
11148
|
+
"data-kind": "primary",
|
|
11149
|
+
disabled: blocked || !pending,
|
|
11150
|
+
onClick: save
|
|
11151
|
+
}, t2("capabilities.prompt.save")),
|
|
11152
|
+
h(
|
|
11153
|
+
"button",
|
|
11154
|
+
{ type: "button", className: "ptcPlusButton", disabled: blocked || !pending, onClick: cancel },
|
|
11155
|
+
t2("capabilities.prompt.cancel")
|
|
11156
|
+
)
|
|
11157
|
+
)
|
|
11158
|
+
);
|
|
11159
|
+
return h(
|
|
11160
|
+
"section",
|
|
11161
|
+
{
|
|
11162
|
+
className: "ptcPlusPromptText",
|
|
11163
|
+
"data-prompt-paused": paused ? "true" : "false"
|
|
11164
|
+
},
|
|
11165
|
+
h(
|
|
11166
|
+
"header",
|
|
11167
|
+
{ className: "ptcPlusPromptHeader" },
|
|
11168
|
+
h("span", { className: "ptcPlusPromptHeaderIcon" }, icon(["M10 2.5 12 8l5.5 2-5.5 2-2 5.5-2-5.5L2.5 10 8 8Z"])),
|
|
11169
|
+
h(
|
|
11170
|
+
"span",
|
|
11171
|
+
{ className: "ptcPlusPromptHeaderBody" },
|
|
11172
|
+
h("h4", { className: "ptcPlusPromptTitle" }, t2("capabilities.prompt.title")),
|
|
11173
|
+
h("p", { className: "ptcPlusPromptSubtitle" }, t2("capabilities.prompt.subtitle"))
|
|
11174
|
+
)
|
|
11175
|
+
),
|
|
11176
|
+
paused ? h(
|
|
11177
|
+
"p",
|
|
11178
|
+
{ className: "ptcPlusPromptPaused", role: "status", "data-prompt-paused-notice": "true" },
|
|
11179
|
+
t2("capabilities.prompt.paused")
|
|
11180
|
+
) : null,
|
|
11181
|
+
readError === void 0 ? null : h("p", { className: "ptcPlusPromptHint" }, t2("capabilities.prompt.unreadable", { error: readError })),
|
|
11182
|
+
...resolved.reported.map((entry, index2) => h(
|
|
11183
|
+
"p",
|
|
11184
|
+
{ key: `report-${index2}`, className: "ptcPlusPromptHint" },
|
|
11185
|
+
t2("capabilities.prompt.reported", {
|
|
11186
|
+
asset: entry.slotId ?? entry.anchorId ?? "document",
|
|
11187
|
+
reason: entry.reason
|
|
11188
|
+
})
|
|
11189
|
+
)),
|
|
11190
|
+
cards,
|
|
11191
|
+
strip,
|
|
11192
|
+
h(
|
|
11193
|
+
"p",
|
|
11194
|
+
{ className: "ptcPlusPromptHint", "data-prompt-slot-counts": "true" },
|
|
11195
|
+
t2("capabilities.prompt.slotCounts", { bytes: group(measuredBytes), unmeasured: unmeasuredSlots, dynamic: dynamicSlots })
|
|
11196
|
+
),
|
|
11197
|
+
table,
|
|
11198
|
+
h("div", { className: "ptcPlusPromptPanels" }, anchorPanel, diffPanel),
|
|
11199
|
+
h("p", { className: "ptcPlusPromptIntro" }, t2("capabilities.prompt.intro"))
|
|
11200
|
+
);
|
|
11201
|
+
}
|
|
10044
11202
|
function CapabilityWorkbench({
|
|
10045
11203
|
value,
|
|
10046
11204
|
configurationReady,
|
|
@@ -10070,7 +11228,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10070
11228
|
}) {
|
|
10071
11229
|
const [tab, setTab] = React32.useState("manual");
|
|
10072
11230
|
const [contextSection, setContextSection] = React32.useState("description");
|
|
10073
|
-
const tabs = ["manual", "budgets", "statistics", "plans"];
|
|
11231
|
+
const tabs = ["manual", "budgets", "statistics", "prompt", "plans"];
|
|
10074
11232
|
const feedback = saving ? t2("state.syncing") : saveStatus && saveStatus.key !== "status.applied" ? t2(saveStatus.key, saveStatus.params) : t2(configurationWritable ? "capabilities.savedForNew" : "footer.readOnly");
|
|
10075
11233
|
return h(
|
|
10076
11234
|
"div",
|
|
@@ -10090,7 +11248,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10090
11248
|
t: t2,
|
|
10091
11249
|
id: id2,
|
|
10092
11250
|
onNavigate: (key) => {
|
|
10093
|
-
setTab(key === "rules" ? "manual" : key === "statistics" ? "statistics" : "budgets");
|
|
11251
|
+
setTab(key === "rules" ? "manual" : key === "statistics" ? "statistics" : key === "promptText" ? "prompt" : "budgets");
|
|
10094
11252
|
if (["description", "recovery", "preview"].includes(key)) setContextSection(key);
|
|
10095
11253
|
}
|
|
10096
11254
|
}),
|
|
@@ -10119,7 +11277,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10119
11277
|
"aria-labelledby": `${id2}-tab-${key}`,
|
|
10120
11278
|
hidden: tab !== key
|
|
10121
11279
|
},
|
|
10122
|
-
h(
|
|
11280
|
+
key === "prompt" ? null : h(
|
|
10123
11281
|
"div",
|
|
10124
11282
|
{ className: "ptcPlusTaskHead" },
|
|
10125
11283
|
h("h4", null, t2(`capabilities.title.${key}`)),
|
|
@@ -10167,7 +11325,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10167
11325
|
id: id2,
|
|
10168
11326
|
section: contextSection,
|
|
10169
11327
|
setSection: setContextSection
|
|
10170
|
-
}) : h(ConfigurationProfiles, { value, plans, disabled, writable: configurationWritable, onChange, onApplyConfiguration, t: t2 })
|
|
11328
|
+
}) : key === "prompt" ? tab === "prompt" ? h(PromptTextSettings, { value, disabled, onChange, t: t2, id: id2 }) : null : h(ConfigurationProfiles, { value, plans, disabled, writable: configurationWritable, onChange, onApplyConfiguration, t: t2 })
|
|
10171
11329
|
))
|
|
10172
11330
|
);
|
|
10173
11331
|
}
|
|
@@ -11861,7 +13019,9 @@ function createReplView(React32, deps) {
|
|
|
11861
13019
|
memory,
|
|
11862
13020
|
(value) => setObserved({ sessionId, source: memory, value })
|
|
11863
13021
|
) : void 0, [active, observeRepl, sessionId, memory, elementRef]);
|
|
11864
|
-
|
|
13022
|
+
if (observed?.sessionId !== sessionId) return memory;
|
|
13023
|
+
if (!memory.available && observed.value?.available === true) return observed.value;
|
|
13024
|
+
return observed.source === memory ? observed.value : memory;
|
|
11865
13025
|
}
|
|
11866
13026
|
function ReplBindingInspector({ entry, preview, t: t2 }) {
|
|
11867
13027
|
const readable = preview?.status === "readable";
|
|
@@ -12435,7 +13595,7 @@ var {
|
|
|
12435
13595
|
appendArray: appendArray2,
|
|
12436
13596
|
popArray
|
|
12437
13597
|
} = runtimeIntrinsics;
|
|
12438
|
-
function
|
|
13598
|
+
function isRecord4(value) {
|
|
12439
13599
|
return value !== null && typeof value === "object" && !isArray2(value);
|
|
12440
13600
|
}
|
|
12441
13601
|
function assertOwnFields(value, allowed, label) {
|
|
@@ -12452,7 +13612,7 @@ function assertOwnFields(value, allowed, label) {
|
|
|
12452
13612
|
var FIELDS = /* @__PURE__ */ new Set(["includeDeclaration", "instructions", "enabled", "declaration"]);
|
|
12453
13613
|
function normalizeBindingModelContext(value) {
|
|
12454
13614
|
if (value === void 0) return void 0;
|
|
12455
|
-
if (!
|
|
13615
|
+
if (!isRecord4(value)) throw new TypeError("binding modelContext must be an object");
|
|
12456
13616
|
assertOwnFields(value, FIELDS, "binding modelContext");
|
|
12457
13617
|
const { includeDeclaration = true, instructions = "", enabled = true, declaration = "" } = value;
|
|
12458
13618
|
if (typeof includeDeclaration !== "boolean") throw new TypeError("binding modelContext.includeDeclaration must be a boolean");
|
|
@@ -12485,7 +13645,7 @@ var MAX_COMMAND_ID_LENGTH = 256;
|
|
|
12485
13645
|
var VIEW_FIELDS = /* @__PURE__ */ new Set(["phase", "capability", "commandId"]);
|
|
12486
13646
|
var PHASES2 = /* @__PURE__ */ new Set(["idle", "pending", "ready", "failed"]);
|
|
12487
13647
|
function normalizeCandidate(value) {
|
|
12488
|
-
if (!
|
|
13648
|
+
if (!isRecord4(value) || typeof value.requestId !== "string" || value.requestId.length === 0 || value.requestId.length > 128 || !Number.isSafeInteger(value.version) || value.version < 1 || !["new", "edit"].includes(value.mode) || !isRecord4(value.entry) || !["namespace", "top-level"].includes(value.entry.scope) || value.entry.enabled !== false || !Array.isArray(value.entry.symbols) || value.entry.symbols.some((symbol) => typeof symbol !== "string") || ["id", "name", "purpose", "source"].some((key) => typeof value.entry[key] !== "string") || value.entry.source.length === 0 || value.entry.source.length > 65536) {
|
|
12489
13649
|
throw new Error("invalid dsh-ptc-plus accepted binding candidate");
|
|
12490
13650
|
}
|
|
12491
13651
|
const modelContext = normalizeBindingModelContext(value.entry.modelContext);
|
|
@@ -12534,7 +13694,7 @@ function historyFields(value) {
|
|
|
12534
13694
|
return value.history === void 0 ? {} : { history: normalizeHistory(value.history) };
|
|
12535
13695
|
}
|
|
12536
13696
|
function exactFields(value, fields) {
|
|
12537
|
-
if (!
|
|
13697
|
+
if (!isRecord4(value)) return false;
|
|
12538
13698
|
const keys2 = Reflect.ownKeys(value);
|
|
12539
13699
|
return keys2.length === fields.size && keys2.every((key) => typeof key === "string" && fields.has(key) && Object.prototype.propertyIsEnumerable.call(value, key));
|
|
12540
13700
|
}
|
|
@@ -39381,7 +40541,7 @@ var autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((view, from2, to,
|
|
|
39381
40541
|
// src/client-styles.js
|
|
39382
40542
|
var CLIENT_STYLE_ID = "ptc-plus-client-style";
|
|
39383
40543
|
var CLIENT_CSS = `
|
|
39384
|
-
.ptcPlusCombination{margin-bottom:16px;padding:12px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;min-width:0}.ptcPlusCombination .ptcPlusTaskHead{margin-bottom:10px}.ptcPlusCombinationChoices{display:grid;grid-template-columns:
|
|
40544
|
+
.ptcPlusCombination{margin-bottom:16px;padding:12px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;min-width:0}.ptcPlusCombination .ptcPlusTaskHead{margin-bottom:10px}.ptcPlusCombinationChoices{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.ptcPlusCombinationChoice{appearance:none;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:62px;padding:8px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:12px;line-height:18px;text-align:center;overflow-wrap:anywhere;cursor:pointer}.ptcPlusCombinationChoice small{font-size:11px;color:var(--dsw-alias-label-tertiary)}.ptcPlusCombinationChoice[data-state=selected]{border-color:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4d6bfe) 20%,transparent);background:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4d6bfe) 6%,var(--dsw-alias-bg-layer-2))}.ptcPlusCombinationChoice[data-state=selected] small{color:var(--dsw-alias-state-business-primary,#4d6bfe)}.ptcPlusCombinationChoice[data-state=paused] small{color:var(--dsw-alias-state-warning-primary,#9b6e22)}.ptcPlusCombinationChoice:hover{background:var(--dsw-alias-interactive-bg-hover)}.ptcPlusCombinationChoice:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#4d6bfe);outline-offset:2px}.ptcPlusCombinationFacts{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12px;line-height:20px}.ptcPlusCombinationSession{margin-top:10px;min-width:0;overflow-wrap:anywhere}.ptcPlusCombination .ptcPlusCapabilitySessionTools{margin-top:12px}.ptcPlusCombination .ptcPlusCapabilitySaveState{max-width:100%;overflow-wrap:anywhere}@media(max-width:720px){.ptcPlusCombinationChoices{grid-template-columns:minmax(0,1fr)}.ptcPlusCombinationChoice{flex-direction:row;justify-content:space-between;min-height:40px;text-align:start;gap:10px}.ptcPlusCombinationChoice small{white-space:nowrap}.ptcPlusCombination{padding:10px}.ptcPlusCombination .ptcPlusTaskHead{align-items:flex-start;flex-wrap:wrap}}
|
|
39385
40545
|
.ptcPlusSelectTrigger{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;height:34px;padding:0 11px;border:1px solid var(--dsw-alias-border-l4);border-radius:8px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;text-align:start;cursor:pointer}.ptcPlusSelectTrigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ptcPlusSelectTrigger:hover:not(:disabled){border-color:var(--dsw-alias-label-dimmed)}.ptcPlusSelectTrigger:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#4d6bfe);outline-offset:1px}.ptcPlusSelectTrigger:disabled{opacity:.45;cursor:not-allowed}.ptcPlusSelectChevron{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;color:var(--dsw-alias-label-secondary);line-height:0}.ptcPlusSelectChevron svg{display:block}.ptcPlusSelectMenu{z-index:1100;box-sizing:border-box;min-width:var(--radix-select-trigger-width);max-width:min(380px,calc(100vw - 24px));max-height:min(360px,var(--radix-select-content-available-height));overflow:hidden;border:1px solid var(--dsw-alias-border-l3);border-radius:10px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-elevation-prominent,0 12px 32px rgba(0,0,0,.18));font:13px/20px var(--dsw-font-family,system-ui,sans-serif)}.ptcPlusSelectViewport{max-height:inherit;overflow-y:auto;overscroll-behavior:contain;padding:5px}.ptcPlusSelectOption{position:relative;display:flex;align-items:center;min-height:32px;padding:5px 30px 5px 10px;outline:none;border-radius:6px;overflow-wrap:anywhere;cursor:pointer}.ptcPlusSelectOption[data-highlighted]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.ptcPlusSelectOption[data-state=checked]{color:var(--dsw-alias-state-business-primary,#4d6bfe)}.ptcPlusSelectOption[data-disabled]{opacity:.45;cursor:not-allowed}.ptcPlusSelectCheck{position:absolute;right:10px;color:var(--dsw-alias-state-business-primary,#4d6bfe)}
|
|
39386
40546
|
.ptcPlusTool,.ptcPlusComposerBindingAnchor{--ptc-plus-warning-label:color-mix(in srgb,var(--dsw-alias-state-warn-primary,#a15c00) 65%,var(--dsw-alias-label-primary,#18191c))}.ptcPlusTool{font-family:inherit;font-size:13px;line-height:18px}.ptcPlusTool .ptcPlusToolRow{box-sizing:border-box;height:auto;min-height:24px;align-items:flex-start;padding-block:3px}.ptcPlusToolDisclosureContent{min-width:0;flex:1}.ptcPlusTool .ptcPlusToolDisclosureLayout{min-width:0;align-items:flex-start}.ptcPlusTool .ptcPlusToolTitle,.ptcPlusTool .ptcPlusToolSummary,.ptcPlusTool .ptcPlusToolSummaryLine,.ptcPlusTool .ptcPlusToolState,.ptcPlusTool .ptcPlusToolDescription,.ptcPlusTool .ptcPlusToolSep{font-size:13px;line-height:18px}.ptcPlusTool .ptcPlusToolTitle{flex:none;margin-inline-end:6px}.ptcPlusTool .ptcPlusToolState{flex:none;white-space:nowrap}.ptcPlusTool .ptcPlusToolSep{display:inline-block;min-width:6px}.ptcPlusToolSummary{display:flex;min-width:0;align-items:baseline}.ptcPlusToolSummaryLine{display:flex;min-width:0;align-items:baseline;overflow:hidden}.ptcPlusToolDescription{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ptcPlusToolSummary .ptcPlusToolDescription{flex:1}.ptcPlusToolPreview{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;margin-inline-start:6px}.ptcPlusToolPreview .ptcPlusToolSummaryLine{display:block}.ptcPlusToolPreview .ptcPlusToolDescription{display:inline;white-space:normal;overflow-wrap:anywhere}.ptcPlusToolPreview .ptcPlusFeatures{margin:0}
|
|
39387
40547
|
.ptcPlusToolHover{position:fixed;inset:auto;margin:0;box-sizing:border-box;z-index:100;width:420px;max-height:360px;padding:14px 16px 0;display:flex;flex-direction:column;gap:10px;overflow:clip;pointer-events:none;user-select:none;border:1px solid var(--dsw-alias-border-l2,rgba(127,127,127,.2));border-radius:12px;background:var(--dsw-alias-bg-layer-1,var(--dsw-alias-bg-base,#fff));color:var(--dsw-alias-label-primary,#18191c);box-shadow:0 12px 36px rgba(0,0,0,.16);font-family:var(--dsw-font-family,system-ui,sans-serif);font-size:13px;line-height:19px}.ptcPlusToolHover *{pointer-events:none}.ptcPlusToolHover[hidden]{display:none}.ptcPlusToolHover::backdrop{display:none}.ptcPlusToolHoverHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none}.ptcPlusToolHoverHeading{font-weight:600;min-width:0}.ptcPlusToolHoverState{white-space:nowrap;font-size:12px;color:var(--dsw-alias-label-secondary)}.ptcPlusToolHoverHeader[data-state=error] .ptcPlusToolHoverState{color:var(--dsw-alias-state-error-primary)}.ptcPlusToolHoverHeader[data-state=stopped] .ptcPlusToolHoverState{color:var(--ptc-plus-warning-label,color-mix(in srgb,var(--dsw-alias-state-warn-primary,#a15c00) 65%,var(--dsw-alias-label-primary,#18191c)))}.ptcPlusToolHoverHeader[data-state=ok] .ptcPlusToolHoverState{color:var(--dsw-alias-state-success-primary,var(--dsw-alias-label-secondary))}.ptcPlusToolHoverContent{min-height:0;overflow:clip;display:flex;flex-direction:column;gap:10px}.ptcPlusToolHoverDescription{color:var(--dsw-alias-label-secondary);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:clip;overflow-wrap:anywhere}.ptcPlusToolHoverSection{min-height:0;overflow:clip;border-top:1px solid var(--dsw-alias-border-l2,rgba(127,127,127,.2));padding-top:8px}.ptcPlusToolHover .ptcPlusToolSectionLabel{display:block;margin-bottom:5px;color:var(--dsw-alias-label-secondary);font-size:12px}.ptcPlusToolHover .ptcPlusToolHoverCode{background:none;border:0;border-radius:0;margin:0;padding:0;overflow:clip}.ptcPlusToolHover .ptcPlusToolHoverCode pre,.ptcPlusToolHover pre.ptcPlusToolHoverCode,.ptcPlusToolHover .ptcPlusIoText{background:none;border:0;border-radius:0;margin:0!important;padding:0;max-height:none;overflow:clip;white-space:pre!important;word-break:normal;font-family:var(--ds-font-family-code,ui-monospace,SFMono-Regular,Consolas,monospace);font-size:12px;line-height:19px}.ptcPlusToolHover .ptcPlusFeatures{margin:0;max-height:19px;overflow:clip}.ptcPlusToolHoverFooter{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:9px 0;border-top:1px solid var(--dsw-alias-border-l2,rgba(127,127,127,.2));color:var(--dsw-alias-label-secondary);font-size:11px;line-height:16px}.ptcPlusToolHoverBounded{display:none;white-space:nowrap}.ptcPlusToolHoverBounded[data-truncated=true],.ptcPlusToolHover[data-clipped=true] .ptcPlusToolHoverBounded{display:block}
|
|
@@ -39412,7 +40572,69 @@ var CLIENT_CSS = `
|
|
|
39412
40572
|
.ptcPlusCapabilityToolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0}.ptcPlusCapabilityToolbar>.ptcPlusSearch{flex:1 1 220px;min-width:0}.ptcPlusCapabilityTypes{display:flex;flex-wrap:wrap;gap:5px}.ptcPlusCapabilityTypes button{appearance:none;padding:6px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:6px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;text-align:center;cursor:pointer}.ptcPlusCapabilityTypes [aria-pressed=true]{border-color:transparent;background:var(--dsw-alias-state-business-primary,#4d6bfe);color:var(--dsw-alias-bg-base,#fff)}
|
|
39413
40573
|
.ptcPlusCapabilityFilter{display:flex;flex-direction:column;min-width:0;gap:6px;font-size:12px;color:var(--dsw-alias-label-secondary)}.ptcPlusCapabilityFilter>.ptcPlusSelectTrigger{width:100%;max-width:100%;font-size:12px}.ptcPlusCapabilityFilterFields{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;padding:12px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px}.ptcPlusCapabilityFilterFields>.ptcPlusCapabilityFilter{flex:1 1 160px}.ptcPlusCapabilityOnlyCommon{display:flex;align-items:center;gap:6px;font-size:12px}.ptcPlusCapabilityOnlyCommon input{width:16px;height:16px;margin:0}.ptcPlusCapabilityResultLine,.ptcPlusActiveFilters{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:8px 0;color:var(--dsw-alias-label-secondary);font-size:11px}.ptcPlusCapabilityLink{appearance:none;padding:4px 0;border:0;background:transparent;color:var(--dsw-alias-state-business-primary,#4d6bfe);font:inherit;font-size:12px;cursor:pointer}.ptcPlusCapabilityLink:disabled{opacity:.5;cursor:default}
|
|
39414
40574
|
.ptcPlusCapabilityTable{min-width:0;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;overflow:hidden}.ptcPlusCapabilityColumns,.ptcPlusCapabilityItem{display:grid;grid-template-columns:minmax(140px,1.6fr) 54px minmax(65px,.75fr) minmax(92px,1fr) minmax(104px,1fr);align-items:center;gap:10px;padding:10px 12px}.ptcPlusCapabilityColumns{color:var(--dsw-alias-label-tertiary);font-size:11px;background:var(--dsw-alias-bg-layer-2)}.ptcPlusCapabilitySort{appearance:none;display:inline-flex;align-items:center;justify-content:flex-start;gap:4px;width:100%;min-height:28px;padding:3px 0;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer}.ptcPlusCapabilitySort>span{display:inline-flex;flex:none;align-items:center;justify-content:center;width:11px;height:11px;font-size:10px;line-height:1}.ptcPlusCapabilityColumns [aria-sort=ascending],.ptcPlusCapabilityColumns [aria-sort=descending]{color:var(--dsw-alias-state-business-primary,#4d6bfe)}.ptcPlusCapabilityContextCell>.ptcPlusCapabilityContext{width:100%}.ptcPlusCapabilityList{max-height:480px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.ptcPlusCapabilityItem{border-bottom:1px solid var(--dsw-alias-border-l2)}.ptcPlusCapabilityItem:last-child{border-bottom:0}.ptcPlusCapabilityItem[data-selected=true]{background:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4d6bfe) 6%,transparent)}.ptcPlusCapabilityItem:not([data-selected=true]){cursor:pointer}.ptcPlusCapabilityItem:not([data-selected=true]):hover{background:var(--dsw-alias-interactive-bg-hover)}.ptcPlusCapabilityItem>*{min-width:0}.ptcPlusCapabilityIdentity{display:flex;flex-direction:column;gap:3px;min-width:0}.ptcPlusCapabilityName{font-size:13px;overflow-wrap:anywhere}.ptcPlusCapabilityIdentity code{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:15px;overflow-wrap:anywhere}.ptcPlusCapabilitySource{color:var(--dsw-alias-label-secondary);font-size:11px;overflow-wrap:anywhere}.ptcPlusCapabilityBadge{justify-self:start;padding:2px 6px;border-radius:4px;background:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4d6bfe) 8%,transparent);color:var(--dsw-alias-state-business-primary,#4d6bfe);font-size:10px;line-height:17px}.ptcPlusCapabilityBadge[data-kind=skill]{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2)}.ptcPlusCapabilityAvailability{display:flex;align-items:center;gap:6px;font-size:11px}.ptcPlusCapabilityAvailability[data-state=closed],.ptcPlusCapabilityAvailability[data-state=unapplied],.ptcPlusCapabilityAvailability[data-state=source-closed],.ptcPlusCapabilityAvailability[data-state=unknown],.ptcPlusCapabilityAvailability[data-state=unavailable]{color:var(--dsw-alias-label-tertiary)}.ptcPlusCapabilityContext{appearance:none;display:flex;align-items:center;justify-content:center;gap:6px;padding:5px 2px;border:0;border-radius:5px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;text-align:center;cursor:pointer}.ptcPlusCapabilityContext{justify-content:space-between;text-align:start}.ptcPlusCapabilityContext svg{flex:none;color:var(--dsw-alias-label-tertiary)}.ptcPlusCapabilityWorkbench button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
|
|
39415
|
-
.ptcPlusCapabilityEditorFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
|
|
40575
|
+
.ptcPlusCapabilityEditorFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
|
|
40576
|
+
.ptcPlusPromptText{display:flex;flex-direction:column;gap:12px;min-width:0}
|
|
40577
|
+
.ptcPlusPromptHeader{display:flex;align-items:flex-start;gap:8px;min-width:0}
|
|
40578
|
+
.ptcPlusPromptHeaderIcon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:20px;height:20px;color:var(--dsw-alias-label-secondary)}
|
|
40579
|
+
.ptcPlusPromptHeaderBody{display:flex;flex-direction:column;gap:2px;min-width:0}
|
|
40580
|
+
.ptcPlusPromptTitle{margin:0;font-size:15px;line-height:22px;font-weight:600;color:var(--dsw-alias-label-primary)}
|
|
40581
|
+
.ptcPlusPromptSubtitle{margin:0;font-size:11px;line-height:18px;color:var(--dsw-alias-label-tertiary)}
|
|
40582
|
+
.ptcPlusPromptCards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
|
|
40583
|
+
.ptcPlusPromptCard{display:flex;align-items:center;gap:10px;min-width:0;padding:10px 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-1)}
|
|
40584
|
+
.ptcPlusPromptCardIcon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:26px;height:26px;border-radius:6px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary)}
|
|
40585
|
+
.ptcPlusPromptCardBody{display:flex;flex-direction:column;gap:1px;min-width:0}
|
|
40586
|
+
.ptcPlusPromptCardLabel{font-size:11px;line-height:16px;color:var(--dsw-alias-label-secondary)}
|
|
40587
|
+
.ptcPlusPromptCardValue,.ptcPlusPromptCardMeta{font-size:12px;line-height:18px;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}
|
|
40588
|
+
.ptcPlusPromptCardMeta{color:var(--dsw-alias-label-tertiary)}
|
|
40589
|
+
.ptcPlusPromptStrip{margin:0;padding:6px 10px;border-radius:6px;background:var(--dsw-alias-bg-layer-2);font-size:11px;line-height:18px;color:var(--dsw-alias-label-secondary)}
|
|
40590
|
+
.ptcPlusPromptIntro{margin:0;font-size:11px;line-height:17px;color:var(--dsw-alias-label-tertiary)}
|
|
40591
|
+
.ptcPlusPromptTable{width:100%;border-collapse:collapse;table-layout:fixed;font-size:11.5px;line-height:18px;color:var(--dsw-alias-label-primary)}
|
|
40592
|
+
.ptcPlusPromptTable th{padding:6px 8px;font-size:11px;font-weight:500;text-align:left;color:var(--dsw-alias-label-secondary);border-bottom:1px solid var(--dsw-alias-border-l2);white-space:nowrap}
|
|
40593
|
+
.ptcPlusPromptTable td{padding:6.5px 8px;border-bottom:1px solid color-mix(in srgb,var(--dsw-alias-border-l2) 55%,transparent);vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
40594
|
+
.ptcPlusPromptTable tbody tr:nth-child(even){background:color-mix(in srgb,var(--dsw-alias-bg-layer-2) 45%,transparent)}
|
|
40595
|
+
.ptcPlusPromptTable tbody tr{cursor:pointer}
|
|
40596
|
+
.ptcPlusPromptTable tbody tr:hover{background:color-mix(in srgb,var(--dsw-alias-bg-layer-2) 80%,transparent)}
|
|
40597
|
+
.ptcPlusPromptTable tbody tr[data-selected=true]{background:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4d6bfe) 10%,transparent)}
|
|
40598
|
+
.ptcPlusPromptTable tbody tr:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#4d6bfe);outline-offset:-2px}
|
|
40599
|
+
.ptcPlusPromptColIndex{width:28px}.ptcPlusPromptColChannel{width:58px}.ptcPlusPromptColAnchor{width:24%}.ptcPlusPromptColPresence{width:11%}.ptcPlusPromptColBytes{width:28%}.ptcPlusPromptColReason{width:15%}.ptcPlusPromptColKind{width:12%}
|
|
40600
|
+
.ptcPlusPromptIndex{font-family:var(--dsw-alias-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);font-size:10.5px;color:var(--dsw-alias-label-tertiary);text-align:right}
|
|
40601
|
+
.ptcPlusPromptChannel{display:inline-flex;align-items:center;padding:0 6px;border-radius:4px;background:var(--dsw-alias-bg-layer-2);font-size:10.5px;line-height:17px;color:var(--dsw-alias-label-secondary)}
|
|
40602
|
+
.ptcPlusPromptAnchorId{font-family:var(--dsw-alias-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);font-size:11px;color:var(--dsw-alias-label-primary)}
|
|
40603
|
+
.ptcPlusPromptPresence{display:inline-flex;align-items:center;padding:0 6px;border:1px solid var(--dsw-alias-border-l2);border-radius:4px;font-size:10.5px;line-height:16px;color:var(--dsw-alias-label-secondary)}
|
|
40604
|
+
.ptcPlusPromptBytesCell{font-family:var(--dsw-alias-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);font-size:10.5px}
|
|
40605
|
+
.ptcPlusPromptSplit{margin-left:4px;font-family:inherit;font-size:10px;color:var(--dsw-alias-label-tertiary)}
|
|
40606
|
+
.ptcPlusPromptReasonCell,.ptcPlusPromptKindCell{font-size:10.5px;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}
|
|
40607
|
+
.ptcPlusPromptTag{display:inline-flex;align-items:center;margin-left:6px;padding:0 5px;border:1px solid var(--dsw-alias-border-l2);border-radius:4px;font-size:10px;line-height:16px;color:var(--dsw-alias-label-secondary)}
|
|
40608
|
+
.ptcPlusPromptHostRow{background:var(--dsw-alias-bg-layer-2);cursor:default}
|
|
40609
|
+
.ptcPlusPromptPanels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
|
|
40610
|
+
.ptcPlusPromptPanel{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px}
|
|
40611
|
+
.ptcPlusPromptPanelTitle{margin:0;font-size:12px;line-height:18px;font-weight:600;color:var(--dsw-alias-label-primary)}
|
|
40612
|
+
.ptcPlusPromptPanelBody,.ptcPlusPromptEditor{display:flex;flex-direction:column;gap:8px;min-width:0}
|
|
40613
|
+
.ptcPlusPromptHint{margin:0;font-size:10.5px;line-height:17px;color:var(--dsw-alias-label-tertiary)}
|
|
40614
|
+
.ptcPlusPromptChips{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
|
|
40615
|
+
.ptcPlusPromptChip{display:inline-flex;align-items:center;gap:4px;appearance:none;max-width:100%;padding:2px 8px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;background:var(--dsw-alias-bg-layer-1);font-size:10.5px;line-height:18px;color:var(--dsw-alias-label-primary);cursor:pointer}
|
|
40616
|
+
.ptcPlusPromptChip[aria-pressed=true]{border-color:var(--dsw-alias-state-business-primary,#4d6bfe);background:var(--dsw-alias-state-business-primary,#4d6bfe);color:#fff}
|
|
40617
|
+
.ptcPlusPromptChip[data-readonly=true]{cursor:default;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary)}
|
|
40618
|
+
.ptcPlusPromptChipLabel{font-family:var(--dsw-alias-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);overflow-wrap:anywhere}
|
|
40619
|
+
.ptcPlusPromptChipNote{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere}
|
|
40620
|
+
.ptcPlusPromptChip[aria-pressed=true] .ptcPlusPromptChipNote{color:inherit;opacity:.85}
|
|
40621
|
+
.ptcPlusPromptTextarea{width:100%;box-sizing:border-box;min-height:132px;resize:vertical;font-family:var(--dsw-alias-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);font-size:11px;line-height:18px;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:6px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}
|
|
40622
|
+
.ptcPlusPromptEditorFoot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;min-width:0}
|
|
40623
|
+
.ptcPlusPromptEditorActions{display:flex;gap:8px;margin-left:auto}
|
|
40624
|
+
.ptcPlusPromptDiffList{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;min-width:0}
|
|
40625
|
+
.ptcPlusPromptDiffRow{display:flex;align-items:flex-start;gap:8px;min-width:0}
|
|
40626
|
+
.ptcPlusPromptDot{flex:none;width:7px;height:7px;margin-top:6px;border-radius:50%;background:var(--dsw-alias-state-success-primary,#22a06b)}
|
|
40627
|
+
.ptcPlusPromptDot[data-tone="1"]{background:var(--dsw-alias-state-business-primary,#4d6bfe)}
|
|
40628
|
+
.ptcPlusPromptDot[data-tone="2"]{background:var(--dsw-alias-state-warn-primary,#d98e04)}
|
|
40629
|
+
.ptcPlusPromptDiffBody{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1 1 auto}
|
|
40630
|
+
.ptcPlusPromptDiffHead{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-width:0}
|
|
40631
|
+
.ptcPlusPromptDiffSlot{font-family:var(--dsw-alias-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);font-size:10.5px;color:var(--dsw-alias-label-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
40632
|
+
.ptcPlusPromptDiffDelta{display:flex;align-items:center;gap:8px;font-family:var(--dsw-alias-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);font-size:10px;color:var(--dsw-alias-label-tertiary)}
|
|
40633
|
+
.ptcPlusPromptDiffDelta button{font-family:inherit;font-size:10px}
|
|
40634
|
+
.ptcPlusPromptActions{display:flex;justify-content:flex-end;gap:8px;margin-top:auto;padding-top:6px}
|
|
40635
|
+
|
|
40636
|
+
.ptcPlusPromptPaused{padding:8px 10px;border-radius:6px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-state-warn-primary);font-size:12px;line-height:18px;margin:0}
|
|
40637
|
+
@media(max-width:900px){.ptcPlusPromptCards{grid-template-columns:repeat(2,minmax(0,1fr))}.ptcPlusPromptPanels{grid-template-columns:minmax(0,1fr)}}
|
|
39416
40638
|
.ptcPlusPolicyRules{padding:14px;margin:12px 0;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2)}.ptcPlusPolicyRules h4{margin:0}.ptcPlusPolicyRule{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:10px 0}.ptcPlusPolicyRule>strong{flex:1 1 100px;min-width:0;overflow-wrap:anywhere;font-size:12px}.ptcPlusPolicyRule>.ptcPlusCapabilityFilter{flex:1 1 160px}
|
|
39417
40639
|
.ptcPlusContextLayout{display:grid;grid-template-columns:minmax(140px,27%) minmax(0,1fr);gap:20px;margin-top:16px}.ptcPlusContextNavigation{display:flex;flex-direction:column;gap:6px;padding:12px 12px 12px 0;border-right:1px solid var(--dsw-alias-border-l2)}.ptcPlusContextNavigation button{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 10px;appearance:none;border:0;border-left:3px solid transparent;border-radius:4px;padding:14px 12px;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;text-align:start;cursor:pointer}.ptcPlusContextNavigation [aria-selected=true]{border-left-color:var(--dsw-alias-state-business-primary,#4d6bfe);background:color-mix(in srgb,var(--dsw-alias-state-business-primary,#4d6bfe) 6%,transparent);color:var(--dsw-alias-state-business-primary,#4d6bfe)}.ptcPlusContextState{font-size:11px;line-height:18px;white-space:nowrap;color:var(--dsw-alias-label-secondary)}.ptcPlusContextState[data-enabled=true]{color:var(--dsw-alias-state-success-primary)}.ptcPlusContextState[data-paused=true]{color:var(--dsw-alias-state-warn-primary)}.ptcPlusContextSummary{flex-basis:100%;min-width:0;font-size:11px;line-height:18px;color:var(--dsw-alias-label-secondary);white-space:normal;overflow-wrap:anywhere}.ptcPlusContextContent{min-width:0;padding:12px 0}.ptcPlusContextContent h4{font-size:16px;margin:0}.ptcPlusContextContent h5{font-size:13px;line-height:20px;margin:0 0 12px}.ptcPlusContextContent>.ptcPlusCapabilityFilter{margin-top:16px}.ptcPlusPolicyAllocation{margin:18px 0}.ptcPlusAllocationChoices{display:flex;flex-wrap:wrap;gap:16px}.ptcPlusAllocationChoices label{display:flex;align-items:center;gap:8px;font-size:12px}.ptcPlusContextQuota,.ptcPlusAllocationPreview{margin:16px 0;padding:12px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px}
|
|
39418
40640
|
.ptcPlusCapabilityWorkbench .ptcPlusButton[data-kind=primary]{background:var(--dsw-alias-state-business-primary,#4d6bfe);color:var(--dsw-alias-bg-base,#fff);border-color:transparent}.ptcPlusCapabilityWorkbench summary{cursor:pointer;line-height:22px;font-size:12px}.ptcPlusCapabilityWorkbench summary:focus-visible,.ptcPlusCapabilityWorkbench button:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#4d6bfe);outline-offset:2px}.ptcPlusCapabilitySessionTools{margin-top:18px;padding-top:10px;border-top:1px solid var(--dsw-alias-border-l2)}.ptcPlusCapabilityApply{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin:12px 0}.ptcPlusCapabilityApply>.ptcPlusCapabilityFilter{flex:1 1 200px}.ptcPlusCapabilityRefresh{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}.ptcPlusCapabilityRefresh p{flex-basis:100%;margin:0;overflow-wrap:anywhere}.ptcPlusMenuUtilities .ptcPlusCapabilityRefresh{flex:1;align-self:stretch}.ptcPlusMenuUtilities .ptcPlusCapabilityRefresh>.ptcPlusMenuButton{width:100%}
|
|
@@ -39883,7 +41105,7 @@ function isReuseCount(value) {
|
|
|
39883
41105
|
return Number.isSafeInteger(value) && value >= 0;
|
|
39884
41106
|
}
|
|
39885
41107
|
function exactFields2(value, fields) {
|
|
39886
|
-
if (!
|
|
41108
|
+
if (!isRecord4(value)) return false;
|
|
39887
41109
|
const keys2 = Reflect.ownKeys(value);
|
|
39888
41110
|
return keys2.length === fields.size && keys2.every((key) => typeof key === "string" && fields.has(key) && Object.prototype.propertyIsEnumerable.call(value, key));
|
|
39889
41111
|
}
|
|
@@ -39982,6 +41204,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
39982
41204
|
"capabilities.combination.statistics": "\u4F7F\u7528\u7EDF\u8BA1",
|
|
39983
41205
|
"capabilities.combination.recovery": "\u63D0\u793A\u6062\u590D",
|
|
39984
41206
|
"capabilities.combination.preview": "\u8F93\u51FA\u8282\u9009",
|
|
41207
|
+
"capabilities.combination.promptText": "\u63D0\u793A\u6587\u672C",
|
|
39985
41208
|
"capabilities.combination.state.selected": "\u5DF2\u9009\u7528",
|
|
39986
41209
|
"capabilities.combination.state.unselected": "\u672A\u9009\u7528",
|
|
39987
41210
|
"capabilities.combination.state.paused": "\u5DF2\u6682\u505C",
|
|
@@ -40192,7 +41415,6 @@ var CHROME_COPY = Object.freeze({
|
|
|
40192
41415
|
"capabilities.quick.apply": "\u63D0\u4EA4\u5E76\u751F\u6548",
|
|
40193
41416
|
"capabilities.quick.prefill": "\u586B\u5165\u547D\u4EE4\u8349\u7A3F",
|
|
40194
41417
|
"capabilities.card.recorded": "\u4F1A\u8BDD\u80FD\u529B\u5DF2\u66F4\u65B0\u3002",
|
|
40195
|
-
"capabilities.card.pending": "\u80FD\u529B\u5DF2\u51C6\u5907\uFF0C\u5C06\u5728\u4E0B\u4E00\u6B21\u83B7\u51C6\u7684\u6A21\u578B\u6B65\u9AA4\u751F\u6548\u3002",
|
|
40196
41418
|
"capabilities.card.paused": "\u80FD\u529B\u4E0E\u4E0A\u4E0B\u6587\u5DF2\u5173\u95ED\uFF1B\u672C\u4F1A\u8BDD\u6CBF\u7528\u5BBF\u4E3B\u80FD\u529B\u3002",
|
|
40197
41419
|
"capabilities.card.off": "\u80FD\u529B\u7BA1\u7406\u5DF2\u5173\u95ED\uFF1B\u672C\u4F1A\u8BDD\u6CBF\u7528\u5BBF\u4E3B\u80FD\u529B\u3002",
|
|
40198
41420
|
"capabilities.card.saved-only": "\u5168\u5C40\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\uFF0C\u4F1A\u8BDD\u66F4\u65B0\u5931\u8D25\u3002{error}",
|
|
@@ -40390,6 +41612,88 @@ var CHROME_COPY = Object.freeze({
|
|
|
40390
41612
|
"capabilities.refreshAcknowledged": "DSH \u5DF2\u786E\u8BA4\u5237\u65B0\u64CD\u4F5C\u3002",
|
|
40391
41613
|
"capabilities.settingsTabs": "\u80FD\u529B\u8BBE\u7F6E\u9875\u7B7E",
|
|
40392
41614
|
"capabilities.tab.manual": "\u80FD\u529B\u914D\u7F6E",
|
|
41615
|
+
"capabilities.tab.prompt": "\u63D0\u793A\u6587\u672C",
|
|
41616
|
+
"capabilities.title.prompt": "\u6A21\u578B\u53EF\u89C1\u7684\u56FA\u5B9A\u63D0\u793A\u6587\u672C",
|
|
41617
|
+
"capabilities.prompt.title": "\u80FD\u529B\u4E0E\u4E0A\u4E0B\u6587 \xB7 \u63D0\u793A\u6587\u672C",
|
|
41618
|
+
"capabilities.prompt.subtitle": "\u6A21\u578B\u53EF\u89C1\u4E0A\u4E0B\u6587\u7EDF\u4E00\u88C5\u914D\u53F0 \xB7 \u5168\u90E8\u5728\u518C",
|
|
41619
|
+
"capabilities.prompt.bytesPair": "{bytes} B\uFF08{kb} KB\uFF09",
|
|
41620
|
+
"capabilities.prompt.slotCounts": "\u5DF2\u6D4B {bytes} B \xB7 \u672A\u6D4B\u69FD {unmeasured} \xB7 \u52A8\u6001\u69FD {dynamic}",
|
|
41621
|
+
"capabilities.prompt.cardMetaAnchors": "{count} \u4E2A\u951A\u70B9",
|
|
41622
|
+
"capabilities.prompt.strip": "\u672A\u7EB3\u7BA1 {anchors} \u4E2A\u951A\u70B9 \xB7 \u5408\u8BA1 {bytes} B\uFF08{kb} KB\uFF09\xB7 \u5171 {total} \u4E2A\u951A\u70B9",
|
|
41623
|
+
"capabilities.prompt.rowExpand": "\u7B2C {index} \u884C\u5C55\u5F00",
|
|
41624
|
+
"capabilities.prompt.rowExpandHint": "\u9009\u62E9\u4E0A\u8868\u7684\u4E00\u884C\uFF0C\u5728\u8FD9\u91CC\u7F16\u8F91\u5B83\u7684\u69FD\u4F4D\u3002",
|
|
41625
|
+
"capabilities.prompt.bytesOfLimit": "{used} / {max} B\uFF08\u69FD\u4E0A\u9650\uFF09",
|
|
41626
|
+
"capabilities.prompt.unwiredTag": "\u901A\u9053\u672A\u63A5\u901A",
|
|
41627
|
+
"capabilities.prompt.diffEmpty": "\u8FD8\u6CA1\u6709\u5F85\u4FDD\u5B58\u7684\u6539\u52A8\u3002",
|
|
41628
|
+
"capabilities.prompt.diffBytes": "{before} B \u2192 {after} B\uFF08{delta}\uFF09",
|
|
41629
|
+
"capabilities.prompt.save": "\u4FDD\u5B58",
|
|
41630
|
+
"capabilities.prompt.cancel": "\u53D6\u6D88",
|
|
41631
|
+
"capabilities.prompt.intro": "\u6309\u951A\u70B9\u4E0E\u69FD\u4F4D\u8986\u76D6\u63D2\u4EF6\u5199\u7ED9\u6A21\u578B\u7684\u56FA\u5B9A\u6587\u672C\uFF1B\u6BCF\u4E00\u884C\u6807\u6CE8\u6240\u5C5E\u901A\u9053\u3001\u5B58\u5728\u6761\u4EF6\u4E0E\u53EA\u8BFB\u539F\u56E0\uFF0C\u751F\u6548\u65F6\u673A\u968F\u901A\u9053\u4E0D\u540C\uFF08\u4E0B\u4E00\u6B21\u8BF7\u6C42\u3001\u65B0\u4F1A\u8BDD\u6216\u4E0B\u6B21\u89E6\u53D1\uFF09\u3002\u7F16\u8F91\u6846\u7559\u7A7A\u8868\u793A\u6062\u590D\u5185\u7F6E\u6587\u672C\uFF1B\u201C\u7701\u7565\u8BE5\u6BB5\u201D\u53EA\u5728\u53EF\u7701\u7565\u7684\u69FD\u4F4D\u4E0A\u51FA\u73B0\uFF0C\u8868\u793A\u4E0D\u6295\u9012\u90A3\u4E00\u6BB5\u3002\u534F\u8BAE\u6587\u672C\u3001\u7531\u914D\u7F6E\u6216\u8FD0\u884C\u4E8B\u5B9E\u751F\u6210\u7684\u53E5\u5B50\uFF0C\u4EE5\u53CA\u4F60\u81EA\u5DF1\u5199\u7684\u7ED1\u5B9A\u8BF4\u660E\u53EA\u8BFB\u5C55\u793A\u3002",
|
|
41632
|
+
"capabilities.prompt.bytes": "{used} / {max} \u5B57\u8282",
|
|
41633
|
+
"capabilities.prompt.reset": "\u6062\u590D\u5185\u7F6E",
|
|
41634
|
+
"capabilities.prompt.omit": "\u7701\u7565\u8BE5\u6BB5",
|
|
41635
|
+
"capabilities.prompt.omitted": "\u8BE5\u6BB5\u5DF2\u7701\u7565\uFF08\u6D3E\u751F\u7B56\u7565\u53E5\u4ECD\u4F1A\u9644\u52A0\uFF09",
|
|
41636
|
+
"capabilities.prompt.unreadable": "\u5F53\u524D\u6587\u6863\u65E0\u6CD5\u89E3\u6790\uFF1A{error}\uFF1B\u9762\u677F\u6309\u5185\u7F6E\u6587\u672C\u663E\u793A\uFF0C\u4FDD\u5B58\u540E\u53EF\u6062\u590D\u3002",
|
|
41637
|
+
"capabilities.prompt.reported": "{asset}\uFF1A{reason}",
|
|
41638
|
+
"capabilities.prompt.ownerEditable": "\u53EF\u7F16\u8F91",
|
|
41639
|
+
"capabilities.prompt.ownerReadOnly": "\u53EA\u8BFB\u7EB3\u7BA1",
|
|
41640
|
+
"capabilities.prompt.ownerOther": "\u4ED6\u4EBA\u6240\u6709",
|
|
41641
|
+
"capabilities.prompt.ownerMixed": "\u6DF7\u5408",
|
|
41642
|
+
"capabilities.prompt.cardBytes": "{bytes} B",
|
|
41643
|
+
"capabilities.prompt.cardMixed": "{count} \u4E2A\u6DF7\u5408\u951A\u70B9",
|
|
41644
|
+
"capabilities.prompt.templateBytes": "\u6A21\u677F\u5B57\u8282\uFF08\u5B54\u5728\u6E32\u67D3\u65F6\u586B\u5145\uFF09",
|
|
41645
|
+
"capabilities.prompt.aggregateFrozen": "\u805A\u5408\u51BB\u7ED3\uFF1A\u6761\u76EE\u6587\u672C\u53EF\u6539\uFF0C\u589E\u5220\u6761\u76EE\u4F1A\u79FB\u52A8\u76F8\u90BB\u5B57\u8282",
|
|
41646
|
+
"capabilities.prompt.totals": "\u5DF2\u6D4B {bytes} B \xB7 \u5171 {anchors} \u4E2A\u951A\u70B9 \xB7 \u672A\u6D4B\u69FD {unmeasured} \xB7 \u52A8\u6001\u69FD {dynamic}",
|
|
41647
|
+
"capabilities.prompt.cardDynamic": "{count} \u4E2A\u52A8\u6001\u69FD",
|
|
41648
|
+
"capabilities.prompt.aggregateSlot": "\u805A\u5408\u5BB9\u5668\uFF08\u81EA\u8EAB\u65E0\u5B57\u8282\uFF09",
|
|
41649
|
+
"capabilities.prompt.cardUnwired": "\u2014\uFF08{count} \u4E2A\u69FD\u672A\u63A5\u901A\uFF09",
|
|
41650
|
+
"capabilities.prompt.unwiredRow": "\u901A\u9053\u672A\u63A5\u901A \xB7 {slots} \u4E2A\u69FD\u672A\u6D4B",
|
|
41651
|
+
"capabilities.prompt.unwiredSummary": "{anchors} \u4E2A\u951A\u70B9\u3001{slots} \u4E2A\u69FD\u7684\u901A\u9053\u5C1A\u672A\u63A5\u901A\uFF1B\u5B83\u4EEC\u4E0D\u8BA1\u5165\u5B57\u8282\u5408\u8BA1\u3002",
|
|
41652
|
+
"capabilities.prompt.retention": "\u68C0\u67E5\u70B9\u4FDD\u7559\uFF1A\u6700\u8FD1 {runs} \u683C \xB7 \u8F7D\u8377 {bytes} \xB7 \u7C07\u4E0A\u9650 {clusters}\u3002\u8C03\u5927\u4F1A\u8BA9\u66F4\u65E9\u7684\u8BA1\u7B97\u53EF\u76F4\u63A5\u7F16\u8F91\uFF0C\u4F46\u68C0\u67E5\u70B9\u66F4\u5927\u3002",
|
|
41653
|
+
"capabilities.prompt.retentionUnlimited": "\u4E0D\u9650\u5236",
|
|
41654
|
+
"capabilities.prompt.dynamicSlot": "\u52A8\u6001\uFF08\u88C5\u914D\u671F\u5B9E\u6D4B\uFF0C\u65E0\u5B57\u9762\u9ED8\u8BA4\uFF09",
|
|
41655
|
+
"capabilities.prompt.anchorMeta": "{channel} \xB7 {presence} \xB7 {owner}",
|
|
41656
|
+
"capabilities.prompt.slotBytes": "{bytes} B \xB7 {owner} \u7C7B",
|
|
41657
|
+
"capabilities.prompt.unmeasuredSlot": "\u672A\u6D4B\uFF08\u65E0\u53EF\u6838\u5BF9\u5B57\u8282\uFF09",
|
|
41658
|
+
"capabilities.prompt.readonlyReason": "{reason} \xB7 {kind}",
|
|
41659
|
+
"capabilities.prompt.slotSelector": "{slot}\uFF08{bytes} B\uFF09",
|
|
41660
|
+
"capabilities.prompt.chipMeta": "\u69FD\u4F4D {owner}",
|
|
41661
|
+
"capabilities.prompt.paused": "\u63D0\u793A\u6587\u672C\u5DF2\u6682\u505C\uFF1A\u914D\u7F6E\u91CC\u7684\u63D0\u793A\u6587\u672C\u5F00\u5173\u5173\u95ED\uFF0C\u6539\u5199\u7684\u53E5\u5B50\u4E0D\u4F1A\u8FDB\u5165\u8BF7\u6C42\u3001\u5DE5\u5177\u8BF4\u660E\u3001\u80FD\u529B\u65B9\u6848\u4E0E\u63D0\u793A\uFF1B\u5DF2\u4FDD\u5B58\u7684\u6539\u5199\u4FDD\u7559\uFF0C\u91CD\u65B0\u5F00\u542F\u540E\u751F\u6548\u3002",
|
|
41662
|
+
"capabilities.prompt.pausedBytes": "{bytes} B\uFF08\u5DF2\u6682\u505C\uFF0C\u672A\u5E94\u7528\uFF09",
|
|
41663
|
+
"capabilities.prompt.columnBytesSplit": "\u5B57\u8282\uFF08\u6309\u69FD\u62C6\u5206\uFF09",
|
|
41664
|
+
"capabilities.prompt.columnReason": "\u539F\u56E0\u7801",
|
|
41665
|
+
"capabilities.prompt.columnKind": "\u69FD\u4F4D\u79CD\u7C7B",
|
|
41666
|
+
"capabilities.prompt.columnSlots": "\u69FD\u4F4D",
|
|
41667
|
+
"capabilities.prompt.anchorBytesSplit": "\uFF08{parts}\uFF09",
|
|
41668
|
+
"capabilities.prompt.diffTitle": "\u4FDD\u5B58\u524D\u5DEE\u5F02\u9884\u89C8",
|
|
41669
|
+
"capabilities.prompt.diffDelta": "{delta} \u5B57\u8282",
|
|
41670
|
+
"capabilities.prompt.effectPrompt": "\u5F85\u4E0B\u6B21\u88C5\u914D\u751F\u6548",
|
|
41671
|
+
"capabilities.prompt.effectInstall": "\u65B0\u4F1A\u8BDD\u5B89\u88C5\u65F6\u751F\u6548",
|
|
41672
|
+
"capabilities.prompt.effectPlan": "\u65B0\u4F1A\u8BDD\u6216 refresh \u751F\u6548",
|
|
41673
|
+
"capabilities.prompt.effectTrigger": "\u4E0B\u6B21\u89E6\u53D1\u65F6\u751F\u6548",
|
|
41674
|
+
"capabilities.prompt.columnChannel": "\u901A\u9053",
|
|
41675
|
+
"capabilities.prompt.columnAnchor": "\u951A\u70B9",
|
|
41676
|
+
"capabilities.prompt.columnPresence": "\u5B58\u5728\u6761\u4EF6",
|
|
41677
|
+
"capabilities.prompt.columnBytes": "\u5B57\u8282",
|
|
41678
|
+
"capabilities.prompt.columnStatus": "\u72B6\u6001",
|
|
41679
|
+
"capabilities.prompt.ownerHost": "DSH \u5BBF\u4E3B",
|
|
41680
|
+
"capabilities.prompt.hostSection": "\u5BBF\u4E3B\u6BB5\u843D\uFF0C\u53EA\u8BFB\uFF1A\u63D2\u4EF6\u80FD\u770B\u5230\u6BB5\u540D\u4E0E\u6765\u6E90\uFF0C\u4E0D\u80FD\u5728\u8FD9\u91CC\u6539\u5199",
|
|
41681
|
+
"capabilities.prompt.hostUnavailable": "\u5BBF\u4E3B\u7CFB\u7EDF\u63D0\u793A\uFF08\u63D2\u4EF6\u4E0D\u53EF\u679A\u4E3E\uFF09",
|
|
41682
|
+
"capabilities.prompt.hostPresenceEvery": "\u6BCF\u4E2A\u8BF7\u6C42",
|
|
41683
|
+
"capabilities.prompt.hostPresenceCapabilities": "\u80FD\u529B\u7BA1\u7406\u542F\u7528",
|
|
41684
|
+
"capabilities.prompt.readonlySummary": "{count} \u4E2A\u53EA\u8BFB\u69FD",
|
|
41685
|
+
// Reason codes and slot kinds are registry identifiers; the pane shows a
|
|
41686
|
+
// localized label and keeps the raw code in the element title, so a Chinese UI
|
|
41687
|
+
// never reads like a dump of registry constants.
|
|
41688
|
+
"capabilities.prompt.reason.factDerived": "\u4E8B\u5B9E\u6D3E\u751F",
|
|
41689
|
+
"capabilities.prompt.reason.aggregateFrozen": "\u805A\u5408\u51BB\u7ED3",
|
|
41690
|
+
"capabilities.prompt.reason.protocolExactText": "\u534F\u8BAE\xB7\u7CBE\u786E\u6587\u672C",
|
|
41691
|
+
"capabilities.prompt.reason.protocolStructural": "\u534F\u8BAE\xB7\u7ED3\u6784",
|
|
41692
|
+
"capabilities.prompt.reason.shadowsHost": "\u906E\u853D\u5BBF\u4E3B",
|
|
41693
|
+
"capabilities.prompt.reason.otherOwner": "\u4ED6\u4EBA\u6240\u6709",
|
|
41694
|
+
"capabilities.prompt.kind.literal": "\u5B57\u9762\u91CF",
|
|
41695
|
+
"capabilities.prompt.kind.aggregate": "\u805A\u5408",
|
|
41696
|
+
"capabilities.prompt.kind.projected": "\u6295\u5F71",
|
|
40393
41697
|
"capabilities.tab.statistics": "\u4F7F\u7528\u7EDF\u8BA1",
|
|
40394
41698
|
"capabilities.tab.budgets": "\u63D0\u793A\u8BBE\u7F6E",
|
|
40395
41699
|
"capabilities.tab.plans": "\u914D\u7F6E\u65B9\u6848",
|
|
@@ -40613,6 +41917,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40613
41917
|
"capabilities.combination.statistics": "Usage statistics",
|
|
40614
41918
|
"capabilities.combination.recovery": "Prompt recovery",
|
|
40615
41919
|
"capabilities.combination.preview": "Output excerpts",
|
|
41920
|
+
"capabilities.combination.promptText": "Prompt text",
|
|
40616
41921
|
"capabilities.combination.state.selected": "Selected",
|
|
40617
41922
|
"capabilities.combination.state.unselected": "Not selected",
|
|
40618
41923
|
"capabilities.combination.state.paused": "Paused",
|
|
@@ -40823,7 +42128,6 @@ var CHROME_COPY = Object.freeze({
|
|
|
40823
42128
|
"capabilities.quick.apply": "Submit and apply",
|
|
40824
42129
|
"capabilities.quick.prefill": "Fill command draft",
|
|
40825
42130
|
"capabilities.card.recorded": "Session capabilities updated.",
|
|
40826
|
-
"capabilities.card.pending": "Capabilities prepared; they take effect at the next accepted model step.",
|
|
40827
42131
|
"capabilities.card.paused": "Capabilities and context are off; this session stays with the Host capabilities.",
|
|
40828
42132
|
"capabilities.card.off": "Capability management is off; this session stays with the Host capabilities.",
|
|
40829
42133
|
"capabilities.card.saved-only": "Global settings saved; session update failed. {error}",
|
|
@@ -41021,6 +42325,85 @@ var CHROME_COPY = Object.freeze({
|
|
|
41021
42325
|
"capabilities.refreshAcknowledged": "DSH acknowledged the refresh operation.",
|
|
41022
42326
|
"capabilities.settingsTabs": "Capability settings tabs",
|
|
41023
42327
|
"capabilities.tab.manual": "Capability configuration",
|
|
42328
|
+
"capabilities.tab.prompt": "Prompt text",
|
|
42329
|
+
"capabilities.title.prompt": "Fixed prompt text the model reads",
|
|
42330
|
+
"capabilities.prompt.title": "Capabilities & Context \xB7 Prompt text",
|
|
42331
|
+
"capabilities.prompt.subtitle": "One surface for the model-visible context \xB7 everything on record",
|
|
42332
|
+
"capabilities.prompt.bytesPair": "{bytes} B ({kb} KB)",
|
|
42333
|
+
"capabilities.prompt.slotCounts": "Measured {bytes} B \xB7 {unmeasured} unmeasured slots \xB7 {dynamic} dynamic slots",
|
|
42334
|
+
"capabilities.prompt.cardMetaAnchors": "{count} anchors",
|
|
42335
|
+
"capabilities.prompt.strip": "{anchors} anchors not wired \xB7 {bytes} B ({kb} KB) total \xB7 {total} anchors",
|
|
42336
|
+
"capabilities.prompt.rowExpand": "Row {index} expanded",
|
|
42337
|
+
"capabilities.prompt.rowExpandHint": "Select a row above to edit its slots here.",
|
|
42338
|
+
"capabilities.prompt.bytesOfLimit": "{used} / {max} B (slot limit)",
|
|
42339
|
+
"capabilities.prompt.unwiredTag": "channel not wired",
|
|
42340
|
+
"capabilities.prompt.diffEmpty": "No pending changes.",
|
|
42341
|
+
"capabilities.prompt.diffBytes": "{before} B \u2192 {after} B ({delta})",
|
|
42342
|
+
"capabilities.prompt.save": "Save",
|
|
42343
|
+
"capabilities.prompt.cancel": "Cancel",
|
|
42344
|
+
"capabilities.prompt.intro": "Override the fixed text the plugin writes, per anchor and slot. Each row names its channel, presence condition and read-only reason, and when an edit takes effect depends on that channel (next request, new session, or next trigger). Clearing the editor restores the built-in text; \u201Comit this paragraph\u201D appears only on omittable slots and means the paragraph is not delivered. Protocol text, sentences generated from configuration or runtime facts, and the binding notes you wrote yourself stay read-only.",
|
|
42345
|
+
"capabilities.prompt.bytes": "{used} / {max} bytes",
|
|
42346
|
+
"capabilities.prompt.reset": "Use built-in",
|
|
42347
|
+
"capabilities.prompt.omit": "Omit this paragraph",
|
|
42348
|
+
"capabilities.prompt.omitted": "This paragraph is omitted; derived policy sentences are still appended",
|
|
42349
|
+
"capabilities.prompt.unreadable": "The stored document cannot be parsed: {error}. The panel shows built-in text; saving restores it.",
|
|
42350
|
+
"capabilities.prompt.reported": "{asset}: {reason}",
|
|
42351
|
+
"capabilities.prompt.ownerEditable": "Editable",
|
|
42352
|
+
"capabilities.prompt.ownerReadOnly": "Read-only, managed",
|
|
42353
|
+
"capabilities.prompt.ownerOther": "Owned elsewhere",
|
|
42354
|
+
"capabilities.prompt.ownerMixed": "Mixed",
|
|
42355
|
+
"capabilities.prompt.cardBytes": "{bytes} B",
|
|
42356
|
+
"capabilities.prompt.cardMixed": "{count} mixed anchor(s)",
|
|
42357
|
+
"capabilities.prompt.templateBytes": "template bytes (holes filled at render time)",
|
|
42358
|
+
"capabilities.prompt.aggregateFrozen": "Frozen item set: item text is editable, adding or removing an item moves neighbouring bytes",
|
|
42359
|
+
"capabilities.prompt.totals": "measured {bytes} B \xB7 {anchors} anchors \xB7 unmeasured slots {unmeasured} \xB7 dynamic slots {dynamic}",
|
|
42360
|
+
"capabilities.prompt.cardDynamic": "{count} dynamic slots",
|
|
42361
|
+
"capabilities.prompt.aggregateSlot": "aggregate container (owns no bytes)",
|
|
42362
|
+
"capabilities.prompt.cardUnwired": "\u2014 ({count} slots not connected)",
|
|
42363
|
+
"capabilities.prompt.unwiredRow": "channel not connected \xB7 {slots} slots unmeasured",
|
|
42364
|
+
"capabilities.prompt.unwiredSummary": "{anchors} anchors and {slots} slots have no connected channel; they are excluded from the byte total.",
|
|
42365
|
+
"capabilities.prompt.retention": "Checkpoint retention: newest {runs} cells \xB7 {bytes} payload \xB7 {clusters} clusters. A larger window keeps older cells editable but grows the checkpoint.",
|
|
42366
|
+
"capabilities.prompt.retentionUnlimited": "unlimited",
|
|
42367
|
+
"capabilities.prompt.dynamicSlot": "dynamic (measured at assembly; no literal default)",
|
|
42368
|
+
"capabilities.prompt.anchorMeta": "{channel} \xB7 {presence} \xB7 {owner}",
|
|
42369
|
+
"capabilities.prompt.slotBytes": "{bytes} B \xB7 owner {owner}",
|
|
42370
|
+
"capabilities.prompt.unmeasuredSlot": "unmeasured (no bytes to reconcile)",
|
|
42371
|
+
"capabilities.prompt.readonlyReason": "{reason} \xB7 {kind}",
|
|
42372
|
+
"capabilities.prompt.slotSelector": "{slot} ({bytes} B)",
|
|
42373
|
+
"capabilities.prompt.chipMeta": "slot {owner}",
|
|
42374
|
+
"capabilities.prompt.paused": "Prompt text is paused: the prompt text switch in configuration is off, so edited sentences do not reach requests, tool descriptions, the capability plan or tips. Saved edits are kept and apply again when you turn it back on.",
|
|
42375
|
+
"capabilities.prompt.pausedBytes": "{bytes} B (paused, not applied)",
|
|
42376
|
+
"capabilities.prompt.columnBytesSplit": "Bytes (per slot)",
|
|
42377
|
+
"capabilities.prompt.columnReason": "Reason code",
|
|
42378
|
+
"capabilities.prompt.columnKind": "Slot kind",
|
|
42379
|
+
"capabilities.prompt.columnSlots": "Slots",
|
|
42380
|
+
"capabilities.prompt.anchorBytesSplit": "({parts})",
|
|
42381
|
+
"capabilities.prompt.diffTitle": "Pending changes before saving",
|
|
42382
|
+
"capabilities.prompt.diffDelta": "{delta} bytes",
|
|
42383
|
+
"capabilities.prompt.effectPrompt": "applies on the next assembly",
|
|
42384
|
+
"capabilities.prompt.effectInstall": "applies at the next agent install",
|
|
42385
|
+
"capabilities.prompt.effectPlan": "applies on a new session or refresh",
|
|
42386
|
+
"capabilities.prompt.effectTrigger": "applies on the next trigger",
|
|
42387
|
+
"capabilities.prompt.columnChannel": "Channel",
|
|
42388
|
+
"capabilities.prompt.columnAnchor": "Anchor",
|
|
42389
|
+
"capabilities.prompt.columnPresence": "Presence",
|
|
42390
|
+
"capabilities.prompt.columnBytes": "Bytes",
|
|
42391
|
+
"capabilities.prompt.columnStatus": "Status",
|
|
42392
|
+
"capabilities.prompt.ownerHost": "DSH host",
|
|
42393
|
+
"capabilities.prompt.hostSection": "Host-owned section, read-only: the plugin can name it and read its bytes, but cannot rewrite it here",
|
|
42394
|
+
"capabilities.prompt.hostUnavailable": "Host system prompt (not enumerable by the plugin)",
|
|
42395
|
+
"capabilities.prompt.hostPresenceEvery": "every request",
|
|
42396
|
+
"capabilities.prompt.hostPresenceCapabilities": "capability management enabled",
|
|
42397
|
+
"capabilities.prompt.readonlySummary": "{count} read-only slot(s)",
|
|
42398
|
+
"capabilities.prompt.reason.factDerived": "fact-derived",
|
|
42399
|
+
"capabilities.prompt.reason.aggregateFrozen": "aggregate-frozen",
|
|
42400
|
+
"capabilities.prompt.reason.protocolExactText": "protocol-exact-text",
|
|
42401
|
+
"capabilities.prompt.reason.protocolStructural": "protocol-structural",
|
|
42402
|
+
"capabilities.prompt.reason.shadowsHost": "shadows-host",
|
|
42403
|
+
"capabilities.prompt.reason.otherOwner": "other-owner",
|
|
42404
|
+
"capabilities.prompt.kind.literal": "literal",
|
|
42405
|
+
"capabilities.prompt.kind.aggregate": "aggregate",
|
|
42406
|
+
"capabilities.prompt.kind.projected": "projected",
|
|
41024
42407
|
"capabilities.tab.statistics": "Usage statistics",
|
|
41025
42408
|
"capabilities.tab.budgets": "Prompt settings",
|
|
41026
42409
|
"capabilities.tab.plans": "Configurations",
|