@semiont/backend 0.5.1 → 0.5.3

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/openapi.json CHANGED
@@ -3310,7 +3310,7 @@
3310
3310
  },
3311
3311
  "EntityTypeAddedPayload": {
3312
3312
  "type": "object",
3313
- "description": "Payload for mark:entity-type-added domain event",
3313
+ "description": "Payload for frame:entity-type-added domain event (system-level, no resourceId — fan-out is global)",
3314
3314
  "properties": {
3315
3315
  "entityType": {
3316
3316
  "type": "string"
@@ -3320,6 +3320,18 @@
3320
3320
  "entityType"
3321
3321
  ]
3322
3322
  },
3323
+ "TagSchemaAddedPayload": {
3324
+ "type": "object",
3325
+ "description": "Payload for frame:tag-schema-added domain event (system-level, no resourceId — fan-out is global to the KB).",
3326
+ "properties": {
3327
+ "schema": {
3328
+ "$ref": "#/components/schemas/TagSchema"
3329
+ }
3330
+ },
3331
+ "required": [
3332
+ "schema"
3333
+ ]
3334
+ },
3323
3335
  "EntityTagChangedPayload": {
3324
3336
  "type": "object",
3325
3337
  "description": "Payload for mark:entity-tag-added and mark:entity-tag-removed domain events",
@@ -3730,6 +3742,20 @@
3730
3742
  "entityReferences"
3731
3743
  ]
3732
3744
  },
3745
+ "GetTagSchemasResponse": {
3746
+ "type": "object",
3747
+ "properties": {
3748
+ "tagSchemas": {
3749
+ "type": "array",
3750
+ "items": {
3751
+ "$ref": "#/components/schemas/TagSchema"
3752
+ }
3753
+ }
3754
+ },
3755
+ "required": [
3756
+ "tagSchemas"
3757
+ ]
3758
+ },
3733
3759
  "GoogleAuthRequest": {
3734
3760
  "type": "object",
3735
3761
  "properties": {
@@ -5494,6 +5520,34 @@
5494
5520
  "path"
5495
5521
  ]
5496
5522
  },
5523
+ "BrowseTagSchemasRequest": {
5524
+ "type": "object",
5525
+ "description": "Request to browse registered tag schemas",
5526
+ "properties": {
5527
+ "correlationId": {
5528
+ "type": "string"
5529
+ }
5530
+ },
5531
+ "required": [
5532
+ "correlationId"
5533
+ ]
5534
+ },
5535
+ "BrowseTagSchemasResult": {
5536
+ "type": "object",
5537
+ "description": "Result of browsing tag schemas",
5538
+ "properties": {
5539
+ "correlationId": {
5540
+ "type": "string"
5541
+ },
5542
+ "response": {
5543
+ "$ref": "#/components/schemas/GetTagSchemasResponse"
5544
+ }
5545
+ },
5546
+ "required": [
5547
+ "correlationId",
5548
+ "response"
5549
+ ]
5550
+ },
5497
5551
  "FragmentSelector": {
5498
5552
  "type": "object",
5499
5553
  "description": "W3C Web Annotation FragmentSelector for media fragment identifiers (RFC 3778 for PDFs)",
@@ -6338,9 +6392,9 @@
6338
6392
  "byCategory"
6339
6393
  ]
6340
6394
  },
