@signet-registry/operator 0.0.0-stage → 0.1.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/LICENSE +29 -0
- package/README.md +191 -2
- package/dist/clients/api.js +251 -0
- package/dist/clients/mcp.js +118 -0
- package/dist/clients/verify.js +106 -0
- package/dist/config/env.js +42 -0
- package/dist/keyless.js +52 -0
- package/dist/main.js +7 -0
- package/dist/operator.js +1613 -0
- package/dist/transparency/sample-graph.js +203 -0
- package/dist/types.js +111 -0
- package/examples/bootstrap/agents/bootstrap-agent.md +5 -0
- package/examples/bootstrap/agents/bootstrap-ops-agent.md +8 -0
- package/examples/bootstrap/bootstrap.manifest.json +107 -0
- package/examples/bootstrap/skills/bootstrap-example.md +8 -0
- package/examples/bootstrap/skills/bootstrap-ops.md +8 -0
- package/examples/demo/agents/registry-agent.md +34 -0
- package/examples/demo/demo.manifest.json +90 -0
- package/examples/demo/skills/registry-mcp.md +74 -0
- package/examples/demo/skills/tame-llama.md +37 -0
- package/examples/signet-demo/agents/signet-demo-agent.md +39 -0
- package/examples/signet-demo/agents/signet-security-agent.md +36 -0
- package/examples/signet-demo/signet-demo.manifest.json +219 -0
- package/examples/signet-demo/skills/access-review.md +40 -0
- package/examples/signet-demo/skills/certification-workflow.md +39 -0
- package/examples/signet-demo/skills/governance-audit.md +39 -0
- package/examples/signet-demo/skills/graph-explorer.md +38 -0
- package/examples/signet-demo/skills/mcp-onboarding.md +39 -0
- package/examples/signet-demo/skills/policy-authoring.md +39 -0
- package/examples/signet-demo/skills/provenance-audit.md +39 -0
- package/examples/signet-demo/skills/registry-search.md +38 -0
- package/examples/signet-demo/skills/secrets-hygiene.md +39 -0
- package/examples/signet-demo/skills/skill-authoring.md +40 -0
- package/examples/transparency/README.md +39 -0
- package/examples/transparency/sample-graph.spec.json +16 -0
- package/package.json +58 -4
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { createHash, generateKeyPairSync, sign as signBytes } from 'node:crypto';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export const TransparencySampleGraphSpecSchema = z.object({
|
|
5
|
+
sampleSlug: z.string().min(1),
|
|
6
|
+
logId: z.string().min(1),
|
|
7
|
+
checkpointKeyRef: z.string().min(1),
|
|
8
|
+
witnessAlphaKeyRef: z.string().min(1),
|
|
9
|
+
witnessBetaKeyRef: z.string().min(1),
|
|
10
|
+
entryOneLabel: z.string().min(1),
|
|
11
|
+
entryTwoLabel: z.string().min(1),
|
|
12
|
+
entryTwoAltLabel: z.string().min(1),
|
|
13
|
+
signerName: z.string().min(1),
|
|
14
|
+
observationOccurredAt: z.string().min(1),
|
|
15
|
+
witnessAlphaObservationAt: z.string().min(1),
|
|
16
|
+
witnessBetaObservationAt: z.string().min(1),
|
|
17
|
+
gossipOccurredAt: z.string().min(1),
|
|
18
|
+
sourceCheckpointOccurredAt: z.string().min(1),
|
|
19
|
+
});
|
|
20
|
+
export function buildTransparencySampleGraphSpec(input = {}) {
|
|
21
|
+
const sampleSlug = input.sampleSlug ?? 'transparency-sample';
|
|
22
|
+
const day = input.day ?? '2026-01-03';
|
|
23
|
+
return {
|
|
24
|
+
sampleSlug,
|
|
25
|
+
logId: `sg-${sampleSlug}-log`,
|
|
26
|
+
checkpointKeyRef: `kms://registry/${sampleSlug}-checkpoint`,
|
|
27
|
+
witnessAlphaKeyRef: `kms://registry/${sampleSlug}-witness-alpha`,
|
|
28
|
+
witnessBetaKeyRef: `kms://registry/${sampleSlug}-witness-beta`,
|
|
29
|
+
entryOneLabel: `${sampleSlug}-entry-1`,
|
|
30
|
+
entryTwoLabel: `${sampleSlug}-entry-2`,
|
|
31
|
+
entryTwoAltLabel: `${sampleSlug}-entry-2-alt`,
|
|
32
|
+
signerName: `sg-${sampleSlug}-cosignature`,
|
|
33
|
+
observationOccurredAt: `${day}T00:10:00.000Z`,
|
|
34
|
+
witnessAlphaObservationAt: `${day}T00:11:00.000Z`,
|
|
35
|
+
witnessBetaObservationAt: `${day}T00:12:00.000Z`,
|
|
36
|
+
gossipOccurredAt: `${day}T00:13:00.000Z`,
|
|
37
|
+
sourceCheckpointOccurredAt: `${day}T00:00:00.000Z`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export async function readTransparencySampleGraphSpec(specPath) {
|
|
41
|
+
return TransparencySampleGraphSpecSchema.parse(JSON.parse(await readFile(specPath, 'utf8')));
|
|
42
|
+
}
|
|
43
|
+
export async function seedTransparencySampleGraph(api, apiToken, input = {}) {
|
|
44
|
+
const spec = input.spec ?? buildTransparencySampleGraphSpec(input);
|
|
45
|
+
const checkpointKey = await createTrustedKey(api, apiToken, spec.checkpointKeyRef, 'security-team');
|
|
46
|
+
const witnessAlphaKey = await createTrustedKey(api, apiToken, spec.witnessAlphaKeyRef, 'witness-ops');
|
|
47
|
+
const witnessBetaKey = await createTrustedKey(api, apiToken, spec.witnessBetaKeyRef, 'witness-ops');
|
|
48
|
+
const noteCosigner = generateKeyPairSync('ed25519').privateKey;
|
|
49
|
+
await api.createTransparencyLog({
|
|
50
|
+
log_id: spec.logId,
|
|
51
|
+
origin: spec.logId,
|
|
52
|
+
checkpoint_key_ref: spec.checkpointKeyRef,
|
|
53
|
+
log_type: 'tessera',
|
|
54
|
+
witness_quorum: 2,
|
|
55
|
+
}, apiToken);
|
|
56
|
+
for (const witness of [
|
|
57
|
+
{ witness_id: 'witness-alpha', key_ref: spec.witnessAlphaKeyRef },
|
|
58
|
+
{ witness_id: 'witness-beta', key_ref: spec.witnessBetaKeyRef },
|
|
59
|
+
]) {
|
|
60
|
+
await api.createTransparencyWitness(spec.logId, {
|
|
61
|
+
...witness,
|
|
62
|
+
witness_type: 'witness',
|
|
63
|
+
}, apiToken);
|
|
64
|
+
}
|
|
65
|
+
const leafOne = leafHash(spec.entryOneLabel);
|
|
66
|
+
const rootOne = `base64:${leafOne.toString('base64')}`;
|
|
67
|
+
const checkpointBodyOne = checkpointBody(spec.logId, 1, rootOne);
|
|
68
|
+
const checkpointSigOne = encodeSignature(checkpointBodyOne, checkpointKey);
|
|
69
|
+
const witnessSigOne = encodeSignature(checkpointBodyOne, witnessAlphaKey);
|
|
70
|
+
await api.createTransparencyCheckpoint(spec.logId, {
|
|
71
|
+
checkpoint_body: checkpointBodyOne,
|
|
72
|
+
checkpoint_signature: checkpointSigOne,
|
|
73
|
+
witness_attestations: [{ witness_id: 'witness-alpha', signature: witnessSigOne }],
|
|
74
|
+
}, apiToken);
|
|
75
|
+
const leafTwo = leafHash(spec.entryTwoLabel);
|
|
76
|
+
const rootTwoHash = nodeHash(leafOne, leafTwo);
|
|
77
|
+
const rootTwo = `base64:${rootTwoHash.toString('base64')}`;
|
|
78
|
+
const checkpointBodyTwo = checkpointBody(spec.logId, 2, rootTwo);
|
|
79
|
+
const checkpointSigTwo = encodeSignature(checkpointBodyTwo, checkpointKey);
|
|
80
|
+
const checkpointTwoNote = signedCheckpointNote(checkpointBodyTwo, [
|
|
81
|
+
{
|
|
82
|
+
signer: spec.logId,
|
|
83
|
+
detachedSignature: checkpointSigTwo,
|
|
84
|
+
keyHintBytes: [0, 0, 0, 1],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
signer: spec.signerName,
|
|
88
|
+
detachedSignature: encodeSignature(checkpointBodyTwo, noteCosigner),
|
|
89
|
+
keyHintBytes: [0, 0, 0, 2],
|
|
90
|
+
},
|
|
91
|
+
]);
|
|
92
|
+
const witnessAlphaSigTwo = encodeSignature(checkpointBodyTwo, witnessAlphaKey);
|
|
93
|
+
const witnessBetaSigTwo = encodeSignature(checkpointBodyTwo, witnessBetaKey);
|
|
94
|
+
const checkpointTwo = await api.createTransparencyCheckpoint(spec.logId, {
|
|
95
|
+
signed_note: checkpointTwoNote,
|
|
96
|
+
consistency_proof: {
|
|
97
|
+
previous_tree_size: 1,
|
|
98
|
+
previous_root_hash: rootOne,
|
|
99
|
+
proof_hashes: [rootOne, `base64:${leafTwo.toString('base64')}`],
|
|
100
|
+
},
|
|
101
|
+
witness_attestations: [
|
|
102
|
+
{ witness_id: 'witness-alpha', signature: witnessAlphaSigTwo },
|
|
103
|
+
{ witness_id: 'witness-beta', signature: witnessBetaSigTwo },
|
|
104
|
+
],
|
|
105
|
+
}, apiToken);
|
|
106
|
+
const checkpointTwoArtifactUrn = requireStringField(checkpointTwo, 'checkpoint_artifact_urn');
|
|
107
|
+
const leafTwoAlt = leafHash(spec.entryTwoAltLabel);
|
|
108
|
+
const rootTwoAlt = `base64:${nodeHash(leafOne, leafTwoAlt).toString('base64')}`;
|
|
109
|
+
const checkpointBodyTwoAlt = checkpointBody(spec.logId, 2, rootTwoAlt);
|
|
110
|
+
const checkpointSigTwoAlt = encodeSignature(checkpointBodyTwoAlt, checkpointKey);
|
|
111
|
+
const checkpointTwoAltNote = signedCheckpointNote(checkpointBodyTwoAlt, checkpointSigTwoAlt);
|
|
112
|
+
await api.createTransparencyObservation(spec.logId, {
|
|
113
|
+
signed_note: checkpointTwoAltNote,
|
|
114
|
+
observed_from_type: 'peer',
|
|
115
|
+
observed_from_id: 'observer-beta',
|
|
116
|
+
observed_at: spec.observationOccurredAt,
|
|
117
|
+
source_channel: 'https_poll',
|
|
118
|
+
observer_id: 'collector-1',
|
|
119
|
+
observer_type: 'system',
|
|
120
|
+
relay_from_type: 'distributor',
|
|
121
|
+
relay_from_id: 'mirror-a',
|
|
122
|
+
relay_hop_count: 2,
|
|
123
|
+
source_checkpoint_occurred_at: spec.sourceCheckpointOccurredAt,
|
|
124
|
+
}, apiToken);
|
|
125
|
+
await api.createTransparencyObservation(spec.logId, {
|
|
126
|
+
signed_note: checkpointTwoNote,
|
|
127
|
+
observed_from_type: 'witness',
|
|
128
|
+
observed_from_id: 'witness-alpha',
|
|
129
|
+
observed_at: spec.witnessAlphaObservationAt,
|
|
130
|
+
source_channel: 'witness_rpc',
|
|
131
|
+
observer_id: 'collector-1',
|
|
132
|
+
observer_type: 'system',
|
|
133
|
+
}, apiToken);
|
|
134
|
+
await api.createTransparencyObservation(spec.logId, {
|
|
135
|
+
signed_note: checkpointTwoAltNote,
|
|
136
|
+
observed_from_type: 'witness',
|
|
137
|
+
observed_from_id: 'witness-beta',
|
|
138
|
+
observed_at: spec.witnessBetaObservationAt,
|
|
139
|
+
source_channel: 'witness_rpc',
|
|
140
|
+
observer_id: 'collector-2',
|
|
141
|
+
observer_type: 'system',
|
|
142
|
+
}, apiToken);
|
|
143
|
+
await api.createTransparencyGossipEvent(spec.logId, {
|
|
144
|
+
from_witness_id: 'witness-alpha',
|
|
145
|
+
to_witness_id: 'witness-beta',
|
|
146
|
+
checkpoint_artifact_urn: checkpointTwoArtifactUrn,
|
|
147
|
+
occurred_at: spec.gossipOccurredAt,
|
|
148
|
+
source_channel: 'witness_rpc',
|
|
149
|
+
relayed_by_id: 'relay-gateway-1',
|
|
150
|
+
relay_hop_count: 1,
|
|
151
|
+
source_checkpoint_occurred_at: spec.sourceCheckpointOccurredAt,
|
|
152
|
+
}, apiToken);
|
|
153
|
+
return {
|
|
154
|
+
spec,
|
|
155
|
+
rootOne,
|
|
156
|
+
rootTwo,
|
|
157
|
+
checkpointTwoPayloadSha: sha256Hex(Buffer.from(checkpointTwoNote, 'utf8')),
|
|
158
|
+
checkpointTwoAltPayloadSha: sha256Hex(Buffer.from(checkpointTwoAltNote, 'utf8')),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
async function createTrustedKey(api, apiToken, keyRef, owner) {
|
|
162
|
+
const pair = generateKeyPairSync('ed25519');
|
|
163
|
+
const publicKeyPem = pair.publicKey.export({ type: 'spki', format: 'pem' }).toString();
|
|
164
|
+
await api.createTrustedPublicKey({
|
|
165
|
+
key_ref: keyRef,
|
|
166
|
+
algorithm: 'ed25519',
|
|
167
|
+
public_key_pem: publicKeyPem,
|
|
168
|
+
owner,
|
|
169
|
+
}, apiToken);
|
|
170
|
+
return pair.privateKey;
|
|
171
|
+
}
|
|
172
|
+
function requireStringField(value, key) {
|
|
173
|
+
const raw = value[key];
|
|
174
|
+
if (typeof raw !== 'string' || raw.length === 0) {
|
|
175
|
+
throw new Error(`Expected transparency sample graph response to include string field ${key}.`);
|
|
176
|
+
}
|
|
177
|
+
return raw;
|
|
178
|
+
}
|
|
179
|
+
function leafHash(payload) {
|
|
180
|
+
return createHash('sha256').update(Buffer.concat([Buffer.from([0x00]), Buffer.from(payload, 'utf8')])).digest();
|
|
181
|
+
}
|
|
182
|
+
function nodeHash(left, right) {
|
|
183
|
+
return createHash('sha256').update(Buffer.concat([Buffer.from([0x01]), Buffer.from(left), Buffer.from(right)])).digest();
|
|
184
|
+
}
|
|
185
|
+
function checkpointBody(origin, treeSize, rootHash) {
|
|
186
|
+
return `${origin}\n${treeSize}\n${rootHash}\n`;
|
|
187
|
+
}
|
|
188
|
+
function encodeSignature(body, privateKey) {
|
|
189
|
+
return `base64:${signBytes(null, Buffer.from(body, 'utf8'), privateKey).toString('base64')}`;
|
|
190
|
+
}
|
|
191
|
+
function signedCheckpointNote(body, signatures) {
|
|
192
|
+
const entries = typeof signatures === 'string' ? [{ signer: 'sg-main-log', detachedSignature: signatures }] : signatures;
|
|
193
|
+
const signatureLines = entries.map((entry, index) => {
|
|
194
|
+
const raw = Buffer.from(entry.detachedSignature.replace(/^base64:/, ''), 'base64');
|
|
195
|
+
const keyHint = Buffer.from(entry.keyHintBytes ?? [0, 0, 0, index]);
|
|
196
|
+
const withKeyHint = Buffer.concat([keyHint, raw]).toString('base64');
|
|
197
|
+
return `— ${entry.signer} ${withKeyHint}`;
|
|
198
|
+
});
|
|
199
|
+
return `${body}\n${signatureLines.join('\n')}\n`;
|
|
200
|
+
}
|
|
201
|
+
function sha256Hex(bytes) {
|
|
202
|
+
return createHash('sha256').update(bytes).digest('hex');
|
|
203
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const OpenLineageSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
job_namespace: z.string().min(1).optional(),
|
|
5
|
+
job_name: z.string().min(1).optional(),
|
|
6
|
+
run_id: z.string().min(1).optional(),
|
|
7
|
+
event_time: z.string().min(1).optional(),
|
|
8
|
+
})
|
|
9
|
+
.optional();
|
|
10
|
+
export const SkillSeedSpecSchema = z.object({
|
|
11
|
+
item_id: z.string().min(1).optional(),
|
|
12
|
+
depends_on: z.array(z.string().min(1)).optional(),
|
|
13
|
+
tags: z.array(z.string().min(1)).optional(),
|
|
14
|
+
skill_key: z.string().min(1),
|
|
15
|
+
author: z.string().min(1).optional(),
|
|
16
|
+
artifact_path: z.string().min(1),
|
|
17
|
+
artifact_media_type: z.string().min(1).default('text/markdown'),
|
|
18
|
+
display_name: z.string().min(1).optional(),
|
|
19
|
+
description: z.string().min(1).optional(),
|
|
20
|
+
source_path: z.string().min(1).optional(),
|
|
21
|
+
commit_sha: z.string().min(1).optional(),
|
|
22
|
+
git_tag: z.string().min(1).optional(),
|
|
23
|
+
artifact_signature: z.string().min(1).optional(),
|
|
24
|
+
publish_note: z.string().min(1).optional(),
|
|
25
|
+
validate_note: z.string().min(1).optional(),
|
|
26
|
+
certify: z.boolean().default(false),
|
|
27
|
+
certify_note: z.string().min(1).optional(),
|
|
28
|
+
lineage: z
|
|
29
|
+
.object({
|
|
30
|
+
upstream_skill_version_urns: z.array(z.string().min(1)).optional(),
|
|
31
|
+
openlineage: OpenLineageSchema,
|
|
32
|
+
})
|
|
33
|
+
.optional(),
|
|
34
|
+
});
|
|
35
|
+
export const SkillSeedRefSchema = z
|
|
36
|
+
.object({
|
|
37
|
+
skill_key: z.string().min(1).optional(),
|
|
38
|
+
skill_urn: z.string().min(1).optional(),
|
|
39
|
+
skill_item_id: z.string().min(1).optional(),
|
|
40
|
+
})
|
|
41
|
+
.refine((value) => Boolean(value.skill_key || value.skill_urn || value.skill_item_id), {
|
|
42
|
+
message: 'skill_key, skill_urn, or skill_item_id is required',
|
|
43
|
+
});
|
|
44
|
+
export const AgentSeedSpecSchema = z.object({
|
|
45
|
+
item_id: z.string().min(1).optional(),
|
|
46
|
+
depends_on: z.array(z.string().min(1)).optional(),
|
|
47
|
+
tags: z.array(z.string().min(1)).optional(),
|
|
48
|
+
agent_key: z.string().min(1),
|
|
49
|
+
harness_name: z.string().min(1).optional(),
|
|
50
|
+
display_name: z.string().min(1).optional(),
|
|
51
|
+
description: z.string().min(1).optional(),
|
|
52
|
+
source_path: z.string().min(1).optional(),
|
|
53
|
+
artifact_path: z.string().min(1).optional(),
|
|
54
|
+
artifact_media_type: z.string().min(1).default('text/markdown'),
|
|
55
|
+
skill_refs: z.array(z.union([z.string().min(1), SkillSeedRefSchema])).default([]),
|
|
56
|
+
});
|
|
57
|
+
export const BootstrapPackMetadataSchema = z.object({
|
|
58
|
+
pack_id: z.string().min(1),
|
|
59
|
+
version: z.string().min(1),
|
|
60
|
+
description: z.string().min(1).optional(),
|
|
61
|
+
owner: z.string().min(1).optional(),
|
|
62
|
+
tags: z.array(z.string().min(1)).default([]),
|
|
63
|
+
});
|
|
64
|
+
export const SkillSeedDefaultsSchema = z.object({
|
|
65
|
+
author: z.string().min(1).optional(),
|
|
66
|
+
artifact_media_type: z.string().min(1).optional(),
|
|
67
|
+
display_name: z.string().min(1).optional(),
|
|
68
|
+
description: z.string().min(1).optional(),
|
|
69
|
+
source_path: z.string().min(1).optional(),
|
|
70
|
+
commit_sha: z.string().min(1).optional(),
|
|
71
|
+
git_tag: z.string().min(1).optional(),
|
|
72
|
+
artifact_signature: z.string().min(1).optional(),
|
|
73
|
+
publish_note: z.string().min(1).optional(),
|
|
74
|
+
validate_note: z.string().min(1).optional(),
|
|
75
|
+
certify: z.boolean().optional(),
|
|
76
|
+
certify_note: z.string().min(1).optional(),
|
|
77
|
+
}).optional();
|
|
78
|
+
export const AgentSeedDefaultsSchema = z.object({
|
|
79
|
+
harness_name: z.string().min(1).optional(),
|
|
80
|
+
display_name: z.string().min(1).optional(),
|
|
81
|
+
description: z.string().min(1).optional(),
|
|
82
|
+
source_path: z.string().min(1).optional(),
|
|
83
|
+
artifact_media_type: z.string().min(1).optional(),
|
|
84
|
+
}).optional();
|
|
85
|
+
export const BootstrapProfileSchema = z.object({
|
|
86
|
+
description: z.string().min(1).optional(),
|
|
87
|
+
skill_item_ids: z.array(z.string().min(1)).optional(),
|
|
88
|
+
agent_item_ids: z.array(z.string().min(1)).optional(),
|
|
89
|
+
});
|
|
90
|
+
export const BootstrapManifestSchema = z.object({
|
|
91
|
+
pack: BootstrapPackMetadataSchema.optional(),
|
|
92
|
+
defaults: z
|
|
93
|
+
.object({
|
|
94
|
+
skill: SkillSeedDefaultsSchema,
|
|
95
|
+
agent: AgentSeedDefaultsSchema,
|
|
96
|
+
})
|
|
97
|
+
.optional(),
|
|
98
|
+
profiles: z.record(z.string(), BootstrapProfileSchema).optional(),
|
|
99
|
+
// When enabled, published skills are signed with an ephemeral ed25519 demo
|
|
100
|
+
// key (persisted under data/registry-operator/, never committed), registered
|
|
101
|
+
// as a trusted key owned by `owner`, and the detached signature is attached
|
|
102
|
+
// to the frozen envelope after publish.
|
|
103
|
+
signing: z
|
|
104
|
+
.object({
|
|
105
|
+
enabled: z.boolean().default(false),
|
|
106
|
+
owner: z.string().min(1).default('registry-operator'),
|
|
107
|
+
})
|
|
108
|
+
.optional(),
|
|
109
|
+
skills: z.array(SkillSeedSpecSchema).default([]),
|
|
110
|
+
agents: z.array(AgentSeedSpecSchema).default([]),
|
|
111
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pack": {
|
|
3
|
+
"pack_id": "bootstrap-pack-local",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "A richer local bootstrap pack for registry-operator.",
|
|
6
|
+
"owner": "registry-operator",
|
|
7
|
+
"tags": ["bootstrap", "local", "example"]
|
|
8
|
+
},
|
|
9
|
+
"defaults": {
|
|
10
|
+
"skill": {
|
|
11
|
+
"author": "registry-operator",
|
|
12
|
+
"artifact_media_type": "text/markdown",
|
|
13
|
+
"validate_note": "validated during local bootstrap",
|
|
14
|
+
"publish_note": "published during local bootstrap"
|
|
15
|
+
},
|
|
16
|
+
"agent": {
|
|
17
|
+
"artifact_media_type": "text/markdown"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"profiles": {
|
|
21
|
+
"minimal": {
|
|
22
|
+
"description": "Only the base skill and one agent.",
|
|
23
|
+
"skill_item_ids": ["skill_base"],
|
|
24
|
+
"agent_item_ids": ["agent_cursor"]
|
|
25
|
+
},
|
|
26
|
+
"full": {
|
|
27
|
+
"description": "Seed the full local example pack.",
|
|
28
|
+
"skill_item_ids": ["skill_base", "skill_ops"],
|
|
29
|
+
"agent_item_ids": ["agent_cursor", "agent_claude"]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"skills": [
|
|
33
|
+
{
|
|
34
|
+
"item_id": "skill_base",
|
|
35
|
+
"skill_key": "skill:bootstrap-example",
|
|
36
|
+
"artifact_path": "skills/bootstrap-example.md",
|
|
37
|
+
"display_name": "Bootstrap Example Skill",
|
|
38
|
+
"description": "A first lifecycle-seeded skill for local bootstrap verification.",
|
|
39
|
+
"source_path": "client/registry-cli/examples/bootstrap/skills/bootstrap-example.md",
|
|
40
|
+
"commit_sha": "bootstrap-commit-001",
|
|
41
|
+
"git_tag": "bootstrap-v1",
|
|
42
|
+
"artifact_signature": "bootstrap-sig-001",
|
|
43
|
+
"validate_note": "validated during local bootstrap",
|
|
44
|
+
"publish_note": "published during local bootstrap",
|
|
45
|
+
"certify": true,
|
|
46
|
+
"certify_note": "certified during local bootstrap",
|
|
47
|
+
"lineage": {
|
|
48
|
+
"upstream_skill_version_urns": [],
|
|
49
|
+
"openlineage": {
|
|
50
|
+
"job_namespace": "registry-operator",
|
|
51
|
+
"job_name": "bootstrap-seed",
|
|
52
|
+
"run_id": "bootstrap-run-001"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"item_id": "skill_ops",
|
|
58
|
+
"depends_on": ["skill_base"],
|
|
59
|
+
"tags": ["ops", "advanced"],
|
|
60
|
+
"skill_key": "skill:bootstrap-ops",
|
|
61
|
+
"artifact_path": "skills/bootstrap-ops.md",
|
|
62
|
+
"display_name": "Bootstrap Ops Skill",
|
|
63
|
+
"description": "A second lifecycle-seeded skill that depends on the base bootstrap skill.",
|
|
64
|
+
"source_path": "client/registry-cli/examples/bootstrap/skills/bootstrap-ops.md",
|
|
65
|
+
"commit_sha": "bootstrap-commit-002",
|
|
66
|
+
"git_tag": "bootstrap-v1-ops",
|
|
67
|
+
"artifact_signature": "bootstrap-sig-ops",
|
|
68
|
+
"certify": false,
|
|
69
|
+
"lineage": {
|
|
70
|
+
"upstream_skill_version_urns": [],
|
|
71
|
+
"openlineage": {
|
|
72
|
+
"job_namespace": "registry-operator",
|
|
73
|
+
"job_name": "bootstrap-seed-ops",
|
|
74
|
+
"run_id": "bootstrap-run-ops"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"agents": [
|
|
80
|
+
{
|
|
81
|
+
"item_id": "agent_cursor",
|
|
82
|
+
"agent_key": "cursor:bootstrap-example",
|
|
83
|
+
"harness_name": "cursor",
|
|
84
|
+
"display_name": "Bootstrap Example Agent",
|
|
85
|
+
"description": "A first agent referencing the bootstrap example skill.",
|
|
86
|
+
"source_path": "client/registry-cli/examples/bootstrap/agents/bootstrap-agent.md",
|
|
87
|
+
"artifact_path": "agents/bootstrap-agent.md",
|
|
88
|
+
"skill_refs": [
|
|
89
|
+
{ "skill_item_id": "skill_base" }
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"item_id": "agent_claude",
|
|
94
|
+
"depends_on": ["agent_cursor", "skill_ops"],
|
|
95
|
+
"agent_key": "claudecode:bootstrap-ops",
|
|
96
|
+
"harness_name": "claudecode",
|
|
97
|
+
"display_name": "Bootstrap Ops Agent",
|
|
98
|
+
"description": "A second agent referencing both bootstrap skills.",
|
|
99
|
+
"source_path": "client/registry-cli/examples/bootstrap/agents/bootstrap-ops-agent.md",
|
|
100
|
+
"artifact_path": "agents/bootstrap-ops-agent.md",
|
|
101
|
+
"skill_refs": [
|
|
102
|
+
{ "skill_item_id": "skill_base" },
|
|
103
|
+
{ "skill_item_id": "skill_ops" }
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Registry Demo Agent
|
|
2
|
+
|
|
3
|
+
This agent is the first-user demo entrypoint for `signet`.
|
|
4
|
+
|
|
5
|
+
## Use this agent when
|
|
6
|
+
|
|
7
|
+
- a human wants to prove MCP discovery works
|
|
8
|
+
- a human wants to load a skill from the registry
|
|
9
|
+
- a human wants a minimal example before using richer packs
|
|
10
|
+
|
|
11
|
+
## Operating sequence
|
|
12
|
+
|
|
13
|
+
1. Discover agents with `registry.list_agents`.
|
|
14
|
+
2. Load this agent with `registry.get_agent`.
|
|
15
|
+
3. Discover skills with `registry.list_skills`.
|
|
16
|
+
4. Load `skill:registry-mcp` for MCP usage guidance.
|
|
17
|
+
5. Load `skill:tame-llama` for the funny skill proof.
|
|
18
|
+
6. If needed, fetch raw file contents with `registry.get_artifact`.
|
|
19
|
+
|
|
20
|
+
## Demo outcome
|
|
21
|
+
|
|
22
|
+
After loading the linked skills, the human should be able to ask:
|
|
23
|
+
|
|
24
|
+
`How do we tame a llama?`
|
|
25
|
+
|
|
26
|
+
and get a playful answer grounded in the loaded `tame-llama` artifact.
|
|
27
|
+
|
|
28
|
+
## Important boundary
|
|
29
|
+
|
|
30
|
+
This agent only describes the MCP read path.
|
|
31
|
+
|
|
32
|
+
For registry writes:
|
|
33
|
+
- use `service/api`
|
|
34
|
+
- or use `service/webapp/knowledge-manager`
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pack": {
|
|
3
|
+
"pack_id": "blessed-first-user-demo",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "The first-user demo pack for signet.",
|
|
6
|
+
"owner": "registry-operator",
|
|
7
|
+
"tags": ["demo", "blessed", "mcp", "registry", "mock-okta"]
|
|
8
|
+
},
|
|
9
|
+
"defaults": {
|
|
10
|
+
"skill": {
|
|
11
|
+
"author": "registry-operator",
|
|
12
|
+
"artifact_media_type": "text/markdown",
|
|
13
|
+
"validate_note": "validated during blessed demo bootstrap",
|
|
14
|
+
"publish_note": "published during blessed demo bootstrap",
|
|
15
|
+
"certify": true,
|
|
16
|
+
"certify_note": "certified during blessed demo bootstrap"
|
|
17
|
+
},
|
|
18
|
+
"agent": {
|
|
19
|
+
"artifact_media_type": "text/markdown"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"profiles": {
|
|
23
|
+
"blessed": {
|
|
24
|
+
"description": "Seed the full first-user blessed demo path.",
|
|
25
|
+
"skill_item_ids": ["skill_registry_mcp", "skill_tame_llama"],
|
|
26
|
+
"agent_item_ids": ["agent_registry"]
|
|
27
|
+
},
|
|
28
|
+
"minimal": {
|
|
29
|
+
"description": "Alias for the same first-user demo pack.",
|
|
30
|
+
"skill_item_ids": ["skill_registry_mcp", "skill_tame_llama"],
|
|
31
|
+
"agent_item_ids": ["agent_registry"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"skills": [
|
|
35
|
+
{
|
|
36
|
+
"item_id": "skill_registry_mcp",
|
|
37
|
+
"skill_key": "skill:registry-mcp",
|
|
38
|
+
"artifact_path": "skills/registry-mcp.md",
|
|
39
|
+
"display_name": "Registry MCP Demo Skill",
|
|
40
|
+
"description": "Install, discover, and load guidance for the registry MCP demo path.",
|
|
41
|
+
"source_path": "client/registry-cli/examples/demo/skills/registry-mcp.md",
|
|
42
|
+
"commit_sha": "demo-pack-registry-mcp-001",
|
|
43
|
+
"git_tag": "demo-pack-v0-registry-mcp",
|
|
44
|
+
"artifact_signature": "demo-pack-registry-mcp-sig-001",
|
|
45
|
+
"lineage": {
|
|
46
|
+
"upstream_skill_version_urns": [],
|
|
47
|
+
"openlineage": {
|
|
48
|
+
"job_namespace": "registry-operator",
|
|
49
|
+
"job_name": "blessed-demo-seed",
|
|
50
|
+
"run_id": "blessed-demo-registry-mcp"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"item_id": "skill_tame_llama",
|
|
56
|
+
"skill_key": "skill:tame-llama",
|
|
57
|
+
"artifact_path": "skills/tame-llama.md",
|
|
58
|
+
"display_name": "Tame A Llama",
|
|
59
|
+
"description": "A playful skill used to prove MCP discovery and load.",
|
|
60
|
+
"source_path": "client/registry-cli/examples/demo/skills/tame-llama.md",
|
|
61
|
+
"commit_sha": "demo-pack-tame-llama-001",
|
|
62
|
+
"git_tag": "demo-pack-v0-tame-llama",
|
|
63
|
+
"artifact_signature": "demo-pack-tame-llama-sig-001",
|
|
64
|
+
"lineage": {
|
|
65
|
+
"upstream_skill_version_urns": [],
|
|
66
|
+
"openlineage": {
|
|
67
|
+
"job_namespace": "registry-operator",
|
|
68
|
+
"job_name": "blessed-demo-seed",
|
|
69
|
+
"run_id": "blessed-demo-tame-llama"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"agents": [
|
|
75
|
+
{
|
|
76
|
+
"item_id": "agent_registry",
|
|
77
|
+
"depends_on": ["skill_registry_mcp", "skill_tame_llama"],
|
|
78
|
+
"agent_key": "cursor:registry-agent",
|
|
79
|
+
"harness_name": "cursor",
|
|
80
|
+
"display_name": "Registry Demo Agent",
|
|
81
|
+
"description": "A demo agent that points humans toward the registry MCP usage skill and the tame llama skill.",
|
|
82
|
+
"source_path": "client/registry-cli/examples/demo/agents/registry-agent.md",
|
|
83
|
+
"artifact_path": "agents/registry-agent.md",
|
|
84
|
+
"skill_refs": [
|
|
85
|
+
{ "skill_item_id": "skill_registry_mcp" },
|
|
86
|
+
{ "skill_item_id": "skill_tame_llama" }
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Registry MCP Demo Skill
|
|
2
|
+
|
|
3
|
+
Use this skill when a human wants to discover or load registry content through `service/mcp`.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This skill explains the happy-path MCP workflow for the local demo stack.
|
|
8
|
+
|
|
9
|
+
You should use the registry read-only tools in this order:
|
|
10
|
+
1. `registry.list_agents`
|
|
11
|
+
2. `registry.get_agent`
|
|
12
|
+
3. `registry.list_skills`
|
|
13
|
+
4. `registry.get_skill`
|
|
14
|
+
5. `registry.get_artifact` when the harness needs the raw file contents
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
Point the MCP client at:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
http://localhost:3000/mcp
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use the bearer token provided by `registry-operator bootstrap test`.
|
|
25
|
+
|
|
26
|
+
Example Cursor MCP config shape:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"signet": {
|
|
32
|
+
"url": "http://localhost:3000/mcp",
|
|
33
|
+
"headers": {
|
|
34
|
+
"Authorization": "Bearer <mcp-token>"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Discover
|
|
42
|
+
|
|
43
|
+
To discover the demo agent:
|
|
44
|
+
- call `registry.list_agents`
|
|
45
|
+
- look for `cursor:registry-agent`
|
|
46
|
+
|
|
47
|
+
To discover the demo skills:
|
|
48
|
+
- call `registry.list_skills`
|
|
49
|
+
- look for `skill:registry-mcp`
|
|
50
|
+
- look for `skill:tame-llama`
|
|
51
|
+
|
|
52
|
+
## Load
|
|
53
|
+
|
|
54
|
+
To load the agent:
|
|
55
|
+
- call `registry.get_agent` with the agent URN returned by `registry.list_agents`
|
|
56
|
+
- inspect the linked skill URNs and artifact URNs
|
|
57
|
+
|
|
58
|
+
To load a skill:
|
|
59
|
+
- call `registry.get_skill` with the skill URN returned by `registry.list_skills`
|
|
60
|
+
- if the harness needs the file body, call `registry.get_artifact` with the linked artifact URN
|
|
61
|
+
|
|
62
|
+
## Demo prompts
|
|
63
|
+
|
|
64
|
+
Use prompts like:
|
|
65
|
+
- `Use registry.list_agents to find the registry demo agent.`
|
|
66
|
+
- `Use registry.get_agent to load the registry demo agent and summarize its linked skills.`
|
|
67
|
+
- `Use registry.list_skills to find the tame llama skill.`
|
|
68
|
+
- `Use registry.get_skill to load skill:tame-llama.`
|
|
69
|
+
|
|
70
|
+
## Boundaries
|
|
71
|
+
|
|
72
|
+
- these tools are read-only
|
|
73
|
+
- use `service/api` or the knowledge-manager webapp for management-plane writes
|
|
74
|
+
- the mock-Okta browser proof is separate from the MCP discovery/load demo
|