@freedome/protocol 1.1.0 → 1.2.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/CHANGELOG.md +6 -0
- package/dist/index.cjs +140 -7
- package/dist/index.d.cts +2209 -112
- package/dist/index.d.ts +2209 -112
- package/dist/index.js +140 -7
- package/dist/validate.cjs +526 -0
- package/dist/validate.js +526 -0
- package/package.json +1 -1
package/dist/validate.cjs
CHANGED
|
@@ -4682,6 +4682,90 @@ var schemaBundle = {
|
|
|
4682
4682
|
}
|
|
4683
4683
|
}
|
|
4684
4684
|
},
|
|
4685
|
+
"https://freedome.nativemind.us/schemas/api/1.1/assistant.schema.json": {
|
|
4686
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
4687
|
+
$id: "https://freedome.nativemind.us/schemas/api/1.1/assistant.schema.json",
|
|
4688
|
+
$comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). The person's side of the assistant: physical confirmations and the outbound link (flows/sdd-freedome-mcp 3.2, 3.3).",
|
|
4689
|
+
title: "Assistant",
|
|
4690
|
+
$ref: "#/$defs/link",
|
|
4691
|
+
$defs: {
|
|
4692
|
+
confirmation: {
|
|
4693
|
+
description: "A physical action waiting for a person. The code hash stays on the venue and is never part of this shape.",
|
|
4694
|
+
type: "object",
|
|
4695
|
+
required: ["id", "tool", "risk", "text", "argumentsHash", "via", "createdAt", "expiresAt", "status"],
|
|
4696
|
+
additionalProperties: false,
|
|
4697
|
+
properties: {
|
|
4698
|
+
id: { type: "string", maxLength: 64 },
|
|
4699
|
+
tool: { type: "string" },
|
|
4700
|
+
risk: { const: "physical" },
|
|
4701
|
+
text: {
|
|
4702
|
+
type: "string",
|
|
4703
|
+
maxLength: 600,
|
|
4704
|
+
description: "What will happen, in plain words, made on the venue from the tool and its arguments."
|
|
4705
|
+
},
|
|
4706
|
+
argumentsHash: { type: "string", pattern: "^[0-9a-f]{64}$" },
|
|
4707
|
+
via: { enum: ["local", "link"] },
|
|
4708
|
+
sessionId: {
|
|
4709
|
+
type: "string",
|
|
4710
|
+
maxLength: 64,
|
|
4711
|
+
description: "The approval it came through, when `via` is `link`."
|
|
4712
|
+
},
|
|
4713
|
+
createdAt: { type: "string", format: "date-time" },
|
|
4714
|
+
expiresAt: { type: "string", format: "date-time" },
|
|
4715
|
+
status: { enum: ["pending", "confirmed", "expired", "refused"] },
|
|
4716
|
+
code: { type: "string", pattern: "^[0-9]{4}$", description: "Only for a person, and only while `pending`." }
|
|
4717
|
+
}
|
|
4718
|
+
},
|
|
4719
|
+
confirmationPage: {
|
|
4720
|
+
type: "object",
|
|
4721
|
+
required: ["items", "nextCursor"],
|
|
4722
|
+
additionalProperties: false,
|
|
4723
|
+
properties: {
|
|
4724
|
+
items: { type: "array", items: { $ref: "#/$defs/confirmation" } },
|
|
4725
|
+
nextCursor: { type: ["string", "null"] }
|
|
4726
|
+
}
|
|
4727
|
+
},
|
|
4728
|
+
linkSession: {
|
|
4729
|
+
description: "One approval: who gave it, what it may do, until when.",
|
|
4730
|
+
type: "object",
|
|
4731
|
+
required: ["id", "approver", "role", "scopes", "createdAt", "expiresAt", "status", "calls"],
|
|
4732
|
+
additionalProperties: false,
|
|
4733
|
+
properties: {
|
|
4734
|
+
id: { type: "string", maxLength: 64 },
|
|
4735
|
+
approver: { type: "string" },
|
|
4736
|
+
role: { enum: ["operator", "admin", "superadmin"] },
|
|
4737
|
+
scopes: { type: "array", items: { type: "string" } },
|
|
4738
|
+
createdAt: { type: "string", format: "date-time" },
|
|
4739
|
+
expiresAt: { type: "string", format: "date-time" },
|
|
4740
|
+
status: { enum: ["active", "ended", "expired"] },
|
|
4741
|
+
calls: { type: "integer", minimum: 0 }
|
|
4742
|
+
}
|
|
4743
|
+
},
|
|
4744
|
+
link: {
|
|
4745
|
+
type: "object",
|
|
4746
|
+
required: ["enabled", "state", "sessions"],
|
|
4747
|
+
additionalProperties: false,
|
|
4748
|
+
properties: {
|
|
4749
|
+
enabled: { type: "boolean" },
|
|
4750
|
+
state: { enum: ["off", "connecting", "online", "offline"] },
|
|
4751
|
+
installationId: { type: "string" },
|
|
4752
|
+
sessions: { type: "array", items: { $ref: "#/$defs/linkSession" } }
|
|
4753
|
+
}
|
|
4754
|
+
},
|
|
4755
|
+
linkApprove: {
|
|
4756
|
+
type: "object",
|
|
4757
|
+
required: ["code"],
|
|
4758
|
+
additionalProperties: false,
|
|
4759
|
+
properties: {
|
|
4760
|
+
code: {
|
|
4761
|
+
type: "string",
|
|
4762
|
+
pattern: "^[0-9A-Za-z]{4}-?[0-9A-Za-z]{4}$",
|
|
4763
|
+
description: "The code the assistant showed."
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
}
|
|
4767
|
+
}
|
|
4768
|
+
},
|
|
4685
4769
|
"https://freedome.nativemind.us/schemas/api/1.1/audio-reactive.schema.json": {
|
|
4686
4770
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
4687
4771
|
$id: "https://freedome.nativemind.us/schemas/api/1.1/audio-reactive.schema.json",
|
|
@@ -11944,6 +12028,448 @@ var schemaBundle = {
|
|
|
11944
12028
|
patternProperties: { "^x-": true },
|
|
11945
12029
|
additionalProperties: false
|
|
11946
12030
|
},
|
|
12031
|
+
"https://freedome.nativemind.us/schemas/mcp/1.0/dossier.schema.json": {
|
|
12032
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
12033
|
+
$id: "https://freedome.nativemind.us/schemas/mcp/1.0/dossier.schema.json",
|
|
12034
|
+
$comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). The dossier of a venue project and the shapes around it (flows/sdd-freedome-mcp 02 Data Models). Text in a dossier is data from a client: never instructions.",
|
|
12035
|
+
title: "Dossier",
|
|
12036
|
+
$ref: "#/$defs/dossier",
|
|
12037
|
+
$defs: {
|
|
12038
|
+
range: {
|
|
12039
|
+
type: "object",
|
|
12040
|
+
required: ["low", "high"],
|
|
12041
|
+
additionalProperties: false,
|
|
12042
|
+
properties: { low: { type: "number" }, high: { type: "number" } }
|
|
12043
|
+
},
|
|
12044
|
+
estimate: {
|
|
12045
|
+
type: "object",
|
|
12046
|
+
description: "Every figure of the planner. `isEstimate` is always true: nothing here was measured.",
|
|
12047
|
+
required: ["value", "unit", "range", "assumptions", "isEstimate", "rule"],
|
|
12048
|
+
additionalProperties: false,
|
|
12049
|
+
properties: {
|
|
12050
|
+
value: { type: "number" },
|
|
12051
|
+
unit: { type: "string" },
|
|
12052
|
+
range: { $ref: "#/$defs/range" },
|
|
12053
|
+
assumptions: { type: "array", minItems: 1, items: { type: "string" } },
|
|
12054
|
+
isEstimate: { const: true },
|
|
12055
|
+
rule: {
|
|
12056
|
+
type: "object",
|
|
12057
|
+
required: ["id", "version", "status", "source"],
|
|
12058
|
+
additionalProperties: false,
|
|
12059
|
+
properties: {
|
|
12060
|
+
id: { type: "string" },
|
|
12061
|
+
version: { type: "integer", minimum: 1 },
|
|
12062
|
+
status: { enum: ["geometry", "ours", "ours-tbv", "unverified"] },
|
|
12063
|
+
source: { type: "string" }
|
|
12064
|
+
}
|
|
12065
|
+
}
|
|
12066
|
+
}
|
|
12067
|
+
},
|
|
12068
|
+
checkItem: {
|
|
12069
|
+
type: "object",
|
|
12070
|
+
required: ["id", "done"],
|
|
12071
|
+
additionalProperties: false,
|
|
12072
|
+
properties: { id: { type: "string" }, done: { type: "boolean" }, note: { type: "string", maxLength: 500 } }
|
|
12073
|
+
},
|
|
12074
|
+
attachment: {
|
|
12075
|
+
type: "object",
|
|
12076
|
+
required: ["id", "name", "contentType", "size", "createdAt"],
|
|
12077
|
+
additionalProperties: false,
|
|
12078
|
+
properties: {
|
|
12079
|
+
id: { type: "string", format: "uuid" },
|
|
12080
|
+
name: { type: "string", maxLength: 200 },
|
|
12081
|
+
contentType: { enum: ["image/jpeg", "image/png", "image/webp", "application/pdf"] },
|
|
12082
|
+
size: { type: "integer", minimum: 1 },
|
|
12083
|
+
createdAt: { type: "string", format: "date-time" }
|
|
12084
|
+
}
|
|
12085
|
+
},
|
|
12086
|
+
consent: {
|
|
12087
|
+
type: "object",
|
|
12088
|
+
required: ["at", "version"],
|
|
12089
|
+
additionalProperties: false,
|
|
12090
|
+
properties: { at: { type: "string", format: "date-time" }, version: { type: "string", minLength: 1 } }
|
|
12091
|
+
},
|
|
12092
|
+
dossier: {
|
|
12093
|
+
type: "object",
|
|
12094
|
+
required: [
|
|
12095
|
+
"id",
|
|
12096
|
+
"version",
|
|
12097
|
+
"lang",
|
|
12098
|
+
"stage",
|
|
12099
|
+
"answers",
|
|
12100
|
+
"checklist",
|
|
12101
|
+
"openItems",
|
|
12102
|
+
"attachments",
|
|
12103
|
+
"createdAt",
|
|
12104
|
+
"updatedAt"
|
|
12105
|
+
],
|
|
12106
|
+
additionalProperties: false,
|
|
12107
|
+
properties: {
|
|
12108
|
+
id: { type: "string", format: "uuid" },
|
|
12109
|
+
version: { type: "integer", minimum: 1 },
|
|
12110
|
+
lang: { enum: ["en", "ru"] },
|
|
12111
|
+
stage: { enum: ["intake", "survey", "choices", "prepared", "installed"] },
|
|
12112
|
+
claimed: { type: "boolean" },
|
|
12113
|
+
room: { type: "object" },
|
|
12114
|
+
goals: { type: "string", maxLength: 2e3 },
|
|
12115
|
+
answers: { type: "object" },
|
|
12116
|
+
choices: { type: "object" },
|
|
12117
|
+
estimates: { type: "object", additionalProperties: { type: "object" } },
|
|
12118
|
+
domeDraft: { $ref: "../../dome/1.1/dome.schema.json" },
|
|
12119
|
+
checklist: { type: "array", items: { $ref: "#/$defs/checkItem" } },
|
|
12120
|
+
openItems: { type: "array", items: { type: "string" } },
|
|
12121
|
+
attachments: { type: "array", items: { $ref: "#/$defs/attachment" } },
|
|
12122
|
+
consent: { $ref: "#/$defs/consent" },
|
|
12123
|
+
linkedInstallationId: { type: "string", format: "uuid" },
|
|
12124
|
+
expiresAt: { type: "string", format: "date-time" },
|
|
12125
|
+
createdAt: { type: "string", format: "date-time" },
|
|
12126
|
+
updatedAt: { type: "string", format: "date-time" }
|
|
12127
|
+
}
|
|
12128
|
+
},
|
|
12129
|
+
consentRequest: {
|
|
12130
|
+
type: "object",
|
|
12131
|
+
required: ["version"],
|
|
12132
|
+
additionalProperties: false,
|
|
12133
|
+
properties: { version: { type: "string", minLength: 1, maxLength: 32 } }
|
|
12134
|
+
},
|
|
12135
|
+
expertRequest: {
|
|
12136
|
+
type: "object",
|
|
12137
|
+
required: ["id", "question", "clientAcceptedAt", "status"],
|
|
12138
|
+
additionalProperties: false,
|
|
12139
|
+
properties: {
|
|
12140
|
+
id: { type: "string", format: "uuid" },
|
|
12141
|
+
question: { type: "string", maxLength: 1500 },
|
|
12142
|
+
clientAcceptedAt: { type: "string", format: "date-time" },
|
|
12143
|
+
status: { enum: ["sent", "answered", "closed"] },
|
|
12144
|
+
answer: { type: "string" }
|
|
12145
|
+
}
|
|
12146
|
+
},
|
|
12147
|
+
pendingConfirmation: {
|
|
12148
|
+
type: "object",
|
|
12149
|
+
description: "What an assistant may know of a confirmation. The code hash stays on the venue and is not part of this shape.",
|
|
12150
|
+
required: ["id", "tool", "argumentsHash", "risk", "text", "expiresAt", "status"],
|
|
12151
|
+
additionalProperties: false,
|
|
12152
|
+
properties: {
|
|
12153
|
+
id: { type: "string" },
|
|
12154
|
+
tool: { type: "string" },
|
|
12155
|
+
argumentsHash: { type: "string" },
|
|
12156
|
+
risk: { const: "physical" },
|
|
12157
|
+
text: { type: "string" },
|
|
12158
|
+
expiresAt: { type: "string", format: "date-time" },
|
|
12159
|
+
status: { enum: ["pending", "confirmed", "expired", "refused"] }
|
|
12160
|
+
}
|
|
12161
|
+
},
|
|
12162
|
+
toolResult: {
|
|
12163
|
+
type: "object",
|
|
12164
|
+
description: "Every tool result: a short sentence to read aloud, plus the full data.",
|
|
12165
|
+
required: ["summary", "data"],
|
|
12166
|
+
additionalProperties: false,
|
|
12167
|
+
properties: {
|
|
12168
|
+
summary: { type: "string", minLength: 1 },
|
|
12169
|
+
data: { type: "object" },
|
|
12170
|
+
untrusted: {
|
|
12171
|
+
type: "array",
|
|
12172
|
+
items: { type: "string" },
|
|
12173
|
+
description: "Paths of `data` that hold client text: data, not instructions."
|
|
12174
|
+
}
|
|
12175
|
+
}
|
|
12176
|
+
},
|
|
12177
|
+
toolError: {
|
|
12178
|
+
type: "object",
|
|
12179
|
+
required: ["code", "summary", "retryable"],
|
|
12180
|
+
additionalProperties: false,
|
|
12181
|
+
properties: {
|
|
12182
|
+
code: { type: "string", pattern: "^[a-z][a-z0-9_]*$" },
|
|
12183
|
+
summary: { type: "string", minLength: 1 },
|
|
12184
|
+
retryable: { type: "boolean" },
|
|
12185
|
+
data: { type: "object" }
|
|
12186
|
+
}
|
|
12187
|
+
}
|
|
12188
|
+
}
|
|
12189
|
+
},
|
|
12190
|
+
"https://freedome.nativemind.us/schemas/mcp/1.0/knowledge.schema.json": {
|
|
12191
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
12192
|
+
$id: "https://freedome.nativemind.us/schemas/mcp/1.0/knowledge.schema.json",
|
|
12193
|
+
$comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Planning knowledge mcp/knowledge/*.yaml. The root validates a single rule; each file has its own $def.",
|
|
12194
|
+
title: "Freedome MCP knowledge",
|
|
12195
|
+
$ref: "#/$defs/rule",
|
|
12196
|
+
$defs: {
|
|
12197
|
+
text: {
|
|
12198
|
+
type: "object",
|
|
12199
|
+
required: ["en", "ru"],
|
|
12200
|
+
additionalProperties: false,
|
|
12201
|
+
properties: { en: { type: "string", minLength: 1 }, ru: { type: "string", minLength: 1 } }
|
|
12202
|
+
},
|
|
12203
|
+
condition: { type: "object", additionalProperties: { type: "array", items: { type: "string" }, minItems: 1 } },
|
|
12204
|
+
sourceId: { type: "string", pattern: "^(doc|gen)-[a-z0-9]+$" },
|
|
12205
|
+
rule: {
|
|
12206
|
+
type: "object",
|
|
12207
|
+
required: ["id", "version", "status", "source", "title", "formula", "params", "assumptions"],
|
|
12208
|
+
additionalProperties: false,
|
|
12209
|
+
properties: {
|
|
12210
|
+
id: { type: "string", pattern: "^[a-z]+\\.[a-z0-9-]+$" },
|
|
12211
|
+
version: { type: "integer", minimum: 1 },
|
|
12212
|
+
status: { enum: ["geometry", "ours", "ours-tbv", "unverified"] },
|
|
12213
|
+
source: { $ref: "#/$defs/sourceId" },
|
|
12214
|
+
title: { $ref: "#/$defs/text" },
|
|
12215
|
+
formula: { type: "string", minLength: 1 },
|
|
12216
|
+
params: { type: "object" },
|
|
12217
|
+
assumptions: { type: "array", minItems: 1, items: { $ref: "#/$defs/text" } }
|
|
12218
|
+
}
|
|
12219
|
+
},
|
|
12220
|
+
rules: {
|
|
12221
|
+
type: "object",
|
|
12222
|
+
required: ["version", "rules"],
|
|
12223
|
+
additionalProperties: false,
|
|
12224
|
+
properties: { version: { const: 1 }, rules: { type: "array", items: { $ref: "#/$defs/rule" } } }
|
|
12225
|
+
},
|
|
12226
|
+
source: {
|
|
12227
|
+
type: "object",
|
|
12228
|
+
required: ["id", "kind", "title", "where"],
|
|
12229
|
+
additionalProperties: false,
|
|
12230
|
+
properties: {
|
|
12231
|
+
id: { $ref: "#/$defs/sourceId" },
|
|
12232
|
+
kind: { enum: ["ours", "general"] },
|
|
12233
|
+
title: { type: "string" },
|
|
12234
|
+
where: { type: "string" }
|
|
12235
|
+
}
|
|
12236
|
+
},
|
|
12237
|
+
sources: {
|
|
12238
|
+
type: "object",
|
|
12239
|
+
required: ["version", "sources"],
|
|
12240
|
+
additionalProperties: false,
|
|
12241
|
+
properties: { version: { const: 1 }, sources: { type: "array", items: { $ref: "#/$defs/source" } } }
|
|
12242
|
+
},
|
|
12243
|
+
question: {
|
|
12244
|
+
type: "object",
|
|
12245
|
+
required: ["id", "type", "en", "ru"],
|
|
12246
|
+
additionalProperties: false,
|
|
12247
|
+
properties: {
|
|
12248
|
+
id: { type: "string", pattern: "^[a-z][a-z0-9_]*$" },
|
|
12249
|
+
type: { enum: ["enum", "number", "text"] },
|
|
12250
|
+
unit: { type: "string" },
|
|
12251
|
+
min: { type: "number" },
|
|
12252
|
+
max: { type: "number" },
|
|
12253
|
+
integer: { type: "boolean" },
|
|
12254
|
+
maxLength: { type: "integer", minimum: 1 },
|
|
12255
|
+
skippable: { type: "boolean" },
|
|
12256
|
+
when: { $ref: "#/$defs/condition" },
|
|
12257
|
+
options: {
|
|
12258
|
+
type: "array",
|
|
12259
|
+
minItems: 2,
|
|
12260
|
+
items: {
|
|
12261
|
+
type: "object",
|
|
12262
|
+
required: ["value", "en", "ru"],
|
|
12263
|
+
additionalProperties: false,
|
|
12264
|
+
properties: { value: { type: "string" }, en: { type: "string" }, ru: { type: "string" } }
|
|
12265
|
+
}
|
|
12266
|
+
},
|
|
12267
|
+
en: { type: "string", minLength: 1 },
|
|
12268
|
+
ru: { type: "string", minLength: 1 }
|
|
12269
|
+
}
|
|
12270
|
+
},
|
|
12271
|
+
survey: {
|
|
12272
|
+
type: "object",
|
|
12273
|
+
required: ["version", "questions"],
|
|
12274
|
+
additionalProperties: false,
|
|
12275
|
+
properties: {
|
|
12276
|
+
version: { const: 1 },
|
|
12277
|
+
questions: { type: "array", minItems: 1, items: { $ref: "#/$defs/question" } }
|
|
12278
|
+
}
|
|
12279
|
+
},
|
|
12280
|
+
item: {
|
|
12281
|
+
type: "object",
|
|
12282
|
+
required: ["id", "who", "source", "en", "ru"],
|
|
12283
|
+
additionalProperties: false,
|
|
12284
|
+
properties: {
|
|
12285
|
+
id: { type: "string", pattern: "^[a-z][a-z0-9-]*$" },
|
|
12286
|
+
who: { enum: ["client", "electrician", "structural", "fire", "acoustic", "installer"] },
|
|
12287
|
+
expert: { type: "boolean" },
|
|
12288
|
+
source: { $ref: "#/$defs/sourceId" },
|
|
12289
|
+
when: { $ref: "#/$defs/condition" },
|
|
12290
|
+
en: { type: "string", minLength: 1 },
|
|
12291
|
+
ru: { type: "string", minLength: 1 }
|
|
12292
|
+
}
|
|
12293
|
+
},
|
|
12294
|
+
checklist: {
|
|
12295
|
+
type: "object",
|
|
12296
|
+
required: ["version", "items"],
|
|
12297
|
+
additionalProperties: false,
|
|
12298
|
+
properties: { version: { const: 1 }, items: { type: "array", minItems: 1, items: { $ref: "#/$defs/item" } } }
|
|
12299
|
+
},
|
|
12300
|
+
policy: {
|
|
12301
|
+
type: "object",
|
|
12302
|
+
required: ["version", "lines", "routes"],
|
|
12303
|
+
additionalProperties: false,
|
|
12304
|
+
properties: {
|
|
12305
|
+
version: { const: 1 },
|
|
12306
|
+
lines: { type: "object", additionalProperties: { $ref: "#/$defs/text" } },
|
|
12307
|
+
routes: { type: "object", additionalProperties: { type: "array", items: { type: "string" } } }
|
|
12308
|
+
}
|
|
12309
|
+
}
|
|
12310
|
+
}
|
|
12311
|
+
},
|
|
12312
|
+
"https://freedome.nativemind.us/schemas/mcp/1.0/link.schema.json": {
|
|
12313
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
12314
|
+
$id: "https://freedome.nativemind.us/schemas/mcp/1.0/link.schema.json",
|
|
12315
|
+
$comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). Frames of wss://\u2026/api/v1/installations/link (flows/sdd-freedome-mcp 3.3). Text frames, one JSON object each, at most 1 MiB. This list is closed: anything else closes the link.",
|
|
12316
|
+
title: "Link frame",
|
|
12317
|
+
oneOf: [
|
|
12318
|
+
{ $ref: "#/$defs/challenge" },
|
|
12319
|
+
{ $ref: "#/$defs/proof" },
|
|
12320
|
+
{ $ref: "#/$defs/ready" },
|
|
12321
|
+
{ $ref: "#/$defs/approve" },
|
|
12322
|
+
{ $ref: "#/$defs/approveResult" },
|
|
12323
|
+
{ $ref: "#/$defs/mcp" },
|
|
12324
|
+
{ $ref: "#/$defs/mcpResult" },
|
|
12325
|
+
{ $ref: "#/$defs/end" },
|
|
12326
|
+
{ $ref: "#/$defs/ended" },
|
|
12327
|
+
{ $ref: "#/$defs/sessions" }
|
|
12328
|
+
],
|
|
12329
|
+
$defs: {
|
|
12330
|
+
id: { type: "string", minLength: 1, maxLength: 64 },
|
|
12331
|
+
challenge: {
|
|
12332
|
+
description: "Hub to venue, first frame after a valid `fdi_` key in `Authorization`.",
|
|
12333
|
+
type: "object",
|
|
12334
|
+
additionalProperties: false,
|
|
12335
|
+
required: ["t", "nonce"],
|
|
12336
|
+
properties: { t: { const: "challenge" }, nonce: { type: "string", pattern: "^[A-Za-z0-9_-]{43}$" } }
|
|
12337
|
+
},
|
|
12338
|
+
proof: {
|
|
12339
|
+
description: "Venue to hub: unpadded base64url ed25519 signature of the UTF-8 text `freedome-link-v1\\n<installationId>\\n<nonce>`, by the key of enrolment.",
|
|
12340
|
+
type: "object",
|
|
12341
|
+
additionalProperties: false,
|
|
12342
|
+
required: ["t", "signature", "active"],
|
|
12343
|
+
properties: {
|
|
12344
|
+
t: { const: "proof" },
|
|
12345
|
+
signature: { type: "string", pattern: "^[A-Za-z0-9_-]{86}$" },
|
|
12346
|
+
active: {
|
|
12347
|
+
type: "array",
|
|
12348
|
+
items: { $ref: "#/$defs/id" },
|
|
12349
|
+
description: "Approvals still valid on the venue. The hub ends every other one."
|
|
12350
|
+
}
|
|
12351
|
+
}
|
|
12352
|
+
},
|
|
12353
|
+
ready: {
|
|
12354
|
+
description: "Hub to venue: the link is up. A newer link of the same installation replaces an older one.",
|
|
12355
|
+
type: "object",
|
|
12356
|
+
additionalProperties: false,
|
|
12357
|
+
required: ["t"],
|
|
12358
|
+
properties: { t: { const: "ready" } }
|
|
12359
|
+
},
|
|
12360
|
+
approve: {
|
|
12361
|
+
description: "Venue to hub: a person approved a link code. The venue keeps the scopes; they are sent for the audit.",
|
|
12362
|
+
type: "object",
|
|
12363
|
+
additionalProperties: false,
|
|
12364
|
+
required: ["t", "id", "code", "sid", "approver", "role", "scopes", "expiresAt"],
|
|
12365
|
+
properties: {
|
|
12366
|
+
t: { const: "approve" },
|
|
12367
|
+
id: { $ref: "#/$defs/id" },
|
|
12368
|
+
code: { type: "string", maxLength: 16 },
|
|
12369
|
+
sid: { $ref: "#/$defs/id" },
|
|
12370
|
+
approver: { type: "string", maxLength: 128 },
|
|
12371
|
+
role: { type: "string" },
|
|
12372
|
+
scopes: { type: "array", items: { type: "string" } },
|
|
12373
|
+
expiresAt: { type: "string", format: "date-time" }
|
|
12374
|
+
}
|
|
12375
|
+
},
|
|
12376
|
+
approveResult: {
|
|
12377
|
+
type: "object",
|
|
12378
|
+
additionalProperties: false,
|
|
12379
|
+
required: ["t", "id", "ok"],
|
|
12380
|
+
properties: {
|
|
12381
|
+
t: { const: "approve_result" },
|
|
12382
|
+
id: { $ref: "#/$defs/id" },
|
|
12383
|
+
ok: { type: "boolean" },
|
|
12384
|
+
error: { enum: ["wrong_code", "expired", "busy"] }
|
|
12385
|
+
}
|
|
12386
|
+
},
|
|
12387
|
+
mcp: {
|
|
12388
|
+
description: "Hub to venue: one MCP request, under an approval the venue knows. Only `initialize`, `tools/list` and `tools/call`.",
|
|
12389
|
+
type: "object",
|
|
12390
|
+
additionalProperties: false,
|
|
12391
|
+
required: ["t", "id", "sid", "dossierId", "msg"],
|
|
12392
|
+
properties: {
|
|
12393
|
+
t: { const: "mcp" },
|
|
12394
|
+
id: { $ref: "#/$defs/id" },
|
|
12395
|
+
sid: { $ref: "#/$defs/id" },
|
|
12396
|
+
dossierId: { $ref: "#/$defs/id" },
|
|
12397
|
+
msg: { type: "object", description: "JSON-RPC 2.0 request." }
|
|
12398
|
+
}
|
|
12399
|
+
},
|
|
12400
|
+
mcpResult: {
|
|
12401
|
+
type: "object",
|
|
12402
|
+
additionalProperties: false,
|
|
12403
|
+
required: ["t", "id", "msg"],
|
|
12404
|
+
properties: {
|
|
12405
|
+
t: { const: "mcp_result" },
|
|
12406
|
+
id: { $ref: "#/$defs/id" },
|
|
12407
|
+
msg: { type: "object", description: "JSON-RPC 2.0 response." }
|
|
12408
|
+
}
|
|
12409
|
+
},
|
|
12410
|
+
end: {
|
|
12411
|
+
description: "Hub to venue: the assistant ended the link.",
|
|
12412
|
+
type: "object",
|
|
12413
|
+
additionalProperties: false,
|
|
12414
|
+
required: ["t", "sid"],
|
|
12415
|
+
properties: { t: { const: "end" }, sid: { $ref: "#/$defs/id" } }
|
|
12416
|
+
},
|
|
12417
|
+
ended: {
|
|
12418
|
+
description: "Venue to hub: ended in Manager, or expired.",
|
|
12419
|
+
type: "object",
|
|
12420
|
+
additionalProperties: false,
|
|
12421
|
+
required: ["t", "sid", "reason"],
|
|
12422
|
+
properties: { t: { const: "ended" }, sid: { $ref: "#/$defs/id" }, reason: { enum: ["manager", "expired"] } }
|
|
12423
|
+
},
|
|
12424
|
+
sessions: {
|
|
12425
|
+
description: "Reserved for a later resync.",
|
|
12426
|
+
type: "object",
|
|
12427
|
+
additionalProperties: false,
|
|
12428
|
+
required: ["t", "active"],
|
|
12429
|
+
properties: { t: { const: "sessions" }, active: { type: "array", items: { $ref: "#/$defs/id" } } }
|
|
12430
|
+
}
|
|
12431
|
+
}
|
|
12432
|
+
},
|
|
12433
|
+
"https://freedome.nativemind.us/schemas/mcp/1.0/tools.schema.json": {
|
|
12434
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
12435
|
+
$id: "https://freedome.nativemind.us/schemas/mcp/1.0/tools.schema.json",
|
|
12436
|
+
$comment: "NativeMindNONC \u2014 freedome_contract (see LICENSE). The MCP catalogue mcp/tools.yaml (flows/sdd-freedome-mcp 02).",
|
|
12437
|
+
title: "Freedome MCP catalogue",
|
|
12438
|
+
type: "object",
|
|
12439
|
+
required: ["version", "tools"],
|
|
12440
|
+
additionalProperties: false,
|
|
12441
|
+
properties: {
|
|
12442
|
+
version: { const: 1 },
|
|
12443
|
+
$defs: { type: "object" },
|
|
12444
|
+
tools: { type: "array", minItems: 1, items: { $ref: "#/$defs/tool" } }
|
|
12445
|
+
},
|
|
12446
|
+
$defs: {
|
|
12447
|
+
text: {
|
|
12448
|
+
type: "object",
|
|
12449
|
+
required: ["en", "ru"],
|
|
12450
|
+
additionalProperties: false,
|
|
12451
|
+
properties: { en: { type: "string", minLength: 1 }, ru: { type: "string", minLength: 1 } }
|
|
12452
|
+
},
|
|
12453
|
+
tool: {
|
|
12454
|
+
type: "object",
|
|
12455
|
+
required: ["name", "group", "modes", "scope", "risk", "summary"],
|
|
12456
|
+
additionalProperties: false,
|
|
12457
|
+
oneOf: [{ required: ["planner"] }, { required: ["operationId"] }],
|
|
12458
|
+
properties: {
|
|
12459
|
+
name: { type: "string", pattern: "^[a-z][a-z0-9_]{1,47}$" },
|
|
12460
|
+
group: { type: "string", pattern: "^[a-z][a-z-]*$" },
|
|
12461
|
+
modes: { type: "array", minItems: 1, uniqueItems: true, items: { enum: ["planning", "simulation", "live"] } },
|
|
12462
|
+
planner: { type: "string", pattern: "^[a-z][a-z0-9_]*$" },
|
|
12463
|
+
operationId: { type: "string", pattern: "^[a-z][a-zA-Z0-9]*$" },
|
|
12464
|
+
scope: { type: "string", pattern: "^(none|anon|any|[a-z]+:[a-z]+)$" },
|
|
12465
|
+
risk: { enum: ["read", "control", "physical"] },
|
|
12466
|
+
status: { enum: ["planned"] },
|
|
12467
|
+
summary: { $ref: "#/$defs/text" },
|
|
12468
|
+
input: { type: "object" }
|
|
12469
|
+
}
|
|
12470
|
+
}
|
|
12471
|
+
}
|
|
12472
|
+
},
|
|
11947
12473
|
"https://freedome.nativemind.us/schemas/zelim/1.0/zelim-project.schema.json": {
|
|
11948
12474
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
11949
12475
|
$id: "https://freedome.nativemind.us/schemas/zelim/1.0/zelim-project.schema.json",
|