@openllmsh/sdk 2.10.15-alpha.3 → 2.10.15-alpha.4

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.
@@ -126,6 +126,13 @@ export declare const agentAttachmentHasPath: (attachment: TAgentAttachment) => a
126
126
  readonly path: string;
127
127
  readonly data?: undefined;
128
128
  };
129
+ /**
130
+ * Whether a path string can ride Claude's quoted `@"…"` mention: non-empty,
131
+ * within {@link AGENT_MAX_ATTACHMENT_PATH_LENGTH}, and free of `"`, C0/C1
132
+ * control characters and DEL. Syntax only: the daemon still requires an
133
+ * absolute path to a regular file, and checks the resolved path again.
134
+ */
135
+ export declare const isAgentAttachmentMentionPath: (path: string) => boolean;
129
136
  /**
130
137
  * Metadata for an attachment that was saved on the device for a turn. The
131
138
  * `name` is the on-disk basename under the session's attachments dir (what
@@ -144,6 +144,27 @@ export const AgentAttachment = S.Struct({
144
144
  }));
145
145
  /** True when the attachment carries an absolute local path instead of bytes. */
146
146
  export const agentAttachmentHasPath = (attachment) => typeof attachment.path === "string";
147
+ /**
148
+ * Whether a path string can ride Claude's quoted `@"…"` mention: non-empty,
149
+ * within {@link AGENT_MAX_ATTACHMENT_PATH_LENGTH}, and free of `"`, C0/C1
150
+ * control characters and DEL. Syntax only: the daemon still requires an
151
+ * absolute path to a regular file, and checks the resolved path again.
152
+ */
153
+ export const isAgentAttachmentMentionPath = (path) => {
154
+ if (path.length === 0 || path.length > AGENT_MAX_ATTACHMENT_PATH_LENGTH) {
155
+ return false;
156
+ }
157
+ for (let i = 0; i < path.length; i += 1) {
158
+ const code = path.charCodeAt(i);
159
+ if (code === 0x22 ||
160
+ code < 0x20 ||
161
+ code === 0x7f ||
162
+ (code >= 0x80 && code <= 0x9f)) {
163
+ return false;
164
+ }
165
+ }
166
+ return true;
167
+ };
147
168
  /**
148
169
  * Metadata for an attachment that was saved on the device for a turn. The
149
170
  * `name` is the on-disk basename under the session's attachments dir (what
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openllmsh/sdk",
3
- "version": "2.10.15-alpha.3",
3
+ "version": "2.10.15-alpha.4",
4
4
  "private": false,
5
5
  "description": "The OpenLLM SDK: typed API contracts, wire-format adapters, the device tunnel, client-side vault crypto, the OpenAPI spec and MCP tools.",
6
6
  "keywords": [