Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 58 additions & 56 deletions container/deploy.k9.ncl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
K9!
# SPDX-License-Identifier: PMPL-1.0-or-later
# deploy.k9.ncl — Bundle of Joy Server deployment component (Hunt level)
#
Expand All @@ -12,61 +13,6 @@
# k9-svc validate container/deploy.k9.ncl
# k9-svc deploy container/deploy.k9.ncl --env production

# The component's pedigree (self-description across five layers)
let component_pedigree = {
# ─────────────────────────────────────────────────────────────
# L1: The Snout — Identity
# ─────────────────────────────────────────────────────────────
metadata = {
name = "boj-server-deploy",
version = "0.1.0",
breed = "application/vnd.k9+nickel",
magic_number = "K9!",
description = "Bundle of Joy Server deployment component (Hunt level)",
},

# ─────────────────────────────────────────────────────────────
# L2: The Scent — Target Environment
# ─────────────────────────────────────────────────────────────
target = {
os = 'Linux,
is_edge = false,
requires_podman = true,
min_memory_mb = 256,
},

# ─────────────────────────────────────────────────────────────
# L3: The Leash — Security
# ─────────────────────────────────────────────────────────────
security = {
trust_level = 'Hunt,
allow_network = true,
allow_filesystem_write = true,
allow_subprocess = true,
# In production, replace with a real Ed25519 signature.
signature = "PLACEHOLDER-SIGNATURE-REQUIRED-FOR-HUNT",
},

# ─────────────────────────────────────────────────────────────
# L4: The Gut — Self-Validation
# ─────────────────────────────────────────────────────────────
validation = {
checksum = "sha256:placeholder",
pedigree_version = "1.0.0",
hunt_authorized = false, # Must be set true after handshake
},

# ─────────────────────────────────────────────────────────────
# L5: The Muscle — Deployment Recipes
# ─────────────────────────────────────────────────────────────
recipes = {
install = "just container-build",
validate = "just container-verify",
deploy = "just container-up",
migrate = "just container-build && just container-up",
},
} in

# Deployment configuration
let deployment = {
# Target environments (dev / staging / production)
Expand Down Expand Up @@ -142,8 +88,64 @@ echo "K9: Rollback complete."
} in

# Export the component
# The pedigree is inlined at the top level so the canonical
# hyperpolymath/k9-validate-action regex finds
# pedigree = { … metadata = { name = …, version = … } … }
# directly. Previously the metadata lived in a `let component_pedigree`
# binding which was opaque to the line-based validator.
{
pedigree = component_pedigree,
pedigree = {
schema_version = "1.0.0",
component_type = "deployment-component",
# ─────────────────────────────────────────────────────────────
# L1: The Snout — Identity
# ─────────────────────────────────────────────────────────────
metadata = {
name = "boj-server-deploy",
version = "0.1.0",
breed = "application/vnd.k9+nickel",
magic_number = "K9!",
description = "Bundle of Joy Server deployment component (Hunt level)",
},
# ─────────────────────────────────────────────────────────────
# L2: The Scent — Target Environment
# ─────────────────────────────────────────────────────────────
target = {
os = 'Linux,
is_edge = false,
requires_podman = true,
min_memory_mb = 256,
},
# ─────────────────────────────────────────────────────────────
# L3: The Leash — Security
# ─────────────────────────────────────────────────────────────
security = {
leash = 'Hunt,
trust_level = 'Hunt,
allow_network = true,
allow_filesystem_write = true,
allow_subprocess = true,
# In production, replace with a real Ed25519 signature.
signature = "PLACEHOLDER-SIGNATURE-REQUIRED-FOR-HUNT",
},
# ─────────────────────────────────────────────────────────────
# L4: The Gut — Self-Validation
# ─────────────────────────────────────────────────────────────
validation = {
checksum = "sha256:placeholder",
pedigree_version = "1.0.0",
hunt_authorized = false, # Must be set true after handshake
},
# ─────────────────────────────────────────────────────────────
# L5: The Muscle — Deployment Recipes
# ─────────────────────────────────────────────────────────────
recipes = {
install = "just container-build",
validate = "just container-verify",
deploy = "just container-up",
migrate = "just container-build && just container-up",
},
},
deployment = deployment,
scripts = scripts,

Expand Down
Loading