dsh-ptc-plus 0.5.0 → 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 +15 -3
- package/README.md +15 -3
- package/client.cjs +1983 -234
- 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/0017-track-the-latest-dsh-public-surface.md +2 -2
- package/docs/adr/0023-global-user-bindings.md +1 -1
- 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/0038-freeze-session-capability-plans.md +1 -1
- package/docs/adr/0044-coexist-with-the-official-persistent-repl.md +35 -0
- 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/adr/README.md +2 -0
- package/docs/architecture.md +2 -2
- package/docs/capability-planning-components.md +2 -2
- package/docs/client-ui.md +13 -10
- package/docs/client-visual-contract.md +1 -1
- package/docs/durability-design.md +7 -1
- package/docs/installation.md +5 -3
- package/docs/publishing.md +2 -2
- package/docs/releases/v0.5.2.md +79 -0
- package/docs/runtime-reference.md +42 -3
- package/docs/unmeasured-cell-recovery-repair-proposal.md +387 -0
- package/docs/verification.md +6 -2
- package/index.js +63 -19
- package/internal/bounded-literal.js +85 -0
- package/internal/capability-command-receipt.js +3 -1
- package/internal/capability-environment.js +171 -13
- package/internal/capability-plan.js +11 -8
- package/internal/capability-statistics.js +6 -2
- package/internal/cell-error.js +13 -0
- package/internal/config-spec.js +122 -2
- package/internal/direct-surface-owner.js +14 -10
- package/internal/edit-transport-owner.js +96 -17
- package/internal/execution-provider-owner.js +25 -0
- package/internal/execution-seam-compat.js +18 -0
- 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/official-repl-priority.js +51 -0
- 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 +11 -8
- package/internal/runtime-config.js +2 -0
- package/internal/runtime-contexts.js +14 -5
- package/internal/runtime-messages.js +43 -15
- package/internal/sdk-projection.js +2 -2
- 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 +8 -27
- 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 +5 -2
- package/src/client-activity.js +27 -6
- package/src/client-capabilities-view.js +774 -125
- package/src/client-copy.js +231 -18
- package/src/client-repl-view.js +6 -1
- package/src/client-styles.js +68 -2
- package/src/client-tool-view.js +9 -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,77 @@ 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
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
key: "officialReplPriority",
|
|
2137
|
+
type: "boolean",
|
|
2138
|
+
default: false,
|
|
2139
|
+
label: "\u5B98\u65B9 REPL \u6A21\u5F0F\u4F18\u5148",
|
|
2140
|
+
labelEn: "Prioritize the official REPL mode",
|
|
2141
|
+
description: "\u68C0\u6D4B\u5230\u5B98\u65B9\u6301\u4E45 REPL \u6A21\u5F0F\u65F6\u7531\u5B98\u65B9\u8FD0\u884C\u65F6\u63A5\u7BA1 PTC \u4F1A\u8BDD\u6267\u884C\uFF1BPTC Plus \u8BA9\u51FA run_code \u53CA\u5176\u8FDB\u7A0B\u5185\u4F1A\u8BDD\u72B6\u6001\u8BED\u4E49\uFF0C\u5173\u95ED\u65F6\u59CB\u7EC8\u7531 PTC Plus \u63A5\u7BA1\u3002",
|
|
2142
|
+
descriptionEn: "Lets the official runtime own PTC session execution when the official persistent REPL mode is active; PTC Plus then leaves run_code and its in-process session-state semantics to DSH. Disabled keeps PTC Plus in charge."
|
|
2143
|
+
},
|
|
1497
2144
|
{
|
|
1498
2145
|
key: "tipsEnabled",
|
|
1499
2146
|
type: "boolean",
|
|
@@ -1558,6 +2205,50 @@ var CONFIG_FIELDS = Object.freeze([
|
|
|
1558
2205
|
description: "\u9650\u5236\u5355\u4E2A cell \u7684\u65E5\u5FD7\u548C\u8FD4\u56DE\u7ED3\u679C\u7684\u5408\u8BA1\u5927\u5C0F\u3002",
|
|
1559
2206
|
descriptionEn: "Limits the combined size of one cell's logs and returned result."
|
|
1560
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
|
+
},
|
|
1561
2252
|
{
|
|
1562
2253
|
key: "maxValueNodes",
|
|
1563
2254
|
type: "integer",
|
|
@@ -1644,7 +2335,7 @@ var CONFIG_GROUPS = Object.freeze([
|
|
|
1644
2335
|
key: "recovery",
|
|
1645
2336
|
label: "\u72B6\u6001\u4E0E\u6062\u590D",
|
|
1646
2337
|
labelEn: "State and recovery",
|
|
1647
|
-
fields: Object.freeze(["durableReplay", "tipsEnabled", "tipCooldownMessages", "tipEscalationFailures"])
|
|
2338
|
+
fields: Object.freeze(["durableReplay", "unmeasuredCellLimit", "officialReplPriority", "tipsEnabled", "tipCooldownMessages", "tipEscalationFailures"])
|
|
1648
2339
|
},
|
|
1649
2340
|
{
|
|
1650
2341
|
key: "extensions",
|
|
@@ -1674,6 +2365,10 @@ var CONFIG_GROUPS = Object.freeze([
|
|
|
1674
2365
|
"maxOldGenerationSizeMb",
|
|
1675
2366
|
"maxNestedRunCodeDepth",
|
|
1676
2367
|
"maxOutputBytes",
|
|
2368
|
+
"sampleBoundMs",
|
|
2369
|
+
"workerReclaimMs",
|
|
2370
|
+
"startupProbeMs",
|
|
2371
|
+
"executionSeamTimeoutMs",
|
|
1677
2372
|
"maxValueNodes",
|
|
1678
2373
|
"maxValueEdges",
|
|
1679
2374
|
"maxValueArrayLength",
|
|
@@ -1697,7 +2392,12 @@ var CONFIG_GROUPS = Object.freeze([
|
|
|
1697
2392
|
"capabilityBudgetBytes",
|
|
1698
2393
|
"capabilityDirectoryBytes",
|
|
1699
2394
|
"capabilityRecoveryBytes",
|
|
1700
|
-
"modelPreviewTokens"
|
|
2395
|
+
"modelPreviewTokens",
|
|
2396
|
+
"retentionPayloadRuns",
|
|
2397
|
+
"retentionPayloadBytes",
|
|
2398
|
+
"retentionClusters",
|
|
2399
|
+
"capabilityPromptTextEnabled",
|
|
2400
|
+
"promptText"
|
|
1701
2401
|
])
|
|
1702
2402
|
}
|
|
1703
2403
|
]);
|
|
@@ -1711,16 +2411,6 @@ var CONFIG_DEFAULTS = Object.freeze(
|
|
|
1711
2411
|
Object.fromEntries(CONFIG_FIELDS.map((field) => [field.key, field.default]))
|
|
1712
2412
|
);
|
|
1713
2413
|
|
|
1714
|
-
// internal/repl-rewrite-contract.js
|
|
1715
|
-
var LEGACY_DEFAULT_EXPORT_BINDING = "legacy-variable";
|
|
1716
|
-
var LIVE_DEFAULT_EXPORT_BINDING = "live-readonly";
|
|
1717
|
-
var LEGACY_IMPORT_EXPRESSION_BOUNDARY = "legacy";
|
|
1718
|
-
var LIVE_IMPORT_EXPRESSION_BOUNDARY = "statement-safe";
|
|
1719
|
-
var LIVE_MODULE_SEMANTICS = Object.freeze({
|
|
1720
|
-
defaultExportBinding: LIVE_DEFAULT_EXPORT_BINDING,
|
|
1721
|
-
importExpressionBoundary: LIVE_IMPORT_EXPRESSION_BOUNDARY
|
|
1722
|
-
});
|
|
1723
|
-
|
|
1724
2414
|
// internal/session-journal-schema.js
|
|
1725
2415
|
var IMPORT_BOUNDARY_JOURNAL_VERSION = 7;
|
|
1726
2416
|
var PER_NAME_USER_BINDINGS_JOURNAL_VERSION = 8;
|
|
@@ -1744,7 +2434,7 @@ var WHOLE_ENTRY_JOURNAL_FIELDS = /* @__PURE__ */ new Set(["version", "bindingPol
|
|
|
1744
2434
|
var PER_NAME_JOURNAL_FIELDS = /* @__PURE__ */ new Set([...WHOLE_ENTRY_JOURNAL_FIELDS, "userBindingsShadowPolicy", "userBindingNames"]);
|
|
1745
2435
|
var LANGUAGE_SEMANTICS_JOURNAL_FIELDS = /* @__PURE__ */ new Set([...PER_NAME_JOURNAL_FIELDS, "languageSemantics"]);
|
|
1746
2436
|
var MODULE_TRANSFORM_JOURNAL_FIELDS = /* @__PURE__ */ new Set([...LANGUAGE_SEMANTICS_JOURNAL_FIELDS, "moduleTransform"]);
|
|
1747
|
-
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"]);
|
|
1748
2438
|
var FINGERPRINT_REUSE_JOURNAL_FIELDS = new Set([...WHOLE_ENTRY_JOURNAL_FIELDS].filter((field) => field !== "userBindingsReusePolicy"));
|
|
1749
2439
|
var RELATIONLESS_JOURNAL_FIELDS = new Set([...FINGERPRINT_REUSE_JOURNAL_FIELDS].filter((field) => field !== "userBindingsFingerprint"));
|
|
1750
2440
|
var PREDECESSOR_JOURNAL_FIELDS = /* @__PURE__ */ new Set(["version", "bindingMode", "rewritePolicy", "status", "calls", "operations", "confirms", "diagnostics", "completion", "volatileReason"]);
|
|
@@ -1761,14 +2451,14 @@ var DEFAULT_EXPORT_BINDINGS = /* @__PURE__ */ new Set([
|
|
|
1761
2451
|
LEGACY_DEFAULT_EXPORT_BINDING,
|
|
1762
2452
|
LIVE_DEFAULT_EXPORT_BINDING
|
|
1763
2453
|
]);
|
|
1764
|
-
var CALL_SUCCESS_FIELDS = /* @__PURE__ */ new Set(["global", "member", "args", "ok", "value", "settle"]);
|
|
1765
|
-
var CALL_ERROR_FIELDS = /* @__PURE__ */ new Set(["global", "member", "args", "ok", "error", "settle"]);
|
|
1766
|
-
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"]);
|
|
1767
2457
|
var RETURN_FIELDS = /* @__PURE__ */ new Set(["kind", "hasValue", "value"]);
|
|
1768
2458
|
var THROW_FIELDS = /* @__PURE__ */ new Set(["kind", "error"]);
|
|
1769
2459
|
var ERROR_FIELDS = /* @__PURE__ */ new Set(["kind", "message"]);
|
|
1770
2460
|
var EDIT_TARGET_FIELDS = /* @__PURE__ */ new Set(["targetCallSeq"]);
|
|
1771
|
-
var DERIVED_RUN_FIELDS = /* @__PURE__ */ new Set(["code", "description"]);
|
|
2461
|
+
var DERIVED_RUN_FIELDS = /* @__PURE__ */ new Set(["code", "codeDigest", "codeBytes", "description"]);
|
|
1772
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]);
|
|
1773
2463
|
var USER_BINDINGS_REUSE_POLICIES = /* @__PURE__ */ new Set([LEGACY_USER_BINDINGS_REUSE_POLICY, LIVE_USER_BINDINGS_REUSE_POLICY]);
|
|
1774
2464
|
var USER_BINDINGS_SHADOW_POLICIES = /* @__PURE__ */ new Set([LEGACY_USER_BINDINGS_SHADOW_POLICY, LIVE_USER_BINDINGS_SHADOW_POLICY]);
|
|
@@ -1914,11 +2604,11 @@ var {
|
|
|
1914
2604
|
maxStringBytes: MAX_STRING_BYTES
|
|
1915
2605
|
} = DEFAULT_VALUE_LIMITS;
|
|
1916
2606
|
var textEncoder = new TextEncoder();
|
|
1917
|
-
function
|
|
2607
|
+
function isRecord3(value) {
|
|
1918
2608
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1919
2609
|
}
|
|
1920
2610
|
function hasClosedFields(value, allowed, required = []) {
|
|
1921
|
-
if (!
|
|
2611
|
+
if (!isRecord3(value)) return false;
|
|
1922
2612
|
const keys2 = Reflect.ownKeys(value);
|
|
1923
2613
|
if (keys2.some((key) => typeof key !== "string" || !allowed.has(key) || !Object.prototype.propertyIsEnumerable.call(value, key))) return false;
|
|
1924
2614
|
return [...required].every((key) => Object.hasOwn(value, key));
|
|
@@ -1927,7 +2617,7 @@ function hasExactFields(value, fields) {
|
|
|
1927
2617
|
return hasClosedFields(value, fields, fields) && Reflect.ownKeys(value).length === fields.size;
|
|
1928
2618
|
}
|
|
1929
2619
|
function hasExactOrderedFields(value, fields) {
|
|
1930
|
-
if (!
|
|
2620
|
+
if (!isRecord3(value)) return false;
|
|
1931
2621
|
const keys2 = Reflect.ownKeys(value);
|
|
1932
2622
|
const ordered = [...fields];
|
|
1933
2623
|
return keys2.length === ordered.length && keys2.every((key, index2) => key === ordered[index2] && Object.prototype.propertyIsEnumerable.call(value, key));
|
|
@@ -1942,7 +2632,7 @@ function isValidPosition(value) {
|
|
|
1942
2632
|
return hasExactFields(value, POSITION_FIELDS) && Number.isSafeInteger(value.line) && value.line >= 1 && Number.isSafeInteger(value.column) && value.column >= 1;
|
|
1943
2633
|
}
|
|
1944
2634
|
function isValidDiagnosticCause(value, depth) {
|
|
1945
|
-
if (depth > 16 || !
|
|
2635
|
+
if (depth > 16 || !isRecord3(value)) return false;
|
|
1946
2636
|
if (Object.hasOwn(value, "severity")) return isValidDiagnostic(value, depth + 1);
|
|
1947
2637
|
return hasClosedFields(value, CAUSE_FIELDS, ["message"]) && (value.code === void 0 || isLine(value.code)) && isLine(value.message);
|
|
1948
2638
|
}
|
|
@@ -1976,7 +2666,7 @@ function isValidValueAtom(value, state) {
|
|
|
1976
2666
|
if (value === null || typeof value === "boolean") return true;
|
|
1977
2667
|
if (typeof value === "string") return accountText(value, state);
|
|
1978
2668
|
if (typeof value === "number") return Number.isFinite(value) && !Object.is(value, -0);
|
|
1979
|
-
if (!
|
|
2669
|
+
if (!isRecord3(value) || typeof value.tag !== "string") return false;
|
|
1980
2670
|
if (value.tag === "undefined") return hasExactOrderedFields(value, VALUE_UNDEFINED_FIELDS);
|
|
1981
2671
|
if (value.tag === "number") {
|
|
1982
2672
|
return hasExactOrderedFields(value, VALUE_NUMBER_FIELDS) && ["nan", "infinity", "-infinity", "-0"].includes(value.value);
|
|
@@ -2004,7 +2694,7 @@ function isValidValueWire(value) {
|
|
|
2004
2694
|
};
|
|
2005
2695
|
if (!isValidValueAtom(value.root, state)) return false;
|
|
2006
2696
|
for (const [nodeIndex, node] of value.nodes.entries()) {
|
|
2007
|
-
if (!state.discovered.has(nodeIndex) || !
|
|
2697
|
+
if (!state.discovered.has(nodeIndex) || !isRecord3(node)) return false;
|
|
2008
2698
|
if (node.type === "array") {
|
|
2009
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;
|
|
2010
2700
|
state.arraySlots += node.length;
|
|
@@ -2048,10 +2738,18 @@ function isValidModuleSemantics(value, version) {
|
|
|
2048
2738
|
const legacy = version <= VERSIONED_BINDING_REUSE_JOURNAL_VERSION;
|
|
2049
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));
|
|
2050
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
|
+
}
|
|
2051
2747
|
function isValidCall(value) {
|
|
2052
|
-
if (!
|
|
2748
|
+
if (!isRecord3(value) || value.ok !== true && value.ok !== false) return false;
|
|
2053
2749
|
const fields = value.ok ? CALL_SUCCESS_FIELDS : CALL_ERROR_FIELDS;
|
|
2054
|
-
|
|
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;
|
|
2055
2753
|
return value.ok ? isValidValueWire(value.value) : typeof value.error === "string";
|
|
2056
2754
|
}
|
|
2057
2755
|
function isValidOperation(value) {
|
|
@@ -2060,7 +2758,7 @@ function isValidOperation(value) {
|
|
|
2060
2758
|
return typeof value.name === "string" && /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.test(value.name);
|
|
2061
2759
|
}
|
|
2062
2760
|
function isValidCompletion(value) {
|
|
2063
|
-
if (!
|
|
2761
|
+
if (!isRecord3(value) || !["return", "throw"].includes(value.kind)) return false;
|
|
2064
2762
|
if (value.kind === "return") {
|
|
2065
2763
|
if (!hasClosedFields(value, RETURN_FIELDS, ["kind", "hasValue"]) || typeof value.hasValue !== "boolean") return false;
|
|
2066
2764
|
return value.hasValue ? Object.hasOwn(value, "value") && isValidValueWire(value.value) : !Object.hasOwn(value, "value");
|
|
@@ -2074,7 +2772,7 @@ function isValidConfirms(value, version) {
|
|
|
2074
2772
|
return value.every(isSafeSequence);
|
|
2075
2773
|
}
|
|
2076
2774
|
function isReadableJournalUnchecked(value) {
|
|
2077
|
-
if (!
|
|
2775
|
+
if (!isRecord3(value) || !JOURNAL_VERSIONS.has(value.version) || !STATUSES.has(value.status)) {
|
|
2078
2776
|
return false;
|
|
2079
2777
|
}
|
|
2080
2778
|
const predecessor = value.version < 4;
|
|
@@ -2130,7 +2828,9 @@ function isValidEditTarget(value) {
|
|
|
2130
2828
|
}
|
|
2131
2829
|
function isValidDerivedRun(value) {
|
|
2132
2830
|
try {
|
|
2133
|
-
|
|
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";
|
|
2134
2834
|
} catch {
|
|
2135
2835
|
return false;
|
|
2136
2836
|
}
|
|
@@ -2144,7 +2844,7 @@ function isValidRecoveryBoundaries(value) {
|
|
|
2144
2844
|
}
|
|
2145
2845
|
function isValidEditRelation(meta2, args, journal) {
|
|
2146
2846
|
try {
|
|
2147
|
-
if (!
|
|
2847
|
+
if (!isRecord3(meta2) || !isRecord3(args) || !isValidEditTarget(meta2.dshPtcPlusEdit) || !isValidDerivedRun(meta2.dshPtcPlusDerivedRun) || journal.status === "noop") return false;
|
|
2148
2848
|
if (Object.hasOwn(meta2, "dshPtcPlusRecoveryBoundaries") && !isValidRecoveryBoundaries(meta2.dshPtcPlusRecoveryBoundaries)) return false;
|
|
2149
2849
|
return !Object.hasOwn(args, "expected_target_call_seq") || args.expected_target_call_seq === meta2.dshPtcPlusEdit.targetCallSeq;
|
|
2150
2850
|
} catch {
|
|
@@ -2158,7 +2858,7 @@ function rawArguments(block, settled) {
|
|
|
2158
2858
|
function parseArguments(raw) {
|
|
2159
2859
|
try {
|
|
2160
2860
|
const value = JSON.parse(raw);
|
|
2161
|
-
return
|
|
2861
|
+
return isRecord3(value) ? value : void 0;
|
|
2162
2862
|
} catch {
|
|
2163
2863
|
return void 0;
|
|
2164
2864
|
}
|
|
@@ -2167,7 +2867,7 @@ function resultText(block) {
|
|
|
2167
2867
|
if (!Array.isArray(block.content)) return "";
|
|
2168
2868
|
try {
|
|
2169
2869
|
const parts = block.content.map((item) => item?.type === "text" && typeof item.text === "string" ? item.text : JSON.stringify(item, null, 2));
|
|
2170
|
-
if (parts.length === 0 &&
|
|
2870
|
+
if (parts.length === 0 && isRecord3(block.error)) {
|
|
2171
2871
|
return [block.error.name, block.error.code].filter((value) => typeof value === "string").join(": ");
|
|
2172
2872
|
}
|
|
2173
2873
|
return parts.filter((value) => typeof value === "string").join("\n");
|
|
@@ -2207,18 +2907,19 @@ function isDurableRecoveryDiagnostic(diagnostic) {
|
|
|
2207
2907
|
return diagnostic.code === "PTC-R002" && diagnostic.severity === "warning" && diagnostic.phase === "recover" && diagnostic.stateEffect === "rolled-back";
|
|
2208
2908
|
}
|
|
2209
2909
|
function derivePtcToolView(block, toolName = void 0) {
|
|
2210
|
-
const settled =
|
|
2211
|
-
const argsRaw =
|
|
2910
|
+
const settled = isRecord3(block) && block.kind === "tool-result";
|
|
2911
|
+
const argsRaw = isRecord3(block) ? rawArguments(block, settled) : "";
|
|
2212
2912
|
const args = parseArguments(argsRaw);
|
|
2213
2913
|
const code2 = typeof args?.code === "string" ? args.code : argsRaw;
|
|
2214
2914
|
const explicitDescription = typeof args?.description === "string" && args.description.length > 0 ? args.description : void 0;
|
|
2215
|
-
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;
|
|
2216
2916
|
const description = (explicitDescription ?? generatedDescription)?.split(/\r?\n/, 1)[0] ?? "";
|
|
2917
|
+
const descriptionGenerated = explicitDescription === void 0 && generatedDescription !== void 0;
|
|
2217
2918
|
const output = settled ? resultText(block) : "";
|
|
2218
2919
|
const state = !settled ? "running" : block.error?.code === "interrupted" ? "stopped" : block.isError === true ? "error" : "ok";
|
|
2219
|
-
const journal = settled &&
|
|
2920
|
+
const journal = settled && isRecord3(block.meta) && isCountableJournal(block.meta.dshPtcPlus) ? block.meta.dshPtcPlus : void 0;
|
|
2220
2921
|
if (journal === void 0) {
|
|
2221
|
-
return Object.freeze({ state, description, code: code2, output, ptc: false, features: Object.freeze([]) });
|
|
2922
|
+
return Object.freeze({ state, description, descriptionGenerated, code: code2, output, ptc: false, features: Object.freeze([]) });
|
|
2222
2923
|
}
|
|
2223
2924
|
const rewrites = isValidRewrites(block.meta.dshPtcPlusRewrites, journal) ? block.meta.dshPtcPlusRewrites : [];
|
|
2224
2925
|
const resolvedToolName = typeof toolName === "string" ? toolName : typeof block.call?.name === "string" ? block.call.name : "";
|
|
@@ -2233,7 +2934,7 @@ function derivePtcToolView(block, toolName = void 0) {
|
|
|
2233
2934
|
journal.diagnostics.some(isDurableRecoveryDiagnostic) ? { key: "durableReplay.label", detail: "" } : void 0,
|
|
2234
2935
|
...operationFeatures(journal.operations)
|
|
2235
2936
|
]);
|
|
2236
|
-
return Object.freeze({ state, description, code: code2, output, ptc: true, features: Object.freeze(features) });
|
|
2937
|
+
return Object.freeze({ state, description, descriptionGenerated, code: code2, output, ptc: true, features: Object.freeze(features) });
|
|
2237
2938
|
}
|
|
2238
2939
|
|
|
2239
2940
|
// src/client-host-compat.js
|
|
@@ -2572,12 +3273,17 @@ function createPtcToolView(React32, deps) {
|
|
|
2572
3273
|
if (expandable) setOpen((current) => !current);
|
|
2573
3274
|
};
|
|
2574
3275
|
const summaryText = summary === "" ? null : summary;
|
|
3276
|
+
const generatedSummary = view.descriptionGenerated && outputSummary === "";
|
|
2575
3277
|
const summaryLine = stateText === null && summaryText === null ? null : h(
|
|
2576
3278
|
"div",
|
|
2577
3279
|
{ className: "ptcPlusToolSummaryLine", "data-state": view.state, role: "status" },
|
|
2578
3280
|
stateText === null ? null : h("span", { className: "ptcPlusToolState" }, stateText),
|
|
2579
3281
|
summaryText === null ? null : h("span", { className: "ptcPlusToolSep", "aria-hidden": true }),
|
|
2580
|
-
summaryText === null ? null : h("span", {
|
|
3282
|
+
summaryText === null ? null : h("span", {
|
|
3283
|
+
className: "ptcPlusToolDescription",
|
|
3284
|
+
"data-generated": generatedSummary ? "true" : void 0,
|
|
3285
|
+
title: generatedSummary ? t2("tool.descriptionGenerated") : void 0
|
|
3286
|
+
}, summaryText)
|
|
2581
3287
|
);
|
|
2582
3288
|
const renderBody = (withInspect) => h(
|
|
2583
3289
|
"div",
|
|
@@ -2646,7 +3352,11 @@ function createPtcToolView(React32, deps) {
|
|
|
2646
3352
|
h(
|
|
2647
3353
|
"div",
|
|
2648
3354
|
{ className: "ptcPlusToolHoverContent" },
|
|
2649
|
-
view.description === "" ? null : h("div", {
|
|
3355
|
+
view.description === "" ? null : h("div", {
|
|
3356
|
+
className: "ptcPlusToolHoverDescription",
|
|
3357
|
+
"data-generated": view.descriptionGenerated ? "true" : void 0,
|
|
3358
|
+
title: view.descriptionGenerated ? t2("tool.descriptionGenerated") : void 0
|
|
3359
|
+
}, view.description),
|
|
2650
3360
|
view.code === "" ? null : h(
|
|
2651
3361
|
"div",
|
|
2652
3362
|
{ className: "ptcPlusToolHoverSection" },
|
|
@@ -2815,6 +3525,7 @@ function resolveConfig(config2 = {}) {
|
|
|
2815
3525
|
}
|
|
2816
3526
|
for (const field of CONFIG_FIELDS) assertField(field, resolved[field.key]);
|
|
2817
3527
|
validateCapabilityProfiles(JSON.parse(resolved.capabilityProfiles));
|
|
3528
|
+
validatePromptTextDocument(resolved.promptText);
|
|
2818
3529
|
for (const [key, array] of [["capabilityBaseline", true], ["capabilityOverrides", false]]) {
|
|
2819
3530
|
let value;
|
|
2820
3531
|
try {
|
|
@@ -2900,9 +3611,11 @@ var FALLBACKS = Object.freeze({
|
|
|
2900
3611
|
recorded: "Capabilities updated for session",
|
|
2901
3612
|
pending: "Capabilities prepared; they take effect at the first accepted model step for session",
|
|
2902
3613
|
unavailable: "Select an active PTC session; the command did not update session",
|
|
2903
|
-
usage: "Use /capabilities to inspect or /capabilities refresh to apply saved settings for session"
|
|
3614
|
+
usage: "Use /capabilities to inspect or /capabilities refresh to apply saved settings for session",
|
|
3615
|
+
paused: "Capabilities and context are off; the session stays with the Host capabilities for session",
|
|
3616
|
+
off: "Capability management is off; the session stays with the Host capabilities for session"
|
|
2904
3617
|
});
|
|
2905
|
-
var STATES = /* @__PURE__ */ new Set(["recorded", "pending", "unavailable", "usage", "saved-only"]);
|
|
3618
|
+
var STATES = /* @__PURE__ */ new Set(["recorded", "pending", "unavailable", "usage", "saved-only", "paused", "off"]);
|
|
2906
3619
|
function capabilityCommandReceipt(state, sessionId, error, proposal) {
|
|
2907
3620
|
if (!STATES.has(state) || typeof sessionId !== "string" || !sessionId) throw new TypeError("invalid capability command receipt");
|
|
2908
3621
|
if (error !== void 0 && (state !== "saved-only" || typeof error !== "string" || !error)) throw new TypeError("invalid capability command error");
|
|
@@ -8446,6 +9159,12 @@ function capabilityCommandText(t2, text) {
|
|
|
8446
9159
|
const receipt = readCapabilityCommandReceipt(text);
|
|
8447
9160
|
return receipt ? t2(`capabilities.receipt.${receipt.state}`, { session: receipt.sessionId, error: receipt.error ?? "" }) : text;
|
|
8448
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;
|
|
8449
9168
|
function capabilityChoiceLabel(t2, value) {
|
|
8450
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");
|
|
8451
9170
|
}
|
|
@@ -8456,13 +9175,38 @@ function capabilityRuleLabel(t2, rule, empty2 = "capabilities.policy.inheritRule
|
|
|
8456
9175
|
function validCatalogRule(rule, temporary = false) {
|
|
8457
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))));
|
|
8458
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
|
+
}
|
|
8459
9195
|
function createCapabilityCommandCard(React32) {
|
|
8460
9196
|
const h = React32.createElement;
|
|
8461
|
-
return function CapabilityCommandCard({ node, t: t2 }) {
|
|
9197
|
+
return function CapabilityCommandCard({ node, t: t2, useChat, useSession }) {
|
|
8462
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;
|
|
8463
9206
|
const command2 = `/${node.name ?? "capabilities"}${node.args ? ` ${String(node.args).trim()}` : ""}`;
|
|
8464
9207
|
const text = node.outcome?.text;
|
|
8465
9208
|
const receipt = readCapabilityCommandReceipt(text);
|
|
9209
|
+
if (receipt?.state === "pending") return null;
|
|
8466
9210
|
const legacyRefresh = text === "Session capability environment refreshed; the model-visible notification is recorded.";
|
|
8467
9211
|
if (receipt || String(node.args ?? "").trim() === "refresh" || legacyRefresh) {
|
|
8468
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");
|
|
@@ -8584,12 +9328,7 @@ function capabilityPlanReason(t2, entry) {
|
|
|
8584
9328
|
function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, Modal = createFallbackModal(React32) }) {
|
|
8585
9329
|
const h = React32.createElement;
|
|
8586
9330
|
const field = (key) => CONFIG_FIELDS.find((item) => item.key === key);
|
|
8587
|
-
const
|
|
8588
|
-
{ tab: "manual", keys: ["rules"] },
|
|
8589
|
-
{ tab: "budgets", keys: ["description", "recovery", "preview"] },
|
|
8590
|
-
{ tab: "statistics", keys: ["statistics"] }
|
|
8591
|
-
];
|
|
8592
|
-
const responsibilities = responsibilityGroups.flatMap((group) => group.keys);
|
|
9331
|
+
const responsibilities = ["rules", "description", "recovery", "preview", "statistics", "promptText"];
|
|
8593
9332
|
const choicesFor = (configuration, plan) => {
|
|
8594
9333
|
const historical = plan && ["ptc-capability-plan/v1", "ptc-capability-plan/v3"].includes(plan.schema) && configuration && configuration.capabilityPolicy === void 0;
|
|
8595
9334
|
let statistics;
|
|
@@ -8604,7 +9343,10 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8604
9343
|
enabled: configuration?.capabilityManagementEnabled ?? plan?.enabled,
|
|
8605
9344
|
statistics,
|
|
8606
9345
|
recoveryEnabled: configuration?.capabilityRecoveryEnabled ?? (historical ? plan.enabled : void 0),
|
|
8607
|
-
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
|
|
8608
9350
|
};
|
|
8609
9351
|
};
|
|
8610
9352
|
const flagsFor = (settings) => ({
|
|
@@ -8612,7 +9354,8 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8612
9354
|
description: settings.enabled,
|
|
8613
9355
|
statistics: settings.statistics?.enabled,
|
|
8614
9356
|
recovery: settings.recoveryEnabled,
|
|
8615
|
-
preview: settings.previewEnabled
|
|
9357
|
+
preview: settings.previewEnabled,
|
|
9358
|
+
promptText: settings.promptTextEnabled
|
|
8616
9359
|
});
|
|
8617
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";
|
|
8618
9361
|
function CombinationSummary({
|
|
@@ -8656,32 +9399,23 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8656
9399
|
h("h4", null, t2("capabilities.combination.saved")),
|
|
8657
9400
|
h("span", { className: "ptcPlusCapabilitySaveState", role: "status" }, feedback)
|
|
8658
9401
|
),
|
|
8659
|
-
h("div", { className: "ptcPlusCombinationChoices" }, ...
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
"data-state": state,
|
|
8677
|
-
"aria-controls": key === "rules" || key === "statistics" ? `${id2}-pane-${group.tab}` : `${id2}-context-pane-${key}`,
|
|
8678
|
-
onClick: () => onNavigate(key)
|
|
8679
|
-
},
|
|
8680
|
-
h("span", null, t2(`capabilities.combination.${key}`)),
|
|
8681
|
-
h("small", null, t2(`capabilities.combination.state.${state}`))
|
|
8682
|
-
);
|
|
8683
|
-
}))
|
|
8684
|
-
))),
|
|
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
|
+
})),
|
|
8685
9419
|
h("p", { className: "ptcPlusDetail", role: "status" }, effect),
|
|
8686
9420
|
h(
|
|
8687
9421
|
"details",
|
|
@@ -8862,7 +9596,6 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8862
9596
|
"div",
|
|
8863
9597
|
{ className: "ptcPlusCapabilityBatchBody" },
|
|
8864
9598
|
h("p", { className: "ptcPlusDetail", role: "status" }, t2("capabilities.batch.targets", { count: operation.targets.length })),
|
|
8865
|
-
h("p", { className: "ptcPlusDetail" }, t2("capabilities.batch.scope", { scope: operation.scope })),
|
|
8866
9599
|
operation.excluded ? h("p", { className: "ptcPlusDetail" }, t2("capabilities.batch.excluded", { count: operation.excluded })) : null,
|
|
8867
9600
|
operation.targets.length ? h(
|
|
8868
9601
|
"ul",
|
|
@@ -8878,7 +9611,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8878
9611
|
disabled: blocked || !operation.targets.length,
|
|
8879
9612
|
label: t2(`capabilities.batch.${dimension}`),
|
|
8880
9613
|
onChange: (choice) => setChoices((current) => ({ ...current, [dimension]: choice })),
|
|
8881
|
-
options: ["keep", "automatic", ...dimension === "availability" ? ["enabled", "closed"] : CAPABILITY_DISCLOSURES].map((choice) => ({ value: choice, label: t2(choice === "keep" ? "capabilities.batch.keep" : choice === "automatic" ? "capabilities.policy.inheritRule" : choice === "enabled" ? "capabilities.
|
|
9614
|
+
options: ["keep", "automatic", ...dimension === "availability" ? ["enabled", "closed"] : CAPABILITY_DISCLOSURES].map((choice) => ({ value: choice, label: t2(choice === "keep" ? "capabilities.batch.keep" : choice === "automatic" ? "capabilities.policy.inheritRule" : choice === "enabled" ? "capabilities.action.enable" : choice === "closed" ? "capabilities.action.close" : `capabilities.${choice}`) }))
|
|
8882
9615
|
})
|
|
8883
9616
|
))),
|
|
8884
9617
|
h("p", { className: "ptcPlusDetail" }, t2("capabilities.batch.effect")),
|
|
@@ -8915,6 +9648,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8915
9648
|
const [availability, setAvailability] = React32.useState("all");
|
|
8916
9649
|
const [sort2, setSort] = React32.useState(null);
|
|
8917
9650
|
const [selected, setSelected] = React32.useState(null);
|
|
9651
|
+
const [picked, setPicked] = React32.useState([]);
|
|
8918
9652
|
const [filtersOpen, setFiltersOpen] = React32.useState(false);
|
|
8919
9653
|
const [batchOperation, setBatchOperation] = React32.useState(null);
|
|
8920
9654
|
const [inheritedRulesOpen, setInheritedRulesOpen] = React32.useState(false);
|
|
@@ -8968,6 +9702,13 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
8968
9702
|
const groupOrder = ["tool", ...[...groups.keys()].filter((key) => key.startsWith("mcp:")).sort(compare), "skill", "resource", "other", "unavailable"];
|
|
8969
9703
|
const defaultEntries = groupOrder.flatMap((group) => (groups.get(group) ?? []).sort(defaultOrder));
|
|
8970
9704
|
const visible = sortCapabilityEntries(defaultEntries, sort2, (item, column) => column === "name" ? item.name : column === "type" ? t2(`capabilities.type.${type(item)}`) : column === "source" ? displayedSource(item) : column === "availability" ? t2(`capabilities.rowState.${state(item)}`) : t2(`capabilities.${item.resolvedRule.disclosure}`));
|
|
9705
|
+
const pickedIds = picked.filter((id2) => entries.some((item) => item.id === id2));
|
|
9706
|
+
const pickedEntries = pickedIds.map((id2) => entries.find((item) => item.id === id2)).filter(Boolean);
|
|
9707
|
+
const pickedTargets = pickedEntries.filter((item) => item.availability === "available");
|
|
9708
|
+
const allVisiblePicked = visible.length > 0 && visible.every((item) => pickedIds.includes(item.id));
|
|
9709
|
+
const someVisiblePicked = visible.some((item) => pickedIds.includes(item.id));
|
|
9710
|
+
const togglePick = (id2) => setPicked((current) => current.includes(id2) ? current.filter((item) => item !== id2) : [...current, id2]);
|
|
9711
|
+
const toggleAllVisible = () => setPicked((current) => allVisiblePicked ? current.filter((id2) => !visible.some((item) => item.id === id2)) : [.../* @__PURE__ */ new Set([...current, ...visible.map((item) => item.id)])]);
|
|
8971
9712
|
const entry = visible.find((item) => item.id === selected);
|
|
8972
9713
|
const plan = sessionId ? plans?.find((item) => item.sessionId === sessionId) : void 0;
|
|
8973
9714
|
const effective = plan?.effective.entries.find((item) => item.id === entry?.id);
|
|
@@ -9080,17 +9821,30 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
9080
9821
|
"aria-haspopup": "dialog",
|
|
9081
9822
|
onClick: () => setFiltersOpen(true)
|
|
9082
9823
|
}, t2("capabilities.filterAction")),
|
|
9083
|
-
h(
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9824
|
+
h(
|
|
9825
|
+
"button",
|
|
9826
|
+
{
|
|
9827
|
+
type: "button",
|
|
9828
|
+
className: "ptcPlusButton",
|
|
9829
|
+
"aria-haspopup": "dialog",
|
|
9830
|
+
"aria-label": t2("capabilities.batchSettings"),
|
|
9831
|
+
disabled: disabled("capabilityPolicy") || pickedTargets.length === 0,
|
|
9832
|
+
onClick: () => setBatchOperation({
|
|
9833
|
+
targets: pickedTargets.map((item) => ({ id: item.id, name: item.name })),
|
|
9834
|
+
excluded: pickedIds.length - pickedTargets.length
|
|
9835
|
+
})
|
|
9836
|
+
},
|
|
9837
|
+
t2("capabilities.batchSettings"),
|
|
9838
|
+
pickedIds.length ? h(
|
|
9839
|
+
"span",
|
|
9840
|
+
{
|
|
9841
|
+
className: "ptcPlusCapabilityBatchCount",
|
|
9842
|
+
"aria-hidden": true,
|
|
9843
|
+
title: t2("capabilities.selectionCount", { count: pickedIds.length })
|
|
9844
|
+
},
|
|
9845
|
+
String(pickedIds.length)
|
|
9846
|
+
) : null
|
|
9847
|
+
),
|
|
9094
9848
|
h("button", {
|
|
9095
9849
|
type: "button",
|
|
9096
9850
|
className: "ptcPlusButton",
|
|
@@ -9194,8 +9948,20 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
9194
9948
|
{
|
|
9195
9949
|
key: column.key,
|
|
9196
9950
|
role: "columnheader",
|
|
9197
|
-
"aria-sort": capabilitySortDirection(sort2, column.key)
|
|
9951
|
+
"aria-sort": capabilitySortDirection(sort2, column.key),
|
|
9952
|
+
...column.key === "name" ? { "aria-label": t2("capabilities.member"), className: "ptcPlusCapabilityPickHead" } : {}
|
|
9198
9953
|
},
|
|
9954
|
+
...column.key === "name" ? [h("input", {
|
|
9955
|
+
type: "checkbox",
|
|
9956
|
+
className: "ptcPlusPick",
|
|
9957
|
+
checked: allVisiblePicked,
|
|
9958
|
+
ref: (node) => {
|
|
9959
|
+
if (node) node.indeterminate = someVisiblePicked && !allVisiblePicked;
|
|
9960
|
+
},
|
|
9961
|
+
disabled: visible.length === 0,
|
|
9962
|
+
"aria-label": t2("capabilities.selectAllVisible"),
|
|
9963
|
+
onChange: toggleAllVisible
|
|
9964
|
+
})] : [],
|
|
9199
9965
|
h(
|
|
9200
9966
|
"button",
|
|
9201
9967
|
{
|
|
@@ -9223,7 +9989,24 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
9223
9989
|
"data-availability": item.availability,
|
|
9224
9990
|
onClick: () => setSelected(item.id)
|
|
9225
9991
|
},
|
|
9226
|
-
h(
|
|
9992
|
+
h(
|
|
9993
|
+
"div",
|
|
9994
|
+
{ className: "ptcPlusCapabilityIdentity", role: "cell" },
|
|
9995
|
+
h("input", {
|
|
9996
|
+
type: "checkbox",
|
|
9997
|
+
className: "ptcPlusPick",
|
|
9998
|
+
checked: pickedIds.includes(item.id),
|
|
9999
|
+
"aria-label": t2("capabilities.selectForBatch", { name: item.name ?? item.id }),
|
|
10000
|
+
onClick: (event) => event.stopPropagation(),
|
|
10001
|
+
onChange: () => togglePick(item.id)
|
|
10002
|
+
}),
|
|
10003
|
+
h(
|
|
10004
|
+
"div",
|
|
10005
|
+
{ className: "ptcPlusCapabilityIdentityText" },
|
|
10006
|
+
h("span", { className: "ptcPlusCapabilityName" }, item.name),
|
|
10007
|
+
h("code", null, item.id)
|
|
10008
|
+
)
|
|
10009
|
+
),
|
|
9227
10010
|
h("span", { className: "ptcPlusCapabilityBadge", role: "cell", "data-kind": type(item) }, t2(`capabilities.type.${type(item)}`)),
|
|
9228
10011
|
h("span", { className: "ptcPlusCapabilitySource", role: "cell" }, displayedSource(item)),
|
|
9229
10012
|
// The cell stays a plain cell so its empty area selects the row; only the switch and
|
|
@@ -9971,6 +10754,451 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
9971
10754
|
update(tabs[next]);
|
|
9972
10755
|
event.currentTarget.parentElement.querySelectorAll("[role=tab]")[next].focus({ preventScroll: true });
|
|
9973
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
|
+
}
|
|
9974
11202
|
function CapabilityWorkbench({
|
|
9975
11203
|
value,
|
|
9976
11204
|
configurationReady,
|
|
@@ -10000,7 +11228,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10000
11228
|
}) {
|
|
10001
11229
|
const [tab, setTab] = React32.useState("manual");
|
|
10002
11230
|
const [contextSection, setContextSection] = React32.useState("description");
|
|
10003
|
-
const tabs = ["manual", "budgets", "statistics", "plans"];
|
|
11231
|
+
const tabs = ["manual", "budgets", "statistics", "prompt", "plans"];
|
|
10004
11232
|
const feedback = saving ? t2("state.syncing") : saveStatus && saveStatus.key !== "status.applied" ? t2(saveStatus.key, saveStatus.params) : t2(configurationWritable ? "capabilities.savedForNew" : "footer.readOnly");
|
|
10005
11233
|
return h(
|
|
10006
11234
|
"div",
|
|
@@ -10020,7 +11248,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10020
11248
|
t: t2,
|
|
10021
11249
|
id: id2,
|
|
10022
11250
|
onNavigate: (key) => {
|
|
10023
|
-
setTab(key === "rules" ? "manual" : key === "statistics" ? "statistics" : "budgets");
|
|
11251
|
+
setTab(key === "rules" ? "manual" : key === "statistics" ? "statistics" : key === "promptText" ? "prompt" : "budgets");
|
|
10024
11252
|
if (["description", "recovery", "preview"].includes(key)) setContextSection(key);
|
|
10025
11253
|
}
|
|
10026
11254
|
}),
|
|
@@ -10049,7 +11277,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10049
11277
|
"aria-labelledby": `${id2}-tab-${key}`,
|
|
10050
11278
|
hidden: tab !== key
|
|
10051
11279
|
},
|
|
10052
|
-
h(
|
|
11280
|
+
key === "prompt" ? null : h(
|
|
10053
11281
|
"div",
|
|
10054
11282
|
{ className: "ptcPlusTaskHead" },
|
|
10055
11283
|
h("h4", null, t2(`capabilities.title.${key}`)),
|
|
@@ -10097,7 +11325,7 @@ function createCapabilitySettingsViews(React32, { SearchIcon, Select: Select2, M
|
|
|
10097
11325
|
id: id2,
|
|
10098
11326
|
section: contextSection,
|
|
10099
11327
|
setSection: setContextSection
|
|
10100
|
-
}) : 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 })
|
|
10101
11329
|
))
|
|
10102
11330
|
);
|
|
10103
11331
|
}
|
|
@@ -10180,9 +11408,13 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10180
11408
|
const available = React32.useSyncExternalStore(source.subscribe, source.getSnapshot);
|
|
10181
11409
|
const [catalog, setCatalog] = React32.useState([]);
|
|
10182
11410
|
const [management, setManagement] = React32.useState("unknown");
|
|
11411
|
+
const [savedSettings, setSavedSettings] = React32.useState(null);
|
|
10183
11412
|
const [loading, setLoading] = React32.useState(false);
|
|
10184
11413
|
const [error, setError] = React32.useState(null);
|
|
10185
11414
|
const [drafts, setDrafts] = React32.useState(emptyDrafts);
|
|
11415
|
+
const [picked, setPicked] = React32.useState([]);
|
|
11416
|
+
const [batchOpen, setBatchOpen] = React32.useState(false);
|
|
11417
|
+
const [batchChoices, setBatchChoices] = React32.useState({ availability: "keep", disclosure: "keep" });
|
|
10186
11418
|
const [selectedId, setSelectedId] = React32.useState(null);
|
|
10187
11419
|
const [pane, setPane] = React32.useState("list");
|
|
10188
11420
|
const [query, setQuery] = React32.useState("");
|
|
@@ -10218,7 +11450,10 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10218
11450
|
applying.current = false;
|
|
10219
11451
|
setCatalog([]);
|
|
10220
11452
|
setManagement("unknown");
|
|
11453
|
+
setSavedSettings(null);
|
|
10221
11454
|
setDrafts(emptyDrafts());
|
|
11455
|
+
setPicked([]);
|
|
11456
|
+
setBatchOpen(false);
|
|
10222
11457
|
setSelectedId(null);
|
|
10223
11458
|
setPane("list");
|
|
10224
11459
|
setFocusDimension(null);
|
|
@@ -10235,7 +11470,9 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10235
11470
|
throw new Error("Invalid capability catalog");
|
|
10236
11471
|
}
|
|
10237
11472
|
setCatalog(payload.entries);
|
|
11473
|
+
setPicked((current) => current.filter((id2) => payload.entries.some((entry) => entry.id === id2)));
|
|
10238
11474
|
setManagement(["managed", "paused", "off", "unknown"].includes(payload.management) ? payload.management : "unknown");
|
|
11475
|
+
setSavedSettings(payload.savedSettings !== null && typeof payload.savedSettings === "object" && !Array.isArray(payload.savedSettings) ? payload.savedSettings : null);
|
|
10239
11476
|
setError(null);
|
|
10240
11477
|
return payload.entries;
|
|
10241
11478
|
} catch (failure) {
|
|
@@ -10246,11 +11483,14 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10246
11483
|
}, [sessionId]);
|
|
10247
11484
|
React32.useEffect(() => {
|
|
10248
11485
|
if (!open || !enabled || !available) {
|
|
10249
|
-
|
|
10250
|
-
|
|
11486
|
+
if (!applying.current) {
|
|
11487
|
+
request.current?.abort();
|
|
11488
|
+
request.current = null;
|
|
11489
|
+
}
|
|
10251
11490
|
setLoading(false);
|
|
10252
11491
|
return;
|
|
10253
11492
|
}
|
|
11493
|
+
if (applying.current) return;
|
|
10254
11494
|
const controller = new AbortController();
|
|
10255
11495
|
request.current = controller;
|
|
10256
11496
|
void load(controller.signal);
|
|
@@ -10259,17 +11499,10 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10259
11499
|
if (request.current === controller) request.current = null;
|
|
10260
11500
|
};
|
|
10261
11501
|
}, [open, enabled, available, load]);
|
|
10262
|
-
React32.useEffect(() => {
|
|
10263
|
-
if (!enabled || !available) {
|
|
10264
|
-
request.current?.abort();
|
|
10265
|
-
request.current = null;
|
|
10266
|
-
applying.current = false;
|
|
10267
|
-
setPending(false);
|
|
10268
|
-
}
|
|
10269
|
-
}, [enabled, available]);
|
|
10270
11502
|
const choices = drafts;
|
|
10271
11503
|
const choiceFor = (entry) => choices[entry.id] ?? entry.temporary ?? "inherit";
|
|
10272
|
-
const
|
|
11504
|
+
const savedBlocks = savedSettings !== null && (savedSettings.enabled === false || savedSettings.contextEnabled === false);
|
|
11505
|
+
const writesBlocked = management === "paused" || management === "off" || savedBlocks;
|
|
10273
11506
|
const sourceKey = (entry) => entry.source?.kind === "mcp" ? "mcp:" + (entry.source.server ?? "") : entry.source?.kind === "skill" ? "skill:" + (entry.source.bucket ?? "") : entry.source?.kind ?? "unknown";
|
|
10274
11507
|
const sourceLabel = (entry) => entry.source?.kind === "mcp" ? `MCP \xB7 ${entry.source.server ?? ""}` : entry.source?.kind === "skill" ? `Skill \xB7 ${entry.source.bucket ? t2(`capabilities.source.${entry.source.bucket}`) : t2("capabilities.source.unknown")}` : t2(`capabilities.source.${entry.source?.kind === "host" ? "host" : "unknown"}`);
|
|
10275
11508
|
const category = (entry) => entry.category === "skill" ? "skills" : ["server", "resource"].includes(entry.category) ? "mcp" : entry.source?.kind === "mcp" ? "mcp_tools" : "tools";
|
|
@@ -10295,29 +11528,45 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10295
11528
|
const matches = sortCapabilityEntries(defaultOrder, sort2, (entry, column) => column === "name" ? entry.name ?? entry.id : column === "type" ? t2(`capabilities.type.${type(entry)}`) : column === "source" ? displayedSource(entry) : column === "availability" ? capabilityChoiceLabel(t2, effectiveAvailability(entry)) : capabilityChoiceLabel(t2, effectiveContext(entry)));
|
|
10296
11529
|
const selected = matches.find((entry) => entry.id === selectedId) ?? ["tools", "skills", "mcp", "mcp_tools"].map((group) => matches.find((entry) => category(entry) === group)).find(Boolean);
|
|
10297
11530
|
const staged = Object.entries(choices).flatMap(([id2, choice]) => typeof choice === "object" ? Object.entries(choice).map(([dimension, selection]) => [id2, selection, dimension]) : [[id2, choice]]);
|
|
10298
|
-
const
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
11531
|
+
const pickedRows = picked.map((id2) => catalog.find((entry) => entry.id === id2)).filter(Boolean);
|
|
11532
|
+
const allMatchesPicked = matches.length > 0 && matches.every((entry) => picked.includes(entry.id));
|
|
11533
|
+
const someMatchesPicked = matches.some((entry) => picked.includes(entry.id));
|
|
11534
|
+
const togglePick = (id2) => setPicked((current) => current.includes(id2) ? current.filter((item) => item !== id2) : [...current, id2]);
|
|
11535
|
+
const toggleAllMatches = () => setPicked((current) => allMatchesPicked ? current.filter((id2) => !matches.some((entry) => entry.id === id2)) : [.../* @__PURE__ */ new Set([...current, ...matches.map((entry) => entry.id)])]);
|
|
11536
|
+
const stageDimension = (current, entry, dimension, choice) => {
|
|
11537
|
+
const next = { ...current };
|
|
11538
|
+
const patch = typeof next[entry.id] === "object" && next[entry.id] !== null ? { ...next[entry.id] } : {};
|
|
11539
|
+
const original = storedDimension(entry, dimension) ?? "inherit";
|
|
11540
|
+
const selectedChoice = patch[dimension] ?? original;
|
|
11541
|
+
if (choice !== selectedChoice) {
|
|
11542
|
+
if (choice === original) delete patch[dimension];
|
|
10303
11543
|
else patch[dimension] = choice;
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
11544
|
+
}
|
|
11545
|
+
if (Object.keys(patch).length) next[entry.id] = patch;
|
|
11546
|
+
else delete next[entry.id];
|
|
11547
|
+
return next;
|
|
11548
|
+
};
|
|
11549
|
+
const chooseDimension = (id2, dimension, choice) => {
|
|
11550
|
+
const entry = catalog.find((item) => item.id === id2);
|
|
11551
|
+
if (entry) setDrafts((current) => stageDimension(current, entry, dimension, choice));
|
|
10309
11552
|
};
|
|
10310
11553
|
const choose = (id2, next) => {
|
|
10311
11554
|
const entry = catalog.find((item) => item.id === id2);
|
|
10312
11555
|
if (!entry) return;
|
|
10313
11556
|
const original = entry.temporary ?? "inherit";
|
|
11557
|
+
if (next === (choices[id2] ?? original)) return;
|
|
10314
11558
|
setDrafts((current) => {
|
|
10315
11559
|
const nextChoices = { ...current };
|
|
10316
|
-
if (next === original
|
|
11560
|
+
if (next === original) delete nextChoices[id2];
|
|
10317
11561
|
else nextChoices[id2] = next;
|
|
10318
11562
|
return nextChoices;
|
|
10319
11563
|
});
|
|
10320
11564
|
};
|
|
11565
|
+
const stageBatch = (ids, selections2) => setDrafts((current) => ids.reduce((draft, id2) => {
|
|
11566
|
+
const entry = catalog.find((item) => item.id === id2);
|
|
11567
|
+
if (!entry) return draft;
|
|
11568
|
+
return ["availability", "disclosure"].reduce((next, dimension) => selections2[dimension] === void 0 || selections2[dimension] === "keep" ? next : stageDimension(next, entry, dimension, selections2[dimension]), draft);
|
|
11569
|
+
}, current));
|
|
10321
11570
|
const hasInheritanceReset = staged.some(([, selection]) => selection === "inherit");
|
|
10322
11571
|
const apply = async (targetScope) => {
|
|
10323
11572
|
if (applying.current || !enabled || !available || writesBlocked || staged.length === 0) return;
|
|
@@ -10329,58 +11578,62 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10329
11578
|
const controller = new AbortController();
|
|
10330
11579
|
request.current?.abort();
|
|
10331
11580
|
request.current = controller;
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
11581
|
+
const finish = () => {
|
|
11582
|
+
if (request.current === controller) request.current = null;
|
|
11583
|
+
applying.current = false;
|
|
11584
|
+
if (mounted.current) setPending(false);
|
|
11585
|
+
};
|
|
11586
|
+
try {
|
|
11587
|
+
let completed = 0;
|
|
11588
|
+
let pendingCount = 0;
|
|
11589
|
+
let failure = null;
|
|
11590
|
+
let savedOnly = null;
|
|
11591
|
+
for (const [id2, selection, dimension] of staged) {
|
|
11592
|
+
if (controller.signal.aborted) break;
|
|
11593
|
+
try {
|
|
11594
|
+
const result = await commands.run(sessionId, `set ${targetScope} ${encodeURIComponent(id2)} ${dimension ? dimension + " " : ""}${selection}`, controller.signal);
|
|
11595
|
+
const receipt = readCapabilityCommandReceipt(result.text);
|
|
11596
|
+
if (!receipt || receipt.sessionId !== sessionId || !["recorded", "pending"].includes(receipt.state)) {
|
|
11597
|
+
throw new Error(receipt ? capabilityCommandText(t2, result.text) : t2("capabilities.quick.unknownReceipt"));
|
|
11598
|
+
}
|
|
11599
|
+
if (receipt?.state === "pending") pendingCount += 1;
|
|
11600
|
+
completed += 1;
|
|
11601
|
+
} catch (cause) {
|
|
11602
|
+
failure = String(cause?.message ?? cause);
|
|
11603
|
+
savedOnly = readCapabilityCommandReceipt(failure)?.state === "saved-only" ? readCapabilityCommandReceipt(failure) : null;
|
|
11604
|
+
break;
|
|
10343
11605
|
}
|
|
10344
|
-
if (receipt?.state === "pending") pendingCount += 1;
|
|
10345
|
-
completed += 1;
|
|
10346
|
-
} catch (cause) {
|
|
10347
|
-
failure = String(cause?.message ?? cause);
|
|
10348
|
-
savedOnly = readCapabilityCommandReceipt(failure)?.state === "saved-only" ? readCapabilityCommandReceipt(failure) : null;
|
|
10349
|
-
break;
|
|
10350
|
-
}
|
|
10351
|
-
}
|
|
10352
|
-
if (request.current !== controller || controller.signal.aborted || !mounted.current) return;
|
|
10353
|
-
const refreshed = await load(controller.signal);
|
|
10354
|
-
if (request.current !== controller || controller.signal.aborted || !mounted.current) return;
|
|
10355
|
-
const confirmed = refreshed ? staged.slice(0, completed).filter(([id2, selection, dimension]) => {
|
|
10356
|
-
const entry = refreshed.find((item) => item.id === id2);
|
|
10357
|
-
if (dimension) return entry && (targetScope === "session" ? (entry.temporaryRule?.[dimension] ?? "inherit") === selection : (entry.savedRule?.[dimension] ?? "automatic") === selection && entry.temporaryRule?.[dimension] === void 0);
|
|
10358
|
-
return entry && (targetScope === "session" ? entry.temporary === selection : entry.saved === selection && entry.temporary === "inherit");
|
|
10359
|
-
}) : [];
|
|
10360
|
-
setDrafts((current) => {
|
|
10361
|
-
const nextChoices = { ...current };
|
|
10362
|
-
for (const [id2, selection, dimension] of confirmed) {
|
|
10363
|
-
if (savedOnly && id2 === staged[completed]?.[0] && dimension === staged[completed]?.[2]) continue;
|
|
10364
|
-
if (dimension) {
|
|
10365
|
-
if (nextChoices[id2]?.[dimension] !== submitted[id2]?.[dimension]) continue;
|
|
10366
|
-
const patch = { ...nextChoices[id2] };
|
|
10367
|
-
delete patch[dimension];
|
|
10368
|
-
if (Object.keys(patch).length) nextChoices[id2] = patch;
|
|
10369
|
-
else delete nextChoices[id2];
|
|
10370
|
-
} else if (nextChoices[id2] === submitted[id2]) delete nextChoices[id2];
|
|
10371
11606
|
}
|
|
10372
|
-
return
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
11607
|
+
if (request.current !== controller || controller.signal.aborted || !mounted.current) return;
|
|
11608
|
+
const refreshed = await load(controller.signal);
|
|
11609
|
+
if (request.current !== controller || controller.signal.aborted || !mounted.current) return;
|
|
11610
|
+
const confirmed = refreshed ? staged.slice(0, completed).filter(([id2, selection, dimension]) => {
|
|
11611
|
+
const entry = refreshed.find((item) => item.id === id2);
|
|
11612
|
+
if (dimension) return entry && (targetScope === "session" ? (entry.temporaryRule?.[dimension] ?? "inherit") === selection : (entry.savedRule?.[dimension] ?? "automatic") === selection && entry.temporaryRule?.[dimension] === void 0);
|
|
11613
|
+
return entry && (targetScope === "session" ? entry.temporary === selection : entry.saved === selection && entry.temporary === "inherit");
|
|
11614
|
+
}) : [];
|
|
11615
|
+
setDrafts((current) => {
|
|
11616
|
+
const nextChoices = { ...current };
|
|
11617
|
+
for (const [id2, selection, dimension] of confirmed) {
|
|
11618
|
+
if (savedOnly && id2 === staged[completed]?.[0] && dimension === staged[completed]?.[2]) continue;
|
|
11619
|
+
if (dimension) {
|
|
11620
|
+
if (nextChoices[id2]?.[dimension] !== submitted[id2]?.[dimension]) continue;
|
|
11621
|
+
const patch = { ...nextChoices[id2] };
|
|
11622
|
+
delete patch[dimension];
|
|
11623
|
+
if (Object.keys(patch).length) nextChoices[id2] = patch;
|
|
11624
|
+
else delete nextChoices[id2];
|
|
11625
|
+
} else if (nextChoices[id2] === submitted[id2]) delete nextChoices[id2];
|
|
11626
|
+
}
|
|
11627
|
+
return nextChoices;
|
|
11628
|
+
});
|
|
11629
|
+
if (savedOnly) setStatus({ key: "capabilities.quick.savedOnly", params: { count: completed, error: savedOnly.error ?? "" } });
|
|
11630
|
+
else if (failure || !refreshed || confirmed.length < completed) setStatus({
|
|
11631
|
+
key: "capabilities.quick.partial",
|
|
11632
|
+
params: { count: confirmed.length, error: failure ?? t2("capabilities.quick.confirmationUnavailable") }
|
|
11633
|
+
});
|
|
11634
|
+
else setStatus({ key: pendingCount ? "capabilities.quick.pendingApplied" : "capabilities.quick.applied", params: { count: completed } });
|
|
11635
|
+
} finally {
|
|
11636
|
+
finish();
|
|
10384
11637
|
}
|
|
10385
11638
|
};
|
|
10386
11639
|
const discard = () => {
|
|
@@ -10388,6 +11641,7 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10388
11641
|
setStatus(null);
|
|
10389
11642
|
};
|
|
10390
11643
|
const close = () => {
|
|
11644
|
+
if (applying.current) return;
|
|
10391
11645
|
request.current?.abort();
|
|
10392
11646
|
request.current = null;
|
|
10393
11647
|
applying.current = false;
|
|
@@ -10408,15 +11662,82 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10408
11662
|
options: options2.map(([key, text]) => ({ value: key, label: text }))
|
|
10409
11663
|
})
|
|
10410
11664
|
);
|
|
11665
|
+
const ruleLabel = (rule, empty2) => capabilityRuleLabel(t2, rule, empty2);
|
|
11666
|
+
const statusLabel = (value) => value && typeof value === "object" ? ruleLabel(value) : capabilityChoiceLabel(t2, value);
|
|
11667
|
+
const storedDimension = (entry, dimension) => {
|
|
11668
|
+
const rule = entry.temporaryRule !== null && typeof entry.temporaryRule === "object" && !Array.isArray(entry.temporaryRule) ? entry.temporaryRule : void 0;
|
|
11669
|
+
const override = rule?.[dimension];
|
|
11670
|
+
if (override !== void 0) return override;
|
|
11671
|
+
if (entry.temporary === "automatic") return "automatic";
|
|
11672
|
+
if (typeof entry.temporary === "string" && !["inherit", "automatic", "unknown", "pending"].includes(entry.temporary)) {
|
|
11673
|
+
return dimension === "availability" ? entry.temporary === "closed" ? "closed" : "enabled" : CAPABILITY_DISCLOSURES.includes(entry.temporary) ? entry.temporary : void 0;
|
|
11674
|
+
}
|
|
11675
|
+
return void 0;
|
|
11676
|
+
};
|
|
11677
|
+
const frozenDimension = (entry, dimension) => {
|
|
11678
|
+
const source2 = entry.sourceDimensions?.[dimension];
|
|
11679
|
+
if (typeof source2 === "string") return source2;
|
|
11680
|
+
const effective = entry.effectiveDimensions?.[dimension];
|
|
11681
|
+
if (typeof effective === "string" && storedDimension(entry, dimension) === void 0) return effective;
|
|
11682
|
+
if (dimension === "availability") return entry.effective === "closed" ? "closed" : ["full", "on-demand", "host", "enabled"].includes(entry.effective) ? "enabled" : void 0;
|
|
11683
|
+
return ["full", "on-demand", "host"].includes(entry.effective) ? entry.effective : void 0;
|
|
11684
|
+
};
|
|
11685
|
+
const stateText = (value) => value === void 0 ? t2("capabilities.quick.unknown") : statusLabel(value);
|
|
11686
|
+
const dimensionCurrent = (entry, dimension) => choices[entry.id]?.[dimension] ?? storedDimension(entry, dimension) ?? "inherit";
|
|
11687
|
+
const dimensionImpact = (entry, dimension) => {
|
|
11688
|
+
const draft = choices[entry.id]?.[dimension];
|
|
11689
|
+
const choice = draft ?? storedDimension(entry, dimension) ?? "inherit";
|
|
11690
|
+
const stagedChange = draft !== void 0;
|
|
11691
|
+
if (choice === "inherit") return { state: frozenDimension(entry, dimension), origin: "capabilities.quick.originPlan", staged: stagedChange };
|
|
11692
|
+
if (choice === "automatic") return { upper: true, staged: stagedChange };
|
|
11693
|
+
return { state: choice, origin: "capabilities.quick.originSession", staged: stagedChange };
|
|
11694
|
+
};
|
|
11695
|
+
const impactLine = (impact) => impact.upper ? t2(impact.staged ? "capabilities.quick.impactUpperPending" : "capabilities.quick.impactUpper") : t2(
|
|
11696
|
+
impact.staged ? "capabilities.quick.impactPending" : "capabilities.quick.impact",
|
|
11697
|
+
{ state: stateText(impact.state), source: t2(impact.origin) }
|
|
11698
|
+
);
|
|
11699
|
+
const dimensionOptions = (entry, dimension) => {
|
|
11700
|
+
const restore = stateText(frozenDimension(entry, dimension));
|
|
11701
|
+
const inherit = storedDimension(entry, dimension) === void 0 ? t2("capabilities.quick.noChange", { state: restore }) : t2("capabilities.quick.undoTemp", { state: restore });
|
|
11702
|
+
const sourceDimension = entry.sourceRule?.[dimension];
|
|
11703
|
+
const distinctRule = sourceDimension !== void 0 && sourceDimension !== "automatic";
|
|
11704
|
+
return [
|
|
11705
|
+
"inherit",
|
|
11706
|
+
...distinctRule || dimensionCurrent(entry, dimension) === "automatic" ? ["automatic"] : [],
|
|
11707
|
+
...dimension === "availability" ? ["enabled", "closed"] : CAPABILITY_DISCLOSURES
|
|
11708
|
+
].map((choice) => ({ value: choice, label: choice === "inherit" ? inherit : choice === "automatic" ? t2("capabilities.quick.upperRule") : t2(choice === "enabled" ? "capabilities.action.enable" : choice === "closed" ? "capabilities.action.close" : `capabilities.${choice}`) }));
|
|
11709
|
+
};
|
|
11710
|
+
const legacyFrozenState = (entry) => {
|
|
11711
|
+
const stored = typeof entry.temporary === "string" && !["inherit", "automatic", "unknown", "pending"].includes(entry.temporary);
|
|
11712
|
+
if (stored) return ["full", "on-demand", "closed"].includes(entry.sessionSourceSelection) ? entry.sessionSourceSelection : void 0;
|
|
11713
|
+
return ["full", "on-demand", "closed", "host"].includes(entry.effective) ? entry.effective : void 0;
|
|
11714
|
+
};
|
|
11715
|
+
const choiceCurrent = (entry) => choices[entry.id] ?? entry.temporary ?? "inherit";
|
|
11716
|
+
const choiceImpact = (entry) => {
|
|
11717
|
+
const draft = choices[entry.id];
|
|
11718
|
+
const choice = draft ?? entry.temporary ?? "inherit";
|
|
11719
|
+
const stagedChange = draft !== void 0;
|
|
11720
|
+
if (choice === "inherit") return { state: legacyFrozenState(entry), origin: "capabilities.quick.originPlan", staged: stagedChange };
|
|
11721
|
+
if (choice === "automatic") return { upper: true, staged: stagedChange };
|
|
11722
|
+
return { state: choice, origin: "capabilities.quick.originSession", staged: stagedChange };
|
|
11723
|
+
};
|
|
10411
11724
|
const choiceOptions = selected ? [
|
|
10412
11725
|
"inherit",
|
|
10413
11726
|
"automatic",
|
|
10414
11727
|
...selected.category === "server" ? [] : ["full", "on-demand"],
|
|
10415
11728
|
"closed"
|
|
10416
|
-
].map((choice) => ({ value: choice, label: t2(choice === "
|
|
10417
|
-
const ruleLabel = (rule, empty2) => capabilityRuleLabel(t2, rule, empty2);
|
|
11729
|
+
].map((choice) => ({ value: choice, label: choice === "inherit" ? t2(selected.temporary !== void 0 && selected.temporary !== "inherit" ? "capabilities.quick.undoChange" : "capabilities.quick.keepUnchanged") : choice === "automatic" ? t2("capabilities.quick.upperRule") : t2(`capabilities.${choice}`) })) : [];
|
|
10418
11730
|
const dimensionFacts = (dimensions) => ["availability", "disclosure"].map((dimension) => `${t2(`capabilities.policy.${dimension}`)}: ${statusLabel(dimensions[dimension])} (${dimensions[`${dimension}Source`] ?? t2("capabilities.quick.unknown")})`).join(" \xB7 ");
|
|
10419
|
-
const
|
|
11731
|
+
const temporaryDimension = (entry, dimension) => {
|
|
11732
|
+
const rule = entry.temporaryRule !== null && typeof entry.temporaryRule === "object" && !Array.isArray(entry.temporaryRule) ? entry.temporaryRule : void 0;
|
|
11733
|
+
const override = rule?.[dimension];
|
|
11734
|
+
if (override !== void 0 && override !== "automatic") return override;
|
|
11735
|
+
if (typeof entry.temporary === "string" && !["inherit", "automatic"].includes(entry.temporary)) {
|
|
11736
|
+
return dimension === "availability" ? entry.temporary === "closed" ? "closed" : "enabled" : entry.temporary;
|
|
11737
|
+
}
|
|
11738
|
+
return void 0;
|
|
11739
|
+
};
|
|
11740
|
+
const dimensionCell = (entry, dimension, value) => temporaryDimension(entry, dimension) === value ? t2("capabilities.quick.temporaryState", { state: statusLabel(value) }) : statusLabel(value);
|
|
10420
11741
|
const openEditor = (entry, dimension = "availability") => {
|
|
10421
11742
|
setSelectedId(entry.id);
|
|
10422
11743
|
setPane("detail");
|
|
@@ -10435,16 +11756,29 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10435
11756
|
h(
|
|
10436
11757
|
"div",
|
|
10437
11758
|
{ role: "cell", className: "ptcPlusCapabilityIdentity" },
|
|
10438
|
-
h("
|
|
10439
|
-
type: "
|
|
10440
|
-
className: "
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
}
|
|
10447
|
-
|
|
11759
|
+
h("input", {
|
|
11760
|
+
type: "checkbox",
|
|
11761
|
+
className: "ptcPlusPick",
|
|
11762
|
+
checked: picked.includes(entry.id),
|
|
11763
|
+
disabled: writesBlocked,
|
|
11764
|
+
"aria-label": t2("capabilities.selectForBatch", { name: entry.name ?? entry.id }),
|
|
11765
|
+
onClick: (event) => event.stopPropagation(),
|
|
11766
|
+
onChange: () => togglePick(entry.id)
|
|
11767
|
+
}),
|
|
11768
|
+
h(
|
|
11769
|
+
"div",
|
|
11770
|
+
{ className: "ptcPlusCapabilityIdentityText" },
|
|
11771
|
+
h("button", {
|
|
11772
|
+
type: "button",
|
|
11773
|
+
className: "ptcPlusSessionCapabilityName ptcPlusCapabilityName",
|
|
11774
|
+
"aria-current": selected?.id === entry.id ? "true" : void 0,
|
|
11775
|
+
onClick: (event) => {
|
|
11776
|
+
event.stopPropagation();
|
|
11777
|
+
openEditor(entry);
|
|
11778
|
+
}
|
|
11779
|
+
}, entry.name ?? entry.id),
|
|
11780
|
+
entry.name && entry.name !== entry.id ? h("code", null, entry.id) : null
|
|
11781
|
+
)
|
|
10448
11782
|
),
|
|
10449
11783
|
h("span", { role: "cell", className: "ptcPlusCapabilityBadge", "data-kind": type(entry) }, t2(`capabilities.type.${type(entry)}`)),
|
|
10450
11784
|
h("span", { role: "cell", className: "ptcPlusCapabilitySource" }, displayedSource(entry)),
|
|
@@ -10460,7 +11794,7 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10460
11794
|
event.stopPropagation();
|
|
10461
11795
|
openEditor(entry, "availability");
|
|
10462
11796
|
}
|
|
10463
|
-
},
|
|
11797
|
+
}, dimensionCell(entry, "availability", effectiveAvailability(entry)))
|
|
10464
11798
|
),
|
|
10465
11799
|
h(
|
|
10466
11800
|
"div",
|
|
@@ -10474,7 +11808,7 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10474
11808
|
event.stopPropagation();
|
|
10475
11809
|
openEditor(entry, "disclosure");
|
|
10476
11810
|
}
|
|
10477
|
-
},
|
|
11811
|
+
}, dimensionCell(entry, "disclosure", effectiveContext(entry)))
|
|
10478
11812
|
),
|
|
10479
11813
|
h(
|
|
10480
11814
|
"span",
|
|
@@ -10506,7 +11840,7 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10506
11840
|
h("h2", null, t2("capabilities.quick.modalTitle")),
|
|
10507
11841
|
h("p", null, t2("capabilities.quick.sessionIdentity", { session: sessionId }))
|
|
10508
11842
|
),
|
|
10509
|
-
h("button", { type: "button", className: "ptcPlusDialogClose", "aria-label": t2("settings.close"), onClick: close }, "\xD7")
|
|
11843
|
+
h("button", { type: "button", className: "ptcPlusDialogClose", "aria-label": t2("settings.close"), disabled: pending, onClick: close }, "\xD7")
|
|
10510
11844
|
),
|
|
10511
11845
|
h(
|
|
10512
11846
|
"div",
|
|
@@ -10554,10 +11888,25 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10554
11888
|
]
|
|
10555
11889
|
)
|
|
10556
11890
|
),
|
|
11891
|
+
// A blocked workbench states why writes are off and how to restore them; the banner styling
|
|
11892
|
+
// keeps that condition from reading as an incidental list message.
|
|
10557
11893
|
writesBlocked ? h(
|
|
10558
11894
|
"p",
|
|
10559
|
-
{ className: "ptcPlusCapabilityNotice", role: "status" },
|
|
10560
|
-
|
|
11895
|
+
{ className: "ptcPlusCapabilityNotice ptcPlusCapabilityBlocked", role: "status" },
|
|
11896
|
+
h(
|
|
11897
|
+
"svg",
|
|
11898
|
+
{
|
|
11899
|
+
className: "ptcPlusCapabilityBlockedIcon",
|
|
11900
|
+
viewBox: "0 0 16 16",
|
|
11901
|
+
width: 14,
|
|
11902
|
+
height: 14,
|
|
11903
|
+
"aria-hidden": true,
|
|
11904
|
+
fill: "none"
|
|
11905
|
+
},
|
|
11906
|
+
h("path", { d: "M8 2.3 14.7 13.5H1.3L8 2.3Z", stroke: "currentColor", strokeWidth: 1.3, strokeLinejoin: "round" }),
|
|
11907
|
+
h("path", { d: "M8 6.4v3M8 11.2v.7", stroke: "currentColor", strokeWidth: 1.3, strokeLinecap: "round" })
|
|
11908
|
+
),
|
|
11909
|
+
t2(management === "paused" ? "capabilities.quick.sessionPaused" : management === "off" ? "capabilities.quick.sessionManagementOff" : savedSettings?.contextEnabled === false ? "capabilities.quick.savedPaused" : "capabilities.quick.savedManagementOff")
|
|
10561
11910
|
) : null,
|
|
10562
11911
|
h(
|
|
10563
11912
|
"div",
|
|
@@ -10573,8 +11922,20 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10573
11922
|
{
|
|
10574
11923
|
key: column.key,
|
|
10575
11924
|
role: "columnheader",
|
|
10576
|
-
"aria-sort": capabilitySortDirection(sort2, column.key)
|
|
11925
|
+
"aria-sort": capabilitySortDirection(sort2, column.key),
|
|
11926
|
+
...column.key === "name" ? { "aria-label": t2("capabilities.member"), className: "ptcPlusCapabilityPickHead" } : {}
|
|
10577
11927
|
},
|
|
11928
|
+
...column.key === "name" ? [h("input", {
|
|
11929
|
+
type: "checkbox",
|
|
11930
|
+
className: "ptcPlusPick",
|
|
11931
|
+
checked: allMatchesPicked,
|
|
11932
|
+
ref: (node) => {
|
|
11933
|
+
if (node) node.indeterminate = someMatchesPicked && !allMatchesPicked;
|
|
11934
|
+
},
|
|
11935
|
+
disabled: writesBlocked || matches.length === 0,
|
|
11936
|
+
"aria-label": t2("capabilities.selectAllVisible"),
|
|
11937
|
+
onChange: toggleAllMatches
|
|
11938
|
+
})] : [],
|
|
10578
11939
|
h(
|
|
10579
11940
|
"button",
|
|
10580
11941
|
{
|
|
@@ -10654,29 +12015,47 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10654
12015
|
h("ul", null, ...catalog.filter((entry) => entry.id !== selected.id && entry.source?.kind === "mcp" && entry.source.server === selected.source?.server).map((entry) => h("li", { key: entry.id }, entry.name ?? entry.id)))
|
|
10655
12016
|
) : null,
|
|
10656
12017
|
selected.savedRule ? h(React32.Fragment, null, ...["availability", "disclosure"].map((dimension) => h(
|
|
10657
|
-
|
|
10658
|
-
{
|
|
10659
|
-
h(
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
12018
|
+
React32.Fragment,
|
|
12019
|
+
{ key: dimension },
|
|
12020
|
+
h(
|
|
12021
|
+
"div",
|
|
12022
|
+
{ className: "ptcPlusCapabilityFilter", "data-capability-dimension": dimension },
|
|
12023
|
+
h("span", null, t2(`capabilities.policy.${dimension}`)),
|
|
12024
|
+
h(Select2, {
|
|
12025
|
+
label: t2(`capabilities.policy.${dimension}`),
|
|
12026
|
+
disabled: !enabled || !available || pending || writesBlocked,
|
|
12027
|
+
value: dimensionCurrent(selected, dimension),
|
|
12028
|
+
onChange: (next) => chooseDimension(selected.id, dimension, next),
|
|
12029
|
+
options: dimensionOptions(selected, dimension)
|
|
12030
|
+
})
|
|
12031
|
+
),
|
|
12032
|
+
h(
|
|
12033
|
+
"p",
|
|
12034
|
+
{ className: "ptcPlusDetail ptcPlusCapabilityImpact", "data-impact-dimension": dimension },
|
|
12035
|
+
impactLine(dimensionImpact(selected, dimension))
|
|
12036
|
+
)
|
|
10667
12037
|
))) : h(
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
h(
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
12038
|
+
React32.Fragment,
|
|
12039
|
+
null,
|
|
12040
|
+
h(
|
|
12041
|
+
"div",
|
|
12042
|
+
{ className: "ptcPlusCapabilityFilter" },
|
|
12043
|
+
h("span", null, t2("capabilities.quick.choice")),
|
|
12044
|
+
h(Select2, {
|
|
12045
|
+
label: t2("capabilities.quick.choice"),
|
|
12046
|
+
value: choiceCurrent(selected),
|
|
12047
|
+
disabled: !enabled || !available || pending || writesBlocked,
|
|
12048
|
+
options: choiceOptions,
|
|
12049
|
+
onChange: (next) => choose(selected.id, next)
|
|
12050
|
+
})
|
|
12051
|
+
),
|
|
12052
|
+
h(
|
|
12053
|
+
"p",
|
|
12054
|
+
{ className: "ptcPlusDetail ptcPlusCapabilityImpact", "data-impact-dimension": "selection" },
|
|
12055
|
+
impactLine(choiceImpact(selected))
|
|
12056
|
+
)
|
|
10678
12057
|
),
|
|
10679
|
-
choices[selected.id] === "inherit" ? h(
|
|
12058
|
+
(typeof choices[selected.id] === "string" ? choices[selected.id] === "inherit" : Object.values(choices[selected.id] ?? {}).includes("inherit")) ? h(
|
|
10680
12059
|
"p",
|
|
10681
12060
|
{ className: "ptcPlusDetail" },
|
|
10682
12061
|
t2("capabilities.quick.inheritSessionOnly")
|
|
@@ -10684,6 +12063,69 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10684
12063
|
) : h("p", null, t2("capabilities.noMatches"))
|
|
10685
12064
|
)
|
|
10686
12065
|
),
|
|
12066
|
+
batchOpen ? h(
|
|
12067
|
+
Modal,
|
|
12068
|
+
{
|
|
12069
|
+
open: true,
|
|
12070
|
+
onClose: () => setBatchOpen(false),
|
|
12071
|
+
title: t2("capabilities.batchSettings"),
|
|
12072
|
+
closeLabel: t2("capabilities.batch.cancel"),
|
|
12073
|
+
headless: true,
|
|
12074
|
+
className: "ptcPlusCapabilityBatchModal"
|
|
12075
|
+
},
|
|
12076
|
+
h(
|
|
12077
|
+
"div",
|
|
12078
|
+
{ className: "ptcPlusCapabilityBatchHead" },
|
|
12079
|
+
h("h2", null, t2("capabilities.batchSettings")),
|
|
12080
|
+
h("button", {
|
|
12081
|
+
type: "button",
|
|
12082
|
+
className: "ptcPlusDialogClose",
|
|
12083
|
+
"aria-label": t2("capabilities.batch.cancel"),
|
|
12084
|
+
onClick: () => setBatchOpen(false)
|
|
12085
|
+
}, "\xD7")
|
|
12086
|
+
),
|
|
12087
|
+
h(
|
|
12088
|
+
"div",
|
|
12089
|
+
{ className: "ptcPlusCapabilityBatchBody" },
|
|
12090
|
+
h("p", { className: "ptcPlusDetail", role: "status" }, t2("capabilities.batch.selected", { count: pickedRows.length })),
|
|
12091
|
+
h(
|
|
12092
|
+
"ul",
|
|
12093
|
+
{ className: "ptcPlusCapabilityBatchTargets", "aria-label": t2("capabilities.batch.targetList") },
|
|
12094
|
+
...pickedRows.map((entry) => h("li", { key: entry.id }, h("span", null, entry.name ?? entry.id), h("code", null, entry.id)))
|
|
12095
|
+
),
|
|
12096
|
+
h("div", { className: "ptcPlusCapabilityBatchFields" }, ...["availability", "disclosure"].map((dimension) => h(
|
|
12097
|
+
"div",
|
|
12098
|
+
{ key: dimension, className: "ptcPlusCapabilityFilter" },
|
|
12099
|
+
h("span", null, t2(`capabilities.policy.${dimension}`)),
|
|
12100
|
+
h(Select2, {
|
|
12101
|
+
value: batchChoices[dimension],
|
|
12102
|
+
label: t2(`capabilities.batch.${dimension}`),
|
|
12103
|
+
onChange: (choice) => setBatchChoices((current) => ({ ...current, [dimension]: choice })),
|
|
12104
|
+
options: ["keep", "inherit", ...dimension === "availability" ? ["enabled", "closed"] : CAPABILITY_DISCLOSURES].map((choice) => ({ value: choice, label: choice === "keep" ? t2("capabilities.batch.keep") : choice === "inherit" ? t2("capabilities.batch.sessionInherit") : choice === "enabled" ? t2("capabilities.action.enable") : choice === "closed" ? t2("capabilities.action.close") : t2(`capabilities.${choice}`) }))
|
|
12105
|
+
})
|
|
12106
|
+
))),
|
|
12107
|
+
h("p", { className: "ptcPlusDetail" }, t2("capabilities.batch.sessionStage"))
|
|
12108
|
+
),
|
|
12109
|
+
h(
|
|
12110
|
+
"div",
|
|
12111
|
+
{ className: "ptcPlusCapabilityBatchFooter" },
|
|
12112
|
+
h("button", { type: "button", className: "ptcPlusButton", onClick: () => setBatchOpen(false) }, t2("capabilities.batch.cancel")),
|
|
12113
|
+
h(
|
|
12114
|
+
"button",
|
|
12115
|
+
{
|
|
12116
|
+
type: "button",
|
|
12117
|
+
className: "ptcPlusButton",
|
|
12118
|
+
"data-kind": "primary",
|
|
12119
|
+
disabled: pickedRows.length === 0 || !["availability", "disclosure"].some((dimension) => batchChoices[dimension] !== "keep"),
|
|
12120
|
+
onClick: () => {
|
|
12121
|
+
stageBatch(pickedRows.map((entry) => entry.id), batchChoices);
|
|
12122
|
+
setBatchOpen(false);
|
|
12123
|
+
}
|
|
12124
|
+
},
|
|
12125
|
+
t2("capabilities.batch.stage", { count: pickedRows.length })
|
|
12126
|
+
)
|
|
12127
|
+
)
|
|
12128
|
+
) : null,
|
|
10687
12129
|
h(
|
|
10688
12130
|
"div",
|
|
10689
12131
|
{ className: "ptcPlusSessionCapabilityFooter" },
|
|
@@ -10693,11 +12135,14 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10693
12135
|
{ type: "button", className: "ptcPlusButton", disabled: pending || staged.length === 0, onClick: discard },
|
|
10694
12136
|
t2("capabilities.quick.discard")
|
|
10695
12137
|
),
|
|
12138
|
+
// Session-scoped temporary application stays the footer's primary action; saving global
|
|
12139
|
+
// defaults is an explicit secondary choice, so no default-looking control changes global state.
|
|
10696
12140
|
h(
|
|
10697
12141
|
"button",
|
|
10698
12142
|
{
|
|
10699
12143
|
type: "button",
|
|
10700
12144
|
className: "ptcPlusButton",
|
|
12145
|
+
"data-kind": "primary",
|
|
10701
12146
|
title: t2("capabilities.quick.sessionHint"),
|
|
10702
12147
|
disabled: pending || !enabled || !available || writesBlocked || staged.length === 0,
|
|
10703
12148
|
onClick: () => void apply("session")
|
|
@@ -10709,12 +12154,35 @@ function createSessionCapabilityControlsView(React32, { commands, Modal, Select:
|
|
|
10709
12154
|
{
|
|
10710
12155
|
type: "button",
|
|
10711
12156
|
className: "ptcPlusButton",
|
|
10712
|
-
"data-kind": "primary",
|
|
10713
12157
|
title: t2(hasInheritanceReset ? "capabilities.quick.inheritSessionOnly" : "capabilities.quick.globalHint"),
|
|
10714
12158
|
disabled: pending || !enabled || !available || writesBlocked || staged.length === 0 || hasInheritanceReset,
|
|
10715
12159
|
onClick: () => void apply("global")
|
|
10716
12160
|
},
|
|
10717
12161
|
t2("capabilities.quick.applyGlobal")
|
|
12162
|
+
),
|
|
12163
|
+
h(
|
|
12164
|
+
"button",
|
|
12165
|
+
{
|
|
12166
|
+
type: "button",
|
|
12167
|
+
className: "ptcPlusButton",
|
|
12168
|
+
"aria-haspopup": "dialog",
|
|
12169
|
+
"aria-label": t2("capabilities.batchSettings"),
|
|
12170
|
+
disabled: pending || writesBlocked || picked.length === 0,
|
|
12171
|
+
onClick: () => {
|
|
12172
|
+
setBatchChoices({ availability: "keep", disclosure: "keep" });
|
|
12173
|
+
setBatchOpen(true);
|
|
12174
|
+
}
|
|
12175
|
+
},
|
|
12176
|
+
t2("capabilities.batchSettings"),
|
|
12177
|
+
picked.length ? h(
|
|
12178
|
+
"span",
|
|
12179
|
+
{
|
|
12180
|
+
className: "ptcPlusCapabilityBatchCount",
|
|
12181
|
+
"aria-hidden": true,
|
|
12182
|
+
title: t2("capabilities.selectionCount", { count: picked.length })
|
|
12183
|
+
},
|
|
12184
|
+
String(picked.length)
|
|
12185
|
+
) : null
|
|
10718
12186
|
)
|
|
10719
12187
|
)
|
|
10720
12188
|
);
|
|
@@ -11551,7 +13019,9 @@ function createReplView(React32, deps) {
|
|
|
11551
13019
|
memory,
|
|
11552
13020
|
(value) => setObserved({ sessionId, source: memory, value })
|
|
11553
13021
|
) : void 0, [active, observeRepl, sessionId, memory, elementRef]);
|
|
11554
|
-
|
|
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;
|
|
11555
13025
|
}
|
|
11556
13026
|
function ReplBindingInspector({ entry, preview, t: t2 }) {
|
|
11557
13027
|
const readable = preview?.status === "readable";
|
|
@@ -12125,7 +13595,7 @@ var {
|
|
|
12125
13595
|
appendArray: appendArray2,
|
|
12126
13596
|
popArray
|
|
12127
13597
|
} = runtimeIntrinsics;
|
|
12128
|
-
function
|
|
13598
|
+
function isRecord4(value) {
|
|
12129
13599
|
return value !== null && typeof value === "object" && !isArray2(value);
|
|
12130
13600
|
}
|
|
12131
13601
|
function assertOwnFields(value, allowed, label) {
|
|
@@ -12142,7 +13612,7 @@ function assertOwnFields(value, allowed, label) {
|
|
|
12142
13612
|
var FIELDS = /* @__PURE__ */ new Set(["includeDeclaration", "instructions", "enabled", "declaration"]);
|
|
12143
13613
|
function normalizeBindingModelContext(value) {
|
|
12144
13614
|
if (value === void 0) return void 0;
|
|
12145
|
-
if (!
|
|
13615
|
+
if (!isRecord4(value)) throw new TypeError("binding modelContext must be an object");
|
|
12146
13616
|
assertOwnFields(value, FIELDS, "binding modelContext");
|
|
12147
13617
|
const { includeDeclaration = true, instructions = "", enabled = true, declaration = "" } = value;
|
|
12148
13618
|
if (typeof includeDeclaration !== "boolean") throw new TypeError("binding modelContext.includeDeclaration must be a boolean");
|
|
@@ -12175,7 +13645,7 @@ var MAX_COMMAND_ID_LENGTH = 256;
|
|
|
12175
13645
|
var VIEW_FIELDS = /* @__PURE__ */ new Set(["phase", "capability", "commandId"]);
|
|
12176
13646
|
var PHASES2 = /* @__PURE__ */ new Set(["idle", "pending", "ready", "failed"]);
|
|
12177
13647
|
function normalizeCandidate(value) {
|
|
12178
|
-
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) {
|
|
12179
13649
|
throw new Error("invalid dsh-ptc-plus accepted binding candidate");
|
|
12180
13650
|
}
|
|
12181
13651
|
const modelContext = normalizeBindingModelContext(value.entry.modelContext);
|
|
@@ -12224,7 +13694,7 @@ function historyFields(value) {
|
|
|
12224
13694
|
return value.history === void 0 ? {} : { history: normalizeHistory(value.history) };
|
|
12225
13695
|
}
|
|
12226
13696
|
function exactFields(value, fields) {
|
|
12227
|
-
if (!
|
|
13697
|
+
if (!isRecord4(value)) return false;
|
|
12228
13698
|
const keys2 = Reflect.ownKeys(value);
|
|
12229
13699
|
return keys2.length === fields.size && keys2.every((key) => typeof key === "string" && fields.has(key) && Object.prototype.propertyIsEnumerable.call(value, key));
|
|
12230
13700
|
}
|
|
@@ -39071,7 +40541,7 @@ var autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((view, from2, to,
|
|
|
39071
40541
|
// src/client-styles.js
|
|
39072
40542
|
var CLIENT_STYLE_ID = "ptc-plus-client-style";
|
|
39073
40543
|
var CLIENT_CSS = `
|
|
39074
|
-
.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}}
|
|
39075
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)}
|
|
39076
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}
|
|
39077
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}
|
|
@@ -39102,7 +40572,69 @@ var CLIENT_CSS = `
|
|
|
39102
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)}
|
|
39103
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}
|
|
39104
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)}
|
|
39105
|
-
.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)}}
|
|
39106
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}
|
|
39107
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}
|
|
39108
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%}
|
|
@@ -39276,6 +40808,10 @@ var REPL_CONSOLE_CSS = `
|
|
|
39276
40808
|
@media(max-width:560px){.ptcPlusConsole{padding:14px 12px}.ptcPlusBindingsModal.ptcPlusBindingsModal{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.ptcPlusBindingsDialog{padding:16px;max-height:calc(100dvh - 16px)}.ptcPlusObservationFilters>.ptcPlusSelectTrigger{width:105px}.ptcPlusObservationTable th,.ptcPlusObservationTable td{padding:0 6px}.ptcPlusObservationValue{gap:3px}.ptcPlusObservationState{font-size:10px}.ptcPlusEditorHead{align-items:flex-start}.ptcPlusEditorHead>.ptcPlusBindingLifecycle{margin-left:auto}.ptcPlusSourceBody .cm-editor{height:300px}}
|
|
39277
40809
|
.ptcPlusReplIdentity{grid-column:1}.ptcPlusReplReuse{flex:none;padding:0 5px;border-radius:999px;background:var(--dsw-alias-bg-layer-2,rgba(38,49,72,.06));color:var(--dsw-alias-label-tertiary,#74777d);font:500 10px/15px system-ui,sans-serif;white-space:nowrap}
|
|
39278
40810
|
.ptcPlusObservationReuseTotal{font-size:13px;color:var(--dsw-alias-label-tertiary)}.ptcPlusObservationReuse{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
40811
|
+
.ptcPlusCapabilityIdentity{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:3px 8px;min-width:0}.ptcPlusCapabilityIdentityText{display:flex;flex-direction:column;gap:3px;min-width:0}.ptcPlusCapabilityPickHead{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px}.ptcPlusCapabilityPickHead .ptcPlusCapabilitySort{min-width:0}.ptcPlusPick{appearance:none;position:relative;flex:none;box-sizing:border-box;width:16px;height:16px;margin:0;border:1px solid var(--dsw-alias-border-l4);border-radius:4px;background:var(--dsw-alias-bg-layer-3);cursor:pointer}.ptcPlusPick:checked,.ptcPlusPick:indeterminate{border-color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-brand-primary)}.ptcPlusPick:checked::after{position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid var(--dsw-alias-label-primary-foreground);border-width:0 2px 2px 0;content:'';transform:rotate(45deg)}.ptcPlusPick:indeterminate::after{position:absolute;left:3px;top:6px;width:8px;height:2px;border-radius:1px;background:var(--dsw-alias-label-primary-foreground);content:''}.ptcPlusPick:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,#4d6bfe);outline-offset:2px}.ptcPlusPick:disabled{cursor:not-allowed;opacity:.4}.ptcPlusCapabilityBatchCount{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 5px;border-radius:999px;background:var(--dsw-alias-state-business-primary,#4d6bfe);color:#fff;font-size:10px;line-height:16px}.ptcPlusCapabilityBlocked{display:flex;gap:8px;align-items:flex-start;margin:10px 24px 0;border:1px solid color-mix(in srgb,var(--dsw-alias-state-warn-primary,#a15c00) 30%,transparent);background:color-mix(in srgb,var(--dsw-alias-state-warn-primary,#a15c00) 8%,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-primary);font-weight:500}.ptcPlusCapabilityBlockedIcon{flex:none;margin-top:2px;color:var(--dsw-alias-state-warn-primary,#a15c00)}.ptcPlusSessionCapabilityDetail .ptcPlusCapabilityImpact{margin:6px 0 14px;font-size:12px;line-height:18px}
|
|
40812
|
+
@media(max-width:650px){.ptcPlusCapabilityBlocked{margin-inline:14px}}@media(max-width:650px) and (max-height:480px){.ptcPlusCapabilityBlocked{margin:4px 6px 0;font-size:11px}}
|
|
40813
|
+
@media(max-width:650px){.ptcPlusSessionCapabilityFooter button{font-size:11px;line-height:14px}}
|
|
40814
|
+
@media(max-width:650px) and (max-height:480px){.ptcPlusSessionCapabilityFooter{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:3px 6px}.ptcPlusSessionCapabilityFooter [role=status]{line-height:11px}.ptcPlusSessionCapabilityFooter button{font-size:10px;line-height:12px;padding:1px 10px}}
|
|
39279
40815
|
`;
|
|
39280
40816
|
var CLIENT_PLUGIN_ID = true ? "dsh-ptc-plus" : "dsh-ptc-plus";
|
|
39281
40817
|
var CLIENT_STYLE_TAG = `${CLIENT_PLUGIN_ID}/client.css`;
|
|
@@ -39569,7 +41105,7 @@ function isReuseCount(value) {
|
|
|
39569
41105
|
return Number.isSafeInteger(value) && value >= 0;
|
|
39570
41106
|
}
|
|
39571
41107
|
function exactFields2(value, fields) {
|
|
39572
|
-
if (!
|
|
41108
|
+
if (!isRecord4(value)) return false;
|
|
39573
41109
|
const keys2 = Reflect.ownKeys(value);
|
|
39574
41110
|
return keys2.length === fields.size && keys2.every((key) => typeof key === "string" && fields.has(key) && Object.prototype.propertyIsEnumerable.call(value, key));
|
|
39575
41111
|
}
|
|
@@ -39668,6 +41204,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
39668
41204
|
"capabilities.combination.statistics": "\u4F7F\u7528\u7EDF\u8BA1",
|
|
39669
41205
|
"capabilities.combination.recovery": "\u63D0\u793A\u6062\u590D",
|
|
39670
41206
|
"capabilities.combination.preview": "\u8F93\u51FA\u8282\u9009",
|
|
41207
|
+
"capabilities.combination.promptText": "\u63D0\u793A\u6587\u672C",
|
|
39671
41208
|
"capabilities.combination.state.selected": "\u5DF2\u9009\u7528",
|
|
39672
41209
|
"capabilities.combination.state.unselected": "\u672A\u9009\u7528",
|
|
39673
41210
|
"capabilities.combination.state.paused": "\u5DF2\u6682\u505C",
|
|
@@ -39723,7 +41260,6 @@ var CHROME_COPY = Object.freeze({
|
|
|
39723
41260
|
"capabilities.inheritedRules": "\u7EE7\u627F\u89C4\u5219",
|
|
39724
41261
|
"capabilities.inheritedRulesHelp": "\u8BBE\u7F6E\u9ED8\u8BA4\u3001\u7C7B\u522B\u548C MCP \u6765\u6E90\u7684\u6301\u7EED\u89C4\u5219\uFF0C\u66F4\u6539\u5373\u4FDD\u5B58\u3002\u89C4\u5219\u72EC\u7ACB\u4E8E\u5F53\u524D\u7B5B\u9009\uFF0C\u5355\u9879\u8BBE\u7F6E\u6309\u7EF4\u5EA6\u8986\u76D6\uFF1BMCP \u6765\u6E90\u505C\u7528\u4F18\u5148\u3002",
|
|
39725
41262
|
"capabilities.batch.targets": "\u4E00\u6B21\u6027\u4FEE\u6539 {count} \u9879\u771F\u5B9E\u80FD\u529B",
|
|
39726
|
-
"capabilities.batch.scope": "\u76EE\u6807\u8303\u56F4\uFF1A{scope}",
|
|
39727
41263
|
"capabilities.batch.excluded": "\u5DF2\u6392\u9664 {count} \u9879\u5F53\u524D\u4E0D\u53EF\u7528\u6216\u672A\u786E\u8BA4\u7684\u6761\u76EE\u3002",
|
|
39728
41264
|
"capabilities.batch.targetList": "\u672C\u6B21\u6279\u91CF\u76EE\u6807",
|
|
39729
41265
|
"capabilities.batch.empty": "\u5F53\u524D\u7B5B\u9009\u4E2D\u6CA1\u6709\u53EF\u6279\u91CF\u4FEE\u6539\u7684\u771F\u5B9E\u80FD\u529B\u3002",
|
|
@@ -39735,8 +41271,14 @@ var CHROME_COPY = Object.freeze({
|
|
|
39735
41271
|
"capabilities.batch.changedTargets": "{count} \u9879\u76EE\u6807\u5DF2\u4E0D\u5728\u6700\u65B0\u5B8C\u6574\u76EE\u5F55\u4E2D\u6216\u53EF\u7528\u6027\u672A\u786E\u8BA4\uFF1B\u8BF7\u53D6\u6D88\u5E76\u91CD\u65B0\u68C0\u67E5\u76EE\u6807\u3002",
|
|
39736
41272
|
"capabilities.batch.failed": "\u4FDD\u5B58\u672A\u6210\u529F\uFF0C\u76EE\u6807\u548C\u9009\u62E9\u5DF2\u4FDD\u7559\uFF0C\u53EF\u518D\u6B21\u786E\u8BA4\u91CD\u8BD5\u3002",
|
|
39737
41273
|
"capabilities.batch.confirm": "\u786E\u8BA4\u4FEE\u6539 {count} \u9879",
|
|
39738
|
-
"capabilities.batch.search": "\u641C\u7D22\u201C{query}\u201D",
|
|
39739
41274
|
"capabilities.batch.all": "\u5F53\u524D\u5B8C\u6574\u80FD\u529B\u76EE\u5F55",
|
|
41275
|
+
"capabilities.batch.selected": "\u5DF2\u9009\u62E9 {count} \u9879\u80FD\u529B",
|
|
41276
|
+
"capabilities.batch.stage": "\u6682\u5B58\u4FEE\u6539\uFF08{count} \u9879\uFF09",
|
|
41277
|
+
"capabilities.batch.sessionStage": "\u786E\u8BA4\u540E\u5199\u5165\u5F85\u5E94\u7528\u66F4\u6539\uFF1B\u7531\u5E95\u90E8\u6309\u94AE\u51B3\u5B9A\u5E94\u7528\u5230\u4F1A\u8BDD\u6216\u4FDD\u5B58\u4E3A\u5168\u5C40\u9ED8\u8BA4\u3002",
|
|
41278
|
+
"capabilities.batch.sessionInherit": "\u4E0D\u6539\u52A8\uFF08\u6E05\u9664\u672C\u4F1A\u8BDD\u4FEE\u6539\uFF09",
|
|
41279
|
+
"capabilities.selectForBatch": "\u9009\u62E9 {name}",
|
|
41280
|
+
"capabilities.selectAllVisible": "\u9009\u62E9\u5F53\u524D\u7B5B\u9009\u7ED3\u679C",
|
|
41281
|
+
"capabilities.selectionCount": "\u5DF2\u9009 {count} \u9879",
|
|
39740
41282
|
"capabilities.typesColumn": "\u7C7B\u578B",
|
|
39741
41283
|
"capabilities.sourceColumn": "\u6765\u6E90",
|
|
39742
41284
|
"capabilities.enabledColumn": "\u662F\u5426\u542F\u7528",
|
|
@@ -39757,7 +41299,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
39757
41299
|
"capabilities.eligibleFamilies": "\u53EF\u7528\u5BB6\u65CF\u6570",
|
|
39758
41300
|
"capabilities.coverageColumn": "\u8986\u76D6\u7387",
|
|
39759
41301
|
"capabilities.coverageFor": "{name} \u7684\u8986\u76D6\u7387",
|
|
39760
|
-
"capabilities.familyHint": "\u4F1A\u8BDD\u5BB6\u65CF\uFF1A\u4E00\u4E2A\u4E3B\u4F1A\u8BDD\u53CA\u5176\u5B50\u4EE3\u7406\u5408\u8BA1\u4E00\u6B21\u3002\u5173\u95ED\u91C7\u96C6\u4ECD\u53EF\u67E5\u770B\u5DF2\u6709\u8BB0\u5F55\u3002",
|
|
41302
|
+
"capabilities.familyHint": "\u4F1A\u8BDD\u5BB6\u65CF\uFF1A\u4E00\u4E2A\u4E3B\u4F1A\u8BDD\u53CA\u5176\u5B50\u4EE3\u7406\u5408\u8BA1\u4E00\u6B21\uFF0C\u53EA\u6709\u5B8C\u6210\u7ED3\u7B97\u7684\u5BB6\u65CF\u8BA1\u5165\u7EDF\u8BA1\u3002\u5173\u95ED\u91C7\u96C6\u4ECD\u53EF\u67E5\u770B\u5DF2\u6709\u8BB0\u5F55\u3002",
|
|
39761
41303
|
"capabilities.contextNavigation": "\u4E0A\u4E0B\u6587\u529F\u80FD",
|
|
39762
41304
|
"capabilities.context.description": "\u521D\u59CB\u63D0\u793A",
|
|
39763
41305
|
"capabilities.context.recovery": "\u63D0\u793A\u6062\u590D",
|
|
@@ -39805,7 +41347,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
39805
41347
|
"capabilities.observedUsage": "\u5B9E\u9645\u4F7F\u7528\u7EDF\u8BA1",
|
|
39806
41348
|
"capabilities.budgetPreview": "\u5F53\u524D\u80FD\u529B\u5206\u914D\u9884\u89C8",
|
|
39807
41349
|
"capabilities.observationUnavailable": "\u65E0\u6CD5\u8BFB\u53D6\u80FD\u529B\u9884\u89C8\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002",
|
|
39808
|
-
"capabilities.selectObservation": "\u9009\u62E9\u4E00\u4E2A\u6D3B\u8DC3 PTC \u4F1A\u8BDD\
|
|
41350
|
+
"capabilities.selectObservation": "\u9009\u62E9\u4E00\u4E2A\u6D3B\u8DC3 PTC \u4F1A\u8BDD\u4F5C\u4E3A\u89C2\u5BDF\u951A\u70B9\uFF1B\u7EDF\u8BA1\u548C\u9884\u7B97\u9884\u89C8\u90FD\u6309\u5B83\u7684\u80FD\u529B\u6E05\u5355\u5C55\u793A\uFF0C\u7EDF\u8BA1\u8303\u56F4\u53EF\u5207\u6362\u5F53\u524D\u5DE5\u4F5C\u533A\u6216\u5168\u90E8\u5DE5\u4F5C\u533A\u3002",
|
|
39809
41351
|
"capabilities.quick.title": "\u4F1A\u8BDD\u80FD\u529B\u63A7\u5236",
|
|
39810
41352
|
"capabilities.quick.modalTitle": "\u7BA1\u7406\u4F1A\u8BDD\u80FD\u529B",
|
|
39811
41353
|
"capabilities.quick.sessionIdentity": "\u5F53\u524D\u4F1A\u8BDD\uFF1A{session}",
|
|
@@ -39824,7 +41366,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
39824
41366
|
"capabilities.quick.applySession": "\u5E94\u7528\u5230\u4F1A\u8BDD",
|
|
39825
41367
|
"capabilities.quick.applyGlobal": "\u5E94\u7528\u5230\u5168\u5C40",
|
|
39826
41368
|
"capabilities.quick.noOverride": "\u65E0\u8986\u76D6",
|
|
39827
|
-
"capabilities.quick.inheritSessionOnly": "\u64A4\u9500\u4E34\u65F6\
|
|
41369
|
+
"capabilities.quick.inheritSessionOnly": "\u64A4\u9500\u4E34\u65F6\u4FEE\u6539\u53EA\u9002\u7528\u4E8E\u672C\u4F1A\u8BDD\u3002\u8BF7\u7528\u201C\u5E94\u7528\u5230\u4F1A\u8BDD\u201D\u63D0\u4EA4\u3002",
|
|
39828
41370
|
"capabilities.quick.discard": "\u653E\u5F03\u66F4\u6539",
|
|
39829
41371
|
"capabilities.quick.applying": "\u6B63\u5728\u5E94\u7528\u2026",
|
|
39830
41372
|
"capabilities.quick.applied": "{count} \u9879\u4F1A\u8BDD\u80FD\u529B\u5DF2\u66F4\u65B0\u3002",
|
|
@@ -39840,8 +41382,11 @@ var CHROME_COPY = Object.freeze({
|
|
|
39840
41382
|
"capabilities.quick.pendingServerClose": "MCP \u670D\u52A1 {server} \u6709\u5F85\u751F\u6548\u7684\u5173\u95ED\u9009\u62E9\uFF1B\u5B50\u9879\u9009\u62E9\u4ECD\u4FDD\u7559\u3002",
|
|
39841
41383
|
"capabilities.quick.enabled": "\u5DF2\u542F\u7528",
|
|
39842
41384
|
"capabilities.quick.pending": "\u5F85\u751F\u6548",
|
|
41385
|
+
"capabilities.quick.temporaryState": "{state}\uFF08\u4E34\u65F6\uFF09",
|
|
39843
41386
|
"capabilities.quick.sessionPaused": "\u672C\u4F1A\u8BDD\u7684\u80FD\u529B\u4E0E\u4E0A\u4E0B\u6587\u5DF2\u6682\u505C\uFF1B\u6E05\u5355\u663E\u793A\u5BBF\u4E3B\u9ED8\u8BA4\uFF0C\u9700\u5728\u8BBE\u7F6E\u4E2D\u91CD\u65B0\u5F00\u542F\u5E76\u5237\u65B0\u540E\u624D\u4F1A\u5E94\u7528\u65B0\u7684\u66F4\u6539\u3002",
|
|
39844
|
-
"capabilities.quick.sessionManagementOff": "\u672C\u4F1A\u8BDD\u672A\u542F\u7528\u80FD\u529B\u7BA1\u7406\uFF1B\u80FD\u529B\u6CBF\u7528\u5BBF\u4E3B\u914D\u7F6E\u3002",
|
|
41387
|
+
"capabilities.quick.sessionManagementOff": "\u672C\u4F1A\u8BDD\u672A\u542F\u7528\u80FD\u529B\u7BA1\u7406\uFF1B\u80FD\u529B\u6CBF\u7528\u5BBF\u4E3B\u914D\u7F6E\u3002\u5728\u8BBE\u7F6E\u7684\u201C\u80FD\u529B\u4E0E\u4E0A\u4E0B\u6587\u201D\u4E2D\u5F00\u542F\u80FD\u529B\u7BA1\u7406\u5E76\u5237\u65B0\u540E\u53EF\u4FEE\u6539\u672C\u4F1A\u8BDD\u9009\u62E9\u3002",
|
|
41388
|
+
"capabilities.quick.savedPaused": "\u80FD\u529B\u4E0E\u4E0A\u4E0B\u6587\u5DF2\u5728\u8BBE\u7F6E\u4E2D\u5173\u95ED\uFF1B\u91CD\u65B0\u5F00\u542F\u5E76\u5237\u65B0\u540E\u53EF\u4FEE\u6539\u672C\u4F1A\u8BDD\u9009\u62E9\u3002",
|
|
41389
|
+
"capabilities.quick.savedManagementOff": "\u80FD\u529B\u7BA1\u7406\u5DF2\u5728\u8BBE\u7F6E\u4E2D\u5173\u95ED\uFF1B\u91CD\u65B0\u5F00\u542F\u5E76\u5237\u65B0\u540E\u53EF\u4FEE\u6539\u672C\u4F1A\u8BDD\u9009\u62E9\u3002",
|
|
39845
41390
|
"capabilities.quick.scope": "\u751F\u6548\u8303\u56F4",
|
|
39846
41391
|
"capabilities.quick.session": "\u4EC5\u672C\u4F1A\u8BDD",
|
|
39847
41392
|
"capabilities.quick.global": "\u5168\u5C40\u4FDD\u5B58\u5E76\u66F4\u65B0\u672C\u4F1A\u8BDD",
|
|
@@ -39853,12 +41398,25 @@ var CHROME_COPY = Object.freeze({
|
|
|
39853
41398
|
"capabilities.quick.tools": "\u57FA\u7840\u5DE5\u5177",
|
|
39854
41399
|
"capabilities.quick.mcp": "MCP \u670D\u52A1\u4E0E\u8D44\u6E90",
|
|
39855
41400
|
"capabilities.quick.mcp_tools": "MCP Tools",
|
|
39856
|
-
"capabilities.quick.
|
|
41401
|
+
"capabilities.quick.noChange": "\u4E0D\u6539\u52A8\uFF08\u5F53\u524D\uFF1A{state}\uFF09",
|
|
41402
|
+
"capabilities.quick.undoTemp": "\u64A4\u9500\u672C\u4F1A\u8BDD\u4FEE\u6539\uFF08\u6062\u590D\u4E3A\uFF1A{state}\uFF09",
|
|
41403
|
+
"capabilities.quick.keepUnchanged": "\u4E0D\u6539\u52A8",
|
|
41404
|
+
"capabilities.quick.undoChange": "\u64A4\u9500\u672C\u4F1A\u8BDD\u4FEE\u6539",
|
|
41405
|
+
"capabilities.quick.upperRule": "\u7531\u4E0A\u4E00\u7EA7\u89C4\u5219\u51B3\u5B9A",
|
|
41406
|
+
"capabilities.quick.impact": "\u672C\u4F1A\u8BDD\u751F\u6548\uFF1A{state} \xB7 \u6765\u6E90\uFF1A{source}",
|
|
41407
|
+
"capabilities.quick.impactPending": "\u672C\u4F1A\u8BDD\u751F\u6548\uFF1A{state} \xB7 \u6765\u6E90\uFF1A{source} \xB7 \u5F85\u5E94\u7528",
|
|
41408
|
+
"capabilities.quick.impactUpper": "\u672C\u4F1A\u8BDD\u751F\u6548\uFF1A\u6309\u4E0A\u4E00\u7EA7\u89C4\u5219\u51B3\u5B9A",
|
|
41409
|
+
"capabilities.quick.impactUpperPending": "\u672C\u4F1A\u8BDD\u751F\u6548\uFF1A\u6309\u4E0A\u4E00\u7EA7\u89C4\u5219\u51B3\u5B9A \xB7 \u5F85\u5E94\u7528",
|
|
41410
|
+
"capabilities.quick.originPlan": "\u4F1A\u8BDD\u65B9\u6848",
|
|
41411
|
+
"capabilities.quick.originSession": "\u672C\u4F1A\u8BDD\u4E34\u65F6\u4FEE\u6539",
|
|
41412
|
+
"capabilities.action.enable": "\u542F\u7528",
|
|
41413
|
+
"capabilities.action.close": "\u5173\u95ED",
|
|
39857
41414
|
"capabilities.quick.states": "\u5DF2\u4FDD\u5B58\uFF1A{saved} \xB7 \u4E34\u65F6\uFF1A{temporary} \xB7 \u751F\u6548\uFF1A{effective}",
|
|
39858
41415
|
"capabilities.quick.apply": "\u63D0\u4EA4\u5E76\u751F\u6548",
|
|
39859
41416
|
"capabilities.quick.prefill": "\u586B\u5165\u547D\u4EE4\u8349\u7A3F",
|
|
39860
41417
|
"capabilities.card.recorded": "\u4F1A\u8BDD\u80FD\u529B\u5DF2\u66F4\u65B0\u3002",
|
|
39861
|
-
"capabilities.card.
|
|
41418
|
+
"capabilities.card.paused": "\u80FD\u529B\u4E0E\u4E0A\u4E0B\u6587\u5DF2\u5173\u95ED\uFF1B\u672C\u4F1A\u8BDD\u6CBF\u7528\u5BBF\u4E3B\u80FD\u529B\u3002",
|
|
41419
|
+
"capabilities.card.off": "\u80FD\u529B\u7BA1\u7406\u5DF2\u5173\u95ED\uFF1B\u672C\u4F1A\u8BDD\u6CBF\u7528\u5BBF\u4E3B\u80FD\u529B\u3002",
|
|
39862
41420
|
"capabilities.card.saved-only": "\u5168\u5C40\u8BBE\u7F6E\u5DF2\u4FDD\u5B58\uFF0C\u4F1A\u8BDD\u66F4\u65B0\u5931\u8D25\u3002{error}",
|
|
39863
41421
|
"capabilities.card.unavailable": "\u4F1A\u8BDD\u4E0D\u53EF\u7528\uFF0C\u672A\u5E94\u7528\u66F4\u6539\u3002",
|
|
39864
41422
|
"capabilities.card.usage": "\u547D\u4EE4\u672A\u6267\u884C\uFF0C\u8BF7\u68C0\u67E5\u53C2\u6570\u3002",
|
|
@@ -39874,6 +41432,8 @@ var CHROME_COPY = Object.freeze({
|
|
|
39874
41432
|
"capabilities.receipt.saved-only": "\u5168\u5C40\u9009\u62E9\u5DF2\u4FDD\u5B58\uFF0C\u4F46\u4F1A\u8BDD {session} \u66F4\u65B0\u5931\u8D25\uFF1B\u8BF7\u8BFB\u53D6\u5F53\u524D\u65B9\u6848\u5E76\u91CD\u8BD5\u3002{error}",
|
|
39875
41433
|
"capabilities.receipt.recorded": "\u4F1A\u8BDD {session} \u7684\u80FD\u529B\u5DF2\u66F4\u65B0\u3002",
|
|
39876
41434
|
"capabilities.receipt.pending": "\u4F1A\u8BDD {session} \u7684\u80FD\u529B\u5DF2\u51C6\u5907\uFF0C\u5C06\u5728\u9996\u6B21\u63A5\u53D7\u7684\u6A21\u578B\u6B65\u9AA4\u751F\u6548\u3002",
|
|
41435
|
+
"capabilities.receipt.paused": "\u80FD\u529B\u4E0E\u4E0A\u4E0B\u6587\u5DF2\u5173\u95ED\uFF1B\u4F1A\u8BDD {session} \u6CBF\u7528\u5BBF\u4E3B\u80FD\u529B\u3002",
|
|
41436
|
+
"capabilities.receipt.off": "\u80FD\u529B\u7BA1\u7406\u5DF2\u5173\u95ED\uFF1B\u4F1A\u8BDD {session} \u6CBF\u7528\u5BBF\u4E3B\u80FD\u529B\u3002",
|
|
39877
41437
|
"capabilities.receipt.unavailable": "\u8BF7\u9009\u62E9\u4ECD\u6D3B\u8DC3\u7684 PTC \u4F1A\u8BDD\u3002",
|
|
39878
41438
|
"capabilities.receipt.usage": "\u4F7F\u7528 /capabilities \u67E5\u770B\uFF0C\u6216 /capabilities refresh \u540C\u6B65\u5DF2\u4FDD\u5B58\u8BBE\u7F6E\u3002",
|
|
39879
41439
|
"bindings.toggleEnabled": "\u5DF2\u4FDD\u5B58\u201C{name}\u201D\u7684\u542F\u7528\u9009\u62E9\uFF1B\u6A21\u578B\u76EE\u5F55\u5728\u4E0B\u4E00\u6B21\u83B7\u51C6\u6B65\u9AA4\u66F4\u65B0\uFF0C\u7A0B\u5E8F\u503C\u5C1A\u672A\u8BC1\u660E\u521D\u59CB\u5316\u3002",
|
|
@@ -39896,6 +41456,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
39896
41456
|
"capabilities.directoryUsage": "\u5BFC\u822A\u8BF4\u660E\uFF1A{bytes} / {budget} UTF-8 bytes",
|
|
39897
41457
|
"capabilities.statStatus.unavailable": "\u7EDF\u8BA1\u4E0D\u53EF\u7528",
|
|
39898
41458
|
"capabilities.statStatus.no-samples": "\u6682\u65E0\u6837\u672C",
|
|
41459
|
+
"capabilities.statStatus.pending-settlement": "\u5DF2\u6709\u8BB0\u5F55\u5F85\u7ED3\u7B97",
|
|
39899
41460
|
"capabilities.statStatus.incomplete-window": "\u7A97\u53E3\u8BC1\u636E\u4E0D\u5B8C\u6574",
|
|
39900
41461
|
"capabilities.statStatus.capacity-exceeded": "\u7EDF\u8BA1\u5BB9\u91CF\u5DF2\u8D85\u9650",
|
|
39901
41462
|
"capabilities.savedConfigurations": "\u5DF2\u4FDD\u5B58\u914D\u7F6E",
|
|
@@ -39941,7 +41502,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
39941
41502
|
"capabilities.reason.workspace": "\u5DE5\u4F5C\u533A\u7EDF\u8BA1",
|
|
39942
41503
|
"capabilities.reason.global": "\u5168\u5C40\u7EDF\u8BA1\u53C2\u8003",
|
|
39943
41504
|
"capabilities.host": "\u6CBF\u7528 DSH",
|
|
39944
|
-
"capabilities.policy.inheritRule": "\
|
|
41505
|
+
"capabilities.policy.inheritRule": "\u4E0D\u5355\u72EC\u8BBE\u7F6E",
|
|
39945
41506
|
"capabilities.policy.availabilityFilter": "\u5DF2\u4FDD\u5B58\u7684\u53EF\u7528\u6027",
|
|
39946
41507
|
"capabilities.policy.disclosureFilter": "\u5DF2\u4FDD\u5B58\u7684\u8BF4\u660E\u65B9\u5F0F",
|
|
39947
41508
|
"capabilities.policy.frozenSource": "\u51BB\u7ED3\u6765\u6E90\u7684\u89C4\u5219\u7ED3\u679C",
|
|
@@ -40051,6 +41612,88 @@ var CHROME_COPY = Object.freeze({
|
|
|
40051
41612
|
"capabilities.refreshAcknowledged": "DSH \u5DF2\u786E\u8BA4\u5237\u65B0\u64CD\u4F5C\u3002",
|
|
40052
41613
|
"capabilities.settingsTabs": "\u80FD\u529B\u8BBE\u7F6E\u9875\u7B7E",
|
|
40053
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",
|
|
40054
41697
|
"capabilities.tab.statistics": "\u4F7F\u7528\u7EDF\u8BA1",
|
|
40055
41698
|
"capabilities.tab.budgets": "\u63D0\u793A\u8BBE\u7F6E",
|
|
40056
41699
|
"capabilities.tab.plans": "\u914D\u7F6E\u65B9\u6848",
|
|
@@ -40257,6 +41900,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40257
41900
|
"tool.stopped": "\u6267\u884C\u5DF2\u4E2D\u65AD",
|
|
40258
41901
|
"tool.source": "\u6E90\u7801",
|
|
40259
41902
|
"tool.result": "\u7ED3\u679C",
|
|
41903
|
+
"tool.descriptionGenerated": "\u81EA\u52A8\u6458\u8981\uFF1A\u6A21\u578B\u672A\u63D0\u4F9B\u6458\u8981\uFF0C\u7531\u63D2\u4EF6\u751F\u6210",
|
|
40260
41904
|
"tool.copy": "\u590D\u5236\u4EE3\u7801",
|
|
40261
41905
|
"tool.copied": "\u5DF2\u590D\u5236",
|
|
40262
41906
|
"tool.inspect": "\u68C0\u67E5\u8C03\u7528",
|
|
@@ -40273,6 +41917,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40273
41917
|
"capabilities.combination.statistics": "Usage statistics",
|
|
40274
41918
|
"capabilities.combination.recovery": "Prompt recovery",
|
|
40275
41919
|
"capabilities.combination.preview": "Output excerpts",
|
|
41920
|
+
"capabilities.combination.promptText": "Prompt text",
|
|
40276
41921
|
"capabilities.combination.state.selected": "Selected",
|
|
40277
41922
|
"capabilities.combination.state.unselected": "Not selected",
|
|
40278
41923
|
"capabilities.combination.state.paused": "Paused",
|
|
@@ -40328,7 +41973,6 @@ var CHROME_COPY = Object.freeze({
|
|
|
40328
41973
|
"capabilities.inheritedRules": "Inherited rules",
|
|
40329
41974
|
"capabilities.inheritedRulesHelp": "Set persistent defaults, category and MCP source rules. Changes save immediately and are independent of current filters. Item preferences override each dimension; MCP source closure takes precedence.",
|
|
40330
41975
|
"capabilities.batch.targets": "One-time change to {count} catalog capabilities",
|
|
40331
|
-
"capabilities.batch.scope": "Target scope: {scope}",
|
|
40332
41976
|
"capabilities.batch.excluded": "Excluded {count} unavailable or unconfirmed entries.",
|
|
40333
41977
|
"capabilities.batch.targetList": "Targets for this batch",
|
|
40334
41978
|
"capabilities.batch.empty": "There are no confirmed catalog capabilities in the current filters.",
|
|
@@ -40340,8 +41984,14 @@ var CHROME_COPY = Object.freeze({
|
|
|
40340
41984
|
"capabilities.batch.changedTargets": "{count} targets are absent from the latest complete catalog or unconfirmed. Cancel and review the targets again.",
|
|
40341
41985
|
"capabilities.batch.failed": "Save was not confirmed. Targets and choices are retained; confirm again to retry.",
|
|
40342
41986
|
"capabilities.batch.confirm": "Confirm {count} changes",
|
|
40343
|
-
"capabilities.batch.search": "Search \u201C{query}\u201D",
|
|
40344
41987
|
"capabilities.batch.all": "Current complete capability catalog",
|
|
41988
|
+
"capabilities.batch.selected": "Selected {count} capabilities",
|
|
41989
|
+
"capabilities.batch.stage": "Stage changes ({count})",
|
|
41990
|
+
"capabilities.batch.sessionStage": "Confirm stages these changes; the footer decides whether they apply to this session or become global defaults.",
|
|
41991
|
+
"capabilities.batch.sessionInherit": "No change (clears this session\u2019s change)",
|
|
41992
|
+
"capabilities.selectForBatch": "Select {name}",
|
|
41993
|
+
"capabilities.selectAllVisible": "Select all visible results",
|
|
41994
|
+
"capabilities.selectionCount": "{count} selected",
|
|
40345
41995
|
"capabilities.typesColumn": "Type",
|
|
40346
41996
|
"capabilities.sourceColumn": "Source",
|
|
40347
41997
|
"capabilities.enabledColumn": "Enabled",
|
|
@@ -40362,7 +42012,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40362
42012
|
"capabilities.eligibleFamilies": "Eligible families",
|
|
40363
42013
|
"capabilities.coverageColumn": "Coverage",
|
|
40364
42014
|
"capabilities.coverageFor": "Coverage for {name}",
|
|
40365
|
-
"capabilities.familyHint": "A family counts one main session and its subagents together. Existing records remain available when collection is off.",
|
|
42015
|
+
"capabilities.familyHint": "A family counts one main session and its subagents together; only settled families count toward statistics. Existing records remain available when collection is off.",
|
|
40366
42016
|
"capabilities.contextNavigation": "Context features",
|
|
40367
42017
|
"capabilities.context.description": "Initial prompt",
|
|
40368
42018
|
"capabilities.context.recovery": "Prompt recovery",
|
|
@@ -40410,7 +42060,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40410
42060
|
"capabilities.observedUsage": "Observed usage",
|
|
40411
42061
|
"capabilities.budgetPreview": "Current allocation preview",
|
|
40412
42062
|
"capabilities.observationUnavailable": "Capability preview is unavailable; reload the observation.",
|
|
40413
|
-
"capabilities.selectObservation": "Select an active PTC session
|
|
42063
|
+
"capabilities.selectObservation": "Select an active PTC session as the observation anchor; statistics and budget preview follow its capability inventory, and the scope switches between its workspace and all workspaces.",
|
|
40414
42064
|
"capabilities.quick.title": "Session capability controls",
|
|
40415
42065
|
"capabilities.quick.modalTitle": "Manage session capabilities",
|
|
40416
42066
|
"capabilities.quick.sessionIdentity": "Current session: {session}",
|
|
@@ -40429,7 +42079,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40429
42079
|
"capabilities.quick.applySession": "Apply to session",
|
|
40430
42080
|
"capabilities.quick.applyGlobal": "Apply to global",
|
|
40431
42081
|
"capabilities.quick.noOverride": "None",
|
|
40432
|
-
"capabilities.quick.inheritSessionOnly": "Clearing a temporary
|
|
42082
|
+
"capabilities.quick.inheritSessionOnly": "Clearing a temporary change applies only to this session. Use Apply to session.",
|
|
40433
42083
|
"capabilities.quick.discard": "Discard changes",
|
|
40434
42084
|
"capabilities.quick.applying": "Applying\u2026",
|
|
40435
42085
|
"capabilities.quick.applied": "{count} session capabilities updated.",
|
|
@@ -40445,8 +42095,11 @@ var CHROME_COPY = Object.freeze({
|
|
|
40445
42095
|
"capabilities.quick.pendingServerClose": "MCP server {server} has a close choice awaiting effect; child choices are retained.",
|
|
40446
42096
|
"capabilities.quick.enabled": "Enabled",
|
|
40447
42097
|
"capabilities.quick.pending": "Pending",
|
|
42098
|
+
"capabilities.quick.temporaryState": "{state} (temporary)",
|
|
40448
42099
|
"capabilities.quick.sessionPaused": "Capabilities and context are paused for this session; the list shows Host defaults. Re-enable them in settings and refresh before changes can apply.",
|
|
40449
|
-
"capabilities.quick.sessionManagementOff": "Capability management is off for this session; capabilities stay with the Host.",
|
|
42100
|
+
"capabilities.quick.sessionManagementOff": "Capability management is off for this session; capabilities stay with the Host. Enable it under Capabilities & Context in settings and refresh before changing this session's choices.",
|
|
42101
|
+
"capabilities.quick.savedPaused": "Capabilities and context are off in settings; re-enable them and refresh before changing this session's choices.",
|
|
42102
|
+
"capabilities.quick.savedManagementOff": "Capability management is off in settings; re-enable it and refresh before changing this session's choices.",
|
|
40450
42103
|
"capabilities.quick.scope": "Apply to",
|
|
40451
42104
|
"capabilities.quick.session": "This session only",
|
|
40452
42105
|
"capabilities.quick.global": "Save globally and update this session",
|
|
@@ -40458,12 +42111,25 @@ var CHROME_COPY = Object.freeze({
|
|
|
40458
42111
|
"capabilities.quick.tools": "Ordinary tools",
|
|
40459
42112
|
"capabilities.quick.mcp": "MCP servers and resources",
|
|
40460
42113
|
"capabilities.quick.mcp_tools": "MCP tools",
|
|
40461
|
-
"capabilities.quick.
|
|
42114
|
+
"capabilities.quick.noChange": "No change (currently: {state})",
|
|
42115
|
+
"capabilities.quick.undoTemp": "Undo this session\u2019s change (restores {state})",
|
|
42116
|
+
"capabilities.quick.keepUnchanged": "No change",
|
|
42117
|
+
"capabilities.quick.undoChange": "Undo this session\u2019s change",
|
|
42118
|
+
"capabilities.quick.upperRule": "Let the level above decide",
|
|
42119
|
+
"capabilities.quick.impact": "Effective in this session: {state} \xB7 From: {source}",
|
|
42120
|
+
"capabilities.quick.impactPending": "Effective in this session: {state} \xB7 From: {source} \xB7 Pending apply",
|
|
42121
|
+
"capabilities.quick.impactUpper": "Effective in this session: decided by the level above",
|
|
42122
|
+
"capabilities.quick.impactUpperPending": "Effective in this session: decided by the level above \xB7 Pending apply",
|
|
42123
|
+
"capabilities.quick.originPlan": "the session plan",
|
|
42124
|
+
"capabilities.quick.originSession": "this session\u2019s change",
|
|
42125
|
+
"capabilities.action.enable": "Enable",
|
|
42126
|
+
"capabilities.action.close": "Close",
|
|
40462
42127
|
"capabilities.quick.states": "Saved: {saved} \xB7 Temporary: {temporary} \xB7 Effective: {effective}",
|
|
40463
42128
|
"capabilities.quick.apply": "Submit and apply",
|
|
40464
42129
|
"capabilities.quick.prefill": "Fill command draft",
|
|
40465
42130
|
"capabilities.card.recorded": "Session capabilities updated.",
|
|
40466
|
-
"capabilities.card.
|
|
42131
|
+
"capabilities.card.paused": "Capabilities and context are off; this session stays with the Host capabilities.",
|
|
42132
|
+
"capabilities.card.off": "Capability management is off; this session stays with the Host capabilities.",
|
|
40467
42133
|
"capabilities.card.saved-only": "Global settings saved; session update failed. {error}",
|
|
40468
42134
|
"capabilities.card.unavailable": "Session unavailable; changes were not applied.",
|
|
40469
42135
|
"capabilities.card.usage": "Command not executed; check its arguments.",
|
|
@@ -40479,6 +42145,8 @@ var CHROME_COPY = Object.freeze({
|
|
|
40479
42145
|
"capabilities.receipt.saved-only": "Global choice saved, but session {session} could not be updated. Inspect its plan and retry. {error}",
|
|
40480
42146
|
"capabilities.receipt.recorded": "Capabilities updated for session {session}.",
|
|
40481
42147
|
"capabilities.receipt.pending": "Capabilities prepared for session {session}; they take effect at its first accepted model step.",
|
|
42148
|
+
"capabilities.receipt.paused": "Capabilities and context are off; session {session} stays with the Host capabilities.",
|
|
42149
|
+
"capabilities.receipt.off": "Capability management is off; session {session} stays with the Host capabilities.",
|
|
40482
42150
|
"capabilities.receipt.unavailable": "Select an active PTC session.",
|
|
40483
42151
|
"capabilities.receipt.usage": "Use /capabilities to inspect or /capabilities refresh to apply saved settings.",
|
|
40484
42152
|
"bindings.toggleEnabled": "Enabled \u201C{name}\u201D in saved configuration. The model catalog updates at the next accepted step; worker initialization is not yet established.",
|
|
@@ -40501,6 +42169,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40501
42169
|
"capabilities.directoryUsage": "Navigation: {bytes} / {budget} UTF-8 bytes",
|
|
40502
42170
|
"capabilities.statStatus.unavailable": "Statistics unavailable",
|
|
40503
42171
|
"capabilities.statStatus.no-samples": "No samples yet",
|
|
42172
|
+
"capabilities.statStatus.pending-settlement": "Recorded, awaiting settlement",
|
|
40504
42173
|
"capabilities.statStatus.incomplete-window": "Incomplete window evidence",
|
|
40505
42174
|
"capabilities.statStatus.capacity-exceeded": "Statistics capacity exceeded",
|
|
40506
42175
|
"capabilities.savedConfigurations": "Saved configurations",
|
|
@@ -40546,7 +42215,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40546
42215
|
"capabilities.reason.workspace": "Workspace statistics",
|
|
40547
42216
|
"capabilities.reason.global": "Global statistics fallback",
|
|
40548
42217
|
"capabilities.host": "Host defaults",
|
|
40549
|
-
"capabilities.policy.inheritRule": "
|
|
42218
|
+
"capabilities.policy.inheritRule": "Not set here",
|
|
40550
42219
|
"capabilities.policy.availabilityFilter": "Saved availability",
|
|
40551
42220
|
"capabilities.policy.disclosureFilter": "Saved disclosure",
|
|
40552
42221
|
"capabilities.policy.frozenSource": "Frozen source rule result",
|
|
@@ -40656,6 +42325,85 @@ var CHROME_COPY = Object.freeze({
|
|
|
40656
42325
|
"capabilities.refreshAcknowledged": "DSH acknowledged the refresh operation.",
|
|
40657
42326
|
"capabilities.settingsTabs": "Capability settings tabs",
|
|
40658
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",
|
|
40659
42407
|
"capabilities.tab.statistics": "Usage statistics",
|
|
40660
42408
|
"capabilities.tab.budgets": "Prompt settings",
|
|
40661
42409
|
"capabilities.tab.plans": "Configurations",
|
|
@@ -40863,6 +42611,7 @@ var CHROME_COPY = Object.freeze({
|
|
|
40863
42611
|
"tool.stopped": "Stopped",
|
|
40864
42612
|
"tool.source": "Source",
|
|
40865
42613
|
"tool.result": "Result",
|
|
42614
|
+
"tool.descriptionGenerated": "Auto summary: generated because the model provided none",
|
|
40866
42615
|
"tool.inspect": "Inspect call",
|
|
40867
42616
|
"feature.safeEdit": "Safe edit execution",
|
|
40868
42617
|
"feature.codeRun": "Isolated code.run execution",
|