@volter/twin-runhuman 0.1.0 → 0.1.2
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.
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
// RH1's JSON 404 `{ error: 'Not found' }` with an `x-twin-gap` header naming the branch — never a
|
|
49
49
|
// fabricated success.
|
|
50
50
|
import { createHash, createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
51
|
-
import { applyTwinWrite, applyTwinWriteAtomic, projectResources } from '@volter/world-core';
|
|
51
|
+
import { applyTwinWrite, applyTwinWriteAtomic, projectResources, worldNow } from '@volter/world-core';
|
|
52
52
|
import { CLAIM_JOB_FIELDS, CREATE_JOB_FIELDS, END_JOB_FIELDS, PROCESS_RESULTS_FIELDS, validateBody, validateObjectBody, } from "./runhuman-validate.js";
|
|
53
53
|
const SERVICE = 'runhuman';
|
|
54
54
|
export const RUNHUMAN_RESOURCE_TYPES = ['organization', 'project', 'api_key', 'user', 'tester_profile', 'job', 'pipeline_run', 'setting'];
|
|
@@ -128,7 +128,7 @@ function mintFor(type, req, resources) {
|
|
|
128
128
|
ordinal += 1;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
const now = (req) => req.occurredAt ??
|
|
131
|
+
const now = (req) => req.occurredAt ?? worldNow();
|
|
132
132
|
// ── tester JWT (utils/jwt.util.ts: HS256, { sub, email }, expiresIn 24h) ─────────────────────
|
|
133
133
|
const b64url = (input) => Buffer.from(input).toString('base64url');
|
|
134
134
|
async function jwtSecret(root) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-runhuman",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Local Runhuman 1 (runhuman.com/api) twin: job create/read/list, the tester claim-to-completion lifecycle, RH1-exact refusals. Built on @volter/world-core.",
|
|
5
5
|
"author": "Volter (https://github.com/volter-ai)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"postpack": "node ../../../scripts/publish/prepare-publish.mjs postpack"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@volter/world-core": "2.0.
|
|
39
|
+
"@volter/world-core": "2.0.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/bun": "^1.2.20",
|
|
43
43
|
"@types/node": "^24.0.0",
|
|
44
|
-
"@volter/world-core": "2.0.
|
|
44
|
+
"@volter/world-core": "2.0.2",
|
|
45
45
|
"@volter/world-tooling": "0.1.0",
|
|
46
46
|
"typescript": "^5.9.0"
|
|
47
47
|
},
|
package/src/runhuman-twin.ts
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
// RH1's JSON 404 `{ error: 'Not found' }` with an `x-twin-gap` header naming the branch — never a
|
|
49
49
|
// fabricated success.
|
|
50
50
|
import { createHash, createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
51
|
-
import { applyTwinWrite, applyTwinWriteAtomic, projectResources, type TwinResource } from '@volter/world-core';
|
|
51
|
+
import { applyTwinWrite, applyTwinWriteAtomic, projectResources, type TwinResource, worldNow } from '@volter/world-core';
|
|
52
52
|
import {
|
|
53
53
|
CLAIM_JOB_FIELDS,
|
|
54
54
|
CREATE_JOB_FIELDS,
|
|
@@ -154,7 +154,7 @@ function mintFor(type: string, req: RunhumanTwinRequest, resources: readonly Twi
|
|
|
154
154
|
ordinal += 1;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
const now = (req: RunhumanTwinRequest): string => req.occurredAt ??
|
|
157
|
+
const now = (req: RunhumanTwinRequest): string => req.occurredAt ?? worldNow();
|
|
158
158
|
|
|
159
159
|
// ── tester JWT (utils/jwt.util.ts: HS256, { sub, email }, expiresIn 24h) ─────────────────────
|
|
160
160
|
const b64url = (input: Buffer | string): string => Buffer.from(input).toString('base64url');
|