@agent-native/core 0.101.6 → 0.101.7
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 +6 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/artifact-response.ts +255 -12
- package/corpus/core/src/agent/thread-data-builder.ts +84 -11
- package/corpus/core/src/integrations/a2a-continuation-processor.ts +99 -7
- package/corpus/core/src/integrations/adapters/discord.ts +3 -1
- package/corpus/core/src/integrations/adapters/email.ts +4 -1
- package/corpus/core/src/integrations/adapters/google-docs.ts +4 -1
- package/corpus/core/src/integrations/adapters/microsoft-teams.ts +3 -1
- package/corpus/core/src/integrations/adapters/slack.ts +38 -9
- package/corpus/core/src/integrations/adapters/telegram.ts +32 -10
- package/corpus/core/src/integrations/adapters/whatsapp.ts +5 -1
- package/corpus/core/src/integrations/index.ts +1 -0
- package/corpus/core/src/integrations/types.ts +9 -2
- package/corpus/core/src/integrations/webhook-handler.ts +69 -45
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +1 -0
- package/corpus/templates/content/.agents/skills/content/SKILL.md +31 -0
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +35 -21
- package/corpus/templates/content/AGENTS.md +29 -7
- package/corpus/templates/content/actions/_database-source-utils.ts +30 -16
- package/corpus/templates/content/actions/_database-utils.ts +15 -1
- package/corpus/templates/content/actions/_local-file-documents.ts +53 -1
- package/corpus/templates/content/actions/_property-utils.ts +7 -1
- package/corpus/templates/content/actions/configure-document-property.ts +11 -0
- package/corpus/templates/content/actions/create-content-database.ts +11 -0
- package/corpus/templates/content/actions/create-document.ts +9 -0
- package/corpus/templates/content/actions/create-inline-content-database.ts +3 -0
- package/corpus/templates/content/actions/export-content-source.ts +1 -0
- package/corpus/templates/content/actions/get-content-database.ts +13 -1
- package/corpus/templates/content/actions/get-document.ts +12 -2
- package/corpus/templates/content/actions/import-content-source.ts +6 -0
- package/corpus/templates/content/actions/list-documents.ts +3 -0
- package/corpus/templates/content/actions/pull-document.ts +2 -0
- package/corpus/templates/content/actions/search-documents.ts +5 -1
- package/corpus/templates/content/actions/update-document.ts +16 -1
- package/corpus/templates/content/actions/view-screen.ts +15 -2
- package/corpus/templates/content/app/components/editor/DescriptionField.tsx +121 -0
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +14 -0
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +223 -34
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +56 -8
- package/corpus/templates/content/app/i18n/zh-TW.ts +5 -0
- package/corpus/templates/content/app/i18n-data.ts +52 -0
- package/corpus/templates/content/changelog/2026-07-14-pages-and-databases-can-describe-themselves-with-guidance-fo.md +6 -0
- package/corpus/templates/content/changelog/2026-07-14-slack-follow-ups-now-retain-created-content-identity-and-per.md +6 -0
- package/corpus/templates/content/server/db/schema.ts +4 -0
- package/corpus/templates/content/server/lib/document-context.ts +76 -0
- package/corpus/templates/content/server/lib/public-documents.ts +3 -0
- package/corpus/templates/content/server/plugins/db.ts +6 -0
- package/corpus/templates/content/server/routes/api/document-agent-context.json.get.ts +5 -0
- package/corpus/templates/content/shared/api.ts +17 -0
- package/corpus/templates/content/shared/content-source.ts +7 -0
- package/corpus/templates/content/shared/properties.ts +2 -0
- package/dist/a2a/artifact-response.d.ts +15 -0
- package/dist/a2a/artifact-response.d.ts.map +1 -1
- package/dist/a2a/artifact-response.js +204 -5
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +6 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +71 -8
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/integrations/a2a-continuation-processor.d.ts.map +1 -1
- package/dist/integrations/a2a-continuation-processor.js +72 -6
- package/dist/integrations/a2a-continuation-processor.js.map +1 -1
- package/dist/integrations/adapters/discord.d.ts.map +1 -1
- package/dist/integrations/adapters/discord.js +1 -0
- package/dist/integrations/adapters/discord.js.map +1 -1
- package/dist/integrations/adapters/email.d.ts.map +1 -1
- package/dist/integrations/adapters/email.js +2 -0
- package/dist/integrations/adapters/email.js.map +1 -1
- package/dist/integrations/adapters/google-docs.d.ts.map +1 -1
- package/dist/integrations/adapters/google-docs.js +2 -0
- package/dist/integrations/adapters/google-docs.js.map +1 -1
- package/dist/integrations/adapters/microsoft-teams.d.ts.map +1 -1
- package/dist/integrations/adapters/microsoft-teams.js +1 -0
- package/dist/integrations/adapters/microsoft-teams.js.map +1 -1
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +21 -6
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/adapters/telegram.d.ts.map +1 -1
- package/dist/integrations/adapters/telegram.js +11 -2
- package/dist/integrations/adapters/telegram.js.map +1 -1
- package/dist/integrations/adapters/whatsapp.d.ts.map +1 -1
- package/dist/integrations/adapters/whatsapp.js +3 -0
- package/dist/integrations/adapters/whatsapp.js.map +1 -1
- package/dist/integrations/index.d.ts +1 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/types.d.ts +8 -2
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/types.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +40 -43
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/observability/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +1 -0
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../../src/integrations/adapters/slack.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,
|
|
1
|
+
{"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../../src/integrations/adapters/slack.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAShB,MAAM,aAAa,CAAC;AAwDrB,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7E,kEAAkE;IAClE,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACxE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAC1B,OAAO,GAAE,mBAAwB,GAChC,eAAe,CAskBjB"}
|
|
@@ -339,8 +339,7 @@ export function slackAdapter(options = {}) {
|
|
|
339
339
|
async sendResponse(message, context, opts) {
|
|
340
340
|
const token = await resolveBotToken(context);
|
|
341
341
|
if (!token) {
|
|
342
|
-
|
|
343
|
-
return;
|
|
342
|
+
throw new Error("[slack] Cannot deliver response: no Slack bot token is configured");
|
|
344
343
|
}
|
|
345
344
|
const channelId = context.platformContext.channelId;
|
|
346
345
|
const threadTs = context.platformContext.threadTs;
|
|
@@ -359,6 +358,7 @@ export function slackAdapter(options = {}) {
|
|
|
359
358
|
return;
|
|
360
359
|
}
|
|
361
360
|
const restChunks = chunks.slice(1);
|
|
361
|
+
const messageRefs = [];
|
|
362
362
|
const finalBlocks = blocks ??
|
|
363
363
|
buildResponseBlocks(firstChunk, {
|
|
364
364
|
threadDeepLinkUrl: message.platformContext
|
|
@@ -387,11 +387,18 @@ export function slackAdapter(options = {}) {
|
|
|
387
387
|
if (!data.ok) {
|
|
388
388
|
console.error("[slack] chat.update error:", data.error);
|
|
389
389
|
// Fall back to a fresh post so the user still sees a reply
|
|
390
|
-
await postFresh(token, channelId, threadTs, baseBody);
|
|
390
|
+
const postedTs = await postFresh(token, channelId, threadTs, baseBody);
|
|
391
|
+
if (postedTs)
|
|
392
|
+
messageRefs.push(postedTs);
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
messageRefs.push(data.ts || placeholderRef);
|
|
391
396
|
}
|
|
392
397
|
}
|
|
393
398
|
else {
|
|
394
|
-
await postFresh(token, channelId, threadTs, baseBody);
|
|
399
|
+
const postedTs = await postFresh(token, channelId, threadTs, baseBody);
|
|
400
|
+
if (postedTs)
|
|
401
|
+
messageRefs.push(postedTs);
|
|
395
402
|
}
|
|
396
403
|
// Clear the AI-assistant "is thinking…" status now that we've
|
|
397
404
|
// delivered the final answer. Empty status clears it.
|
|
@@ -400,14 +407,20 @@ export function slackAdapter(options = {}) {
|
|
|
400
407
|
}
|
|
401
408
|
// Overflow chunks (rare) — post as plain follow-ups in the same thread
|
|
402
409
|
for (const chunk of restChunks) {
|
|
403
|
-
await postFresh(token, channelId, threadTs, {
|
|
410
|
+
const postedTs = await postFresh(token, channelId, threadTs, {
|
|
404
411
|
channel: channelId,
|
|
405
412
|
text: chunk,
|
|
406
413
|
unfurl_links: false,
|
|
407
414
|
unfurl_media: false,
|
|
408
415
|
mrkdwn: true,
|
|
409
416
|
});
|
|
417
|
+
if (postedTs)
|
|
418
|
+
messageRefs.push(postedTs);
|
|
410
419
|
}
|
|
420
|
+
return {
|
|
421
|
+
status: "delivered",
|
|
422
|
+
...(messageRefs.length > 0 ? { messageRefs } : {}),
|
|
423
|
+
};
|
|
411
424
|
}
|
|
412
425
|
catch (err) {
|
|
413
426
|
console.error("[slack] Failed to send message:", err);
|
|
@@ -818,7 +831,7 @@ async function postFresh(token, channelId, threadTs, body) {
|
|
|
818
831
|
if (typeof body.text === "string" &&
|
|
819
832
|
body.text.trim().length === 0 &&
|
|
820
833
|
!hasBlocks) {
|
|
821
|
-
return;
|
|
834
|
+
return undefined;
|
|
822
835
|
}
|
|
823
836
|
const payload = {
|
|
824
837
|
...body,
|
|
@@ -839,6 +852,7 @@ async function postFresh(token, channelId, threadTs, body) {
|
|
|
839
852
|
console.error("[slack] chat.postMessage error:", data.error);
|
|
840
853
|
throw new Error(data.error || "chat.postMessage failed");
|
|
841
854
|
}
|
|
855
|
+
return data.ts;
|
|
842
856
|
}
|
|
843
857
|
async function slackApiFetch(url, init, timeoutMs = SLACK_API_TIMEOUT_MS) {
|
|
844
858
|
const controller = typeof AbortController !== "undefined" ? new AbortController() : undefined;
|
|
@@ -1565,6 +1579,7 @@ function createSlackRunProgress(token, incoming, channel, threadTs, streamTs) {
|
|
|
1565
1579
|
: {}),
|
|
1566
1580
|
});
|
|
1567
1581
|
setSlackAssistantStatus(token, channel, threadTs, "");
|
|
1582
|
+
return { status: "delivered", messageRefs: [streamTs] };
|
|
1568
1583
|
},
|
|
1569
1584
|
async fail(message) {
|
|
1570
1585
|
if (pendingTimer)
|