@unified-product-graph/cloud-server 0.8.5 → 0.8.6

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.
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "schema_version": "2",
3
3
  "package": "@unified-product-graph/cloud-server",
4
- "package_version": "0.8.5",
5
- "tool_count": 91,
4
+ "package_version": "0.8.6",
5
+ "tool_count": 93,
6
6
  "domains": [
7
7
  "products",
8
8
  "context",
9
9
  "nodes",
10
10
  "edges",
11
+ "frameworks",
11
12
  "areas",
12
13
  "schema",
13
14
  "collaboration",
@@ -1009,6 +1010,100 @@
1009
1010
  "return_shape": "{ from, to, affected: number, dry_run: boolean }",
1010
1011
  "atomicity": "atomic-with-rollback (write path)"
1011
1012
  },
1013
+ {
1014
+ "name": "apply_framework",
1015
+ "description": "Apply a framework (MoSCoW, RICE, Kano, ...) to a set of entities in a product: creates a framework_exercise node and an `includes` edge to each entity. The per-entity result is recorded on the edge via score_entity, never on the entity node, so the same entity can sit in many exercises and any entity type can be scored. Returns { exercise_id, exercise, included, warnings }.",
1016
+ "domain": "frameworks",
1017
+ "inputSchema": {
1018
+ "type": "object",
1019
+ "properties": {
1020
+ "product_id": {
1021
+ "type": "string",
1022
+ "description": "Required. Product the exercise belongs to."
1023
+ },
1024
+ "framework_id": {
1025
+ "type": "string",
1026
+ "description": "Required. UPGFramework.id (e.g. \"moscow\", \"rice-scoring\")."
1027
+ },
1028
+ "title": {
1029
+ "type": "string",
1030
+ "description": "Human label for the exercise (default \"<Framework> exercise\")."
1031
+ },
1032
+ "entity_ids": {
1033
+ "type": "array",
1034
+ "items": {
1035
+ "type": "string"
1036
+ },
1037
+ "description": "Entities to pull into the exercise (any type)."
1038
+ },
1039
+ "status": {
1040
+ "type": "string",
1041
+ "description": "Lifecycle phase: draft | active | archived (default draft)."
1042
+ }
1043
+ },
1044
+ "required": [
1045
+ "product_id",
1046
+ "framework_id"
1047
+ ]
1048
+ },
1049
+ "throws": [
1050
+ "textError on a missing product_id/framework_id or an unknown framework_id."
1051
+ ],
1052
+ "examples": [],
1053
+ "warnings": [],
1054
+ "see": [
1055
+ "score_entity"
1056
+ ],
1057
+ "source": "src/tools/frameworks.ts:27",
1058
+ "symbol": "applyFramework",
1059
+ "returns": "JSON: `{ exercise_id, exercise, included: [{ edge_id, entity_id }], warnings }`.",
1060
+ "return_shape": "{ exercise_id, exercise, included: [{ edge_id, entity_id }], warnings }",
1061
+ "atomicity": "per-write atomic; the exercise node and each includes edge commit\nindependently (a target that cannot be included is reported in `warnings`)."
1062
+ },
1063
+ {
1064
+ "name": "score_entity",
1065
+ "description": "Record a framework's result for one entity on the exercise's includes edge (a MoSCoW bucket, a RICE score, a canvas slot). Auto-includes the entity if not already in scope. Merges into existing edge properties unless replace is set. The product is resolved from the exercise node. Returns { edge, warnings }.",
1066
+ "domain": "frameworks",
1067
+ "inputSchema": {
1068
+ "type": "object",
1069
+ "properties": {
1070
+ "exercise_id": {
1071
+ "type": "string",
1072
+ "description": "Required. The framework_exercise id."
1073
+ },
1074
+ "entity_id": {
1075
+ "type": "string",
1076
+ "description": "Required. The entity being scored."
1077
+ },
1078
+ "values": {
1079
+ "type": "object",
1080
+ "description": "Required. The result as { input: value }, e.g. { \"moscow\": \"must\" } or { \"reach\": 800, \"impact\": 3 }."
1081
+ },
1082
+ "replace": {
1083
+ "type": "boolean",
1084
+ "description": "Replace the edge properties instead of merging (default false)."
1085
+ }
1086
+ },
1087
+ "required": [
1088
+ "exercise_id",
1089
+ "entity_id",
1090
+ "values"
1091
+ ]
1092
+ },
1093
+ "throws": [
1094
+ "textError when the exercise/entity is missing or the node is not a\nframework_exercise."
1095
+ ],
1096
+ "examples": [],
1097
+ "warnings": [],
1098
+ "see": [
1099
+ "apply_framework"
1100
+ ],
1101
+ "source": "src/tools/frameworks.ts:97",
1102
+ "symbol": "scoreEntity",
1103
+ "returns": "JSON: `{ edge, warnings }`.",
1104
+ "return_shape": "{ edge, warnings }",
1105
+ "atomicity": "atomic-with-rollback (single edge upsert)."
1106
+ },
1012
1107
  {
1013
1108
  "name": "create_area",
1014
1109
  "description": "Create a new product area node (type 'area') in a product. Product areas are top-level organisational units within a product.",
@@ -0,0 +1,14 @@
1
+ -- 005_edge_properties.sql
2
+ --
3
+ -- Framework-exercise parity (UPG 0.8.6): edges may now carry a structured
4
+ -- payload. The local `.upg` format gained gated edge `properties` in 0.8.4
5
+ -- (the `framework_exercise_includes_node` edge records a framework's per-entity
6
+ -- result on the edge, not the node). This brings the Postgres-backed cloud
7
+ -- store to parity by adding a dedicated `properties` JSONB column, distinct from
8
+ -- the server-managed `metadata` column.
9
+ --
10
+ -- Additive + idempotent: safe to run on an existing deployment. Existing edges
11
+ -- get a NULL payload (read back as "no properties").
12
+
13
+ ALTER TABLE upg.edges
14
+ ADD COLUMN IF NOT EXISTS properties JSONB;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unified-product-graph/cloud-server",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "description": "Postgres-backed MCP server for the Unified Product Graph, self-hostable, open source",
5
5
  "license": "MIT",
6
6
  "author": "The Product Creator <hello@theproductcreator.com>",