prizmkit 1.1.169 → 1.1.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +191 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +33 -1
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +191 -0
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +54 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +422 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/references/infrastructure-convention-discovery.md +3 -1
- package/bundled/skills/prizmkit-deploy/SKILL.md +29 -15
- package/bundled/skills/prizmkit-deploy/references/capability-contract.md +11 -3
- package/bundled/skills/prizmkit-deploy/references/deploy-record-schema.json +21 -1
- package/bundled/skills/prizmkit-deploy/references/policy-and-execution.md +28 -10
- package/bundled/skills/prizmkit-deploy/references/verification-and-recovery.md +7 -3
- package/bundled/skills/prizmkit-deploy/scripts/validate-deploy-artifact.py +27 -1
- package/package.json +1 -1
|
@@ -8,16 +8,28 @@ An explicit deploy invocation authorizes the selected Profile's standard deploym
|
|
|
8
8
|
|
|
9
9
|
`deploy plan` is read-only. It reports the selected Profile, observed current state, latest allowed desired release, expected actions, downtime/data/rollback/resource/cleanup effects, verification, and optional automation opportunity without performing writes.
|
|
10
10
|
|
|
11
|
-
The standard envelope covers project-owned, bounded actions needed to build/package, resolve project-declared dependencies, apply non-destructive native migrations, create a candidate, start/restart, hand off live traffic, verify, retain bounded rollback, retire exact old runtime resources, clean failed/temporary resources, and update the selected Profile record.
|
|
11
|
+
The standard envelope covers project-owned, bounded actions needed to build/package, resolve project-declared dependencies, apply non-destructive native migrations, create a candidate, start/restart, hand off live traffic, verify, retain bounded rollback when not explicitly declined, retire exact old runtime resources, clean failed/temporary resources, and update the selected Profile record.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
For a selected directly managed remote machine, connecting and running bounded project-scoped actions through the established SSH destination are part of that standard envelope. Do not ask for another confirmation merely because the next executable is `ssh`; use established non-interactive credentials first. A missing Profile record or ordinary first deployment also does not create a checkpoint when one non-conflicting target resolves from current evidence.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
2. a target choice current evidence cannot resolve;
|
|
17
|
-
3. an irreversible data effect or data impact that cannot be bounded safely;
|
|
18
|
-
4. a shared or unknown-ownership resource decision.
|
|
15
|
+
### User Intent and Fast Completion
|
|
19
16
|
|
|
20
|
-
A
|
|
17
|
+
Treat explicit user constraints as operation policy. A quick or no-confirmation deployment collects only indispensable missing facts and keeps progressing through bounded deployment, repair, recovery, and verification until a terminal result. Effects summaries and progress updates remain concise and non-blocking; they do not become approval gates.
|
|
18
|
+
|
|
19
|
+
An explicit no-confirmation instruction satisfies already-identified confirmation and effect decisions within the user's established authority. Do not ask the same decision again. The instruction does not supply a missing target or authentication fact, establish unknown ownership, or make an unknown or unbounded effect safe.
|
|
20
|
+
|
|
21
|
+
An explicit no-backup instruction overrides default rollback retention for this operation. Create no new data backup, snapshot, or retained application rollback release. Keep proven current live through candidate proof and handoff, then retire exact superseded application runtime. Leave unrelated pre-existing backups and snapshots untouched unless the user explicitly requests their deletion. For a fully identified, bounded data action, no-backup intent records acceptance of the disclosed no-backup consequence and resolves that Data Gate decision without another question.
|
|
22
|
+
|
|
23
|
+
If a project-native tool or enforced target policy makes no-backup execution impossible, do not silently create a backup. Return exactly one `WAITING_USER` action naming the single conflict that must be resolved. Unknown or insufficiently bounded data effects remain unresolved because no-backup intent cannot supply missing effect evidence.
|
|
24
|
+
|
|
25
|
+
Exhaust bounded automatic discovery, target resolution, configured non-interactive authentication, and every safe bounded forward action before pausing with one exact `WAITING_USER` action. Pause only for:
|
|
26
|
+
|
|
27
|
+
1. an identity or authentication action that only the user can complete after established methods have been attempted;
|
|
28
|
+
2. a target choice still absent, ambiguous, or conflicting after current evidence is inspected;
|
|
29
|
+
3. an irreversible data effect not already accepted for the exact target and action, or data impact that cannot be bounded safely;
|
|
30
|
+
4. a shared or unknown-ownership resource decision not already resolved within the user's established authority.
|
|
31
|
+
|
|
32
|
+
Known bounded downtime, material work inside the standard envelope, and missing reliable rollback are disclosed while execution continues; they do not create another approval. Privileged/global work not already established by the selected target boundary is treated as an authorization or shared-ownership decision rather than silently executed.
|
|
21
33
|
|
|
22
34
|
## Effect and Resource Policy
|
|
23
35
|
|
|
@@ -35,6 +47,12 @@ A material budget covers aggregate attempts rather than resetting per retry. Est
|
|
|
35
47
|
|
|
36
48
|
Do not run a material producer when current project-native evidence already covers the same source/release, toolchain, target assumptions, and required scope. Run the least expensive missing producer at most once for that binding. A changed binding starts a newly observed current→desired decision; it does not justify automatic repeated full rings.
|
|
37
49
|
|
|
50
|
+
## SSH Execution Boundary
|
|
51
|
+
|
|
52
|
+
For each selected SSH action, preserve the verified destination, authentication identity, proxy path, host-key evidence, and project-owned working boundary used during discovery. Execute the smallest exact remote command needed for the current difference, with bounded connection/action time and output. Reuse one proven connection binding across observation, transfer, write, and verification instead of silently changing users or endpoints between steps.
|
|
53
|
+
|
|
54
|
+
Do not pass Secret values in command arguments, print private-key material, start a broad remote inventory, or bypass host-key verification. Attempt one bounded non-interactive connection with the established SSH configuration before deciding authentication cannot complete; continue immediately when it succeeds. Only then return one exact `WAITING_USER` authentication action when user input is unavoidable. If the target key or destination differs from established evidence, treat it as an identity conflict rather than a transient retry. After a disconnect during a possible write, use the same verified SSH destination to inspect actual state before considering replay.
|
|
55
|
+
|
|
38
56
|
## Current → Desired Loop
|
|
39
57
|
|
|
40
58
|
For one selected Profile:
|
|
@@ -62,7 +80,7 @@ Prefer an evidence-supported candidate/handoff transition:
|
|
|
62
80
|
3. run candidate pre-handoff checks;
|
|
63
81
|
4. switch the supported live/traffic selector;
|
|
64
82
|
5. verify desired through the actual live path;
|
|
65
|
-
6. retain the Profile's bounded rollback set; when neither project-native nor Profile policy defines one, retain one verified previous release if the target supports it, otherwise disclose rollback absence and continue without another confirmation;
|
|
83
|
+
6. unless the user explicitly requested no backup or rollback retention, retain the Profile's bounded rollback set; when neither project-native nor Profile policy defines one, retain one verified previous release if the target supports it, otherwise disclose rollback absence and continue without another confirmation;
|
|
66
84
|
7. retire exact superseded, failed, temporary, and orphaned runtime resources;
|
|
67
85
|
8. observe the converged inventory.
|
|
68
86
|
|
|
@@ -76,7 +94,7 @@ Persistent data, shared infrastructure, and unproven resources are never classif
|
|
|
76
94
|
|
|
77
95
|
Use project-native locked dependency mechanisms and actual installed capability. Project-local or target-local declared resolution within the selected deployment is standard. Never silently install or replace a privileged/global dependency, guess a wildcard version, or transfer a controller dependency directory whose target compatibility is unproven.
|
|
78
96
|
|
|
79
|
-
For a data-affecting action, establish migration identity, old/new compatibility, locks/downtime, irreversible transformations, backup/restore evidence when required, traffic sequencing, post-migration verification, and unknown-outcome inspection. Non-destructive native migration can remain in the standard envelope.
|
|
97
|
+
For a data-affecting action, establish migration identity, old/new compatibility, locks/downtime, irreversible transformations, backup/restore evidence when required and not explicitly declined, traffic sequencing, post-migration verification, and unknown-outcome inspection. Non-destructive native migration can remain in the standard envelope. A user who explicitly accepts one fully identified, bounded irreversible action without backup has resolved that action's Data Gate; proceed without another confirmation and report the no-backup consequence in the terminal result. Insufficiently bounded impact still pauses for one data decision.
|
|
80
98
|
|
|
81
99
|
Do not treat a routing, certificate, firewall, load-balancer, domain, shared network/storage/database, or shared runtime change as project-owned until current evidence proves ownership and consumers. Shared or unknown ownership pauses before mutation.
|
|
82
100
|
|
|
@@ -108,7 +126,7 @@ Bound logs by source, purpose, time and/or line count. Prefer omission when reli
|
|
|
108
126
|
|
|
109
127
|
## Post-Success Automation
|
|
110
128
|
|
|
111
|
-
Offer automation only after deployment has already reached `SUCCEEDED` and only when project-native evidence shows no suitable automation exists. The offer is a separate optional project-file change, not a condition of deployment success.
|
|
129
|
+
Offer automation only after deployment has already reached `SUCCEEDED` and only when project-native evidence shows no suitable automation exists. The offer is a separate optional project-file change, not a condition of deployment success. For quick or no-confirmation deployment, do not ask another question; include at most one non-blocking automation note in the terminal result or omit it.
|
|
112
130
|
|
|
113
131
|
### Remote Profile
|
|
114
132
|
|
|
@@ -90,12 +90,16 @@ After timeout, disconnect, or interruption during a possible write:
|
|
|
90
90
|
|
|
91
91
|
Never infer “not applied” from a missing response. Never rerun a material producer merely to reconstruct history.
|
|
92
92
|
|
|
93
|
+
For a directly managed remote machine, reconnect through the same verified SSH destination and authentication identity used for the action. A successful SSH connection proves access only; it does not prove that the desired release, runtime, selector, health, or cleanup postconditions succeeded. An unexpected host key or destination is an identity conflict, not evidence that the write was unapplied.
|
|
94
|
+
|
|
93
95
|
## Interruption and Resume
|
|
94
96
|
|
|
95
|
-
Load only the selected Profile record's current, latest result, minimal recovery, and bounded observations. Then rediscover project revision, target fingerprint, authentication identity, desired release eligibility, actual live/candidate inventory, selector, owned residuals, configured health, and relevant tool capability.
|
|
97
|
+
Load only the selected Profile record's current, latest result, minimal recovery, and bounded observations. Then rediscover project revision, target fingerprint, connection transport and destination, authentication identity, desired release eligibility, actual live/candidate inventory, selector, owned residuals, configured health, and relevant tool capability. For a directly managed remote machine, re-establish the same verified SSH binding before inspecting or resuming target actions.
|
|
96
98
|
|
|
97
99
|
Resume from the first unproven current→desired action. Do not reconstruct commands from history summaries. When observed identity/effects differ, discard the stale proposed action and derive the next action from current evidence. If another operation already targets the same Profile/desired release, attach to it rather than creating a candidate.
|
|
98
100
|
|
|
101
|
+
For quick or no-confirmation deployment, continue every safe bounded forward action without waiting for progress approval. Keep intermediate updates concise and non-blocking, and notify the user after terminal verification. A missing indispensable fact may still produce `WAITING_USER`, but it contains exactly one action rather than a list of alternatives.
|
|
102
|
+
|
|
99
103
|
A human “done” response is a signal to revalidate the pending postcondition, not proof. Clear recovery only after `SUCCEEDED` or a non-resumable `FAILED` result is recorded.
|
|
100
104
|
|
|
101
105
|
## Terminal Decision
|
|
@@ -105,7 +109,7 @@ Return exactly one status:
|
|
|
105
109
|
| Status | Condition |
|
|
106
110
|
|---|---|
|
|
107
111
|
| `SUCCEEDED` | Desired release is live when deployment applies, all required observations pass, required inventory converges, and no effect needed for correctness remains unknown. |
|
|
108
|
-
| `WAITING_USER` |
|
|
112
|
+
| `WAITING_USER` | Exactly one identity, target, unresolved data-effect, shared/ownership, source-fix, or indeterminate-outcome action can resume the same desired operation. |
|
|
109
113
|
| `FAILED` | No safe continuation exists, the desired release is unsupported/unrecoverable within scope, or the user stopped the operation. |
|
|
110
114
|
|
|
111
115
|
A release may be live while a Profile record update failed; state both facts. A healthy old release, completed rollback, or partially live candidate never converts an incomplete desired deployment to `SUCCEEDED`.
|
|
@@ -119,7 +123,7 @@ Return and, when valid, persist one concise result containing:
|
|
|
119
123
|
- desired and actual live release;
|
|
120
124
|
- each selected verification observation with required/status/evidence;
|
|
121
125
|
- bounded residual resources and rollback availability;
|
|
122
|
-
- one
|
|
126
|
+
- exactly one `next_actions` entry for `WAITING_USER`, identical to `recovery.pending_action.action`, or one evidence-backed reason for `FAILED`;
|
|
123
127
|
- Profile record update outcome in the conversation summary.
|
|
124
128
|
|
|
125
129
|
Do not persist unrelated conversation, confirmation transcripts, raw diagnostics, credentials, or full logs. Secret values and credential-bearing URLs/headers/environment assignments are omitted before display or storage.
|
|
@@ -510,7 +510,17 @@ def _check_result(value: Any, path: str, errors: ErrorCollector) -> None:
|
|
|
510
510
|
if isinstance(verification, list) and not names:
|
|
511
511
|
errors.add("EMPTY_VERIFICATION", f"{path}.verification")
|
|
512
512
|
|
|
513
|
-
|
|
513
|
+
status = value.get("status")
|
|
514
|
+
next_actions = value.get("next_actions")
|
|
515
|
+
if status == "WAITING_USER" and (
|
|
516
|
+
not isinstance(next_actions, list) or len(next_actions) != 1
|
|
517
|
+
):
|
|
518
|
+
errors.add(
|
|
519
|
+
"WAITING_USER_EXACTLY_ONE_NEXT_ACTION",
|
|
520
|
+
f"{path}.next_actions",
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
if status != "SUCCEEDED":
|
|
514
524
|
return
|
|
515
525
|
for index, item in _iter_list(verification):
|
|
516
526
|
if (
|
|
@@ -559,6 +569,22 @@ def _validate_record(data: Any, errors: ErrorCollector) -> None:
|
|
|
559
569
|
"RECOVERY_DESIRED_RELEASE_MISMATCH",
|
|
560
570
|
"$.recovery.desired_release",
|
|
561
571
|
)
|
|
572
|
+
next_actions = latest.get("next_actions")
|
|
573
|
+
pending_action = recovery.get("pending_action")
|
|
574
|
+
pending_text = (
|
|
575
|
+
pending_action.get("action")
|
|
576
|
+
if isinstance(pending_action, Mapping)
|
|
577
|
+
else None
|
|
578
|
+
)
|
|
579
|
+
if (
|
|
580
|
+
isinstance(next_actions, list)
|
|
581
|
+
and len(next_actions) == 1
|
|
582
|
+
and next_actions[0] != pending_text
|
|
583
|
+
):
|
|
584
|
+
errors.add(
|
|
585
|
+
"WAITING_USER_ACTION_MISMATCH",
|
|
586
|
+
"$.recovery.pending_action.action",
|
|
587
|
+
)
|
|
562
588
|
|
|
563
589
|
current = data.get("current")
|
|
564
590
|
if (
|