SpaceBuildFiles space.build-files@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
space
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/space/build-files.v1.json

space.build-files@1: the source files of one of a person's spaces, as their agent sees them (OpenVibe.Space's builder API; plan 2026-10-22 §Z stage Z1). GET /api/v1/spaces/:id/files answers { files }: every file of the space, its path and its whole content. The same shape is the body of PUT /api/v1/spaces/:id/files (space.build-write@1): the files to write, which replace the space's files as a whole.

Fields

FieldTypeRequiredDescriptionConstraints
filesarray of objectyes
  • maxItems 20
  • items: no other fields
files[].pathstringyesThe file's path inside the space: letters, digits, ".", "-", "_", up to four folders.
  • pattern ^[A-Za-z0-9][A-Za-z0-9._-]*(/[A-Za-z0-9][A-Za-z0-9._-]*){0,3}$
  • maxLength 80
files[].contentstringyesThe file's whole content.
  • maxLength 200000

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: two
{
  "files": [
    {
      "path": "index.html",
      "content": "<!doctype html><title>My Podcast</title>"
    },
    {
      "path": "style.css",
      "content": "body { font: 16px system-ui; }"
    }
  ]
}
Rejected: bad-path
{
  "files": [
    {
      "path": "../secrets.txt",
      "content": "no"
    }
  ]
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('space.build-files@1', value);   // { valid, errors: [{ path, message }] }