@cursor/july 0.1.52 → 0.1.53

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.
Files changed (112) hide show
  1. package/AGENTS.md +1 -0
  2. package/README.md +4 -2
  3. package/dist/bin/agent-serve.js +2 -0
  4. package/dist/channels/slack/init.d.ts +16 -3
  5. package/dist/channels/slack/init.d.ts.map +1 -1
  6. package/dist/channels/slack/init.js +92 -18
  7. package/dist/channels/slack/manifest.d.ts +8 -0
  8. package/dist/channels/slack/manifest.d.ts.map +1 -1
  9. package/dist/channels/slack/manifest.js +17 -0
  10. package/dist/channels/slack/setup.d.ts +26 -1
  11. package/dist/channels/slack/setup.d.ts.map +1 -1
  12. package/dist/channels/slack/setup.js +107 -25
  13. package/dist/docs/404.html +3 -3
  14. package/dist/docs/ab.html +6 -6
  15. package/dist/docs/assets/{app.Cbeq6FOy.js → app.DAKcDclS.js} +1 -1
  16. package/dist/docs/assets/chunks/@localSearchIndexroot.C4uxzYEU.js +1 -0
  17. package/dist/docs/assets/chunks/{VPLocalSearchBox.Bmb8QjCI.js → VPLocalSearchBox.BNIaCSfG.js} +2 -2
  18. package/dist/docs/assets/chunks/{theme.BLNMeCRL.js → theme.B47GzJjc.js} +2 -2
  19. package/dist/docs/assets/{guides_slack.md.D2nTRu9M.js → guides_slack.md.DP4H75WP.js} +8 -6
  20. package/dist/docs/assets/guides_slack.md.DP4H75WP.lean.js +1 -0
  21. package/dist/docs/assets/{reference_cli.md.CGKfz_Yj.js → reference_cli.md.-V6J7Cl8.js} +7 -3
  22. package/dist/docs/assets/{reference_cli.md.CGKfz_Yj.lean.js → reference_cli.md.-V6J7Cl8.lean.js} +1 -1
  23. package/dist/docs/assets/{style.CK3hwt6q.css → style.kTsvp4pE.css} +1 -1
  24. package/dist/docs/assets/{troubleshooting.md.C6n3wCr6.js → troubleshooting.md.CuVztCKs.js} +1 -1
  25. package/dist/docs/building-with-agents.html +6 -6
  26. package/dist/docs/concepts.html +6 -6
  27. package/dist/docs/deployment.html +6 -6
  28. package/dist/docs/evals.html +6 -6
  29. package/dist/docs/example-agents/approval-buddy.html +6 -6
  30. package/dist/docs/example-agents/benny.html +6 -6
  31. package/dist/docs/example-agents/bugbot.html +6 -6
  32. package/dist/docs/example-agents/codebase-wiki.html +6 -6
  33. package/dist/docs/example-agents/codeowners-review.html +6 -6
  34. package/dist/docs/example-agents/concierge.html +6 -6
  35. package/dist/docs/example-agents/fsd.html +6 -6
  36. package/dist/docs/example-agents/index.html +6 -6
  37. package/dist/docs/example-agents/knowledge-base.html +6 -6
  38. package/dist/docs/example-agents/oncall.html +6 -6
  39. package/dist/docs/example-agents/security-reviewer.html +6 -6
  40. package/dist/docs/example-agents/slack-agent.html +6 -6
  41. package/dist/docs/example-agents/weather-agent.html +6 -6
  42. package/dist/docs/guides/agent-to-agent.html +6 -6
  43. package/dist/docs/guides/cloud-runtime.html +6 -6
  44. package/dist/docs/guides/github.html +6 -6
  45. package/dist/docs/guides/human-in-the-loop.html +6 -6
  46. package/dist/docs/guides/mcp-oauth.html +6 -6
  47. package/dist/docs/guides/opentelemetry.html +6 -6
  48. package/dist/docs/guides/slack.html +14 -12
  49. package/dist/docs/guides/webhooks.html +6 -6
  50. package/dist/docs/hashmap.json +1 -1
  51. package/dist/docs/hillclimbing.html +6 -6
  52. package/dist/docs/index.html +6 -6
  53. package/dist/docs/quickstart.html +6 -6
  54. package/dist/docs/reference/agent-config.html +6 -6
  55. package/dist/docs/reference/artifacts.html +6 -6
  56. package/dist/docs/reference/channels.html +6 -6
  57. package/dist/docs/reference/cli.html +13 -9
  58. package/dist/docs/reference/connections.html +6 -6
  59. package/dist/docs/reference/hooks.html +6 -6
  60. package/dist/docs/reference/http-api.html +6 -6
  61. package/dist/docs/reference/instructions.html +6 -6
  62. package/dist/docs/reference/playground.html +5 -5
  63. package/dist/docs/reference/project-layout.html +6 -6
  64. package/dist/docs/reference/prompt.html +6 -6
  65. package/dist/docs/reference/schedules.html +6 -6
  66. package/dist/docs/reference/sessions.html +6 -6
  67. package/dist/docs/reference/skills.html +6 -6
  68. package/dist/docs/reference/subagents.html +6 -6
  69. package/dist/docs/reference/tools.html +6 -6
  70. package/dist/docs/scaffolding-agents.html +5 -5
  71. package/dist/docs/storage.html +6 -6
  72. package/dist/docs/templates/triage.html +6 -6
  73. package/dist/docs/troubleshooting.html +6 -6
  74. package/dist/internal/cli-deploy.d.ts.map +1 -1
  75. package/dist/internal/cli-deploy.js +8 -18
  76. package/dist/internal/cli-slack-manual.d.ts +20 -0
  77. package/dist/internal/cli-slack-manual.d.ts.map +1 -0
  78. package/dist/internal/cli-slack-manual.js +106 -0
  79. package/dist/internal/cli-slack.d.ts +5 -2
  80. package/dist/internal/cli-slack.d.ts.map +1 -1
  81. package/dist/internal/cli-slack.js +18 -69
  82. package/dist/internal/deploy-client.d.ts +7 -10
  83. package/dist/internal/deploy-client.d.ts.map +1 -1
  84. package/dist/internal/deploy-client.js +1 -3
  85. package/dist/internal/deploy-source.d.ts +1 -1
  86. package/dist/internal/deploy-source.js +1 -1
  87. package/dist/internal/process-memory-telemetry.d.ts +3 -4
  88. package/dist/internal/process-memory-telemetry.d.ts.map +1 -1
  89. package/dist/internal/process-memory-telemetry.js +4 -17
  90. package/dist/playground/assets/{index-BKMz70wx.js → index-BHAPd9KT.js} +31 -31
  91. package/dist/playground/assets/index-DpKH0HcT.css +1 -0
  92. package/dist/playground/index.html +2 -2
  93. package/docs/guides/slack.md +52 -7
  94. package/docs/reference/cli.md +29 -6
  95. package/docs/troubleshooting.md +1 -1
  96. package/package.json +1 -1
  97. package/skills/create-agent/SKILL.md +1 -0
  98. package/skills/setup-slack/SKILL.md +99 -7
  99. package/src/bin/agent-serve.ts +2 -0
  100. package/src/channels/slack/init.ts +130 -20
  101. package/src/channels/slack/manifest.ts +27 -0
  102. package/src/channels/slack/setup.ts +124 -23
  103. package/src/internal/cli-deploy.ts +8 -22
  104. package/src/internal/cli-slack-manual.ts +127 -0
  105. package/src/internal/cli-slack.ts +18 -70
  106. package/src/internal/deploy-client.ts +8 -13
  107. package/src/internal/deploy-source.ts +1 -1
  108. package/src/internal/process-memory-telemetry.ts +5 -24
  109. package/dist/docs/assets/chunks/@localSearchIndexroot.TzAgoWLl.js +0 -1
  110. package/dist/docs/assets/guides_slack.md.D2nTRu9M.lean.js +0 -1
  111. package/dist/playground/assets/index-BmMrulSc.css +0 -1
  112. /package/dist/docs/assets/{troubleshooting.md.C6n3wCr6.lean.js → troubleshooting.md.CuVztCKs.lean.js} +0 -0
