@ai-setting/roy-agent-core 1.5.37 → 1.5.40
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/config/index.js +4 -3
- package/dist/env/agent/index.js +10 -9
- package/dist/env/commands/index.js +7 -6
- package/dist/env/context/index.js +21 -0
- package/dist/env/debug/index.js +4 -3
- package/dist/env/event-source/index.js +12 -6
- package/dist/env/hook/index.js +2 -1
- package/dist/env/index.js +41 -18
- package/dist/env/llm/index.js +8 -7
- package/dist/env/log-trace/index.js +10 -9
- package/dist/env/mcp/index.js +8 -7
- package/dist/env/mcp/tool/index.js +4 -4
- package/dist/env/memory/index.js +12 -11
- package/dist/env/memory/plugin/index.js +4 -4
- package/dist/env/plugin/index.js +18 -0
- package/dist/env/prompt/index.js +7 -6
- package/dist/env/session/index.js +11 -10
- package/dist/env/session/storage/index.js +2 -6
- package/dist/env/skill/index.js +7 -6
- package/dist/env/task/delegate/index.js +6 -5
- package/dist/env/task/index.js +10 -8
- package/dist/env/task/plugins/index.js +13 -6
- package/dist/env/task/storage/index.js +4 -4
- package/dist/env/tool/built-in/index.js +3 -3
- package/dist/env/tool/index.js +8 -7
- package/dist/env/workflow/engine/index.js +5 -5
- package/dist/env/workflow/index.js +9 -8
- package/dist/env/workflow/storage/index.js +5 -5
- package/dist/env/workflow/tools/index.js +3 -3
- package/dist/env/workflow/utils/index.js +4 -4
- package/dist/index.js +67 -60
- package/dist/shared/@ai-setting/{roy-agent-core-44hnfb02.js → roy-agent-core-10n2jh7p.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-xt3fx7m1.js → roy-agent-core-15x8fe5h.js} +38 -56
- package/dist/shared/@ai-setting/{roy-agent-core-1akcqxj9.js → roy-agent-core-1bfmxx89.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ty94k28r.js → roy-agent-core-2jnzv9at.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-3jywqmdd.js → roy-agent-core-2x07feb7.js} +317 -65
- package/dist/shared/@ai-setting/{roy-agent-core-cefh9hjv.js → roy-agent-core-4jqq077c.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-xs5rsgat.js → roy-agent-core-58k274fg.js} +108 -23
- package/dist/shared/@ai-setting/{roy-agent-core-mx489p7f.js → roy-agent-core-728h32vx.js} +263 -33
- package/dist/shared/@ai-setting/{roy-agent-core-jfh9q2qh.js → roy-agent-core-7b35emr7.js} +0 -15
- package/dist/shared/@ai-setting/{roy-agent-core-3rr5k71j.js → roy-agent-core-8n4bz6y3.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-zpn0bqa8.js → roy-agent-core-9ffsvvcf.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-az13yzmc.js +11 -0
- package/dist/shared/@ai-setting/{roy-agent-core-0wdjp769.js → roy-agent-core-b4wd9tn6.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-6kvtahqv.js → roy-agent-core-c3ct1346.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-psv4v63c.js → roy-agent-core-c6592r3c.js} +19 -2
- package/dist/shared/@ai-setting/{roy-agent-core-c2wjwx16.js → roy-agent-core-c8f2hync.js} +305 -287
- package/dist/shared/@ai-setting/roy-agent-core-cevpwnq7.js +147 -0
- package/dist/shared/@ai-setting/{roy-agent-core-hkb529dw.js → roy-agent-core-dxbsc1zy.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-vqspcspb.js → roy-agent-core-e130w7mv.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-j0ke54vy.js → roy-agent-core-ee6nnnqw.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-qdmt6nz7.js → roy-agent-core-eg6nv09z.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-hd1z20yq.js → roy-agent-core-frx4p6d1.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-bvr1761x.js → roy-agent-core-hsxn8m1j.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-86gphny5.js → roy-agent-core-jqy2mdyq.js} +15 -1
- package/dist/shared/@ai-setting/{roy-agent-core-c0d3dtjd.js → roy-agent-core-kajktp3d.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-eajcvp4e.js → roy-agent-core-kwhv9dcd.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-r9ezzemr.js → roy-agent-core-m0wp34r4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-fg1kxf70.js → roy-agent-core-nqgrjja0.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-d7cyjkf7.js → roy-agent-core-pwkk12p4.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-97ma0pr5.js → roy-agent-core-pxcrzyv9.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-zgypchmt.js → roy-agent-core-q5qj0fes.js} +19 -11
- package/dist/shared/@ai-setting/{roy-agent-core-sx7wsvnn.js → roy-agent-core-qakqwbbh.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-qfdp3pvq.js → roy-agent-core-rsybkb38.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-ty33mnr7.js +14 -0
- package/dist/shared/@ai-setting/{roy-agent-core-3prpabp8.js → roy-agent-core-v53rfk99.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-wjd5kars.js → roy-agent-core-wb43x8hd.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-e2vk2qh7.js → roy-agent-core-yc543gnq.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-gf2c2pxr.js → roy-agent-core-ycg9rk6z.js} +3 -3
- package/dist/shared/@ai-setting/roy-agent-core-z33en0cz.js +44 -0
- package/dist/shared/@ai-setting/{roy-agent-core-by55z88t.js → roy-agent-core-zrja5v78.js} +11 -11
- package/dist/shared/@ai-setting/{roy-agent-core-wft9ra24.js → roy-agent-core-zwp3jp02.js} +4 -4
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-bcbqy27c.js +0 -14
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-qxhq8ven.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseComponent
|
|
7
|
-
} from "./roy-agent-core-
|
|
7
|
+
} from "./roy-agent-core-4jqq077c.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
init_logger
|
|
11
|
-
} from "./roy-agent-core-
|
|
11
|
+
} from "./roy-agent-core-10n2jh7p.js";
|
|
12
12
|
|
|
13
13
|
// src/env/commands/commands-component.ts
|
|
14
14
|
import path2 from "path";
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
} from "./roy-agent-core-fs0mn2jk.js";
|
|
5
5
|
|
|
6
6
|
// src/env/log-trace/span-storage.ts
|
|
7
|
+
function isSpanStorageDebugEnabled() {
|
|
8
|
+
return process.env.ROY_TRACE_DEBUG_STORAGE === "1" || process.env.ROY_TRACE_DEBUG === "1";
|
|
9
|
+
}
|
|
7
10
|
function getDatabaseClass() {
|
|
8
11
|
if (typeof Bun !== "undefined") {
|
|
9
12
|
const { Database } = __require("bun:sqlite");
|
|
@@ -74,15 +77,29 @@ class SQLiteSpanStorage {
|
|
|
74
77
|
this.initialized = true;
|
|
75
78
|
}
|
|
76
79
|
save(span) {
|
|
77
|
-
if (!this.db)
|
|
80
|
+
if (!this.db) {
|
|
81
|
+
if (isSpanStorageDebugEnabled()) {
|
|
82
|
+
console.log(`[SpanStorage] save() skipped: db not initialized for span "${span.name}" traceId=${span.traceId}`);
|
|
83
|
+
}
|
|
78
84
|
return;
|
|
85
|
+
}
|
|
79
86
|
const stmt = this.db.prepare(`
|
|
80
87
|
INSERT OR REPLACE INTO span
|
|
81
88
|
(span_id, trace_id, parent_span_id, name, kind, status, start_time, end_time, attributes, result, error, time_created)
|
|
82
89
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
83
90
|
`);
|
|
84
91
|
const resultValue = span.result !== undefined && span.result !== null ? typeof span.result === "string" ? span.result : JSON.stringify(span.result) : null;
|
|
85
|
-
|
|
92
|
+
if (isSpanStorageDebugEnabled()) {
|
|
93
|
+
console.log(`[SpanStorage] Saving to "${this.dbPath}": name="${span.name}" traceId=${span.traceId} spanId=${span.spanId} status=${span.status}`);
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
const result = stmt.run(span.spanId, span.traceId, span.parentSpanId || null, span.name, span.kind, span.status, span.startTime, span.endTime || null, JSON.stringify(span.attributes), resultValue, span.error || null, Date.now());
|
|
97
|
+
if (isSpanStorageDebugEnabled()) {
|
|
98
|
+
console.log(`[SpanStorage] Save result: changes=${result?.changes}, lastInsertRowid=${result?.lastInsertRowid}`);
|
|
99
|
+
}
|
|
100
|
+
} catch (err) {
|
|
101
|
+
console.error(`[SpanStorage] Save ERROR:`, err);
|
|
102
|
+
}
|
|
86
103
|
}
|
|
87
104
|
saveBatch(spans) {
|
|
88
105
|
for (const span of spans) {
|