dsh-ptc-plus 0.5.3 → 0.5.6
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 +3 -3
- package/README.md +3 -3
- package/client.cjs +3326 -2881
- package/compiler-core.cjs +127 -127
- package/compiler-core.cjs.map +2 -2
- package/docs/README.md +1 -0
- package/docs/adr/0005-temporary-rejected-cell-edit-transport.md +2 -2
- package/docs/adr/0017-track-the-latest-dsh-public-surface.md +4 -4
- 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/installation.md +14 -7
- package/docs/panel-concept.md +171 -0
- package/docs/publishing.md +1 -1
- package/docs/release-notes.md +1 -1
- package/docs/releases/v0.5.4.md +79 -0
- package/docs/releases/v0.5.5.md +41 -0
- package/docs/releases/v0.5.6.md +41 -0
- package/docs/runtime-reference.md +14 -0
- package/docs/verification.md +1 -1
- package/index.js +117 -30
- package/internal/binding-adoption.js +103 -11
- package/internal/capability-command-receipt.js +99 -15
- package/internal/capability-environment.js +1108 -348
- package/internal/capability-plan.js +18 -2
- package/internal/capability-policy.js +13 -0
- package/internal/capability-selection.js +330 -0
- package/internal/direct-surface-owner.js +17 -4
- package/internal/edit-transport-owner.js +3 -2
- package/internal/host-tool-sdk.js +17 -29
- package/internal/message-sources.js +21 -0
- package/internal/program-bindings.js +13 -4
- package/internal/runtime-bridge-owner.js +9 -9
- package/internal/runtime-config.js +10 -0
- package/internal/session-log-view.js +47 -5
- package/internal/settings-compat.js +6 -0
- package/internal/user-bindings-owner.js +20 -3
- package/package.json +45 -31
- package/src/client-authoring-view.js +7 -8
- package/src/client-capabilities-view.js +871 -948
- package/src/client-capability-sort.js +22 -9
- package/src/client-copy.js +116 -294
- package/src/client-settings-view.js +90 -33
- package/src/client-styles.js +67 -19
- package/src/client.js +46 -21
- package/internal/capability-delivery-proof.js +0 -70
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One capability, three separate facts.
|
|
3
|
-
*
|
|
4
|
-
* Saving a global choice changes supply: the configuration now records a
|
|
5
|
-
* decision. It does not prove the model ever received that decision, and it does
|
|
6
|
-
* not prove a cell can reach the capability. Those are different questions with
|
|
7
|
-
* different owners:
|
|
8
|
-
*
|
|
9
|
-
* - **saved**: the global configuration records a choice for this capability.
|
|
10
|
-
* - **delivered**: the model-visible capability catalog published it at an
|
|
11
|
-
* accepted step, rather than waiting for the next one or never listing it.
|
|
12
|
-
* - **usable**: a completed execution in this session actually reached it.
|
|
13
|
-
*
|
|
14
|
-
* Usability is only ever proved by an execution result. Nothing else in the
|
|
15
|
-
* product can claim it: a saved switch, a published catalog entry and an
|
|
16
|
-
* installed tool schema are all statements about intent, not about a value a
|
|
17
|
-
* cell obtained. Reporting "saved, delivered, usability unproven" is therefore
|
|
18
|
-
* the honest answer to "did that save take effect", and it is what a layer that
|
|
19
|
-
* cannot prove more must say instead of claiming effect.
|
|
20
|
-
*/
|
|
21
|
-
export const CAPABILITY_PROOF_SCHEMA = 'ptc-capability-proof/v1'
|
|
22
|
-
export const CAPABILITY_DELIVERY_STATES = new Set(['delivered', 'pending', 'absent'])
|
|
23
|
-
export const CAPABILITY_USABILITY_STATES = new Set(['proven', 'unproven'])
|
|
24
|
-
|
|
25
|
-
const CAPABILITY_ID = /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$/
|
|
26
|
-
|
|
27
|
-
function isRecord(value) {
|
|
28
|
-
return value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function normalizeCapabilityProof(value) {
|
|
32
|
-
if (!isRecord(value) || Reflect.ownKeys(value).length !== 5
|
|
33
|
-
|| !Object.hasOwn(value, 'schema') || !Object.hasOwn(value, 'id') || !Object.hasOwn(value, 'saved')
|
|
34
|
-
|| !Object.hasOwn(value, 'delivery') || !Object.hasOwn(value, 'usability')) {
|
|
35
|
-
throw new TypeError('invalid capability proof')
|
|
36
|
-
}
|
|
37
|
-
if (value.schema !== CAPABILITY_PROOF_SCHEMA) throw new TypeError('invalid capability proof schema')
|
|
38
|
-
if (typeof value.id !== 'string' || !CAPABILITY_ID.test(value.id)) throw new TypeError('invalid capability proof id')
|
|
39
|
-
if (typeof value.saved !== 'boolean') throw new TypeError('invalid capability proof saved fact')
|
|
40
|
-
if (!CAPABILITY_DELIVERY_STATES.has(value.delivery)) throw new TypeError('invalid capability proof delivery state')
|
|
41
|
-
if (!CAPABILITY_USABILITY_STATES.has(value.usability)) throw new TypeError('invalid capability proof usability state')
|
|
42
|
-
return Object.freeze({
|
|
43
|
-
schema: CAPABILITY_PROOF_SCHEMA,
|
|
44
|
-
id: value.id,
|
|
45
|
-
saved: value.saved,
|
|
46
|
-
delivery: value.delivery,
|
|
47
|
-
usability: value.usability,
|
|
48
|
-
})
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The model-visible sentence for one proof. Each layer states its own result, so
|
|
53
|
-
* a reader can tell which layer failed instead of reading one blanket "applied".
|
|
54
|
-
*/
|
|
55
|
-
export function capabilityProofText(proof) {
|
|
56
|
-
const normalized = normalizeCapabilityProof(proof)
|
|
57
|
-
const id = normalized.id
|
|
58
|
-
const saved = normalized.saved
|
|
59
|
-
? `Saved: yes. The global configuration records a choice for ${id}.`
|
|
60
|
-
: `Saved: no. The global configuration records no choice for ${id}, so this save did not happen; the session choice below is the only change.`
|
|
61
|
-
const delivery = {
|
|
62
|
-
delivered: `Delivered: yes. The model-visible capability catalog published ${id} at an accepted step.`,
|
|
63
|
-
pending: `Delivered: not yet. The saved configuration reaches the model-visible catalog at the next accepted step, so ${id} is not in it now.`,
|
|
64
|
-
absent: `Delivered: no. The published capability catalog does not list ${id}, so the model never received it.`,
|
|
65
|
-
}[normalized.delivery]
|
|
66
|
-
const usability = normalized.usability === 'proven'
|
|
67
|
-
? `Usable: proven. A completed execution in this session reached ${id}.`
|
|
68
|
-
: `Usable: unproven. No completed execution in this session reached ${id}; only such a result would prove it, and a saved or published entry does not.`
|
|
69
|
-
return `${saved} ${delivery} ${usability}`
|
|
70
|
-
}
|