@@ -1,6 +1,7 @@
1
1
  /**
2
- * `agent-serve slack …` CLI — doctor, destroy/icon, and `create` as a
3
- * dashboard-wizard launcher (`slack-provision-client.ts`).
2
+ * `agent-serve slack …` CLI — doctor, destroy/icon, `create` as a
3
+ * dashboard-wizard launcher (`slack-provision-client.ts`), and
4
+ * `init --manual` for hand-imported manifests.
4
5
  */
5
6
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6
7
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -11,10 +12,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
12
  step((generator = generator.apply(thisArg, _arguments || [])).next());
12
13
  });
13
14
  };
14
- import { access, chmod, mkdir, readFile, writeFile } from "node:fs/promises";
15
+ import { access, chmod, readFile, writeFile } from "node:fs/promises";
15
16
  import { basename, extname, join, resolve as resolvePath } from "node:path";
16
- import { buildSlackManifestPair, envPrefixFromName, formatSlackSetupGuide, initSlackChannel, runSlackDoctor, slackEnvKeys, } from "../channels/slack/index.js";
17
+ import { envPrefixFromName, formatSlackSetupGuide, initSlackChannel, runSlackDoctor, slackEnvKeys, } from "../channels/slack/index.js";
17
18
  import { resolveDeployAuth } from "./cli-deploy.js";
