|
|
|
@ -14,13 +14,19 @@ const { |
|
|
|
parseAgentPage, |
|
|
|
shouldSendIdempotencyKey, |
|
|
|
} = await import("../client/src/sections/superAgent/utils/agentApiParse.js"); |
|
|
|
const { superAgentServiceApiTable } = await import("../client/src/utils/superAgentApiTable.js"); |
|
|
|
const { |
|
|
|
superAgentFrameworkProxyMatch, |
|
|
|
superAgentServiceProxyMatch, |
|
|
|
superAgentServiceApiTable, |
|
|
|
} = await import("../client/src/utils/superAgentApiTable.js"); |
|
|
|
const { |
|
|
|
isUploadIntentExpired, |
|
|
|
normalizeAttachmentUploadIntent, |
|
|
|
} = await import("../client/src/sections/superAgent/utils/attachmentUpload.js"); |
|
|
|
|
|
|
|
test("new api table uses live agent paths", () => { |
|
|
|
assert.equal(superAgentServiceProxyMatch, "/_super-agent"); |
|
|
|
assert.equal(superAgentFrameworkProxyMatch, "/_super-agent-framework"); |
|
|
|
assert.equal(superAgentServiceApiTable.tasksets, "/tasksets"); |
|
|
|
assert.equal(superAgentServiceApiTable.conversations, "/conversations"); |
|
|
|
assert.equal( |
|
|
|
@ -82,6 +88,7 @@ test("adapter source exchanges login token for agent jwt and omits identity head |
|
|
|
const protocol = read("..", "api", "app", "controllers", "superAgentProtocol.js"); |
|
|
|
const actions = read("client", "src", "sections", "superAgent", "actions", "api.js"); |
|
|
|
const resources = read("client", "src", "sections", "superAgent", "actions", "agentResources.js"); |
|
|
|
const config = read("config.cjs"); |
|
|
|
const chatHook = read("client", "src", "sections", "superAgent", "hooks", "useSuperAgentChat.js"); |
|
|
|
const uploadUtils = read("client", "src", "sections", "superAgent", "utils", "attachmentUpload.js"); |
|
|
|
assert.doesNotMatch(table, /\/api\/v1\/tasks/); |
|
|
|
@ -98,6 +105,13 @@ test("adapter source exchanges login token for agent jwt and omits identity head |
|
|
|
assert.match(protocol, /\/threads\/\$\{encodeURIComponent/); |
|
|
|
assert.match(actions, /requestAgentJson/); |
|
|
|
assert.match(resources, /createAttachmentUploadIntent/); |
|
|
|
assert.match(resources, /service: "framework"/); |
|
|
|
assert.match(config, /FS_SUPER_AGENT_BUSINESS_API/); |
|
|
|
assert.match(config, /FS_SUPER_AGENT_FRAMEWORK_API/); |
|
|
|
assert.match(config, /_super-agent-framework/); |
|
|
|
assert.match(agentApi, /buildSuperAgentServiceUrl = \(path = "", service = superAgentBusinessService\)/); |
|
|
|
assert.match(agentApi, /superAgentFrameworkProxyMatch/); |
|
|
|
assert.match(agentApi, /getSuperAgentFrameworkApiUrl/); |
|
|
|
assert.match(resources, /completeAttachmentUpload/); |
|
|
|
assert.match(resources, /listAttachments/); |
|
|
|
assert.match(chatHook, /createAttachmentUploadIntent\(conversationId/); |
|
|
|
|