@lucid-agents/taskmarket 1.35.0 → 1.36.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 +1 -1
- package/dist/{api-R76D244Y.js → api-BAW7ZGDD.js} +2 -2
- package/dist/{channels-SVCU2MU5.js → channels-FAOZ67V2.js} +4 -4
- package/dist/{chunk-CHX7O7EU.js → chunk-6AIEGDDI.js} +1 -1
- package/dist/{chunk-B7W4G3EY.js → chunk-7TDHFFF2.js} +1 -1
- package/dist/{chunk-YHVP2UNE.js → chunk-AZ2N4KKB.js} +1 -1
- package/dist/{chunk-BDKM5JMT.js → chunk-BQ63ZEML.js} +1 -1
- package/dist/{chunk-JRWRBSS2.js → chunk-F5ZHREXK.js} +3 -3
- package/dist/{chunk-KHDQRFHG.js → chunk-FXBA6X3I.js} +5 -5
- package/dist/{chunk-WP7GXSKE.js → chunk-NF3XHNJH.js} +3 -3
- package/dist/{chunk-L6D2CDVQ.js → chunk-Q2NCP72I.js} +8 -8
- package/dist/{chunk-QAGDCIMU.js → chunk-Q3IC6GTF.js} +125 -6
- package/dist/{chunk-54OR2JDT.js → chunk-TKHBDRU6.js} +2 -2
- package/dist/{chunk-YGSVDU2D.js → chunk-WGQV5OG3.js} +3 -3
- package/dist/{chunk-G3U2BQNC.js → chunk-WJHT663R.js} +1 -1
- package/dist/{doctor-IIVQFDIB.js → doctor-WFGKN5ZB.js} +8 -8
- package/dist/index.js +191 -58
- package/dist/{launch-OC4LIPSS.js → launch-QWDD4WLN.js} +11 -11
- package/dist/pi-extensions/xgate.cjs +65 -2
- package/dist/{read-auth-AGP3CUMT.js → read-auth-JKSDOSKI.js} +3 -3
- package/dist/{reconcile-H3JIKN2X.js → reconcile-B33L7D3M.js} +4 -4
- package/dist/{status-SARVECVT.js → status-CBGRCJQO.js} +8 -8
- package/dist/{sync-pull-IUPV57MU.js → sync-pull-EA6TBOHC.js} +4 -4
- package/dist/{task-access-grants-HALV3NEO.js → task-access-grants-JF7LGUWX.js} +2 -2
- package/package.json +1 -1
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
parseFailureBody,
|
|
15
15
|
readFailureBody,
|
|
16
16
|
withErrorContext
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-WJHT663R.js";
|
|
18
|
+
import "./chunk-Q3IC6GTF.js";
|
|
19
19
|
import "./chunk-S7SJMJ2I.js";
|
|
20
20
|
export {
|
|
21
21
|
ApiError,
|
|
@@ -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-WGQV5OG3.js";
|
|
14
|
+
import "./chunk-AZ2N4KKB.js";
|
|
15
|
+
import "./chunk-WJHT663R.js";
|
|
16
|
+
import "./chunk-Q3IC6GTF.js";
|
|
17
17
|
import "./chunk-YM4S6IE4.js";
|
|
18
18
|
import "./chunk-XJOB4NMV.js";
|
|
19
19
|
import "./chunk-S7SJMJ2I.js";
|
|
@@ -2,7 +2,7 @@ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileU
|
|
|
2
2
|
import {
|
|
3
3
|
TASK_ACCESS_GRANT_HEADER,
|
|
4
4
|
getTaskmarketHome
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q3IC6GTF.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/task-access-grants.ts
|
|
8
8
|
import { promises as fs } from "fs";
|
|
@@ -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-Q3IC6GTF.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentLaunchError
|
|
7
7
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
readMppTempoChallenge,
|
|
16
16
|
reconcileX402Payment,
|
|
17
17
|
withX402FileLock
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AZ2N4KKB.js";
|
|
19
19
|
import {
|
|
20
20
|
ApiError,
|
|
21
21
|
apiGet,
|
|
@@ -36,14 +36,14 @@ import {
|
|
|
36
36
|
withChainId,
|
|
37
37
|
withIdempotentWrite,
|
|
38
38
|
withTapSignature
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WJHT663R.js";
|
|
40
40
|
import {
|
|
41
41
|
ComputeCreditBuyOutputSchema,
|
|
42
42
|
ComputeCreditPricingSchema,
|
|
43
43
|
ComputeCreditStatusOutputSchema,
|
|
44
44
|
apiErrorEnvelopeOf,
|
|
45
45
|
getTaskmarketHome
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-Q3IC6GTF.js";
|
|
47
47
|
|
|
48
48
|
// src/lib/x402-fee.ts
|
|
49
49
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
loadDeliverableRecord,
|
|
7
7
|
readComputeView,
|
|
8
8
|
taskStage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NF3XHNJH.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-7TDHFFF2.js";
|
|
17
17
|
import {
|
|
18
18
|
allocationViews,
|
|
19
19
|
channelView,
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
openAgentChannels,
|
|
22
22
|
uncertainPurchases,
|
|
23
23
|
withdrawalHatch
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WGQV5OG3.js";
|
|
25
25
|
import {
|
|
26
26
|
apiUrl,
|
|
27
27
|
selectedNetwork
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WJHT663R.js";
|
|
29
29
|
import {
|
|
30
30
|
SandboxListOutputSchema
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-Q3IC6GTF.js";
|
|
32
32
|
import {
|
|
33
33
|
AgentLaunchError
|
|
34
34
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
unsafeHostPath,
|
|
9
9
|
withFileLock,
|
|
10
10
|
writeAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7TDHFFF2.js";
|
|
12
12
|
import {
|
|
13
13
|
buyComputeCredit,
|
|
14
14
|
fetchComputePricing,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
loadComputeCreditConfig,
|
|
17
17
|
onComputeBalanceObserved,
|
|
18
18
|
readComputeCreditStatus
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-F5ZHREXK.js";
|
|
20
20
|
import {
|
|
21
21
|
getTaskmarketHome
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-Q3IC6GTF.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentLaunchError
|
|
25
25
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
x402FeePost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-F5ZHREXK.js";
|
|
5
5
|
import {
|
|
6
6
|
signReadAuth
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TKHBDRU6.js";
|
|
8
8
|
import {
|
|
9
9
|
taskAccessGrantHeaders
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6AIEGDDI.js";
|
|
11
11
|
import {
|
|
12
12
|
apiGet,
|
|
13
13
|
apiPost,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
runWorkerAction,
|
|
16
16
|
signMessage,
|
|
17
17
|
taskRequiresTap
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WJHT663R.js";
|
|
19
19
|
import {
|
|
20
20
|
TaskAwardSchema,
|
|
21
21
|
buildClaimMessage,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
buildSubmitUploadMessage,
|
|
24
24
|
isRecordingPendingResponse,
|
|
25
25
|
submitUploadExpiresAt
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Q3IC6GTF.js";
|
|
27
27
|
|
|
28
28
|
// src/sdk/artifact-upload.ts
|
|
29
29
|
import { extname } from "path";
|
|
@@ -115,9 +115,9 @@ function putArtifactBytes(uploadUrl, data, mimeType, onProgress, idleTimeoutMs =
|
|
|
115
115
|
// src/lib/worker-attestation.ts
|
|
116
116
|
var requirementCache = /* @__PURE__ */ new Map();
|
|
117
117
|
async function defaultGet(path) {
|
|
118
|
-
const { apiGet: apiGet2 } = await import("./api-
|
|
119
|
-
const { signReadAuth: signReadAuth2 } = await import("./read-auth-
|
|
120
|
-
const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-
|
|
118
|
+
const { apiGet: apiGet2 } = await import("./api-BAW7ZGDD.js");
|
|
119
|
+
const { signReadAuth: signReadAuth2 } = await import("./read-auth-JKSDOSKI.js");
|
|
120
|
+
const { taskAccessGrantHeaders: taskAccessGrantHeaders2 } = await import("./task-access-grants-JF7LGUWX.js");
|
|
121
121
|
const taskId = /^\/api\/tasks\/([^/?]+)/.exec(path)?.[1] ?? "";
|
|
122
122
|
return apiGet2(path, {
|
|
123
123
|
headers: {
|
|
@@ -9512,6 +9512,10 @@ var ProjectWorkflowDeleteSchema = z53.object({
|
|
|
9512
9512
|
chainId: ChainIdSchema4.optional(),
|
|
9513
9513
|
workflowId: z53.string().uuid()
|
|
9514
9514
|
});
|
|
9515
|
+
var ProjectWorkflowUpdateTemplateSchema = z53.object({
|
|
9516
|
+
chainId: ChainIdSchema4.optional(),
|
|
9517
|
+
workflowId: z53.string().uuid()
|
|
9518
|
+
});
|
|
9515
9519
|
var ProjectWorkflowRunActionSchema = z53.object({
|
|
9516
9520
|
chainId: ChainIdSchema4.optional(),
|
|
9517
9521
|
runId: z53.string().uuid()
|
|
@@ -9538,7 +9542,14 @@ var WorkflowTemplateKindSchema = z53.enum(["template", "preset"]);
|
|
|
9538
9542
|
var ProjectWorkflowSourceSchema = z53.object({
|
|
9539
9543
|
kind: WorkflowTemplateKindSchema,
|
|
9540
9544
|
templateId: z53.string().describe("The template id, or the preset name"),
|
|
9541
|
-
params: z53.record(z53.union([z53.string(), z53.number(), z53.array(z53.string())]))
|
|
9545
|
+
params: z53.record(z53.union([z53.string(), z53.number(), z53.array(z53.string())])),
|
|
9546
|
+
templateVersion: z53.string().optional().describe("The template's version when the workflow was made or last updated from it; absent on a workflow made before versions were recorded")
|
|
9547
|
+
});
|
|
9548
|
+
var ProjectWorkflowTemplateUpdateStatusSchema = z53.object({
|
|
9549
|
+
templateId: z53.string(),
|
|
9550
|
+
currentVersion: z53.string().nullable().describe("The version the workflow has; null when not recorded"),
|
|
9551
|
+
latestVersion: z53.string().nullable().describe("The template now; null when it was deleted"),
|
|
9552
|
+
available: z53.boolean().describe("True when the template has a version other than the one the workflow has")
|
|
9542
9553
|
});
|
|
9543
9554
|
var ProjectWorkflowViewSchema = z53.object({
|
|
9544
9555
|
workflowId: z53.string(),
|
|
@@ -9549,6 +9560,7 @@ var ProjectWorkflowViewSchema = z53.object({
|
|
|
9549
9560
|
document: z53.record(z53.unknown()).describe("The validated document, with every default filled in"),
|
|
9550
9561
|
summary: WorkflowSummarySchema,
|
|
9551
9562
|
source: ProjectWorkflowSourceSchema.nullable().describe("The template or preset it was made from, with its parameter values; null when written by hand"),
|
|
9563
|
+
templateUpdate: ProjectWorkflowTemplateUpdateStatusSchema.nullable().optional().describe("Whether the template it was made from has another version now (available); null for a workflow written by hand. Filled by the list, show and update-template reads"),
|
|
9552
9564
|
createdAt: z53.string()
|
|
9553
9565
|
});
|
|
9554
9566
|
var ProjectWorkflowRunStatusSchema = z53.enum([
|
|
@@ -9765,6 +9777,14 @@ var WORKFLOW_TEMPLATE_AMOUNT_MAX_DIGITS = 30;
|
|
|
9765
9777
|
var WORKFLOW_TEMPLATE_PARAMETER_DESCRIPTION_MAX = 500;
|
|
9766
9778
|
var WORKFLOW_TEMPLATE_LIST_MAX_ITEMS = WORKFLOW_MAX_ITEMS_MAX;
|
|
9767
9779
|
var WORKFLOW_TEMPLATE_LIST_ITEM_MAX_LENGTH = WORKFLOW_ITEM_MAX_LENGTH;
|
|
9780
|
+
var WORKFLOW_TEMPLATE_TAGS_MAX = 8;
|
|
9781
|
+
var WORKFLOW_TEMPLATE_TAG_MAX_LENGTH = 24;
|
|
9782
|
+
var WORKFLOW_TEMPLATE_TAG_INPUT_MAX_LENGTH = 40;
|
|
9783
|
+
var WORKFLOW_TEMPLATE_TAG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
9784
|
+
var WORKFLOW_TEMPLATE_SEARCH_MAX_LENGTH = 100;
|
|
9785
|
+
var WORKFLOW_TEMPLATE_SEARCH_TAGS_MAX = 5;
|
|
9786
|
+
var WORKFLOW_TEMPLATE_SEARCH_LIMIT_DEFAULT = 20;
|
|
9787
|
+
var WORKFLOW_TEMPLATE_SEARCH_LIMIT_MAX = 100;
|
|
9768
9788
|
var WORKFLOW_TEMPLATE_PARAMETER_NAME = /^[A-Za-z][A-Za-z0-9_]{0,39}$/;
|
|
9769
9789
|
var WORKFLOW_TEMPLATE_PARAMETER_TYPES = ["string", "integer", "amount", "list"];
|
|
9770
9790
|
var WORKFLOW_PRESET_NAMES = ["code", "content", "research"];
|
|
@@ -9777,7 +9797,8 @@ var WORKFLOW_TEMPLATE_FIXED_FIELDS = [
|
|
|
9777
9797
|
"approve",
|
|
9778
9798
|
"on",
|
|
9779
9799
|
"verdict",
|
|
9780
|
-
"when"
|
|
9800
|
+
"when",
|
|
9801
|
+
"hireWinnerOf"
|
|
9781
9802
|
];
|
|
9782
9803
|
var TemplateInputSchema = z55.record(z55.unknown()).describe("The template: { name, description?, parameters, steps }, a workflow document whose strings use {{param}} placeholders, and parameters declaring each one: { type: string | integer | amount | list, default?, description?, and bounds (min/max for integer and amount, minLength/maxLength for string, minItems/maxItems/maxLength for list) }");
|
|
9783
9804
|
var ProjectWorkflowTemplateCreateSchema = z55.object({
|
|
@@ -9793,6 +9814,10 @@ var ProjectWorkflowTemplateDeleteSchema = z55.object({
|
|
|
9793
9814
|
chainId: ChainIdSchema5.optional(),
|
|
9794
9815
|
templateId: z55.string().uuid()
|
|
9795
9816
|
});
|
|
9817
|
+
var ProjectWorkflowTemplatePublishSchema = z55.object({
|
|
9818
|
+
chainId: ChainIdSchema5.optional(),
|
|
9819
|
+
templateId: z55.string().uuid()
|
|
9820
|
+
});
|
|
9796
9821
|
var ParameterValueInputSchema = z55.union([
|
|
9797
9822
|
z55.string().max(WORKFLOW_TEMPLATE_STRING_MAX_LENGTH),
|
|
9798
9823
|
z55.number(),
|
|
@@ -9822,11 +9847,44 @@ var ProjectWorkflowTemplateViewSchema = z55.object({
|
|
|
9822
9847
|
owner: z55.string().nullable().describe("The wallet that saved it; null for a preset or an official template"),
|
|
9823
9848
|
name: z55.string(),
|
|
9824
9849
|
description: z55.string().nullable(),
|
|
9850
|
+
tags: z55.array(z55.string()).describe("Normalized tags the author (or the repository, for an official template) gave it"),
|
|
9851
|
+
featured: z55.boolean().optional().describe("True for a template on the featured list, which the repository curates"),
|
|
9825
9852
|
template: z55.record(z55.unknown()).describe("The validated template: name, description, parameters (every bound filled in), steps"),
|
|
9826
9853
|
summary: WorkflowSummarySchema.describe("The workflow with every parameter at its maximum: the worst case a project must hold"),
|
|
9854
|
+
version: z55.string().describe("The template version: 1, 2, 3 ... for a saved template, bumped whenever a save changes its content; a short content hash for an official template or preset"),
|
|
9855
|
+
contentHash: z55.string().describe("SHA-256 of the template content, hex"),
|
|
9856
|
+
versions: z55.array(z55.object({
|
|
9857
|
+
version: z55.string(),
|
|
9858
|
+
contentHash: z55.string(),
|
|
9859
|
+
at: z55.string().describe("When that version was replaced")
|
|
9860
|
+
})).optional().describe("Earlier versions of a saved template, oldest first; shown on a single template only"),
|
|
9861
|
+
listed: z55.boolean().optional().describe("True when the author listed this saved template in the public gallery"),
|
|
9862
|
+
listedAt: z55.string().nullable().optional(),
|
|
9827
9863
|
createdAt: z55.string().nullable(),
|
|
9828
9864
|
updatedAt: z55.string().nullable()
|
|
9829
9865
|
});
|
|
9866
|
+
var SearchTagSchema = z55.string().min(1).max(WORKFLOW_TEMPLATE_TAG_INPUT_MAX_LENGTH).describe("A tag as written; it is normalized (lowercase, hyphens) before it is matched");
|
|
9867
|
+
var WORKFLOW_TEMPLATE_SEARCH_SORTS = ["featured", "name"];
|
|
9868
|
+
var WORKFLOW_TEMPLATE_SEARCH_SCOPES = ["all", "saved", "community"];
|
|
9869
|
+
var ProjectWorkflowTemplateSearchSchema = z55.object({
|
|
9870
|
+
q: z55.string().trim().min(1).max(WORKFLOW_TEMPLATE_SEARCH_MAX_LENGTH).optional().describe(`Words to find in a template's name, description or tags; every word must match (at most ${WORKFLOW_TEMPLATE_SEARCH_MAX_LENGTH} characters)`),
|
|
9871
|
+
tags: csvArrayQueryParam(SearchTagSchema, {
|
|
9872
|
+
maxItems: WORKFLOW_TEMPLATE_SEARCH_TAGS_MAX
|
|
9873
|
+
}).describe(`Comma-separated tags; a template must carry all of them (at most ${WORKFLOW_TEMPLATE_SEARCH_TAGS_MAX})`),
|
|
9874
|
+
// A query-string flag, so it arrives as 'true' or 'false' over REST.
|
|
9875
|
+
featured: z55.enum(["true", "false"]).optional().transform((value) => value === void 0 ? void 0 : value === "true").describe("true lists only the featured templates"),
|
|
9876
|
+
owner: z55.string().regex(/^0x[0-9a-fA-F]{40}$/, "owner is a wallet address (0x and 40 hex digits)").optional().describe("Also search this wallet's saved templates, listed after the catalog"),
|
|
9877
|
+
scope: z55.enum(WORKFLOW_TEMPLATE_SEARCH_SCOPES).default("all").describe("all: the catalog, then owner's saved templates, or with no owner the templates listed in the gallery; saved: only owner's (needs owner); community: only the gallery's listed templates"),
|
|
9878
|
+
sort: z55.enum(WORKFLOW_TEMPLATE_SEARCH_SORTS).default("featured").describe("featured: featured, then other official templates, presets, then saved templates newest first; name: A to Z within the catalog, then saved templates A to Z"),
|
|
9879
|
+
limit: coerceNumber(z55.number().int().min(1).max(WORKFLOW_TEMPLATE_SEARCH_LIMIT_MAX)).default(WORKFLOW_TEMPLATE_SEARCH_LIMIT_DEFAULT),
|
|
9880
|
+
cursor: z55.string().min(1).max(300).optional().describe("nextCursor from the previous page; valid only with the same filters and sort")
|
|
9881
|
+
});
|
|
9882
|
+
var ProjectWorkflowTemplateSearchOutputSchema = z55.object({
|
|
9883
|
+
templates: z55.array(ProjectWorkflowTemplateViewSchema),
|
|
9884
|
+
nextCursor: z55.string().nullable(),
|
|
9885
|
+
hasMore: z55.boolean(),
|
|
9886
|
+
catalogTags: z55.array(z55.object({ tag: z55.string(), count: z55.number().int() })).describe("The most used tags across the whole catalog (not this page), for a tag picker; same on every page")
|
|
9887
|
+
});
|
|
9830
9888
|
|
|
9831
9889
|
// ../../packages/shared/dist/schemas/brief-session.schemas.js
|
|
9832
9890
|
import { z as z57 } from "zod";
|
|
@@ -10523,7 +10581,8 @@ var FIELDS = {
|
|
|
10523
10581
|
"payout",
|
|
10524
10582
|
"reviewAccept",
|
|
10525
10583
|
"reviewer",
|
|
10526
|
-
"allowOpenAutoAccept"
|
|
10584
|
+
"allowOpenAutoAccept",
|
|
10585
|
+
"hireWinnerOf"
|
|
10527
10586
|
],
|
|
10528
10587
|
sequence: ["pattern", "id", "steps"],
|
|
10529
10588
|
parallel: ["pattern", "id", "steps"],
|
|
@@ -10838,6 +10897,21 @@ var Checker = class {
|
|
|
10838
10897
|
}
|
|
10839
10898
|
}
|
|
10840
10899
|
}
|
|
10900
|
+
if (pattern === "task" && raw.hireWinnerOf !== void 0) {
|
|
10901
|
+
const name = raw.hireWinnerOf;
|
|
10902
|
+
const at = pointer(path3, "hireWinnerOf");
|
|
10903
|
+
if (typeof name !== "string" || !WORKFLOW_NAME_PATTERN.test(name)) {
|
|
10904
|
+
this.error(at, "invalid_hire_winner_of", "hireWinnerOf names one of this step's inputs: the output of an earlier step whose winning worker this step hires");
|
|
10905
|
+
} else if (name === WORKFLOW_ITEM_INPUT || !inputs.includes(name)) {
|
|
10906
|
+
this.error(at, "hire_winner_not_input", `hireWinnerOf "${name}" must be one of this step's inputs (an output of an earlier step); inputs are ${inputs.length > 0 ? inputs.join(", ") : "empty"}`);
|
|
10907
|
+
} else if (template && template.mode !== "claim") {
|
|
10908
|
+
this.error(pointer(path3, "task", "mode"), "hire_needs_claim", 'A step that hires the winner of an earlier step runs in the claim mode: set task.mode to "claim"');
|
|
10909
|
+
} else if (when.reviewer !== void 0) {
|
|
10910
|
+
this.error(at, "hire_and_reviewer", "A step hires the winner of an earlier step or has a reviewer, not both");
|
|
10911
|
+
} else {
|
|
10912
|
+
when.hireWinnerOf = name;
|
|
10913
|
+
}
|
|
10914
|
+
}
|
|
10841
10915
|
outputs.forEach((name, index) => {
|
|
10842
10916
|
if (name === WORKFLOW_ITEM_INPUT) {
|
|
10843
10917
|
this.error(pointer(path3, "outputs", index), "reserved_name", `"${WORKFLOW_ITEM_INPUT}" is reserved for a forEach's item`);
|
|
@@ -11606,6 +11680,27 @@ function fundsErrors(spend, funds, path3 = "/steps") {
|
|
|
11606
11680
|
return errors;
|
|
11607
11681
|
}
|
|
11608
11682
|
|
|
11683
|
+
// ../../packages/shared/dist/lib/workflow-template-search.js
|
|
11684
|
+
function normalizeWorkflowTemplateTag(raw) {
|
|
11685
|
+
if (raw.length > WORKFLOW_TEMPLATE_TAG_INPUT_MAX_LENGTH)
|
|
11686
|
+
return null;
|
|
11687
|
+
const tag = raw.trim().toLowerCase().replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
11688
|
+
if (tag.length === 0 || tag.length > WORKFLOW_TEMPLATE_TAG_MAX_LENGTH)
|
|
11689
|
+
return null;
|
|
11690
|
+
return WORKFLOW_TEMPLATE_TAG.test(tag) ? tag : null;
|
|
11691
|
+
}
|
|
11692
|
+
function normalizeWorkflowTemplateTags(raw) {
|
|
11693
|
+
const tags = [];
|
|
11694
|
+
for (const value of raw) {
|
|
11695
|
+
const tag = normalizeWorkflowTemplateTag(value);
|
|
11696
|
+
if (tag === null)
|
|
11697
|
+
return { ok: false, invalid: value };
|
|
11698
|
+
if (!tags.includes(tag))
|
|
11699
|
+
tags.push(tag);
|
|
11700
|
+
}
|
|
11701
|
+
return { ok: true, tags };
|
|
11702
|
+
}
|
|
11703
|
+
|
|
11609
11704
|
// ../../packages/shared/dist/lib/workflow-template.js
|
|
11610
11705
|
var PLACEHOLDER = /\{\{\s*([A-Za-z][A-Za-z0-9_]{0,39})\s*\}\}/g;
|
|
11611
11706
|
var WHOLE_PLACEHOLDER = /^\{\{\s*([A-Za-z][A-Za-z0-9_]{0,39})\s*\}\}$/;
|
|
@@ -11890,7 +11985,7 @@ function validateWorkflowTemplate(raw, options = {}) {
|
|
|
11890
11985
|
summary: summary2
|
|
11891
11986
|
});
|
|
11892
11987
|
if (!isRecord2(raw)) {
|
|
11893
|
-
err(errors, "", "invalid_template", "A template is a JSON object: { name, description?, parameters, steps }");
|
|
11988
|
+
err(errors, "", "invalid_template", "A template is a JSON object: { name, description?, tags?, parameters, steps }");
|
|
11894
11989
|
return fail();
|
|
11895
11990
|
}
|
|
11896
11991
|
let size;
|
|
@@ -11905,8 +12000,8 @@ function validateWorkflowTemplate(raw, options = {}) {
|
|
|
11905
12000
|
return fail();
|
|
11906
12001
|
}
|
|
11907
12002
|
for (const key of Object.keys(raw)) {
|
|
11908
|
-
if (!["name", "description", "parameters", "steps"].includes(key)) {
|
|
11909
|
-
err(errors, pointer2("", key), "unknown_field", `A template has no field "${key}"; its fields are name, description, parameters, steps`);
|
|
12003
|
+
if (!["name", "description", "tags", "parameters", "steps"].includes(key)) {
|
|
12004
|
+
err(errors, pointer2("", key), "unknown_field", `A template has no field "${key}"; its fields are name, description, tags, parameters, steps`);
|
|
11910
12005
|
}
|
|
11911
12006
|
}
|
|
11912
12007
|
if (typeof raw.name !== "string" || raw.name.trim().length === 0 || raw.name.length > 80) {
|
|
@@ -11915,6 +12010,22 @@ function validateWorkflowTemplate(raw, options = {}) {
|
|
|
11915
12010
|
if (raw.description !== void 0 && (typeof raw.description !== "string" || raw.description.length > 2e3)) {
|
|
11916
12011
|
err(errors, "/description", "invalid_description", "description is at most 2000 characters");
|
|
11917
12012
|
}
|
|
12013
|
+
let tags = [];
|
|
12014
|
+
if (raw.tags !== void 0) {
|
|
12015
|
+
const written = raw.tags;
|
|
12016
|
+
if (!Array.isArray(written) || written.some((tag) => typeof tag !== "string")) {
|
|
12017
|
+
err(errors, "/tags", "invalid_tags", "tags is a list of text tags");
|
|
12018
|
+
} else if (written.length > WORKFLOW_TEMPLATE_TAGS_MAX) {
|
|
12019
|
+
err(errors, "/tags", "too_many_tags", `A template has at most ${WORKFLOW_TEMPLATE_TAGS_MAX} tags`);
|
|
12020
|
+
} else {
|
|
12021
|
+
const normalized = normalizeWorkflowTemplateTags(written);
|
|
12022
|
+
if (normalized.ok) {
|
|
12023
|
+
tags = normalized.tags;
|
|
12024
|
+
} else {
|
|
12025
|
+
err(errors, pointer2("/tags", String(written.indexOf(normalized.invalid))), "invalid_tag", `"${normalized.invalid.slice(0, 40)}" is not a tag: use letters, digits and hyphens, at most ${WORKFLOW_TEMPLATE_TAG_MAX_LENGTH} characters`);
|
|
12026
|
+
}
|
|
12027
|
+
}
|
|
12028
|
+
}
|
|
11918
12029
|
if (raw.steps === void 0) {
|
|
11919
12030
|
err(errors, "/steps", "missing_steps", "steps is the workflow: one task step or one pattern");
|
|
11920
12031
|
}
|
|
@@ -11964,6 +12075,7 @@ function validateWorkflowTemplate(raw, options = {}) {
|
|
|
11964
12075
|
const template = {
|
|
11965
12076
|
name: raw.name.trim(),
|
|
11966
12077
|
...typeof raw.description === "string" ? { description: raw.description } : {},
|
|
12078
|
+
...tags.length > 0 ? { tags } : {},
|
|
11967
12079
|
parameters,
|
|
11968
12080
|
steps: JSON.parse(JSON.stringify(raw.steps))
|
|
11969
12081
|
};
|
|
@@ -12007,6 +12119,7 @@ var duration = (defaultHours) => ({
|
|
|
12007
12119
|
var code = {
|
|
12008
12120
|
name: "Code: spec, review loop, deploy",
|
|
12009
12121
|
description: "A spec, then an implementation reviewed and fixed until the review approves it (up to the rounds you set), then your approval, then a deploy.",
|
|
12122
|
+
tags: ["code", "review", "deploy"],
|
|
12010
12123
|
parameters: {
|
|
12011
12124
|
brief: {
|
|
12012
12125
|
type: "string",
|
|
@@ -12092,6 +12205,7 @@ var code = {
|
|
|
12092
12205
|
var content = {
|
|
12093
12206
|
name: "Content: articles, then an edit",
|
|
12094
12207
|
description: "One article per topic you list, written in parallel, then an edit that brings them to one voice and standard.",
|
|
12208
|
+
tags: ["content", "writing", "editing"],
|
|
12095
12209
|
parameters: {
|
|
12096
12210
|
articles: {
|
|
12097
12211
|
type: "list",
|
|
@@ -12143,6 +12257,7 @@ var content = {
|
|
|
12143
12257
|
var research = {
|
|
12144
12258
|
name: "Research: parallel sources, then synthesis",
|
|
12145
12259
|
description: "Papers, the web and data researched at once by separate workers, then a synthesis that answers the question from all three.",
|
|
12260
|
+
tags: ["research", "analysis"],
|
|
12146
12261
|
parameters: {
|
|
12147
12262
|
question: {
|
|
12148
12263
|
type: "string",
|
|
@@ -20732,8 +20847,11 @@ export {
|
|
|
20732
20847
|
WORKFLOW_STEP_LIMIT_MIN,
|
|
20733
20848
|
WORKFLOW_STEP_LIMIT_MAX,
|
|
20734
20849
|
WORKFLOW_TEMPLATE_PARAMETERS_MAX,
|
|
20850
|
+
WORKFLOW_TEMPLATE_SEARCH_MAX_LENGTH,
|
|
20851
|
+
WORKFLOW_TEMPLATE_SEARCH_TAGS_MAX,
|
|
20735
20852
|
WORKFLOW_PRESET_NAMES,
|
|
20736
20853
|
OFFICIAL_WORKFLOW_TEMPLATE_ID,
|
|
20854
|
+
WORKFLOW_TEMPLATE_SEARCH_SORTS,
|
|
20737
20855
|
INITIAL_BRIEF_TURN_MESSAGE,
|
|
20738
20856
|
isInitialBriefTurnMessage,
|
|
20739
20857
|
BriefSessionViewSchema,
|
|
@@ -20741,6 +20859,7 @@ export {
|
|
|
20741
20859
|
getAgentName,
|
|
20742
20860
|
normalizeReferenceCode,
|
|
20743
20861
|
validateWorkflowDocument,
|
|
20862
|
+
normalizeWorkflowTemplateTags,
|
|
20744
20863
|
validateWorkflowTemplate,
|
|
20745
20864
|
dreamsToUsd,
|
|
20746
20865
|
formatDreams,
|
|
@@ -2,12 +2,12 @@ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileU
|
|
|
2
2
|
import {
|
|
3
3
|
createWalletAccountFromKeystore,
|
|
4
4
|
loadKeystore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WJHT663R.js";
|
|
6
6
|
import {
|
|
7
7
|
READ_AUTH_ADDRESS_HEADER,
|
|
8
8
|
READ_AUTH_SIGNATURE_HEADER,
|
|
9
9
|
buildReadAuthMessage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q3IC6GTF.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/read-auth.ts
|
|
13
13
|
async function signReadAuth(signal) {
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
listX402Payments,
|
|
11
11
|
loadX402Policy,
|
|
12
12
|
rpcUrlForNetwork
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AZ2N4KKB.js";
|
|
14
14
|
import {
|
|
15
15
|
createWalletAccountFromKeystore,
|
|
16
16
|
keystoreExists,
|
|
17
17
|
loadKeystore
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WJHT663R.js";
|
|
19
19
|
import {
|
|
20
20
|
getTaskmarketHome,
|
|
21
21
|
taskmarketChain
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-Q3IC6GTF.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentLaunchError
|
|
25
25
|
} from "./chunk-YM4S6IE4.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
listSandboxes
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-FXBA6X3I.js";
|
|
5
|
+
import "./chunk-NF3XHNJH.js";
|
|
6
|
+
import "./chunk-7TDHFFF2.js";
|
|
7
|
+
import "./chunk-F5ZHREXK.js";
|
|
8
8
|
import {
|
|
9
9
|
AGENT_COMPATIBILITY,
|
|
10
10
|
assertAgentCompatibility,
|
|
@@ -16,19 +16,19 @@ import {
|
|
|
16
16
|
loadAgentPolicy,
|
|
17
17
|
openAgentChannels,
|
|
18
18
|
railChainIdHex
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WGQV5OG3.js";
|
|
20
20
|
import {
|
|
21
21
|
getX402PolicyPath,
|
|
22
22
|
loadX402Policy,
|
|
23
23
|
rpcUrlForNetwork
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AZ2N4KKB.js";
|
|
25
25
|
import {
|
|
26
26
|
apiUrl,
|
|
27
27
|
keystoreExists,
|
|
28
28
|
loadKeystore,
|
|
29
29
|
withChainId
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-WJHT663R.js";
|
|
31
|
+
import "./chunk-Q3IC6GTF.js";
|
|
32
32
|
import "./chunk-YM4S6IE4.js";
|
|
33
33
|
import {
|
|
34
34
|
AGENT_VIEW_VERSION
|