19
+ import { cmdSlackInit, runSlackManifest } from "./cli-slack-manual.js";
18
20
  import { cursorExternalApiUrl } from "./cursor/credentials.js";
19
21
  import { slugFromDirectoryName } from "./deploy-client.js";
20
22
  import { inferDeployGitSource } from "./deploy-source.js";
@@ -34,6 +36,10 @@ Usage:
34
36
  [--team <id>] [--json]
35
37
  ${CLI} slack icon <URL-or-FILE> [--dir .] [--slack-team T0123ABCD]
36
38
  [--prod] [--team <id>] [--json]
39
+ ${CLI} slack init --manual [--dir .] [--name NAME]
40
+ [--prefix PREFIX | --no-prefix] [--channel-posts]
41
+ ${CLI} slack manifest --env dev|prod|both [--dir .] [--name NAME]
42
+ [--print]
37
43
  ${CLI} slack doctor [--dir .] [--prefix PREFIX | --no-prefix] [--json]
38
44
 
39
45
  create/destroy/icon — dedicated Socket Mode app via the Cursor dashboard:
@@ -47,13 +53,14 @@ create/destroy/icon — dedicated Socket Mode app via the Cursor dashboard:
47
53
  icon Set the provisioned app's icon: an https image URL or a local
48
54
  png/jpg/gif file (at most 512KB).
49
55
 
