Solution packages
Much of what one operation needs, another needs too: a cold chain pack with its equipment type, maintenance booking action and health metric, or a maintenance pack for a fleet. A solution package carries those definitions out of the ontology where they were proven and into another one, where they are mapped to that company's own tables, groups, people and systems, reviewed by its owners and merged like any other model change. Installed definitions stay locked to the package, so an upgrade can be applied later as a clean difference
In the platform today
- Solution packages run in the platform service with tests, on top of model change sets
- A package is a folder per name and version, with
package.yaml,content.yamlandfunctions.py, or a signed JSON file ("format": "mso-package/1") brought in throughPOST /api/v2/packages:import - It holds value types, shared properties, interfaces, object types, link types, action types, pipelines, Python functions, metrics and dashboards, automations, agents, verified answers and apps
POST /api/v2/packages:exportpicks definitions by kind and brings what they need;POST /api/v2/packages/{name}:planand:installmap the inputs and open a change set;:upgrade,:downgrade,:uninstallPreview,:uninstalland:detachmanage it afterwards- Installs and imported files are recorded, and every step is audited
- The Solutions library screen in Admin lists what is installed and what can be, when the app is connected to the service
- TypeScript functions, AI functions, evaluations, document sources, connectors, shares, time series and sealed properties in a package, and release channels with a timer that upgrades on its own
- Administrator to export, import, install, upgrade, downgrade, uninstall or detach
- The owners of every affected object type to approve the change set, as for any model change
- In the target ontology: every required input of the package, under its own name or one you map it to
- Any packages it depends on, installed at a matching version
What a package holds
A package folder has three files
package.yamlis the manifest: the name (lower case letters, digits and dashes), the version (major.minor.patch), a title and description, the packages it depends on, its declared inputs and a list of its contentscontent.yamlholds the definitions exactly as they are written inontology.yamlandpipelines.yaml, and apps as the app builder stores themfunctions.pyholds the Python source of the package's functions with the helpers, constants and imports they use, cut from the exporting ontology'sfunctions.py
# package.yaml
name: cold-chain-monitoring
version: 1.0.0
title: Cold chain monitoring
dependencies:
- { name: cold-storage-base, version: ^1.0.0 } # exact, ^, ~ or >=
inputs: # what the contents use but do not hold
- { id: dataset:gold.equipment, kind: dataset, ref: gold.equipment,
key: equipmentId, columns: [equipmentId, name, health] }
- { id: group:plant-maintenance, kind: group, ref: plant-maintenance,
presets: { default: maintenance, choices: [maintenance, operations] } }
- { id: system:maintenance, kind: system, ref: maintenance, operations: [add-window] }
contents:
objectTypes: [equipment]
actionTypes: [schedule-maint]
metrics: [equipment-below-health]
functions: [maint_edits, maint_status]
Inputs
Data and organisation never travel in a package. Whatever the definitions use but do not hold is a declared input, with the name the contents use (ref) and optional presets: a default and the allowed choices. Each input's id is <kind>:<ref>
| Kind | What it stands for |
|---|---|
dataset | A source table: an object type's backing dataset, a pipeline or metric input, or a table a function names. Lists the columns the contents read. A table only a function reads is not required |
group | A group named in allowed groups, notifications, hiddenFrom, sharing or an owner |
userAttribute | A user attribute a row policy or a notification recipient reads |
user | A person: an automation's owner, a dashboard's owner, a metric's steward |
system | A writeback system, with the operations the actions call |
accessLabel | An access label on a type or an action |
Export
{
"name": "cold-chain-monitoring", "version": "1.0.0",
"selection": {
"objectTypes": ["equipment"],
"actionTypes": ["schedule-maint"],
"metrics": ["equipment-below-health"]
},
"dependencies": [ { "name": "cold-storage-base" } ],
"output": "file"
}
An administrator picks definitions by kind, or single pipeline steps by their output under datasets. What they need comes with them
- The types an action, metric, automation or app names
- The value types and shared properties of a type's properties
- The interfaces a parameter needs
- The functions an action, agent, automation or verified answer calls
- Every link whose two ends are both in the package
Anything a dependency package already holds stays with that package. The result is a preview with notes on anything left out; "output": "file" returns the signed file and "output": "folder" writes the package folder
Install
{
"version": "1.0.0",
"mapping": {
"group:plant-maintenance": "maintenance",
"dataset:gold.equipment": "gold.assets"
},
"prefix": "cc-"
}
The plan maps each input: to the name you give, else its preset default, else the name the contents use. An optional prefix or suffix is added to every definition and dataset the package makes. Before anything is created the plan checks
- That dependencies are installed at a matching version
- That every input exists in this ontology: tables and their columns, groups, attributes, people, systems and their operations, access labels, and the allowed choices
- That no name is taken, that the operations apply and that the folder loads
:install with the same body then opens a model change set holding the definitions as operations, with the package's pipelines and functions as files written with it. It goes through the usual checks, a preview on a throwaway data branch where the package's pipelines build first, and owner review
The merge builds the pipelines, syncs the new types, creates and publishes the apps, and records the install
Locks and detaching
Installed definitions are locked. A model change to one, whether to a package type, its properties or implementations, a link, action, value type, shared property, interface, metric, dashboard, automation, agent or verified answer, is refused with PACKAGE_CONTENT_LOCKED unless it comes from the package's own change set
To take a definition over, an administrator detaches it with POST /api/v2/packages/{name}:detach, giving its kind, id and a reason; the detach is audited, and a detached definition stays when the package is upgraded or removed. Pipelines, functions and apps of a package stay editable in their own builders
Upgrade and downgrade
:upgrade, with an optional version, and :downgrade, to the version installed before or a named older one, open a change set holding only the differences between the installed version and the other, keeping the earlier input mapping. An input that is new in that version needs mapping; without one, or a valid preset default, the upgrade waits with PACKAGE_INPUTS_NEEDED and names it. With "auto": true from an administrator, an upgrade that needs no new mapping proceeds without a person: the owners' approval of the installed package stands, and it merges unless a check blocks it
Uninstall
:uninstallPreview lists what would be removed, and :uninstall with the package name typed as confirm removes every definition the package installed that has not been detached. It is refused while another installed package depends on this one, or while a definition outside the package uses its content. Lake tables, the object tables and the gold tables its pipelines built are kept; apps are deleted with their history kept
Signing and import
Export signs the file with Ed25519, using a signing key set for the service, otherwise the tenant's own signing key, kept sealed by the key service. POST /api/v2/packages:import with {"file": …} accepts a file signed by a trusted key: the tenant's own, the service's signing key, or one listed in the service settings. An unsigned, altered or untrusted file is refused. An administrator can make an audited exception, and the plan then marks the package untrusted
API
| Endpoint | Does |
|---|---|
GET /api/v2/packages, /{name} | Packages installed and available, and one with its versions, mapping and definitions |
POST /api/v2/packages:export | Exports a selection as a preview, a signed file or a folder |
POST /api/v2/packages:import | Imports a signed file |
POST /api/v2/packages/{name}:plan | Checks an install, upgrade, downgrade or uninstall (operation) without changing anything |
POST …/{name}:install, :upgrade, :downgrade | Opens the change set, or merges it with auto |
POST …/{name}:uninstallPreview, :uninstall | Shows, then removes, what the package installed |
POST …/{name}:detach | Releases one definition from the package's lock |
Limitations
- A package carries Python functions only. TypeScript functions, AI functions, evaluations, document sources, connectors, shares, time series and sealed properties in a package are delivered on request
- Upgrades are started by an administrator. Release channels, maintenance windows and a timer that upgrades on its own are delivered on request
- Values passed as function arguments are renamed by a prefix or suffix only where they name a type
- Pipelines, functions and apps of a package are not locked against their own builders