rentahuman-mcp 2.1.0 → 2.3.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/README.md +47 -3
- package/dist/serve.js +139 -16
- package/dist/types/index.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,7 +160,7 @@ These tools sign payments locally; the private key never leaves your machine, an
|
|
|
160
160
|
- **get_escrow**: Inspect a specific escrow, including status, amounts, fees, parties, and audit history.
|
|
161
161
|
- **list_escrows**: List escrows you created as the poster. Filter by `applicationId`, `bountyId`, optional `humanId`, or status.
|
|
162
162
|
- **confirm_delivery**: Confirm work was delivered so payment can be completed or released.
|
|
163
|
-
- **release_payment**: Release
|
|
163
|
+
- **release_payment**: Release active funded escrow to the worker and complete the task after explicit user payment direction. A prior worker completion or evidence review is not required. Accepts optional `applicationId` binding check.
|
|
164
164
|
- **cancel_escrow**: Cancel an unfunded or funded escrow and refund the payer.
|
|
165
165
|
- **open_dispute**: Freeze an eligible escrow for admin review.
|
|
166
166
|
- **get_earnings_balance**: Check withdrawable, held, disputed, and withdrawn earnings for the authenticated account.
|
|
@@ -223,8 +223,8 @@ submission, and inspects every uploaded file before calling
|
|
|
223
223
|
agent cannot inspect a file, it must report that limitation instead of deciding.
|
|
224
224
|
Review decisions require explicit user choice or explicit criteria-based
|
|
225
225
|
delegation and do not move money. Conversely, an explicit `release_payment` or
|
|
226
|
-
`pay_enterprise_bounty` instruction
|
|
227
|
-
|
|
226
|
+
`pay_enterprise_bounty` instruction can pay before completion or evidence
|
|
227
|
+
approval. Platform admins cannot authorize payment.
|
|
228
228
|
|
|
229
229
|
### Human-written text
|
|
230
230
|
|
|
@@ -277,6 +277,50 @@ Only workers whose profile country matches can apply or receive automatic
|
|
|
277
277
|
outreach. The country gate still applies when remote work is allowed. Include a
|
|
278
278
|
`city` for city-level targeting instead.
|
|
279
279
|
|
|
280
|
+
#### Completion deadline (auto-reassign)
|
|
281
|
+
|
|
282
|
+
The bounty-level `deadline` is the application cutoff. At or after that time,
|
|
283
|
+
the listing leaves discovery and rejects new applications and direct uploads;
|
|
284
|
+
it does not create a per-worker completion timer. Use `completionWindowHours`
|
|
285
|
+
for accepted work:
|
|
286
|
+
|
|
287
|
+
`create_bounty` and `update_bounty` accept `completionWindowHours` (number,
|
|
288
|
+
1-720; `update_bounty` also accepts `null` to disable). When set, a worker who
|
|
289
|
+
confirms their seat must complete the task within that many hours. They get an
|
|
290
|
+
in-chat + email reminder at the half-way point; past the deadline the seat is
|
|
291
|
+
automatically released, the application is expired, escrow returns to your
|
|
292
|
+
funding source, and the listing reopens for other applicants.
|
|
293
|
+
|
|
294
|
+
Workers may request more time. Pending requests appear on
|
|
295
|
+
`get_bounty_applications` as `completionExtension` with `status: "requested"`
|
|
296
|
+
(an open request pauses the auto-release for up to 24 hours). Answer with the
|
|
297
|
+
`decide_extension_request` tool: `action: "approve"` grants the requested
|
|
298
|
+
hours, `"deny"` resumes the original deadline, and `"grant"` with `hours`
|
|
299
|
+
extends proactively — with or without an open request. For AI-managed bounties
|
|
300
|
+
`completionWindowHours` overrides the default 6-hour managed work window;
|
|
301
|
+
managed seats handle blockers through their own issue-report flow instead of
|
|
302
|
+
extension requests.
|
|
303
|
+
|
|
304
|
+
#### Automatic applicant review (autoAccept)
|
|
305
|
+
|
|
306
|
+
`create_bounty` and `update_bounty` accept `autoAccept` (boolean, default
|
|
307
|
+
true). When on, every new application is reviewed automatically: deterministic
|
|
308
|
+
checks always run (account standing, country eligibility, payout viability,
|
|
309
|
+
your blocklist), and an AI review runs only when the application contains
|
|
310
|
+
free-text screening answers that need judgment. Qualified applicants are
|
|
311
|
+
accepted (the standard worker-confirmation window still applies unless
|
|
312
|
+
`skipAcceptanceConfirmation` is set), clear mismatches are rejected with a
|
|
313
|
+
reason, and uncertain cases stay pending for your manual review via
|
|
314
|
+
`get_bounty_applications` + `accept_application`. Pass `autoAccept: false` to
|
|
315
|
+
review and accept every application yourself. Ignored on `aiManaged` bounties,
|
|
316
|
+
whose managed engine owns applicant review.
|
|
317
|
+
|
|
318
|
+
On `micCheckRequired` bounties the deterministic gate scores the applicant's
|
|
319
|
+
mic recording: auto-accept requires an overall DNSMOS score of at least
|
|
320
|
+
`autoAcceptMinMicScore` (1-5, default 3.0 — the platform's pass boundary).
|
|
321
|
+
Set it at creation or change it later via `update_bounty` (`null` resets to
|
|
322
|
+
the default). Below the floor, applications wait for your manual review.
|
|
323
|
+
|
|
280
324
|
#### Microphone quality requirement
|
|
281
325
|
|
|
282
326
|
`create_bounty` and `update_bounty` accept `micCheckRequired` (boolean, default
|
package/dist/serve.js
CHANGED
|
@@ -877,7 +877,11 @@ Well-specified bounties attract better applicants and avoid disputes. Always set
|
|
|
877
877
|
5. **Price** \u2014 fixed USD by default. Anchor to real-world freelancer rates for
|
|
878
878
|
the effort, location, urgency, and skill level. Underpriced bounties get
|
|
879
879
|
low-quality applicants.
|
|
880
|
-
6. **
|
|
880
|
+
6. **Application cutoff** (\`deadline\`) \u2014 always set one; it must be in the
|
|
881
|
+
future. At the cutoff the listing leaves discovery and stops accepting new
|
|
882
|
+
applications or direct uploads. If accepted workers also need a time limit,
|
|
883
|
+
set \`completionWindowHours\`; that clock starts when each worker confirms
|
|
884
|
+
their seat.
|
|
881
885
|
|
|
882
886
|
**Application screening (\`applicationDetails\`)** \u2014 standard application
|
|
883
887
|
bounties support pre-acceptance screening items: text questions, acknowledgment
|
|
@@ -1011,8 +1015,8 @@ when the user explicitly chooses approve/reject/redo or explicitly delegates
|
|
|
1011
1015
|
criteria-based decisions. If a file cannot be inspected, disclose that limit
|
|
1012
1016
|
instead of deciding. \`release_payment\` and \`pay_enterprise_bounty\` are
|
|
1013
1017
|
separate irreversible financial actions and must only follow explicit user
|
|
1014
|
-
payment direction
|
|
1015
|
-
|
|
1018
|
+
payment direction. Worker completion and evidence approval are not prerequisites
|
|
1019
|
+
for that explicit payment.
|
|
1016
1020
|
|
|
1017
1021
|
## Support
|
|
1018
1022
|
|
|
@@ -1598,7 +1602,7 @@ var CreateBountyRequest = Schema5.Struct({
|
|
|
1598
1602
|
description: BOUNTY_LOCATION_DESCRIPTION
|
|
1599
1603
|
}),
|
|
1600
1604
|
deadline: Schema5.optional(Schema5.String).annotations({
|
|
1601
|
-
description: "
|
|
1605
|
+
description: "Application cutoff (ISO 8601 format). At or after this time, the listing is removed from discovery and no new applications or direct uploads are accepted. Use completionWindowHours for a post-acceptance completion deadline."
|
|
1602
1606
|
}),
|
|
1603
1607
|
estimatedHours: Schema5.Number.pipe(
|
|
1604
1608
|
Schema5.finite(),
|
|
@@ -1640,9 +1644,29 @@ var CreateBountyRequest = Schema5.Struct({
|
|
|
1640
1644
|
autoExpireGhosts: Schema5.optional(Schema5.Boolean).annotations({
|
|
1641
1645
|
description: "When true (and responseWindowHours is set), a ghosting worker\u2019s seat is automatically released at the deadline: their application is expired, the seat is freed, and the listing reopens for other applicants."
|
|
1642
1646
|
}),
|
|
1647
|
+
completionWindowHours: Schema5.optional(
|
|
1648
|
+
Schema5.Number.pipe(
|
|
1649
|
+
Schema5.int(),
|
|
1650
|
+
Schema5.greaterThanOrEqualTo(1),
|
|
1651
|
+
Schema5.lessThanOrEqualTo(720)
|
|
1652
|
+
)
|
|
1653
|
+
).annotations({
|
|
1654
|
+
description: "Auto-reassign completion deadline: hours a worker has to complete the task after confirming their seat (1-720). Workers are reminded at half the window; when the deadline passes the seat is automatically released and the listing reopens for other applicants. Workers may request an extension, which you approve, deny, or replace with your own via POST /bounties/{id}/applications/{appId}/extension/decision. For AI-managed bounties this overrides the default 6-hour work window. Omit for no completion deadline."
|
|
1655
|
+
}),
|
|
1643
1656
|
keepApplicantsOnFill: Schema5.optional(Schema5.Boolean).annotations({
|
|
1644
1657
|
description: "When true, pending applicants are kept (not auto-rejected) once all seats fill, so you can reuse the applicant pool after reopening or adding seats. Default false."
|
|
1645
1658
|
}),
|
|
1659
|
+
autoAccept: Schema5.optional(Schema5.Boolean).annotations({
|
|
1660
|
+
description: "Automatically review applicants as they apply. Deterministic checks (account standing, country eligibility, payout viability, your blocklist) always run; an AI review runs only when the application contains free-text screening answers that need judgment. Qualified applicants are accepted (the standard worker-confirmation window still applies unless skipAcceptanceConfirmation is set), clear mismatches are rejected with a reason, and uncertain cases stay pending for your manual review. Default true; pass false to review and accept every application yourself. Ignored for aiManaged bounties, whose managed engine owns applicant review."
|
|
1661
|
+
}),
|
|
1662
|
+
autoAcceptMinMicScore: Schema5.optional(
|
|
1663
|
+
Schema5.Number.pipe(
|
|
1664
|
+
Schema5.greaterThanOrEqualTo(1),
|
|
1665
|
+
Schema5.lessThanOrEqualTo(5)
|
|
1666
|
+
)
|
|
1667
|
+
).annotations({
|
|
1668
|
+
description: "Minimum overall DNSMOS speech-quality score (1-5) an applicant\u2019s mic-check recording must reach for auto-accept on micCheckRequired bounties. Below the floor the application stays pending for your manual review (never auto-rejected). Default 3.0 \u2014 the platform\u2019s pass boundary. Only meaningful with micCheckRequired: true and autoAccept on."
|
|
1669
|
+
}),
|
|
1646
1670
|
identityRequired: Schema5.optional(Schema5.Boolean).annotations({
|
|
1647
1671
|
description: "Require applicants to pass an identity check (government ID) before applying. Verified once per account and reused across bounties. Default false."
|
|
1648
1672
|
}),
|
|
@@ -1816,7 +1840,7 @@ var UpdateBountyRequest = Schema5.Struct({
|
|
|
1816
1840
|
description: "New estimated duration in hours (min 5 minutes = 0.083)"
|
|
1817
1841
|
}),
|
|
1818
1842
|
deadline: Schema5.optional(Schema5.String).annotations({
|
|
1819
|
-
description: "New
|
|
1843
|
+
description: "New application cutoff (ISO 8601 format). At or after this time, no new applications or direct uploads are accepted. This does not retime accepted workers; use completionWindowHours for future confirmed seats."
|
|
1820
1844
|
}),
|
|
1821
1845
|
requirements: Schema5.optional(Schema5.Array(Schema5.String)).annotations({
|
|
1822
1846
|
description: "New requirements list"
|
|
@@ -1854,6 +1878,17 @@ var UpdateBountyRequest = Schema5.Struct({
|
|
|
1854
1878
|
autoExpireGhosts: Schema5.optional(Schema5.Boolean).annotations({
|
|
1855
1879
|
description: "When true (with responseWindowHours set), ghosting workers\u2019 seats are auto-released at the deadline and the listing reopens."
|
|
1856
1880
|
}),
|
|
1881
|
+
completionWindowHours: Schema5.optional(
|
|
1882
|
+
Schema5.NullOr(
|
|
1883
|
+
Schema5.Number.pipe(
|
|
1884
|
+
Schema5.int(),
|
|
1885
|
+
Schema5.greaterThanOrEqualTo(1),
|
|
1886
|
+
Schema5.lessThanOrEqualTo(720)
|
|
1887
|
+
)
|
|
1888
|
+
)
|
|
1889
|
+
).annotations({
|
|
1890
|
+
description: "Auto-reassign completion deadline in hours (1-720), or null to disable. Only affects seats confirmed after the edit \u2014 live per-worker deadlines are not re-timed."
|
|
1891
|
+
}),
|
|
1857
1892
|
spotsAvailable: Schema5.optional(
|
|
1858
1893
|
Schema5.Number.pipe(
|
|
1859
1894
|
Schema5.int(),
|
|
@@ -1861,11 +1896,27 @@ var UpdateBountyRequest = Schema5.Struct({
|
|
|
1861
1896
|
Schema5.lessThanOrEqualTo(500)
|
|
1862
1897
|
)
|
|
1863
1898
|
).annotations({
|
|
1864
|
-
description: "
|
|
1899
|
+
description: "Change the number of seats (humans needed). Cannot be set below spots already filled. On a wallet-funded bounty the pool is resized in place: extra seats are debited from the poster wallet, freed seats are refunded to it."
|
|
1900
|
+
}),
|
|
1901
|
+
walletImpactAcknowledged: Schema5.optional(Schema5.Boolean).annotations({
|
|
1902
|
+
description: "Acknowledges the wallet impact of a wallet-funded bounty edit. Any edit that debits the poster wallet (adding seats via spotsAvailable, or raising the price) is first refused with error_code wallet_impact_confirmation_required and the exact amount; retry the same request with this set to true to apply the charge. Admins editing a bounty they do not own must also pass it for any edit that debits or credits the poster wallet."
|
|
1865
1903
|
}),
|
|
1866
1904
|
keepApplicantsOnFill: Schema5.optional(Schema5.Boolean).annotations({
|
|
1867
1905
|
description: "When true, pending applicants are kept (not auto-rejected) once all seats fill, so you can draw from the same pool after reopening or adding seats. Default false."
|
|
1868
1906
|
}),
|
|
1907
|
+
autoAccept: Schema5.optional(Schema5.Boolean).annotations({
|
|
1908
|
+
description: "Turn automatic applicant review on or off. When on, deterministic checks always run and an AI review runs only for free-text screening answers; qualified applicants are accepted, clear mismatches rejected, uncertain cases left pending. Applications received while off stay pending; toggling on affects future applications only. Ignored on aiManaged bounties."
|
|
1909
|
+
}),
|
|
1910
|
+
autoAcceptMinMicScore: Schema5.optional(
|
|
1911
|
+
Schema5.NullOr(
|
|
1912
|
+
Schema5.Number.pipe(
|
|
1913
|
+
Schema5.greaterThanOrEqualTo(1),
|
|
1914
|
+
Schema5.lessThanOrEqualTo(5)
|
|
1915
|
+
)
|
|
1916
|
+
)
|
|
1917
|
+
).annotations({
|
|
1918
|
+
description: "Change the minimum overall DNSMOS mic score (1-5) for auto-accept on micCheckRequired bounties, or pass null to reset to the platform default (3.0). Affects future applications only."
|
|
1919
|
+
}),
|
|
1869
1920
|
completionCriteria: Schema5.optional(
|
|
1870
1921
|
Schema5.String.pipe(Schema5.minLength(10), Schema5.maxLength(2e3))
|
|
1871
1922
|
).annotations({
|
|
@@ -2072,6 +2123,24 @@ var ExpireApplicationRequest = Schema5.Struct({
|
|
|
2072
2123
|
description: "Optional human-readable reason shown to the released worker (e.g. why the seat was reclaimed). Defaults to a generic no-activity explanation."
|
|
2073
2124
|
})
|
|
2074
2125
|
});
|
|
2126
|
+
var DecideExtensionRequest = Schema5.Struct({
|
|
2127
|
+
bountyId: Schema5.String.annotations({ description: "The bounty ID" }),
|
|
2128
|
+
applicationId: Schema5.String.annotations({
|
|
2129
|
+
description: "The accepted application whose completion deadline to decide"
|
|
2130
|
+
}),
|
|
2131
|
+
action: Schema5.Literal("approve", "deny", "grant").annotations({
|
|
2132
|
+
description: "'approve' grants the worker's open extension request, 'deny' declines it (the original deadline resumes), 'grant' extends by `hours` whether or not a request is open."
|
|
2133
|
+
}),
|
|
2134
|
+
hours: Schema5.optional(
|
|
2135
|
+
Schema5.Number.pipe(
|
|
2136
|
+
Schema5.int(),
|
|
2137
|
+
Schema5.greaterThanOrEqualTo(1),
|
|
2138
|
+
Schema5.lessThanOrEqualTo(720)
|
|
2139
|
+
)
|
|
2140
|
+
).annotations({
|
|
2141
|
+
description: "Extension length in hours. Required for 'grant'; for 'approve' it is only the fallback when the request did not name an hour count."
|
|
2142
|
+
})
|
|
2143
|
+
});
|
|
2075
2144
|
var GetBountyRequest = Schema5.Struct({
|
|
2076
2145
|
bountyId: Schema5.String.annotations({
|
|
2077
2146
|
description: "The unique ID of the bounty"
|
|
@@ -2096,7 +2165,6 @@ import { Schema as Schema7 } from "effect";
|
|
|
2096
2165
|
|
|
2097
2166
|
// ../contracts/src/validation/qa-assignment-contract.ts
|
|
2098
2167
|
import { Either, Schema as Schema6 } from "effect";
|
|
2099
|
-
var QA_ASSIGNMENT_CONTRACT_VERSION = 1;
|
|
2100
2168
|
var QaAssignmentEligibilitySchema = Schema6.Struct({
|
|
2101
2169
|
id: Schema6.String,
|
|
2102
2170
|
label: Schema6.String,
|
|
@@ -2115,7 +2183,7 @@ var QaAssignmentCriterionSchema = Schema6.Struct({
|
|
|
2115
2183
|
origin: Schema6.optional(Schema6.Literal("owner"))
|
|
2116
2184
|
});
|
|
2117
2185
|
var QaAssignmentContractSchema = Schema6.Struct({
|
|
2118
|
-
version: Schema6.Literal(
|
|
2186
|
+
version: Schema6.Literal(1, 2),
|
|
2119
2187
|
eligibility: Schema6.Array(QaAssignmentEligibilitySchema),
|
|
2120
2188
|
task: Schema6.Struct({
|
|
2121
2189
|
targetUrl: Schema6.String,
|
|
@@ -2124,7 +2192,9 @@ var QaAssignmentContractSchema = Schema6.Struct({
|
|
|
2124
2192
|
}),
|
|
2125
2193
|
submission: Schema6.Struct({
|
|
2126
2194
|
evidenceMode: Schema6.Literal("photo", "video", "document"),
|
|
2127
|
-
criteria: Schema6.Array(QaAssignmentCriterionSchema)
|
|
2195
|
+
criteria: Schema6.Array(QaAssignmentCriterionSchema),
|
|
2196
|
+
/** When 'required', every origin:'owner' criterion must be bound to video evidence at submission time. */
|
|
2197
|
+
checklistEvidence: Schema6.optional(Schema6.Literal("required"))
|
|
2128
2198
|
})
|
|
2129
2199
|
});
|
|
2130
2200
|
|
|
@@ -2223,6 +2293,9 @@ var BountyPublicResponse = Schema7.Struct({
|
|
|
2223
2293
|
fundingMethod: Schema7.optional(Schema7.String),
|
|
2224
2294
|
identityRequired: Schema7.optional(Schema7.Boolean),
|
|
2225
2295
|
micCheckRequired: Schema7.optional(Schema7.Boolean),
|
|
2296
|
+
completionWindowHours: Schema7.optional(Schema7.Number),
|
|
2297
|
+
autoAccept: Schema7.optional(Schema7.Boolean),
|
|
2298
|
+
autoAcceptMinMicScore: Schema7.optional(Schema7.Number),
|
|
2226
2299
|
requiredQualificationIds: Schema7.optional(Schema7.Array(Schema7.String)),
|
|
2227
2300
|
supportedCountries: Schema7.optional(Schema7.Array(Schema7.String)),
|
|
2228
2301
|
intakeClosedCountries: Schema7.optional(Schema7.Array(Schema7.String)),
|
|
@@ -2310,9 +2383,14 @@ var expireApplicationSpec = {
|
|
|
2310
2383
|
description: "Release a previously accepted seat when the worker has ghosted (no message or submission after being accepted). Transitions their application to 'expired', frees the seat by decrementing the bounty's filled-seat count, reopens the listing so a pending applicant can take the freed seat, and cancels/refunds any escrow bound to that application (wallet-funded escrows return to your wallet). The released worker is notified. Owner only; only works on 'accepted' applications.",
|
|
2311
2384
|
input: ExpireApplicationRequest
|
|
2312
2385
|
};
|
|
2386
|
+
var decideExtensionSpec = {
|
|
2387
|
+
name: "decide_extension_request",
|
|
2388
|
+
description: "Answer a worker's completion-deadline extension request on one of your bounties, or proactively extend a worker's deadline. Only meaningful when the bounty sets completionWindowHours. 'approve' grants the worker's requested hours, 'deny' declines (the original deadline resumes and the overdue seat will auto-release), 'grant' extends by `hours` with or without an open request. Pending requests appear on applications from get_bounty_applications as completionExtension with status 'requested'; an open request pauses the auto-release for up to 24 hours. Owner only.",
|
|
2389
|
+
input: DecideExtensionRequest
|
|
2390
|
+
};
|
|
2313
2391
|
var updateBountySpec = {
|
|
2314
2392
|
name: "update_bounty",
|
|
2315
|
-
description: "Update ordinary one-shot bounty details. You can modify the title, description, price, deadline, location, requiredLinks, applicationDetails, lifecycleMessages, liveCaptureRequirement, reactivate hidden inactive bounties, and more. To target an entire country, pass location with an ISO country code and isRemoteAllowed=false while omitting city and state. Live capture and required-link requirements can only be changed before applications are received. applicationDetails may be changed after applications are received; existing applications keep their original answers, while future applications use the latest fields. applicationDetails are application detail items for standard application bounties only; blank rows are ignored, uploads are capped at 3 fields, acknowledgments at 5 fields, and camera-only live_video at 1 required field. lifecycleMessages can define auto-message templates for acceptance, rejection, and submission review transitions. Admin-only ongoing bounty settings are intentionally not exposed through MCP. You can also pause/unpause a bounty (status 'paused'/'open'), close an unassigned bounty and return its unused funding (status 'closed'), increase seats via spotsAvailable,
|
|
2393
|
+
description: "Update ordinary one-shot bounty details. You can modify the title, description, price, application-cutoff deadline, location, requiredLinks, applicationDetails, lifecycleMessages, liveCaptureRequirement, reactivate hidden inactive bounties, and more. The deadline stops new applications and direct uploads; completionWindowHours controls post-acceptance completion timing. To target an entire country, pass location with an ISO country code and isRemoteAllowed=false while omitting city and state. Live capture and required-link requirements can only be changed before applications are received. applicationDetails may be changed after applications are received; existing applications keep their original answers, while future applications use the latest fields. applicationDetails are application detail items for standard application bounties only; blank rows are ignored, uploads are capped at 3 fields, acknowledgments at 5 fields, and camera-only live_video at 1 required field. lifecycleMessages can define auto-message templates for acceptance, rejection, and submission review transitions. Admin-only ongoing bounty settings are intentionally not exposed through MCP. You can also pause/unpause a bounty (status 'paused'/'open'), close an unassigned bounty and return its unused funding (status 'closed'), increase seats via spotsAvailable, keep pending applicants on fill via keepApplicantsOnFill, and change the auto-reassign completion deadline via completionWindowHours (null disables; only affects seats confirmed after the edit), and toggle automatic applicant review via autoAccept (applications received while off stay pending; toggling on affects future applications only; ignored on aiManaged bounties) or adjust its mic-quality floor via autoAcceptMinMicScore (1-5, null resets to the 3.0 default). Use cancel_bounty for cancellation and refund handling. Work completion and payment are system-managed from escrow and payout evidence; status 'completed' and 'paid' cannot be set directly.",
|
|
2316
2394
|
input: UpdateBountyRequest
|
|
2317
2395
|
};
|
|
2318
2396
|
var cancelBountySpec = {
|
|
@@ -2332,7 +2410,7 @@ var boostBountyOutreachSpec = {
|
|
|
2332
2410
|
};
|
|
2333
2411
|
var payEnterpriseBountySpec = {
|
|
2334
2412
|
name: "pay_enterprise_bounty",
|
|
2335
|
-
description: "Pay a
|
|
2413
|
+
description: "Pay an accepted worker on a legacy enterprise bounty (older bounties created under the retired enterprise deferred-billing tier) from the owner wallet. New bounties are always escrow-funded; use release_payment for them. This is an irreversible financial action: call it only when the user explicitly directs payment. Worker completion and evidence review are not prerequisites for explicit owner payment. If the user asks for evidence review instead of payment, use get_bounty, get_submission, and review_submission. The amount, worker, and wallet are loaded from stored records. Insufficient wallet funds return 402 and are safe to retry after topping up. Owner or bounty-owning agent only; platform admins cannot pay.",
|
|
2336
2414
|
input: PayEnterpriseBountyRequest,
|
|
2337
2415
|
annotations: {
|
|
2338
2416
|
title: "Pay enterprise bounty",
|
|
@@ -3150,6 +3228,12 @@ function toMcpTool(spec, run) {
|
|
|
3150
3228
|
}
|
|
3151
3229
|
|
|
3152
3230
|
// src/tools/handlers/bounties.ts
|
|
3231
|
+
var MOCK_HIRING_STATUSES = /* @__PURE__ */ new Set([
|
|
3232
|
+
"open",
|
|
3233
|
+
"pending_funding",
|
|
3234
|
+
"partially_filled"
|
|
3235
|
+
]);
|
|
3236
|
+
var mockHiringSpotsRemaining = (bounty) => MOCK_HIRING_STATUSES.has(bounty.status) ? Math.max(0, (bounty.spotsAvailable || 1) - (bounty.spotsFilled || 0)) : 0;
|
|
3153
3237
|
var handleCreateBounty = (args) => Effect9.gen(function* () {
|
|
3154
3238
|
const params = yield* decode(CreateBountyRequest)(args);
|
|
3155
3239
|
const identity2 = yield* Identity;
|
|
@@ -3184,10 +3268,15 @@ var handleCreateBounty = (args) => Effect9.gen(function* () {
|
|
|
3184
3268
|
currency,
|
|
3185
3269
|
spotsAvailable,
|
|
3186
3270
|
...params.aiManaged !== void 0 ? { aiManaged: params.aiManaged } : {},
|
|
3271
|
+
// Default-on unless explicitly disabled; aiManaged bounties never
|
|
3272
|
+
// store the flag (the managed engine owns applicant review).
|
|
3273
|
+
...params.aiManaged ? {} : { autoAccept: params.autoAccept !== false },
|
|
3274
|
+
...params.autoAcceptMinMicScore !== void 0 && !params.aiManaged ? { autoAcceptMinMicScore: params.autoAcceptMinMicScore } : {},
|
|
3187
3275
|
requirements: params.requirements || [],
|
|
3188
3276
|
skillsNeeded: params.skillsNeeded || [],
|
|
3189
3277
|
identityRequired: params.identityRequired || false,
|
|
3190
3278
|
keepApplicantsOnFill: params.keepApplicantsOnFill || false,
|
|
3279
|
+
completionWindowHours: params.completionWindowHours ?? null,
|
|
3191
3280
|
requiredLinks: params.requiredLinks || [],
|
|
3192
3281
|
applicationDetails: screeningFields,
|
|
3193
3282
|
submissionMode: params.submissionMode || "application",
|
|
@@ -3234,6 +3323,8 @@ var handleCreateBounty = (args) => Effect9.gen(function* () {
|
|
|
3234
3323
|
price: params.price,
|
|
3235
3324
|
currency: params.currency || "USD",
|
|
3236
3325
|
...params.aiManaged !== void 0 ? { aiManaged: params.aiManaged } : {},
|
|
3326
|
+
...params.aiManaged ? {} : { autoAccept: params.autoAccept !== false },
|
|
3327
|
+
...params.autoAcceptMinMicScore !== void 0 && !params.aiManaged ? { autoAcceptMinMicScore: params.autoAcceptMinMicScore } : {},
|
|
3237
3328
|
status: "open",
|
|
3238
3329
|
applicationCount: 0,
|
|
3239
3330
|
viewCount: 0,
|
|
@@ -3241,6 +3332,7 @@ var handleCreateBounty = (args) => Effect9.gen(function* () {
|
|
|
3241
3332
|
micCheckRequired: params.micCheckRequired || false,
|
|
3242
3333
|
liveCaptureRequirement: params.liveCaptureRequirement,
|
|
3243
3334
|
keepApplicantsOnFill: params.keepApplicantsOnFill || false,
|
|
3335
|
+
...params.completionWindowHours !== void 0 ? { completionWindowHours: params.completionWindowHours } : {},
|
|
3244
3336
|
requiredLinks: params.requiredLinks || [],
|
|
3245
3337
|
applicationDetails: screeningFields,
|
|
3246
3338
|
submissionMode: params.submissionMode || "application",
|
|
@@ -3329,7 +3421,7 @@ var handleListBounties = (args) => Effect9.gen(function* () {
|
|
|
3329
3421
|
}
|
|
3330
3422
|
const bountiesWithComputed = bounties2.map((b) => ({
|
|
3331
3423
|
...b,
|
|
3332
|
-
spotsRemaining: (b
|
|
3424
|
+
spotsRemaining: mockHiringSpotsRemaining(b)
|
|
3333
3425
|
}));
|
|
3334
3426
|
return ok({
|
|
3335
3427
|
success: true,
|
|
@@ -3370,7 +3462,7 @@ var getBountyTool = toMcpTool(
|
|
|
3370
3462
|
success: true,
|
|
3371
3463
|
bounty: {
|
|
3372
3464
|
...bounty,
|
|
3373
|
-
spotsRemaining: (bounty
|
|
3465
|
+
spotsRemaining: mockHiringSpotsRemaining(bounty)
|
|
3374
3466
|
},
|
|
3375
3467
|
mode: "mock"
|
|
3376
3468
|
});
|
|
@@ -3656,6 +3748,36 @@ var expireApplicationTool = toMcpTool(
|
|
|
3656
3748
|
return ok(result);
|
|
3657
3749
|
})
|
|
3658
3750
|
);
|
|
3751
|
+
var decideExtensionTool = toMcpTool(
|
|
3752
|
+
decideExtensionSpec,
|
|
3753
|
+
(params) => Effect9.gen(function* () {
|
|
3754
|
+
const identity2 = yield* Identity;
|
|
3755
|
+
const api = yield* ApiClient;
|
|
3756
|
+
const rateLimit = yield* RateLimit;
|
|
3757
|
+
const config = yield* McpConfig;
|
|
3758
|
+
yield* rateLimit.check("decide_extension_request");
|
|
3759
|
+
if (config.mockMode) {
|
|
3760
|
+
return ok({
|
|
3761
|
+
success: true,
|
|
3762
|
+
action: params.action,
|
|
3763
|
+
message: params.action === "deny" ? "Extension declined (mock)." : "Deadline extended (mock).",
|
|
3764
|
+
mode: "mock"
|
|
3765
|
+
});
|
|
3766
|
+
}
|
|
3767
|
+
const verification = yield* identity2.createVerification(
|
|
3768
|
+
`extension_decision:${params.bountyId}:${params.applicationId}`
|
|
3769
|
+
);
|
|
3770
|
+
const result = yield* api.post(
|
|
3771
|
+
`/bounties/${params.bountyId}/applications/${params.applicationId}/extension/decision`,
|
|
3772
|
+
{
|
|
3773
|
+
action: params.action,
|
|
3774
|
+
...params.hours !== void 0 ? { hours: params.hours } : {},
|
|
3775
|
+
...verification
|
|
3776
|
+
}
|
|
3777
|
+
);
|
|
3778
|
+
return ok(result);
|
|
3779
|
+
})
|
|
3780
|
+
);
|
|
3659
3781
|
var getBountyOutreachStatusTool = toMcpTool(
|
|
3660
3782
|
getBountyOutreachStatusSpec,
|
|
3661
3783
|
(params) => Effect9.gen(function* () {
|
|
@@ -3709,7 +3831,7 @@ var payEnterpriseBountyTool = toMcpTool(
|
|
|
3709
3831
|
var bountyTools = [
|
|
3710
3832
|
{
|
|
3711
3833
|
name: "create_bounty",
|
|
3712
|
-
description: "Create a one-shot task bounty for humans to apply to. To target an entire country, pass location with an ISO country code and isRemoteAllowed=false while omitting city and state. **IMPORTANT: Always call with dryRun=true first** to preview the bounty. Dry-run `preview.fundingTotal` is the total funding requirement before any existing wallet balance is applied. Show that estimate to the operator before posting. Show the preview to the user and ask 'Here's your bounty \u2014 would you like to edit anything before posting?' Only call again with dryRun=false (or omitted) after the user confirms. **You MUST help the user define completionCriteria and evidenceTypes** \u2014 ask what 'done' looks like and what proof they need (text/data, photos, video, or links). For specialized standard-application tasks, configure applicationDetails so applicants provide application details before review. Blank rows are ignored; application upload fields are one file each and capped at 3 total; acknowledgment checkboxes are capped at 5 total and can be optional or required; and one required live_video field may contain a script applicants must record with the in-browser camera. For appearance-based bounties where the worker appears on camera or their presence is part of the deliverable (sign holding, UGC, sponsored posts, on-camera video, promo/GTM appearances), always include one required live_video field with a label asking the applicant to explain in two sentences why they are a good fit \u2014 this gates applications on a live self-recorded video so the poster sees each applicant before accepting. Do not ask for passwords, OTP/2FA codes, API keys, private keys, seed phrases, government IDs, bank/card details, exact home addresses, dates of birth, or other sensitive personal information. For direct-review collection bounties, use submissionMode='photo_upload', 'video_upload', or 'document_upload' with matching submission settings instead of applicationDetails. lifecycleMessages can define auto-message templates for acceptance, rejection, and submission review transitions. You can require applicants to provide specific links (LinkedIn, GitHub, resume, etc.) using the requiredLinks parameter. Requires RENTAHUMAN_API_KEY from the account owner. Standard accounts use available wallet balance first; if the wallet cannot cover the bounty, the response includes deposit_url and checkout_total (the hosted charge after wallet balance is applied) and the account owner must complete checkout before the bounty is visible. Supports multi-person bounties by setting spotsAvailable > 1. Ongoing data-collection programs are managed separately and cannot be created through this tool. Pass optional `idempotencyKey` to make this safe to retry (a replayed key returns the original result instead of duplicating). BETA: pass aiManaged: true to have the platform fully manage the bounty \u2014 automated recruiting, vetting, submission review, payment release, and a final report. Fixed price USD only, 1-50 spots. Poll the bounty's managed run or subscribe to run.report_ready for the finished work.",
|
|
3834
|
+
description: "Create a one-shot task bounty for humans to apply to. To target an entire country, pass location with an ISO country code and isRemoteAllowed=false while omitting city and state. **IMPORTANT: Always call with dryRun=true first** to preview the bounty. Dry-run `preview.fundingTotal` is the total funding requirement before any existing wallet balance is applied. Show that estimate to the operator before posting. Show the preview to the user and ask 'Here's your bounty \u2014 would you like to edit anything before posting?' Only call again with dryRun=false (or omitted) after the user confirms. **You MUST help the user define completionCriteria and evidenceTypes** \u2014 ask what 'done' looks like and what proof they need (text/data, photos, video, or links). For specialized standard-application tasks, configure applicationDetails so applicants provide application details before review. Blank rows are ignored; application upload fields are one file each and capped at 3 total; acknowledgment checkboxes are capped at 5 total and can be optional or required; and one required live_video field may contain a script applicants must record with the in-browser camera. For appearance-based bounties where the worker appears on camera or their presence is part of the deliverable (sign holding, UGC, sponsored posts, on-camera video, promo/GTM appearances), always include one required live_video field with a label asking the applicant to explain in two sentences why they are a good fit \u2014 this gates applications on a live self-recorded video so the poster sees each applicant before accepting. Do not ask for passwords, OTP/2FA codes, API keys, private keys, seed phrases, government IDs, bank/card details, exact home addresses, dates of birth, or other sensitive personal information. For direct-review collection bounties, use submissionMode='photo_upload', 'video_upload', or 'document_upload' with matching submission settings instead of applicationDetails. lifecycleMessages can define auto-message templates for acceptance, rejection, and submission review transitions. You can require applicants to provide specific links (LinkedIn, GitHub, resume, etc.) using the requiredLinks parameter. Requires RENTAHUMAN_API_KEY from the account owner. Standard accounts use available wallet balance first; if the wallet cannot cover the bounty, the response includes deposit_url and checkout_total (the hosted charge after wallet balance is applied) and the account owner must complete checkout before the bounty is visible. Supports multi-person bounties by setting spotsAvailable > 1. Set completionWindowHours (1-720) to give confirmed workers a completion deadline: overdue seats auto-release and reopen for other applicants; workers may request extensions you answer with decide_extension_request. Ongoing data-collection programs are managed separately and cannot be created through this tool. Pass optional `idempotencyKey` to make this safe to retry (a replayed key returns the original result instead of duplicating). Applicants are auto-reviewed by default (autoAccept, default true): deterministic checks always run and an AI review runs only for free-text screening answers \u2014 qualified applicants are accepted, clear mismatches rejected with a reason, uncertain cases left pending for manual review; pass autoAccept: false to review and accept every application yourself; on micCheckRequired bounties, tune the mic-quality floor with autoAcceptMinMicScore (1-5, default 3.0). BETA: pass aiManaged: true to have the platform fully manage the bounty \u2014 automated recruiting, vetting, submission review, payment release, and a final report. Fixed price USD only, 1-50 spots. Poll the bounty's managed run or subscribe to run.report_ready for the finished work.",
|
|
3713
3835
|
inputSchema: toInputSchema(CreateBountyRequest),
|
|
3714
3836
|
handler: handleCreateBounty
|
|
3715
3837
|
},
|
|
@@ -3727,6 +3849,7 @@ var bountyTools = [
|
|
|
3727
3849
|
acceptApplicationTool,
|
|
3728
3850
|
rejectApplicationTool,
|
|
3729
3851
|
expireApplicationTool,
|
|
3852
|
+
decideExtensionTool,
|
|
3730
3853
|
getBountyOutreachStatusTool,
|
|
3731
3854
|
boostBountyOutreachTool,
|
|
3732
3855
|
payEnterpriseBountyTool
|
|
@@ -4528,7 +4651,7 @@ var escrowTools = [
|
|
|
4528
4651
|
},
|
|
4529
4652
|
{
|
|
4530
4653
|
name: "confirm_delivery",
|
|
4531
|
-
description: "Confirm that a worker has satisfactorily completed the task. Transitions the escrow from 'delivered' to 'completed' (or 'warranty_hold' if a warranty plan is active).
|
|
4654
|
+
description: "Confirm that a worker has satisfactorily completed the task. Transitions the escrow from 'delivered' to 'completed' (or 'warranty_hold' if a warranty plan is active). This is separate from release_payment, which the owner may explicitly direct earlier. Requires RENTAHUMAN_API_KEY to be set.",
|
|
4532
4655
|
inputSchema: toInputSchema(ConfirmDeliveryRequest),
|
|
4533
4656
|
handler: (args) => Effect12.gen(function* () {
|
|
4534
4657
|
yield* requireApiKey;
|
|
@@ -4544,7 +4667,7 @@ var escrowTools = [
|
|
|
4544
4667
|
},
|
|
4545
4668
|
{
|
|
4546
4669
|
name: "release_payment",
|
|
4547
|
-
description: "Release
|
|
4670
|
+
description: "Release an active funded escrow to the worker and complete the task. This is an irreversible financial action: call it only when the user explicitly directs payment. A prior worker completion or review_submission approval is not required. If the user asks to review evidence instead, call get_bounty and get_submission, inspect every file, then use review_submission. Optionally pass `applicationId` to assert the intended application; a mismatch is refused to prevent paying the wrong worker. Requires RENTAHUMAN_API_KEY.",
|
|
4548
4671
|
inputSchema: toInputSchema(ReleasePaymentRequest),
|
|
4549
4672
|
annotations: {
|
|
4550
4673
|
title: "Release payment",
|
package/dist/types/index.d.ts
CHANGED
|
@@ -70,7 +70,10 @@ declare const CreateBountyRequest: Schema.Struct<{
|
|
|
70
70
|
spotsAvailable: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
71
71
|
responseWindowHours: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
72
72
|
autoExpireGhosts: Schema.optional<typeof Schema.Boolean>;
|
|
73
|
+
completionWindowHours: Schema.optional<Schema.filter<Schema.filter<Schema.filter<typeof Schema.Number>>>>;
|
|
73
74
|
keepApplicantsOnFill: Schema.optional<typeof Schema.Boolean>;
|
|
75
|
+
autoAccept: Schema.optional<typeof Schema.Boolean>;
|
|
76
|
+
autoAcceptMinMicScore: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
74
77
|
identityRequired: Schema.optional<typeof Schema.Boolean>;
|
|
75
78
|
micCheckRequired: Schema.optional<typeof Schema.Boolean>;
|
|
76
79
|
aiManaged: Schema.optional<Schema.Literal<[true]>>;
|
|
@@ -145,8 +148,12 @@ declare const UpdateBountyRequest: Schema.Struct<{
|
|
|
145
148
|
micCheckRequired: Schema.optional<typeof Schema.Boolean>;
|
|
146
149
|
responseWindowHours: Schema.optional<Schema.filter<Schema.filter<typeof Schema.Number>>>;
|
|
147
150
|
autoExpireGhosts: Schema.optional<typeof Schema.Boolean>;
|
|
151
|
+
completionWindowHours: Schema.optional<Schema.NullOr<Schema.filter<Schema.filter<Schema.filter<typeof Schema.Number>>>>>;
|
|
148
152
|
spotsAvailable: Schema.optional<Schema.filter<Schema.filter<Schema.filter<typeof Schema.Number>>>>;
|
|
153
|
+
walletImpactAcknowledged: Schema.optional<typeof Schema.Boolean>;
|
|
149
154
|
keepApplicantsOnFill: Schema.optional<typeof Schema.Boolean>;
|
|
155
|
+
autoAccept: Schema.optional<typeof Schema.Boolean>;
|
|
156
|
+
autoAcceptMinMicScore: Schema.optional<Schema.NullOr<Schema.filter<Schema.filter<typeof Schema.Number>>>>;
|
|
150
157
|
completionCriteria: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
|
|
151
158
|
evidenceTypes: Schema.optional<Schema.filter<Schema.Array$<Schema.Literal<["text", "photo", "video", "link"]>>>>;
|
|
152
159
|
evidenceCriteria: Schema.optional<Schema.filter<typeof Schema.String>>;
|