dsh-ptc-plus 0.5.2 → 0.5.4
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 +4 -2
- package/README.md +4 -2
- package/client.cjs +3392 -2811
- package/compiler-core.cjs +127 -127
- package/compiler-core.cjs.map +2 -2
- package/docs/README.md +1 -0
- package/docs/adr/0017-track-the-latest-dsh-public-surface.md +4 -2
- package/docs/adr/0019-plugin-settings-and-kill-switch.md +2 -2
- package/docs/adr/0023-global-user-bindings.md +12 -0
- package/docs/adr/0028-attach-to-the-host-ptc-execution-seam.md +1 -1
- package/docs/adr/0030-serve-both-typert-codec-generations-from-one-codec.md +2 -2
- package/docs/adr/0044-coexist-with-the-official-persistent-repl.md +4 -4
- package/docs/adr/0046-gate-the-commit-with-the-semantic-evidence-tier.md +1 -1
- package/docs/adr/0048-supersede-a-rewritten-cell.md +48 -0
- package/docs/adr/0049-prove-a-settlement-against-its-published-record.md +53 -0
- package/docs/adr/0050-read-host-surfaces-through-their-published-contract.md +48 -0
- package/docs/adr/README.md +7 -1
- package/docs/architecture.md +1 -1
- package/docs/capability-planning-components.md +6 -6
- package/docs/capability-projection.md +1 -1
- package/docs/capability-surface.md +133 -0
- package/docs/client-ui.md +17 -15
- package/docs/client-visual-contract.md +7 -7
- package/docs/durability-design.md +9 -2
- package/docs/installation.md +17 -10
- package/docs/panel-concept.md +171 -0
- package/docs/releases/v0.5.2.md +26 -14
- package/docs/releases/v0.5.3.md +77 -0
- package/docs/releases/v0.5.4.md +75 -0
- package/docs/runtime-reference.md +21 -1
- package/docs/user-bindings.en.md +15 -0
- package/docs/user-bindings.md +15 -0
- package/docs/v0.5.3-goals.md +117 -0
- package/docs/verification.md +4 -4
- package/index.js +176 -41
- package/internal/binding-adoption.js +228 -0
- package/internal/capability-command-receipt.js +106 -8
- package/internal/capability-environment.js +1109 -312
- package/internal/capability-plan.js +18 -2
- package/internal/capability-policy.js +13 -0
- package/internal/capability-selection.js +330 -0
- package/internal/config-spec.js +14 -5
- package/internal/cordis-tools-owner.js +2 -1
- package/internal/direct-surface-owner.js +44 -17
- package/internal/edit-transport-owner.js +6 -5
- package/internal/execution-provider-owner.js +6 -0
- package/internal/execution-seam-compat.js +25 -0
- package/internal/host-tool-sdk.js +308 -0
- package/internal/message-sources.js +21 -0
- package/internal/official-repl-priority.js +31 -10
- package/internal/program-bindings.js +25 -5
- package/internal/repl-memory-projection.js +21 -2
- package/internal/runtime-bridge-owner.js +118 -9
- package/internal/runtime-config.js +10 -0
- package/internal/runtime-messages.js +5 -0
- package/internal/session-journal-recovery.js +210 -32
- package/internal/session-journal-schema.js +3 -0
- package/internal/session-journal.js +46 -9
- package/internal/session-log-view.js +69 -7
- package/internal/session-runtime.js +106 -39
- package/internal/settings-compat.js +6 -0
- package/internal/user-bindings-owner.js +126 -6
- package/package.json +59 -37
- package/src/client-authoring-view.js +7 -8
- package/src/client-capabilities-view.js +874 -909
- package/src/client-capability-sort.js +22 -9
- package/src/client-copy.js +118 -272
- package/src/client-indicator-view.js +2 -1
- package/src/client-repl-view.js +35 -16
- package/src/client-settings-view.js +90 -33
- package/src/client-styles.js +67 -19
- package/src/client.js +49 -22
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Column ordering for the capability table.
|
|
3
|
+
*
|
|
4
|
+
* The question is only "in which order does this page state the rows the Host
|
|
5
|
+
* declared". A sort never decides what a row says: it changes neither the saved
|
|
6
|
+
* column nor this session's record, and it is not part of the read. The default
|
|
7
|
+
* — nothing sorted — is the supply order the read stated, so a third click
|
|
8
|
+
* returns the table to the order it arrived in rather than leaving the reader to
|
|
9
|
+
* reconstruct it.
|
|
10
|
+
*/
|
|
8
11
|
|
|
12
|
+
/** The next state of one column's ordering: ascending, then descending, then none. */
|
|
9
13
|
export function cycleCapabilitySort(current, column) {
|
|
10
14
|
if (current?.column !== column) return { column, direction: 'ascending' }
|
|
11
15
|
return current.direction === 'ascending' ? { column, direction: 'descending' } : null
|
|
12
16
|
}
|
|
13
17
|
|
|
18
|
+
/** What `aria-sort` states for one column, using the vocabulary that attribute owns. */
|
|
14
19
|
export function capabilitySortDirection(current, column) {
|
|
15
20
|
return current?.column === column ? current.direction : 'none'
|
|
16
21
|
}
|
|
17
22
|
|
|
18
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Order rows by their displayed values.
|
|
25
|
+
*
|
|
26
|
+
* Values come from the caller because they are what the reader compares: a type
|
|
27
|
+
* orders by the word in the badge and a source by its label, not by the field a
|
|
28
|
+
* translation is derived from. Ties keep the order they arrived in, so equal
|
|
29
|
+
* rows never reshuffle between two renders.
|
|
30
|
+
*/
|
|
19
31
|
export function sortCapabilityEntries(entries, current, valueFor) {
|
|
20
32
|
if (!current) return [...entries]
|
|
21
33
|
const direction = current.direction === 'descending' ? -1 : 1
|
|
@@ -24,6 +36,7 @@ export function sortCapabilityEntries(entries, current, valueFor) {
|
|
|
24
36
|
return typeof result === 'number' ? result : String(result ?? '').toLowerCase()
|
|
25
37
|
}
|
|
26
38
|
return entries.map((entry, index) => ({ entry, index, value: value(entry) }))
|
|
27
|
-
.sort((
|
|
39
|
+
.sort((left, right) => direction * (left.value < right.value ? -1 : left.value > right.value ? 1 : 0)
|
|
40
|
+
|| left.index - right.index)
|
|
28
41
|
.map(item => item.entry)
|
|
29
42
|
}
|