@hey-research-lab/virtuals-plugin 0.1.0 → 0.1.1
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/CHANGELOG.md +7 -0
- package/README.md +5 -3
- package/dist/acp.d.ts +3 -1
- package/dist/acp.js +5 -3
- package/dist/index.cjs +5 -3
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5 -3
- package/package.json +18 -12
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this project are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## 0.1.1 — unreleased (not yet on npm)
|
|
8
|
+
|
|
9
|
+
- Security: `HEY_API_KEY` from the environment is sent to `https://heyresearch.xyz` only. With a custom
|
|
10
|
+
`baseUrl` (a mock, a proxy, a local server) no key is sent unless the caller passes `apiKey`
|
|
11
|
+
explicitly, as the AgentKit, GOAT and CLI integrations already do.
|
|
12
|
+
- Development: vitest 4.1.12.
|
|
13
|
+
|
|
7
14
|
## 0.1.0 — 2026-10-13
|
|
8
15
|
|
|
9
16
|
Initial release.
|
package/README.md
CHANGED
|
@@ -93,7 +93,8 @@ Source: HEY Research Lab — heyresearch.xyz · https://heyresearch.xyz/project/
|
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
`heyResearchWorker(options)` takes `apiKey`, `baseUrl` (tests and local mocks only: `https:` or
|
|
96
|
-
`http://localhost
|
|
96
|
+
`http://localhost`; the environment's `HEY_API_KEY` goes to heyresearch.xyz only, so a custom `baseUrl`
|
|
97
|
+
needs an explicit `apiKey`), `fetchImpl`, `timeoutMs`, `client`, and `id` / `name` / `description` /
|
|
97
98
|
`getEnvironment` overrides. `heyResearchFunctions(options)` returns the five `GameFunction`s for
|
|
98
99
|
your own worker. The framework-neutral reads (`researchProject`, `findProjects`, `recentChanges`,
|
|
99
100
|
`projectTimeline`, `chainOverview`) are exported too.
|
|
@@ -170,8 +171,9 @@ changes no status, score or order on HEY.
|
|
|
170
171
|
|
|
171
172
|
**GAME (game-node plugins).**
|
|
172
173
|
|
|
173
|
-
1.
|
|
174
|
-
|
|
174
|
+
1. Done: the package is on npm as
|
|
175
|
+
[`@hey-research-lab/virtuals-plugin`](https://www.npmjs.com/package/@hey-research-lab/virtuals-plugin)
|
|
176
|
+
and this repository is public.
|
|
175
177
|
2. Fork [game-by-virtuals/game-node](https://github.com/game-by-virtuals/game-node), add
|
|
176
178
|
`plugins/heyResearchPlugin/` with a `README.md` (install, usage, functions, troubleshooting) and
|
|
177
179
|
the [`plugin_metadata.yml`](plugin_metadata.yml) in this repository (filled from their
|
package/dist/acp.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ import { JobRoomEntry, AssetToken } from '@virtuals-protocol/acp-node-v2';
|
|
|
6
6
|
type HeyPluginOptions = {
|
|
7
7
|
/**
|
|
8
8
|
* A HEY API key from heyresearch.xyz/account. Optional: it lifts the anonymous rate limit and
|
|
9
|
-
* nothing else. Defaults to `HEY_API_KEY` from the environment
|
|
9
|
+
* nothing else. Defaults to `HEY_API_KEY` from the environment, which is sent to heyresearch.xyz
|
|
10
|
+
* only: with a custom `baseUrl`, pass the key here explicitly or none is sent. Sent as a bearer
|
|
11
|
+
* token, never logged.
|
|
10
12
|
*/
|
|
11
13
|
apiKey?: string;
|
|
12
14
|
/**
|
package/dist/acp.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { HeyClient } from "@hey-research-lab/sdk";
|
|
3
3
|
|
|
4
4
|
// src/version.ts
|
|
5
|
-
var VERSION = "0.1.
|
|
5
|
+
var VERSION = "0.1.1";
|
|
6
6
|
var INTEGRATION = `hey-virtuals-plugin/${VERSION}`;
|
|
7
7
|
|
|
8
8
|
// src/client.ts
|
|
@@ -25,15 +25,17 @@ function assertBaseUrl(value) {
|
|
|
25
25
|
}
|
|
26
26
|
return url.origin;
|
|
27
27
|
}
|
|
28
|
+
var HEY_ORIGIN = "https://heyresearch.xyz";
|
|
28
29
|
function envApiKey() {
|
|
29
30
|
const value = typeof process === "undefined" ? void 0 : process.env.HEY_API_KEY;
|
|
30
31
|
return value && value.trim() ? value.trim() : void 0;
|
|
31
32
|
}
|
|
32
33
|
function createHeyClient(options = {}) {
|
|
33
34
|
if (options.client) return options.client;
|
|
34
|
-
const
|
|
35
|
+
const baseUrl = options.baseUrl ? assertBaseUrl(options.baseUrl) : void 0;
|
|
36
|
+
const apiKey = options.apiKey?.trim() || (baseUrl === void 0 || baseUrl === HEY_ORIGIN ? envApiKey() : void 0);
|
|
35
37
|
return new HeyClient({
|
|
36
|
-
...
|
|
38
|
+
...baseUrl ? { baseUrl } : {},
|
|
37
39
|
...apiKey ? { apiKey } : {},
|
|
38
40
|
...options.fetchImpl ? { fetchImpl: options.fetchImpl } : {},
|
|
39
41
|
...options.timeoutMs ? { timeoutMs: options.timeoutMs } : {},
|
package/dist/index.cjs
CHANGED
|
@@ -71,7 +71,7 @@ function assertChainId(value) {
|
|
|
71
71
|
var import_sdk = require("@hey-research-lab/sdk");
|
|
72
72
|
|
|
73
73
|
// src/version.ts
|
|
74
|
-
var VERSION = "0.1.
|
|
74
|
+
var VERSION = "0.1.1";
|
|
75
75
|
var INTEGRATION = `hey-virtuals-plugin/${VERSION}`;
|
|
76
76
|
|
|
77
77
|
// src/client.ts
|
|
@@ -94,15 +94,17 @@ function assertBaseUrl(value) {
|
|
|
94
94
|
}
|
|
95
95
|
return url.origin;
|
|
96
96
|
}
|
|
97
|
+
var HEY_ORIGIN = "https://heyresearch.xyz";
|
|
97
98
|
function envApiKey() {
|
|
98
99
|
const value = typeof process === "undefined" ? void 0 : process.env.HEY_API_KEY;
|
|
99
100
|
return value && value.trim() ? value.trim() : void 0;
|
|
100
101
|
}
|
|
101
102
|
function createHeyClient(options = {}) {
|
|
102
103
|
if (options.client) return options.client;
|
|
103
|
-
const
|
|
104
|
+
const baseUrl = options.baseUrl ? assertBaseUrl(options.baseUrl) : void 0;
|
|
105
|
+
const apiKey = options.apiKey?.trim() || (baseUrl === void 0 || baseUrl === HEY_ORIGIN ? envApiKey() : void 0);
|
|
104
106
|
return new import_sdk.HeyClient({
|
|
105
|
-
...
|
|
107
|
+
...baseUrl ? { baseUrl } : {},
|
|
106
108
|
...apiKey ? { apiKey } : {},
|
|
107
109
|
...options.fetchImpl ? { fetchImpl: options.fetchImpl } : {},
|
|
108
110
|
...options.timeoutMs ? { timeoutMs: options.timeoutMs } : {},
|
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,9 @@ import { FetchLike, HeyClient, HeyAgentResponse } from '@hey-research-lab/sdk';
|
|
|
5
5
|
type HeyPluginOptions = {
|
|
6
6
|
/**
|
|
7
7
|
* A HEY API key from heyresearch.xyz/account. Optional: it lifts the anonymous rate limit and
|
|
8
|
-
* nothing else. Defaults to `HEY_API_KEY` from the environment
|
|
8
|
+
* nothing else. Defaults to `HEY_API_KEY` from the environment, which is sent to heyresearch.xyz
|
|
9
|
+
* only: with a custom `baseUrl`, pass the key here explicitly or none is sent. Sent as a bearer
|
|
10
|
+
* token, never logged.
|
|
9
11
|
*/
|
|
10
12
|
apiKey?: string;
|
|
11
13
|
/**
|
|
@@ -154,8 +156,8 @@ declare class UnsupportedChainError extends Error {
|
|
|
154
156
|
declare function assertChainId(value: unknown): asserts value is typeof CHAIN_ID;
|
|
155
157
|
|
|
156
158
|
/** The package version; a test holds it equal to package.json. */
|
|
157
|
-
declare const VERSION = "0.1.
|
|
159
|
+
declare const VERSION = "0.1.1";
|
|
158
160
|
/** Sent to HEY as `x-hey-integration` so the lab can count this plugin's calls by version. */
|
|
159
|
-
declare const INTEGRATION = "hey-virtuals-plugin/0.1.
|
|
161
|
+
declare const INTEGRATION = "hey-virtuals-plugin/0.1.1";
|
|
160
162
|
|
|
161
163
|
export { ATTRIBUTION, CAIP2, CHAIN_ID, CHAIN_NAME, type ChangesArgs, HEY_FUNCTION_NAMES, HEY_WORKER_DESCRIPTION, HEY_WORKER_ID, HEY_WORKER_NAME, type HeyFunctionName, type HeyFunctionOptions, type HeyOutcome, type HeyPluginOptions, type HeyResearchWorkerOptions, type HeyResult, INTEGRATION, InvalidBaseUrlError, type ReadContext, UnsupportedChainError, VERSION, assertChainId, chainOverview, checkChain, createHeyClient, findProjects, heyEnvironment, heyResearchFunctions, heyResearchWorker, projectTimeline, recentChanges, researchProject, sourceLine, toGameResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ import { FetchLike, HeyClient, HeyAgentResponse } from '@hey-research-lab/sdk';
|
|
|
5
5
|
type HeyPluginOptions = {
|
|
6
6
|
/**
|
|
7
7
|
* A HEY API key from heyresearch.xyz/account. Optional: it lifts the anonymous rate limit and
|
|
8
|
-
* nothing else. Defaults to `HEY_API_KEY` from the environment
|
|
8
|
+
* nothing else. Defaults to `HEY_API_KEY` from the environment, which is sent to heyresearch.xyz
|
|
9
|
+
* only: with a custom `baseUrl`, pass the key here explicitly or none is sent. Sent as a bearer
|
|
10
|
+
* token, never logged.
|
|
9
11
|
*/
|
|
10
12
|
apiKey?: string;
|
|
11
13
|
/**
|
|
@@ -154,8 +156,8 @@ declare class UnsupportedChainError extends Error {
|
|
|
154
156
|
declare function assertChainId(value: unknown): asserts value is typeof CHAIN_ID;
|
|
155
157
|
|
|
156
158
|
/** The package version; a test holds it equal to package.json. */
|
|
157
|
-
declare const VERSION = "0.1.
|
|
159
|
+
declare const VERSION = "0.1.1";
|
|
158
160
|
/** Sent to HEY as `x-hey-integration` so the lab can count this plugin's calls by version. */
|
|
159
|
-
declare const INTEGRATION = "hey-virtuals-plugin/0.1.
|
|
161
|
+
declare const INTEGRATION = "hey-virtuals-plugin/0.1.1";
|
|
160
162
|
|
|
161
163
|
export { ATTRIBUTION, CAIP2, CHAIN_ID, CHAIN_NAME, type ChangesArgs, HEY_FUNCTION_NAMES, HEY_WORKER_DESCRIPTION, HEY_WORKER_ID, HEY_WORKER_NAME, type HeyFunctionName, type HeyFunctionOptions, type HeyOutcome, type HeyPluginOptions, type HeyResearchWorkerOptions, type HeyResult, INTEGRATION, InvalidBaseUrlError, type ReadContext, UnsupportedChainError, VERSION, assertChainId, chainOverview, checkChain, createHeyClient, findProjects, heyEnvironment, heyResearchFunctions, heyResearchWorker, projectTimeline, recentChanges, researchProject, sourceLine, toGameResponse };
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ function assertChainId(value) {
|
|
|
26
26
|
import { HeyClient } from "@hey-research-lab/sdk";
|
|
27
27
|
|
|
28
28
|
// src/version.ts
|
|
29
|
-
var VERSION = "0.1.
|
|
29
|
+
var VERSION = "0.1.1";
|
|
30
30
|
var INTEGRATION = `hey-virtuals-plugin/${VERSION}`;
|
|
31
31
|
|
|
32
32
|
// src/client.ts
|
|
@@ -49,15 +49,17 @@ function assertBaseUrl(value) {
|
|
|
49
49
|
}
|
|
50
50
|
return url.origin;
|
|
51
51
|
}
|
|
52
|
+
var HEY_ORIGIN = "https://heyresearch.xyz";
|
|
52
53
|
function envApiKey() {
|
|
53
54
|
const value = typeof process === "undefined" ? void 0 : process.env.HEY_API_KEY;
|
|
54
55
|
return value && value.trim() ? value.trim() : void 0;
|
|
55
56
|
}
|
|
56
57
|
function createHeyClient(options = {}) {
|
|
57
58
|
if (options.client) return options.client;
|
|
58
|
-
const
|
|
59
|
+
const baseUrl = options.baseUrl ? assertBaseUrl(options.baseUrl) : void 0;
|
|
60
|
+
const apiKey = options.apiKey?.trim() || (baseUrl === void 0 || baseUrl === HEY_ORIGIN ? envApiKey() : void 0);
|
|
59
61
|
return new HeyClient({
|
|
60
|
-
...
|
|
62
|
+
...baseUrl ? { baseUrl } : {},
|
|
61
63
|
...apiKey ? { apiKey } : {},
|
|
62
64
|
...options.fetchImpl ? { fetchImpl: options.fetchImpl } : {},
|
|
63
65
|
...options.timeoutMs ? { timeoutMs: options.timeoutMs } : {},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hey-research-lab/virtuals-plugin",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Virtuals Protocol GAME worker and ACP provider scaffold for HEY Research Lab: evidence-backed builder research on Robinhood Chain projects, tickers and contracts
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Virtuals Protocol GAME worker and ACP provider scaffold for HEY Research Lab: evidence-backed builder research on Robinhood Chain projects, tickers and contracts \u2014 still building, what shipped, what is unknown.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "HEY Research Lab",
|
|
7
7
|
"type": "module",
|
|
@@ -59,6 +59,16 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
+
"packageManager": "pnpm@9.15.1",
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsup",
|
|
65
|
+
"lint": "eslint .",
|
|
66
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
67
|
+
"test": "vitest run",
|
|
68
|
+
"scan": "node scripts/scan.mjs .",
|
|
69
|
+
"format:check": "prettier --check .",
|
|
70
|
+
"format": "prettier --write ."
|
|
71
|
+
},
|
|
62
72
|
"dependencies": {
|
|
63
73
|
"@hey-research-lab/sdk": "^0.2.0"
|
|
64
74
|
},
|
|
@@ -82,15 +92,11 @@
|
|
|
82
92
|
"tsup": "^8.5.1",
|
|
83
93
|
"typescript": "^5.7.2",
|
|
84
94
|
"typescript-eslint": "^8.18.0",
|
|
85
|
-
"vitest": "^4.1.
|
|
95
|
+
"vitest": "^4.1.12"
|
|
86
96
|
},
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"test": "vitest run",
|
|
92
|
-
"scan": "node scripts/scan.mjs .",
|
|
93
|
-
"format:check": "prettier --check .",
|
|
94
|
-
"format": "prettier --write ."
|
|
97
|
+
"pnpm": {
|
|
98
|
+
"overrides": {
|
|
99
|
+
"esbuild": "^0.28.1"
|
|
100
|
+
}
|
|
95
101
|
}
|
|
96
|
-
}
|
|
102
|
+
}
|