@hearsay-tools/squawk 0.18.0-pr4117.7906 → 0.18.0-pr4117.7908
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/server/open-in-targets.js +2 -1
- package/dist/server/open-in-targets.js.map +1 -1
- package/dist/server/run-accounts.d.ts +5 -3
- package/dist/server/run-accounts.js +13 -6
- package/dist/server/run-accounts.js.map +1 -1
- package/dist/server/server.d.ts +58 -58
- package/dist/server/server.js +5 -5
- package/dist/server/server.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-nnLshZAq.js → activity-motion-CWeQ5A4c.js} +2 -2
- package/web/dist/assets/{activity-route-w9Tlbx-P.js → activity-route-D6ucKngP.js} +1 -1
- package/web/dist/assets/agent-accounts-_c4-xSGX.js +1 -0
- package/web/dist/assets/attention-DhPvEBjN.js +1 -0
- package/web/dist/assets/{commit-diff-panel-DZZ9MWYK.js → commit-diff-panel-DUKZHLE1.js} +1 -1
- package/web/dist/assets/{diff-DdX9fsl3.js → diff-DHqO6-cQ.js} +2 -2
- package/web/dist/assets/{diff-view-DKHZ_kE3.js → diff-view-DobUpFzd.js} +4 -4
- package/web/dist/assets/{file-preview-DuwoDlUr.js → file-preview-Ch_RqGaj.js} +1 -1
- package/web/dist/assets/{git-toolbar-DDG1HKHF.js → git-toolbar-VyU5tvCf.js} +1 -1
- package/web/dist/assets/{github-BmQIhgkR.js → github-DKV60DRP.js} +1 -1
- package/web/dist/assets/{global-activity-route-CS-Kt4aG.js → global-activity-route-Xk0t4a8m.js} +1 -1
- package/web/dist/assets/index-CjomZZuM.js +14 -0
- package/web/dist/assets/{markdown-CmTkjwmG.js → markdown-DvDLjJ2h.js} +1 -1
- package/web/dist/assets/{picker-pill-BLwyNSen.js → picker-pill-BWqsb3yg.js} +1 -1
- package/web/dist/assets/preview-pane-connected-DfzEF-gP.js +3 -0
- package/web/dist/assets/{project-router-D4oD71GP.js → project-router-6VmASRao.js} +1 -1
- package/web/dist/assets/{project-scope-context-ChA3JcHA.js → project-scope-context-UUgdA092.js} +3 -3
- package/web/dist/assets/{prompt-template-menu-DBGjt-rz.js → prompt-template-menu-DS4ArM_M.js} +1 -1
- package/web/dist/assets/queries-CkSOYMTn.js +1 -0
- package/web/dist/assets/{reference-chip-C6XBFK56.js → reference-chip-DcyHVxZl.js} +1 -1
- package/web/dist/assets/{repo-git-yKO4K3-I.js → repo-git-WZ9wLwWA.js} +1 -1
- package/web/dist/assets/{report-reader-CjwvV9i8.js → report-reader-DGWU8hex.js} +1 -1
- package/web/dist/assets/{reports-C29y8E-S.js → reports-DYaOg7HT.js} +1 -1
- package/web/dist/assets/run-header-CS61DAgT.js +2 -0
- package/web/dist/assets/{skills-B08dB-kF.js → skills-CPkgDW-U.js} +1 -1
- package/web/dist/assets/{tab-link-CRup2dWi.js → tab-link-BlN5fj2-.js} +1 -1
- package/web/dist/assets/{task-changes-B9AHb1Jh.js → task-changes-Ca9EdilM.js} +1 -1
- package/web/dist/assets/{task-commits-NJd8QKqj.js → task-commits-CUritrMW.js} +1 -1
- package/web/dist/assets/{task-files-B_uD2_Wr.js → task-files-C31DNnkq.js} +1 -1
- package/web/dist/assets/{task-github-item-BG-3anOE.js → task-github-item-B1kzzMjt.js} +1 -1
- package/web/dist/assets/task-thread-CncRFR-l.js +9 -0
- package/web/dist/assets/{thread-state-DgzLMdzd.js → thread-state-ATPMHAmT.js} +1 -1
- package/web/dist/assets/{use-desktop-Lkhjkhx9.js → use-desktop-DrBLgFAC.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-hlVQ2Dmc.js → use-hand-to-agent-state-DtK6uQWG.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-BHtEVQoO.js → useInfiniteQuery-BRjS65bB.js} +1 -1
- package/web/dist/assets/useQuery-jHGiduq_.js +1 -0
- package/web/dist/assets/{workflows-29yjq2fQ.js → workflows-droVWyCO.js} +3 -3
- package/web/dist/assets/ws-_Pl44ILb.js +1 -0
- package/web/dist/index.html +13 -13
- package/web/dist/assets/agent-accounts-DKRnFIEl.js +0 -1
- package/web/dist/assets/attention-CUX3rjFi.js +0 -1
- package/web/dist/assets/index-C5j8e7zn.js +0 -14
- package/web/dist/assets/preview-pane-connected-CSDAqgQA.js +0 -3
- package/web/dist/assets/queries-WC8tI2lb.js +0 -1
- package/web/dist/assets/run-header-TkRDjz3V.js +0 -2
- package/web/dist/assets/task-thread-q3gIGiJM.js +0 -9
- package/web/dist/assets/useQuery-T7QRDvQX.js +0 -1
- package/web/dist/assets/ws-DRkGa47K.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { latestSession } from '../contract/index.js';
|
|
2
|
+
import { DEFAULT_AGENT_ACCOUNT_ID } from '../contract/index.js';
|
|
2
3
|
import { fallbackProjectWriteError } from '../project-paths.js';
|
|
3
4
|
import { join } from 'node:path';
|
|
4
5
|
import { imageMimeType, isOsOpenableImage } from '../contract/index.js';
|
|
@@ -63,7 +64,7 @@ export async function openRunCli(c, run, cliRunner, dir, repoRoot, { providerAct
|
|
|
63
64
|
// exactly like a run that never recorded a session.
|
|
64
65
|
const resume = sessionId && cliRunner === session?.backend ? resumeCommand(cliRunner, sessionId) : null;
|
|
65
66
|
// The gate checks the account the terminal opens on (hearsay-tools/squawk#4116).
|
|
66
|
-
const blocked = await providerActionError([cliRunner], { repoRoot, picks: { [cliRunner]: resume ? session?.profileId : undefined } });
|
|
67
|
+
const blocked = await providerActionError([cliRunner], { repoRoot, picks: { [cliRunner]: resume ? session?.profileId ?? DEFAULT_AGENT_ACCOUNT_ID : undefined } });
|
|
67
68
|
if (blocked)
|
|
68
69
|
return c.json({ error: blocked }, 409);
|
|
69
70
|
// A resume uses the session account; a fresh CLI uses the project's account.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-in-targets.js","sourceRoot":"","sources":["../../src/server/open-in-targets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,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AClG,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;AAC1B,CAAC;AAED,2FAA2F;AAC3F,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,CAAU,EAAE,MAAc,EAAE,GAAW,EAAE,OAAyB;IACjG,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,kBAAkB,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,CAAC,CAAC;IAClF,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -24,9 +24,11 @@ export interface AccountScope {
|
|
|
24
24
|
/** {@link namedRunAccounts} for an {@link AccountScope}. */
|
|
25
25
|
export declare function scopeRunAccounts(home: Home, required: readonly ProviderId[], { repoRoot, run, picks }: AccountScope): Promise<Map<ProviderId, ResolvedAgentProfile>>;
|
|
26
26
|
/**
|
|
27
|
-
* The account an existing run
|
|
28
|
-
* (`
|
|
29
|
-
*
|
|
27
|
+
* The account an existing run's next turn on `provider` uses, as the engine picks it
|
|
28
|
+
* (`sessionAffinity`, `agentEnvForStep`). A turn that resumes the latest session uses that
|
|
29
|
+
* session's account (`default` when none was recorded), unless the run's own account differs, which
|
|
30
|
+
* starts a fresh session on the run's account. A fresh turn on the run's runner uses the run's
|
|
31
|
+
* account. Absent means the project's selection, the engine's fallback for any other provider.
|
|
30
32
|
*/
|
|
31
33
|
export declare function runAccountFor(run: RunRecord, provider: ProviderId): string | undefined;
|
|
32
34
|
/** The probed sign-in state of each named account in `accounts`. `refresh` drops the cached answer
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolveRunnerId } from '../core/runner-registry.js';
|
|
2
2
|
import { DEFAULT_RUNNER_ID } from '../core/runner-ids.js';
|
|
3
|
-
import {
|
|
3
|
+
import { latestSession } from '../contract/index.js';
|
|
4
|
+
import { DEFAULT_AGENT_ACCOUNT_ID } from '../contract/index.js';
|
|
4
5
|
import { loadAgentAccounts } from '../workspace/agent-accounts.js';
|
|
5
6
|
import { selectProfile } from '../workspace/agent-profiles.js';
|
|
6
7
|
/**
|
|
@@ -32,13 +33,19 @@ export function scopeRunAccounts(home, required, { repoRoot, run, picks = {} })
|
|
|
32
33
|
return namedRunAccounts(home, repoRoot, required, chosen);
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
|
-
* The account an existing run
|
|
36
|
-
* (`
|
|
37
|
-
*
|
|
36
|
+
* The account an existing run's next turn on `provider` uses, as the engine picks it
|
|
37
|
+
* (`sessionAffinity`, `agentEnvForStep`). A turn that resumes the latest session uses that
|
|
38
|
+
* session's account (`default` when none was recorded), unless the run's own account differs, which
|
|
39
|
+
* starts a fresh session on the run's account. A fresh turn on the run's runner uses the run's
|
|
40
|
+
* account. Absent means the project's selection, the engine's fallback for any other provider.
|
|
38
41
|
*/
|
|
39
42
|
export function runAccountFor(run, provider) {
|
|
40
|
-
const
|
|
41
|
-
|
|
43
|
+
const runRunner = resolveRunnerId(run.runner ?? DEFAULT_RUNNER_ID);
|
|
44
|
+
const runAccount = provider === runRunner ? run.agentProfile : undefined;
|
|
45
|
+
const session = latestSession(run);
|
|
46
|
+
if (session.sessionId === undefined || resolveRunnerId(session.backend) !== provider)
|
|
47
|
+
return runAccount;
|
|
48
|
+
return runAccount ?? session.profileId ?? DEFAULT_AGENT_ACCOUNT_ID;
|
|
42
49
|
}
|
|
43
50
|
/** The probed sign-in state of each named account in `accounts`. `refresh` drops the cached answer
|
|
44
51
|
* first, so a refusal is confirmed by a fresh probe, as the default rows are. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-accounts.js","sourceRoot":"","sources":["../../src/server/run-accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAA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AAO,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE;QAC7E,IAAI,OAAO;YAAE,YAAY,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,aAAa,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QACvG,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAU,CAAC;IAC9E,CAAC,CAAC,CAAC,CAAC;IACJ,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC"}
|
package/dist/server/server.d.ts
CHANGED
|
@@ -4608,6 +4608,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4608
4608
|
} & {
|
|
4609
4609
|
"/repo/commit/:sha": {
|
|
4610
4610
|
$get: {
|
|
4611
|
+
output: string;
|
|
4612
|
+
outputFormat: "text";
|
|
4613
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4614
|
+
input: {
|
|
4615
|
+
query: {
|
|
4616
|
+
structured?: string | undefined;
|
|
4617
|
+
};
|
|
4618
|
+
} & {
|
|
4619
|
+
param: {
|
|
4620
|
+
sha: string;
|
|
4621
|
+
};
|
|
4622
|
+
};
|
|
4623
|
+
} | {
|
|
4611
4624
|
output: {
|
|
4612
4625
|
error: string;
|
|
4613
4626
|
code?: "invalid_input" | undefined;
|
|
@@ -4671,19 +4684,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4671
4684
|
sha: string;
|
|
4672
4685
|
};
|
|
4673
4686
|
};
|
|
4674
|
-
} | {
|
|
4675
|
-
output: string;
|
|
4676
|
-
outputFormat: "text";
|
|
4677
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4678
|
-
input: {
|
|
4679
|
-
query: {
|
|
4680
|
-
structured?: string | undefined;
|
|
4681
|
-
};
|
|
4682
|
-
} & {
|
|
4683
|
-
param: {
|
|
4684
|
-
sha: string;
|
|
4685
|
-
};
|
|
4686
|
-
};
|
|
4687
4687
|
};
|
|
4688
4688
|
};
|
|
4689
4689
|
} & {
|
|
@@ -18485,20 +18485,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18485
18485
|
} & {
|
|
18486
18486
|
"/runs/:id/handoff": {
|
|
18487
18487
|
$get: {
|
|
18488
|
-
output:
|
|
18489
|
-
|
|
18490
|
-
|
|
18491
|
-
outputFormat: "json";
|
|
18492
|
-
status: 404;
|
|
18488
|
+
output: string;
|
|
18489
|
+
outputFormat: "text";
|
|
18490
|
+
status: 200;
|
|
18493
18491
|
input: {
|
|
18494
18492
|
param: {
|
|
18495
18493
|
id: string;
|
|
18496
18494
|
};
|
|
18497
18495
|
};
|
|
18498
18496
|
} | {
|
|
18499
|
-
output:
|
|
18500
|
-
|
|
18501
|
-
|
|
18497
|
+
output: {
|
|
18498
|
+
error: string;
|
|
18499
|
+
};
|
|
18500
|
+
outputFormat: "json";
|
|
18501
|
+
status: 404;
|
|
18502
18502
|
input: {
|
|
18503
18503
|
param: {
|
|
18504
18504
|
id: string;
|
|
@@ -18536,20 +18536,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18536
18536
|
} & {
|
|
18537
18537
|
"/runs/:id/diff": {
|
|
18538
18538
|
$get: {
|
|
18539
|
-
output:
|
|
18540
|
-
|
|
18541
|
-
|
|
18542
|
-
outputFormat: "json";
|
|
18543
|
-
status: 404 | 409;
|
|
18539
|
+
output: string;
|
|
18540
|
+
outputFormat: "text";
|
|
18541
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
18544
18542
|
input: {
|
|
18545
18543
|
param: {
|
|
18546
18544
|
id: string;
|
|
18547
18545
|
};
|
|
18548
18546
|
};
|
|
18549
18547
|
} | {
|
|
18550
|
-
output:
|
|
18551
|
-
|
|
18552
|
-
|
|
18548
|
+
output: {
|
|
18549
|
+
error: string;
|
|
18550
|
+
};
|
|
18551
|
+
outputFormat: "json";
|
|
18552
|
+
status: 404 | 409;
|
|
18553
18553
|
input: {
|
|
18554
18554
|
param: {
|
|
18555
18555
|
id: string;
|
|
@@ -20567,6 +20567,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
20567
20567
|
} & {
|
|
20568
20568
|
"/repo/commit/:sha": {
|
|
20569
20569
|
$get: {
|
|
20570
|
+
output: string;
|
|
20571
|
+
outputFormat: "text";
|
|
20572
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20573
|
+
input: {
|
|
20574
|
+
query: {
|
|
20575
|
+
structured?: string | undefined;
|
|
20576
|
+
};
|
|
20577
|
+
} & {
|
|
20578
|
+
param: {
|
|
20579
|
+
sha: string;
|
|
20580
|
+
};
|
|
20581
|
+
};
|
|
20582
|
+
} | {
|
|
20570
20583
|
output: {
|
|
20571
20584
|
error: string;
|
|
20572
20585
|
code?: "invalid_input" | undefined;
|
|
@@ -20630,19 +20643,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
20630
20643
|
sha: string;
|
|
20631
20644
|
};
|
|
20632
20645
|
};
|
|
20633
|
-
} | {
|
|
20634
|
-
output: string;
|
|
20635
|
-
outputFormat: "text";
|
|
20636
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20637
|
-
input: {
|
|
20638
|
-
query: {
|
|
20639
|
-
structured?: string | undefined;
|
|
20640
|
-
};
|
|
20641
|
-
} & {
|
|
20642
|
-
param: {
|
|
20643
|
-
sha: string;
|
|
20644
|
-
};
|
|
20645
|
-
};
|
|
20646
20646
|
};
|
|
20647
20647
|
};
|
|
20648
20648
|
} & {
|
|
@@ -34444,20 +34444,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
34444
34444
|
} & {
|
|
34445
34445
|
"/runs/:id/handoff": {
|
|
34446
34446
|
$get: {
|
|
34447
|
-
output:
|
|
34448
|
-
|
|
34449
|
-
|
|
34450
|
-
outputFormat: "json";
|
|
34451
|
-
status: 404;
|
|
34447
|
+
output: string;
|
|
34448
|
+
outputFormat: "text";
|
|
34449
|
+
status: 200;
|
|
34452
34450
|
input: {
|
|
34453
34451
|
param: {
|
|
34454
34452
|
id: string;
|
|
34455
34453
|
};
|
|
34456
34454
|
};
|
|
34457
34455
|
} | {
|
|
34458
|
-
output:
|
|
34459
|
-
|
|
34460
|
-
|
|
34456
|
+
output: {
|
|
34457
|
+
error: string;
|
|
34458
|
+
};
|
|
34459
|
+
outputFormat: "json";
|
|
34460
|
+
status: 404;
|
|
34461
34461
|
input: {
|
|
34462
34462
|
param: {
|
|
34463
34463
|
id: string;
|
|
@@ -34495,20 +34495,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
34495
34495
|
} & {
|
|
34496
34496
|
"/runs/:id/diff": {
|
|
34497
34497
|
$get: {
|
|
34498
|
-
output:
|
|
34499
|
-
|
|
34500
|
-
|
|
34501
|
-
outputFormat: "json";
|
|
34502
|
-
status: 404 | 409;
|
|
34498
|
+
output: string;
|
|
34499
|
+
outputFormat: "text";
|
|
34500
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
34503
34501
|
input: {
|
|
34504
34502
|
param: {
|
|
34505
34503
|
id: string;
|
|
34506
34504
|
};
|
|
34507
34505
|
};
|
|
34508
34506
|
} | {
|
|
34509
|
-
output:
|
|
34510
|
-
|
|
34511
|
-
|
|
34507
|
+
output: {
|
|
34508
|
+
error: string;
|
|
34509
|
+
};
|
|
34510
|
+
outputFormat: "json";
|
|
34511
|
+
status: 404 | 409;
|
|
34512
34512
|
input: {
|
|
34513
34513
|
param: {
|
|
34514
34514
|
id: string;
|
package/dist/server/server.js
CHANGED
|
@@ -2807,17 +2807,17 @@ export function createApp(deps) {
|
|
|
2807
2807
|
return c.json({ error: 'no agent session to resume' }, 409);
|
|
2808
2808
|
if (runnerDefinition(backend).cli.interactive === false)
|
|
2809
2809
|
return c.json({ error: 'this runner has no interactive CLI' }, 409);
|
|
2810
|
-
const
|
|
2810
|
+
const resume = checkout.resumeAllowed ? resumeCommand(backend, sessionId) : undefined;
|
|
2811
|
+
// Fails closed on an id we do not recognise — see resumeCommand (open-mercato/cezar#431).
|
|
2812
|
+
if (resume === null)
|
|
2813
|
+
return c.json({ error: 'the recorded session id has an unexpected shape' }, 409);
|
|
2814
|
+
const blocked = await providerActionError([backend], { repoRoot: project.root, picks: { [backend]: resume ? profileId ?? DEFAULT_AGENT_ACCOUNT_ID : undefined } });
|
|
2811
2815
|
if (blocked)
|
|
2812
2816
|
return c.json({ error: blocked }, 409);
|
|
2813
2817
|
const cwd = checkout.directory();
|
|
2814
2818
|
const refusal = fallbackProjectWriteError(cwd);
|
|
2815
2819
|
if (refusal)
|
|
2816
2820
|
return c.json({ error: refusal }, 409);
|
|
2817
|
-
const resume = checkout.resumeAllowed ? resumeCommand(backend, sessionId) : undefined;
|
|
2818
|
-
// Fails closed on an id we do not recognise — see resumeCommand (open-mercato/cezar#431).
|
|
2819
|
-
if (resume === null)
|
|
2820
|
-
return c.json({ error: 'the recorded session id has an unexpected shape' }, 409);
|
|
2821
2821
|
const account = resume
|
|
2822
2822
|
? { command: resume, ...await handoffEnv(backend, profileId) }
|
|
2823
2823
|
: await freshCliHandoff(backend, project.root, deps.home);
|