@motebit/protocol 1.1.0 → 1.3.0
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/dist/artifact-type.d.ts +118 -0
- package/dist/artifact-type.d.ts.map +1 -0
- package/dist/artifact-type.js +97 -0
- package/dist/artifact-type.js.map +1 -0
- package/dist/audience.d.ts +108 -0
- package/dist/audience.d.ts.map +1 -0
- package/dist/audience.js +104 -0
- package/dist/audience.js.map +1 -0
- package/dist/co-browse.d.ts +369 -0
- package/dist/co-browse.d.ts.map +1 -0
- package/dist/co-browse.js +64 -0
- package/dist/co-browse.js.map +1 -0
- package/dist/computer-use.d.ts +463 -3
- package/dist/computer-use.d.ts.map +1 -1
- package/dist/computer-use.js +40 -0
- package/dist/computer-use.js.map +1 -1
- package/dist/dispute.d.ts +150 -4
- package/dist/dispute.d.ts.map +1 -1
- package/dist/index.d.ts +311 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -1
- package/dist/memory-events.d.ts +1 -1
- package/dist/memory-events.js +1 -1
- package/dist/money.d.ts +33 -0
- package/dist/money.d.ts.map +1 -0
- package/dist/money.js +41 -0
- package/dist/money.js.map +1 -0
- package/dist/perception.d.ts +308 -0
- package/dist/perception.d.ts.map +1 -0
- package/dist/perception.js +9 -0
- package/dist/perception.js.map +1 -0
- package/dist/retention-policy.d.ts +464 -0
- package/dist/retention-policy.d.ts.map +1 -0
- package/dist/retention-policy.js +128 -0
- package/dist/retention-policy.js.map +1 -0
- package/dist/sensitivity.d.ts +73 -0
- package/dist/sensitivity.d.ts.map +1 -0
- package/dist/sensitivity.js +97 -0
- package/dist/sensitivity.js.map +1 -0
- package/dist/skills.d.ts +334 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +44 -0
- package/dist/skills.js.map +1 -0
- package/dist/transparency.d.ts +116 -0
- package/dist/transparency.d.ts.map +1 -0
- package/dist/transparency.js +67 -0
- package/dist/transparency.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sensitivity ladder algebra — pure math over the closed
|
|
3
|
+
* `SensitivityLevel` enum.
|
|
4
|
+
*
|
|
5
|
+
* The ladder is interop law. Every motebit implementation must agree
|
|
6
|
+
* on which tier dominates which, or the cross-implementation gate
|
|
7
|
+
* isn't interoperable: device A persisting a turn at "secret" must
|
|
8
|
+
* mean the same thing to device B's session-tier filter.
|
|
9
|
+
*
|
|
10
|
+
* Pure deterministic math over a closed enum — qualifies as a
|
|
11
|
+
* permissive-floor primitive per `packages/protocol/CLAUDE.md` rule 1
|
|
12
|
+
* ("deterministic math (semiring algebra, canonical JSON, hash
|
|
13
|
+
* primitives)"). The functions don't decide policy; they compose
|
|
14
|
+
* ordered values. Policy thresholds (e.g. "medical+ requires
|
|
15
|
+
* sovereign provider") live at the call site so call sites express
|
|
16
|
+
* intent at the right level.
|
|
17
|
+
*
|
|
18
|
+
* Graduation history: `rankSensitivity` had three local definitions
|
|
19
|
+
* by 2026-05-07 (runtime/motebit-runtime.ts, runtime/conversation.ts,
|
|
20
|
+
* ai-core/loop.ts) plus a fourth-shaped table (`LEVEL_RANK` +
|
|
21
|
+
* `higherLevel` in policy-invariants/computer-sensitivity.ts). The
|
|
22
|
+
* ai-core copy's JSDoc explicitly named graduation as the trigger:
|
|
23
|
+
* "if a third reader appears, the helper graduates." Past trigger.
|
|
24
|
+
*
|
|
25
|
+
* Naming distinction:
|
|
26
|
+
* - `rankSensitivity` — load-bearing primitive; ordinal int over the
|
|
27
|
+
* closed union. Comparable, hashable, monotonic.
|
|
28
|
+
* - `maxSensitivity` — typed wrapper for the join-semilattice
|
|
29
|
+
* composition (`max(a, b)`). Identity element is `None`. Used at
|
|
30
|
+
* every egress write boundary that floors message tier at
|
|
31
|
+
* `max(default, effective)`.
|
|
32
|
+
* - `sensitivityPermits` — typed wrapper for the read-side filter
|
|
33
|
+
* (`candidate <= upper`). Used at every egress READ boundary that
|
|
34
|
+
* excludes content tagged above the current effective tier.
|
|
35
|
+
*
|
|
36
|
+
* Not a semiring. There's only one operation (max-monoid / join-
|
|
37
|
+
* semilattice). Calling it a semiring would be a category error.
|
|
38
|
+
*/
|
|
39
|
+
import type { SensitivityLevel } from "./index.js";
|
|
40
|
+
/**
|
|
41
|
+
* Ordinal rank for a `SensitivityLevel`. Returns 0 (`None`) through
|
|
42
|
+
* 4 (`Secret`) — see `SENSITIVITY_RANK` above. Use this as the
|
|
43
|
+
* comparison primitive; prefer `maxSensitivity` / `sensitivityPermits`
|
|
44
|
+
* at call sites that compose or filter.
|
|
45
|
+
*/
|
|
46
|
+
export declare function rankSensitivity(level: SensitivityLevel): number;
|
|
47
|
+
/**
|
|
48
|
+
* Compose two sensitivity tiers: returns whichever has the higher
|
|
49
|
+
* rank. The join-semilattice composition that the egress-write floor
|
|
50
|
+
* arc depends on at every boundary (session × slab, default ×
|
|
51
|
+
* effective, persisted-tier × runtime-tier). Identity is `None`.
|
|
52
|
+
*
|
|
53
|
+
* Property: `maxSensitivity(a, None) === a` for all `a`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function maxSensitivity(a: SensitivityLevel, b: SensitivityLevel): SensitivityLevel;
|
|
56
|
+
/**
|
|
57
|
+
* Does the upper tier permit content tagged at `candidate`? Returns
|
|
58
|
+
* `true` iff `candidate <= upper` in the ladder. Used at every
|
|
59
|
+
* egress READ boundary (trimmed conversation history, memory-
|
|
60
|
+
* candidate filter at AI-context construction, future cross-device-
|
|
61
|
+
* sync filters).
|
|
62
|
+
*
|
|
63
|
+
* The dual of `maxSensitivity`: write-side floor stamps with
|
|
64
|
+
* `maxSensitivity`, read-side filter excludes via
|
|
65
|
+
* `!sensitivityPermits`. Both routes derive from the same single
|
|
66
|
+
* source of truth (`SENSITIVITY_RANK`), so a tier insertion remains
|
|
67
|
+
* a one-file change at the protocol layer.
|
|
68
|
+
*
|
|
69
|
+
* Property: `sensitivityPermits(upper, None) === true` for all
|
|
70
|
+
* `upper` (None content is admissible at every tier).
|
|
71
|
+
*/
|
|
72
|
+
export declare function sensitivityPermits(upper: SensitivityLevel, candidate: SensitivityLevel): boolean;
|
|
73
|
+
//# sourceMappingURL=sensitivity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sensitivity.d.ts","sourceRoot":"","sources":["../src/sensitivity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAOH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAsBnD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAE/D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,CAEzF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAEhG"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sensitivity ladder algebra — pure math over the closed
|
|
3
|
+
* `SensitivityLevel` enum.
|
|
4
|
+
*
|
|
5
|
+
* The ladder is interop law. Every motebit implementation must agree
|
|
6
|
+
* on which tier dominates which, or the cross-implementation gate
|
|
7
|
+
* isn't interoperable: device A persisting a turn at "secret" must
|
|
8
|
+
* mean the same thing to device B's session-tier filter.
|
|
9
|
+
*
|
|
10
|
+
* Pure deterministic math over a closed enum — qualifies as a
|
|
11
|
+
* permissive-floor primitive per `packages/protocol/CLAUDE.md` rule 1
|
|
12
|
+
* ("deterministic math (semiring algebra, canonical JSON, hash
|
|
13
|
+
* primitives)"). The functions don't decide policy; they compose
|
|
14
|
+
* ordered values. Policy thresholds (e.g. "medical+ requires
|
|
15
|
+
* sovereign provider") live at the call site so call sites express
|
|
16
|
+
* intent at the right level.
|
|
17
|
+
*
|
|
18
|
+
* Graduation history: `rankSensitivity` had three local definitions
|
|
19
|
+
* by 2026-05-07 (runtime/motebit-runtime.ts, runtime/conversation.ts,
|
|
20
|
+
* ai-core/loop.ts) plus a fourth-shaped table (`LEVEL_RANK` +
|
|
21
|
+
* `higherLevel` in policy-invariants/computer-sensitivity.ts). The
|
|
22
|
+
* ai-core copy's JSDoc explicitly named graduation as the trigger:
|
|
23
|
+
* "if a third reader appears, the helper graduates." Past trigger.
|
|
24
|
+
*
|
|
25
|
+
* Naming distinction:
|
|
26
|
+
* - `rankSensitivity` — load-bearing primitive; ordinal int over the
|
|
27
|
+
* closed union. Comparable, hashable, monotonic.
|
|
28
|
+
* - `maxSensitivity` — typed wrapper for the join-semilattice
|
|
29
|
+
* composition (`max(a, b)`). Identity element is `None`. Used at
|
|
30
|
+
* every egress write boundary that floors message tier at
|
|
31
|
+
* `max(default, effective)`.
|
|
32
|
+
* - `sensitivityPermits` — typed wrapper for the read-side filter
|
|
33
|
+
* (`candidate <= upper`). Used at every egress READ boundary that
|
|
34
|
+
* excludes content tagged above the current effective tier.
|
|
35
|
+
*
|
|
36
|
+
* Not a semiring. There's only one operation (max-monoid / join-
|
|
37
|
+
* semilattice). Calling it a semiring would be a category error.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Ordinal rank for `SensitivityLevel`: `none(0) < personal(1) <
|
|
41
|
+
* medical(2) < financial(3) < secret(4)`. The single source of truth
|
|
42
|
+
* for the ladder ordering — every consumer must derive comparison
|
|
43
|
+
* decisions from this rank, not from local enum-equality chains
|
|
44
|
+
* (`x === Medical || x === Financial || x === Secret`), so a future
|
|
45
|
+
* tier insertion remains a one-file change at the protocol layer.
|
|
46
|
+
*
|
|
47
|
+
* Keys are the enum's string values (not enum members) to avoid the
|
|
48
|
+
* init-order cycle described above. The `Record<SensitivityLevel,
|
|
49
|
+
* number>` type still binds the keys to the enum at the type layer.
|
|
50
|
+
*/
|
|
51
|
+
const SENSITIVITY_RANK = Object.freeze({
|
|
52
|
+
none: 0,
|
|
53
|
+
personal: 1,
|
|
54
|
+
medical: 2,
|
|
55
|
+
financial: 3,
|
|
56
|
+
secret: 4,
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* Ordinal rank for a `SensitivityLevel`. Returns 0 (`None`) through
|
|
60
|
+
* 4 (`Secret`) — see `SENSITIVITY_RANK` above. Use this as the
|
|
61
|
+
* comparison primitive; prefer `maxSensitivity` / `sensitivityPermits`
|
|
62
|
+
* at call sites that compose or filter.
|
|
63
|
+
*/
|
|
64
|
+
export function rankSensitivity(level) {
|
|
65
|
+
return SENSITIVITY_RANK[level];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Compose two sensitivity tiers: returns whichever has the higher
|
|
69
|
+
* rank. The join-semilattice composition that the egress-write floor
|
|
70
|
+
* arc depends on at every boundary (session × slab, default ×
|
|
71
|
+
* effective, persisted-tier × runtime-tier). Identity is `None`.
|
|
72
|
+
*
|
|
73
|
+
* Property: `maxSensitivity(a, None) === a` for all `a`.
|
|
74
|
+
*/
|
|
75
|
+
export function maxSensitivity(a, b) {
|
|
76
|
+
return rankSensitivity(a) >= rankSensitivity(b) ? a : b;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Does the upper tier permit content tagged at `candidate`? Returns
|
|
80
|
+
* `true` iff `candidate <= upper` in the ladder. Used at every
|
|
81
|
+
* egress READ boundary (trimmed conversation history, memory-
|
|
82
|
+
* candidate filter at AI-context construction, future cross-device-
|
|
83
|
+
* sync filters).
|
|
84
|
+
*
|
|
85
|
+
* The dual of `maxSensitivity`: write-side floor stamps with
|
|
86
|
+
* `maxSensitivity`, read-side filter excludes via
|
|
87
|
+
* `!sensitivityPermits`. Both routes derive from the same single
|
|
88
|
+
* source of truth (`SENSITIVITY_RANK`), so a tier insertion remains
|
|
89
|
+
* a one-file change at the protocol layer.
|
|
90
|
+
*
|
|
91
|
+
* Property: `sensitivityPermits(upper, None) === true` for all
|
|
92
|
+
* `upper` (None content is admissible at every tier).
|
|
93
|
+
*/
|
|
94
|
+
export function sensitivityPermits(upper, candidate) {
|
|
95
|
+
return rankSensitivity(candidate) <= rankSensitivity(upper);
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=sensitivity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sensitivity.js","sourceRoot":"","sources":["../src/sensitivity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AASH;;;;;;;;;;;GAWG;AACH,MAAM,gBAAgB,GAA+C,MAAM,CAAC,MAAM,CAAC;IACjF,IAAI,EAAE,CAAC;IACP,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,CAAC;IACZ,MAAM,EAAE,CAAC;CACV,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAuB;IACrD,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,CAAmB,EAAE,CAAmB;IACrE,OAAO,eAAe,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAuB,EAAE,SAA2B;IACrF,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC"}
|
package/dist/skills.d.ts
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill manifest + envelope types — motebit/skills@1.0.
|
|
3
|
+
*
|
|
4
|
+
* Permissive floor (Apache-2.0): these types define the interoperable wire
|
|
5
|
+
* format for a motebit skill — agentskills.io-compatible frontmatter with
|
|
6
|
+
* motebit-namespaced extensions for cryptographic provenance, sensitivity-
|
|
7
|
+
* tiered loading, and hardware-attestation gating. See spec/skills-v1.md.
|
|
8
|
+
*
|
|
9
|
+
* The parsed frontmatter object (`SkillManifest`) is the wire artifact; the
|
|
10
|
+
* YAML in `SKILL.md` is the on-disk encoding only. JSON-over-wire and the
|
|
11
|
+
* `skill-envelope.json` wrapper both serialize to the types declared here.
|
|
12
|
+
*
|
|
13
|
+
* Audience-distinct from credentials (peer-issued reputation/trust attestations,
|
|
14
|
+
* spec/credential-v1.md) and execution receipts (per-invocation audit,
|
|
15
|
+
* spec/execution-ledger-v1.md). Phase 3 of skills-v1 will emit
|
|
16
|
+
* `SkillLoadReceipt` entries into the execution ledger; that schema lives in
|
|
17
|
+
* the ledger module, not here.
|
|
18
|
+
*
|
|
19
|
+
* Layer purity (per packages/protocol/CLAUDE.md): types only. Canonicalization
|
|
20
|
+
* and signature verification live in @motebit/crypto. Frontmatter parsing,
|
|
21
|
+
* registry, selector, and trust gate live in the BSL @motebit/skills package.
|
|
22
|
+
*/
|
|
23
|
+
import type { SuiteId } from "./crypto-suite.js";
|
|
24
|
+
/**
|
|
25
|
+
* Sensitivity tier of the data a skill's procedure causes the agent to touch.
|
|
26
|
+
*
|
|
27
|
+
* Sensitivity describes data, not provenance — see spec/skills-v1.md §4.
|
|
28
|
+
* `medical`, `financial`, and `secret` skills are NEVER auto-loaded by the
|
|
29
|
+
* `SkillSelector` regardless of session tier; they require explicit per-turn
|
|
30
|
+
* opt-in or operator-mode session promotion.
|
|
31
|
+
*/
|
|
32
|
+
export type SkillSensitivity = "none" | "personal" | "medical" | "financial" | "secret";
|
|
33
|
+
/** Frozen list of sensitivity tiers in increasing-restriction order. */
|
|
34
|
+
export declare const SKILL_SENSITIVITY_TIERS: readonly SkillSensitivity[];
|
|
35
|
+
/** Tiers that are auto-loadable when session tier permits. */
|
|
36
|
+
export declare const SKILL_AUTO_LOADABLE_TIERS: readonly SkillSensitivity[];
|
|
37
|
+
/** OS gate per agentskills.io `platforms` field. Empty/omitted = all platforms. */
|
|
38
|
+
export type SkillPlatform = "macos" | "linux" | "windows" | "ios" | "android";
|
|
39
|
+
/** Frozen list of recognized platform identifiers. */
|
|
40
|
+
export declare const SKILL_PLATFORMS: readonly SkillPlatform[];
|
|
41
|
+
/**
|
|
42
|
+
* Hardware-attestation gate for skill loading.
|
|
43
|
+
*
|
|
44
|
+
* Additive scoring per docs/doctrine/hardware-attestation.md — never a hard
|
|
45
|
+
* wall on the agent's own identity, but a skill MAY require its loading
|
|
46
|
+
* runtime to present a minimum HA score. Sibling pattern to the
|
|
47
|
+
* HardwareAttestationSemiring used in routing.
|
|
48
|
+
*/
|
|
49
|
+
export interface SkillHardwareAttestationGate {
|
|
50
|
+
/** If `true`, loading agent must present an HA credential. Default `false`. */
|
|
51
|
+
required?: boolean;
|
|
52
|
+
/** Minimum score in `[0, 1]` required for load. Default `0`. */
|
|
53
|
+
minimum_score?: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Cryptographic provenance for a skill — sibling shape to other motebit
|
|
57
|
+
* signed artifacts (settlement anchor, migration, execution receipts, etc.).
|
|
58
|
+
*
|
|
59
|
+
* The signature value is over the canonical form defined in
|
|
60
|
+
* spec/skills-v1.md §5.1: `JCS(manifest_without_value) || 0x0A || lf_body`.
|
|
61
|
+
* v1 uses `motebit-jcs-ed25519-b64-v1` — same suite as execution receipts and
|
|
62
|
+
* other motebit-internal signed artifacts. Skills are NOT W3C `eddsa-jcs-2022`
|
|
63
|
+
* DataIntegrityProof artifacts; that suite is reserved for credentials,
|
|
64
|
+
* identity files, and presentations that need third-party W3C interop. Skills
|
|
65
|
+
* install and verify locally on motebit runtimes, so they use the simpler
|
|
66
|
+
* concat-bytes recipe consistent with the rest of the internal artifact
|
|
67
|
+
* surface. Future suites (incl. PQ) are registry additions per
|
|
68
|
+
* `architecture_cryptosuite_agility`.
|
|
69
|
+
*/
|
|
70
|
+
export interface SkillSignature {
|
|
71
|
+
/** Cryptosuite discriminator. Verifiers reject unknown values fail-closed. */
|
|
72
|
+
suite: SuiteId;
|
|
73
|
+
/** Hex-encoded Ed25519 public key (32 bytes → 64 lowercase hex chars). */
|
|
74
|
+
public_key: string;
|
|
75
|
+
/** Base64url-encoded Ed25519 signature over the canonical bytes. */
|
|
76
|
+
value: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Free-form display metadata per agentskills.io.
|
|
80
|
+
*
|
|
81
|
+
* `author` is a presentation field — NOT cryptographically verified. The
|
|
82
|
+
* cryptographic author lives at `motebit.signature.public_key`. SDKs SHOULD
|
|
83
|
+
* lint-warn (not reject) when a `did:key`-shaped value here disagrees with
|
|
84
|
+
* the signature key. See spec/skills-v1.md §3.1.
|
|
85
|
+
*/
|
|
86
|
+
export interface SkillManifestMetadata {
|
|
87
|
+
/** Free-form display string. Examples: `"Jane Doe"`, `"@janedoe"`, `"did:key:z6Mk..."`. */
|
|
88
|
+
author?: string;
|
|
89
|
+
/** Free-form category for UI grouping. Never load-bearing. */
|
|
90
|
+
category?: string;
|
|
91
|
+
/** Free-form tags for UI filtering. */
|
|
92
|
+
tags?: string[];
|
|
93
|
+
/**
|
|
94
|
+
* Per-skill configuration values. Keys and shapes are skill-defined; the
|
|
95
|
+
* runtime injects them via `skills.config.<key>` per agentskills.io
|
|
96
|
+
* conventions.
|
|
97
|
+
*/
|
|
98
|
+
config?: Record<string, unknown>;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The motebit-namespaced extension block.
|
|
102
|
+
*
|
|
103
|
+
* Non-motebit agentskills.io runtimes ignore this entire object. Only
|
|
104
|
+
* `spec_version` is required — the rest defaults per spec/skills-v1.md §3.1
|
|
105
|
+
* (sensitivity → `"none"`, hardware_attestation → `{ required: false,
|
|
106
|
+
* minimum_score: 0 }`, signature absent → unsigned skill).
|
|
107
|
+
*/
|
|
108
|
+
export interface SkillManifestMotebit {
|
|
109
|
+
/** Spec version. v1: `"1.0"`. Gates compatibility for future bumps. */
|
|
110
|
+
spec_version: "1.0";
|
|
111
|
+
/** Sensitivity tier. Defaults to `"none"` if undeclared. */
|
|
112
|
+
sensitivity?: SkillSensitivity;
|
|
113
|
+
/** Hardware-attestation gate. Defaults to `{ required: false, minimum_score: 0 }`. */
|
|
114
|
+
hardware_attestation?: SkillHardwareAttestationGate;
|
|
115
|
+
/** Cryptographic signature. Absent = unsigned skill (NEVER auto-loaded by selector). */
|
|
116
|
+
signature?: SkillSignature;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The full parsed SKILL.md frontmatter.
|
|
120
|
+
*
|
|
121
|
+
* Wire format for skills exchanged over network or registry boundaries.
|
|
122
|
+
* Defaults for optional fields are applied by the parser (BSL
|
|
123
|
+
* @motebit/skills); the protocol type matches the literal JSON shape with
|
|
124
|
+
* optionals where the spec marks them optional.
|
|
125
|
+
*/
|
|
126
|
+
export interface SkillManifest {
|
|
127
|
+
/** Globally unique slug within an installation: `[a-z0-9-]+`. */
|
|
128
|
+
name: string;
|
|
129
|
+
/** One-line description. Read by the loader to decide skill relevance. */
|
|
130
|
+
description: string;
|
|
131
|
+
/** SemVer string. */
|
|
132
|
+
version: string;
|
|
133
|
+
/** OS gate. Empty/omitted = all platforms. */
|
|
134
|
+
platforms?: SkillPlatform[];
|
|
135
|
+
/** Free-form display metadata. */
|
|
136
|
+
metadata?: SkillManifestMetadata;
|
|
137
|
+
/** Motebit extension block. `spec_version` required; all other fields default. */
|
|
138
|
+
motebit: SkillManifestMotebit;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* One file in the skill envelope's `files` list.
|
|
142
|
+
*
|
|
143
|
+
* Each entry pins a relative path to its hex-encoded SHA-256 hash. Install
|
|
144
|
+
* verifies envelope signature first, then re-derives every file hash from the
|
|
145
|
+
* unpacked tree and asserts equality. Any mismatch aborts install with no
|
|
146
|
+
* partial state (spec/skills-v1.md §6).
|
|
147
|
+
*/
|
|
148
|
+
export interface SkillEnvelopeFile {
|
|
149
|
+
/** Path relative to the skill directory (e.g., `"scripts/run.sh"`). */
|
|
150
|
+
path: string;
|
|
151
|
+
/** Hex-encoded SHA-256 hash of the file bytes (lowercase, no `0x` prefix). */
|
|
152
|
+
hash: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Compact identity reference embedded in the envelope for indexing.
|
|
156
|
+
*/
|
|
157
|
+
export interface SkillEnvelopeSkillRef {
|
|
158
|
+
/** Skill name (matches `SkillManifest.name`). */
|
|
159
|
+
name: string;
|
|
160
|
+
/** Skill version (matches `SkillManifest.version`). */
|
|
161
|
+
version: string;
|
|
162
|
+
/**
|
|
163
|
+
* Hex-encoded SHA-256 over `JCS(manifest) || 0x0A || lf_body`. Sibling to
|
|
164
|
+
* the `body_hash` field but covers the manifest as well — installers use
|
|
165
|
+
* this as the content-addressed identifier for the skill version.
|
|
166
|
+
*/
|
|
167
|
+
content_hash: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Content-addressed signed wrapper for skill distribution and install.
|
|
171
|
+
*
|
|
172
|
+
* The envelope's `signature.value` is computed over JCS-canonicalized
|
|
173
|
+
* envelope bytes with `signature.value` removed (sibling to the manifest
|
|
174
|
+
* scheme in §5.1). Installers verify the envelope signature, then re-derive
|
|
175
|
+
* `body_hash` and every `files[].hash` from the unpacked tree.
|
|
176
|
+
*/
|
|
177
|
+
export interface SkillEnvelope {
|
|
178
|
+
/** Spec version. v1: `"1.0"`. */
|
|
179
|
+
spec_version: "1.0";
|
|
180
|
+
/** Compact skill reference for indexing. */
|
|
181
|
+
skill: SkillEnvelopeSkillRef;
|
|
182
|
+
/** Full parsed manifest (the same object that is the source of truth in SKILL.md). */
|
|
183
|
+
manifest: SkillManifest;
|
|
184
|
+
/** Hex-encoded SHA-256 of the LF-normalized body bytes. */
|
|
185
|
+
body_hash: string;
|
|
186
|
+
/** Pinned hashes of every file in the skill directory beyond SKILL.md and skill-envelope.json. */
|
|
187
|
+
files: SkillEnvelopeFile[];
|
|
188
|
+
/** Envelope signature — same suite as the manifest signature. */
|
|
189
|
+
signature: SkillSignature;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Per-skill audit payload emitted by the runtime when the `SkillSelector`
|
|
193
|
+
* pulls a skill body into the agent's system context. One event per
|
|
194
|
+
* selected skill per turn, written to the agent's execution ledger as
|
|
195
|
+
* `EventType.SkillLoaded` (spec/skills-v1.md §7.4).
|
|
196
|
+
*
|
|
197
|
+
* The audit trail lets a user prove later: "the obsidian skill ran on
|
|
198
|
+
* date X with this exact signature value at session sensitivity Y." The
|
|
199
|
+
* `skill_signature` field is the envelope's `signature.value` — a
|
|
200
|
+
* content-addressed pointer to the exact bytes injected, recoverable by
|
|
201
|
+
* looking up the installed skill at `~/.motebit/skills/<name>/`.
|
|
202
|
+
*
|
|
203
|
+
* Wire-level event-envelope (timestamp, event_id, motebit_id) lives at
|
|
204
|
+
* `EventLogEntry`; the per-skill detail is here.
|
|
205
|
+
*/
|
|
206
|
+
export interface SkillLoadPayload {
|
|
207
|
+
/** Composite identifier `"name@version"` — convenient for log queries. */
|
|
208
|
+
skill_id: string;
|
|
209
|
+
/** Skill slug (matches `SkillManifest.name`). */
|
|
210
|
+
skill_name: string;
|
|
211
|
+
/** Skill SemVer (matches `SkillManifest.version`). */
|
|
212
|
+
skill_version: string;
|
|
213
|
+
/**
|
|
214
|
+
* Base64url-encoded envelope signature value. Pins the audit entry to
|
|
215
|
+
* the exact bytes that were on disk at load time — re-signing the skill
|
|
216
|
+
* (e.g., via `pnpm --filter @motebit/skills build-reference-skill`)
|
|
217
|
+
* produces a different value, so a stale ledger entry whose signature
|
|
218
|
+
* doesn't resolve in the current registry is itself a useful audit
|
|
219
|
+
* signal. Empty string when the manifest is `trusted_unsigned` (operator-
|
|
220
|
+
* attested but no cryptographic signature exists to record).
|
|
221
|
+
*/
|
|
222
|
+
skill_signature: string;
|
|
223
|
+
/** Provenance status at load time. Display-grade copy of `SkillProvenanceStatus`. */
|
|
224
|
+
provenance: "verified" | "trusted_unsigned";
|
|
225
|
+
/** BM25 relevance score against the user's turn. Higher = more relevant. */
|
|
226
|
+
score: number;
|
|
227
|
+
/**
|
|
228
|
+
* Run identifier the load is keyed to. Matches the `runId` passed to
|
|
229
|
+
* `runtime.sendMessage` / `sendMessageStreaming` — pairs every skill
|
|
230
|
+
* load with the turn that triggered it. Optional because the runtime
|
|
231
|
+
* may emit loads outside an explicit run context (e.g., proactive
|
|
232
|
+
* cycles, future).
|
|
233
|
+
*/
|
|
234
|
+
run_id?: string;
|
|
235
|
+
/** Session sensitivity tier in effect when the skill loaded. */
|
|
236
|
+
session_sensitivity: SkillSensitivity;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* One row in the relay-hosted skills registry. Returned in `discover`
|
|
240
|
+
* listings; one entry per submitted skill version.
|
|
241
|
+
*
|
|
242
|
+
* The display fields (`description`, `sensitivity`, `platforms`,
|
|
243
|
+
* `category`, `tags`, `author`) are denormalized from the embedded
|
|
244
|
+
* manifest so the discover query does not need to round-trip the full
|
|
245
|
+
* bundle for each row.
|
|
246
|
+
*
|
|
247
|
+
* `submitter_motebit_id` is canonical: derived from `envelope.signature.public_key`
|
|
248
|
+
* by the relay, never user-provided. Submitter spoofing is impossible.
|
|
249
|
+
*/
|
|
250
|
+
export interface SkillRegistryEntry {
|
|
251
|
+
/** `did:key` derived from `envelope.signature.public_key`. */
|
|
252
|
+
submitter_motebit_id: string;
|
|
253
|
+
/** Slug. Matches `manifest.name`. */
|
|
254
|
+
name: string;
|
|
255
|
+
/** SemVer. Matches `manifest.version`. */
|
|
256
|
+
version: string;
|
|
257
|
+
/** 64 hex chars; SHA-256 over `JCS(manifest) || 0x0A || lf_body`. */
|
|
258
|
+
content_hash: string;
|
|
259
|
+
description: string;
|
|
260
|
+
sensitivity: SkillSensitivity;
|
|
261
|
+
platforms?: SkillPlatform[];
|
|
262
|
+
category?: string;
|
|
263
|
+
tags?: string[];
|
|
264
|
+
author?: string;
|
|
265
|
+
/** 64 hex chars; mirrors `envelope.signature.public_key`. */
|
|
266
|
+
signature_public_key: string;
|
|
267
|
+
/** True iff the submitter is in the relay's featured-submitters allowlist. */
|
|
268
|
+
featured: boolean;
|
|
269
|
+
/** Unix ms. */
|
|
270
|
+
submitted_at: number;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Body of `POST /api/v1/skills/submit`. Carries the full signed
|
|
274
|
+
* envelope plus body and aux files as base64 strings. The relay
|
|
275
|
+
* re-derives `body_hash` and per-file hashes and asserts they match
|
|
276
|
+
* the envelope before persisting.
|
|
277
|
+
*
|
|
278
|
+
* The submitter is NOT named in this payload — the relay computes it
|
|
279
|
+
* canonically from `envelope.signature.public_key`.
|
|
280
|
+
*/
|
|
281
|
+
export interface SkillRegistrySubmitRequest {
|
|
282
|
+
envelope: SkillEnvelope;
|
|
283
|
+
/** Base64-encoded LF-normalized SKILL.md body bytes. */
|
|
284
|
+
body: string;
|
|
285
|
+
/** Base64-encoded auxiliary file bytes. Keys are the same paths as `envelope.files[].path`. */
|
|
286
|
+
files?: Record<string, string>;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Response body of `POST /api/v1/skills/submit` on success. Returns
|
|
290
|
+
* the canonical addressing tuple plus the relay-computed
|
|
291
|
+
* `submitter_motebit_id` so the caller can confirm the relay derived
|
|
292
|
+
* the same `did:key` it expected.
|
|
293
|
+
*/
|
|
294
|
+
export interface SkillRegistrySubmitResponse {
|
|
295
|
+
/** `<submitter_motebit_id>/<name>@<version>`. */
|
|
296
|
+
skill_id: string;
|
|
297
|
+
submitter_motebit_id: string;
|
|
298
|
+
name: string;
|
|
299
|
+
version: string;
|
|
300
|
+
content_hash: string;
|
|
301
|
+
submitted_at: number;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Response body of `GET /api/v1/skills/discover`. A paginated page of
|
|
305
|
+
* `SkillRegistryEntry` rows plus pagination metadata.
|
|
306
|
+
*/
|
|
307
|
+
export interface SkillRegistryListing {
|
|
308
|
+
entries: SkillRegistryEntry[];
|
|
309
|
+
/** Total rows matching the filter — not just this page. */
|
|
310
|
+
total: number;
|
|
311
|
+
/** Page size used (default 50, max 200). */
|
|
312
|
+
limit: number;
|
|
313
|
+
/** Page offset used (default 0). */
|
|
314
|
+
offset: number;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Response body of `GET /api/v1/skills/:submitter/:name/:version`.
|
|
318
|
+
* Carries the full signed envelope, body, and any auxiliary files as
|
|
319
|
+
* base64 strings. Same shape as `SkillRegistrySubmitRequest` plus a
|
|
320
|
+
* `submitter_motebit_id` echo so consumers can confirm the resolved
|
|
321
|
+
* address before re-verifying.
|
|
322
|
+
*/
|
|
323
|
+
export interface SkillRegistryBundle {
|
|
324
|
+
/** Echoed from the route param; equals `publicKeyToDidKey(envelope.signature.public_key)`. */
|
|
325
|
+
submitter_motebit_id: string;
|
|
326
|
+
envelope: SkillEnvelope;
|
|
327
|
+
/** Base64-encoded LF-normalized SKILL.md body bytes. */
|
|
328
|
+
body: string;
|
|
329
|
+
/** Base64-encoded auxiliary file bytes. */
|
|
330
|
+
files?: Record<string, string>;
|
|
331
|
+
submitted_at: number;
|
|
332
|
+
featured: boolean;
|
|
333
|
+
}
|
|
334
|
+
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIjD;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAExF,wEAAwE;AACxE,eAAO,MAAM,u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AM,WAAW,oBAAoB;IACnC,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,8FAA8F;IAC9F,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,aAAa,CAAC;IACxB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
package/dist/skills.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill manifest + envelope types — motebit/skills@1.0.
|
|
3
|
+
*
|
|
4
|
+
* Permissive floor (Apache-2.0): these types define the interoperable wire
|
|
5
|
+
* format for a motebit skill — agentskills.io-compatible frontmatter with
|
|
6
|
+
* motebit-namespaced extensions for cryptographic provenance, sensitivity-
|
|
7
|
+
* tiered loading, and hardware-attestation gating. See spec/skills-v1.md.
|
|
8
|
+
*
|
|
9
|
+
* The parsed frontmatter object (`SkillManifest`) is the wire artifact; the
|
|
10
|
+
* YAML in `SKILL.md` is the on-disk encoding only. JSON-over-wire and the
|
|
11
|
+
* `skill-envelope.json` wrapper both serialize to the types declared here.
|
|
12
|
+
*
|
|
13
|
+
* Audience-distinct from credentials (peer-issued reputation/trust attestations,
|
|
14
|
+
* spec/credential-v1.md) and execution receipts (per-invocation audit,
|
|
15
|
+
* spec/execution-ledger-v1.md). Phase 3 of skills-v1 will emit
|
|
16
|
+
* `SkillLoadReceipt` entries into the execution ledger; that schema lives in
|
|
17
|
+
* the ledger module, not here.
|
|
18
|
+
*
|
|
19
|
+
* Layer purity (per packages/protocol/CLAUDE.md): types only. Canonicalization
|
|
20
|
+
* and signature verification live in @motebit/crypto. Frontmatter parsing,
|
|
21
|
+
* registry, selector, and trust gate live in the BSL @motebit/skills package.
|
|
22
|
+
*/
|
|
23
|
+
/** Frozen list of sensitivity tiers in increasing-restriction order. */
|
|
24
|
+
export const SKILL_SENSITIVITY_TIERS = Object.freeze([
|
|
25
|
+
"none",
|
|
26
|
+
"personal",
|
|
27
|
+
"medical",
|
|
28
|
+
"financial",
|
|
29
|
+
"secret",
|
|
30
|
+
]);
|
|
31
|
+
/** Tiers that are auto-loadable when session tier permits. */
|
|
32
|
+
export const SKILL_AUTO_LOADABLE_TIERS = Object.freeze([
|
|
33
|
+
"none",
|
|
34
|
+
"personal",
|
|
35
|
+
]);
|
|
36
|
+
/** Frozen list of recognized platform identifiers. */
|
|
37
|
+
export const SKILL_PLATFORMS = Object.freeze([
|
|
38
|
+
"macos",
|
|
39
|
+
"linux",
|
|
40
|
+
"windows",
|
|
41
|
+
"ios",
|
|
42
|
+
"android",
|
|
43
|
+
]);
|
|
44
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAgBH,wEAAwE;AACxE,MAAM,CAAC,MAAM,uBAAuB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAChF,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;IACX,QAAQ;CACT,CAAC,CAAC;AAEH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAClF,MAAM;IACN,UAAU;CACX,CAAC,CAAC;AAOH,sDAAsD;AACtD,MAAM,CAAC,MAAM,eAAe,GAA6B,MAAM,CAAC,MAAM,CAAC;IACrE,OAAO;IACP,OAAO;IACP,SAAS;IACT,KAAK;IACL,SAAS;CACV,CAAC,CAAC"}
|