@agent-native/core 0.131.7 → 0.131.9
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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +24 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/application-state/store.ts +18 -31
- package/corpus/core/src/cli/create.ts +115 -16
- package/corpus/core/src/client/AssistantChat.tsx +10 -2
- package/corpus/core/src/client/frame-protocol.ts +5 -1
- package/corpus/core/src/workspace-files/tool.ts +18 -11
- package/corpus/templates/clips/actions/generate-workflow.ts +6 -4
- package/corpus/templates/clips/actions/reconcile-workflow-generation.ts +257 -0
- package/corpus/templates/clips/app/hooks/use-auto-title.ts +166 -4
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +1 -1
- package/corpus/templates/clips/changelog/2026-07-27-stopped-agent-runs-no-longer-leave-generated-workflow-cards-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-30-workflow-generation-now-stops-retrying-after-repeated-failur.md +6 -0
- package/corpus/templates/clips/shared/workflow.ts +5 -0
- package/dist/application-state/store.d.ts.map +1 -1
- package/dist/application-state/store.js +20 -36
- package/dist/application-state/store.js.map +1 -1
- package/dist/cli/create.d.ts +8 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +98 -16
- package/dist/cli/create.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +10 -2
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/frame-protocol.d.ts +1 -0
- package/dist/client/frame-protocol.d.ts.map +1 -1
- package/dist/client/frame-protocol.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/workspace-files/tool.d.ts.map +1 -1
- package/dist/workspace-files/tool.js +18 -11
- package/dist/workspace-files/tool.js.map +1 -1
- package/package.json +3 -3
- package/src/application-state/store.ts +18 -31
- package/src/cli/create.ts +115 -16
- package/src/client/AssistantChat.tsx +10 -2
- package/src/client/frame-protocol.ts +5 -1
- package/src/workspace-files/tool.ts +18 -11
|
@@ -86,13 +86,16 @@ export function createWorkspaceFilesTool(): Record<string, ActionEntry> {
|
|
|
86
86
|
'MIME type for new files. Default: "text/plain". Use "application/json" for JSON, "text/markdown" for Markdown.',
|
|
87
87
|
},
|
|
88
88
|
offset: {
|
|
89
|
-
type: "
|
|
89
|
+
type: "integer",
|
|
90
|
+
minimum: 0,
|
|
90
91
|
description:
|
|
91
|
-
"
|
|
92
|
+
"Non-negative character offset to start reading from (for paging large files). Default: 0.",
|
|
92
93
|
},
|
|
93
94
|
maxChars: {
|
|
94
|
-
type: "
|
|
95
|
-
|
|
95
|
+
type: "integer",
|
|
96
|
+
minimum: 1,
|
|
97
|
+
maximum: MAX_READ_CHARS,
|
|
98
|
+
description: `Positive maximum characters to return when reading. Default: ${DEFAULT_READ_CHARS}. Max: ${MAX_READ_CHARS}.`,
|
|
96
99
|
},
|
|
97
100
|
pattern: {
|
|
98
101
|
type: "string",
|
|
@@ -168,16 +171,19 @@ export function createWorkspaceFilesTool(): Record<string, ActionEntry> {
|
|
|
168
171
|
if (!path) return "Error: path is required for read.";
|
|
169
172
|
const rawOffset = Number(args.offset);
|
|
170
173
|
const offset =
|
|
171
|
-
Number.isFinite(rawOffset) && rawOffset > 0
|
|
174
|
+
Number.isFinite(rawOffset) && rawOffset > 0
|
|
175
|
+
? Math.floor(rawOffset)
|
|
176
|
+
: 0;
|
|
172
177
|
const rawMax = Number(args.maxChars);
|
|
173
178
|
const maxChars =
|
|
174
179
|
Number.isFinite(rawMax) && rawMax > 0
|
|
175
|
-
? Math.min(rawMax, MAX_READ_CHARS)
|
|
180
|
+
? Math.min(Math.max(1, Math.floor(rawMax)), MAX_READ_CHARS)
|
|
176
181
|
: DEFAULT_READ_CHARS;
|
|
177
182
|
|
|
183
|
+
// The sentinel character distinguishes an exact page from a truncated one.
|
|
178
184
|
const file = await readWorkspaceFile(scope, path, {
|
|
179
185
|
offset,
|
|
180
|
-
maxChars,
|
|
186
|
+
maxChars: maxChars + 1,
|
|
181
187
|
});
|
|
182
188
|
if (!file) {
|
|
183
189
|
return JSON.stringify({
|
|
@@ -186,19 +192,20 @@ export function createWorkspaceFilesTool(): Record<string, ActionEntry> {
|
|
|
186
192
|
});
|
|
187
193
|
}
|
|
188
194
|
|
|
189
|
-
const truncated = file.content.length
|
|
195
|
+
const truncated = file.content.length > maxChars;
|
|
196
|
+
const content = file.content.slice(0, maxChars);
|
|
190
197
|
return JSON.stringify({
|
|
191
198
|
ok: true,
|
|
192
199
|
path: file.path,
|
|
193
200
|
contentType: file.contentType,
|
|
194
201
|
sizeBytes: file.sizeBytes,
|
|
195
202
|
updatedAt: file.updatedAt,
|
|
196
|
-
content
|
|
203
|
+
content,
|
|
197
204
|
...(truncated
|
|
198
205
|
? {
|
|
199
206
|
truncated: true,
|
|
200
|
-
nextOffset: offset +
|
|
201
|
-
hint: `File has more content. Call again with offset: ${offset +
|
|
207
|
+
nextOffset: offset + content.length,
|
|
208
|
+
hint: `File has more content. Call again with offset: ${offset + content.length}`,
|
|
202
209
|
}
|
|
203
210
|
: {}),
|
|
204
211
|
});
|