nolo-cli 0.185.0-alpha.3 → 0.186.0-alpha.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.
Files changed (62) hide show
  1. package/{_executeModel-5SGPPCT6.js → _executeModel-35LFG5KF.js} +12 -12
  2. package/{agentDeleteCommand-RUBWHUMZ.js → agentDeleteCommand-TMFQR6QL.js} +11 -11
  3. package/{agentEmailCommands-RXCDWZDW.js → agentEmailCommands-JZ6GYJ4H.js} +13 -13
  4. package/{agentListCommands-PRG4ZBJC.js → agentListCommands-PFZRMIAI.js} +2 -2
  5. package/{agentMachineCommands-SPQ3CCYU.js → agentMachineCommands-BT643ADE.js} +3 -3
  6. package/{agentRecordCommands-AKAQ7BRK.js → agentRecordCommands-LJ5EWR67.js} +12 -12
  7. package/{agentRunCommand-S3VSGTS4.js → agentRunCommand-6CPXONR3.js} +14 -14
  8. package/{agentRuntimeLocal-CBDP2OYK.js → agentRuntimeLocal-3QBUFZEC.js} +2 -2
  9. package/{agentSlice-2PEJP3NV.js → agentSlice-RW25WUPR.js} +1 -1
  10. package/{appDeleteCommands-OP4GGXEJ.js → appDeleteCommands-WEBDQMVH.js} +2 -2
  11. package/{appDeployCommands-LHTVLNL5.js → appDeployCommands-HFZ3I7Z4.js} +2 -2
  12. package/{appDeployStatusCommands-BSDDQU7S.js → appDeployStatusCommands-TVBQOFIY.js} +2 -2
  13. package/{appGetCommands-LNHGUJKF.js → appGetCommands-Y5RKR25C.js} +2 -2
  14. package/{appListCommands-RGOFZV5M.js → appListCommands-4UZIZPB3.js} +2 -2
  15. package/{chunk-D4JCY67U.js → chunk-37ZDGCX6.js} +10 -9
  16. package/{chunk-IOQHM7ID.js → chunk-4ALQFIFF.js} +720 -92
  17. package/{chunk-VXCDYN6M.js → chunk-4GZ2LY5F.js} +12 -8
  18. package/{chunk-MIPGIRJJ.js → chunk-6HFMPUSN.js} +2 -2
  19. package/{chunk-AU7AXHUL.js → chunk-7KWPNGVJ.js} +57 -21
  20. package/{chunk-7DPEOMDL.js → chunk-BRBG72OP.js} +7 -7
  21. package/{chunk-DWTNJZ63.js → chunk-CDUK5BF6.js} +2 -2
  22. package/{chunk-YXTQJ2QR.js → chunk-DK7QNJVM.js} +2 -2
  23. package/{chunk-BJPALUYR.js → chunk-ECAGROXS.js} +2 -2
  24. package/{chunk-M4JDIVIS.js → chunk-IOB5RBBZ.js} +1 -1
  25. package/{chunk-JJU5FBYH.js → chunk-J5Y3BXJP.js} +124 -22
  26. package/{chunk-HRLKX6YP.js → chunk-PEOLOK72.js} +1 -1
  27. package/{chunk-WVIBJBDF.js → chunk-PL6YNOF7.js} +10 -10
  28. package/chunk-Q6RMLYSA.js +385 -0
  29. package/{chunk-CN6T5QKA.js → chunk-QBMO66MI.js} +3 -3
  30. package/{chunk-NCC2SYOD.js → chunk-SIX7N4AH.js} +2 -2
  31. package/{chunk-ZYI6K46I.js → chunk-TB7E6UEO.js} +1 -1
  32. package/{chunk-DBEIHUCJ.js → chunk-VMMS7L64.js} +3 -3
  33. package/{chunk-7YW5OUQE.js → chunk-XJECR5M3.js} +2 -2
  34. package/{chunk-ZU2BF6Q4.js → chunk-ZV6ESGA7.js} +2 -2
  35. package/{chunk-MROMTEHV.js → chunk-ZXUPGFJ5.js} +6 -6
  36. package/{commandRegistry-OTD2XOHY.js → commandRegistry-6EEZMM43.js} +40 -40
  37. package/{contentThunks-BSCTL5G3.js → contentThunks-EPHFLF62.js} +3 -3
  38. package/{createAgentAutomationAction-Y5W2FW3Y.js → createAgentAutomationAction-MFE4QIL4.js} +3 -3
  39. package/{createDialogAction-GIZ7QCRQ.js → createDialogAction-SGOXQ7BC.js} +4 -4
  40. package/{createPageAction-GFH4DXMX.js → createPageAction-OTNUT7WI.js} +3 -3
  41. package/{dialogCommands-6MR232CJ.js → dialogCommands-KNE72SUM.js} +2 -2
  42. package/{dialogSlice-U3X3CBR7.js → dialogSlice-PHPLFD5F.js} +2 -2
  43. package/{docCreateCommands-DAZJ2Y5E.js → docCreateCommands-MG67RHCR.js} +2 -2
  44. package/{docDeleteCommands-XO26LNIO.js → docDeleteCommands-2UAG5JVZ.js} +2 -2
  45. package/{docReadCommands-77XGRLD6.js → docReadCommands-JKJJ4FNU.js} +2 -2
  46. package/{docStore-H2XCYODR.js → docStore-HI7P3MVA.js} +1 -1
  47. package/{docUpdateCommands-QXN3MJAJ.js → docUpdateCommands-6D7ADVPS.js} +2 -2
  48. package/{handleSendMessageAction-MZKFIPYL.js → handleSendMessageAction-YAO4RDWU.js} +8 -8
  49. package/index.js +3 -3
  50. package/{localRuntimeAdapter-E2QDYFTW.js → localRuntimeAdapter-4J62I4YU.js} +11 -11
  51. package/{machineCommands-SQELO6HH.js → machineCommands-XW5I55QW.js} +12 -12
  52. package/{machineWsRunDispatch-E33LUXWG.js → machineWsRunDispatch-W5VEHHMI.js} +12 -12
  53. package/package.json +1 -1
  54. package/{readlineWorkspace-B2MGBCUY.js → readlineWorkspace-EE6JMRIW.js} +14 -14
  55. package/{runAgentClientLoop-JRW5EA5U.js → runAgentClientLoop-BU6GOWQI.js} +10 -10
  56. package/skillDiscovery-F3TMVQOJ.js +28 -0
  57. package/{spaceCommands-PHLKQ2AW.js → spaceCommands-GTQQ6GFS.js} +2 -2
  58. package/{streamAgentChatTurn-CBGAGRQL.js → streamAgentChatTurn-MHRXV7XZ.js} +13 -13
  59. package/{tools-RVVZ2Y6V.js → tools-YA5NIWI7.js} +7 -7
  60. package/{updateDialogTitleAction-2RKLYUPB.js → updateDialogTitleAction-M6U2VK5L.js} +3 -3
  61. package/chunk-VEA7H5FG.js +0 -173
  62. package/skillDiscovery-QC35EQY4.js +0 -18
