@hearsay-tools/squawk 0.18.0-pr4022.7690 → 0.18.0-pr4026.7698
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/ci-wait/controller.d.ts +4 -4
- package/dist/ci-wait/tools.d.ts +4 -4
- package/dist/core/backend-detect.d.ts +8 -0
- package/dist/core/backend-detect.js +65 -0
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/delegation/routes.d.ts +14 -14
- package/dist/delegation/transport.d.ts +15 -15
- package/dist/server/backend-checks.d.ts +29 -0
- package/dist/server/backend-checks.js +53 -0
- package/dist/server/backend-checks.js.map +1 -0
- package/dist/server/forge/github-ref-status-query.d.ts +5 -0
- package/dist/server/forge/github-ref-status-query.js +11 -0
- package/dist/server/forge/github-ref-status-query.js.map +1 -0
- package/dist/server/forge/github.d.ts +9 -1
- package/dist/server/forge/github.js +11 -12
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/git-dir-stamp.d.ts +35 -0
- package/dist/server/git-dir-stamp.js +158 -0
- package/dist/server/git-dir-stamp.js.map +1 -0
- package/dist/server/git.d.ts +7 -1
- package/dist/server/git.js +70 -6
- package/dist/server/git.js.map +1 -1
- package/dist/server/server.d.ts +332 -332
- package/dist/server/server.js +13 -23
- package/dist/server/server.js.map +1 -1
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-aIl7Ic3J.js → activity-motion-4jefGnf3.js} +1 -1
- package/web/dist/assets/{activity-route-HrytBH68.js → activity-route-CrgEEOkP.js} +1 -1
- package/web/dist/assets/attention-CfWn6Sw7.js +1 -0
- package/web/dist/assets/{cez-idle-D1rXzVuh.js → cez-idle-BZ4uUtP5.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-DPvSeRp_.js → commit-diff-panel-BhqIhVpi.js} +1 -1
- package/web/dist/assets/{diff-OvCuOGR3.js → diff-Dtz4yPu-.js} +2 -2
- package/web/dist/assets/{diff-view-VGjeUfbl.js → diff-view-01iQrxA3.js} +1 -1
- package/web/dist/assets/{file-preview-BVQNAbUa.js → file-preview-Bqu0JXBY.js} +1 -1
- package/web/dist/assets/{git-toolbar-kNu2s23e.js → git-toolbar-zEjeF-_V.js} +1 -1
- package/web/dist/assets/{github-BEGPdxPA.js → github-D3a22EyV.js} +1 -1
- package/web/dist/assets/{global-activity-route-jABCp4_s.js → global-activity-route-DXD818_k.js} +1 -1
- package/web/dist/assets/{index-DXVYTes0.js → index-DPA7Ibhf.js} +4 -4
- package/web/dist/assets/{live-protocol-DKHlCFyG.js → live-protocol-60uiPDg6.js} +1 -1
- package/web/dist/assets/{live-worker-BWdeGzQX.ts → live-worker-DBw-5jVE.ts} +3 -1
- package/web/dist/assets/{markdown-DBI62XyZ.js → markdown-Dzq31k8-.js} +1 -1
- package/web/dist/assets/{picker-pill-Dbb3GY1a.js → picker-pill-Bmxuo6r5.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-uZ1ETgMj.js → preview-pane-connected-TaIGMKvt.js} +1 -1
- package/web/dist/assets/{project-router-LT30LjzY.js → project-router-BLLH9tz9.js} +1 -1
- package/web/dist/assets/project-scope-context-CR3cozni.js +4 -0
- package/web/dist/assets/{prompt-template-menu-Dc2ufWt7.js → prompt-template-menu-Fb8KyZ2w.js} +1 -1
- package/web/dist/assets/{queries-DHY6U3e_.js → queries-BCXjp1_j.js} +1 -1
- package/web/dist/assets/{reference-chip-BKeVxG_E.js → reference-chip-1O0efJ0d.js} +1 -1
- package/web/dist/assets/{repo-git-DSNw_cF3.js → repo-git-BvN7c_-7.js} +1 -1
- package/web/dist/assets/{report-reader-lqMYJUBq.js → report-reader-BEGToSIA.js} +1 -1
- package/web/dist/assets/{reports-8g52bj85.js → reports-D61rDO35.js} +1 -1
- package/web/dist/assets/{run-header-WszCbLAD.js → run-header-gwQQqs03.js} +1 -1
- package/web/dist/assets/runners-D8udSrRd.js +1 -0
- package/web/dist/assets/{skills-DpHpslI7.js → skills-DB3DAhWt.js} +1 -1
- package/web/dist/assets/{tab-link-C_0J92TF.js → tab-link-DkArCoa9.js} +1 -1
- package/web/dist/assets/{task-changes-BXQO9_Kg.js → task-changes-C4Hp9Bog.js} +1 -1
- package/web/dist/assets/{task-commits-R9JvoxbC.js → task-commits-IGZ1CJcy.js} +1 -1
- package/web/dist/assets/{task-files-CTEihDZk.js → task-files-CBrQO4v2.js} +1 -1
- package/web/dist/assets/{task-github-item-hzTRT3io.js → task-github-item-BJwFCJMl.js} +1 -1
- package/web/dist/assets/{task-thread-BxOEEWiS.js → task-thread-Dkn8HN1R.js} +1 -1
- package/web/dist/assets/{thread-state-hyIrrb9B.js → thread-state-DVfKElYJ.js} +1 -1
- package/web/dist/assets/{use-desktop-EnHXg46f.js → use-desktop-CEB_iBfH.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DBaPLEi6.js → use-hand-to-agent-state-ChF_oDo3.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-CvdGA_PU.js → useInfiniteQuery-Bh_R8jAH.js} +1 -1
- package/web/dist/assets/useQuery-Ct6O0RmO.js +1 -0
- package/web/dist/assets/{workflows-B1R1lUjI.js → workflows-BTzKBfs-.js} +1 -1
- package/web/dist/assets/ws-DCvFYEh3.js +1 -0
- package/web/dist/index.html +15 -15
- package/web/dist/live-worker.js +2 -2
- package/web/dist/assets/attention-zJ-ho5os.js +0 -1
- package/web/dist/assets/project-scope-context-DMCS5p-N.js +0 -4
- package/web/dist/assets/runners-C-sPUQye.js +0 -1
- package/web/dist/assets/useQuery-BJFZunTR.js +0 -1
- package/web/dist/assets/ws-BxsIvFCG.js +0 -1
package/dist/server/server.js
CHANGED
|
@@ -87,6 +87,7 @@ import { attachmentFileParamSchema, } from '../contract/index.js';
|
|
|
87
87
|
import { agentWebhookParamsSchema, createProjectWebhookInputSchema, projectWebhookParamsSchema, sendAgentReportInputSchema, updateProjectInputSchema, updateProjectWebhookInputSchema, } from '../contract/index.js';
|
|
88
88
|
import { PROJECT_WEBHOOKS_MAX } from '../contract/index.js';
|
|
89
89
|
import { agentWebhook, agentWebhooks, applyTaskWebhookInput, createdWebhook, editedWebhook, nameTaken, projectWebhooks, redactWebhook, setProjectWebhooks, taskWebhooks as taskWebhookList, } from '../workspace/webhooks.js';
|
|
90
|
+
import { environmentStamp } from '../core/backend-detect.js';
|
|
90
91
|
import { AGENT_MODELS_LOCKED_ERROR, agentModelsLocked } from '../core/agent-model-policy.js';
|
|
91
92
|
import { applyProviderEnablement } from '../core/provider-availability.js';
|
|
92
93
|
import { createModelsRoutes } from './models-routes.js';
|
|
@@ -115,6 +116,7 @@ import { releaseThenRemoveWorktree } from '../git-worktree-release.js';
|
|
|
115
116
|
import { isReclaimable, reclaimWorktree, reclaimWorktrees, selectReclaimableWorktrees } from '../runs/retention.js';
|
|
116
117
|
import { getBranches, getCommit, getDiff, getLogWithParents, getRepoInfo, getStatus, getTracking } from './git.js';
|
|
117
118
|
import { createHealthCache, HEALTH_TTL_MS } from './health-cache.js';
|
|
119
|
+
import { createBackendChecks } from './backend-checks.js';
|
|
118
120
|
import { createGithubBranchForge } from './repo-branch-forge.js';
|
|
119
121
|
import { attributeLog, classifyInputFor, deleteBranches, forgetRepoBranches, readRepoBranchCounts, readRepoBranches } from './repo-branches.js';
|
|
120
122
|
import { claimRepoGitMutation, localPullBranches, pullRepoCheckout } from './repo-pull.js';
|
|
@@ -663,30 +665,17 @@ export function createApp(deps) {
|
|
|
663
665
|
// contract circular, rather than deriving the DTO from what the handler sends.
|
|
664
666
|
// Availability has its own lifetime: even a cold/max-stale health read must not
|
|
665
667
|
// await agent startup. Repository/config freshness below remains independently bounded.
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
return changed;
|
|
675
|
-
}).catch(() => false)
|
|
676
|
-
.finally(() => { backendChecksAt = Date.now(); backendChecksPending = undefined; })
|
|
677
|
-
.then((changed) => {
|
|
678
|
-
if (!changed)
|
|
679
|
-
return;
|
|
680
|
-
// Probe is settled; publish the new checks to both transports. Only availability changed:
|
|
681
|
-
// re-reading Git would spawn processes on this loop (hearsay-tools/squawk#3355).
|
|
682
|
-
void healthCache.patch((payload) => ({ ...payload, checks: backendChecks })).catch(() => { });
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
return backendChecks;
|
|
686
|
-
};
|
|
668
|
+
// Detection starts one process per CLI, so it runs again only when the environment stamp
|
|
669
|
+
// changes (hearsay-tools/squawk#3658). A settled change patches the cached snapshot alone:
|
|
670
|
+
// re-reading Git here would only repeat work (hearsay-tools/squawk#3355).
|
|
671
|
+
const backendChecks = createBackendChecks({
|
|
672
|
+
detect: detectEnvironment,
|
|
673
|
+
stamp: environmentStamp,
|
|
674
|
+
onChange: (checks) => { void healthCache.patch((payload) => ({ ...payload, checks })).catch(() => { }); },
|
|
675
|
+
});
|
|
687
676
|
const healthSnapshot = async () => {
|
|
688
677
|
const [checks, repo, config, workspace] = await Promise.all([
|
|
689
|
-
|
|
678
|
+
backendChecks.read(),
|
|
690
679
|
getRepoInfo(bootRoot),
|
|
691
680
|
healthConfig(bootRoot, deps.home),
|
|
692
681
|
workspaceSummary(),
|
|
@@ -760,7 +749,8 @@ export function createApp(deps) {
|
|
|
760
749
|
// subscriber) runs no timer. Nothing server-side watches `.git/HEAD`, so the
|
|
761
750
|
// interval stays the honest mechanism; it just lives behind the socket now
|
|
762
751
|
// instead of N tabs × 5 s HTTP polls. Every tick and every subscriber read
|
|
763
|
-
// goes through the cache above, so N subscribers still cost one compute
|
|
752
|
+
// goes through the cache above, so N subscribers still cost one compute, and
|
|
753
|
+
// a tick with no Git or CLI change reads file metadata and starts no process.
|
|
764
754
|
deps.socketHub?.registerTopic('health', {
|
|
765
755
|
snapshot: readHealth,
|
|
766
756
|
start: (publish) => {
|