6341
- "MarkAddEntityTypeCommand": {
6395
+ "FrameAddEntityTypeCommand": {
6342
6396
  "type": "object",
6343
- "description": "Bus command to add a new entity type tag.",
6397
+ "description": "Bus command to add a new entity type to the KB's vocabulary. Carried on the `frame:add-entity-type` channel — Frame is the schema-layer flow that owns vocabulary writes.",
6344
6398
  "properties": {
6345
6399
  "tag": {
6346
6400
  "type": "string"
@@ -6354,6 +6408,22 @@
6354
6408
  "tag"
6355
6409
  ]
6356
6410
  },
6411
+ "FrameAddTagSchemaCommand": {
6412
+ "type": "object",
6413
+ "description": "Bus command to register a tag schema with the KB's runtime registry. Carried on the `frame:add-tag-schema` channel — Frame is the schema-layer flow that owns vocabulary writes. Most-recent registration of a given `schema.id` wins; the projection reflects the latest content. Identical re-registrations are silent; differing content overwrites and logs a warning.",
6414
+ "properties": {
6415
+ "schema": {
6416
+ "$ref": "#/components/schemas/TagSchema"
6417
+ },
6418
+ "_userId": {
6419
+ "type": "string",
6420
+ "description": "Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this."
6421
+ }
6422
+ },
6423
+ "required": [
6424
+ "schema"
6425
+ ]
6426
+ },
6357
6427
  "MarkArchiveCommand": {
6358
6428
  "type": "object",
6359
6429
  "description": "Bus command to archive a resource and optionally remove its file.",
@@ -6890,6 +6960,61 @@
6890
6960
  "value"
6891
6961
  ]
6892
6962
  },
6963
+ "TagCategory": {
6964
+ "type": "object",
6965
+ "description": "A single category within a tag schema (e.g. 'Issue' in IRAC, 'distinguished' in legal-citation-treatment). Each category carries methodology-bound semantics: a name, a description, and examples used in the LLM prompt.",
6966
+ "properties": {
6967
+ "name": {
6968
+ "type": "string"
6969
+ },
6970
+ "description": {
6971
+ "type": "string"
6972
+ },
6973
+ "examples": {
6974
+ "type": "array",
6975
+ "items": {
6976
+ "type": "string"
6977
+ }
6978
+ }
6979
+ },
6980
+ "required": [
6981
+ "name",
6982
+ "description",
6983
+ "examples"
6984
+ ]
6985
+ },
6986
+ "TagSchema": {
6987
+ "type": "object",
6988
+ "description": "A structural-analysis schema (e.g. legal-irac, scientific-imrad, argument-toulmin). Defines a methodology framework as an id, name, description, domain hint, and an ordered list of categories. KBs and their skills register schemas with the runtime registry via `frame.addTagSchema(...)` at session start.",
6989
+ "properties": {
6990
+ "id": {
6991
+ "type": "string"
6992
+ },
6993
+ "name": {
6994
+ "type": "string"
6995
+ },
6996
+ "description": {
6997
+ "type": "string"
6998
+ },
6999
+ "domain": {
7000
+ "type": "string",
7001
+ "description": "Free-form domain hint (e.g. 'legal', 'scientific', 'general'). Used in the LLM prompt to tune the model's analysis voice. KB authors choose."
7002
+ },
7003
+ "tags": {
7004
+ "type": "array",
7005
+ "items": {
7006
+ "$ref": "#/components/schemas/TagCategory"
7007
+ }
7008
+ }
7009
+ },
7010
+ "required": [
7011
+ "id",
7012
+ "name",
7013
+ "description",
7014
+ "domain",
7015
+ "tags"
7016
+ ]
7017
+ },
6893
7018
  "YieldCloneCreateCommand": {
6894
7019
  "type": "object",
6895
7020
  "description": "Bus command to create a cloned resource from a clone token.",
@@ -7102,57 +7227,6 @@
7102
7227
  "toUri"
7103
7228
  ]
7104
7229
  },
7105
- "YieldRequestCommand": {
7106
- "type": "object",
7107
- "description": "Bus command to request yield (generation) of a new resource from an annotation.",
7108
- "properties": {
7109
- "correlationId": {
7110
- "type": "string",
7111
- "description": "Client-supplied id used to match this command to its result event(s) on the events-stream. Generated by the route handler if absent."
7112
- },
7113
- "annotationId": {
7114
- "type": "string"
7115
- },
7116
- "resourceId": {
7117
- "type": "string"
7118
- },
7119
- "options": {
7120
- "type": "object",
7121
- "properties": {
7122
- "title": {
7123
- "type": "string"
7124
- },
7125
- "prompt": {
7126
- "type": "string"
7127
- },
7128
- "language": {
7129
- "type": "string"
7130
- },
7131
- "temperature": {
7132
- "type": "number"
7133
- },
7134
- "maxTokens": {
7135
- "type": "integer"
7136
- },
7137
- "context": {
7138
- "$ref": "#/components/schemas/GatheredContext"
7139
- },
7140
- "storageUri": {
7141
- "type": "string"
7142
- }
7143
- },
7144
- "required": [
7145
- "title",
7146
- "storageUri"
7147
- ]
7148
- }
7149
- },
7150
- "required": [
7151
- "annotationId",
7152
- "resourceId",
7153
- "options"
7154
- ]
7155
- },
7156
7230
  "YieldUpdateCommand": {
7157
7231
  "type": "object",
7158
7232
  "description": "Bus command to update a yielded resource's storage content.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semiont/backend",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "type": "module",
5
5
  "description": "Semiont backend server - pre-built for npm consumption",
6
6
  "main": "dist/index.js",
@@ -20,10 +20,10 @@
20
20
  "@hono/swagger-ui": "^0.6.1",
21
21
  "@prisma/adapter-pg": "^7.5.0",
22
22
  "@prisma/client": "^7.5.0",
23
- "@semiont/core": "^0.5.1",
24
- "@semiont/event-sourcing": "^0.5.1",
25
- "@semiont/jobs": "^0.5.1",
26
- "@semiont/make-meaning": "^0.5.1",
23
+ "@semiont/core": "^0.5.3",
24
+ "@semiont/event-sourcing": "^0.5.3",
25
+ "@semiont/jobs": "^0.5.3",
26
+ "@semiont/make-meaning": "^0.5.3",
27
27
  "ajv": "^8.17.1",
28
28
  "ajv-formats": "^3.0.1",
29
29
  "argon2": "^0.44.0",