@codelia/runtime 0.1.57 → 0.1.58
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/dist/index.cjs +20 -20
- package/dist/index.js +20 -20
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -5127,7 +5127,7 @@ var applyReplacements = (content, matches, replacement) => {
|
|
|
5127
5127
|
var hashContent = (content) => import_node_crypto4.default.createHash("sha256").update(content).digest("hex");
|
|
5128
5128
|
var createEditTool = (sandboxKey, outputCacheStore) => (0, import_core6.defineTool)({
|
|
5129
5129
|
name: "edit",
|
|
5130
|
-
description: "Edit a file by replacing
|
|
5130
|
+
description: "Edit a file by replacing matched text with new text; supports guarded match modes and dry-run preview.",
|
|
5131
5131
|
input: import_zod5.z.object({
|
|
5132
5132
|
file_path: import_zod5.z.string().describe(
|
|
5133
5133
|
"File path. Sandbox-bounded unless full-access mode is active."
|
|
@@ -5138,7 +5138,7 @@ var createEditTool = (sandboxKey, outputCacheStore) => (0, import_core6.defineTo
|
|
|
5138
5138
|
new_string: import_zod5.z.string().describe("Replacement text."),
|
|
5139
5139
|
replace_all: import_zod5.z.boolean().optional().describe("Replace all matches when true. Default false."),
|
|
5140
5140
|
match_mode: import_zod5.z.enum(["exact", "line_trimmed", "block_anchor", "auto"]).optional().describe(
|
|
5141
|
-
"Match strategy: exact, line_trimmed, block_anchor, or auto. Default auto."
|
|
5141
|
+
"Match strategy: exact, line_trimmed, block_anchor, or auto (tries exact -> line_trimmed -> block_anchor). Default auto."
|
|
5142
5142
|
),
|
|
5143
5143
|
expected_replacements: import_zod5.z.number().int().nonnegative().optional().describe("Expected replacement count (guard)."),
|
|
5144
5144
|
dry_run: import_zod5.z.boolean().optional().describe("Preview diff only when true. Default false."),
|
|
@@ -6047,13 +6047,13 @@ var buildTruncatedLinesSummary = (lineNumbers) => {
|
|
|
6047
6047
|
};
|
|
6048
6048
|
var createReadTool = (sandboxKey) => (0, import_core8.defineTool)({
|
|
6049
6049
|
name: "read",
|
|
6050
|
-
description: "Read a text
|
|
6050
|
+
description: "Read a bounded text-file preview by 0-based line offset/limit; large output is truncated and long lines should fall back to read_line.",
|
|
6051
6051
|
input: import_zod7.z.object({
|
|
6052
6052
|
file_path: import_zod7.z.string().describe(
|
|
6053
|
-
"
|
|
6053
|
+
"Text file path. Sandbox-bounded unless full-access mode is active."
|
|
6054
6054
|
),
|
|
6055
6055
|
offset: import_zod7.z.number().int().nonnegative().optional().describe("0-based start line. Default 0."),
|
|
6056
|
-
limit: import_zod7.z.number().int().positive().optional().describe("Max lines to read. Default 2000.")
|
|
6056
|
+
limit: import_zod7.z.number().int().positive().optional().describe("Max preview lines to read. Default 2000.")
|
|
6057
6057
|
}),
|
|
6058
6058
|
execute: async (input, ctx) => {
|
|
6059
6059
|
let resolved;
|
|
@@ -6162,14 +6162,14 @@ var GRAPHEME_SEGMENTER = new Intl.Segmenter(void 0, {
|
|
|
6162
6162
|
var splitGraphemes = (value) => Array.from(GRAPHEME_SEGMENTER.segment(value), ({ segment }) => segment);
|
|
6163
6163
|
var createReadLineTool = (sandboxKey) => (0, import_core9.defineTool)({
|
|
6164
6164
|
name: "read_line",
|
|
6165
|
-
description: "Read
|
|
6165
|
+
description: "Read one physical line as paged grapheme-based text by 1-based line number and 0-based char offset.",
|
|
6166
6166
|
input: import_zod8.z.object({
|
|
6167
6167
|
file_path: import_zod8.z.string().describe(
|
|
6168
|
-
"
|
|
6168
|
+
"Text file path. Sandbox-bounded unless full-access mode is active."
|
|
6169
6169
|
),
|
|
6170
6170
|
line_number: import_zod8.z.number().int().positive().describe("1-based line number to read."),
|
|
6171
|
-
char_offset: import_zod8.z.number().int().nonnegative().optional().describe("0-based
|
|
6172
|
-
char_limit: import_zod8.z.number().int().positive().max(MAX_CHAR_LIMIT).optional().describe(
|
|
6171
|
+
char_offset: import_zod8.z.number().int().nonnegative().optional().describe("0-based grapheme offset in the target line. Default 0."),
|
|
6172
|
+
char_limit: import_zod8.z.number().int().positive().max(MAX_CHAR_LIMIT).optional().describe(`Max graphemes to return. Default 10000, Max ${MAX_CHAR_LIMIT}.`)
|
|
6173
6173
|
}),
|
|
6174
6174
|
execute: async (input, ctx) => {
|
|
6175
6175
|
let resolved;
|
|
@@ -7606,7 +7606,7 @@ var createSkillSearchTool = (skillsResolverKey) => (0, import_core13.defineTool)
|
|
|
7606
7606
|
description: "Search installed local skills by name, description, or path.",
|
|
7607
7607
|
input: import_zod12.z.object({
|
|
7608
7608
|
query: import_zod12.z.string().min(1).describe("Search query text."),
|
|
7609
|
-
limit: import_zod12.z.number().int().positive().optional().describe("Optional max result count
|
|
7609
|
+
limit: import_zod12.z.number().int().positive().optional().describe("Optional max result count. Higher values may be clamped by config."),
|
|
7610
7610
|
scope: import_zod12.z.enum(["repo", "user"]).optional().describe("Optional scope filter.")
|
|
7611
7611
|
}),
|
|
7612
7612
|
execute: async (input, ctx) => {
|
|
@@ -8063,13 +8063,13 @@ var resolveImageMime = (filePath) => {
|
|
|
8063
8063
|
};
|
|
8064
8064
|
var createViewImageTool = (sandboxKey) => (0, import_core17.defineTool)({
|
|
8065
8065
|
name: "view_image",
|
|
8066
|
-
description: "Load
|
|
8066
|
+
description: "Load one local png/jpeg/webp/gif image (default max 5MB) for multimodal inspection.",
|
|
8067
8067
|
input: import_zod16.z.object({
|
|
8068
8068
|
file_path: import_zod16.z.string().describe(
|
|
8069
|
-
"
|
|
8069
|
+
"Single local png/jpeg/webp/gif image path. Sandbox-bounded unless full-access mode is active."
|
|
8070
8070
|
),
|
|
8071
|
-
detail: import_zod16.z.enum(["auto", "low", "high"]).optional().describe("
|
|
8072
|
-
max_bytes: import_zod16.z.number().int().positive().max(MAX_MAX_BYTES).optional().describe("Max
|
|
8071
|
+
detail: import_zod16.z.enum(["auto", "low", "high"]).optional().describe("Model image-detail hint (`auto`/`low`/`high`). Default auto."),
|
|
8072
|
+
max_bytes: import_zod16.z.number().int().positive().max(MAX_MAX_BYTES).optional().describe("Max file size in bytes. Default 5242880, Max 10485760.")
|
|
8073
8073
|
}),
|
|
8074
8074
|
execute: async (input, ctx) => {
|
|
8075
8075
|
let resolved;
|
|
@@ -8375,12 +8375,12 @@ var classifyFetchError = (error, timeoutMs) => {
|
|
|
8375
8375
|
};
|
|
8376
8376
|
var createWebfetchTool = () => (0, import_core18.defineTool)({
|
|
8377
8377
|
name: "webfetch",
|
|
8378
|
-
description: "Fetch an HTTP(S) URL and return bounded markdown
|
|
8378
|
+
description: "Fetch an HTTP(S) URL and return bounded normalized markdown/text/html for textual content, not binary downloads.",
|
|
8379
8379
|
input: import_zod17.z.object({
|
|
8380
8380
|
url: import_zod17.z.string().min(1).describe("HTTP(S) URL to fetch."),
|
|
8381
|
-
output_format: import_zod17.z.enum(["markdown", "text", "html"]).optional().describe("
|
|
8382
|
-
timeout_ms: import_zod17.z.number().int().positive().max(MAX_TIMEOUT_MS).optional().describe(
|
|
8383
|
-
max_bytes: import_zod17.z.number().int().positive().max(MAX_MAX_BYTES2).optional().describe(
|
|
8381
|
+
output_format: import_zod17.z.enum(["markdown", "text", "html"]).optional().describe("Normalized output format. Default markdown."),
|
|
8382
|
+
timeout_ms: import_zod17.z.number().int().positive().max(MAX_TIMEOUT_MS).optional().describe(`Fetch timeout in ms. Default ${DEFAULT_TIMEOUT_MS3}, Max ${MAX_TIMEOUT_MS}.`),
|
|
8383
|
+
max_bytes: import_zod17.z.number().int().positive().max(MAX_MAX_BYTES2).optional().describe(`Max response bytes to keep. Default ${DEFAULT_MAX_BYTES3}, Max ${MAX_MAX_BYTES2}.`)
|
|
8384
8384
|
}),
|
|
8385
8385
|
execute: async (input) => {
|
|
8386
8386
|
let url;
|
|
@@ -8452,12 +8452,12 @@ var import_core19 = require("@codelia/core");
|
|
|
8452
8452
|
var import_zod18 = require("zod");
|
|
8453
8453
|
var createWriteTool = (sandboxKey, outputCacheStore) => (0, import_core19.defineTool)({
|
|
8454
8454
|
name: "write",
|
|
8455
|
-
description: "Write text to a file, creating parent directories if needed.",
|
|
8455
|
+
description: "Write full UTF-8 text to a file, replacing any existing contents and creating parent directories if needed.",
|
|
8456
8456
|
input: import_zod18.z.object({
|
|
8457
8457
|
file_path: import_zod18.z.string().describe(
|
|
8458
8458
|
"File path. Sandbox-bounded unless full-access mode is active."
|
|
8459
8459
|
),
|
|
8460
|
-
content: import_zod18.z.string().describe("UTF-8 text content to write.")
|
|
8460
|
+
content: import_zod18.z.string().describe("Full replacement UTF-8 text content to write.")
|
|
8461
8461
|
}),
|
|
8462
8462
|
execute: async (input, ctx) => {
|
|
8463
8463
|
let resolved;
|
package/dist/index.js
CHANGED
|
@@ -5129,7 +5129,7 @@ var applyReplacements = (content, matches, replacement) => {
|
|
|
5129
5129
|
var hashContent = (content) => crypto4.createHash("sha256").update(content).digest("hex");
|
|
5130
5130
|
var createEditTool = (sandboxKey, outputCacheStore) => defineTool4({
|
|
5131
5131
|
name: "edit",
|
|
5132
|
-
description: "Edit a file by replacing
|
|
5132
|
+
description: "Edit a file by replacing matched text with new text; supports guarded match modes and dry-run preview.",
|
|
5133
5133
|
input: z5.object({
|
|
5134
5134
|
file_path: z5.string().describe(
|
|
5135
5135
|
"File path. Sandbox-bounded unless full-access mode is active."
|
|
@@ -5140,7 +5140,7 @@ var createEditTool = (sandboxKey, outputCacheStore) => defineTool4({
|
|
|
5140
5140
|
new_string: z5.string().describe("Replacement text."),
|
|
5141
5141
|
replace_all: z5.boolean().optional().describe("Replace all matches when true. Default false."),
|
|
5142
5142
|
match_mode: z5.enum(["exact", "line_trimmed", "block_anchor", "auto"]).optional().describe(
|
|
5143
|
-
"Match strategy: exact, line_trimmed, block_anchor, or auto. Default auto."
|
|
5143
|
+
"Match strategy: exact, line_trimmed, block_anchor, or auto (tries exact -> line_trimmed -> block_anchor). Default auto."
|
|
5144
5144
|
),
|
|
5145
5145
|
expected_replacements: z5.number().int().nonnegative().optional().describe("Expected replacement count (guard)."),
|
|
5146
5146
|
dry_run: z5.boolean().optional().describe("Preview diff only when true. Default false."),
|
|
@@ -6049,13 +6049,13 @@ var buildTruncatedLinesSummary = (lineNumbers) => {
|
|
|
6049
6049
|
};
|
|
6050
6050
|
var createReadTool = (sandboxKey) => defineTool6({
|
|
6051
6051
|
name: "read",
|
|
6052
|
-
description: "Read a text
|
|
6052
|
+
description: "Read a bounded text-file preview by 0-based line offset/limit; large output is truncated and long lines should fall back to read_line.",
|
|
6053
6053
|
input: z7.object({
|
|
6054
6054
|
file_path: z7.string().describe(
|
|
6055
|
-
"
|
|
6055
|
+
"Text file path. Sandbox-bounded unless full-access mode is active."
|
|
6056
6056
|
),
|
|
6057
6057
|
offset: z7.number().int().nonnegative().optional().describe("0-based start line. Default 0."),
|
|
6058
|
-
limit: z7.number().int().positive().optional().describe("Max lines to read. Default 2000.")
|
|
6058
|
+
limit: z7.number().int().positive().optional().describe("Max preview lines to read. Default 2000.")
|
|
6059
6059
|
}),
|
|
6060
6060
|
execute: async (input, ctx) => {
|
|
6061
6061
|
let resolved;
|
|
@@ -6164,14 +6164,14 @@ var GRAPHEME_SEGMENTER = new Intl.Segmenter(void 0, {
|
|
|
6164
6164
|
var splitGraphemes = (value) => Array.from(GRAPHEME_SEGMENTER.segment(value), ({ segment }) => segment);
|
|
6165
6165
|
var createReadLineTool = (sandboxKey) => defineTool7({
|
|
6166
6166
|
name: "read_line",
|
|
6167
|
-
description: "Read
|
|
6167
|
+
description: "Read one physical line as paged grapheme-based text by 1-based line number and 0-based char offset.",
|
|
6168
6168
|
input: z8.object({
|
|
6169
6169
|
file_path: z8.string().describe(
|
|
6170
|
-
"
|
|
6170
|
+
"Text file path. Sandbox-bounded unless full-access mode is active."
|
|
6171
6171
|
),
|
|
6172
6172
|
line_number: z8.number().int().positive().describe("1-based line number to read."),
|
|
6173
|
-
char_offset: z8.number().int().nonnegative().optional().describe("0-based
|
|
6174
|
-
char_limit: z8.number().int().positive().max(MAX_CHAR_LIMIT).optional().describe(
|
|
6173
|
+
char_offset: z8.number().int().nonnegative().optional().describe("0-based grapheme offset in the target line. Default 0."),
|
|
6174
|
+
char_limit: z8.number().int().positive().max(MAX_CHAR_LIMIT).optional().describe(`Max graphemes to return. Default 10000, Max ${MAX_CHAR_LIMIT}.`)
|
|
6175
6175
|
}),
|
|
6176
6176
|
execute: async (input, ctx) => {
|
|
6177
6177
|
let resolved;
|
|
@@ -7610,7 +7610,7 @@ var createSkillSearchTool = (skillsResolverKey) => defineTool11({
|
|
|
7610
7610
|
description: "Search installed local skills by name, description, or path.",
|
|
7611
7611
|
input: z12.object({
|
|
7612
7612
|
query: z12.string().min(1).describe("Search query text."),
|
|
7613
|
-
limit: z12.number().int().positive().optional().describe("Optional max result count
|
|
7613
|
+
limit: z12.number().int().positive().optional().describe("Optional max result count. Higher values may be clamped by config."),
|
|
7614
7614
|
scope: z12.enum(["repo", "user"]).optional().describe("Optional scope filter.")
|
|
7615
7615
|
}),
|
|
7616
7616
|
execute: async (input, ctx) => {
|
|
@@ -8067,13 +8067,13 @@ var resolveImageMime = (filePath) => {
|
|
|
8067
8067
|
};
|
|
8068
8068
|
var createViewImageTool = (sandboxKey) => defineTool15({
|
|
8069
8069
|
name: "view_image",
|
|
8070
|
-
description: "Load
|
|
8070
|
+
description: "Load one local png/jpeg/webp/gif image (default max 5MB) for multimodal inspection.",
|
|
8071
8071
|
input: z16.object({
|
|
8072
8072
|
file_path: z16.string().describe(
|
|
8073
|
-
"
|
|
8073
|
+
"Single local png/jpeg/webp/gif image path. Sandbox-bounded unless full-access mode is active."
|
|
8074
8074
|
),
|
|
8075
|
-
detail: z16.enum(["auto", "low", "high"]).optional().describe("
|
|
8076
|
-
max_bytes: z16.number().int().positive().max(MAX_MAX_BYTES).optional().describe("Max
|
|
8075
|
+
detail: z16.enum(["auto", "low", "high"]).optional().describe("Model image-detail hint (`auto`/`low`/`high`). Default auto."),
|
|
8076
|
+
max_bytes: z16.number().int().positive().max(MAX_MAX_BYTES).optional().describe("Max file size in bytes. Default 5242880, Max 10485760.")
|
|
8077
8077
|
}),
|
|
8078
8078
|
execute: async (input, ctx) => {
|
|
8079
8079
|
let resolved;
|
|
@@ -8379,12 +8379,12 @@ var classifyFetchError = (error, timeoutMs) => {
|
|
|
8379
8379
|
};
|
|
8380
8380
|
var createWebfetchTool = () => defineTool16({
|
|
8381
8381
|
name: "webfetch",
|
|
8382
|
-
description: "Fetch an HTTP(S) URL and return bounded markdown
|
|
8382
|
+
description: "Fetch an HTTP(S) URL and return bounded normalized markdown/text/html for textual content, not binary downloads.",
|
|
8383
8383
|
input: z17.object({
|
|
8384
8384
|
url: z17.string().min(1).describe("HTTP(S) URL to fetch."),
|
|
8385
|
-
output_format: z17.enum(["markdown", "text", "html"]).optional().describe("
|
|
8386
|
-
timeout_ms: z17.number().int().positive().max(MAX_TIMEOUT_MS).optional().describe(
|
|
8387
|
-
max_bytes: z17.number().int().positive().max(MAX_MAX_BYTES2).optional().describe(
|
|
8385
|
+
output_format: z17.enum(["markdown", "text", "html"]).optional().describe("Normalized output format. Default markdown."),
|
|
8386
|
+
timeout_ms: z17.number().int().positive().max(MAX_TIMEOUT_MS).optional().describe(`Fetch timeout in ms. Default ${DEFAULT_TIMEOUT_MS3}, Max ${MAX_TIMEOUT_MS}.`),
|
|
8387
|
+
max_bytes: z17.number().int().positive().max(MAX_MAX_BYTES2).optional().describe(`Max response bytes to keep. Default ${DEFAULT_MAX_BYTES3}, Max ${MAX_MAX_BYTES2}.`)
|
|
8388
8388
|
}),
|
|
8389
8389
|
execute: async (input) => {
|
|
8390
8390
|
let url;
|
|
@@ -8456,12 +8456,12 @@ import { defineTool as defineTool17 } from "@codelia/core";
|
|
|
8456
8456
|
import { z as z18 } from "zod";
|
|
8457
8457
|
var createWriteTool = (sandboxKey, outputCacheStore) => defineTool17({
|
|
8458
8458
|
name: "write",
|
|
8459
|
-
description: "Write text to a file, creating parent directories if needed.",
|
|
8459
|
+
description: "Write full UTF-8 text to a file, replacing any existing contents and creating parent directories if needed.",
|
|
8460
8460
|
input: z18.object({
|
|
8461
8461
|
file_path: z18.string().describe(
|
|
8462
8462
|
"File path. Sandbox-bounded unless full-access mode is active."
|
|
8463
8463
|
),
|
|
8464
|
-
content: z18.string().describe("UTF-8 text content to write.")
|
|
8464
|
+
content: z18.string().describe("Full replacement UTF-8 text content to write.")
|
|
8465
8465
|
}),
|
|
8466
8466
|
execute: async (input, ctx) => {
|
|
8467
8467
|
let resolved;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codelia/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20 <25"
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"typecheck": "tsc --noEmit"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@codelia/config": "0.1.
|
|
27
|
-
"@codelia/config-loader": "0.1.
|
|
28
|
-
"@codelia/core": "0.1.
|
|
29
|
-
"@codelia/logger": "0.1.
|
|
30
|
-
"@codelia/model-metadata": "0.1.
|
|
31
|
-
"@codelia/protocol": "0.1.
|
|
32
|
-
"@codelia/shared-types": "0.1.
|
|
33
|
-
"@codelia/storage": "0.1.
|
|
26
|
+
"@codelia/config": "0.1.58",
|
|
27
|
+
"@codelia/config-loader": "0.1.58",
|
|
28
|
+
"@codelia/core": "0.1.58",
|
|
29
|
+
"@codelia/logger": "0.1.58",
|
|
30
|
+
"@codelia/model-metadata": "0.1.58",
|
|
31
|
+
"@codelia/protocol": "0.1.58",
|
|
32
|
+
"@codelia/shared-types": "0.1.58",
|
|
33
|
+
"@codelia/storage": "0.1.58",
|
|
34
34
|
"eventsource-parser": "^3.0.6",
|
|
35
35
|
"oauth4webapi": "^3.8.4",
|
|
36
36
|
"zod": "^4.3.5"
|