@rotifer/playground 0.22.1 → 0.23.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,21 @@ 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.23.0](https://github.com/rotifer-protocol/rotifer-playground/compare/v0.22.1...v0.23.0) (2026-08-30)
9
+
10
+
11
+ ### Features
12
+
13
+ * **invocation:** 给调用账本加渠道字段,区分 CLI 与各 MCP 宿主 ([#290](https://github.com/rotifer-protocol/rotifer-playground/issues/290)) ([a423637](https://github.com/rotifer-protocol/rotifer-playground/commit/a4236375017ea87343f0da55d15803cf7c1a39bd))
14
+ * **skills:** the fifth Skill moves in, and its gates learn to follow a field ([#293](https://github.com/rotifer-protocol/rotifer-playground/issues/293)) ([b0a4d0f](https://github.com/rotifer-protocol/rotifer-playground/commit/b0a4d0f86cb0034d869d03e0033c70340a75564c))
15
+ * **telemetry:** CLI 客户端——本地聚合、四层同意判定、首跑明示 ([#295](https://github.com/rotifer-protocol/rotifer-playground/issues/295)) ([79f877c](https://github.com/rotifer-protocol/rotifer-playground/commit/79f877ce8860b2bd0d183491e280c60f405a581f))
16
+ * **telemetry:** 匿名使用心跳表——ADR-329 D1/D2 数据层 ([#294](https://github.com/rotifer-protocol/rotifer-playground/issues/294)) ([a7dd4b3](https://github.com/rotifer-protocol/rotifer-playground/commit/a7dd4b35e0e8d4610612b64250c67992119637c3))
17
+
18
+
19
+ ### Reverts
20
+
21
+ * **skills:** rotifer-guide keeps its slug — the bare name is a package ([#299](https://github.com/rotifer-protocol/rotifer-playground/issues/299)) ([355a893](https://github.com/rotifer-protocol/rotifer-playground/commit/355a89364b8c73c2256e2f7d45912f386cc1b025))
22
+
8
23
  ## [0.22.1](https://github.com/rotifer-protocol/rotifer-playground/compare/v0.22.0...v0.22.1) (2026-08-29)
9
24
 
10
25
 
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  Development environment for the **Rotifer Protocol** — **WASM-Native, Polyglot by Design**: build genes in TypeScript / Rust / AssemblyScript / Go / C, compete in Arenas, share via Cloud, and simulate agent evolution.
11
11
 
12
- > **Status:** v0.22.x — Compute-heavy genes stopped failing on our own fuel constant. An evaluation run that dies of fuel alone now retries up a fuel ladder — wall clock and memory stay fixed, and the fuel a gene actually burns still lands in `resource_cost`, so nothing gets cheaper by being expensive — and the public run ledger records a `failure_kind`, so a reader auditing a score can tell an evaluation-resource ceiling from a gene defect. `rotifer test` climbs the same ladder, so admission and test agree about what a compute-heavy gene is. The evolve-life family, kept out of admission by the old flat budget, now passes 3/3 and is back on the board at 0.3.0 — with the particle family, all six genes this project invalidated have walked the invalidated → repaired → returned path. Hybrid genes gain a first host-function preview (`rotifer.net` / `rotifer.kv` / `rotifer.env`), nonstandard and deny-by-default: nothing is linked unless the deployer grants it and the phenotype declares it, and a `Native` module importing any of them is refused at compile time and at run time. Experimental P2P gene propagation (`rotifer network`) remains off by default (`enabled: false`) and ships with no default bootstrap peer, so you pass one explicitly (`rotifer network start -b <multiaddr>`) — there is no public network to join yet. See [CHANGELOG.md](CHANGELOG.md) for full release history. Automatic peer discovery, internet-wide reach, and L4 Collective Immunity are later milestones — see [Implementation Status](#implementation-status) below.
12
+ > **Status:** v0.23.x — Rotifer Cloud gains an anonymous usage signal, separate from and much smaller than the accountable invocation report signed-in users already opt into: no identity, on by default, answering only "was any machine active, from which channel, how many times" — a per-`(machine, day, channel)` counter, with no code, no call content, and no IP address ever stored. Every field it sends, and every way to turn it off (`rotifer telemetry off`, `ROTIFER_TELEMETRY=0`, or the cross-tool `DO_NOT_TRACK=1` — all honoured before a byte leaves the machine), is documented field-by-field in [TELEMETRY.md](TELEMETRY.md). The channel it reports — `cli` or `mcp:<host>` — is the same field the signed-in invocation report now carries too, so both signals agree on where a Gene call came from. Separately, five ClawHub Skills that used to be split across two repositories and two publish pipelines now live under one `skills/` directory, with publish gates keyed on the runtime manifest instead of a hardcoded list. See [CHANGELOG.md](CHANGELOG.md) for full release history. Automatic peer discovery, internet-wide reach, and L4 Collective Immunity are later milestones — see [Implementation Status](#implementation-status) below.
13
13
 
14
14
  ---
15
15
 
@@ -6,6 +6,14 @@ export declare const FLUSH_TIMEOUT_MS = 2000;
6
6
  * FLUSH_TIMEOUT_MS and resolves regardless.
7
7
  */
8
8
  export declare function flushInvocationReports(timeoutMs?: number): Promise<void>;
9
+ /**
10
+ * Delegates to the shared check (../telemetry/consent.js) so this and the
11
+ * anonymous heartbeat (ADR-329) can never drift apart on what "off" means.
12
+ * ADR-329's decision is explicit that ROTIFER_TELEMETRY=0 turns off both —
13
+ * a second, slightly different copy of this check here would be exactly the
14
+ * kind of silent divergence that made ADR-319's metrics pipeline sit dead
15
+ * for months without producing an error anyone could see.
16
+ */
9
17
  export declare function telemetryOptedOut(): boolean;
10
18
  /**
11
19
  * True when this process is a test run (or was spawned by one — `execSync` and
@@ -26,7 +34,28 @@ export interface InvocationReport {
26
34
  reason?: string;
27
35
  /** Resolves when the POST settles; absent when nothing was sent. */
28
36
  settled?: Promise<void>;
37
+ /** The channel attributed to this report, or null when none could be. */
38
+ channel?: string | null;
29
39
  }
40
+ /**
41
+ * Who is reporting this invocation.
42
+ *
43
+ * Defaults to `cli`, because that is what this process is. When the CLI was
44
+ * spawned by something else — today the MCP server's `run_gene`, which shells
45
+ * out rather than executing Genes itself — that parent sets
46
+ * ROTIFER_INVOCATION_CHANNEL and the run is attributed to the real entry point
47
+ * instead of to the CLI that happens to be doing the work.
48
+ *
49
+ * Why the parent tells us rather than us guessing: the alternative is
50
+ * inspecting the process tree, which differs per platform and per host, and
51
+ * would quietly mislabel every host it has not been taught about. An explicit
52
+ * handshake is either present and correct, or absent and honestly `cli`.
53
+ *
54
+ * A malformed value is dropped rather than sanitised. Silently rewriting
55
+ * `Claude Code` into `claude_code` would invent an attribution the caller
56
+ * never made; null says "not attributable", which is true and readable.
57
+ */
58
+ export declare function resolveInvocationChannel(env?: NodeJS.ProcessEnv): string | null;
30
59
  /**
31
60
  * Returns the id that was reported, or null when nothing was sent (and why,
32
61
  * for callers that want to say so). Never throws.
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"invocation.d.ts","sourceRoot":"","sources":["../../src/cloud/invocation.ts"],"names":[],"mappings":"AAqDA,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,SAAS,GAAE,MAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAShG;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;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;IACxB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAWD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,GAAG,IAAI,CAIf;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAoDtE"}
@@ -5,11 +5,13 @@ exports.flushInvocationReports = flushInvocationReports;
5
5
  exports.telemetryOptedOut = telemetryOptedOut;
6
6
  exports.runningUnderTest = runningUnderTest;
7
7
  exports.cloudGeneId = cloudGeneId;
8
+ exports.resolveInvocationChannel = resolveInvocationChannel;
8
9
  exports.recordGeneInvocation = recordGeneInvocation;
9
10
  const node_fs_1 = require("node:fs");
10
11
  const node_path_1 = require("node:path");
11
12
  const client_js_1 = require("./client.js");
12
13
  const auth_js_1 = require("./auth.js");
14
+ const consent_js_1 = require("../telemetry/consent.js");
13
15
  /**
14
16
  * Report one execution of a Cloud-installed Gene to Rotifer Cloud.
15
17
  *
@@ -73,9 +75,16 @@ async function flushInvocationReports(timeoutMs = exports.FLUSH_TIMEOUT_MS) {
73
75
  if (timer)
74
76
  clearTimeout(timer);
75
77
  }
78
+ /**
79
+ * Delegates to the shared check (../telemetry/consent.js) so this and the
80
+ * anonymous heartbeat (ADR-329) can never drift apart on what "off" means.
81
+ * ADR-329's decision is explicit that ROTIFER_TELEMETRY=0 turns off both —
82
+ * a second, slightly different copy of this check here would be exactly the
83
+ * kind of silent divergence that made ADR-319's metrics pipeline sit dead
84
+ * for months without producing an error anyone could see.
85
+ */
76
86
  function telemetryOptedOut() {
77
- const flag = (process.env.ROTIFER_TELEMETRY || "").trim().toLowerCase();
78
- return flag === "0" || flag === "false" || flag === "off";
87
+ return (0, consent_js_1.telemetryOptedOutByEnv)();
79
88
  }
80
89
  /**
81
90
  * True when this process is a test run (or was spawned by one — `execSync` and
@@ -105,6 +114,38 @@ function cloudGeneId(geneDir) {
105
114
  return null;
106
115
  }
107
116
  }
117
+ /**
118
+ * What the registry's `client_channel` column accepts: lowercase snake_case,
119
+ * optionally one colon qualifying a transport with its host. Mirrored from the
120
+ * CHECK constraint in migration 20260830000000 — kept in sync deliberately,
121
+ * because a value this side considers fine and the database rejects would fail
122
+ * the whole report, and reporting is fire-and-forget: nobody would find out.
123
+ */
124
+ const CHANNEL_RE = /^[a-z0-9_]{1,32}(:[a-z0-9_]{1,32})?$/;
125
+ /**
126
+ * Who is reporting this invocation.
127
+ *
128
+ * Defaults to `cli`, because that is what this process is. When the CLI was
129
+ * spawned by something else — today the MCP server's `run_gene`, which shells
130
+ * out rather than executing Genes itself — that parent sets
131
+ * ROTIFER_INVOCATION_CHANNEL and the run is attributed to the real entry point
132
+ * instead of to the CLI that happens to be doing the work.
133
+ *
134
+ * Why the parent tells us rather than us guessing: the alternative is
135
+ * inspecting the process tree, which differs per platform and per host, and
136
+ * would quietly mislabel every host it has not been taught about. An explicit
137
+ * handshake is either present and correct, or absent and honestly `cli`.
138
+ *
139
+ * A malformed value is dropped rather than sanitised. Silently rewriting
140
+ * `Claude Code` into `claude_code` would invent an attribution the caller
141
+ * never made; null says "not attributable", which is true and readable.
142
+ */
143
+ function resolveInvocationChannel(env = process.env) {
144
+ const declared = (env.ROTIFER_INVOCATION_CHANNEL || "").trim();
145
+ if (!declared)
146
+ return "cli";
147
+ return CHANNEL_RE.test(declared) ? declared : null;
148
+ }
108
149
  /**
109
150
  * Returns the id that was reported, or null when nothing was sent (and why,
110
151
  * for callers that want to say so). Never throws.
@@ -121,8 +162,16 @@ function recordGeneInvocation(geneDir) {
121
162
  const geneId = cloudGeneId(geneDir);
122
163
  if (!geneId)
123
164
  return { reported: null, reason: "no-cloud-identity" };
165
+ const channel = resolveInvocationChannel();
166
+ // v2 carries the channel; the original entry point is still there for
167
+ // clients that predate it, and both share one idempotency guard server-side
168
+ // (migration 20260830000000) so an MCP call reported through both is still
169
+ // one row. When the channel is unattributable we call the older function
170
+ // rather than sending an explicit null: same outcome in the ledger, and it
171
+ // keeps "no channel" from looking like a client that tried and failed.
124
172
  const config = (0, client_js_1.loadCloudConfig)();
125
- const url = `${config.endpoint.replace(/\/+$/, "")}/rest/v1/rpc/log_gene_invocation`;
173
+ const rpc = channel === null ? "log_gene_invocation" : "log_gene_invocation_v2";
174
+ const url = `${config.endpoint.replace(/\/+$/, "")}/rest/v1/rpc/${rpc}`;
126
175
  const settled = fetch(url, {
127
176
  method: "POST",
128
177
  headers: {
@@ -130,22 +179,24 @@ function recordGeneInvocation(geneDir) {
130
179
  apikey: config.anonKey,
131
180
  Authorization: `Bearer ${creds.access_token}`,
132
181
  },
133
- body: JSON.stringify({ p_gene_id: geneId, p_caller_agent_id: callerId }),
182
+ body: JSON.stringify(channel === null
183
+ ? { p_gene_id: geneId, p_caller_agent_id: callerId }
184
+ : { p_gene_id: geneId, p_caller_agent_id: callerId, p_client_channel: channel }),
134
185
  })
135
186
  .then((res) => {
136
187
  if (!res.ok && process.env.ROTIFER_DEBUG) {
137
- process.stderr.write(`[rotifer] log_gene_invocation failed (${res.status})\n`);
188
+ process.stderr.write(`[rotifer] ${rpc} failed (${res.status})\n`);
138
189
  }
139
190
  })
140
191
  .catch((err) => {
141
192
  if (process.env.ROTIFER_DEBUG) {
142
- process.stderr.write(`[rotifer] log_gene_invocation error: ${err?.message ?? err}\n`);
193
+ process.stderr.write(`[rotifer] ${rpc} error: ${err?.message ?? err}\n`);
143
194
  }
144
195
  })
145
196
  .finally(() => {
146
197
  inFlight.delete(settled);
147
198
  });
148
199
  inFlight.add(settled);
149
- return { reported: geneId, settled };
200
+ return { reported: geneId, settled, channel };
150
201
  }
151
202
  //# sourceMappingURL=invocation.js.map
@@ -1 +1 @@
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,CAAC;IACxF,IAAI,KAAK;QAAE,YAAY,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAgB,iBAAiB;IAC/B,MAAM,IA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C;AAChD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,UAAU,SAwMpB,CAAC"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,UAAU,SA8MpB,CAAC"}
@@ -42,6 +42,7 @@ const config_js_1 = require("../utils/config.js");
42
42
  const sandbox_defaults_js_1 = require("../utils/sandbox-defaults.js");
43
43
  const validate_gene_name_js_1 = require("../utils/validate-gene-name.js");
44
44
  const invocation_js_1 = require("../cloud/invocation.js");
45
+ const heartbeat_js_1 = require("../telemetry/heartbeat.js");
45
46
  const l0_gate_js_1 = require("../utils/l0-gate.js");
46
47
  exports.runCommand = new commander_1.Command("run")
47
48
  .description("Execute a single gene directly")
@@ -124,6 +125,11 @@ exports.runCommand = new commander_1.Command("run")
124
125
  // anti-manipulation metrics count on; report it (signed in + telemetry
125
126
  // on only — see cloud/invocation.ts). Success or not: it was called.
126
127
  (0, invocation_js_1.recordGeneInvocation)(geneDir);
128
+ // Separate, narrower signal: any Gene running at all, no identity
129
+ // required, on by default (ADR-329). Its own consent check —
130
+ // independent of whether recordGeneInvocation above decided to
131
+ // report anything.
132
+ (0, heartbeat_js_1.recordHeartbeat)();
127
133
  if (execResult.success) {
128
134
  display.success("Output:");
129
135
  console.log(JSON.stringify(execResult.output, null, 2));
@@ -183,6 +189,7 @@ exports.runCommand = new commander_1.Command("run")
183
189
  display.info("Running via Node.js...");
184
190
  try {
185
191
  (0, invocation_js_1.recordGeneInvocation)(geneDir);
192
+ (0, heartbeat_js_1.recordHeartbeat)();
186
193
  const mod = await import(sourcePath);
187
194
  const fn = mod.express || mod.default || mod.main;
188
195
  if (typeof fn !== "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C;QAC/C,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;YAClD,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;YACpD,IAAI,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;gBACjC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC3B,CAAC;YACD,MAAM,IAAA,sCAAsB,GAAE,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAC1E,OAAO,CAAC,IAAI,CAAC,iCAAiC,GAAG,QAAQ,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const telemetryCommand: Command;
3
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/commands/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0BpC,eAAO,MAAM,gBAAgB,SA+B1B,CAAC"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.telemetryCommand = void 0;
37
+ const commander_1 = require("commander");
38
+ const display = __importStar(require("../utils/display.js"));
39
+ const palette_js_1 = require("../utils/palette.js");
40
+ const config_js_1 = require("../telemetry/config.js");
41
+ function describeDecision(d) {
42
+ switch (d) {
43
+ case "off-env":
44
+ return "off — DO_NOT_TRACK or ROTIFER_TELEMETRY in this shell";
45
+ case "on-env":
46
+ return "on — ROTIFER_TELEMETRY in this shell";
47
+ case "off-stored":
48
+ return "off — your stored choice (rotifer telemetry off)";
49
+ case "on-stored":
50
+ return "on — your stored choice (rotifer telemetry on)";
51
+ case "on-default":
52
+ return "on — default (ADR-329); nobody has chosen otherwise yet";
53
+ }
54
+ }
55
+ exports.telemetryCommand = new commander_1.Command("telemetry")
56
+ .description("Show or change the anonymous usage heartbeat")
57
+ .action(() => {
58
+ // `rotifer telemetry` with no subcommand — same shape as `codegraph
59
+ // telemetry` with no argument, which this project measured its
60
+ // telemetry design against (ADR-329). Aliases `status`.
61
+ reportStatus();
62
+ })
63
+ .addCommand(new commander_1.Command("status")
64
+ .description("Show the current heartbeat state and why")
65
+ .action(() => reportStatus()))
66
+ .addCommand(new commander_1.Command("on")
67
+ .description("Turn the anonymous heartbeat on")
68
+ .action(() => {
69
+ const config = (0, config_js_1.setHeartbeatEnabled)(true);
70
+ display.success("Anonymous usage heartbeat: on");
71
+ display.kv("Machine ID", config.machine_id);
72
+ display.hint("No code, no identity — just \"this machine ran something today\".");
73
+ }))
74
+ .addCommand(new commander_1.Command("off")
75
+ .description("Turn the anonymous heartbeat off")
76
+ .action(() => {
77
+ (0, config_js_1.setHeartbeatEnabled)(false);
78
+ display.success("Anonymous usage heartbeat: off");
79
+ display.hint("Nothing is sent — not even an opted-out notice.");
80
+ }));
81
+ function reportStatus() {
82
+ const config = (0, config_js_1.loadOrInitHeartbeatConfig)();
83
+ const decision = (0, config_js_1.resolveHeartbeatDecision)(config);
84
+ const isEnabled = (0, config_js_1.heartbeatDecisionEnabled)(decision);
85
+ display.header("Telemetry");
86
+ display.kv("Anonymous heartbeat", isEnabled ? palette_js_1.c.success("on") : palette_js_1.c.muted("off"));
87
+ display.kv("Reason", describeDecision(decision));
88
+ display.kv("Machine ID", config.machine_id);
89
+ console.log();
90
+ display.hint("Details: https://rotifer.dev/telemetry");
91
+ display.hint("`rotifer telemetry off` / ROTIFER_TELEMETRY=0 / DO_NOT_TRACK=1 all disable it.");
92
+ }
93
+ //# sourceMappingURL=telemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/commands/telemetry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,6DAA+C;AAC/C,oDAAwC;AACxC,sDAMgC;AAEhC,SAAS,gBAAgB,CAAC,CAAoB;IAC5C,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,SAAS;YACZ,OAAO,uDAAuD,CAAC;QACjE,KAAK,QAAQ;YACX,OAAO,sCAAsC,CAAC;QAChD,KAAK,YAAY;YACf,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A,oCAAwB,EAAC,MAAM,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,IAAA,oCAAwB,EAAC,QAAQ,CAAC,CAAC;IAErD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,CAAC,cAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;IACvD,OAAO,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;AACjG,CAAC"}
package/dist/index.js CHANGED
@@ -33,6 +33,7 @@ const whoami_js_1 = require("./commands/whoami.js");
33
33
  const stats_js_1 = require("./commands/stats.js");
34
34
  const compare_js_1 = require("./commands/compare.js");
35
35
  const network_js_1 = require("./commands/network.js");
36
+ const telemetry_js_1 = require("./commands/telemetry.js");
36
37
  const vg_js_1 = require("./commands/vg.js");
37
38
  const hello_js_1 = require("./commands/hello.js");
38
39
  const self_update_js_1 = require("./commands/self-update.js");
@@ -100,6 +101,7 @@ agent.addCommand(agent_list_js_1.agentListCommand);
100
101
  agent.addCommand(agent_run_js_1.agentRunCommand);
101
102
  program.addCommand(hello_js_1.helloCommand);
102
103
  program.addCommand(network_js_1.networkCommand);
104
+ program.addCommand(telemetry_js_1.telemetryCommand);
103
105
  program.addCommand(vg_js_1.vgCommand);
104
106
  program.addCommand(self_update_js_1.selfUpdateCommand);
105
107
  program.addCommand(user_config_js_1.userConfigCommand);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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AAI,IAAI,IAAI,CAAC,MAAM;YAAE,IAAA,yCAAuB,EAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IAC5E,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACrB,CAAC;AAED,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ export type ConsentSource = "installer" | "cli" | "default-notice";
2
+ export interface HeartbeatConfig {
3
+ /** The user's stored choice. Irrelevant when an env var overrides it. */
4
+ enabled: boolean;
5
+ /** Random UUIDv4, minted once. Never derived from hardware, paths, or identity. */
6
+ machine_id: string;
7
+ consent_source: ConsentSource;
8
+ /** Gates the one-line notice — see maybeAnnounceFirstRun below. */
9
+ first_run_notice_shown: boolean;
10
+ updated_at: string;
11
+ }
12
+ /**
13
+ * Reads the stored config, minting one (with a fresh machine_id) on first
14
+ * ever call. This is the read path every reporting call goes through — it
15
+ * is cheap (one small JSON file) and idempotent, so there is no reason to
16
+ * cache it across calls within a process; a concurrent `rotifer telemetry
17
+ * off` in another terminal should be picked up by the next report, not
18
+ * shadowed by a stale in-memory copy.
19
+ */
20
+ export declare function loadOrInitHeartbeatConfig(): HeartbeatConfig;
21
+ /** Backs `rotifer telemetry on|off`. Keeps the existing machine_id. */
22
+ export declare function setHeartbeatEnabled(isEnabled: boolean): HeartbeatConfig;
23
+ export declare function resetHeartbeatIdentity(): void;
24
+ export type HeartbeatDecision = "off-env" | "on-env" | "off-stored" | "on-stored" | "on-default";
25
+ /**
26
+ * Resolution order, mirrored in TELEMETRY.md and kept in sync deliberately:
27
+ * DO_NOT_TRACK / ROTIFER_TELEMETRY (env, either direction) > stored choice
28
+ * > default on.
29
+ *
30
+ * The heartbeat's default is the opposite of gene_invocation_log's
31
+ * (ADR-316 D1 default-off) on purpose — see the migration header on
32
+ * usage_heartbeat for why: this table carries no per-row accountability to
33
+ * protect, and default-off here would just reproduce the blind spot
34
+ * ADR-329 exists to close.
35
+ */
36
+ export declare function resolveHeartbeatDecision(config: HeartbeatConfig, env?: NodeJS.ProcessEnv): HeartbeatDecision;
37
+ export declare function heartbeatDecisionEnabled(d: HeartbeatDecision): boolean;
38
+ /**
39
+ * Marks the first-run notice as shown and persists it — separated from
40
+ * printing the notice itself (in heartbeat.ts) so the persistence, which
41
+ * must happen exactly once and survive even if the network call that
42
+ * follows fails, is not tangled up with I/O to stderr.
43
+ */
44
+ export declare function markFirstRunNoticeShown(config: HeartbeatConfig): void;
45
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/telemetry/config.ts"],"names":[],"mappings":"AA8BA,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,KAAK,GAAG,gBAAgB,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B,yEAAyE;IACzE,OAAO,EAAE,OAAO,CAAC;IACjB,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,aAAa,CAAC;IAC9B,mEAAmE;IACnE,sBAAsB,EAAE,OAAO,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB;AAmCD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,eAAe,CAa3D;AAED,uEAAuE;AACvE,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,OAAO,GAAG,eAAe,CAavE;AAED,wBAAgB,sBAAsB,IAAI,IAAI,CAQ7C;AAED,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,YAAY,CAAC;AAEjB;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,eAAe,EACvB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,iBAAiB,CAKnB;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAGrE"}
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadOrInitHeartbeatConfig = loadOrInitHeartbeatConfig;
4
+ exports.setHeartbeatEnabled = setHeartbeatEnabled;
5
+ exports.resetHeartbeatIdentity = resetHeartbeatIdentity;
6
+ exports.resolveHeartbeatDecision = resolveHeartbeatDecision;
7
+ exports.heartbeatDecisionEnabled = heartbeatDecisionEnabled;
8
+ exports.markFirstRunNoticeShown = markFirstRunNoticeShown;
9
+ /**
10
+ * Storage and consent state for the anonymous usage heartbeat (ADR-329).
11
+ *
12
+ * Lives in ~/.rotifer/telemetry.json, the same directory (and the same
13
+ * private-mode convention — see private-fs.ts) as credentials.json and
14
+ * cloud.json. Deliberately the same shape as codegraph's
15
+ * ~/.codegraph/telemetry.json (ADR-329's Context section names it as the
16
+ * design this is measured against): `enabled`, `machine_id`,
17
+ * `consent_source`, `first_run_notice_shown`, `updated_at`.
18
+ *
19
+ * This file is shared, in practice, with rotifer-mcp-server: both processes
20
+ * read and write ~/.rotifer/telemetry.json on the same machine, so a
21
+ * machine_id minted by one is picked up by the other rather than each
22
+ * inventing its own. mcp-server carries its own copy of this module (no
23
+ * cross-package import — they are separate npm packages) but the on-disk
24
+ * shape must stay identical, or one process's write would look like
25
+ * corruption to the other's reader.
26
+ */
27
+ const node_fs_1 = require("node:fs");
28
+ const node_path_1 = require("node:path");
29
+ const node_crypto_1 = require("node:crypto");
30
+ const private_fs_js_1 = require("../utils/private-fs.js");
31
+ const consent_js_1 = require("./consent.js");
32
+ const ROTIFER_HOME = (0, node_path_1.join)(process.env.HOME || process.env.USERPROFILE || "/tmp", ".rotifer");
33
+ const TELEMETRY_CONFIG_FILE = "telemetry.json";
34
+ function telemetryConfigPath() {
35
+ return (0, node_path_1.join)(ROTIFER_HOME, TELEMETRY_CONFIG_FILE);
36
+ }
37
+ function readStoredConfig() {
38
+ const p = telemetryConfigPath();
39
+ if (!(0, node_fs_1.existsSync)(p))
40
+ return null;
41
+ try {
42
+ const parsed = JSON.parse((0, node_fs_1.readFileSync)(p, "utf-8"));
43
+ if (typeof parsed.machine_id !== "string" || !parsed.machine_id)
44
+ return null;
45
+ return {
46
+ enabled: parsed.enabled !== false,
47
+ machine_id: parsed.machine_id,
48
+ consent_source: parsed.consent_source ?? "default-notice",
49
+ first_run_notice_shown: parsed.first_run_notice_shown === true,
50
+ updated_at: parsed.updated_at ?? new Date(0).toISOString(),
51
+ };
52
+ }
53
+ catch {
54
+ // A corrupt file is treated the same as a missing one: a fresh
55
+ // machine_id is minted below. Losing continuity on a corrupt file is a
56
+ // acceptable one-time cost; refusing to run telemetry at all until a
57
+ // human fixes the file is not — this is opt-out telemetry, not a wallet.
58
+ return null;
59
+ }
60
+ }
61
+ function writeStoredConfig(config) {
62
+ (0, private_fs_js_1.ensurePrivateDir)(ROTIFER_HOME);
63
+ const p = telemetryConfigPath();
64
+ (0, node_fs_1.writeFileSync)(p, JSON.stringify(config, null, 2) + "\n", { mode: 0o600 });
65
+ (0, private_fs_js_1.tightenPrivateFile)(p);
66
+ }
67
+ /**
68
+ * Reads the stored config, minting one (with a fresh machine_id) on first
69
+ * ever call. This is the read path every reporting call goes through — it
70
+ * is cheap (one small JSON file) and idempotent, so there is no reason to
71
+ * cache it across calls within a process; a concurrent `rotifer telemetry
72
+ * off` in another terminal should be picked up by the next report, not
73
+ * shadowed by a stale in-memory copy.
74
+ */
75
+ function loadOrInitHeartbeatConfig() {
76
+ const existing = readStoredConfig();
77
+ if (existing)
78
+ return existing;
79
+ const fresh = {
80
+ enabled: true,
81
+ machine_id: (0, node_crypto_1.randomUUID)(),
82
+ consent_source: "default-notice",
83
+ first_run_notice_shown: false,
84
+ updated_at: new Date().toISOString(),
85
+ };
86
+ writeStoredConfig(fresh);
87
+ return fresh;
88
+ }
89
+ /** Backs `rotifer telemetry on|off`. Keeps the existing machine_id. */
90
+ function setHeartbeatEnabled(isEnabled) {
91
+ const current = loadOrInitHeartbeatConfig();
92
+ const updated = {
93
+ ...current,
94
+ enabled: isEnabled,
95
+ consent_source: "cli",
96
+ // Explicitly setting the choice via the CLI counts as having seen
97
+ // whatever notice there was to see — this must not print again.
98
+ first_run_notice_shown: true,
99
+ updated_at: new Date().toISOString(),
100
+ };
101
+ writeStoredConfig(updated);
102
+ return updated;
103
+ }
104
+ function resetHeartbeatIdentity() {
105
+ const p = telemetryConfigPath();
106
+ if ((0, node_fs_1.existsSync)(p)) {
107
+ (0, node_fs_1.writeFileSync)(p, "", { mode: 0o600 });
108
+ }
109
+ // Deleting would also work; overwriting with an empty file and letting the
110
+ // next loadOrInitHeartbeatConfig() call treat it as corrupt-and-remint is
111
+ // simpler than importing unlinkSync for a rarely-used reset path.
112
+ }
113
+ /**
114
+ * Resolution order, mirrored in TELEMETRY.md and kept in sync deliberately:
115
+ * DO_NOT_TRACK / ROTIFER_TELEMETRY (env, either direction) > stored choice
116
+ * > default on.
117
+ *
118
+ * The heartbeat's default is the opposite of gene_invocation_log's
119
+ * (ADR-316 D1 default-off) on purpose — see the migration header on
120
+ * usage_heartbeat for why: this table carries no per-row accountability to
121
+ * protect, and default-off here would just reproduce the blind spot
122
+ * ADR-329 exists to close.
123
+ */
124
+ function resolveHeartbeatDecision(config, env = process.env) {
125
+ if ((0, consent_js_1.telemetryOptedOutByEnv)(env))
126
+ return "off-env";
127
+ if ((0, consent_js_1.telemetryExplicitlyOnByEnv)(env))
128
+ return "on-env";
129
+ if (!config.enabled)
130
+ return "off-stored";
131
+ return config.consent_source === "default-notice" ? "on-default" : "on-stored";
132
+ }
133
+ function heartbeatDecisionEnabled(d) {
134
+ return d === "on-env" || d === "on-stored" || d === "on-default";
135
+ }
136
+ /**
137
+ * Marks the first-run notice as shown and persists it — separated from
138
+ * printing the notice itself (in heartbeat.ts) so the persistence, which
139
+ * must happen exactly once and survive even if the network call that
140
+ * follows fails, is not tangled up with I/O to stderr.
141
+ */
142
+ function markFirstRunNoticeShown(config) {
143
+ if (config.first_run_notice_shown)
144
+ return;
145
+ writeStoredConfig({ ...config, first_run_notice_shown: true, updated_at: new Date().toISOString() });
146
+ }
147
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/telemetry/config.ts"],"names":[],"mappings":";;AAoFA,8DAaC;AAGD,kDAaC;AAED,wDAQC;AAoBD,4DAQC;AAED,4DAEC;AAQD,0DAGC;AAtKD;;;;;;;;;;;;;;;;;GAiBG;AACH,qCAAkE;AAClE,yCAAiC;AACjC,6CAAyC;AACzC,0DAA8E;AAC9E,6CAAkF;AAElF,MAAM,YAAY,GAAG,IAAA,gBAAI,EACvB,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,MAAM,EACrD,UAAU,CACX,CAAC;AACF,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAe/C,SAAS,mBAAmB;IAC1B,OAAO,IAAA,gBAAI,EAAC,YAAY,EAAE,qBAAqB,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,gBAAgB;IACvB,MAAM,CAAC,GAAG,mBAAmB,EAAE,CAAC;IAChC,IAAI,CAAC,IAAA,oBAAU,EAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,CAAC,EAAE,OAAO,CAAC,CAA6B,CAAC;QAChF,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAC7E,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,OAAO,KAAK,KAAK;YACjC,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,cAAc,EAAE,MAAM,CAAC,cAAc,IAAI,gBAAgB;YACzD,sBAAsB,EAAE,MAAM,CAAC,sB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
+ /**
2
+ * The one environment-variable check both telemetry paths share.
3
+ *
4
+ * ADR-329's decision is explicit: "ROTIFER_TELEMETRY=0 同时关闭匿名信号与
5
+ * 登录上报——「关掉」意味着全部,与 316 的语义一致." Before this module
6
+ * existed, `ROTIFER_TELEMETRY` was checked in exactly one place
7
+ * (cloud/invocation.ts, for the signed-in Gene invocation report). Adding
8
+ * the anonymous heartbeat with its own copy of that check would have been
9
+ * the easy path and the wrong one: two copies of "is telemetry off" drift
10
+ * the moment either one changes, and the failure mode is silent — a user
11
+ * who set ROTIFER_TELEMETRY=0 expecting it to mean everything would keep
12
+ * being counted by whichever path didn't get updated.
13
+ *
14
+ * DO_NOT_TRACK is the cross-tool convention (https://consoledonottrack.com/)
15
+ * and is new here — ADR-316 predates it. It outranks ROTIFER_TELEMETRY
16
+ * because it is a stance the user took before ever hearing of this project.
17
+ */
18
+ export declare function telemetryOptedOutByEnv(env?: NodeJS.ProcessEnv): boolean;
19
+ /**
20
+ * True when the environment explicitly asked for telemetry (as opposed to
21
+ * "unset, so whatever the default is"). Distinguishing "explicitly on" from
22
+ * "unset" matters for the heartbeat: an explicit ROTIFER_TELEMETRY=1 should
23
+ * win even over a stored "disabled" choice, the same way `codegraph
24
+ * TELEMETRY=1` does — a per-shell override should not require first running
25
+ * a separate command to change stored state.
26
+ */
27
+ export declare function telemetryExplicitlyOnByEnv(env?: NodeJS.ProcessEnv): boolean;
28
+ //# sourceMappingURL=consent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../../src/telemetry/consent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAMpF;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAIxF"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.telemetryOptedOutByEnv = telemetryOptedOutByEnv;
4
+ exports.telemetryExplicitlyOnByEnv = telemetryExplicitlyOnByEnv;
5
+ /**
6
+ * The one environment-variable check both telemetry paths share.
7
+ *
8
+ * ADR-329's decision is explicit: "ROTIFER_TELEMETRY=0 同时关闭匿名信号与
9
+ * 登录上报——「关掉」意味着全部,与 316 的语义一致." Before this module
10
+ * existed, `ROTIFER_TELEMETRY` was checked in exactly one place
11
+ * (cloud/invocation.ts, for the signed-in Gene invocation report). Adding
12
+ * the anonymous heartbeat with its own copy of that check would have been
13
+ * the easy path and the wrong one: two copies of "is telemetry off" drift
14
+ * the moment either one changes, and the failure mode is silent — a user
15
+ * who set ROTIFER_TELEMETRY=0 expecting it to mean everything would keep
16
+ * being counted by whichever path didn't get updated.
17
+ *
18
+ * DO_NOT_TRACK is the cross-tool convention (https://consoledonottrack.com/)
19
+ * and is new here — ADR-316 predates it. It outranks ROTIFER_TELEMETRY
20
+ * because it is a stance the user took before ever hearing of this project.
21
+ */
22
+ function telemetryOptedOutByEnv(env = process.env) {
23
+ const dnt = (env.DO_NOT_TRACK || "").trim().toLowerCase();
24
+ if (dnt !== "" && dnt !== "0" && dnt !== "false")
25
+ return true;
26
+ const flag = (env.ROTIFER_TELEMETRY || "").trim().toLowerCase();
27
+ return flag === "0" || flag === "false" || flag === "off";
28
+ }
29
+ /**
30
+ * True when the environment explicitly asked for telemetry (as opposed to
31
+ * "unset, so whatever the default is"). Distinguishing "explicitly on" from
32
+ * "unset" matters for the heartbeat: an explicit ROTIFER_TELEMETRY=1 should
33
+ * win even over a stored "disabled" choice, the same way `codegraph
34
+ * TELEMETRY=1` does — a per-shell override should not require first running
35
+ * a separate command to change stored state.
36
+ */
37
+ function telemetryExplicitlyOnByEnv(env = process.env) {
38
+ if (telemetryOptedOutByEnv(env))
39
+ return false;
40
+ const flag = (env.ROTIFER_TELEMETRY || "").trim().toLowerCase();
41
+ return flag !== "" && flag !== "0" && flag !== "false" && flag !== "off";
42
+ }
43
+ //# sourceMappingURL=consent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent.js","sourceRoot":"","sources":["../../src/telemetry/consent.ts"],"names":[],"mappings":";;AAiBA,wDAMC;AAUD,gEAIC;AArCD;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,sBAAsB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACzE,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC1D,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC;IAE9D,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAChE,OAAO,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,KAAK,CAAC;AAC5D,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,0BAA0B,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC7E,IAAI,sBAAsB,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAChE,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,KAAK,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Reports one Gene invocation's worth of activity for this machine, today,
3
+ * on the given channel. Fire-and-forget; every failure mode is silence,
4
+ * same contract as recordGeneInvocation. Safe to call unconditionally from
5
+ * every call site that already calls recordGeneInvocation — this function
6
+ * does its own consent and test-run checks.
7
+ */
8
+ export declare function recordHeartbeat(): void;
9
+ //# sourceMappingURL=heartbeat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heartbeat.d.ts","sourceRoot":"","sources":["../../src/telemetry/heartbeat.ts"],"names":[],"mappings":"AA2DA;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,IAAI,CA6DtC"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.recordHeartbeat = recordHeartbeat;
4
+ /**
5
+ * Anonymous usage heartbeat (ADR-329).
6
+ *
7
+ * Answers a narrower question than gene_invocation_log: not "who called
8
+ * what", just "did this machine run something today, and through which
9
+ * channel". No identity, on by default, and — unlike the invocation report
10
+ * — it costs nothing to lose one. It is not §33.4 input; a dropped
11
+ * heartbeat is not a hole in an audited ledger, it is one machine's "active
12
+ * today" signal that will show up again tomorrow if the machine is still in
13
+ * use. That is why this file, unlike cloud/invocation.ts, does not track
14
+ * in-flight requests for a caller to await before process.exit() — the
15
+ * reliability engineering that report needs would be pure overhead here.
16
+ */
17
+ const node_fs_1 = require("node:fs");
18
+ const node_path_1 = require("node:path");
19
+ const client_js_1 = require("../cloud/client.js");
20
+ const invocation_js_1 = require("../cloud/invocation.js");
21
+ const config_js_1 = require("./config.js");
22
+ // __dirname is CommonJS's own global here (see tsconfig's "module": "NodeNext"
23
+ // targeting CJS output) — no fileURLToPath(import.meta.url) needed, and that
24
+ // ESM-only syntax would fail to compile in this build target anyway.
25
+ let cachedVersion = null;
26
+ function packageVersion() {
27
+ if (cachedVersion !== null)
28
+ return cachedVersion;
29
+ try {
30
+ const pkg = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(__dirname, "..", "..", "package.json"), "utf-8"));
31
+ cachedVersion = typeof pkg.version === "string" ? pkg.version : null;
32
+ }
33
+ catch {
34
+ cachedVersion = null;
35
+ }
36
+ return cachedVersion;
37
+ }
38
+ /**
39
+ * The one-line disclosure, printed to stderr exactly once, before the first
40
+ * heartbeat this machine ever actually sends — never before, so a machine
41
+ * whose heartbeat is off (env or stored choice) never sees a notice about
42
+ * data that is never leaving it. Mirrors codegraph's wording pattern
43
+ * (ADR-329 measured its design against codegraph's, verified against its
44
+ * compiled output) but says MCP explicitly, because stderr is where CLI
45
+ * users look and exactly where MCP hosts do not — the MCP side of this
46
+ * (rotifer-mcp-server) carries the notice in a tool response instead, for
47
+ * that reason.
48
+ */
49
+ function printFirstRunNotice() {
50
+ process.stderr.write("[rotifer] Anonymous usage heartbeat is on by default — no code, no identity, just " +
51
+ "\"this machine ran something today\". `rotifer telemetry off`, ROTIFER_TELEMETRY=0, " +
52
+ "or DO_NOT_TRACK=1 disables it. Details: https://rotifer.dev/telemetry\n");
53
+ }
54
+ /**
55
+ * Reports one Gene invocation's worth of activity for this machine, today,
56
+ * on the given channel. Fire-and-forget; every failure mode is silence,
57
+ * same contract as recordGeneInvocation. Safe to call unconditionally from
58
+ * every call site that already calls recordGeneInvocation — this function
59
+ * does its own consent and test-run checks.
60
+ */
61
+ function recordHeartbeat() {
62
+ // The whole body is one try/catch, deliberately wider than the network
63
+ // call. loadOrInitHeartbeatConfig()/markFirstRunNoticeShown() write to
64
+ // ~/.rotifer/telemetry.json — config.ts does not swallow that failure
65
+ // (rotifer telemetry on/off should surface a write error to the user who
66
+ // ran it), but a Gene execution silently failing because this
67
+ // fire-and-forget signal couldn't touch the filesystem would be a much
68
+ // worse trade. Every failure mode here is silence, same contract as the
69
+ // network call below.
70
+ try {
71
+ if ((0, invocation_js_1.runningUnderTest)())
72
+ return;
73
+ const channel = (0, invocation_js_1.resolveInvocationChannel)();
74
+ if (channel === null)
75
+ return; // unattributable declared channel — see resolveInvocationChannel
76
+ const config = (0, config_js_1.loadOrInitHeartbeatConfig)();
77
+ const decision = (0, config_js_1.resolveHeartbeatDecision)(config);
78
+ if (!(0, config_js_1.heartbeatDecisionEnabled)(decision))
79
+ return;
80
+ // Only reached once we know a report is actually about to leave the
81
+ // process — see printFirstRunNotice's doc comment for why the ordering
82
+ // matters. Persisted synchronously so a crash in the fetch below can
83
+ // never cause the notice to reprint on the next run.
84
+ if (!config.first_run_notice_shown) {
85
+ printFirstRunNotice();
86
+ (0, config_js_1.markFirstRunNoticeShown)(config);
87
+ }
88
+ const cloudConfig = (0, client_js_1.loadCloudConfig)();
89
+ const url = `${cloudConfig.endpoint.replace(/\/+$/, "")}/rest/v1/rpc/record_heartbeat`;
90
+ // No Authorization header: record_heartbeat is anon-callable by design
91
+ // (migration 20260830010000) — that grant is the entire point of ADR-329.
92
+ // Sending credentials here would be pointless (the RPC does not use them)
93
+ // and would defeat the "no identity" promise for a user who happens to be
94
+ // signed in but has not opted into the signed-in invocation report.
95
+ fetch(url, {
96
+ method: "POST",
97
+ headers: { "Content-Type": "application/json", apikey: cloudConfig.anonKey },
98
+ body: JSON.stringify({
99
+ p_machine_id: config.machine_id,
100
+ p_channel: channel,
101
+ p_client_version: packageVersion(),
102
+ p_invocation_delta: 1,
103
+ }),
104
+ })
105
+ .then((res) => {
106
+ if (!res.ok && process.env.ROTIFER_DEBUG) {
107
+ process.stderr.write(`[rotifer] record_heartbeat failed (${res.status})\n`);
108
+ }
109
+ })
110
+ .catch((err) => {
111
+ if (process.env.ROTIFER_DEBUG) {
112
+ process.stderr.write(`[rotifer] record_heartbeat error: ${err?.message ?? err}\n`);
113
+ }
114
+ });
115
+ }
116
+ catch (err) {
117
+ if (process.env.ROTIFER_DEBUG) {
118
+ process.stderr.write(`[rotifer] record_heartbeat setup error: ${err?.message ?? err}\n`);
119
+ }
120
+ }
121
+ }
122
+ //# sourceMappingURL=heartbeat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heartbeat.js","sourceRoot":"","sources":["../../src/telemetry/heartbeat.ts"],"names":[],"mappings":";;AAkEA,0CA6DC;AA/HD;;;;;;;;;;;;GAYG;AACH,qCAAuC;AACvC,yCAAiC;AACjC,kDAAqD;AACrD,0DAAoF;A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AAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,2CAA4C,GAAa,EAAE,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC;QACtG,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"run-logger.d.ts","sourceRoot":"","sources":["../../src/utils/run-logger.ts"],"names":[],"mappings":"AASA,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAsC9D;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAiB3D"}
1
+ {"version":3,"file":"run-logger.d.ts","sourceRoot":"","sources":["../../src/utils/run-logger.ts"],"names":[],"mappings":"AAUA,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAkD9D;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAiB3D"}
@@ -8,9 +8,21 @@ const node_path_1 = require("node:path");
8
8
  const node_os_1 = require("node:os");
9
9
  const private_fs_js_1 = require("./private-fs.js");
10
10
  const invocation_js_1 = require("../cloud/invocation.js");
11
+ const heartbeat_js_1 = require("../telemetry/heartbeat.js");
11
12
  const MAX_LOG_SIZE = 10 * 1024 * 1024; // 10MB rotation
12
13
  const LOG_DIR = (0, node_path_1.join)((0, node_os_1.homedir)(), ".rotifer", "run-logs");
13
14
  function logGeneExecution(meta) {
15
+ // Unconditional — unlike the recordGeneInvocation call below this one,
16
+ // which only fires when meta.geneDir names a Cloud-installed Gene. The
17
+ // heartbeat (ADR-329) doesn't need a resolvable Cloud identity: "this
18
+ // machine ran something today" is true whether meta.geneDir is set,
19
+ // unset, or points at a local, never-published Gene. Gating it on the
20
+ // same condition as the identity-carrying report would silently drop the
21
+ // heartbeat for exactly the callers (locally-authored Genes, composed
22
+ // agents without one obvious geneDir) that most need the anonymous signal
23
+ // to be counted at all. No try/catch needed here — recordHeartbeat()
24
+ // guarantees it never throws.
25
+ (0, heartbeat_js_1.recordHeartbeat)();
14
26
  try {
15
27
  (0, private_fs_js_1.ensurePrivateDir)(LOG_DIR);
16
28
  const logFile = (0, node_path_1.join)(LOG_DIR, `${meta.geneName}.jsonl`);
@@ -1 +1 @@
1
- {"version":3,"file":"run-logger.js","sourceRoot":"","sources":["../../src/utils/run-logger.ts"],"names":[],"mappings":";;AA0BA,4CAsCC;AAED,8BAEC;AAaD,kCAiBC;AAlGD,qCAA2E;AAC3E,yCAAiC;AACjC,qCAAkC;AAClC,mDAAuE;AACvE,0DAA8D;AAE9D,MAAM,YAAY,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,gBAAgB;AACvD,MAAM,OAAO,GAAG,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAmBxD,SAAgB,gBAAgB,CAAC,IAAuB;IACtD,IAAI,CAAC;QACH,IAAA,gCAAgB,EAAC,OAAO,CAAC,CAAC;QAE1B,MAAM,OAAO,GAAG,IAAA,gBAAI,EAAC,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,QAAQ,CAAC,CAAC;QAExD,IAAI,IAAA,oBAAU,EAAC,OAAO,CAAC,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,IAAA,kBAAQ,EAAC,OAAO,CAAC,CAAC;YAChC,IAAI,KAAK,CAAC,IAAI,GAAG,YAAY,EAAE,CAAC;gBAC9B,MAAM,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;gBACjC,IAAI,CAAC;oBAAC,IAAA,oBAAU,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBAAC,CAAC;gBAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;QAED,MAAM,KAAK,GAAG;YACZ,MAAM,E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AM,OAAO,GAAG,IAAA,gBAAI,EAAC,OAAO,EAAE,GAAG,QAAQ,QAAQ,CAAC,CAAC;IACnD,IAAI,CAAC,IAAA,oBAAU,EAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpC,IAAI,CAAC;QACH,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO,OAAO;aACX,KAAK,CAAC,IAAI,CAAC;aACX,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;aACrC,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE;YACpB,IAAI,CAAC;gBAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC;gBAAC,OAAO,IAAI,CAAC;YAAC,CAAC;QACzD,CAAC,CAAC;aACD,MAAM,CAAC,OAAO,CAAkB,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rotifer/playground",
3
- "version": "0.22.1",
3
+ "version": "0.23.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",
@@ -87,10 +87,10 @@
87
87
  },
88
88
  "optionalDependencies": {
89
89
  "@rolldown/binding-linux-x64-gnu": "1.1.1",
90
- "@rotifer/playground-darwin-arm64": "0.22.1",
91
- "@rotifer/playground-darwin-x64": "0.22.1",
92
- "@rotifer/playground-linux-x64-gnu": "0.22.1",
93
- "@rotifer/playground-win32-x64-msvc": "0.22.1"
90
+ "@rotifer/playground-darwin-arm64": "0.23.0",
91
+ "@rotifer/playground-darwin-x64": "0.23.0",
92
+ "@rotifer/playground-linux-x64-gnu": "0.23.0",
93
+ "@rotifer/playground-win32-x64-msvc": "0.23.0"
94
94
  },
95
95
  "engines": {
96
96
  "node": ">=22.18.0"