50
- \`slack init\` is removed. Use \`slack create\`. Do not paste a manifest
51
- at api.slack.com.
56
+ \`slack init\` without --manual is not the first-run path. Use \`slack create\`.
57
+ \`slack init --manual\` writes the channel file, manifests to paste at
58
+ api.slack.com, env.example, and setup-status.json.
52
59
 
53
60
  Env tokens:
54
61
  single agent: SLACK_BOT_TOKEN + SLACK_APP_TOKEN
55
62
  multi-agent: <PREFIX>_SLACK_BOT_TOKEN + <PREFIX>_SLACK_APP_TOKEN
56
- (create default PREFIX from the directory name;
63
+ (create / init --manual default PREFIX from the directory name;
57
64
  doctor defaults to it too when those keys are set)
58
65
 
59
66
  See also: skills/setup-slack/SKILL.md
@@ -79,7 +86,7 @@ export function cmdSlack(subcommand, options) {
79
86
  case "init":
80
87
  return cmdSlackInit(options);
81
88
  case "manifest":
82
- return runManifest(options);
89
+ return runSlackManifest(options);
83
90
  case "doctor":
84
91
  return runDoctor(options);
85
92
  default:
@@ -89,57 +96,6 @@ export function cmdSlack(subcommand, options) {
89
96
  }
90
97
  });
91
98
  }
92
- function cmdSlackInit(options) {
93
- return __awaiter(this, void 0, void 0, function* () {
94
- errStream(options)(`\`slack init\` is removed. Socket Mode apps are created with:
95
-
96
- ${CLI} slack create --dir .
97
-
98
- That opens the Cursor dashboard wizard. Do not paste a manifest at api.slack.com.
99
- `);
100
- return 1;
101
- });
102
- }
103
- function runManifest(options) {
104
- return __awaiter(this, void 0, void 0, function* () {
105
- var _a, _b;
106
- const env = (_a = options.env) !== null && _a !== void 0 ? _a : "both";
107
- const dir = resolvePath(options.dir);
108
- const name = (_b = options.name) !== null && _b !== void 0 ? _b : basename(dir);
109
- const pair = buildSlackManifestPair({
110
- name,
111
- managedByCursor: false,
112
- channelPosts: options.channelPosts === true ? true : undefined,
113
- });
114
- if (options.print) {
115
- if (env === "dev" || env === "both") {
116
- process.stdout.write(`${JSON.stringify(pair.dev, null, 2)}\n`);
117
- }
118
- if (env === "prod" || env === "both") {
119
- if (env === "both") {
120
- process.stdout.write("--- prod ---\n");
121
- }
122
- process.stdout.write(`${JSON.stringify(pair.prod, null, 2)}\n`);
123
- }
124
- return 0;
125
- }
126
- const outDir = join(dir, ".agent-serve/slack");
127
- yield mkdir(outDir, { recursive: true });
128
- const written = [];
129
- if (env === "dev" || env === "both") {
130
- const path = join(outDir, "manifest.dev.json");
131
- yield writeFile(path, `${JSON.stringify(pair.dev, null, 2)}\n`);
132
- written.push(path);
133
- }
134
- if (env === "prod" || env === "both") {
135
- const path = join(outDir, "manifest.prod.json");
136
- yield writeFile(path, `${JSON.stringify(pair.prod, null, 2)}\n`);
137
- written.push(path);
138
- }
139
- process.stdout.write(`${JSON.stringify({ ok: true, written }, null, 2)}\n`);
140
- return 0;
141
- });
142
- }
143
99
  function runDoctor(options) {
144
100
  return __awaiter(this, void 0, void 0, function* () {
145
101
  var _a;
@@ -335,7 +291,7 @@ export function cmdSlackCreate(options) {
335
291
  }
336
292
  let wrote;
337
293
  try {
338
- wrote = yield scaffoldSlackChannelFiles(options, target);
294
+ wrote = yield scaffoldSlackChannelFiles(target);
339
295
  }
340
296
  catch (error) {
341
297
  ctx.err(`${describeError(error)}\n`);
@@ -597,7 +553,7 @@ function formatAppList(apps) {
597
553
  * Scaffold `agent/channels/slack.ts` when absent. Existing files are
598
554
  * never overwritten: initSlackChannel writes with `wx`.
599
555
  */
600
- function scaffoldSlackChannelFiles(options, target) {
556
+ function scaffoldSlackChannelFiles(target) {
601
557
  return __awaiter(this, void 0, void 0, function* () {
602
558
  var _a;
603
559
  const channelFile = "agent/channels/slack.ts";
@@ -605,23 +561,16 @@ function scaffoldSlackChannelFiles(options, target) {
605
561
  return [];
606
562
  }
607
563
  try {
608
- // Pass the resolved name/prefix so the channel file and the env keys
609
- // share one derivation.
610
564
  const result = yield initSlackChannel({
611
565
  dir: target.dir,
612
566
  name: target.name,
613
567
  envPrefix: (_a = target.envPrefix) !== null && _a !== void 0 ? _a : "",
614
- channelPosts: options.channelPosts,
615
568
  });
616
569
  return result.files;
617
570
  }
618
571
  catch (error) {
619
572
  if (isErrnoException(error) && error.code === "EEXIST") {
620
- // The channel file is written first, so it exists by the time a
621
- // later pre-existing file aborts the scaffold.
622
- return (yield fileExists(join(target.dir, channelFile)))
623
- ? [channelFile]
624
- : [];
573
+ return [channelFile];
625
574
  }
626
575
  throw error;
627
576
  }
@@ -15,29 +15,26 @@ export type DeploymentProgress = "queued" | "preparing" | "creating" | "building
15
15
  export declare const TERMINAL_DEPLOY_STATUSES: ReadonlySet<DeploymentStatus>;
16
16
  /**
17
17
  * What gets deployed. Today the control plane builds the engine itself from
18
- * a git ref (or serves the static placeholder when no repo is given), so the
19
- * only member is the slug/git-ref shape. When artifact-based deploys ship
20
- * ("build locally + upload"), add an `{ kind: "artifact", ... }` member here
21
- * and a branch in {@link AgentServeDeployClient.deploy} — the command
22
- * surface and everything downstream stays unchanged.
18
+ * a git ref, so the only member is the slug/git-ref shape. When
19
+ * artifact-based deploys ship ("build locally + upload"), add an
20
+ * `{ kind: "artifact", ... }` member here and a branch in
21
+ * {@link AgentServeDeployClient.deploy} — the command surface and everything
22
+ * downstream stays unchanged.
23
23
  */
24
24
  export type DeploySource = {
25
25
  kind: "git-ref";
26
- /** Omit for the control-plane static engine (`static-http-200`). */
27
- gitRepoUrl?: string;
26
+ gitRepoUrl: string;
28
27
  gitRef?: string;
29
28
  agentPath?: string;
30
29
  /** Repos whose SCM events the deployed engine pulls (`owner/name`). */
31
30
  cursorEventRepos?: string[];
32
31
  /**
33
- * Egress allowlist for the engine pod. Only valid on repo-backed
34
- * deploys — the backend 400s when set on a static deploy.
32
+ * Egress allowlist for the engine pod.
35
33
  */
36
34
  egressAllowedDomains?: string[];
37
35
  /**
38
36
  * `/v1/channels/…` subtrees the stable alias serves WITHOUT
39
37
  * `X-Agent-Alias-Token` (channels authored with `publicEndpoint()`).
40
- * Only valid on repo-backed deploys.
41
38
  */
42
39
  publicRoutePaths?: string[];
43
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-client.d.ts","sourceRoot":"","sources":["../../src/internal/deploy-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,WAAW,GACX,SAAS,GACT,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf,sEAAsE;AACtE,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,CAAC;AAEf,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,gBAAgB,CAKjE,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,EAAE,C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AAC,UAAU,EAAE,CAAC,CAOxB;IAED,yDAAyD;IACnD,YAAY,CAAC,IAAI,EAAE;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB;IAED;;;;OAIG;IACG,mBAAmB,CAAC,IAAI,EAAE;QAC9B,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAOlB;IAED;;;;;OAKG;IACG,gBAAgB,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAsBxE;IAED,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEpC;IAED;;;;;OAKG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;YAEa,OAAO;CAyCtB"}
@@ -227,9 +227,7 @@ export class AgentServeDeployClient {
227
227
  }
228
228
  // Only the git-ref member exists today; a future artifact member would
229
229
  // upload the build first and post a different body from this branch.
230
- const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ teamId: args.teamId, slug: args.slug }, (args.source.gitRepoUrl === undefined
231
- ? {}
232
- : { gitRepoUrl: args.source.gitRepoUrl })), (args.source.gitRef === undefined
230
+ const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ teamId: args.teamId, slug: args.slug, gitRepoUrl: args.source.gitRepoUrl }, (args.source.gitRef === undefined
233
231
  ? {}
234
232
  : { gitRef: args.source.gitRef })), (args.source.agentPath === undefined
235
233
  ? {}
@@ -30,7 +30,7 @@ export declare function httpsGitRepoUrlFromRemote(remote: string): string | unde
30
30
  export declare function agentPathRelativeToGitRoot(dir: string, gitRoot: string): string | undefined;
31
31
  /**
32
32
  * Probe the git checkout containing `dir` for deploy source fields.
33
- * Missing pieces stay undefined (static deploy / server defaults).
33
+ * Missing pieces stay undefined.
34
34
  */
35
35
  export declare function inferDeployGitSource(dir: string, options?: {
36
36
  git?: GitRunner;
@@ -103,7 +103,7 @@ export function agentPathRelativeToGitRoot(dir, gitRoot) {
103
103
  }
104
104
  /**
105
105
  * Probe the git checkout containing `dir` for deploy source fields.
106
- * Missing pieces stay undefined (static deploy / server defaults).
106
+ * Missing pieces stay undefined.
107
107
  */
108
108
  export function inferDeployGitSource(dir, options) {
109
109
  return __awaiter(this, void 0, void 0, function* () {
@@ -8,9 +8,8 @@
8
8
  * An optional in-process sampler (`AGENT_SDK_MEMORY_METRICS=1`) still logs
9
9
  * and, if a Datadog key happens to be in the pod, posts directly.
10
10
  *
11
- * `event_log.events_retained` is the in-process cache size (the OOM
12
- * suspect). `event_log.events_total` is the durable recorded count. They
13
- * are equal today; a later consume-and-drop change should split them.
11
+ * Event-log residency is `event_log.resident_sessions` (open session
12
+ * map). Transcripts live on disk; unflushed tails are not a scrape gauge.
14
13
  */
15
14
  import type { Meter } from "@opentelemetry/api";
16
15
  import type { EventLogMemoryStats } from "./event-log.js";
@@ -55,7 +54,7 @@ export type MemoryHealthFields = {
55
54
  memory: ProcessMemorySample & {
56
55
  heapUsedRatio: number;
57
56
  };
58
- eventLog: EventLogMemoryStats;
57
+ eventLog: Pick<EventLogMemoryStats, "residentSessions">;
59
58
  };
60
59
  export declare function heapUsedRatio(memory: ProcessMemorySample): number;
61
60
  export declare function sumEventLogStats(stats: readonly EventLogMemoryStats[]): EventLogMemoryStats;
@@ -1 +1 @@
1
- {"version":3,"file":"process-memory-telemetry.d.ts","sourceRoot":"","sources":["../../src/internal/process-memory-telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAc,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAA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,CAAC;IACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC,CAyCD;AAED,kDAAkD;AAClD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,6BAA6B,GACrC,MAAM,IAAI,CAgDZ"}
1
+ {"version":3,"file":"process-memory-telemetry.d.ts","sourceRoot":"","sources":["../../src/internal/process-memory-telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAc,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAO1D,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;IAC5C,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM;QACl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AC;CACpC,GAAG,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAS7C;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,mBAAmB,CAAC;CAC/B,GAAG,MAAM,CAWT;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,KAAK,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC,CAiCD;AAED,kDAAkD;AAClD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,6BAA6B,GACrC,MAAM,IAAI,CAgDZ"}
@@ -8,9 +8,8 @@
8
8
  * An optional in-process sampler (`AGENT_SDK_MEMORY_METRICS=1`) still logs
9
9
  * and, if a Datadog key happens to be in the pod, posts directly.
10
10
  *
11
- * `event_log.events_retained` is the in-process cache size (the OOM
12
- * suspect). `event_log.events_total` is the durable recorded count. They
13
- * are equal today; a later consume-and-drop change should split them.
11
+ * Event-log residency is `event_log.resident_sessions` (open session
12
+ * map). Transcripts live on disk; unflushed tails are not a scrape gauge.
14
13
  */
15
14
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
15
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -79,7 +78,7 @@ export function sumEventLogStats(stats) {
79
78
  export function buildMemoryHealthFields(eventLog, sample = sampleProcessMemory()) {
80
79
  return {
81
80
  memory: Object.assign(Object.assign({}, sample), { heapUsedRatio: heapUsedRatio(sample) }),
82
- eventLog,
81
+ eventLog: { residentSessions: eventLog.residentSessions },
83
82
  };
84
83
  }
85
84
  /**
@@ -102,9 +101,7 @@ export function formatMemoryLogLine(args) {
102
101
  ` heap_limit_mb=${mb(args.memory.heapLimitBytes)}` +
103
102
  ` heap_used_ratio=${ratio.toFixed(3)}` +
104
103
  ` rss_mb=${mb(args.memory.rssBytes)}` +
105
- ` event_log.sessions=${args.eventLog.residentSessions}` +
106
- ` event_log.retained=${args.eventLog.eventsRetained}` +
107
- ` event_log.total=${args.eventLog.eventsTotal}`);
104
+ ` event_log.sessions=${args.eventLog.residentSessions}`);
108
105
  }
109
106
  export function buildDatadogGaugeSeries(args) {
110
107
  const tags = [`agent_sdk.agent:${sanitizeTag(args.agentName)}`];
@@ -132,14 +129,6 @@ export function buildDatadogGaugeSeries(args) {
132
129
  name: `${EVENT_LOG_METRIC_PREFIX}.resident_sessions`,
133
130
  value: args.eventLog.residentSessions,
134
131
  },
135
- {
136
- name: `${EVENT_LOG_METRIC_PREFIX}.events_retained`,
137
- value: args.eventLog.eventsRetained,
138
- },
139
- {
140
- name: `${EVENT_LOG_METRIC_PREFIX}.events_total`,
141
- value: args.eventLog.eventsTotal,
142
- },
143
132
  ];
144
133
  return points.map((point) => ({
145
134
  metric: point.name,
@@ -204,8 +193,6 @@ function recordOtel(meter, memory, eventLog, attributes) {
204
193
  histogram(meter, `${MEMORY_METRIC_PREFIX}.heap_used_bytes`).record(memory.heapUsedBytes, attributes);
205
194
  histogram(meter, `${MEMORY_METRIC_PREFIX}.heap_limit_bytes`).record(memory.heapLimitBytes, attributes);
206
195
  histogram(meter, `${MEMORY_METRIC_PREFIX}.rss_bytes`).record(memory.rssBytes, attributes);
207
- histogram(meter, `${EVENT_LOG_METRIC_PREFIX}.events_retained`).record(eventLog.eventsRetained, attributes);
208
- histogram(meter, `${EVENT_LOG_METRIC_PREFIX}.events_total`).record(eventLog.eventsTotal, attributes);
209
196
  histogram(meter, `${EVENT_LOG_METRIC_PREFIX}.resident_sessions`).record(eventLog.residentSessions, attributes);
210
197
  }
211
198
  const histograms = new WeakMap();