package/chunk-VEA7H5FG.js DELETED
@@ -1,173 +0,0 @@
1
- import {
2
- MEMORY_USE_GUIDANCE,
3
- wrapHistoricalSummaryWithReplayGuard
4
- } from "./chunk-4VJAC32I.js";
5
-
6
- // packages/agent-runtime/turnContext.ts
7
- var DEFAULT_RECENT_CONTENT_LIMIT = 10;
8
- var asTrimmed = (value) => typeof value === "string" ? value.trim() : "";
9
- var asFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0;
10
- var spaceRecordKey = (spaceId) => spaceId.startsWith("space-") ? spaceId : `space-${spaceId}`;
11
- var makeLayer = (id, content, cacheScope = "turn") => ({ id, owner: "runtime", cacheScope, content });
12
- var renderSpaceStructure = (spaceRecord, recentLimit) => {
13
- const categories = spaceRecord.categories ?? {};
14
- const validCategories = Object.entries(categories).filter((entry) => entry[1] !== null).sort(
15
- (a, b) => asFiniteNumber(a[1].order) - asFiniteNumber(b[1].order)
16
- );
17
- const categoryNameById = /* @__PURE__ */ new Map();
18
- let struct = "Directory Structure (Categories):\n";
19
- if (validCategories.length === 0) struct += "(No categories defined)\n";
20
- validCategories.forEach(([id, category]) => {
21
- const name = asTrimmed(category.name) || id;
22
- categoryNameById.set(id, name);
23
- struct += `- ${name} (ID: ${id})
24
- `;
25
- });
26
- const contents = spaceRecord.contents ?? {};
27
- const recentContents = recentLimit > 0 ? Object.values(contents).filter((content) => content !== null).sort(
28
- (a, b) => asFiniteNumber(b.updatedAt) - asFiniteNumber(a.updatedAt)
29
- ).slice(0, recentLimit) : [];
30
- if (recentContents.length > 0) {
31
- struct += `
32
- Recent Contents (Top ${recentLimit}):
33
- `;
34
- recentContents.forEach((content) => {
35
- const categoryId = asTrimmed(content.categoryId);
36
- const categoryName = categoryId ? categoryNameById.get(categoryId) || "Unknown" : "Uncategorized";
37
- struct += `- [${asTrimmed(content.type) || "content"}] ${asTrimmed(content.title)} (Category: ${categoryName}, dbKey: ${asTrimmed(content.contentKey)})
38
- `;
39
- });
40
- }
41
- return struct;
42
- };
43
- var buildSpaceContextLayer = async (args) => {
44
- const spaceId = asTrimmed(args.spaceId);
45
- if (!spaceId) return null;
46
- const recentLimit = args.recentContentLimit ?? DEFAULT_RECENT_CONTENT_LIMIT;
47
- let spaceRecord = null;
48
- let readError = null;
49
- try {
50
- spaceRecord = await args.source.readRecord(spaceRecordKey(spaceId));
51
- } catch (error) {
52
- readError = error instanceof Error ? error.message : String(error);
53
- }
54
- if (!spaceRecord) {
55
- return makeLayer(
56
- "space-context",
57
- [
58
- "--- \u5F53\u524D\u7A7A\u95F4\uFF08Space\uFF09---",
59
- `\u672C\u5BF9\u8BDD\u8BB0\u5F55\u58F0\u660E\u5C5E\u4E8E Space ${spaceId}\uFF0C\u4F46\u5F53\u524D\u65E0\u6CD5\u8BFB\u53D6\u8BE5 Space \u7684\u6570\u636E${readError ? `\uFF08${readError}\uFF09` : "\uFF08\u8BB0\u5F55\u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u8FBE\uFF09"}\u3002`,
60
- "\u5982\u88AB\u95EE\u53CA\uFF0C\u8BF7\u5982\u5B9E\u8BF4\u660E\u300C\u5BF9\u8BDD\u5C5E\u4E8E\u8BE5 Space \u4F46\u6682\u65F6\u8BFB\u4E0D\u5230\u7A7A\u95F4\u8BE6\u60C5\u300D\uFF0C\u4E0D\u8981\u58F0\u79F0\u5BF9\u8BDD\u4E0D\u5C5E\u4E8E\u4EFB\u4F55\u7A7A\u95F4\u3002"
61
- ].join("\n")
62
- );
63
- }
64
- const name = asTrimmed(spaceRecord.name);
65
- const description = asTrimmed(spaceRecord.description);
66
- const structure = renderSpaceStructure(spaceRecord, recentLimit);
67
- return makeLayer(
68
- "space-context",
69
- [
70
- "--- \u5F53\u524D\u7A7A\u95F4\uFF08Space\uFF09---",
71
- "\u672C\u5BF9\u8BDD\u5C5E\u4E8E\u4EE5\u4E0B Space\uFF1A",
72
- `Space Title: ${name || spaceId}`,
73
- `Space ID: ${spaceId}`,
74
- `Description: ${description || "N/A"}`,
75
- "",
76
- structure.trimEnd()
77
- ].join("\n")
78
- );
79
- };
80
- var buildSkillDiscoveryLayer = (skills, _boundFolder) => {
81
- if (skills.length === 0) return null;
82
- const lines = [
83
- "--- \u53EF\u7528\u6280\u80FD\uFF08Skills\uFF09---",
84
- `\u5DE5\u4F5C\u533A\u4E2D\u53D1\u73B0\u4E86 ${skills.length} \u4E2A\u6280\u80FD\uFF08SKILL.md\uFF09\uFF0C\u6A21\u578B\u53EF\u6309\u9700\u7528 loadSkill \u6309\u540D\u52A0\u8F7D\u6216 readFile \u76F4\u63A5\u8BFB\u53D6\uFF08\u8DEF\u5F84\u89C4\u5219 .agents/skills/<name>/SKILL.md\uFF09\uFF1A`,
85
- ...skills.map(
86
- (s) => `- ${s.name}: ${s.description}`
87
- )
88
- ];
89
- return makeLayer("skill-discovery", lines.join("\n"), "session");
90
- };
91
- var buildAgentsMdLayer = (content, fileName = "AGENTS.md") => {
92
- const trimmed = content.trim();
93
- if (!trimmed) return null;
94
- return makeLayer(
95
- "agents-md",
96
- `--- \u9879\u76EE\u6307\u4EE4\uFF08${fileName}\uFF09---
97
- ${trimmed}`,
98
- "session"
99
- );
100
- };
101
- var buildLinkedSpacesSection = async (args) => {
102
- const ids = (args.linkedSpaceIds ?? []).filter(
103
- (id) => typeof id === "string" && id.trim() !== ""
104
- );
105
- if (ids.length === 0) return null;
106
- const lines = [];
107
- for (const rawId of ids) {
108
- const spaceId = asTrimmed(rawId);
109
- let spaceData = null;
110
- try {
111
- spaceData = await args.source.readRecord(spaceRecordKey(spaceId));
112
- } catch {
113
- spaceData = null;
114
- }
115
- if (spaceData) {
116
- const name = asTrimmed(spaceData.name) || spaceId;
117
- const desc = asTrimmed(spaceData.description);
118
- lines.push(`- ${name} (ID: ${spaceId})${desc ? `: ${desc}` : ""}`);
119
- } else {
120
- lines.push(`- [\u65E0\u6CD5\u8BBF\u95EE] ${spaceId}`);
121
- }
122
- }
123
- if (lines.length === 0) return null;
124
- return [
125
- "--- \u5173\u8054\u7A7A\u95F4 (Linked Spaces) ---",
126
- "\u4EE5\u4E0B\u662F Agent \u53EF\u8BBF\u95EE\u7684\u5176\u4ED6\u5DE5\u4F5C\u7A7A\u95F4\uFF08\u7C97\u7565\u4E0A\u4E0B\u6587\uFF09\uFF1A",
127
- lines.join("\n"),
128
- "",
129
- "\u63D0\u793A\uFF1A\u5982\u9700\u67E5\u8BE2\u8FD9\u4E9B\u7A7A\u95F4\u7684\u8BE6\u7EC6\u5185\u5BB9\uFF0C\u53EF\u4F7F\u7528 read \u5DE5\u5177\u914D\u5408\u5BF9\u5E94\u7684 dbKey\u3002"
130
- ].join("\n");
131
- };
132
- var renderTurnContextBlocksWithScope = (layers) => layers.filter((layer) => Boolean(layer?.content?.trim())).map((layer) => ({
133
- content: layer.content.trim(),
134
- cacheScope: layer.cacheScope
135
- }));
136
- var partitionScopedBlocks = (blocks) => [
137
- ...blocks.filter((block) => block.cacheScope === "session"),
138
- ...blocks.filter((block) => block.cacheScope === "turn")
139
- ];
140
- var buildDialogSummaryLayer = (args) => {
141
- const historical = wrapHistoricalSummaryWithReplayGuard(
142
- asTrimmed(args.summary)
143
- );
144
- if (!historical) return null;
145
- return makeLayer("dialog-summary", `--- \u5386\u53F2\u5BF9\u8BDD\u6458\u8981 ---
146
- ${historical}`);
147
- };
148
- var buildMemoryOverlayLayer = (args) => {
149
- const promptBlock = asTrimmed(args.promptBlock);
150
- if (!promptBlock) return null;
151
- return makeLayer("memory-overlay", promptBlock, "session");
152
- };
153
- var buildMemoryUseGuidanceLayer = (args) => {
154
- const promptBlock = asTrimmed(args.promptBlock);
155
- if (!promptBlock) return null;
156
- return makeLayer(
157
- "memory-use-guidance",
158
- MEMORY_USE_GUIDANCE,
159
- "session"
160
- );
161
- };
162
-
163
- export {
164
- buildSpaceContextLayer,
165
- buildSkillDiscoveryLayer,
166
- buildAgentsMdLayer,
167
- buildLinkedSpacesSection,
168
- renderTurnContextBlocksWithScope,
169
- partitionScopedBlocks,
170
- buildDialogSummaryLayer,
171
- buildMemoryOverlayLayer,
172
- buildMemoryUseGuidanceLayer
173
- };
@@ -1,18 +0,0 @@
1
- import {
2
- buildSkillDiscoveryContextBlock,
3
- buildSkillDiscoveryContextLayer,
4
- discoverSkills,
5
- parseSkillFrontmatter,
6
- resolveSkillByName
7
- } from "./chunk-AU7AXHUL.js";
8
- import "./chunk-KHCLMKZZ.js";
9
- import "./chunk-VEA7H5FG.js";
10
- import "./chunk-4VJAC32I.js";
11
- import "./chunk-4VNS5WPM.js";
12
- export {
13
- buildSkillDiscoveryContextBlock,
14
- buildSkillDiscoveryContextLayer,
15
- discoverSkills,
16
- parseSkillFrontmatter,
17
- resolveSkillByName
18
- };