@glasstrace/sdk 1.10.1 → 1.11.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/README.md +43 -5
- package/dist/{chunk-WQF7ZQOM.js → chunk-DQFGNX3H.js} +13 -8
- package/dist/{chunk-WQF7ZQOM.js.map → chunk-DQFGNX3H.js.map} +1 -1
- package/dist/{chunk-UMGZJYC4.js → chunk-FQ4SEG6Y.js} +8 -3
- package/dist/chunk-FQ4SEG6Y.js.map +1 -0
- package/dist/chunk-KOYZJN6G.js +651 -0
- package/dist/chunk-KOYZJN6G.js.map +1 -0
- package/dist/{chunk-ZBQQXVHD.js → chunk-YIEXKQYP.js} +2 -67
- package/dist/chunk-YIEXKQYP.js.map +1 -0
- package/dist/cli/init.cjs +460 -127
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +29 -16
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs +346 -98
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +32 -14
- package/dist/cli/mcp-add.js.map +1 -1
- package/dist/cli/status.cjs +6 -1
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.js +7 -2
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/uninit.cjs +6 -1
- package/dist/cli/uninit.cjs.map +1 -1
- package/dist/cli/uninit.js +2 -2
- package/dist/cli/upgrade-instructions.cjs +390 -113
- package/dist/cli/upgrade-instructions.cjs.map +1 -1
- package/dist/cli/upgrade-instructions.js +70 -18
- package/dist/cli/upgrade-instructions.js.map +1 -1
- package/dist/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/node-entry.cjs +11 -6
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-TJ46YOGJ.js +0 -355
- package/dist/chunk-TJ46YOGJ.js.map +0 -1
- package/dist/chunk-UMGZJYC4.js.map +0 -1
- package/dist/chunk-ZBQQXVHD.js.map +0 -1
package/README.md
CHANGED
|
@@ -113,11 +113,49 @@ including composite invocations like `glasstrace init --yes --help`
|
|
|
113
113
|
## Refreshing agent instruction guidance
|
|
114
114
|
|
|
115
115
|
`glasstrace init` and `glasstrace mcp add` write a managed Glasstrace
|
|
116
|
-
MCP section into your project's agent instruction file
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
MCP section into your project's agent instruction file(s). Per the
|
|
117
|
+
2026 cross-tool standard governed by the Agentic AI Foundation under
|
|
118
|
+
the Linux Foundation (`agents.md`), the SDK writes:
|
|
119
|
+
|
|
120
|
+
- **`AGENTS.md`** — universal cross-tool destination. Read by Cursor,
|
|
121
|
+
Codex, Claude Code, GitHub Copilot, Devin, Windsurf, and Gemini CLI.
|
|
122
|
+
Always written.
|
|
123
|
+
- **`CLAUDE.md`** — Claude Code primary canonical destination.
|
|
124
|
+
- **`GEMINI.md`** — Gemini CLI primary canonical destination (default
|
|
125
|
+
`context.fileName`).
|
|
126
|
+
- **`.cursor/rules/glasstrace.mdc`** — Cursor canonical 2026
|
|
127
|
+
destination (Markdown-extension format with YAML frontmatter
|
|
128
|
+
`alwaysApply: true`); plus `.cursorrules` written unconditionally
|
|
129
|
+
as a transitional fallback for migration teams on mixed Cursor
|
|
130
|
+
versions.
|
|
131
|
+
- **`.windsurf/rules/glasstrace.md`** — Windsurf workspace-rules
|
|
132
|
+
directory (active first-class format per Windsurf's docs at
|
|
133
|
+
`windsurf.com/university`).
|
|
134
|
+
|
|
135
|
+
The section opens with explicit "Call Glasstrace FIRST when" / "SKIP
|
|
136
|
+
Glasstrace when" decision rules telling your AI agent **when**
|
|
137
|
+
Glasstrace MCP is worth calling and **which** tool is the cheapest
|
|
138
|
+
first call for each symptom class.
|
|
139
|
+
|
|
140
|
+
### Migration from legacy filenames
|
|
141
|
+
|
|
142
|
+
If you installed `@glasstrace/sdk` before v1.11 (Wave 18 / DISC-1782),
|
|
143
|
+
your project may have a managed Glasstrace block in legacy
|
|
144
|
+
destinations the SDK no longer writes to as primary:
|
|
145
|
+
|
|
146
|
+
- `codex.md` (Codex now reads `AGENTS.md` by default)
|
|
147
|
+
- `.windsurfrules` (Windsurf moved to `.windsurf/rules/*.md`)
|
|
148
|
+
|
|
149
|
+
Run `npx glasstrace upgrade-instructions` to migrate: the managed
|
|
150
|
+
section is created at the new canonical destination(s). The legacy
|
|
151
|
+
files are left untouched (their managed sections become stale but
|
|
152
|
+
your free-text content is preserved); copy any custom prose from the
|
|
153
|
+
legacy file to `AGENTS.md` to keep your agent's visibility into it.
|
|
154
|
+
|
|
155
|
+
If you need to roll back to a pre-v1.11 SDK, pin to `~1.10.0` in
|
|
156
|
+
`package.json`; the older SDK does not recognize `AGENTS.md` /
|
|
157
|
+
`GEMINI.md` / `.cursor/rules/` as agent-instruction targets so its
|
|
158
|
+
stale-section warning will not see them.
|
|
121
159
|
|
|
122
160
|
The managed section's start marker carries an SDK version stamp, e.g.
|
|
123
161
|
`<!-- glasstrace:mcp:start v=1.5.0 -->`. When you upgrade
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
import {
|
|
74
74
|
isEndMarkerLine,
|
|
75
75
|
parseStartMarkerLine
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-YIEXKQYP.js";
|
|
77
77
|
import {
|
|
78
78
|
__require
|
|
79
79
|
} from "./chunk-NSBPE2FW.js";
|
|
@@ -4451,9 +4451,14 @@ import * as fs2 from "node:fs";
|
|
|
4451
4451
|
import * as path2 from "node:path";
|
|
4452
4452
|
var warningEmitted = false;
|
|
4453
4453
|
var AGENT_INSTRUCTION_FILES = [
|
|
4454
|
+
"AGENTS.md",
|
|
4454
4455
|
"CLAUDE.md",
|
|
4456
|
+
"GEMINI.md",
|
|
4457
|
+
".cursor/rules/glasstrace.mdc",
|
|
4458
|
+
".windsurf/rules/glasstrace.md",
|
|
4459
|
+
".cursorrules",
|
|
4455
4460
|
"codex.md",
|
|
4456
|
-
".
|
|
4461
|
+
".windsurfrules"
|
|
4457
4462
|
];
|
|
4458
4463
|
function parseSemver(input) {
|
|
4459
4464
|
const plusIdx = input.indexOf("+");
|
|
@@ -4614,11 +4619,11 @@ function registerGlasstrace(options) {
|
|
|
4614
4619
|
setCoreState(CoreState.REGISTERING);
|
|
4615
4620
|
maybeWarnStaleAgentInstructions({
|
|
4616
4621
|
projectRoot: process.cwd(),
|
|
4617
|
-
sdkVersion: "1.
|
|
4622
|
+
sdkVersion: "1.11.0"
|
|
4618
4623
|
});
|
|
4619
4624
|
startRuntimeStateWriter({
|
|
4620
4625
|
projectRoot: process.cwd(),
|
|
4621
|
-
sdkVersion: "1.
|
|
4626
|
+
sdkVersion: "1.11.0"
|
|
4622
4627
|
});
|
|
4623
4628
|
const config = resolveConfig(options);
|
|
4624
4629
|
if (config.verbose) {
|
|
@@ -4785,8 +4790,8 @@ async function backgroundInit(config, anonKeyForInit, generation) {
|
|
|
4785
4790
|
if (config.verbose) {
|
|
4786
4791
|
console.info("[glasstrace] Background init firing.");
|
|
4787
4792
|
}
|
|
4788
|
-
const healthReport = collectHealthReport("1.
|
|
4789
|
-
const initResult = await performInit(config, anonKeyForInit, "1.
|
|
4793
|
+
const healthReport = collectHealthReport("1.11.0");
|
|
4794
|
+
const initResult = await performInit(config, anonKeyForInit, "1.11.0", healthReport);
|
|
4790
4795
|
if (generation !== registrationGeneration) return;
|
|
4791
4796
|
const currentState = getCoreState();
|
|
4792
4797
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -4809,7 +4814,7 @@ async function backgroundInit(config, anonKeyForInit, generation) {
|
|
|
4809
4814
|
}
|
|
4810
4815
|
maybeInstallConsoleCapture();
|
|
4811
4816
|
if (didLastInitSucceed()) {
|
|
4812
|
-
startHeartbeat(config, anonKeyForInit, "1.
|
|
4817
|
+
startHeartbeat(config, anonKeyForInit, "1.11.0", generation, (newApiKey, accountId) => {
|
|
4813
4818
|
setAuthState(AuthState.CLAIMING);
|
|
4814
4819
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
4815
4820
|
setResolvedApiKey(newApiKey);
|
|
@@ -5206,4 +5211,4 @@ export {
|
|
|
5206
5211
|
withGlasstraceConfig,
|
|
5207
5212
|
captureError
|
|
5208
5213
|
};
|
|
5209
|
-
//# sourceMappingURL=chunk-
|
|
5214
|
+
//# sourceMappingURL=chunk-DQFGNX3H.js.map
|