{ "$defs": { "ArgsFormat": { "description": "Format specifier for canister call/install args content.", "oneOf": [ { "const": "hex", "description": "Hex-encoded bytes", "type": "string" }, { "const": "candid", "description": "Candid text format", "type": "string" }, { "const": "bin", "description": "Raw binary (only valid for file references)", "type": "string" } ] }, "ControllerRef": { "description": "A controller: either a principal text (e.g. '2vxsx-fae') or a canister name in this project (e.g. 'my_canister')", "type": "string" }, "CyclesAmount": { "anyOf": [ { "format": "uint64", "minimum": 0, "type": "integer" }, { "type": "string" } ], "description": "An amount of cycles.\n\nDeserializes from a number or a string with suffixes (k, m, b, t) and optional underscore separators." }, "DurationAmount": { "anyOf": [ { "format": "uint64", "minimum": 0, "type": "integer" }, { "type": "string" } ], "description": "A duration in seconds.\n\nDeserializes from a number (seconds) or a string with duration suffix (s, m, h, d, w)\nand optional underscore separators.\n\nSuffixes (case-insensitive):\n- `s` — seconds\n- `m` — minutes (×60)\n- `h` — hours (×3600)\n- `d` — days (×86400)\n- `w` — weeks (×604800)\n\nA bare number without suffix is treated as seconds." }, "LogVisibility": { "description": "Controls who can read canister logs.", "oneOf": [ { "description": "Simple log visibility: 'controllers' (only controllers can view) or 'public' (anyone can view)", "enum": [ "controllers", "public" ], "type": "string" }, { "additionalProperties": false, "description": "Specific principals that can view logs", "properties": { "allowed_viewers": { "description": "List of principal IDs that can view canister logs", "items": { "description": "A principal ID that can view logs", "type": "string" }, "type": "array" } }, "required": [ "allowed_viewers" ], "type": "object" } ] }, "ManifestInitArgs": { "anyOf": [ { "description": "Plain string shorthand — treated as Candid.", "type": "string" }, { "description": "File reference with explicit format.", "properties": { "format": { "$ref": "#/$defs/ArgsFormat", "default": "candid" }, "path": { "type": "string" } }, "required": [ "path" ], "type": "object" }, { "description": "Inline value with explicit format.", "properties": { "format": { "$ref": "#/$defs/ArgsFormat", "default": "candid" }, "value": { "type": "string" } }, "required": [ "value" ], "type": "object" } ], "description": "Init args as specified in a manifest file (canister.yaml or icp.yaml).\n\nA plain string is shorthand for inline Candid:\n```yaml\ninit_args: \"(42)\"\n```\n\nObject forms with explicit source and format:\n```yaml\ninit_args:\n path: ./args.bin\n format: bin\n```\n```yaml\ninit_args:\n value: \"(42)\"\n format: candid\n```" }, "MemoryAmount": { "anyOf": [ { "format": "uint64", "minimum": 0, "type": "integer" }, { "type": "string" } ], "description": "An amount of memory in bytes.\n\nDeserializes from a number or a string with suffixes (kb, kib, mb, mib, gb, gib),\noptional decimals, and optional underscore separators." }, "Settings": { "description": "Canister settings, such as compute and memory allocation.", "properties": { "compute_allocation": { "description": "Compute allocation (0 to 100). Represents guaranteed compute capacity.", "format": "uint64", "minimum": 0, "type": [ "integer", "null" ] }, "controllers": { "default": null, "description": "Controllers for this canister. Each entry is either a principal text\n(e.g. \"2vxsx-fae\") or the name of another canister in this project.\nNamed canisters that do not yet exist will be set as controllers once created.", "items": { "$ref": "#/$defs/ControllerRef" }, "type": [ "array", "null" ] }, "environment_variables": { "additionalProperties": { "type": "string" }, "description": "Environment variables for the canister as key-value pairs.\nThese variables are accessible within the canister and can be used to configure\nbehavior without hardcoding values in the WASM module.", "type": [ "object", "null" ] }, "freezing_threshold": { "anyOf": [ { "$ref": "#/$defs/DurationAmount" }, { "type": "null" } ], "description": "Freezing threshold in seconds. Controls how long a canister can be inactive before being frozen.\nSupports duration suffixes in YAML: s, m, h, d, w (e.g. \"30d\" or \"4w\")." }, "log_memory_limit": { "anyOf": [ { "$ref": "#/$defs/MemoryAmount" }, { "type": "null" } ], "description": "Log memory limit in bytes (max 2 MiB). Oldest logs are purged when usage exceeds this value.\nSupports suffixes in YAML: kb, kib, mb, mib (e.g. \"2mib\" or \"256kib\"). Canister default is 4096 bytes." }, "log_visibility": { "anyOf": [ { "$ref": "#/$defs/LogVisibility" }, { "type": "null" } ], "description": "Controls who can read canister logs." }, "memory_allocation": { "anyOf": [ { "$ref": "#/$defs/MemoryAmount" }, { "type": "null" } ], "description": "Memory allocation in bytes. If unset, memory is allocated dynamically.\nSupports suffixes in YAML: kb, kib, mb, mib, gb, gib (e.g. \"4gib\" or \"2.5kb\")." }, "reserved_cycles_limit": { "anyOf": [ { "$ref": "#/$defs/CyclesAmount" }, { "type": "null" } ], "description": "Upper limit on cycles reserved for future resource payments.\nMemory allocations that would push the reserved balance above this limit will fail.\nSupports suffixes in YAML: k, m, b, t (e.g. \"4t\" or \"4.3t\")." }, "wasm_memory_limit": { "anyOf": [ { "$ref": "#/$defs/MemoryAmount" }, { "type": "null" } ], "description": "Wasm memory limit in bytes. Sets an upper bound for Wasm heap growth.\nSupports suffixes in YAML: kb, kib, mb, mib, gb, gib (e.g. \"4gib\" or \"2.5kb\")." }, "wasm_memory_threshold": { "anyOf": [ { "$ref": "#/$defs/MemoryAmount" }, { "type": "null" } ], "description": "Wasm memory threshold in bytes. Triggers a callback when exceeded.\nSupports suffixes in YAML: kb, kib, mb, mib, gb, gib (e.g. \"4gib\" or \"2.5kb\")." } }, "type": "object" } }, "$id": "EnvironmentManifest", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "Schema for EnvironmentManifest", "properties": { "canisters": { "description": "An optional list of the canisters to be included in this environments.\nDefaults to all the canisters if not specified.", "items": { "type": "string" }, "type": [ "array", "null" ] }, "init_args": { "additionalProperties": { "$ref": "#/$defs/ManifestInitArgs" }, "description": "Override init args for specific canisters in this environment", "type": [ "object", "null" ] }, "name": { "type": "string" }, "network": { "description": "The target network for canister deployment.\nDefaults to the `local` network if not specified", "type": [ "string", "null" ] }, "settings": { "additionalProperties": { "$ref": "#/$defs/Settings" }, "description": "Override the canister settings for this environment", "type": [ "object", "null" ] } }, "required": [ "name" ], "title": "EnvironmentManifest", "type": "object" }