SwarmOps
ReferenceMcp toolsupgrade

Page kind: Reference

upgrade#

Describes v0.11.0Last changed View as Markdown

Moves the store to the latest format this build writes, which takes free-form branches and tags; irreversible, older releases do not open it afterwards. On a store of that format already it changes nothing.

Metadata
Since
0.4.0
Mutates
yes
Identity required
no
Envelope op
upgrade
Cli command
swarmops upgrade
Request type
UpgradeReq
Annotations
{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false}
Max result chars
null
CLI command
swarmops upgrade

Input schema#

arguments is a UpgradeReq: swarmops schema UpgradeReq prints the type. A field the type does not know is ignored.

It takes no fields: pass {}.

JSON Schema#

As tools/list gives it: each $ref replaced by its definition, so that it stands alone.

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "`upgrade`: move the store to the latest format this build writes. It cannot be undone:\nolder releases do not open the store afterwards.",
  "title": "UpgradeReq",
  "type": "object"
}

Annotations#

It removes or rewrites store files that the journal and the objects stand for, and moves no ref and records nothing. Run again, it finds its work done.

AnnotationValueMeaning
destructiveHinttrueTrue: a tool that changes the store may overwrite or delete what is there, not only add to it.
idempotentHinttrueTrue: calling it again with the same arguments changes nothing more.
openWorldHintfalseTrue: it reaches beyond a closed set of things. Every tool here stays inside the store.
readOnlyHintfalseTrue: the tool does not change its environment, the store.

Its entry in tools/list carries no _meta.

CLI command#

swarmops upgrade runs the same operation and prints the same envelope.

Examples#

No recorded example yet.

Return information#

A tool result: the envelope, whose op is upgrade, as structuredContent and again as the text of its one content block. isError is true exactly when the envelope's ok is false. On success the envelope's result is what swarmops upgrade returns.

Errors#

A failed call is a tool result with isError: true; the envelope's error.code is one of the error codes.

  • E_INVALID_ARG: arguments that do not fit UpgradeReq, a field named twice among them included, or that break one of the server's own rules.
  • E_NOT_A_REPO: the server's store is not there; the server serves on.
  • E_INTERNAL: the operation panicked, a bug.

Then the errors of the operation, as swarmops upgrade lists them.

See also#

On this page