@rotifer/playground 0.13.0 → 0.14.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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.14.0](https://github.com/rotifer-protocol/rotifer-playground/compare/v0.13.1...v0.14.0) (2026-08-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **plugin:** ship the same plugin to DeepSeek Harness as a declarative bundle ([#200](https://github.com/rotifer-protocol/rotifer-playground/issues/200)) ([14ca37a](https://github.com/rotifer-protocol/rotifer-playground/commit/14ca37a5efcc7a50fefecf00d30bb6832d34dcb6))
|
|
14
|
+
|
|
15
|
+
## [0.13.1](https://github.com/rotifer-protocol/rotifer-playground/compare/v0.13.0...v0.13.1) (2026-08-18)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **cli:** a test run must not report Gene invocations to production ([#197](https://github.com/rotifer-protocol/rotifer-playground/issues/197)) ([a928f05](https://github.com/rotifer-protocol/rotifer-playground/commit/a928f05a30f6d551f8128de0e867d4c6b1afe775))
|
|
21
|
+
* **deps:** update h2 to 0.4.16 for RUSTSEC-2026-0258 ([#196](https://github.com/rotifer-protocol/rotifer-playground/issues/196)) ([70dcafd](https://github.com/rotifer-protocol/rotifer-playground/commit/70dcafd63199fd14282e9bfd5d5e6f6d5fb51c27))
|
|
22
|
+
* **plugin:** carry the display name in the manifest instead of a publish flag ([#195](https://github.com/rotifer-protocol/rotifer-playground/issues/195)) ([1464415](https://github.com/rotifer-protocol/rotifer-playground/commit/14644150ed7f0c738071c1513e3fee6e08aa011f))
|
|
23
|
+
|
|
8
24
|
## [0.13.0](https://github.com/rotifer-protocol/rotifer-playground/compare/v0.12.0...v0.13.0) (2026-08-18)
|
|
9
25
|
|
|
10
26
|
|
|
@@ -7,12 +7,22 @@ export declare const FLUSH_TIMEOUT_MS = 2000;
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function flushInvocationReports(timeoutMs?: number): Promise<void>;
|
|
9
9
|
export declare function telemetryOptedOut(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* True when this process is a test run (or was spawned by one — `execSync` and
|
|
12
|
+
* friends pass the environment down, which is exactly how the CLI under test
|
|
13
|
+
* inherits these).
|
|
14
|
+
*
|
|
15
|
+
* Deliberately narrow: `CI` is NOT one of these. A Gene invoked from someone's
|
|
16
|
+
* pipeline is still a caller reaching for it; a Gene invoked by a test asserting
|
|
17
|
+
* that the pipeline compiles is not.
|
|
18
|
+
*/
|
|
19
|
+
export declare function runningUnderTest(): boolean;
|
|
10
20
|
/** The Cloud id recorded when this Gene was installed, or null. */
|
|
11
21
|
export declare function cloudGeneId(geneDir: string): string | null;
|
|
12
22
|
export interface InvocationReport {
|
|
13
23
|
/** The Gene id reported, or null when nothing was sent. */
|
|
14
24
|
reported: string | null;
|
|
15
|
-
/** Why nothing was sent: telemetry-off | not-logged-in | no-cloud-identity. */
|
|
25
|
+
/** Why nothing was sent: telemetry-off | test-run | not-logged-in | no-cloud-identity. */
|
|
16
26
|
reason?: string;
|
|
17
27
|
/** Resolves when the POST settles; absent when nothing was sent. */
|
|
18
28
|
settled?: Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation.d.ts","sourceRoot":"","sources":["../../src/cloud/invocation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invocation.d.ts","sourceRoot":"","sources":["../../src/cloud/invocation.ts"],"names":[],"mappings":"AAoDA,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,SAAS,GAAE,MAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAShG;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAG3C;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAM1C;AAED,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAU1D;AAED,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,0FAA0F;IAC1F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAuCtE"}
|
package/dist/cloud/invocation.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FLUSH_TIMEOUT_MS = void 0;
|
|
4
4
|
exports.flushInvocationReports = flushInvocationReports;
|
|
5
5
|
exports.telemetryOptedOut = telemetryOptedOut;
|
|
6
|
+
exports.runningUnderTest = runningUnderTest;
|
|
6
7
|
exports.cloudGeneId = cloudGeneId;
|
|
7
8
|
exports.recordGeneInvocation = recordGeneInvocation;
|
|
8
9
|
const node_fs_1 = require("node:fs");
|
|
@@ -39,6 +40,16 @@ const auth_js_1 = require("./auth.js");
|
|
|
39
40
|
* line, because `.then` never ran. Callers that are about to exit must
|
|
40
41
|
* `await flushInvocationReports()` first. Callers that simply return need not:
|
|
41
42
|
* Node drains the pending request before the event loop empties.
|
|
43
|
+
*
|
|
44
|
+
* A fourth gate exists that users do not control: a test run reports nothing.
|
|
45
|
+
* `tests/e2e/dogfooding-pipeline.test.ts` spawns the real CLI against the
|
|
46
|
+
* repo's own Cloud-installed Genes, so on 2026-08-18 one `npm test` by a
|
|
47
|
+
* signed-in developer wrote four invocation records straight into production —
|
|
48
|
+
* source-linker twice, grammar-checker twice, timestamps two seconds apart.
|
|
49
|
+
* Those are executions, but they are not usage, and §33.4's whole purpose is to
|
|
50
|
+
* count callers who actually reached for a Gene. A metrics pipeline that
|
|
51
|
+
* manufactures its own traffic is broken in the opposite direction from the one
|
|
52
|
+
* this module was written to fix, and just as quietly.
|
|
42
53
|
*/
|
|
43
54
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
44
55
|
/** Reports still in flight. Emptied as each settles; see flushInvocationReports. */
|
|
@@ -66,6 +77,20 @@ function telemetryOptedOut() {
|
|
|
66
77
|
const flag = (process.env.ROTIFER_TELEMETRY || "").trim().toLowerCase();
|
|
67
78
|
return flag === "0" || flag === "false" || flag === "off";
|
|
68
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* True when this process is a test run (or was spawned by one — `execSync` and
|
|
82
|
+
* friends pass the environment down, which is exactly how the CLI under test
|
|
83
|
+
* inherits these).
|
|
84
|
+
*
|
|
85
|
+
* Deliberately narrow: `CI` is NOT one of these. A Gene invoked from someone's
|
|
86
|
+
* pipeline is still a caller reaching for it; a Gene invoked by a test asserting
|
|
87
|
+
* that the pipeline compiles is not.
|
|
88
|
+
*/
|
|
89
|
+
function runningUnderTest() {
|
|
90
|
+
return Boolean(process.env.VITEST ||
|
|
91
|
+
process.env.JEST_WORKER_ID ||
|
|
92
|
+
(process.env.NODE_ENV || "").trim().toLowerCase() === "test");
|
|
93
|
+
}
|
|
69
94
|
/** The Cloud id recorded when this Gene was installed, or null. */
|
|
70
95
|
function cloudGeneId(geneDir) {
|
|
71
96
|
const manifestPath = (0, node_path_1.join)(geneDir, ".cloud-manifest.json");
|
|
@@ -87,6 +112,8 @@ function cloudGeneId(geneDir) {
|
|
|
87
112
|
function recordGeneInvocation(geneDir) {
|
|
88
113
|
if (telemetryOptedOut())
|
|
89
114
|
return { reported: null, reason: "telemetry-off" };
|
|
115
|
+
if (runningUnderTest())
|
|
116
|
+
return { reported: null, reason: "test-run" };
|
|
90
117
|
const creds = (0, auth_js_1.loadCredentials)();
|
|
91
118
|
const callerId = creds?.user?.id;
|
|
92
119
|
if (!callerId)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation.js","sourceRoot":"","sources":["../../src/cloud/invocation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"invocation.js","sourceRoot":"","sources":["../../src/cloud/invocation.ts"],"names":[],"mappings":";;;AA4DA,wDASC;AAED,8CAGC;AAWD,4CAMC;AAGD,kCAUC;AAeD,oDAuCC;AA9JD,qCAAmD;AACnD,yCAAiC;AACjC,2CAA8C;AAC9C,uCAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,MAAM,OAAO,GAAG,iEAAiE,CAAC;AAElF,oFAAoF;AACpF,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAiB,CAAC;AAE1C,8EAA8E;AACjE,QAAA,gBAAgB,GAAG,IAAI,CAAC;AAErC;;;;GAIG;AACI,KAAK,UAAU,sBAAsB,CAAC,YAAoB,wBAAgB;IAC/E,IAAI,QAAQ,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO;IAChC,IAAI,KAAiC,CAAC;IACtC,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAC7C,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACvC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC,CA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jF,CAAC;IACH,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;QACtB,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAyC,GAAa,EAAE,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC;QACnG,CAAC;IACH,CAAC,CAAC;SACD,OAAO,CAAC,GAAG,EAAE;QACZ,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEL,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rotifer/playground",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Rotifer Protocol Playground — local development environment for gene development, Arena competition, and protocol simulation",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Rotifer Protocol Contributors",
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
},
|
|
85
85
|
"optionalDependencies": {
|
|
86
86
|
"@rolldown/binding-linux-x64-gnu": "1.1.1",
|
|
87
|
-
"@rotifer/playground-darwin-arm64": "0.
|
|
88
|
-
"@rotifer/playground-darwin-x64": "0.
|
|
89
|
-
"@rotifer/playground-linux-x64-gnu": "0.
|
|
90
|
-
"@rotifer/playground-win32-x64-msvc": "0.
|
|
87
|
+
"@rotifer/playground-darwin-arm64": "0.14.0",
|
|
88
|
+
"@rotifer/playground-darwin-x64": "0.14.0",
|
|
89
|
+
"@rotifer/playground-linux-x64-gnu": "0.14.0",
|
|
90
|
+
"@rotifer/playground-win32-x64-msvc": "0.14.0"
|
|
91
91
|
},
|
|
92
92
|
"engines": {
|
|
93
93
|
"node": ">=20.0.0"
|