@lucid-agents/taskmarket 1.19.0 → 1.20.0
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/agent-compatibility.json +11 -1
- package/dist/{budget-view-JPZ7HWR2.js → budget-view-J6L7X6EY.js} +1 -1
- package/dist/{channels-ZMYXFZ72.js → channels-A57K7BP6.js} +4 -4
- package/dist/{chunk-6KJ5EFBN.js → chunk-2YFJNXXA.js} +2 -2
- package/dist/{chunk-OKZ2NRYZ.js → chunk-4ZC6SH7H.js} +18 -4
- package/dist/{chunk-PGXPZFVY.js → chunk-F7HVOUHY.js} +177 -14
- package/dist/{chunk-U5F3Z2BR.js → chunk-LKO25UQ7.js} +22 -5
- package/dist/{chunk-MJR2CZWZ.js → chunk-RA6EZSII.js} +16 -5
- package/dist/{chunk-RKGRXJ5X.js → chunk-S62UQAAF.js} +5 -4
- package/dist/{chunk-VMSV4EYS.js → chunk-SCZPZWRF.js} +26 -16
- package/dist/{chunk-3HCDMHXW.js → chunk-SOX4RRVI.js} +1 -1
- package/dist/{chunk-F2SZG7TC.js → chunk-SQFNRMEN.js} +15 -3
- package/dist/{chunk-7Y7IOFKT.js → chunk-W7JSBEGK.js} +77 -11
- package/dist/{chunk-EB6OJBF5.js → chunk-XJOB4NMV.js} +84 -2
- package/dist/{compatibility-KUYGZSUC.js → compatibility-636WJOEX.js} +1 -1
- package/dist/{doctor-LDSADHSQ.js → doctor-DO2R6HK7.js} +9 -9
- package/dist/index.js +483 -174
- package/dist/{launch-I3NCB5FV.js → launch-CXG3JSD7.js} +493 -33
- package/dist/pi-extensions/remote-tools.cjs +15 -4
- package/dist/pi-extensions/xgate.cjs +127 -12
- package/dist/{reconcile-UHDI4QCY.js → reconcile-LB2ZRNG5.js} +4 -4
- package/dist/{status-GNY7YXPE.js → status-ITMQZ4W6.js} +8 -8
- package/dist/{sync-pull-6PWR6CJS.js → sync-pull-U3WGVKDX.js} +3 -3
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"taskmarket": "1.
|
|
2
|
+
"taskmarket": "1.20.0",
|
|
3
3
|
"manifestVersion": 1,
|
|
4
4
|
"pi": {
|
|
5
5
|
"package": "@earendil-works/pi-coding-agent",
|
|
@@ -35,6 +35,16 @@
|
|
|
35
35
|
"version": "0.85.1"
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
|
+
"piVendored": [
|
|
39
|
+
{
|
|
40
|
+
"package": "@silvia-odwyer/photon-node",
|
|
41
|
+
"version": "0.3.4"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"package": "jiti",
|
|
45
|
+
"version": "2.7.0"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
38
48
|
"support": [
|
|
39
49
|
{
|
|
40
50
|
"package": "ssh2",
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
selectRail,
|
|
11
11
|
uncertainPurchases,
|
|
12
12
|
withdrawalHatch
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-W7JSBEGK.js";
|
|
14
|
+
import "./chunk-SCZPZWRF.js";
|
|
15
|
+
import "./chunk-F7HVOUHY.js";
|
|
16
|
+
import "./chunk-XJOB4NMV.js";
|
|
17
17
|
import "./chunk-YM4S6IE4.js";
|
|
18
18
|
import "./chunk-S7SJMJ2I.js";
|
|
19
19
|
export {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
readMppTempoChallenge,
|
|
17
17
|
reconcileX402Payment,
|
|
18
18
|
withX402FileLock
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SCZPZWRF.js";
|
|
20
20
|
import {
|
|
21
21
|
ApiError,
|
|
22
22
|
ComputeCreditBuyOutputSchema,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
resolveIdempotencyKey,
|
|
39
39
|
selectedNetwork,
|
|
40
40
|
withIdempotentWrite
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-F7HVOUHY.js";
|
|
42
42
|
|
|
43
43
|
// src/lib/x402-fee.ts
|
|
44
44
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
@@ -24,6 +24,15 @@ var AGENT_COMPATIBILITY = {
|
|
|
24
24
|
{ package: "@earendil-works/chord", version: "0.85.1" },
|
|
25
25
|
{ package: "@earendil-works/pi-telemetry", version: "0.85.1" }
|
|
26
26
|
],
|
|
27
|
+
/**
|
|
28
|
+
* The packages Pi's published bundle still loads from npm, copied as published into
|
|
29
|
+
* `dist/pi/vendor`. Pi takes them at a range, so a lockfile bump could otherwise ship another
|
|
30
|
+
* release; the build also checks every copied file's hash (scripts/bundle-agent-runtime.ts).
|
|
31
|
+
*/
|
|
32
|
+
piVendored: [
|
|
33
|
+
{ package: "@silvia-odwyer/photon-node", version: "0.3.4" },
|
|
34
|
+
{ package: "jiti", version: "2.7.0" }
|
|
35
|
+
],
|
|
27
36
|
/** What the remote tool extension and the broker connector are built with besides Pi. */
|
|
28
37
|
support: [{ package: "ssh2", version: "1.17.0" }],
|
|
29
38
|
/**
|
|
@@ -76,9 +85,14 @@ function findInstalledPackage(name, fromDir) {
|
|
|
76
85
|
}
|
|
77
86
|
}
|
|
78
87
|
var here = path.dirname(fileURLToPath(import.meta.url));
|
|
79
|
-
|
|
88
|
+
var runningFromSource = fileURLToPath(import.meta.url).endsWith(".ts");
|
|
89
|
+
function piRuntime(fromDir = here, options = {}) {
|
|
80
90
|
const staged = path.join(fromDir, "pi");
|
|
81
|
-
|
|
91
|
+
let packageDir;
|
|
92
|
+
if (existsSync(path.join(staged, "package.json"))) packageDir = staged;
|
|
93
|
+
else if (options.fromSource ?? runningFromSource) {
|
|
94
|
+
packageDir = findInstalledPackage(AGENT_COMPATIBILITY.pi.package, fromDir)?.dir;
|
|
95
|
+
}
|
|
82
96
|
if (!packageDir) return void 0;
|
|
83
97
|
return { packageDir, cliPath: path.join(packageDir, "dist", "bundle", "cli.js") };
|
|
84
98
|
}
|
|
@@ -92,11 +106,11 @@ function assertAgentCompatibility(options = {}) {
|
|
|
92
106
|
);
|
|
93
107
|
}
|
|
94
108
|
const fromDir = options.fromDir ?? here;
|
|
95
|
-
const runtime = piRuntime(fromDir);
|
|
109
|
+
const runtime = piRuntime(fromDir, { fromSource: options.fromSource });
|
|
96
110
|
if (!runtime || !existsSync(runtime.cliPath)) {
|
|
97
111
|
throw new AgentLaunchError(
|
|
98
112
|
"incompatible_install",
|
|
99
|
-
`Pi
|
|
113
|
+
`This install is damaged: the Pi bundled with it (${path.join(fromDir, "pi")}) is missing or incomplete, and taskmarket agent runs no other Pi; ${reinstall}`
|
|
100
114
|
);
|
|
101
115
|
}
|
|
102
116
|
const pi = JSON.parse(readFileSync(path.join(runtime.packageDir, "package.json"), "utf8"));
|
|
@@ -85,8 +85,17 @@ var SandboxConnectionSchema = z.object({
|
|
|
85
85
|
var SandboxListOutputSchema = z.object({ sandboxes: z.array(SandboxSummarySchema) });
|
|
86
86
|
|
|
87
87
|
// ../../packages/shared/dist/schemas/common.schemas.js
|
|
88
|
+
import { getAddress } from "viem";
|
|
88
89
|
import { z as z2 } from "zod";
|
|
89
|
-
var EthAddressSchema = z2.string().regex(/^0x[a-fA-F0-9]{40}$/, "Invalid Ethereum address");
|
|
90
|
+
var EthAddressSchema = z2.string().regex(/^0x[a-fA-F0-9]{40}$/, "Invalid Ethereum address").refine(hasValidChecksumIfMixedCase, "Invalid Ethereum address checksum");
|
|
91
|
+
function hasValidChecksumIfMixedCase(address2) {
|
|
92
|
+
if (!/^0x[a-fA-F0-9]{40}$/.test(address2))
|
|
93
|
+
return true;
|
|
94
|
+
const body = address2.slice(2);
|
|
95
|
+
if (body === body.toLowerCase() || body === body.toUpperCase())
|
|
96
|
+
return true;
|
|
97
|
+
return getAddress(address2.toLowerCase()) === address2;
|
|
98
|
+
}
|
|
90
99
|
var UsdcBaseUnitsSchema = z2.string().regex(/^[0-9]+$/, "Amount must be a non-negative integer in USDC base units");
|
|
91
100
|
var PositiveUsdcBaseUnitsSchema = UsdcBaseUnitsSchema.refine(
|
|
92
101
|
// The refine still runs when the regex check has already failed; skip the
|
|
@@ -1506,8 +1515,7 @@ var RatingInputSchema = z11.object({
|
|
|
1506
1515
|
taskId: z11.string(),
|
|
1507
1516
|
worker: z11.string(),
|
|
1508
1517
|
rating: z11.number().int().min(0).max(100),
|
|
1509
|
-
feedbackText: z11.string().max(500).optional()
|
|
1510
|
-
raterAgentId: z11.number().int().nonnegative().optional()
|
|
1518
|
+
feedbackText: z11.string().max(500).optional()
|
|
1511
1519
|
});
|
|
1512
1520
|
var FeedbackSchema = z11.object({
|
|
1513
1521
|
id: z11.string(),
|
|
@@ -1837,25 +1845,31 @@ var AccountRecoveryCodeSchema = z17.string().regex(/^\d{8}$/);
|
|
|
1837
1845
|
var SetWithdrawalAddressOutputSchema = z17.object({
|
|
1838
1846
|
withdrawalAddress: z17.string(),
|
|
1839
1847
|
// Returned exactly once, in this same response -- there is no other way to see it again.
|
|
1840
|
-
accountRecoveryCode: AccountRecoveryCodeSchema
|
|
1848
|
+
accountRecoveryCode: AccountRecoveryCodeSchema,
|
|
1849
|
+
chainId: z17.number().int().positive()
|
|
1841
1850
|
});
|
|
1842
1851
|
var ChangeWithdrawalAddressInputSchema = z17.object({
|
|
1843
1852
|
address: EthAddressSchema,
|
|
1844
1853
|
accountRecoveryCode: AccountRecoveryCodeSchema,
|
|
1845
|
-
newWithdrawalAddress: EthAddressSchema
|
|
1854
|
+
newWithdrawalAddress: EthAddressSchema,
|
|
1855
|
+
chainId: z17.number().int().positive().optional()
|
|
1846
1856
|
});
|
|
1847
1857
|
var ChangeWithdrawalAddressOutputSchema = z17.object({
|
|
1848
1858
|
withdrawalAddress: z17.string(),
|
|
1849
1859
|
// A fresh code, minted the same way, immediately: using a code invalidates it and
|
|
1850
1860
|
// replaces it, so the operator always holds exactly one current, unused code.
|
|
1851
|
-
accountRecoveryCode: AccountRecoveryCodeSchema
|
|
1861
|
+
accountRecoveryCode: AccountRecoveryCodeSchema,
|
|
1862
|
+
chainId: z17.number().int().positive()
|
|
1852
1863
|
});
|
|
1853
1864
|
var RevealBackfilledRecoveryCodeInputSchema = z17.object({
|
|
1854
1865
|
address: EthAddressSchema,
|
|
1855
|
-
signature: z17.string().min(1)
|
|
1866
|
+
signature: z17.string().min(1),
|
|
1867
|
+
// Named, the signed message binds it (buildRevealAccountRecoveryCodeMessage).
|
|
1868
|
+
chainId: z17.number().int().positive().optional()
|
|
1856
1869
|
});
|
|
1857
1870
|
var RevealBackfilledRecoveryCodeOutputSchema = z17.object({
|
|
1858
|
-
accountRecoveryCode: AccountRecoveryCodeSchema
|
|
1871
|
+
accountRecoveryCode: AccountRecoveryCodeSchema,
|
|
1872
|
+
chainId: z17.number().int().positive()
|
|
1859
1873
|
});
|
|
1860
1874
|
var UsdcDomainSchema = z17.object({
|
|
1861
1875
|
name: z17.string(),
|
|
@@ -1865,6 +1879,7 @@ var UsdcDomainSchema = z17.object({
|
|
|
1865
1879
|
});
|
|
1866
1880
|
var GetWithdrawalAddressOutputSchema = z17.object({
|
|
1867
1881
|
withdrawalAddress: z17.string().nullable(),
|
|
1882
|
+
chainId: z17.number().int().positive(),
|
|
1868
1883
|
usdcDomain: UsdcDomainSchema
|
|
1869
1884
|
});
|
|
1870
1885
|
var AuthorizationSchema = z17.object({
|
|
@@ -5707,8 +5722,9 @@ function buildSetWithdrawalAddressMessage(input2) {
|
|
|
5707
5722
|
].join("\n");
|
|
5708
5723
|
}
|
|
5709
5724
|
var SET_WITHDRAWAL_ADDRESS_MAX_TTL_SECONDS = 15 * 60;
|
|
5710
|
-
function buildRevealAccountRecoveryCodeMessage(address2) {
|
|
5711
|
-
|
|
5725
|
+
function buildRevealAccountRecoveryCodeMessage(address2, chainId) {
|
|
5726
|
+
const base2 = `taskmarket:reveal-account-recovery-code:${address2.toLowerCase()}`;
|
|
5727
|
+
return chainId === void 0 ? base2 : `${base2}:chain:${chainId}`;
|
|
5712
5728
|
}
|
|
5713
5729
|
function buildWithdrawDreamsMessage(input2) {
|
|
5714
5730
|
return [
|
|
@@ -7394,10 +7410,31 @@ var DirectPendingSchema = z51.object({
|
|
|
7394
7410
|
* save and a resumed job never counts the same turn twice.
|
|
7395
7411
|
*/
|
|
7396
7412
|
sessionItems: z51.number().int().nonnegative().optional(),
|
|
7413
|
+
/**
|
|
7414
|
+
* ADR-0314. The value `project.unproven` had before this job's work turn set it, kept so a
|
|
7415
|
+
* turn that could not have changed the sandbox puts it back. Absent until the work turn is
|
|
7416
|
+
* dispatched into a session with a sandbox.
|
|
7417
|
+
*/
|
|
7418
|
+
unprovenBefore: z51.boolean().optional(),
|
|
7419
|
+
/**
|
|
7420
|
+
* ADR-0314. `keepSetup` held back a setup change this job would otherwise have made, so the
|
|
7421
|
+
* job's work turn is proved, best effort, while the agent has no verified backup. Decided
|
|
7422
|
+
* when the job is prepared; a successor reads it rather than deciding again.
|
|
7423
|
+
*/
|
|
7424
|
+
setupHeld: z51.literal(true).optional(),
|
|
7397
7425
|
checkpointRepair: z51.object({
|
|
7398
7426
|
workTurnId: z51.string().min(1),
|
|
7399
7427
|
finalText: z51.string().min(1).max(65536),
|
|
7400
|
-
nativeTurnIds: z51.array(z51.string()).max(2e3).optional()
|
|
7428
|
+
nativeTurnIds: z51.array(z51.string()).max(2e3).optional(),
|
|
7429
|
+
/**
|
|
7430
|
+
* ADR-0314. Why the maintenance turn runs: the work turn could have changed the sandbox
|
|
7431
|
+
* (`changed`, and every block written before the field), or it is a best-effort proof
|
|
7432
|
+
* after an unproven turn (`unproven`) or for a held setup change (`held`). A best-effort
|
|
7433
|
+
* proof that is refused or fails leaves the job's answer standing.
|
|
7434
|
+
*/
|
|
7435
|
+
rule: z51.enum(["changed", "unproven", "held"]).optional(),
|
|
7436
|
+
/** ADR-0314. The refusal that stopped a best-effort maintenance turn being dispatched. */
|
|
7437
|
+
refused: z51.string().min(1).max(100).optional()
|
|
7401
7438
|
}).optional(),
|
|
7402
7439
|
replies: z51.record(z51.object({
|
|
7403
7440
|
success: z51.boolean(),
|
|
@@ -7668,7 +7705,13 @@ var DirectAgentCheckpointSchema = z51.object({
|
|
|
7668
7705
|
skillBundle: z51.object({
|
|
7669
7706
|
sessionId: z51.string().min(1).max(256),
|
|
7670
7707
|
docsHash: z51.string().regex(/^[a-f0-9]{64}$/),
|
|
7671
|
-
inventoryHash: z51.string().regex(/^[a-f0-9]{64}$/)
|
|
7708
|
+
inventoryHash: z51.string().regex(/^[a-f0-9]{64}$/),
|
|
7709
|
+
/**
|
|
7710
|
+
* The sandbox identity (the sentinel name, ADR-0193) the market skill inventory was last
|
|
7711
|
+
* verified in for this session (ADR-0312). Absent until a check passes with an identity
|
|
7712
|
+
* read, and in checkpoints written before it was recorded: those list on their next job.
|
|
7713
|
+
*/
|
|
7714
|
+
verifiedSandbox: z51.string().uuid().optional()
|
|
7672
7715
|
}).optional(),
|
|
7673
7716
|
/**
|
|
7674
7717
|
* The owner's session reset (`hosted_agents.session_reset_version`) this checkpoint has handled.
|
|
@@ -7686,6 +7729,13 @@ var DirectAgentCheckpointSchema = z51.object({
|
|
|
7686
7729
|
setupHash: z51.string().regex(/^[a-f0-9]{64}$/),
|
|
7687
7730
|
snapshot: DirectProjectSnapshotSchema.nullable(),
|
|
7688
7731
|
restoring: z51.boolean().default(false),
|
|
7732
|
+
/**
|
|
7733
|
+
* ADR-0314. The sandbox may hold something the last verified backup does not. Set before a
|
|
7734
|
+
* work turn goes into a session with a sandbox, put back when the turn could not have
|
|
7735
|
+
* changed it, and cleared by a verified backup or a completed restore, so a crash anywhere
|
|
7736
|
+
* leaves it set. Absent in checkpoints written before it existed, which reads as clear.
|
|
7737
|
+
*/
|
|
7738
|
+
unproven: z51.boolean().optional(),
|
|
7689
7739
|
restoreSetupHash: z51.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
7690
7740
|
restoreConfiguration: DirectRuntimeConfigurationSchema.optional(),
|
|
7691
7741
|
// `contextPending` and `context` (conversation excerpts) were removed by SM-35; checkpoints
|
|
@@ -9815,6 +9865,8 @@ var BUG_REPORT_STATUSES = [
|
|
|
9815
9865
|
"wont-fix"
|
|
9816
9866
|
];
|
|
9817
9867
|
var BugReportStatusSchema = z77.enum(BUG_REPORT_STATUSES);
|
|
9868
|
+
var BUG_REPORT_VISIBILITIES = ["public", "private"];
|
|
9869
|
+
var BugReportVisibilitySchema = z77.enum(BUG_REPORT_VISIBILITIES);
|
|
9818
9870
|
var BUG_REPORT_TITLE_MAX_CHARS = 200;
|
|
9819
9871
|
var BUG_REPORT_DESCRIPTION_MAX_BYTES = 10 * 1024;
|
|
9820
9872
|
var BUG_REPORT_CONTEXT_MAX_BYTES = 32 * 1024;
|
|
@@ -9844,7 +9896,8 @@ var SubmitBugReportInputSchema = z77.object({
|
|
|
9844
9896
|
severity: BugReportSeveritySchema.default("medium"),
|
|
9845
9897
|
source: BugReportSourceSchema,
|
|
9846
9898
|
agentId: z77.string().max(128).optional(),
|
|
9847
|
-
context: BugReportContextSchema.default({})
|
|
9899
|
+
context: BugReportContextSchema.default({}),
|
|
9900
|
+
visibility: BugReportVisibilitySchema.default("public")
|
|
9848
9901
|
}).strict();
|
|
9849
9902
|
var SubmitBugReportOutputSchema = z77.object({
|
|
9850
9903
|
id: z77.string().uuid(),
|
|
@@ -9852,6 +9905,9 @@ var SubmitBugReportOutputSchema = z77.object({
|
|
|
9852
9905
|
});
|
|
9853
9906
|
var BugReportSchema = z77.object({
|
|
9854
9907
|
id: z77.string().uuid(),
|
|
9908
|
+
/** The public report number, shown as #N (ADR-0321). */
|
|
9909
|
+
number: z77.number().int(),
|
|
9910
|
+
visibility: BugReportVisibilitySchema,
|
|
9855
9911
|
title: z77.string(),
|
|
9856
9912
|
description: z77.string(),
|
|
9857
9913
|
severity: BugReportSeveritySchema,
|
|
@@ -9860,6 +9916,8 @@ var BugReportSchema = z77.object({
|
|
|
9860
9916
|
duplicateOfId: z77.string().uuid().nullable(),
|
|
9861
9917
|
githubIssueNumber: z77.number().int().nullable(),
|
|
9862
9918
|
githubIssueUrl: z77.string().url().nullable(),
|
|
9919
|
+
/** The other side has posted since the viewer last read the thread (ADR-0318 decision 5). */
|
|
9920
|
+
unread: z77.boolean(),
|
|
9863
9921
|
context: z77.record(z77.unknown()),
|
|
9864
9922
|
createdAt: z77.string(),
|
|
9865
9923
|
updatedAt: z77.string()
|
|
@@ -9883,6 +9941,8 @@ var ListStaffBugReportsInputSchema = z77.object({
|
|
|
9883
9941
|
severity: BugReportSeveritySchema.optional(),
|
|
9884
9942
|
createdFrom: z77.string().datetime().optional(),
|
|
9885
9943
|
createdTo: z77.string().datetime().optional(),
|
|
9944
|
+
/** Only reports with a reporter reply staff have not read. */
|
|
9945
|
+
unread: z77.boolean().optional(),
|
|
9886
9946
|
limit: z77.number().int().min(1).max(200).default(50),
|
|
9887
9947
|
offset: z77.number().int().min(0).default(0)
|
|
9888
9948
|
}).default({});
|
|
@@ -9907,6 +9967,95 @@ var UpdateBugReportInputSchema = z77.object({
|
|
|
9907
9967
|
}).refine((v) => v.status !== void 0 || v.staffNote !== void 0, {
|
|
9908
9968
|
message: "Nothing to update"
|
|
9909
9969
|
});
|
|
9970
|
+
var BUG_REPORT_MESSAGE_AUTHOR_KINDS = ["staff", "reporter"];
|
|
9971
|
+
var BugReportMessageAuthorKindSchema = z77.enum(BUG_REPORT_MESSAGE_AUTHOR_KINDS);
|
|
9972
|
+
var BugReportMessageBodySchema = z77.string().trim().min(1).refine((value) => utf8Bytes(value) <= BUG_REPORT_DESCRIPTION_MAX_BYTES, {
|
|
9973
|
+
message: `body must be at most ${BUG_REPORT_DESCRIPTION_MAX_BYTES} bytes`
|
|
9974
|
+
});
|
|
9975
|
+
var BugReportMessageSchema = z77.object({
|
|
9976
|
+
id: z77.string().uuid(),
|
|
9977
|
+
authorKind: BugReportMessageAuthorKindSchema,
|
|
9978
|
+
/** "Taskmarket staff" for staff, "Reporter" for the reporter. */
|
|
9979
|
+
author: z77.string(),
|
|
9980
|
+
body: z77.string(),
|
|
9981
|
+
createdAt: z77.string(),
|
|
9982
|
+
/** Posted by the other side since the viewer last read the thread. */
|
|
9983
|
+
isNew: z77.boolean()
|
|
9984
|
+
});
|
|
9985
|
+
var BugReportDetailSchema = BugReportSchema.extend({
|
|
9986
|
+
messages: z77.array(BugReportMessageSchema)
|
|
9987
|
+
});
|
|
9988
|
+
var BugReportStaffDetailSchema = BugReportStaffViewSchema.extend({
|
|
9989
|
+
messages: z77.array(BugReportMessageSchema)
|
|
9990
|
+
});
|
|
9991
|
+
var PostBugReportMessageInputSchema = z77.object({ id: z77.string().uuid(), body: BugReportMessageBodySchema }).strict();
|
|
9992
|
+
var PublicBugReportSchema = z77.object({
|
|
9993
|
+
id: z77.string().uuid(),
|
|
9994
|
+
number: z77.number().int(),
|
|
9995
|
+
title: z77.string(),
|
|
9996
|
+
description: z77.string(),
|
|
9997
|
+
severity: BugReportSeveritySchema,
|
|
9998
|
+
source: BugReportSourceSchema,
|
|
9999
|
+
status: BugReportStatusSchema,
|
|
10000
|
+
duplicateOfId: z77.string().uuid().nullable(),
|
|
10001
|
+
reporterAddress: z77.string(),
|
|
10002
|
+
reporterAgentId: z77.string().nullable(),
|
|
10003
|
+
context: z77.record(z77.unknown()),
|
|
10004
|
+
/** Wallets that said "I have this too". */
|
|
10005
|
+
affectedCount: z77.number().int(),
|
|
10006
|
+
commentCount: z77.number().int(),
|
|
10007
|
+
createdAt: z77.string(),
|
|
10008
|
+
updatedAt: z77.string()
|
|
10009
|
+
});
|
|
10010
|
+
var PUBLIC_BUG_REPORT_SORTS = ["newest", "most-affected"];
|
|
10011
|
+
var ListPublicBugReportsInputSchema = z77.object({
|
|
10012
|
+
status: BugReportStatusSchema.optional(),
|
|
10013
|
+
/** Matched case-insensitively against the title and description. */
|
|
10014
|
+
query: z77.string().trim().min(1).max(200).optional(),
|
|
10015
|
+
sort: z77.enum(PUBLIC_BUG_REPORT_SORTS).default("newest"),
|
|
10016
|
+
// Coerced: the REST route reads these from the query string.
|
|
10017
|
+
limit: z77.coerce.number().int().min(1).max(100).default(50),
|
|
10018
|
+
offset: z77.coerce.number().int().min(0).default(0)
|
|
10019
|
+
}).default({});
|
|
10020
|
+
var ListPublicBugReportsOutputSchema = z77.object({
|
|
10021
|
+
reports: z77.array(PublicBugReportSchema),
|
|
10022
|
+
total: z77.number().int()
|
|
10023
|
+
});
|
|
10024
|
+
var BugReportCommentSchema = z77.object({
|
|
10025
|
+
id: z77.string().uuid(),
|
|
10026
|
+
authorAddress: z77.string(),
|
|
10027
|
+
authorAgentId: z77.string().nullable(),
|
|
10028
|
+
/** The comment is by the report's reporter. */
|
|
10029
|
+
isReporter: z77.boolean(),
|
|
10030
|
+
body: z77.string(),
|
|
10031
|
+
createdAt: z77.string()
|
|
10032
|
+
});
|
|
10033
|
+
var BugReportStaffCommentSchema = BugReportCommentSchema.extend({
|
|
10034
|
+
hiddenAt: z77.string().nullable(),
|
|
10035
|
+
hiddenBy: z77.string().nullable(),
|
|
10036
|
+
/** Staff have blocked the comment's author from commenting on any report. */
|
|
10037
|
+
authorBlocked: z77.boolean()
|
|
10038
|
+
});
|
|
10039
|
+
var PublicBugReportDetailSchema = PublicBugReportSchema.extend({
|
|
10040
|
+
comments: z77.array(BugReportCommentSchema),
|
|
10041
|
+
/** The public number of the report this one duplicates; null when none, or it is private. */
|
|
10042
|
+
duplicateOfNumber: z77.number().int().nullable(),
|
|
10043
|
+
/** The signed-in viewer said "I have this too"; false when signed out. */
|
|
10044
|
+
viewerAffected: z77.boolean()
|
|
10045
|
+
});
|
|
10046
|
+
var GetPublicBugReportInputSchema = z77.object({
|
|
10047
|
+
number: z77.coerce.number().int().positive()
|
|
10048
|
+
});
|
|
10049
|
+
var MarkBugReportAffectedOutputSchema = z77.object({ affectedCount: z77.number().int() });
|
|
10050
|
+
var PostBugReportCommentInputSchema = z77.object({
|
|
10051
|
+
id: z77.string().uuid(),
|
|
10052
|
+
body: BugReportMessageBodySchema,
|
|
10053
|
+
agentId: z77.string().max(128).optional()
|
|
10054
|
+
}).strict();
|
|
10055
|
+
var SetBugReportVisibilityInputSchema = z77.object({ id: z77.string().uuid(), visibility: BugReportVisibilitySchema }).strict();
|
|
10056
|
+
var HideBugReportCommentInputSchema = z77.object({ commentId: z77.string().uuid() }).strict();
|
|
10057
|
+
var BlockBugReportCommenterInputSchema = z77.object({ wallet: z77.string().min(1).max(128), reason: z77.string().max(500).optional() }).strict();
|
|
10058
|
+
var UnblockBugReportCommenterInputSchema = z77.object({ wallet: z77.string().min(1).max(128) }).strict();
|
|
9910
10059
|
|
|
9911
10060
|
// ../../packages/shared/dist/lib/redact-secrets.js
|
|
9912
10061
|
import { english as english2 } from "viem/accounts";
|
|
@@ -10069,6 +10218,13 @@ var NETWORKS = {
|
|
|
10069
10218
|
available: true
|
|
10070
10219
|
}
|
|
10071
10220
|
};
|
|
10221
|
+
function networkNameForChain(chainId) {
|
|
10222
|
+
return NETWORK_NAMES.find((name) => NETWORKS[name].chainId === chainId);
|
|
10223
|
+
}
|
|
10224
|
+
function taskmarketCommandFor(chainId) {
|
|
10225
|
+
const name = networkNameForChain(chainId);
|
|
10226
|
+
return name ? `taskmarket --network ${name}` : "taskmarket";
|
|
10227
|
+
}
|
|
10072
10228
|
var DEFAULT_NETWORK = "base";
|
|
10073
10229
|
function isNetworkName(value) {
|
|
10074
10230
|
return NETWORK_NAMES.includes(value);
|
|
@@ -10333,11 +10489,13 @@ export {
|
|
|
10333
10489
|
resolveTaskTerms,
|
|
10334
10490
|
SponsoredTaskRewardStateSchema,
|
|
10335
10491
|
SponsoredTaskWorkerRewardClaimStatusSchema,
|
|
10492
|
+
TaskAwardSchema,
|
|
10336
10493
|
MppTempoChargeRequestSchema,
|
|
10337
10494
|
decodeMppJson,
|
|
10338
10495
|
parseMppChallenge,
|
|
10339
10496
|
formatMppCredential,
|
|
10340
10497
|
mppAttributionMemo,
|
|
10498
|
+
NetworkChainInfoSchema,
|
|
10341
10499
|
AgentMessageEnvelopeSchema,
|
|
10342
10500
|
ComputeCreditBuyOutputSchema,
|
|
10343
10501
|
ComputeCreditStatusOutputSchema,
|
|
@@ -10353,6 +10511,7 @@ export {
|
|
|
10353
10511
|
isRecordingPendingResponse,
|
|
10354
10512
|
TEMPO_MAX_VALIDITY_WINDOW_SECONDS,
|
|
10355
10513
|
clampValidityWindowSeconds,
|
|
10514
|
+
isTaskmarketChainId,
|
|
10356
10515
|
taskmarketChain,
|
|
10357
10516
|
clientValidityWindowSeconds,
|
|
10358
10517
|
WALLET_BRIDGE_ORIGIN_CHAIN_ID,
|
|
@@ -10405,8 +10564,11 @@ export {
|
|
|
10405
10564
|
claimStakeToPost,
|
|
10406
10565
|
BUG_REPORT_SEVERITIES,
|
|
10407
10566
|
BUG_REPORT_STATUSES,
|
|
10567
|
+
BUG_REPORT_VISIBILITIES,
|
|
10408
10568
|
SubmitBugReportInputSchema,
|
|
10409
|
-
|
|
10569
|
+
BugReportMessageBodySchema,
|
|
10570
|
+
PostBugReportMessageInputSchema,
|
|
10571
|
+
PUBLIC_BUG_REPORT_SORTS,
|
|
10410
10572
|
REDACTED,
|
|
10411
10573
|
redactSecrets,
|
|
10412
10574
|
getTaskmarketHome,
|
|
@@ -10423,6 +10585,7 @@ export {
|
|
|
10423
10585
|
idempotencyHeaders,
|
|
10424
10586
|
NETWORK_NAMES,
|
|
10425
10587
|
NETWORKS,
|
|
10588
|
+
taskmarketCommandFor,
|
|
10426
10589
|
resolveNetwork,
|
|
10427
10590
|
setSelectedNetwork,
|
|
10428
10591
|
selectedNetwork,
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
loadDeliverableRecord,
|
|
7
7
|
readComputeView,
|
|
8
8
|
taskStage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S62UQAAF.js";
|
|
10
10
|
import {
|
|
11
11
|
activeClaim,
|
|
12
12
|
captureProblem,
|
|
13
13
|
killedSession,
|
|
14
14
|
loadSyncState,
|
|
15
15
|
orphanOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RA6EZSII.js";
|
|
17
17
|
import {
|
|
18
18
|
allocationViews,
|
|
19
19
|
channelView,
|
|
@@ -21,19 +21,19 @@ import {
|
|
|
21
21
|
openAgentChannels,
|
|
22
22
|
uncertainPurchases,
|
|
23
23
|
withdrawalHatch
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-W7JSBEGK.js";
|
|
25
25
|
import {
|
|
26
26
|
SandboxListOutputSchema,
|
|
27
27
|
apiUrl,
|
|
28
28
|
selectedNetwork
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-F7HVOUHY.js";
|
|
30
30
|
import {
|
|
31
31
|
AGENT_VIEW_VERSION,
|
|
32
32
|
blockingPurchases,
|
|
33
33
|
channelLines,
|
|
34
34
|
computeLines,
|
|
35
35
|
formatUsdc
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XJOB4NMV.js";
|
|
37
37
|
import {
|
|
38
38
|
AgentLaunchError
|
|
39
39
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -60,6 +60,7 @@ async function readTaskStatus(wallet) {
|
|
|
60
60
|
} : null,
|
|
61
61
|
deliverableId: record.deliverable?.deliverableId ?? record.submission?.deliverableId ?? null,
|
|
62
62
|
submissionId: record.submission?.submissionId ?? null,
|
|
63
|
+
outcome: record.state === "submitted" ? record.outcome ?? null : null,
|
|
63
64
|
updatedAt: record.updatedAt,
|
|
64
65
|
source: "saved_state"
|
|
65
66
|
};
|
|
@@ -289,6 +290,11 @@ var STAGES = {
|
|
|
289
290
|
frozen: "frozen (validated, waiting for your approval to submit)",
|
|
290
291
|
submitting: "submitting (sent; the next session looks it up before anything is sent again)",
|
|
291
292
|
submitted: "submitted (not yet accepted or paid)",
|
|
293
|
+
awaiting_acceptance: "awaiting acceptance (submitted; the requester or evaluator decides)",
|
|
294
|
+
reward_pending: "reward pending (awarded; the payout is not verified on the chain yet)",
|
|
295
|
+
paid: "paid (the payout is verified on the chain)",
|
|
296
|
+
rejected: "rejected (no reward)",
|
|
297
|
+
expired: "expired (ended without an award; no reward)",
|
|
292
298
|
stopped: "stopped"
|
|
293
299
|
};
|
|
294
300
|
function taskLines(task, error) {
|
|
@@ -304,6 +310,17 @@ function taskLines(task, error) {
|
|
|
304
310
|
}
|
|
305
311
|
if (task.deliverableId) lines.push(` Deliverable: ${task.deliverableId}`);
|
|
306
312
|
if (task.submissionId) lines.push(` Submission: ${task.submissionId}`);
|
|
313
|
+
const outcome = task.outcome;
|
|
314
|
+
if (outcome?.payout) {
|
|
315
|
+
lines.push(
|
|
316
|
+
` Paid: ${outcome.payout.amount} atomic units of ${outcome.payout.asset} in ${outcome.payout.settlementTxHash}`
|
|
317
|
+
);
|
|
318
|
+
} else if (outcome?.award) {
|
|
319
|
+
lines.push(
|
|
320
|
+
` Award: ${outcome.award.workerPayment} atomic units of ${outcome.award.asset}, not verified (${outcome.unverified?.reason ?? "unverified"})`
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
if (outcome) lines.push(` Outcome observed ${outcome.observedAt}`);
|
|
307
324
|
lines.push(` As recorded ${task.updatedAt}`);
|
|
308
325
|
return lines;
|
|
309
326
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __tmCreateRequire } from 'node:module'; import { fileURLToPath as __tmFileURLToPath } from 'node:url'; import { dirname as __tmDirname } from 'node:path'; const require = __tmCreateRequire(import.meta.url); const __tmFilename = __tmFileURLToPath(import.meta.url); const __tmDirnameValue = __tmDirname(__tmFilename);
|
|
2
2
|
import {
|
|
3
3
|
getTaskmarketHome
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-F7HVOUHY.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentLaunchError
|
|
7
7
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -23778,6 +23778,7 @@ function hostKeyBlob(pinned) {
|
|
|
23778
23778
|
var KILL_SETTLE_MS = 5e3;
|
|
23779
23779
|
var KILL_RETRY_MS = [1e3, 3e3];
|
|
23780
23780
|
var EXIT_DRAIN_MS = 150;
|
|
23781
|
+
var UNTIL_CLOSE_MS = 6e4;
|
|
23781
23782
|
var earlyExits = /* @__PURE__ */ new WeakMap();
|
|
23782
23783
|
var SshConnection = class _SshConnection {
|
|
23783
23784
|
client;
|
|
@@ -24076,8 +24077,8 @@ var SshConnection = class _SshConnection {
|
|
|
24076
24077
|
exitSignal = signal;
|
|
24077
24078
|
drainTimer = setTimeout(() => {
|
|
24078
24079
|
channel.close();
|
|
24079
|
-
finish();
|
|
24080
|
-
}, EXIT_DRAIN_MS);
|
|
24080
|
+
finish(options.untilClose ? new Error("The sandbox did not finish sending the command output") : void 0);
|
|
24081
|
+
}, options.untilClose ? UNTIL_CLOSE_MS : EXIT_DRAIN_MS);
|
|
24081
24082
|
};
|
|
24082
24083
|
channel.on("exit", onExit);
|
|
24083
24084
|
const early = earlyExits.get(channel);
|
|
@@ -24528,7 +24529,8 @@ var SshSandboxBackend = class {
|
|
|
24528
24529
|
},
|
|
24529
24530
|
signal,
|
|
24530
24531
|
maxStreamBytes: this.maxStreamBytes,
|
|
24531
|
-
killCommand: stopScopeCommand(unit)
|
|
24532
|
+
killCommand: stopScopeCommand(unit),
|
|
24533
|
+
untilClose: true
|
|
24532
24534
|
});
|
|
24533
24535
|
return { exitCode, stderr: Buffer.concat(stderr).toString("utf8").trim().slice(0, 2e3) };
|
|
24534
24536
|
}
|
|
@@ -24609,7 +24611,16 @@ var SshSandboxBackend = class {
|
|
|
24609
24611
|
} finally {
|
|
24610
24612
|
options.signal?.removeEventListener("abort", onAbort);
|
|
24611
24613
|
}
|
|
24612
|
-
|
|
24614
|
+
if (overLimit)
|
|
24615
|
+
throw new ManifestLimitError(options.limit);
|
|
24616
|
+
let parsed;
|
|
24617
|
+
try {
|
|
24618
|
+
parsed = parseManifestOutput(Buffer.concat(out));
|
|
24619
|
+
} catch (error) {
|
|
24620
|
+
if (entries >= (limit + 1) * 4)
|
|
24621
|
+
throw new ManifestLimitError(options.limit);
|
|
24622
|
+
throw error;
|
|
24623
|
+
}
|
|
24613
24624
|
if (parsed.length > limit)
|
|
24614
24625
|
throw new ManifestLimitError(options.limit);
|
|
24615
24626
|
return parsed;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
unsafeHostPath,
|
|
9
9
|
withFileLock,
|
|
10
10
|
writeAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RA6EZSII.js";
|
|
12
12
|
import {
|
|
13
13
|
buyComputeCredit,
|
|
14
14
|
fetchComputePricing,
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
loadComputeCreditConfig,
|
|
17
17
|
onComputeBalanceObserved,
|
|
18
18
|
readComputeCreditStatus
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2YFJNXXA.js";
|
|
20
20
|
import {
|
|
21
21
|
getTaskmarketHome
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-F7HVOUHY.js";
|
|
23
23
|
import {
|
|
24
24
|
burnRate,
|
|
25
25
|
computeLow
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XJOB4NMV.js";
|
|
27
27
|
import {
|
|
28
28
|
AgentLaunchError
|
|
29
29
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -34,6 +34,7 @@ import { promises as fs } from "fs";
|
|
|
34
34
|
import path from "path";
|
|
35
35
|
var ACTIVE_TASK_VERSION = 1;
|
|
36
36
|
function taskStage(record) {
|
|
37
|
+
if (record.state === "submitted") return record.outcome?.state ?? "submitted";
|
|
37
38
|
if (record.state !== "claimed") return record.state;
|
|
38
39
|
if (record.deliverable) return "frozen";
|
|
39
40
|
return record.workspace?.state === "ready" ? "working" : "claimed";
|