@cyanautomation/kaseki-agent 1.54.0 → 1.55.1
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/dist/kaseki-api-web.d.ts.map +1 -1
- package/dist/kaseki-api-web.js +42 -12
- package/dist/kaseki-api-web.js.map +1 -1
- package/kaseki-agent.sh +6 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kaseki-api-web.d.ts","sourceRoot":"","sources":["../src/kaseki-api-web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"kaseki-api-web.d.ts","sourceRoot":"","sources":["../src/kaseki-api-web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAosCjC,wBAAgB,eAAe,IAAI,MAAM,CAQxC"}
|
package/dist/kaseki-api-web.js
CHANGED
|
@@ -277,6 +277,16 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
277
277
|
}
|
|
278
278
|
.summary-value.ok { color: var(--ok); }
|
|
279
279
|
.summary-value.bad { color: var(--bad); }
|
|
280
|
+
.summary-details {
|
|
281
|
+
color: var(--muted);
|
|
282
|
+
font-family: var(--font-mono);
|
|
283
|
+
font-size: 12px;
|
|
284
|
+
font-weight: 400;
|
|
285
|
+
line-height: 1.4;
|
|
286
|
+
margin-top: 4px;
|
|
287
|
+
word-break: break-word;
|
|
288
|
+
overflow-wrap: break-word;
|
|
289
|
+
}
|
|
280
290
|
.run-links {
|
|
281
291
|
background: var(--surface);
|
|
282
292
|
border: 1px solid var(--line);
|
|
@@ -286,7 +296,7 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
286
296
|
padding: var(--space-3);
|
|
287
297
|
}
|
|
288
298
|
.run-links[hidden] { display: none; }
|
|
289
|
-
.link-grid { grid-template-columns: repeat(auto-fit, minmax(
|
|
299
|
+
.link-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
|
|
290
300
|
.link-grid a {
|
|
291
301
|
align-items: center;
|
|
292
302
|
background: transparent;
|
|
@@ -353,7 +363,8 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
353
363
|
color: #001f24;
|
|
354
364
|
}
|
|
355
365
|
button:disabled { cursor: wait; opacity: .5; }
|
|
356
|
-
.toolbar-button {
|
|
366
|
+
.toolbar-button { }
|
|
367
|
+
.toolbar-button-no-wrap { white-space: nowrap; }
|
|
357
368
|
.response-panel {
|
|
358
369
|
background: var(--bg);
|
|
359
370
|
border: 1px solid var(--line);
|
|
@@ -591,6 +602,7 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
591
602
|
<div class="summary-card">
|
|
592
603
|
<span class="summary-label">Run</span>
|
|
593
604
|
<span class="summary-value" data-summary="run">No run selected</span>
|
|
605
|
+
<div class="summary-details" id="run-details"></div>
|
|
594
606
|
</div>
|
|
595
607
|
</div>
|
|
596
608
|
<div class="form-field">
|
|
@@ -666,10 +678,10 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
666
678
|
<div class="run-links" id="run-links" hidden>
|
|
667
679
|
<strong class="panel-section-label">Run follow-through</strong>
|
|
668
680
|
<div class="link-grid">
|
|
669
|
-
<button class="secondary toolbar-button" data-run-action="status" type="button">Status</button>
|
|
670
|
-
<button class="secondary toolbar-button" data-run-action="events" type="button">Events</button>
|
|
671
|
-
<button class="secondary toolbar-button" data-run-action="stdout" type="button">Stdout</button>
|
|
672
|
-
<button class="secondary toolbar-button" data-run-action="artifacts" type="button">Artifacts</button>
|
|
681
|
+
<button class="secondary toolbar-button-no-wrap" data-run-action="status" type="button">Status</button>
|
|
682
|
+
<button class="secondary toolbar-button-no-wrap" data-run-action="events" type="button">Events</button>
|
|
683
|
+
<button class="secondary toolbar-button-no-wrap" data-run-action="stdout" type="button">Stdout</button>
|
|
684
|
+
<button class="secondary toolbar-button-no-wrap" data-run-action="artifacts" type="button">Artifacts</button>
|
|
673
685
|
</div>
|
|
674
686
|
<div class="recommended-artifacts" id="recommended-artifacts" hidden>
|
|
675
687
|
<span class="summary-label">Recommended artifacts</span>
|
|
@@ -824,6 +836,20 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
824
836
|
element.className = 'summary-value' + (kind ? ' ' + kind : '');
|
|
825
837
|
}
|
|
826
838
|
|
|
839
|
+
function setRunDetails(progress) {
|
|
840
|
+
const detailsEl = document.getElementById('run-details');
|
|
841
|
+
if (!detailsEl) return;
|
|
842
|
+
if (!progress) {
|
|
843
|
+
detailsEl.innerHTML = '';
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
const stage = progress.stage ? stripControlSequences(progress.stage) : '';
|
|
847
|
+
const message = progress.message ? stripControlSequences(progress.message) : '';
|
|
848
|
+
const percent = typeof progress.percentComplete === 'number' ? progress.percentComplete + '%' : '';
|
|
849
|
+
const parts = [stage, message, percent].filter(Boolean);
|
|
850
|
+
detailsEl.textContent = parts.join(' | ');
|
|
851
|
+
}
|
|
852
|
+
|
|
827
853
|
function runUrl(runId, suffix) {
|
|
828
854
|
return '/api/runs/' + encodeURIComponent(runId) + suffix;
|
|
829
855
|
}
|
|
@@ -849,7 +875,7 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
849
875
|
}
|
|
850
876
|
recommended.forEach((fileName) => {
|
|
851
877
|
const button = document.createElement('button');
|
|
852
|
-
button.className = 'secondary toolbar-button';
|
|
878
|
+
button.className = 'secondary toolbar-button-no-wrap';
|
|
853
879
|
button.type = 'button';
|
|
854
880
|
button.dataset.artifactFile = fileName;
|
|
855
881
|
button.textContent = fileName;
|
|
@@ -874,6 +900,13 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
874
900
|
}
|
|
875
901
|
|
|
876
902
|
function formatRunButtonLabel(run) {
|
|
903
|
+
const isDesktop = typeof window !== 'undefined' && window.innerWidth >= 1024;
|
|
904
|
+
if (!isDesktop) {
|
|
905
|
+
// Mobile: Extract number from 'kaseki-77' and show condensed format
|
|
906
|
+
const runNumber = run.id.split('-')[1] || run.id;
|
|
907
|
+
return 'K-' + runNumber + ' ' + (run.status || '');
|
|
908
|
+
}
|
|
909
|
+
// Desktop: Full format with time, allow wrapping
|
|
877
910
|
const created = run.createdAt ? new Date(run.createdAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) : '';
|
|
878
911
|
return [run.id, run.status, created].filter(Boolean).join(' - ');
|
|
879
912
|
}
|
|
@@ -939,11 +972,8 @@ const controllerPage = String.raw `<!doctype html>
|
|
|
939
972
|
|
|
940
973
|
function summarizeRun(payload) {
|
|
941
974
|
if (!payload || !payload.status) return;
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
if (payload.progress && payload.progress.message) bits.push(stripControlSequences(payload.progress.message));
|
|
945
|
-
if (payload.progress && typeof payload.progress.percentComplete === 'number') bits.push(String(payload.progress.percentComplete) + '%');
|
|
946
|
-
setSummary('run', bits.join(' - '), payload.status === 'failed' ? 'bad' : 'ok');
|
|
975
|
+
setSummary('run', payload.status, payload.status === 'failed' ? 'bad' : 'ok');
|
|
976
|
+
setRunDetails(payload.progress);
|
|
947
977
|
}
|
|
948
978
|
|
|
949
979
|
function requestBody() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kaseki-api-web.js","sourceRoot":"","sources":["../src/kaseki-api-web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"kaseki-api-web.js","sourceRoot":"","sources":["../src/kaseki-api-web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgsChC,CAAC;AAEF,MAAM,UAAU,eAAe;IAC7B,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QACrC,GAAG,CAAC,GAAG,CAAC,yBAAyB,EAAE,4NAA4N,CAAC,CAAC;QACjQ,GAAG,CAAC,GAAG,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAC1C,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/kaseki-agent.sh
CHANGED
|
@@ -3005,7 +3005,7 @@ EOF_ASKPASS
|
|
|
3005
3005
|
check_github_operations_health() {
|
|
3006
3006
|
# Preflight health check for github operations before pi agent runs
|
|
3007
3007
|
# Tests: GitHub App secrets, git config, Node.js token generation capability
|
|
3008
|
-
local health_log="
|
|
3008
|
+
local health_log="${KASEKI_HEALTH_LOG:-/results/github-health-check.log}"
|
|
3009
3009
|
: > "$health_log"
|
|
3010
3010
|
|
|
3011
3011
|
printf '[preflight] github operations health check started\n' | tee -a "$health_log"
|
|
@@ -3039,8 +3039,9 @@ check_github_operations_health() {
|
|
|
3039
3039
|
printf '[health-check] ✓ git is available\n' | tee -a "$health_log"
|
|
3040
3040
|
|
|
3041
3041
|
# Check 3: Test Node.js github-app-token helper file exists and is executable
|
|
3042
|
-
|
|
3043
|
-
|
|
3042
|
+
local github_app_token_helper="${KASEKI_GITHUB_APP_TOKEN_HELPER:-/usr/local/bin/github-app-token}"
|
|
3043
|
+
if ! [ -x "$github_app_token_helper" ]; then
|
|
3044
|
+
printf '[health-check] ERROR: github-app-token helper not found at %s\n' "$github_app_token_helper" | tee -a "$health_log" >&2
|
|
3044
3045
|
return 1
|
|
3045
3046
|
fi
|
|
3046
3047
|
printf '[health-check] ✓ github-app-token helper file exists and is executable\n' | tee -a "$health_log"
|
|
@@ -3076,7 +3077,7 @@ check_github_operations_health() {
|
|
|
3076
3077
|
return 1
|
|
3077
3078
|
}
|
|
3078
3079
|
|
|
3079
|
-
|
|
3080
|
+
"$github_app_token_helper" >"$helper_probe_stdout_tmp" 2>"$helper_probe_stderr_tmp"
|
|
3080
3081
|
helper_probe_exit_code=$?
|
|
3081
3082
|
helper_probe_stdout="$(cat "$helper_probe_stdout_tmp" 2>/dev/null || true)"
|
|
3082
3083
|
helper_probe_stderr="$(cat "$helper_probe_stderr_tmp" 2>/dev/null || true)"
|
|
@@ -3127,7 +3128,7 @@ check_github_operations_health() {
|
|
|
3127
3128
|
return 1
|
|
3128
3129
|
}
|
|
3129
3130
|
|
|
3130
|
-
|
|
3131
|
+
"$github_app_token_helper" "$app_id" "$github_app_private_key_file" "$owner" "$repo" >"$token_stdout_tmp" 2>"$token_stderr_tmp"
|
|
3131
3132
|
token_exit_code=$?
|
|
3132
3133
|
token_data="$(cat "$token_stdout_tmp" 2>/dev/null || true)"
|
|
3133
3134
|
token_stderr="$(cat "$token_stderr_tmp" 2>/dev/null || true)"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanautomation/kaseki-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.55.1",
|
|
4
4
|
"description": "Admin/helper/doctor toolbox and local API client for Kaseki diagnostics, setup, and API-backed coding-agent task workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|