@skillerr/protocol 0.6.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/LICENSE +21 -0
- package/README.md +36 -0
- package/dist/authoring.d.ts +14 -0
- package/dist/authoring.js +260 -0
- package/dist/contract.d.ts +190 -0
- package/dist/contract.js +1 -0
- package/dist/extract.d.ts +89 -0
- package/dist/extract.js +299 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +6 -0
- package/dist/recipe.d.ts +75 -0
- package/dist/recipe.js +74 -0
- package/dist/source.d.ts +138 -0
- package/dist/source.js +69 -0
- package/dist/types.d.ts +555 -0
- package/dist/types.js +19 -0
- package/package.json +55 -0
- package/skill-contract.schema.json +105 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
/** Open .skill Protocol v0.5 — semantic types for portable `.skill` packages. */
|
|
2
|
+
import type { ContractBranch, ContractHumanDecision, InputApproval, ContractPrecondition, ContractTrigger, ExplicitDeclaration, RecoveryEdge, SkillContract, VerificationAssertion } from "./contract.js";
|
|
3
|
+
export declare const PROTOCOL_VERSION = "0.5.0";
|
|
4
|
+
export declare const CONTAINER_VERSION = "1.0";
|
|
5
|
+
export declare const WORKFLOW_DIALECT_VERSION = "1.1";
|
|
6
|
+
/** Media type for a packaged `.skill` archive (zip). */
|
|
7
|
+
export declare const MEDIA_TYPE = "application/vnd.dot-skill+zip";
|
|
8
|
+
/** Media type for the manifest JSON document inside a `.skill` archive. */
|
|
9
|
+
export declare const MANIFEST_MEDIA_TYPE = "application/vnd.dot-skill-manifest+json";
|
|
10
|
+
/**
|
|
11
|
+
* Compile profiles:
|
|
12
|
+
* - continuity: partial OK — portable AI work context / handoff (draft)
|
|
13
|
+
* - release: full requirements or refuse — reusable sealed skill
|
|
14
|
+
*/
|
|
15
|
+
export type SkillCompileProfile = "continuity" | "release";
|
|
16
|
+
/** Package sharing intent — secrets never embedded either way. */
|
|
17
|
+
export type PackageSensitivity = "private" | "shareable_redacted" | "public";
|
|
18
|
+
export type ProvenanceMode = "full" | "redacted" | "proof_only";
|
|
19
|
+
export type MintStatus = "draft" | "minted";
|
|
20
|
+
export type PermanenceAnchorKind = "registry" | "transparency_log" | "ledger" | "content_addressed_store" | "other";
|
|
21
|
+
export type TrustProfile = "open" | "minted" | "anchored" | `issuer:${string}`;
|
|
22
|
+
/**
|
|
23
|
+
* Human-readable trust decision for TrustView / inspect --trust.
|
|
24
|
+
* - untrusted: unsigned, open, or failed verification
|
|
25
|
+
* - development: public-dev HMAC verified structurally — never production trust
|
|
26
|
+
* - self_reported: signed, but host/model claims are env/self-asserted (not issuer-verified)
|
|
27
|
+
* - verified_issuer: configured non-public issuer key bound the sealed claims
|
|
28
|
+
*/
|
|
29
|
+
export type TrustState = "untrusted" | "development" | "self_reported" | "verified_issuer";
|
|
30
|
+
/** How the host/model claim was bound into the seal. */
|
|
31
|
+
export type HostClaimBinding = "self_reported" | "verified_issuer";
|
|
32
|
+
/**
|
|
33
|
+
* Class of mint issuer key material.
|
|
34
|
+
* public_dev_hmac MUST NOT be treated as production trust.
|
|
35
|
+
*/
|
|
36
|
+
export type IssuerClass = "public_dev_hmac" | "configured_hmac" | "verified_issuer";
|
|
37
|
+
export type InputSource = "human" | "environment" | "secret" | "artifact" | "derived";
|
|
38
|
+
export type SensitivityLevel = "public" | "private" | "secret";
|
|
39
|
+
export type AskWhen = "always" | "if_missing" | "never";
|
|
40
|
+
export type SideEffectClass = "none" | "read" | "write" | "network" | "exec" | "destructive";
|
|
41
|
+
export type CapabilityFallback = "fail" | "ask_human" | "skip_if_optional";
|
|
42
|
+
export type KnowledgeItemType = "rule" | "principle" | "decision" | "tradeoff" | "correction" | "lesson" | "constraint" | "reference";
|
|
43
|
+
export type SteeringEffect = "invariant" | "forbidden" | "decision_rule" | "approval_gate";
|
|
44
|
+
export type WorkflowStepKind = "instruct" | "prompt" | "tool" | "transform" | "branch" | "iterate" | "delegate" | "checkpoint" | "human_decision" | "verify" | "emit" | "subskill";
|
|
45
|
+
export type SkillRunStatus = "pending" | "running" | "paused" | "succeeded" | "failed" | "cancelled";
|
|
46
|
+
export type RuntimeMode = "inspect" | "explain" | "dry_run" | "execute" | "resume";
|
|
47
|
+
/** Parts the compiler checks before producing a package. */
|
|
48
|
+
export type CompletenessPart = "agent_context" | "intent" | "sections" | "workflow" | "knowledge_or_prompts" | "inputs_declared" | "journey" | "generation_usage" | "human_approvals" | "semantic_contract" | "triggers" | "inputs" | "preconditions" | "steps" | "branches" | "human_decisions" | "capabilities" | "permissions" | "forbidden_actions" | "outputs" | "recovery" | "verification" | "corrections" | "provenance";
|
|
49
|
+
export interface GenerationUsage {
|
|
50
|
+
input_tokens?: number;
|
|
51
|
+
output_tokens?: number;
|
|
52
|
+
total_tokens?: number;
|
|
53
|
+
reported_by: "agent" | "host" | "estimated";
|
|
54
|
+
captured_at: string;
|
|
55
|
+
host?: string;
|
|
56
|
+
model?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Generalized human+AI journey — never raw chat / CoT / secrets. */
|
|
59
|
+
export interface JourneyProvenance {
|
|
60
|
+
summary: string;
|
|
61
|
+
open_questions?: string[];
|
|
62
|
+
decisions?: string[];
|
|
63
|
+
redacted: boolean;
|
|
64
|
+
sensitivity: PackageSensitivity;
|
|
65
|
+
}
|
|
66
|
+
export interface CompletenessReport {
|
|
67
|
+
kind: "completeness_report";
|
|
68
|
+
profile: SkillCompileProfile;
|
|
69
|
+
complete: boolean;
|
|
70
|
+
present: CompletenessPart[];
|
|
71
|
+
missing: CompletenessPart[];
|
|
72
|
+
hints: string[];
|
|
73
|
+
}
|
|
74
|
+
/** JSON Schema subset stored as a plain object. */
|
|
75
|
+
export type JsonSchema = Record<string, unknown>;
|
|
76
|
+
export interface ContentDigest {
|
|
77
|
+
path: string;
|
|
78
|
+
digest: string;
|
|
79
|
+
media_type?: string;
|
|
80
|
+
bytes?: number;
|
|
81
|
+
}
|
|
82
|
+
export interface ProvenanceRef {
|
|
83
|
+
kind: "section" | "source" | "steering" | "author" | "legacy_skill" | "ingredient" | "recipe";
|
|
84
|
+
id: string;
|
|
85
|
+
revision?: number;
|
|
86
|
+
hash?: string;
|
|
87
|
+
note?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface InputSlot {
|
|
90
|
+
name: string;
|
|
91
|
+
schema: JsonSchema;
|
|
92
|
+
description: string;
|
|
93
|
+
source: InputSource;
|
|
94
|
+
required: boolean;
|
|
95
|
+
default?: unknown;
|
|
96
|
+
sensitivity: SensitivityLevel;
|
|
97
|
+
ask_when: AskWhen;
|
|
98
|
+
approval?: InputApproval;
|
|
99
|
+
examples?: unknown[];
|
|
100
|
+
provenance?: ProvenanceRef[];
|
|
101
|
+
generalization_reason?: string;
|
|
102
|
+
approved?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface OutputContract {
|
|
105
|
+
name: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
schema: JsonSchema;
|
|
108
|
+
required: boolean;
|
|
109
|
+
media_type?: string;
|
|
110
|
+
assert?: string[];
|
|
111
|
+
}
|
|
112
|
+
export interface CapabilityAdapterHint {
|
|
113
|
+
kind: "mcp" | "a2a" | "host" | "http";
|
|
114
|
+
name?: string;
|
|
115
|
+
uri?: string;
|
|
116
|
+
tool?: string;
|
|
117
|
+
meta?: Record<string, unknown>;
|
|
118
|
+
}
|
|
119
|
+
export interface CapabilityRequirement {
|
|
120
|
+
name: string;
|
|
121
|
+
description: string;
|
|
122
|
+
input_schema?: JsonSchema;
|
|
123
|
+
output_schema?: JsonSchema;
|
|
124
|
+
side_effect_class: SideEffectClass;
|
|
125
|
+
adapters?: CapabilityAdapterHint[];
|
|
126
|
+
fallback: CapabilityFallback;
|
|
127
|
+
required: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface SkillPermission {
|
|
130
|
+
side_effect_class: SideEffectClass;
|
|
131
|
+
description: string;
|
|
132
|
+
paths?: string[];
|
|
133
|
+
hosts?: string[];
|
|
134
|
+
requires_consent: boolean;
|
|
135
|
+
}
|
|
136
|
+
export interface SkillPolicy {
|
|
137
|
+
require_signatures: boolean;
|
|
138
|
+
require_minted?: boolean;
|
|
139
|
+
require_anchor?: boolean;
|
|
140
|
+
max_runtime_ms: number;
|
|
141
|
+
max_tool_calls: number;
|
|
142
|
+
allow_network: boolean;
|
|
143
|
+
filesystem_roots?: string[];
|
|
144
|
+
consent_for: SideEffectClass[];
|
|
145
|
+
fail_on_unsupported_step: boolean;
|
|
146
|
+
trust_profile?: TrustProfile;
|
|
147
|
+
}
|
|
148
|
+
export interface SkillDependency {
|
|
149
|
+
skill_id: string;
|
|
150
|
+
version: string;
|
|
151
|
+
package_digest?: string;
|
|
152
|
+
}
|
|
153
|
+
export interface MintRecord {
|
|
154
|
+
mint_status: MintStatus;
|
|
155
|
+
minted_at?: string;
|
|
156
|
+
mint_issuer?: string;
|
|
157
|
+
content_id?: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Claims bound by the creation seal (identity + safety + content digests).
|
|
161
|
+
* Digest of this object is `sealed_manifest_digest`.
|
|
162
|
+
*/
|
|
163
|
+
export interface SealedManifestClaims {
|
|
164
|
+
id: string;
|
|
165
|
+
version: string;
|
|
166
|
+
title: string;
|
|
167
|
+
intent?: string;
|
|
168
|
+
description: string;
|
|
169
|
+
package_digest: string;
|
|
170
|
+
permissions: Array<{
|
|
171
|
+
side_effect_class: SideEffectClass;
|
|
172
|
+
description: string;
|
|
173
|
+
paths?: string[];
|
|
174
|
+
hosts?: string[];
|
|
175
|
+
requires_consent: boolean;
|
|
176
|
+
}>;
|
|
177
|
+
policy: {
|
|
178
|
+
require_signatures: boolean;
|
|
179
|
+
require_minted?: boolean;
|
|
180
|
+
require_anchor?: boolean;
|
|
181
|
+
allow_network: boolean;
|
|
182
|
+
filesystem_roots?: string[];
|
|
183
|
+
consent_for: SideEffectClass[];
|
|
184
|
+
trust_profile?: TrustProfile;
|
|
185
|
+
max_tool_calls: number;
|
|
186
|
+
max_runtime_ms: number;
|
|
187
|
+
fail_on_unsupported_step: boolean;
|
|
188
|
+
};
|
|
189
|
+
capabilities: Array<{
|
|
190
|
+
name: string;
|
|
191
|
+
side_effect_class: SideEffectClass;
|
|
192
|
+
required: boolean;
|
|
193
|
+
}>;
|
|
194
|
+
inputs: Array<{
|
|
195
|
+
name: string;
|
|
196
|
+
sensitivity: SensitivityLevel;
|
|
197
|
+
required: boolean;
|
|
198
|
+
source: InputSource;
|
|
199
|
+
}>;
|
|
200
|
+
content: ContentDigest[];
|
|
201
|
+
contract?: {
|
|
202
|
+
title: string;
|
|
203
|
+
intent: string;
|
|
204
|
+
skill_kind: string;
|
|
205
|
+
sensitivity: string;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
export interface CreationAttestation {
|
|
209
|
+
kind: "creation_attestation";
|
|
210
|
+
package_digest: string;
|
|
211
|
+
/** Digest over identity + permissions/policy/capabilities + content index. */
|
|
212
|
+
sealed_manifest_digest: string;
|
|
213
|
+
skill_id: string;
|
|
214
|
+
skill_version: string;
|
|
215
|
+
minted_at: string;
|
|
216
|
+
agent: {
|
|
217
|
+
runtime: string;
|
|
218
|
+
version: string;
|
|
219
|
+
key_id?: string;
|
|
220
|
+
};
|
|
221
|
+
host: string;
|
|
222
|
+
provider?: string;
|
|
223
|
+
model?: string;
|
|
224
|
+
deployment?: "local" | "hosted" | "hybrid" | "unknown";
|
|
225
|
+
endpoint?: string;
|
|
226
|
+
/** Whether host/model claims are self-asserted or issuer-verified. */
|
|
227
|
+
host_claim_binding: HostClaimBinding;
|
|
228
|
+
/** Issuer key class — public_dev_hmac is never production trust. */
|
|
229
|
+
issuer_class: IssuerClass;
|
|
230
|
+
/** Agent-runtime markers observed at mint (inspectable; still spoofable locally). */
|
|
231
|
+
agent_runtime_markers?: string[];
|
|
232
|
+
journey: {
|
|
233
|
+
/** @deprecated Prefer source_id — Skillerr recipe id when adapted. */
|
|
234
|
+
recipe_id?: string;
|
|
235
|
+
recipe_hash?: string;
|
|
236
|
+
source_id?: string;
|
|
237
|
+
source_hash?: string;
|
|
238
|
+
proof_digest?: string;
|
|
239
|
+
summary?: string;
|
|
240
|
+
};
|
|
241
|
+
generation_usage?: GenerationUsage;
|
|
242
|
+
human_approvals: {
|
|
243
|
+
inputs: string[];
|
|
244
|
+
permissions: string[];
|
|
245
|
+
actors: string[];
|
|
246
|
+
};
|
|
247
|
+
policy_profile?: TrustProfile;
|
|
248
|
+
}
|
|
249
|
+
/** Seal / trust summary readable without compile or model body ingest. */
|
|
250
|
+
export interface TrustView {
|
|
251
|
+
trust_state: TrustState;
|
|
252
|
+
mint_status: MintStatus;
|
|
253
|
+
signed: boolean;
|
|
254
|
+
issuer?: string;
|
|
255
|
+
issuer_class?: IssuerClass;
|
|
256
|
+
host_claim_binding?: HostClaimBinding;
|
|
257
|
+
agent?: {
|
|
258
|
+
host?: string;
|
|
259
|
+
provider?: string;
|
|
260
|
+
model?: string;
|
|
261
|
+
runtime?: string;
|
|
262
|
+
version?: string;
|
|
263
|
+
key_id?: string;
|
|
264
|
+
deployment?: string;
|
|
265
|
+
markers?: string[];
|
|
266
|
+
};
|
|
267
|
+
package_digest: string;
|
|
268
|
+
sealed_manifest_digest?: string;
|
|
269
|
+
attestation_digest?: string;
|
|
270
|
+
label: string;
|
|
271
|
+
warnings: string[];
|
|
272
|
+
issues: Array<{
|
|
273
|
+
severity: "error" | "warning";
|
|
274
|
+
code: string;
|
|
275
|
+
message: string;
|
|
276
|
+
}>;
|
|
277
|
+
}
|
|
278
|
+
export interface PermanenceAnchor {
|
|
279
|
+
kind: PermanenceAnchorKind;
|
|
280
|
+
package_digest: string;
|
|
281
|
+
located_at: string;
|
|
282
|
+
anchored_at: string;
|
|
283
|
+
issuer: string;
|
|
284
|
+
receipt?: unknown;
|
|
285
|
+
extensions?: Record<string, unknown>;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Manifest of a `.skill` package.
|
|
289
|
+
* Wire `kind` is `"dot-skill"`; the artifact extension is `.skill`.
|
|
290
|
+
*/
|
|
291
|
+
export interface SkillManifest {
|
|
292
|
+
kind: "dot-skill";
|
|
293
|
+
id: string;
|
|
294
|
+
version: string;
|
|
295
|
+
title: string;
|
|
296
|
+
description: string;
|
|
297
|
+
intent?: string;
|
|
298
|
+
/** Authoritative 0.5 semantic contract. Absent only on legacy/draft adapters. */
|
|
299
|
+
contract?: SkillContract;
|
|
300
|
+
triggers?: ContractTrigger[];
|
|
301
|
+
preconditions?: ExplicitDeclaration<ContractPrecondition>;
|
|
302
|
+
branches?: ExplicitDeclaration<ContractBranch>;
|
|
303
|
+
human_decisions?: ExplicitDeclaration<ContractHumanDecision>;
|
|
304
|
+
forbidden_actions?: SkillContract["forbidden_actions"];
|
|
305
|
+
recovery?: ExplicitDeclaration<RecoveryEdge>;
|
|
306
|
+
verification?: ExplicitDeclaration<VerificationAssertion>;
|
|
307
|
+
corrections?: SkillContract["corrections"];
|
|
308
|
+
authors?: Array<{
|
|
309
|
+
id: string;
|
|
310
|
+
display_name?: string;
|
|
311
|
+
}>;
|
|
312
|
+
license?: string;
|
|
313
|
+
container_version: string;
|
|
314
|
+
protocol_version: string;
|
|
315
|
+
entrypoint: string;
|
|
316
|
+
inputs: InputSlot[];
|
|
317
|
+
outputs: OutputContract[];
|
|
318
|
+
capabilities: CapabilityRequirement[];
|
|
319
|
+
permissions: SkillPermission[];
|
|
320
|
+
policy: SkillPolicy;
|
|
321
|
+
content: ContentDigest[];
|
|
322
|
+
package_digest: string;
|
|
323
|
+
dependencies?: SkillDependency[];
|
|
324
|
+
supersedes?: string;
|
|
325
|
+
provenance_mode: ProvenanceMode;
|
|
326
|
+
/** continuity = handoff draft; release path may carry a signed attestation */
|
|
327
|
+
compile_profile?: SkillCompileProfile;
|
|
328
|
+
completeness?: CompletenessReport;
|
|
329
|
+
package_sensitivity?: PackageSensitivity;
|
|
330
|
+
mint?: MintRecord;
|
|
331
|
+
attestation_digest?: string;
|
|
332
|
+
/** Present on minted packages — binds identity/policy/content claims in the seal. */
|
|
333
|
+
sealed_manifest_digest?: string;
|
|
334
|
+
anchors?: PermanenceAnchor[];
|
|
335
|
+
legacy?: boolean;
|
|
336
|
+
needs_human_review?: boolean;
|
|
337
|
+
extensions?: Record<string, Record<string, unknown>>;
|
|
338
|
+
}
|
|
339
|
+
export interface KnowledgeItem {
|
|
340
|
+
kind: "knowledge";
|
|
341
|
+
id: string;
|
|
342
|
+
type: KnowledgeItemType;
|
|
343
|
+
title: string;
|
|
344
|
+
body: string;
|
|
345
|
+
fidelity: "exact" | "synthesize";
|
|
346
|
+
applicability?: string;
|
|
347
|
+
pinned?: boolean;
|
|
348
|
+
sensitivity?: SensitivityLevel;
|
|
349
|
+
provenance?: ProvenanceRef[];
|
|
350
|
+
}
|
|
351
|
+
export interface SteeringConstraint {
|
|
352
|
+
kind: "steering_constraint";
|
|
353
|
+
id: string;
|
|
354
|
+
verb: "affirm" | "correct" | "reject";
|
|
355
|
+
effect: SteeringEffect;
|
|
356
|
+
statement: string;
|
|
357
|
+
source_steering_id?: string;
|
|
358
|
+
targets?: string[];
|
|
359
|
+
provenance?: ProvenanceRef[];
|
|
360
|
+
}
|
|
361
|
+
export interface WorkflowStepBase {
|
|
362
|
+
id: string;
|
|
363
|
+
kind: WorkflowStepKind;
|
|
364
|
+
title?: string;
|
|
365
|
+
optional?: boolean;
|
|
366
|
+
next?: string | string[];
|
|
367
|
+
on_fail?: string;
|
|
368
|
+
provenance?: ProvenanceRef[];
|
|
369
|
+
}
|
|
370
|
+
export interface InstructStep extends WorkflowStepBase {
|
|
371
|
+
kind: "instruct";
|
|
372
|
+
text: string;
|
|
373
|
+
knowledge_refs?: string[];
|
|
374
|
+
}
|
|
375
|
+
export interface PromptStep extends WorkflowStepBase {
|
|
376
|
+
kind: "prompt";
|
|
377
|
+
template: string;
|
|
378
|
+
input_bindings?: Record<string, string>;
|
|
379
|
+
knowledge_refs?: string[];
|
|
380
|
+
}
|
|
381
|
+
export interface ToolStep extends WorkflowStepBase {
|
|
382
|
+
kind: "tool";
|
|
383
|
+
capability: string;
|
|
384
|
+
arguments?: Record<string, unknown>;
|
|
385
|
+
argument_bindings?: Record<string, string>;
|
|
386
|
+
result_as?: string;
|
|
387
|
+
}
|
|
388
|
+
export interface TransformStep extends WorkflowStepBase {
|
|
389
|
+
kind: "transform";
|
|
390
|
+
expression: string;
|
|
391
|
+
input_from?: string;
|
|
392
|
+
result_as?: string;
|
|
393
|
+
}
|
|
394
|
+
export interface BranchStep extends WorkflowStepBase {
|
|
395
|
+
kind: "branch";
|
|
396
|
+
cases: Array<{
|
|
397
|
+
when: string;
|
|
398
|
+
goto: string;
|
|
399
|
+
}>;
|
|
400
|
+
else?: string;
|
|
401
|
+
}
|
|
402
|
+
export interface IterateStep extends WorkflowStepBase {
|
|
403
|
+
kind: "iterate";
|
|
404
|
+
over: string;
|
|
405
|
+
as: string;
|
|
406
|
+
body: string;
|
|
407
|
+
}
|
|
408
|
+
export interface DelegateStep extends WorkflowStepBase {
|
|
409
|
+
kind: "delegate";
|
|
410
|
+
agent_card?: string;
|
|
411
|
+
task: string;
|
|
412
|
+
result_as?: string;
|
|
413
|
+
}
|
|
414
|
+
export interface CheckpointStep extends WorkflowStepBase {
|
|
415
|
+
kind: "checkpoint";
|
|
416
|
+
message?: string;
|
|
417
|
+
require_human?: boolean;
|
|
418
|
+
}
|
|
419
|
+
export interface HumanDecisionStep extends WorkflowStepBase {
|
|
420
|
+
kind: "human_decision";
|
|
421
|
+
prompt: string;
|
|
422
|
+
choices?: string[];
|
|
423
|
+
result_as?: string;
|
|
424
|
+
}
|
|
425
|
+
export interface VerifyStep extends WorkflowStepBase {
|
|
426
|
+
kind: "verify";
|
|
427
|
+
assertions: string[];
|
|
428
|
+
against?: string;
|
|
429
|
+
}
|
|
430
|
+
export interface EmitStep extends WorkflowStepBase {
|
|
431
|
+
kind: "emit";
|
|
432
|
+
output: string;
|
|
433
|
+
from: string;
|
|
434
|
+
}
|
|
435
|
+
export interface SubskillStep extends WorkflowStepBase {
|
|
436
|
+
kind: "subskill";
|
|
437
|
+
skill_id: string;
|
|
438
|
+
version?: string;
|
|
439
|
+
input_bindings?: Record<string, string>;
|
|
440
|
+
}
|
|
441
|
+
export type WorkflowStep = InstructStep | PromptStep | ToolStep | TransformStep | BranchStep | IterateStep | DelegateStep | CheckpointStep | HumanDecisionStep | VerifyStep | EmitStep | SubskillStep;
|
|
442
|
+
export interface Workflow {
|
|
443
|
+
kind: "workflow";
|
|
444
|
+
dialect_version: string;
|
|
445
|
+
entrypoint: string;
|
|
446
|
+
steps: WorkflowStep[];
|
|
447
|
+
constraints?: SteeringConstraint[];
|
|
448
|
+
preconditions?: ExplicitDeclaration<ContractPrecondition>;
|
|
449
|
+
branches?: ExplicitDeclaration<ContractBranch>;
|
|
450
|
+
human_decisions?: ExplicitDeclaration<ContractHumanDecision>;
|
|
451
|
+
recovery?: ExplicitDeclaration<RecoveryEdge>;
|
|
452
|
+
verification?: ExplicitDeclaration<VerificationAssertion>;
|
|
453
|
+
}
|
|
454
|
+
export interface CompilationIssue {
|
|
455
|
+
severity: "error" | "warning" | "info";
|
|
456
|
+
code: string;
|
|
457
|
+
message: string;
|
|
458
|
+
related?: string[];
|
|
459
|
+
}
|
|
460
|
+
export interface CompilationMapping {
|
|
461
|
+
from: ProvenanceRef;
|
|
462
|
+
to: {
|
|
463
|
+
kind: "knowledge" | "step" | "input" | "output" | "constraint";
|
|
464
|
+
id: string;
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
export interface CompilationReport {
|
|
468
|
+
kind: "compilation_report";
|
|
469
|
+
skill_id: string;
|
|
470
|
+
/** Protocol source id. */
|
|
471
|
+
source_id?: string;
|
|
472
|
+
/** @deprecated Skillerr adapter field — use source_id. */
|
|
473
|
+
recipe_id?: string;
|
|
474
|
+
profile: SkillCompileProfile;
|
|
475
|
+
created_at: string;
|
|
476
|
+
mappings: CompilationMapping[];
|
|
477
|
+
inferred_inputs: InputSlot[];
|
|
478
|
+
issues: CompilationIssue[];
|
|
479
|
+
pending_approvals: string[];
|
|
480
|
+
approved: boolean;
|
|
481
|
+
completeness: CompletenessReport;
|
|
482
|
+
semantic_contract: "native_0.5" | "legacy_lossy";
|
|
483
|
+
losses?: string[];
|
|
484
|
+
}
|
|
485
|
+
export interface SkillPackageFiles {
|
|
486
|
+
manifest: SkillManifest;
|
|
487
|
+
workflow: Workflow;
|
|
488
|
+
knowledge: KnowledgeItem[];
|
|
489
|
+
prompts?: Record<string, string>;
|
|
490
|
+
resources?: Record<string, Uint8Array | string>;
|
|
491
|
+
artifacts?: Record<string, Uint8Array | string>;
|
|
492
|
+
provenance?: {
|
|
493
|
+
/** Scrubbed SkillSource or product source (never secrets). */
|
|
494
|
+
source?: unknown;
|
|
495
|
+
/** @deprecated Prefer source — Skillerr recipe blob. */
|
|
496
|
+
recipe?: unknown;
|
|
497
|
+
journey?: JourneyProvenance;
|
|
498
|
+
generation_usage?: GenerationUsage;
|
|
499
|
+
proof?: unknown;
|
|
500
|
+
compilation_report?: CompilationReport;
|
|
501
|
+
};
|
|
502
|
+
signatures?: Record<string, unknown>;
|
|
503
|
+
attestation?: CreationAttestation;
|
|
504
|
+
anchors?: PermanenceAnchor[];
|
|
505
|
+
}
|
|
506
|
+
export interface SkillStepRecord {
|
|
507
|
+
step_id: string;
|
|
508
|
+
kind: WorkflowStepKind;
|
|
509
|
+
status: "pending" | "skipped" | "succeeded" | "failed" | "waiting";
|
|
510
|
+
started_at?: string;
|
|
511
|
+
finished_at?: string;
|
|
512
|
+
input_digest?: string;
|
|
513
|
+
output_digest?: string;
|
|
514
|
+
adapter?: CapabilityAdapterHint;
|
|
515
|
+
approval?: {
|
|
516
|
+
actor: string;
|
|
517
|
+
at: string;
|
|
518
|
+
decision: "allow" | "deny";
|
|
519
|
+
};
|
|
520
|
+
error?: string;
|
|
521
|
+
}
|
|
522
|
+
export interface SkillRun {
|
|
523
|
+
kind: "skill_run";
|
|
524
|
+
id: string;
|
|
525
|
+
skill_id: string;
|
|
526
|
+
skill_version: string;
|
|
527
|
+
package_digest: string;
|
|
528
|
+
status: SkillRunStatus;
|
|
529
|
+
mode: RuntimeMode;
|
|
530
|
+
resolved_inputs: Record<string, unknown>;
|
|
531
|
+
secret_refs?: Record<string, string>;
|
|
532
|
+
steps: SkillStepRecord[];
|
|
533
|
+
outputs?: Record<string, unknown>;
|
|
534
|
+
verifications: Array<{
|
|
535
|
+
assertion: string;
|
|
536
|
+
passed: boolean;
|
|
537
|
+
detail?: string;
|
|
538
|
+
}>;
|
|
539
|
+
runtime: {
|
|
540
|
+
name: string;
|
|
541
|
+
version: string;
|
|
542
|
+
host?: string;
|
|
543
|
+
model?: string;
|
|
544
|
+
};
|
|
545
|
+
checkpoints?: Array<{
|
|
546
|
+
id: string;
|
|
547
|
+
step_id: string;
|
|
548
|
+
at: string;
|
|
549
|
+
state_digest: string;
|
|
550
|
+
}>;
|
|
551
|
+
started_at: string;
|
|
552
|
+
finished_at?: string;
|
|
553
|
+
error?: string;
|
|
554
|
+
}
|
|
555
|
+
export declare const DEFAULT_SKILL_POLICY: SkillPolicy;
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Open .skill Protocol v0.5 — semantic types for portable `.skill` packages. */
|
|
2
|
+
export const PROTOCOL_VERSION = "0.5.0";
|
|
3
|
+
export const CONTAINER_VERSION = "1.0";
|
|
4
|
+
export const WORKFLOW_DIALECT_VERSION = "1.1";
|
|
5
|
+
/** Media type for a packaged `.skill` archive (zip). */
|
|
6
|
+
export const MEDIA_TYPE = "application/vnd.dot-skill+zip";
|
|
7
|
+
/** Media type for the manifest JSON document inside a `.skill` archive. */
|
|
8
|
+
export const MANIFEST_MEDIA_TYPE = "application/vnd.dot-skill-manifest+json";
|
|
9
|
+
export const DEFAULT_SKILL_POLICY = {
|
|
10
|
+
require_signatures: false,
|
|
11
|
+
require_minted: false,
|
|
12
|
+
require_anchor: false,
|
|
13
|
+
max_runtime_ms: 600_000,
|
|
14
|
+
max_tool_calls: 200,
|
|
15
|
+
allow_network: false,
|
|
16
|
+
consent_for: ["write", "network", "exec", "destructive"],
|
|
17
|
+
fail_on_unsupported_step: true,
|
|
18
|
+
trust_profile: "open",
|
|
19
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@skillerr/protocol",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Types, schemas, and completeness rules for portable .skill packages",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Bharat Dudeja",
|
|
8
|
+
"url": "https://github.com/bharatdudeja13-cmd"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"skill",
|
|
12
|
+
".skill",
|
|
13
|
+
"ai-agents",
|
|
14
|
+
"agent-skills",
|
|
15
|
+
"protocol",
|
|
16
|
+
"types"
|
|
17
|
+
],
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public",
|
|
23
|
+
"provenance": true
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/dot-skill/dot-skill.git",
|
|
28
|
+
"directory": "packages/protocol"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://skillerr.com",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/dot-skill/dot-skill/issues"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"skill-contract.schema.json",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"exports": {
|
|
41
|
+
".": {
|
|
42
|
+
"import": "./dist/index.js",
|
|
43
|
+
"types": "./dist/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./skill-contract.schema.json": "./skill-contract.schema.json"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "rm -rf dist && tsc",
|
|
49
|
+
"prepack": "npm run build",
|
|
50
|
+
"clean": "rm -rf dist"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"typescript": "^5.4.5"
|
|
54
|
+
}
|
|
55
|
+
}
|