Spaces:
Running
Running
deploy(hf): sync szl-holdings/a11oy@cc12ca51e9641926fc8f2c84801ddb4726989adc derived COPY set
Browse filesReusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy cc12ca51e9641926fc8f2c84801ddb4726989adc.
Files: 1168 Pruned: 0
Derived from Dockerfile COPY sources (NO hand-maintained allowlist).
Signed-off-by: SZL Holdings <noreply@szlholdings.ai>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
routers/series_a_web/app.js
CHANGED
|
@@ -90,12 +90,52 @@
|
|
| 90 |
};
|
| 91 |
document.getElementById("refresh").addEventListener("click", async () => {
|
| 92 |
const button = document.getElementById("refresh");
|
|
|
|
| 93 |
button.disabled = true;
|
| 94 |
try {
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
} catch (error) {
|
| 97 |
-
|
| 98 |
-
} finally {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
});
|
| 100 |
const actionSelect = document.querySelector('select[name="type"]');
|
| 101 |
const targetInput = document.querySelector('input[name="target"]');
|
|
|
|
| 90 |
};
|
| 91 |
document.getElementById("refresh").addEventListener("click", async () => {
|
| 92 |
const button = document.getElementById("refresh");
|
| 93 |
+
let failure = null;
|
| 94 |
button.disabled = true;
|
| 95 |
try {
|
| 96 |
+
if (!currentEvidence) {
|
| 97 |
+
throw new Error("OBSERVED signed server evidence is required");
|
| 98 |
+
}
|
| 99 |
+
const evaluated = await request("/passports/evaluate", {
|
| 100 |
+
method: "POST",
|
| 101 |
+
headers: {"content-type": "application/json"},
|
| 102 |
+
body: JSON.stringify({
|
| 103 |
+
principal_id: "series-a-ui",
|
| 104 |
+
action: {
|
| 105 |
+
type: "estate.refresh",
|
| 106 |
+
target: "szl://estate/current",
|
| 107 |
+
impact: "MODERATE",
|
| 108 |
+
irreversible: false
|
| 109 |
+
},
|
| 110 |
+
evidence: [{...currentEvidence}],
|
| 111 |
+
expected_if_withheld: "Current estate observation remains unchanged",
|
| 112 |
+
expected_if_acted: "A bounded governed estate refresh completes or fails closed"
|
| 113 |
+
})
|
| 114 |
+
});
|
| 115 |
+
if (evaluated.passport?.decision !== "ALLOW") {
|
| 116 |
+
throw new Error(
|
| 117 |
+
`PASSPORT_${evaluated.passport?.decision || "UNAVAILABLE"}: ${
|
| 118 |
+
(evaluated.passport?.reason_codes || []).join(",")
|
| 119 |
+
}`
|
| 120 |
+
);
|
| 121 |
+
}
|
| 122 |
+
const value = await request("/passports/execute", {
|
| 123 |
+
method: "POST",
|
| 124 |
+
headers: {"content-type": "application/json"},
|
| 125 |
+
body: JSON.stringify({passport_digest: evaluated.passport_digest})
|
| 126 |
+
}, EXECUTION_TIMEOUT_MS);
|
| 127 |
+
if (value.outcome?.status !== "SUCCEEDED") {
|
| 128 |
+
throw new Error(
|
| 129 |
+
`SERIES_A_REFRESH_FAILED: ${value.outcome?.error_class || value.outcome?.status || "UNKNOWN"}`
|
| 130 |
+
);
|
| 131 |
+
}
|
| 132 |
} catch (error) {
|
| 133 |
+
failure = String(error.message || error);
|
| 134 |
+
} finally {
|
| 135 |
+
button.disabled = false;
|
| 136 |
+
await load();
|
| 137 |
+
if (failure) document.getElementById("updated").textContent = failure;
|
| 138 |
+
}
|
| 139 |
});
|
| 140 |
const actionSelect = document.querySelector('select[name="type"]');
|
| 141 |
const targetInput = document.querySelector('input[name="target"]');
|
routers/series_a_web/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
| 15 |
</header>
|
| 16 |
<main id="main" tabindex="-1">
|
| 17 |
<section class="toolbar" aria-label="Control plane actions">
|
| 18 |
-
<button id="refresh" type="button">
|
| 19 |
<span id="updated" aria-live="polite">Not observed yet</span>
|
| 20 |
</section>
|
| 21 |
<section class="grid" id="cards" aria-label="Live status">
|
|
|
|
| 15 |
</header>
|
| 16 |
<main id="main" tabindex="-1">
|
| 17 |
<section class="toolbar" aria-label="Control plane actions">
|
| 18 |
+
<button id="refresh" type="button">Run governed refresh</button>
|
| 19 |
<span id="updated" aria-live="polite">Not observed yet</span>
|
| 20 |
</section>
|
| 21 |
<section class="grid" id="cards" aria-label="Live status">
|