SSyncropel Docs

Blueprints

A reusable recipe that gives a new workspace a starting set of content, so it opens with something real instead of empty.

Overview

A blueprint is a packaged recipe for a starting point. Apply it to a new workspace and you get a populated one instead of a blank page: a starter workspace, some threads and some settings, ready to use.

Everything in Syncropel is a record, so a new workspace with no records is empty. A blueprint carries a set of starting records and adds them when applied, so the first thing you see is a working example.

blueprint  ─── applied to a new workspace ──▶  starting records are added
(a recipe)                                     ──▶ the workspace opens with content

Why blueprints exist

  • Quick to start. A new workspace shows what Syncropel does within seconds, not after an hour of setup.
  • Shareable setups. A good arrangement of threads, a useful layout or sensible default settings can be captured once and reused. You can hand a blueprint to someone else and they apply it in one step. The same blueprint gives the same starting point every time.

What applying a blueprint does

Applying a blueprint adds its starting records to your workspace. They are ordinary records, the same as ones you wrote by hand. The workspace, threads and settings they describe appear just as if you had created them yourself (see how state is derived).

This means:

  • Re-applying is safe. Applying the same blueprint twice doesn't duplicate anything.
  • Nothing special to undo. You edit, replace or archive the records the normal way. The blueprint isn't a live link.
  • You can see where it came from. The records are in the log, so you can see what the blueprint added and when.

Blueprints that deploy an actor

A blueprint can carry more than content. It can declare an actor: a definition that names the model the actor runs on, the tools it may call, the instructions it runs under and the kinds of record it may write, together with the tools it needs, the permission rules it should run behind, and any scheduled triggers (which always arrive switched off). Installing such a blueprint is how an actor is deployed on a workspace.

Because an actor definition changes what your workspace can do, deploying one has three safeguards:

  • The author signs, the owner trusts. A blueprint that declares an actor must carry its author's signature, and the author must be on the workspace's trusted-author list. spl blueprint sign <file> signs it in place; spl blueprint trust-author adds an author to the list. An unsigned blueprint, or one from an author the workspace has not trusted, installs only its starting content.
  • The owner approves the reviewed plan. spl blueprint plan prints every actor, tool and rule the blueprint would add, and a plan hash. The install must quote that hash. If the file changes between the review and the install, the hash no longer matches and the install is refused.
  • The installer's own permissions limit the actor. An actor can use no tool its installer could not grant, write no kind of record its installer may not write, and a tool it brings can claim no more privilege than the installer holds. These limits are checked when the blueprint is installed, not the first time the actor runs. A member with limited access gets a refusal that names the tool or kind; the owner has no such limit.

If anything is refused partway, no runnable actor is left behind without the tools and rules it was declared with.

spl blueprint plan census.json --extends tools.json          # review: actors, tools, rules, plan hash
spl blueprint sign census.json --extends tools.json          # sign in place with your signing key
spl blueprint trust-author                                   # trust that key on this workspace (once)
spl blueprint install census.json --extends tools.json --accept-plan <hash>

A blueprint may extend another, so a shared "tools" blueprint can be used by many actor blueprints. Pass each parent file with --extends; the signature covers the whole set.

There is a second way in. An actor may propose a blueprint with the propose_definition tool; the proposal is a decision request to the owner carrying the blueprint and its plan hash. Approving it installs the blueprint as the approver, limited by the approver's permissions, with no signature needed, because the owner has read the exact blueprint and said yes. The plan hash is checked again at install and a mismatch is refused, so what was approved is what lands. The installed definition records who proposed it and which request approved it.

Once installed, the actor runs like any other. The run's record names the exact definition and the exact prompt it used. See Actors.

Blueprints vs. workspaces

A blueprint and a workspace are easy to confuse, but they sit at different moments:

  • A workspace is the thing you work in: a live, rendered surface backed by records that change as you use it.
  • A blueprint is the recipe that sets one up, applied once at the start. After that, you work in the workspace, not the blueprint.

What's next

  • Records: what a blueprint adds, and how it turns into what you see.
  • Workspaces: the surface a starter blueprint commonly seeds.
  • Threads: where a blueprint's content is organized.
  • The engine: what keeps your workspace running.

On this page