@creator-notes/cnotes 0.103.5 → 0.104.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/cn.js +0 -1
- package/dist/commands/auth-keys.js +0 -1
- package/dist/commands/auth.js +0 -1
- package/dist/commands/brief.js +0 -1
- package/dist/commands/canvas-milestone.js +0 -1
- package/dist/commands/canvas.js +52 -4
- package/dist/commands/claude-hook.js +0 -1
- package/dist/commands/config.js +0 -1
- package/dist/commands/deps.js +0 -1
- package/dist/commands/draft.js +0 -37
- package/dist/commands/feedback.js +0 -1
- package/dist/commands/files.js +0 -1
- package/dist/commands/focus.js +0 -1
- package/dist/commands/goals.js +0 -1
- package/dist/commands/init.js +4 -2
- package/dist/commands/mcp.js +0 -1
- package/dist/commands/notes.js +7 -4
- package/dist/commands/operations.js +2 -3
- package/dist/commands/quality.js +0 -1
- package/dist/commands/relationships.js +0 -1
- package/dist/commands/review.js +0 -1
- package/dist/commands/schema.js +0 -1
- package/dist/commands/search.js +0 -1
- package/dist/commands/shared.js +0 -1
- package/dist/commands/skills.js +0 -1
- package/dist/commands/theme.js +0 -1
- package/dist/commands/timeline.js +0 -1
- package/dist/commands/types.js +0 -1
- package/dist/commands/upgrade.js +0 -1
- package/dist/commands/versions.js +3 -3
- package/dist/commands/workspace.js +1 -2
- package/dist/generated/embedded-build.js +0 -1
- package/dist/lib/active-run.js +0 -1
- package/dist/lib/agent-client.js +0 -1
- package/dist/lib/agent-grade.js +0 -1
- package/dist/lib/api-client.js +16 -5
- package/dist/lib/auth-store.js +0 -1
- package/dist/lib/billing-block.js +0 -1
- package/dist/lib/brand.js +0 -1
- package/dist/lib/build-schema.js +2 -3
- package/dist/lib/canvas-goal.js +0 -1
- package/dist/lib/canvas-layout.js +0 -1
- package/dist/lib/canvas-paths.js +0 -1
- package/dist/lib/claude-session.js +105 -9
- package/dist/lib/config.js +0 -1
- package/dist/lib/decision-citation.js +0 -1
- package/dist/lib/display-id.js +0 -1
- package/dist/lib/draft-ref.js +0 -1
- package/dist/lib/draft-view.js +0 -1
- package/dist/lib/errors.js +37 -6
- package/dist/lib/expand-notes.js +0 -1
- package/dist/lib/focus-time.js +0 -1
- package/dist/lib/fs-utils.js +0 -1
- package/dist/lib/goal-tree.js +0 -1
- package/dist/lib/headline-warnings.js +0 -1
- package/dist/lib/install-hook.js +0 -1
- package/dist/lib/install-mcp.js +0 -1
- package/dist/lib/install-skill.js +0 -1
- package/dist/lib/mcp-local-file.js +0 -1
- package/dist/lib/mention-lint.js +0 -1
- package/dist/lib/milestone-message.js +0 -1
- package/dist/lib/output.js +0 -1
- package/dist/lib/quality.js +0 -1
- package/dist/lib/resolve-note.js +0 -1
- package/dist/lib/review-helpers.js +0 -1
- package/dist/lib/rubric-sections.js +0 -1
- package/dist/lib/rubrics.js +0 -1
- package/dist/lib/runtime.js +0 -1
- package/dist/lib/server-url.js +0 -1
- package/dist/lib/session-brief.js +0 -1
- package/dist/lib/share-link.js +0 -1
- package/dist/lib/shared-rows.js +0 -1
- package/dist/lib/stdin.js +0 -1
- package/dist/lib/storage-id.js +0 -1
- package/dist/lib/style.js +0 -1
- package/dist/lib/superseded-by.js +0 -1
- package/dist/lib/themes.js +0 -1
- package/dist/lib/urls.js +0 -1
- package/dist/mcp-server.js +20 -18
- package/dist/program.js +0 -1
- package/package.json +1 -1
- package/skills/cnotes/references/canvas.md +7 -0
- package/skills/cnotes/references/notes.md +7 -0
- package/skills/cnotes/references/operations.md +6 -2
- package/dist/cn.d.ts +0 -3
- package/dist/cn.d.ts.map +0 -1
- package/dist/cn.js.map +0 -1
- package/dist/commands/auth-keys.d.ts +0 -3
- package/dist/commands/auth-keys.d.ts.map +0 -1
- package/dist/commands/auth-keys.js.map +0 -1
- package/dist/commands/auth.d.ts +0 -11
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/brief.d.ts +0 -9
- package/dist/commands/brief.d.ts.map +0 -1
- package/dist/commands/brief.js.map +0 -1
- package/dist/commands/canvas-milestone.d.ts +0 -14
- package/dist/commands/canvas-milestone.d.ts.map +0 -1
- package/dist/commands/canvas-milestone.js.map +0 -1
- package/dist/commands/canvas.d.ts +0 -20
- package/dist/commands/canvas.d.ts.map +0 -1
- package/dist/commands/canvas.js.map +0 -1
- package/dist/commands/claude-hook.d.ts +0 -28
- package/dist/commands/claude-hook.d.ts.map +0 -1
- package/dist/commands/claude-hook.js.map +0 -1
- package/dist/commands/config.d.ts +0 -3
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/deps.d.ts +0 -94
- package/dist/commands/deps.d.ts.map +0 -1
- package/dist/commands/deps.js.map +0 -1
- package/dist/commands/draft.d.ts +0 -3
- package/dist/commands/draft.d.ts.map +0 -1
- package/dist/commands/draft.js.map +0 -1
- package/dist/commands/feedback.d.ts +0 -3
- package/dist/commands/feedback.d.ts.map +0 -1
- package/dist/commands/feedback.js.map +0 -1
- package/dist/commands/files.d.ts +0 -3
- package/dist/commands/files.d.ts.map +0 -1
- package/dist/commands/files.js.map +0 -1
- package/dist/commands/focus.d.ts +0 -3
- package/dist/commands/focus.d.ts.map +0 -1
- package/dist/commands/focus.js.map +0 -1
- package/dist/commands/goals.d.ts +0 -3
- package/dist/commands/goals.d.ts.map +0 -1
- package/dist/commands/goals.js.map +0 -1
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -15
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/notes.d.ts +0 -3
- package/dist/commands/notes.d.ts.map +0 -1
- package/dist/commands/notes.js.map +0 -1
- package/dist/commands/operations.d.ts +0 -27
- package/dist/commands/operations.d.ts.map +0 -1
- package/dist/commands/operations.js.map +0 -1
- package/dist/commands/quality.d.ts +0 -14
- package/dist/commands/quality.d.ts.map +0 -1
- package/dist/commands/quality.js.map +0 -1
- package/dist/commands/relationships.d.ts +0 -8
- package/dist/commands/relationships.d.ts.map +0 -1
- package/dist/commands/relationships.js.map +0 -1
- package/dist/commands/review.d.ts +0 -19
- package/dist/commands/review.d.ts.map +0 -1
- package/dist/commands/review.js.map +0 -1
- package/dist/commands/schema.d.ts +0 -12
- package/dist/commands/schema.d.ts.map +0 -1
- package/dist/commands/schema.js.map +0 -1
- package/dist/commands/search.d.ts +0 -3
- package/dist/commands/search.d.ts.map +0 -1
- package/dist/commands/search.js.map +0 -1
- package/dist/commands/shared.d.ts +0 -3
- package/dist/commands/shared.d.ts.map +0 -1
- package/dist/commands/shared.js.map +0 -1
- package/dist/commands/skills.d.ts +0 -3
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/theme.d.ts +0 -3
- package/dist/commands/theme.d.ts.map +0 -1
- package/dist/commands/theme.js.map +0 -1
- package/dist/commands/timeline.d.ts +0 -4
- package/dist/commands/timeline.d.ts.map +0 -1
- package/dist/commands/timeline.js.map +0 -1
- package/dist/commands/types.d.ts +0 -3
- package/dist/commands/types.d.ts.map +0 -1
- package/dist/commands/types.js.map +0 -1
- package/dist/commands/upgrade.d.ts +0 -13
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/versions.d.ts +0 -3
- package/dist/commands/versions.d.ts.map +0 -1
- package/dist/commands/versions.js.map +0 -1
- package/dist/commands/workspace.d.ts +0 -13
- package/dist/commands/workspace.d.ts.map +0 -1
- package/dist/commands/workspace.js.map +0 -1
- package/dist/generated/embedded-build.d.ts +0 -22
- package/dist/generated/embedded-build.d.ts.map +0 -1
- package/dist/generated/embedded-build.js.map +0 -1
- package/dist/lib/active-run.d.ts +0 -62
- package/dist/lib/active-run.d.ts.map +0 -1
- package/dist/lib/active-run.js.map +0 -1
- package/dist/lib/agent-client.d.ts +0 -12
- package/dist/lib/agent-client.d.ts.map +0 -1
- package/dist/lib/agent-client.js.map +0 -1
- package/dist/lib/agent-grade.d.ts +0 -24
- package/dist/lib/agent-grade.d.ts.map +0 -1
- package/dist/lib/agent-grade.js.map +0 -1
- package/dist/lib/api-client.d.ts +0 -124
- package/dist/lib/api-client.d.ts.map +0 -1
- package/dist/lib/api-client.js.map +0 -1
- package/dist/lib/auth-store.d.ts +0 -177
- package/dist/lib/auth-store.d.ts.map +0 -1
- package/dist/lib/auth-store.js.map +0 -1
- package/dist/lib/billing-block.d.ts +0 -12
- package/dist/lib/billing-block.d.ts.map +0 -1
- package/dist/lib/billing-block.js.map +0 -1
- package/dist/lib/brand.d.ts +0 -35
- package/dist/lib/brand.d.ts.map +0 -1
- package/dist/lib/brand.js.map +0 -1
- package/dist/lib/build-schema.d.ts +0 -109
- package/dist/lib/build-schema.d.ts.map +0 -1
- package/dist/lib/build-schema.js.map +0 -1
- package/dist/lib/canvas-goal.d.ts +0 -59
- package/dist/lib/canvas-goal.d.ts.map +0 -1
- package/dist/lib/canvas-goal.js.map +0 -1
- package/dist/lib/canvas-layout.d.ts +0 -77
- package/dist/lib/canvas-layout.d.ts.map +0 -1
- package/dist/lib/canvas-layout.js.map +0 -1
- package/dist/lib/canvas-paths.d.ts +0 -31
- package/dist/lib/canvas-paths.d.ts.map +0 -1
- package/dist/lib/canvas-paths.js.map +0 -1
- package/dist/lib/claude-session.d.ts +0 -81
- package/dist/lib/claude-session.d.ts.map +0 -1
- package/dist/lib/claude-session.js.map +0 -1
- package/dist/lib/config.d.ts +0 -76
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/decision-citation.d.ts +0 -10
- package/dist/lib/decision-citation.d.ts.map +0 -1
- package/dist/lib/decision-citation.js.map +0 -1
- package/dist/lib/display-id.d.ts +0 -12
- package/dist/lib/display-id.d.ts.map +0 -1
- package/dist/lib/display-id.js.map +0 -1
- package/dist/lib/draft-ref.d.ts +0 -61
- package/dist/lib/draft-ref.d.ts.map +0 -1
- package/dist/lib/draft-ref.js.map +0 -1
- package/dist/lib/draft-view.d.ts +0 -566
- package/dist/lib/draft-view.d.ts.map +0 -1
- package/dist/lib/draft-view.js.map +0 -1
- package/dist/lib/errors.d.ts +0 -105
- package/dist/lib/errors.d.ts.map +0 -1
- package/dist/lib/errors.js.map +0 -1
- package/dist/lib/expand-notes.d.ts +0 -79
- package/dist/lib/expand-notes.d.ts.map +0 -1
- package/dist/lib/expand-notes.js.map +0 -1
- package/dist/lib/focus-time.d.ts +0 -16
- package/dist/lib/focus-time.d.ts.map +0 -1
- package/dist/lib/focus-time.js.map +0 -1
- package/dist/lib/fs-utils.d.ts +0 -10
- package/dist/lib/fs-utils.d.ts.map +0 -1
- package/dist/lib/fs-utils.js.map +0 -1
- package/dist/lib/goal-tree.d.ts +0 -71
- package/dist/lib/goal-tree.d.ts.map +0 -1
- package/dist/lib/goal-tree.js.map +0 -1
- package/dist/lib/headline-warnings.d.ts +0 -8
- package/dist/lib/headline-warnings.d.ts.map +0 -1
- package/dist/lib/headline-warnings.js.map +0 -1
- package/dist/lib/install-hook.d.ts +0 -86
- package/dist/lib/install-hook.d.ts.map +0 -1
- package/dist/lib/install-hook.js.map +0 -1
- package/dist/lib/install-mcp.d.ts +0 -21
- package/dist/lib/install-mcp.d.ts.map +0 -1
- package/dist/lib/install-mcp.js.map +0 -1
- package/dist/lib/install-skill.d.ts +0 -84
- package/dist/lib/install-skill.d.ts.map +0 -1
- package/dist/lib/install-skill.js.map +0 -1
- package/dist/lib/mcp-local-file.d.ts +0 -11
- package/dist/lib/mcp-local-file.d.ts.map +0 -1
- package/dist/lib/mcp-local-file.js.map +0 -1
- package/dist/lib/mention-lint.d.ts +0 -159
- package/dist/lib/mention-lint.d.ts.map +0 -1
- package/dist/lib/mention-lint.js.map +0 -1
- package/dist/lib/milestone-message.d.ts +0 -37
- package/dist/lib/milestone-message.d.ts.map +0 -1
- package/dist/lib/milestone-message.js.map +0 -1
- package/dist/lib/output.d.ts +0 -57
- package/dist/lib/output.d.ts.map +0 -1
- package/dist/lib/output.js.map +0 -1
- package/dist/lib/quality.d.ts +0 -142
- package/dist/lib/quality.d.ts.map +0 -1
- package/dist/lib/quality.js.map +0 -1
- package/dist/lib/resolve-note.d.ts +0 -7
- package/dist/lib/resolve-note.d.ts.map +0 -1
- package/dist/lib/resolve-note.js.map +0 -1
- package/dist/lib/review-helpers.d.ts +0 -37
- package/dist/lib/review-helpers.d.ts.map +0 -1
- package/dist/lib/review-helpers.js.map +0 -1
- package/dist/lib/rubric-sections.d.ts +0 -29
- package/dist/lib/rubric-sections.d.ts.map +0 -1
- package/dist/lib/rubric-sections.js.map +0 -1
- package/dist/lib/rubrics.d.ts +0 -60
- package/dist/lib/rubrics.d.ts.map +0 -1
- package/dist/lib/rubrics.js.map +0 -1
- package/dist/lib/runtime.d.ts +0 -40
- package/dist/lib/runtime.d.ts.map +0 -1
- package/dist/lib/runtime.js.map +0 -1
- package/dist/lib/server-url.d.ts +0 -33
- package/dist/lib/server-url.d.ts.map +0 -1
- package/dist/lib/server-url.js.map +0 -1
- package/dist/lib/session-brief.d.ts +0 -60
- package/dist/lib/session-brief.d.ts.map +0 -1
- package/dist/lib/session-brief.js.map +0 -1
- package/dist/lib/share-link.d.ts +0 -19
- package/dist/lib/share-link.d.ts.map +0 -1
- package/dist/lib/share-link.js.map +0 -1
- package/dist/lib/shared-rows.d.ts +0 -46
- package/dist/lib/shared-rows.d.ts.map +0 -1
- package/dist/lib/shared-rows.js.map +0 -1
- package/dist/lib/stdin.d.ts +0 -5
- package/dist/lib/stdin.d.ts.map +0 -1
- package/dist/lib/stdin.js.map +0 -1
- package/dist/lib/storage-id.d.ts +0 -12
- package/dist/lib/storage-id.d.ts.map +0 -1
- package/dist/lib/storage-id.js.map +0 -1
- package/dist/lib/style.d.ts +0 -10
- package/dist/lib/style.d.ts.map +0 -1
- package/dist/lib/style.js.map +0 -1
- package/dist/lib/superseded-by.d.ts +0 -20
- package/dist/lib/superseded-by.d.ts.map +0 -1
- package/dist/lib/superseded-by.js.map +0 -1
- package/dist/lib/themes.d.ts +0 -44
- package/dist/lib/themes.d.ts.map +0 -1
- package/dist/lib/themes.js.map +0 -1
- package/dist/lib/urls.d.ts +0 -44
- package/dist/lib/urls.d.ts.map +0 -1
- package/dist/lib/urls.js.map +0 -1
- package/dist/mcp-server.d.ts +0 -3
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mcp-server.js.map +0 -1
- package/dist/program.d.ts +0 -13
- package/dist/program.d.ts.map +0 -1
- package/dist/program.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
|
+
import { request as httpRequest } from "node:http";
|
|
2
3
|
import { join, relative, isAbsolute } from "node:path";
|
|
3
4
|
import { homedir } from "node:os";
|
|
4
5
|
import { BRAND } from "./brand.js";
|
|
@@ -18,6 +19,35 @@ export const CLAUDE_SESSION_FILE = join(homedir(), BRAND.configDir, "claude-sess
|
|
|
18
19
|
* stamping a later, unrelated run.
|
|
19
20
|
*/
|
|
20
21
|
export const SESSION_FILE_MAX_AGE_MS = 24 * 60 * 60 * 1000; // 24h
|
|
22
|
+
/**
|
|
23
|
+
* `cursor.com/agents/<id>` only opens a cloud agent id. Subagent
|
|
24
|
+
* conversation ids (`sand-subagent-…`, or a child `bc-…` that is not the
|
|
25
|
+
* run the person started) are not that page.
|
|
26
|
+
*/
|
|
27
|
+
const CURSOR_CLOUD_AGENT_ID = /^bc-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
28
|
+
/** How long to wait on the agent metadata socket before giving up the parent id. */
|
|
29
|
+
const CURSOR_AGENT_SOCKET_TIMEOUT_MS = 400;
|
|
30
|
+
const CURSOR_AGENT_SOCKET_DEFAULT = "/run/cursor/api.sock";
|
|
31
|
+
export function isCursorCloudAgentId(id) {
|
|
32
|
+
return CURSOR_CLOUD_AGENT_ID.test(id);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Id to stamp so "Open Cursor agent" lands on a page that exists.
|
|
36
|
+
*
|
|
37
|
+
* Prefer the metadata socket's agent id: inside a Task subagent,
|
|
38
|
+
* `CURSOR_CONVERSATION_ID` is the subagent (`sand-subagent-…` or a child
|
|
39
|
+
* `bc-…`) and `https://cursor.com/agents/<that>` is "Cloud Agent not found".
|
|
40
|
+
* The socket still returns the parent cloud agent.
|
|
41
|
+
*/
|
|
42
|
+
export function cursorResumeId(args) {
|
|
43
|
+
const cloud = args.cloudAgentId?.trim() ?? "";
|
|
44
|
+
if (isCursorCloudAgentId(cloud))
|
|
45
|
+
return cloud;
|
|
46
|
+
const conversation = args.conversationId?.trim() ?? "";
|
|
47
|
+
if (isCursorCloudAgentId(conversation))
|
|
48
|
+
return conversation;
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
21
51
|
/**
|
|
22
52
|
* Decide whether a stored hook session is still a trustworthy stand-in for
|
|
23
53
|
* "the agent driving THIS cnotes run". Pure (takes `now` + `cwd` rather than
|
|
@@ -67,14 +97,18 @@ function isWithin(child, parent) {
|
|
|
67
97
|
* 3. CLAUDE_CODE_SESSION_ID — Claude Code's per-process env var. Zero-config
|
|
68
98
|
* but undocumented; best-effort fallback when no hook is installed. It's
|
|
69
99
|
* the live process's own env, so no staleness check applies.
|
|
70
|
-
* 4.
|
|
71
|
-
* (`bc
|
|
72
|
-
* `
|
|
100
|
+
* 4. The Cursor cloud agent id. `CURSOR_CONVERSATION_ID` is that id in the
|
|
101
|
+
* parent shell (`bc-…`, resumable at `https://cursor.com/agents/<id>`).
|
|
102
|
+
* In a subagent it is `sand-subagent-…` or a child `bc-…`, and that URL
|
|
103
|
+
* does not open. Pass `cursorCloudAgentId` from {@link readCursorCloudAgentId}
|
|
104
|
+
* (the parent on the metadata socket) and that id wins.
|
|
73
105
|
*
|
|
74
106
|
* Returns null when nothing is known (e.g. cnotes run outside any agent), in which
|
|
75
|
-
* case the run simply isn't session-stamped — no error.
|
|
107
|
+
* case the run simply isn't session-stamped — no error. A Cursor conversation
|
|
108
|
+
* id that is not an openable `bc-…` cloud agent is also skipped: stamping it
|
|
109
|
+
* would offer a resume link to a page that does not exist.
|
|
76
110
|
*/
|
|
77
|
-
export function resolveAgentSession() {
|
|
111
|
+
export function resolveAgentSession(options) {
|
|
78
112
|
const overrideId = process.env.CNOTES_AGENT_SESSION_ID?.trim();
|
|
79
113
|
if (overrideId) {
|
|
80
114
|
return {
|
|
@@ -88,11 +122,74 @@ export function resolveAgentSession() {
|
|
|
88
122
|
const claudeEnvId = process.env.CLAUDE_CODE_SESSION_ID?.trim();
|
|
89
123
|
if (claudeEnvId)
|
|
90
124
|
return { kind: "claude-code", id: claudeEnvId };
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
125
|
+
const cursorId = cursorResumeId({
|
|
126
|
+
conversationId: process.env.CURSOR_CONVERSATION_ID,
|
|
127
|
+
cloudAgentId: options?.cursorCloudAgentId,
|
|
128
|
+
});
|
|
129
|
+
if (cursorId)
|
|
130
|
+
return { kind: "cursor", id: cursorId };
|
|
94
131
|
return null;
|
|
95
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* {@link resolveAgentSession} plus the parent cloud agent id from the local
|
|
135
|
+
* metadata socket. This is what `operations begin` stamps.
|
|
136
|
+
*/
|
|
137
|
+
export async function resolveHostAgentSession() {
|
|
138
|
+
const cursorCloudAgentId = await readCursorCloudAgentId();
|
|
139
|
+
return resolveAgentSession({ cursorCloudAgentId });
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Parent cloud agent id from `GET /v1/meta-data/agent/id` on
|
|
143
|
+
* `CURSOR_AGENT_SOCKET`. Returns null outside Cursor, when the socket is
|
|
144
|
+
* missing, or when the value is not a `bc-…` id. Never throws.
|
|
145
|
+
*/
|
|
146
|
+
export function readCursorCloudAgentId(env = process.env, timeoutMs = CURSOR_AGENT_SOCKET_TIMEOUT_MS) {
|
|
147
|
+
const inCursor = Boolean(env.CURSOR_AGENT || env.CURSOR_CONVERSATION_ID || env.CURSOR_AGENT_SOCKET);
|
|
148
|
+
if (!inCursor)
|
|
149
|
+
return Promise.resolve(null);
|
|
150
|
+
const socketPath = env.CURSOR_AGENT_SOCKET?.trim() || CURSOR_AGENT_SOCKET_DEFAULT;
|
|
151
|
+
return new Promise((resolve) => {
|
|
152
|
+
let settled = false;
|
|
153
|
+
let timer;
|
|
154
|
+
const finish = (value) => {
|
|
155
|
+
if (settled)
|
|
156
|
+
return;
|
|
157
|
+
settled = true;
|
|
158
|
+
if (timer)
|
|
159
|
+
clearTimeout(timer);
|
|
160
|
+
resolve(value);
|
|
161
|
+
};
|
|
162
|
+
const req = httpRequest({
|
|
163
|
+
socketPath,
|
|
164
|
+
path: "/v1/meta-data/agent/id",
|
|
165
|
+
method: "GET",
|
|
166
|
+
timeout: timeoutMs,
|
|
167
|
+
}, (res) => {
|
|
168
|
+
const chunks = [];
|
|
169
|
+
res.on("data", (chunk) => {
|
|
170
|
+
chunks.push(chunk);
|
|
171
|
+
});
|
|
172
|
+
res.on("end", () => {
|
|
173
|
+
if (res.statusCode !== 200) {
|
|
174
|
+
finish(null);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const id = Buffer.concat(chunks).toString("utf8").trim();
|
|
178
|
+
finish(isCursorCloudAgentId(id) ? id : null);
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
timer = setTimeout(() => {
|
|
182
|
+
req.destroy();
|
|
183
|
+
finish(null);
|
|
184
|
+
}, timeoutMs);
|
|
185
|
+
req.on("error", () => finish(null));
|
|
186
|
+
req.on("timeout", () => {
|
|
187
|
+
req.destroy();
|
|
188
|
+
finish(null);
|
|
189
|
+
});
|
|
190
|
+
req.end();
|
|
191
|
+
});
|
|
192
|
+
}
|
|
96
193
|
function readSessionFile(now, cwd) {
|
|
97
194
|
try {
|
|
98
195
|
const raw = readFileSync(CLAUDE_SESSION_FILE, "utf-8");
|
|
@@ -106,4 +203,3 @@ function readSessionFile(now, cwd) {
|
|
|
106
203
|
}
|
|
107
204
|
return null;
|
|
108
205
|
}
|
|
109
|
-
//# sourceMappingURL=claude-session.js.map
|
package/dist/lib/config.js
CHANGED
|
@@ -7,4 +7,3 @@
|
|
|
7
7
|
* surfaces quote. Keep the skill's copy in step with it.
|
|
8
8
|
*/
|
|
9
9
|
export const DECISION_CARD_RULE = "Anything settled in conversation that shapes what we build or say publicly gets its own Decision card, citing the cards it depends on (typed links such as depends-on / grounded-in). If something is stated as decided but no Decision card exists, say so and create one.";
|
|
10
|
-
//# sourceMappingURL=decision-citation.js.map
|
package/dist/lib/display-id.js
CHANGED
package/dist/lib/draft-ref.js
CHANGED
package/dist/lib/draft-view.js
CHANGED
package/dist/lib/errors.js
CHANGED
|
@@ -229,6 +229,36 @@ function extractErrorCode(err) {
|
|
|
229
229
|
}
|
|
230
230
|
return undefined;
|
|
231
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Transport failures that will not heal within a retry's backoff: the host
|
|
234
|
+
* does not resolve, nothing is listening, the URL is malformed, or the TLS
|
|
235
|
+
* handshake is refused. Retrying these only turns a 200 ms failure into a
|
|
236
|
+
* 3 s one, which is the first thing an agent hits with a stale server URL.
|
|
237
|
+
* Resets, timeouts and resolver hiccups stay retryable.
|
|
238
|
+
*/
|
|
239
|
+
const PERMANENT_NETWORK_CODES = new Set([
|
|
240
|
+
"ENOTFOUND",
|
|
241
|
+
"ECONNREFUSED",
|
|
242
|
+
"EAI_FAIL",
|
|
243
|
+
"ERR_INVALID_URL",
|
|
244
|
+
"EHOSTUNREACH",
|
|
245
|
+
"ENETUNREACH",
|
|
246
|
+
]);
|
|
247
|
+
export function isPermanentNetworkError(err) {
|
|
248
|
+
const code = extractErrorCode(err);
|
|
249
|
+
if (!code)
|
|
250
|
+
return false;
|
|
251
|
+
return PERMANENT_NETWORK_CODES.has(code) || isTlsCode(code);
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* A transient failure that happened before any byte of the request reached
|
|
255
|
+
* the server (a DNS lookup that timed out), so even a write is safe to send
|
|
256
|
+
* again. A reset or timeout mid-request is not: the server may have
|
|
257
|
+
* committed the write.
|
|
258
|
+
*/
|
|
259
|
+
export function isRefusedBeforeSend(err) {
|
|
260
|
+
return extractErrorCode(err) === "EAI_AGAIN";
|
|
261
|
+
}
|
|
232
262
|
/**
|
|
233
263
|
* True when an error means the request failed at the transport layer rather
|
|
234
264
|
* than returning an HTTP status. Node fetch raises `TypeError: fetch failed`
|
|
@@ -320,14 +350,16 @@ function hintForStatus(status, message, resource) {
|
|
|
320
350
|
}
|
|
321
351
|
if (r === "edit")
|
|
322
352
|
return "Run `cnotes draft edits` to see this draft's proposals.";
|
|
323
|
-
|
|
324
|
-
|
|
353
|
+
// Specific resources first: a message such as "Canvas not found in this
|
|
354
|
+
// workspace" must not send the agent to `workspace list`.
|
|
355
|
+
if (r === "canvas" || (!r && /canvas/i.test(message))) {
|
|
356
|
+
return "Run `cnotes canvas list` to see available canvases.";
|
|
325
357
|
}
|
|
326
|
-
if (r === "note" || (!r && /
|
|
358
|
+
if (r === "note" || r.endsWith(" note") || (!r && /\bnote\b/i.test(message))) {
|
|
327
359
|
return "Run `cnotes notes list` to see valid display IDs.";
|
|
328
360
|
}
|
|
329
|
-
if (r === "
|
|
330
|
-
return "Run `cnotes
|
|
361
|
+
if (r === "workspace" || (!r && /workspace/i.test(message))) {
|
|
362
|
+
return "Run `cnotes workspace list` to see available workspaces.";
|
|
331
363
|
}
|
|
332
364
|
return "Run `cnotes schema` to see valid resource identifiers.";
|
|
333
365
|
}
|
|
@@ -458,4 +490,3 @@ export function handleError(error, json) {
|
|
|
458
490
|
}
|
|
459
491
|
process.exit(EXIT_CODES.GENERIC);
|
|
460
492
|
}
|
|
461
|
-
//# sourceMappingURL=errors.js.map
|
package/dist/lib/expand-notes.js
CHANGED
package/dist/lib/focus-time.js
CHANGED
package/dist/lib/fs-utils.js
CHANGED
package/dist/lib/goal-tree.js
CHANGED
package/dist/lib/install-hook.js
CHANGED
package/dist/lib/install-mcp.js
CHANGED
package/dist/lib/mention-lint.js
CHANGED
package/dist/lib/output.js
CHANGED
package/dist/lib/quality.js
CHANGED
package/dist/lib/resolve-note.js
CHANGED
package/dist/lib/rubrics.js
CHANGED
package/dist/lib/runtime.js
CHANGED
package/dist/lib/server-url.js
CHANGED
package/dist/lib/share-link.js
CHANGED
package/dist/lib/shared-rows.js
CHANGED
package/dist/lib/stdin.js
CHANGED
package/dist/lib/storage-id.js
CHANGED
package/dist/lib/style.js
CHANGED
package/dist/lib/themes.js
CHANGED
package/dist/lib/urls.js
CHANGED
package/dist/mcp-server.js
CHANGED
|
@@ -288,19 +288,24 @@ server.tool("cnotes_notes_create", "Create one or more interlinked notes in a si
|
|
|
288
288
|
.describe("Either a single item object or a non-empty array of items."),
|
|
289
289
|
}, async ({ notes }) => withErrorHandling(async () => {
|
|
290
290
|
const items = Array.isArray(notes) ? notes : [notes];
|
|
291
|
-
//
|
|
292
|
-
// so
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
291
|
+
// The three pre-flight reads are independent of each other and of the
|
|
292
|
+
// create, so they run as one round trip instead of three in a row.
|
|
293
|
+
// - Narrated-verb lint (warn-only): MCP has no stderr channel, so
|
|
294
|
+
// `mentionWarnings` in the result is the only way the model sees it.
|
|
295
|
+
// - Plain-text ID lint (warn-only): a real note named as bare prose
|
|
296
|
+
// creates nothing in the graph; one batched lookup for the batch.
|
|
297
|
+
// - Rubric map: attached to each result below (loadRubricMap swallows
|
|
298
|
+
// its own failures, so it cannot block the create).
|
|
299
|
+
const [relTypes, plainTextIdWarnings, rubricMap] = await Promise.all([
|
|
300
|
+
items.some((n) => hasGenericMention(String(n.markdown ?? "")))
|
|
301
|
+
? fetchRelationshipTypeOptions(api, workspaceId)
|
|
302
|
+
: Promise.resolve(null),
|
|
303
|
+
lintPlainTextDisplayIdsBatch(items.map((n) => ({ key: n.key, markdown: String(n.markdown ?? "") })), api, workspaceId),
|
|
304
|
+
loadRubricMap(api, workspaceId),
|
|
305
|
+
]);
|
|
306
|
+
const mentionWarnings = relTypes
|
|
307
|
+
? items.flatMap((n) => lintNarratedVerbMentions(String(n.markdown ?? ""), relTypes).map((w) => ({ item: n.key, ...w })))
|
|
308
|
+
: [];
|
|
304
309
|
const result = await api.post("/api/notes/bulk", {
|
|
305
310
|
action: "bulkCreate",
|
|
306
311
|
workspaceId,
|
|
@@ -308,8 +313,6 @@ server.tool("cnotes_notes_create", "Create one or more interlinked notes in a si
|
|
|
308
313
|
});
|
|
309
314
|
// Attach rubrics ON EACH result so filtering to results[] still carries
|
|
310
315
|
// the standard. Top-level rubrics kept for backward compatibility.
|
|
311
|
-
// Non-fatal: create already succeeded if we got here.
|
|
312
|
-
const rubricMap = await loadRubricMap(api, workspaceId);
|
|
313
316
|
const typeByKey = new Map(items.map((n) => [n.key, n.type]));
|
|
314
317
|
const rawResults = (result.results || []);
|
|
315
318
|
const enriched = attachRubricsToResults(rawResults, typeByKey, rubricMap);
|
|
@@ -419,7 +422,7 @@ server.tool("cnotes_canvas_update", "Update canvas metadata: title, goal, and/or
|
|
|
419
422
|
targetAudience: z.string().optional().describe("Target audience — who this canvas is meant to serve or inform, and what they do with it"),
|
|
420
423
|
}, async ({ canvasId, title, goal, targetAudience }) => {
|
|
421
424
|
if (!title && !goal && !targetAudience) {
|
|
422
|
-
return
|
|
425
|
+
return err("at least one of title, goal, or targetAudience is required");
|
|
423
426
|
}
|
|
424
427
|
const body = {};
|
|
425
428
|
if (title !== undefined)
|
|
@@ -1264,7 +1267,7 @@ server.tool("cnotes_versions_list", "List versions of a note.", {
|
|
|
1264
1267
|
throw new Error(`Note not found: ${noteId}`);
|
|
1265
1268
|
return note.versions || [];
|
|
1266
1269
|
}));
|
|
1267
|
-
server.tool("cnotes_versions_create", "Create a new version of a note. Content is markdown. To link to other notes, use [NOTE-123: Title](relationship:type) inside the markdown —
|
|
1270
|
+
server.tool("cnotes_versions_create", "Create a new version of a note. Content is markdown. To link to other notes, use [NOTE-123: Title](relationship:type) or [[type::NOTE-123]] inside the markdown — the title part is optional; the server stamps the linked note's current title onto the chip when it saves. NEVER name another note as bare prose ('see DECISION-12') — plain text creates no chip, no relationship, no backlink; write the mention. This is exactly how to capture 'the answer to this QUESTION is that DECISION': a mention of the decision with a relationship type like 'answered-by'. Pick the relationship type from the verb your own prose uses ('blocks', 'depends-on', 'caused-by', …; free-form — unknown types auto-create); reserve 'references' for pure citations — a verb narrated in prose around a 'references' chip is invisible to backlinks. A `mentionWarnings` array in the result flags narrated verbs it detects; a `plainTextIdWarnings` array flags bare IDs that name real notes, each with a paste-ready mention rewrite — treat both as fix instructions unless the prose genuinely isn't asserting a relationship.", {
|
|
1268
1271
|
noteId: z.string().describe("Note display ID or Convex ID"),
|
|
1269
1272
|
markdown: z.string().describe("New content as markdown"),
|
|
1270
1273
|
description: z.string().describe("Change description (required)"),
|
|
@@ -1369,4 +1372,3 @@ main().catch((e) => {
|
|
|
1369
1372
|
process.stderr.write(`cnotes-mcp fatal: ${e}\n`);
|
|
1370
1373
|
process.exit(1);
|
|
1371
1374
|
});
|
|
1372
|
-
//# sourceMappingURL=mcp-server.js.map
|
package/dist/program.js
CHANGED
package/package.json
CHANGED
|
@@ -81,6 +81,13 @@ cnotes canvas update <canvasId> [--title "<text>"] [--goal "<text>"] [--audience
|
|
|
81
81
|
# when the deployment has scoring off). Goal trees (`cnotes goals tree`, goal-tree skill)
|
|
82
82
|
# are built from these.
|
|
83
83
|
cnotes canvas done <canvasId> [--refresh]
|
|
84
|
+
# Which cards contradict each other, and which claims nothing on the board backs. Writes
|
|
85
|
+
# nothing and gives no reasons, so read each finding before acting on it. For a real one,
|
|
86
|
+
# open a draft (`cnotes draft open --from-canvas <canvasId>`) and write a Tension note that
|
|
87
|
+
# mentions both cards, or a Question note asking what would back the claim; the person
|
|
88
|
+
# accepts the draft. "Unsure" findings are for the person, not for a note. One model call
|
|
89
|
+
# per card; editors only; refused where the deployment has no decision model for the workspace.
|
|
90
|
+
cnotes canvas check <canvasId>
|
|
84
91
|
cnotes canvas delete <canvasId>
|
|
85
92
|
cnotes canvas set-as-home <canvasId>
|
|
86
93
|
cnotes canvas archive <canvasId>
|
|
@@ -120,6 +120,13 @@ cnotes notes create --notes '[
|
|
|
120
120
|
# On validation failure the response lists every bad item by index + key + field
|
|
121
121
|
# (and `details.items` in --json mode), so you can fix the whole batch in one shot.
|
|
122
122
|
# Each .results[] item carries .type + .rubric — keep them when filtering JSON.
|
|
123
|
+
# Where the deployment turns the rubric check on, each item also carries
|
|
124
|
+
# .quality: {level 1-4, label, missing[], nextStep, unsure}. `missing` quotes the
|
|
125
|
+
# rubric clauses the note does not yet do, weakest first. Fix those with
|
|
126
|
+
# `versions create` before placing the note (the new version is graded again
|
|
127
|
+
# and comes back with its own .quality). `unsure: true` means the level is a
|
|
128
|
+
# guess: read the note yourself instead of rewriting on its word. Without
|
|
129
|
+
# .quality, grade yourself as below.
|
|
123
130
|
|
|
124
131
|
# THEN: grade what you just wrote and revise before ending the run.
|
|
125
132
|
# You are the grader. Grading spends no credits. `cnotes quality` does not
|
|
@@ -66,8 +66,12 @@ cnotes operations end
|
|
|
66
66
|
**Resume the chat that produced the run.** `operations begin` auto-stamps
|
|
67
67
|
`agentSession` from the host agent when it can: Claude Code via
|
|
68
68
|
`CLAUDE_CODE_SESSION_ID` / the SessionStart hook (`cnotes claude-hook`), Cursor
|
|
69
|
-
Agent via
|
|
70
|
-
`
|
|
69
|
+
Agent via the openable cloud agent id (`bc-…`). Inside a subagent,
|
|
70
|
+
`CURSOR_CONVERSATION_ID` is `sand-subagent-…` or a child id, and
|
|
71
|
+
`https://cursor.com/agents/<that>` is "Cloud Agent not found", so begin
|
|
72
|
+
stamps the parent id from the agent metadata socket instead. The timeline
|
|
73
|
+
then offers resume: `claude --resume <id>` (copy) or
|
|
74
|
+
`https://cursor.com/agents/<bcId>` (open).
|
|
71
75
|
Override with `CNOTES_AGENT_SESSION_ID` + `CNOTES_AGENT_SESSION_KIND` when needed.
|
|
72
76
|
|
|
73
77
|
|
package/dist/cn.d.ts
DELETED
package/dist/cn.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":""}
|
package/dist/cn.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cn.js","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAErE,+EAA+E;AAC/E,sCAAsC;AACtC,MAAM,WAAW,GACf,eAAe,EAAE;IACjB,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;AAE1C,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAE9C,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,oEAAoE;AACpE,MAAM,aAAa,GACjB,OAAO,CAAC,MAAM,CAAC,KAAK;IACpB,CAA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I,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG;QAC/B,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CACtB,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,wEAAwE;AACxE,4EAA4E;AAC5E,0EAA0E;AAC1E,4EAA4E;AAC5E,+EAA+E;AAC/E,2EAA2E;AAC3E,EAAE;AACF,yEAAyE;AACzE,gFAAgF;AAChF,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE;IAC1C,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC/C,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-keys.d.ts","sourceRoot":"","sources":["../../src/commands/auth-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAkE9E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-keys.js","sourceRoot":"","sources":["../../src/commands/auth-keys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,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M,GAAG,MAAM,GAAG,CAAC,MAAM,CAC7B,4BAA4B,kBAAkB,CAAC,KAAK,CAAC,EAAE,CACxD,CAAC;YAEF,IAAI,IAAI,EAAE,CAAC;gBACT,UAAU,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/commands/auth.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
export declare function registerAuthCommands(program: Command): void;
|
|
3
|
-
export interface LoginResult {
|
|
4
|
-
email: string;
|
|
5
|
-
serverUrl: string;
|
|
6
|
-
expiresAt?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function browserLogin(rawServerUrl: string, json: boolean, options?: {
|
|
9
|
-
quiet?: boolean;
|
|
10
|
-
}): Promise<LoginResult>;
|
|
11
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiH3D;AAmED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuCD,wBAAsB,YAAY,CAChC,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5B,OAAO,CAAC,WAAW,CAAC,CAyKtB"}
|