@finalai/agents 0.17.0 → 0.18.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.
- package/dist/modules/agent-client/project-decisions.d.mts +31 -0
- package/dist/modules/agent-client/project-decisions.mjs +52 -0
- package/dist/modules/agent-client/project-decisions.mjs.map +7 -0
- package/dist/modules/agent-client/project.d.mts +3 -0
- package/dist/modules/agent-client/project.mjs +2 -0
- package/dist/modules/agent-client/project.mjs.map +2 -2
- package/package.json +5 -5
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ProjectDecisionIface, type ProjectDecisionsPageIface, type RaiseProjectDecisionRequestIface, type RespondProjectDecisionRequestIface } from '@finalai/agent-protocol/agent-platform';
|
|
2
|
+
import { type ClientContextIface, type SignalOptionsIface } from "./context.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Decisions in the project outside any conversation: raised by a principal, answered only by the
|
|
5
|
+
* people in their audience.
|
|
6
|
+
*/
|
|
7
|
+
export interface ProjectDecisionsApiIface {
|
|
8
|
+
/** Raises one the caller's principal owns; the same `requestKey` returns the same decision. */
|
|
9
|
+
raise: (args: RaiseProjectDecisionRequestIface & SignalOptionsIface) => Promise<ProjectDecisionIface>;
|
|
10
|
+
/** Open decisions awaiting the caller's answer, newest first. */
|
|
11
|
+
list: (options?: {
|
|
12
|
+
cursor?: string;
|
|
13
|
+
limit?: number;
|
|
14
|
+
} & SignalOptionsIface) => Promise<ProjectDecisionsPageIface>;
|
|
15
|
+
/** One decision, for its owner or a person in its audience. */
|
|
16
|
+
get: (args: {
|
|
17
|
+
decisionId: string;
|
|
18
|
+
} & SignalOptionsIface) => Promise<ProjectDecisionIface>;
|
|
19
|
+
/** Answers it (a person in its audience); first answer wins. */
|
|
20
|
+
respond: (args: {
|
|
21
|
+
decisionId: string;
|
|
22
|
+
} & RespondProjectDecisionRequestIface & SignalOptionsIface) => Promise<ProjectDecisionIface>;
|
|
23
|
+
/** Withdraws it (its owner). */
|
|
24
|
+
cancel: (args: {
|
|
25
|
+
decisionId: string;
|
|
26
|
+
} & SignalOptionsIface) => Promise<ProjectDecisionIface>;
|
|
27
|
+
}
|
|
28
|
+
export declare const createProjectDecisionsApi: (args: {
|
|
29
|
+
context: ClientContextIface;
|
|
30
|
+
projectId: string;
|
|
31
|
+
}) => ProjectDecisionsApiIface;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
projectDecisionResponseSchema,
|
|
3
|
+
projectDecisionsPageSchema,
|
|
4
|
+
raiseProjectDecisionRequestSchema,
|
|
5
|
+
respondProjectDecisionRequestSchema
|
|
6
|
+
} from "@finalai/agent-protocol/agent-platform";
|
|
7
|
+
import { encodePath } from "./context.mjs";
|
|
8
|
+
import { HttpMethod } from "./http.mjs";
|
|
9
|
+
const createProjectDecisionsApi = (args) => {
|
|
10
|
+
const { context } = args;
|
|
11
|
+
const base = `/v1/projects/${encodePath(args.projectId)}/decisions`;
|
|
12
|
+
const one = (decisionId, suffix = "") => `${base}/${encodePath(decisionId)}${suffix}`;
|
|
13
|
+
return {
|
|
14
|
+
raise: async ({ signal, ...body }) => (await context.http.request({
|
|
15
|
+
method: HttpMethod.Post,
|
|
16
|
+
path: base,
|
|
17
|
+
body: { schema: raiseProjectDecisionRequestSchema, value: body },
|
|
18
|
+
response: projectDecisionResponseSchema,
|
|
19
|
+
signal
|
|
20
|
+
})).decision,
|
|
21
|
+
list: (options) => context.http.request({
|
|
22
|
+
method: HttpMethod.Get,
|
|
23
|
+
path: base,
|
|
24
|
+
query: { cursor: options?.cursor, limit: options?.limit },
|
|
25
|
+
response: projectDecisionsPageSchema,
|
|
26
|
+
signal: options?.signal
|
|
27
|
+
}),
|
|
28
|
+
get: async ({ decisionId, signal }) => (await context.http.request({
|
|
29
|
+
method: HttpMethod.Get,
|
|
30
|
+
path: one(decisionId),
|
|
31
|
+
response: projectDecisionResponseSchema,
|
|
32
|
+
signal
|
|
33
|
+
})).decision,
|
|
34
|
+
respond: async ({ decisionId, outcome, signal }) => (await context.http.request({
|
|
35
|
+
method: HttpMethod.Post,
|
|
36
|
+
path: one(decisionId, "/respond"),
|
|
37
|
+
body: { schema: respondProjectDecisionRequestSchema, value: { outcome } },
|
|
38
|
+
response: projectDecisionResponseSchema,
|
|
39
|
+
signal
|
|
40
|
+
})).decision,
|
|
41
|
+
cancel: async ({ decisionId, signal }) => (await context.http.request({
|
|
42
|
+
method: HttpMethod.Post,
|
|
43
|
+
path: one(decisionId, "/cancel"),
|
|
44
|
+
response: projectDecisionResponseSchema,
|
|
45
|
+
signal
|
|
46
|
+
})).decision
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
createProjectDecisionsApi
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=project-decisions.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/agent-client/project-decisions.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n projectDecisionResponseSchema,\n projectDecisionsPageSchema,\n raiseProjectDecisionRequestSchema,\n respondProjectDecisionRequestSchema,\n type ProjectDecisionIface,\n type ProjectDecisionsPageIface,\n type RaiseProjectDecisionRequestIface,\n type RespondProjectDecisionRequestIface,\n} from '@finalai/agent-protocol/agent-platform';\nimport { encodePath, type ClientContextIface, type SignalOptionsIface } from \"./context.mjs\";\nimport { HttpMethod } from \"./http.mjs\";\n\n/**\n * Decisions in the project outside any conversation: raised by a principal, answered only by the\n * people in their audience.\n */\nexport interface ProjectDecisionsApiIface {\n /** Raises one the caller's principal owns; the same `requestKey` returns the same decision. */\n raise: (\n args: RaiseProjectDecisionRequestIface & SignalOptionsIface,\n ) => Promise<ProjectDecisionIface>;\n /** Open decisions awaiting the caller's answer, newest first. */\n list: (\n options?: { cursor?: string; limit?: number } & SignalOptionsIface,\n ) => Promise<ProjectDecisionsPageIface>;\n /** One decision, for its owner or a person in its audience. */\n get: (args: { decisionId: string } & SignalOptionsIface) => Promise<ProjectDecisionIface>;\n /** Answers it (a person in its audience); first answer wins. */\n respond: (\n args: { decisionId: string } & RespondProjectDecisionRequestIface & SignalOptionsIface,\n ) => Promise<ProjectDecisionIface>;\n /** Withdraws it (its owner). */\n cancel: (args: { decisionId: string } & SignalOptionsIface) => Promise<ProjectDecisionIface>;\n}\n\nexport const createProjectDecisionsApi = (args: {\n context: ClientContextIface;\n projectId: string;\n}): ProjectDecisionsApiIface => {\n const { context } = args;\n const base = `/v1/projects/${encodePath(args.projectId)}/decisions`;\n const one = (decisionId: string, suffix = ''): string =>\n `${base}/${encodePath(decisionId)}${suffix}`;\n return {\n raise: async ({ signal, ...body }) =>\n (\n await context.http.request({\n method: HttpMethod.Post,\n path: base,\n body: { schema: raiseProjectDecisionRequestSchema, value: body },\n response: projectDecisionResponseSchema,\n signal,\n })\n ).decision,\n list: (options) =>\n context.http.request({\n method: HttpMethod.Get,\n path: base,\n query: { cursor: options?.cursor, limit: options?.limit },\n response: projectDecisionsPageSchema,\n signal: options?.signal,\n }),\n get: async ({ decisionId, signal }) =>\n (\n await context.http.request({\n method: HttpMethod.Get,\n path: one(decisionId),\n response: projectDecisionResponseSchema,\n signal,\n })\n ).decision,\n respond: async ({ decisionId, outcome, signal }) =>\n (\n await context.http.request({\n method: HttpMethod.Post,\n path: one(decisionId, '/respond'),\n body: { schema: respondProjectDecisionRequestSchema, value: { outcome } },\n response: projectDecisionResponseSchema,\n signal,\n })\n ).decision,\n cancel: async ({ decisionId, signal }) =>\n (\n await context.http.request({\n method: HttpMethod.Post,\n path: one(decisionId, '/cancel'),\n response: projectDecisionResponseSchema,\n signal,\n })\n ).decision,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,kBAAoE;AAC7E,SAAS,kBAAkB;AAyBpB,MAAM,4BAA4B,CAAC,SAGV;AAC9B,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,OAAO,gBAAgB,WAAW,KAAK,SAAS,CAAC;AACvD,QAAM,MAAM,CAAC,YAAoB,SAAS,OACxC,GAAG,IAAI,IAAI,WAAW,UAAU,CAAC,GAAG,MAAM;AAC5C,SAAO;AAAA,IACL,OAAO,OAAO,EAAE,QAAQ,GAAG,KAAK,OAE5B,MAAM,QAAQ,KAAK,QAAQ;AAAA,MACzB,QAAQ,WAAW;AAAA,MACnB,MAAM;AAAA,MACN,MAAM,EAAE,QAAQ,mCAAmC,OAAO,KAAK;AAAA,MAC/D,UAAU;AAAA,MACV;AAAA,IACF,CAAC,GACD;AAAA,IACJ,MAAM,CAAC,YACL,QAAQ,KAAK,QAAQ;AAAA,MACnB,QAAQ,WAAW;AAAA,MACnB,MAAM;AAAA,MACN,OAAO,EAAE,QAAQ,SAAS,QAAQ,OAAO,SAAS,MAAM;AAAA,MACxD,UAAU;AAAA,MACV,QAAQ,SAAS;AAAA,IACnB,CAAC;AAAA,IACH,KAAK,OAAO,EAAE,YAAY,OAAO,OAE7B,MAAM,QAAQ,KAAK,QAAQ;AAAA,MACzB,QAAQ,WAAW;AAAA,MACnB,MAAM,IAAI,UAAU;AAAA,MACpB,UAAU;AAAA,MACV;AAAA,IACF,CAAC,GACD;AAAA,IACJ,SAAS,OAAO,EAAE,YAAY,SAAS,OAAO,OAE1C,MAAM,QAAQ,KAAK,QAAQ;AAAA,MACzB,QAAQ,WAAW;AAAA,MACnB,MAAM,IAAI,YAAY,UAAU;AAAA,MAChC,MAAM,EAAE,QAAQ,qCAAqC,OAAO,EAAE,QAAQ,EAAE;AAAA,MACxE,UAAU;AAAA,MACV;AAAA,IACF,CAAC,GACD;AAAA,IACJ,QAAQ,OAAO,EAAE,YAAY,OAAO,OAEhC,MAAM,QAAQ,KAAK,QAAQ;AAAA,MACzB,QAAQ,WAAW;AAAA,MACnB,MAAM,IAAI,YAAY,SAAS;AAAA,MAC/B,UAAU;AAAA,MACV;AAAA,IACF,CAAC,GACD;AAAA,EACN;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -14,6 +14,7 @@ import { type ProjectSchedulesApiIface } from "./schedules.mjs";
|
|
|
14
14
|
import { type SandboxesApiIface, type SandboxSetupsApiIface } from "./sandboxes.mjs";
|
|
15
15
|
import { type ProjectSessionsApiIface } from "./sessions.mjs";
|
|
16
16
|
import type { AgentStartDepsIface } from "./start.mjs";
|
|
17
|
+
import { type ProjectDecisionsApiIface } from "./project-decisions.mjs";
|
|
17
18
|
export interface ProjectClientIface extends ProjectResourceApiIface {
|
|
18
19
|
readonly id: string;
|
|
19
20
|
sessions: ProjectSessionsApiIface;
|
|
@@ -22,6 +23,8 @@ export interface ProjectClientIface extends ProjectResourceApiIface {
|
|
|
22
23
|
sandboxes: SandboxesApiIface;
|
|
23
24
|
sandboxSetups: SandboxSetupsApiIface;
|
|
24
25
|
integrations: IntegrationsApiIface;
|
|
26
|
+
/** Decisions outside any conversation, answered by the people they ask. */
|
|
27
|
+
decisions: ProjectDecisionsApiIface;
|
|
25
28
|
harnesses: HarnessesApiIface;
|
|
26
29
|
acpAdapters: AcpAdaptersApiIface;
|
|
27
30
|
channels: ProjectChannelsApiIface;
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
createSandboxSetupsApi
|
|
32
32
|
} from "./sandboxes.mjs";
|
|
33
33
|
import { createProjectSessionsApi } from "./sessions.mjs";
|
|
34
|
+
import { createProjectDecisionsApi } from "./project-decisions.mjs";
|
|
34
35
|
const createProjectClient = (args) => {
|
|
35
36
|
const { context, projectId } = args;
|
|
36
37
|
const agents = createProjectAgentsApi({ context, projectId, codec: args.start.codec });
|
|
@@ -44,6 +45,7 @@ const createProjectClient = (args) => {
|
|
|
44
45
|
sandboxes: createSandboxesApi({ context, projectId }),
|
|
45
46
|
sandboxSetups: createSandboxSetupsApi({ context, projectId }),
|
|
46
47
|
integrations: createIntegrationsApi({ context, projectId }),
|
|
48
|
+
decisions: createProjectDecisionsApi({ context, projectId }),
|
|
47
49
|
harnesses: createHarnessesApi({ context, projectId, store }),
|
|
48
50
|
acpAdapters: createAcpAdaptersApi({ context, projectId }),
|
|
49
51
|
channels: createProjectChannelsApi({ context, projectId, sourceOf: args.channelSourceOf }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/agent-client/project.ts"],
|
|
4
|
-
"sourcesContent": ["import { createAllowedEndpointsApi, type AllowedEndpointsApiIface } from \"./organization.mjs\";\nimport type { AgentInput } from \"./agent-input.mjs\";\nimport {\n createChannelAppsApi,\n createProjectChannelsApi,\n type ChannelAppsApiIface,\n type ChannelSourceOf,\n type ProjectChannelsApiIface,\n} from \"./channels.mjs\";\nimport { encodePath, type ClientContextIface } from \"./context.mjs\";\nimport { createProjectConversationsApi, type ProjectConversationsApiIface } from \"./conversations.mjs\";\nimport {\n createEventsApi,\n createEventSubscriptionsApi,\n type EventsApiIface,\n type EventSubscriptionsApiIface,\n} from \"./events.mjs\";\nimport {\n createAcpAdaptersApi,\n createHarnessesApi,\n type AcpAdaptersApiIface,\n type HarnessesApiIface,\n} from \"./harnesses.mjs\";\nimport { createIntegrationsApi, type IntegrationsApiIface } from \"./integrations.mjs\";\nimport {\n createOAuthClientsApi,\n createSignInReturnOriginsApi,\n type OAuthClientsApiIface,\n type SignInReturnOriginsApiIface,\n} from \"./oauth-clients.mjs\";\nimport { createProjectAgentsApi, type ProjectAgentsApiIface } from \"./project-agents.mjs\";\nimport { createProjectResourceApi, type ProjectResourceApiIface } from \"./projects.mjs\";\nimport {\n createProjectPublisherApi,\n createPublicNamesApi,\n type ProjectPublisherApiIface,\n type PublicNamesApiIface,\n} from \"./publishers.mjs\";\nimport { createSandboxProvidersApi, type SandboxProvidersApiIface } from \"./sandbox-providers.mjs\";\nimport { createProjectSchedulesApi, type ProjectSchedulesApiIface } from \"./schedules.mjs\";\nimport {\n createSandboxesApi,\n createSandboxSetupsApi,\n type SandboxesApiIface,\n type SandboxSetupsApiIface,\n} from \"./sandboxes.mjs\";\nimport { createProjectSessionsApi, type ProjectSessionsApiIface } from \"./sessions.mjs\";\nimport type { AgentStartDepsIface } from \"./start.mjs\";\n\n// One project: everything is created through it, and a session can only be\n// provided things from its own project.\n\nexport interface ProjectClientIface extends ProjectResourceApiIface {\n readonly id: string;\n sessions: ProjectSessionsApiIface;\n conversations: ProjectConversationsApiIface;\n agents: ProjectAgentsApiIface;\n sandboxes: SandboxesApiIface;\n sandboxSetups: SandboxSetupsApiIface;\n integrations: IntegrationsApiIface;\n harnesses: HarnessesApiIface;\n acpAdapters: AcpAdaptersApiIface;\n channels: ProjectChannelsApiIface;\n /** Provider application credentials the project's channel installs use. */\n channelApps: ChannelAppsApiIface;\n /** The schedules of the project's conversations. */\n schedules: ProjectSchedulesApiIface;\n /** The event feed for this project and those below it. */\n events: EventsApiIface;\n /** Pushes this project's feed to a URL (`webhooks:write`, project admin). */\n eventSubscriptions: EventSubscriptionsApiIface;\n sandboxProviders: SandboxProvidersApiIface;\n oauthClients: OAuthClientsApiIface;\n signInReturnOrigins: SignInReturnOriginsApiIface;\n /** The project's publisher handle. */\n publisher: ProjectPublisherApiIface;\n /** Which of the project's names resolve as `handle/name` from any organization. */\n publicNames: PublicNamesApiIface;\n /** Where the project lets its secrets go beyond model vendors' own APIs. */\n allowedEndpoints: AllowedEndpointsApiIface;\n}\n\nexport const createProjectClient = (args: {\n context: ClientContextIface;\n start: AgentStartDepsIface;\n channelSourceOf: ChannelSourceOf;\n projectId: string;\n}): ProjectClientIface => {\n const { context, projectId } = args;\n const agents = createProjectAgentsApi({ context, projectId, codec: args.start.codec });\n // The document must be stored before the platform can check a harness against it.\n const store = async (agent: AgentInput, signal?: AbortSignal): Promise<string> =>\n (await agents.store({ agent, signal })).hash;\n return {\n ...createProjectResourceApi({ context, projectId }),\n id: projectId,\n sessions: createProjectSessionsApi({ context, projectId, start: args.start }),\n conversations: createProjectConversationsApi({ context, projectId, start: args.start }),\n agents,\n sandboxes: createSandboxesApi({ context, projectId }),\n sandboxSetups: createSandboxSetupsApi({ context, projectId }),\n integrations: createIntegrationsApi({ context, projectId }),\n harnesses: createHarnessesApi({ context, projectId, store }),\n acpAdapters: createAcpAdaptersApi({ context, projectId }),\n channels: createProjectChannelsApi({ context, projectId, sourceOf: args.channelSourceOf }),\n channelApps: createChannelAppsApi({ context, projectId }),\n schedules: createProjectSchedulesApi({ context, projectId }),\n events: createEventsApi({ context, projectId }),\n eventSubscriptions: createEventSubscriptionsApi({\n context,\n basePath: `/v1/projects/${encodePath(projectId)}/event-subscriptions`,\n }),\n sandboxProviders: createSandboxProvidersApi({ context, projectId }),\n oauthClients: createOAuthClientsApi({ context, projectId }),\n signInReturnOrigins: createSignInReturnOriginsApi({ context, projectId }),\n publisher: createProjectPublisherApi({ context, projectId }),\n publicNames: createPublicNamesApi({ context, projectId }),\n allowedEndpoints: createAllowedEndpointsApi({ context, projectId }),\n };\n};\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,iCAAgE;AAEzE;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AACP,SAAS,kBAA2C;AACpD,SAAS,qCAAwE;AACjF;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,6BAAwD;AACjE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,8BAA0D;AACnE,SAAS,gCAA8D;AACvE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,iCAAgE;AACzE,SAAS,iCAAgE;AACzE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,gCAA8D;
|
|
4
|
+
"sourcesContent": ["import { createAllowedEndpointsApi, type AllowedEndpointsApiIface } from \"./organization.mjs\";\nimport type { AgentInput } from \"./agent-input.mjs\";\nimport {\n createChannelAppsApi,\n createProjectChannelsApi,\n type ChannelAppsApiIface,\n type ChannelSourceOf,\n type ProjectChannelsApiIface,\n} from \"./channels.mjs\";\nimport { encodePath, type ClientContextIface } from \"./context.mjs\";\nimport { createProjectConversationsApi, type ProjectConversationsApiIface } from \"./conversations.mjs\";\nimport {\n createEventsApi,\n createEventSubscriptionsApi,\n type EventsApiIface,\n type EventSubscriptionsApiIface,\n} from \"./events.mjs\";\nimport {\n createAcpAdaptersApi,\n createHarnessesApi,\n type AcpAdaptersApiIface,\n type HarnessesApiIface,\n} from \"./harnesses.mjs\";\nimport { createIntegrationsApi, type IntegrationsApiIface } from \"./integrations.mjs\";\nimport {\n createOAuthClientsApi,\n createSignInReturnOriginsApi,\n type OAuthClientsApiIface,\n type SignInReturnOriginsApiIface,\n} from \"./oauth-clients.mjs\";\nimport { createProjectAgentsApi, type ProjectAgentsApiIface } from \"./project-agents.mjs\";\nimport { createProjectResourceApi, type ProjectResourceApiIface } from \"./projects.mjs\";\nimport {\n createProjectPublisherApi,\n createPublicNamesApi,\n type ProjectPublisherApiIface,\n type PublicNamesApiIface,\n} from \"./publishers.mjs\";\nimport { createSandboxProvidersApi, type SandboxProvidersApiIface } from \"./sandbox-providers.mjs\";\nimport { createProjectSchedulesApi, type ProjectSchedulesApiIface } from \"./schedules.mjs\";\nimport {\n createSandboxesApi,\n createSandboxSetupsApi,\n type SandboxesApiIface,\n type SandboxSetupsApiIface,\n} from \"./sandboxes.mjs\";\nimport { createProjectSessionsApi, type ProjectSessionsApiIface } from \"./sessions.mjs\";\nimport type { AgentStartDepsIface } from \"./start.mjs\";\nimport { createProjectDecisionsApi, type ProjectDecisionsApiIface } from \"./project-decisions.mjs\";\n\n// One project: everything is created through it, and a session can only be\n// provided things from its own project.\n\nexport interface ProjectClientIface extends ProjectResourceApiIface {\n readonly id: string;\n sessions: ProjectSessionsApiIface;\n conversations: ProjectConversationsApiIface;\n agents: ProjectAgentsApiIface;\n sandboxes: SandboxesApiIface;\n sandboxSetups: SandboxSetupsApiIface;\n integrations: IntegrationsApiIface;\n /** Decisions outside any conversation, answered by the people they ask. */\n decisions: ProjectDecisionsApiIface;\n harnesses: HarnessesApiIface;\n acpAdapters: AcpAdaptersApiIface;\n channels: ProjectChannelsApiIface;\n /** Provider application credentials the project's channel installs use. */\n channelApps: ChannelAppsApiIface;\n /** The schedules of the project's conversations. */\n schedules: ProjectSchedulesApiIface;\n /** The event feed for this project and those below it. */\n events: EventsApiIface;\n /** Pushes this project's feed to a URL (`webhooks:write`, project admin). */\n eventSubscriptions: EventSubscriptionsApiIface;\n sandboxProviders: SandboxProvidersApiIface;\n oauthClients: OAuthClientsApiIface;\n signInReturnOrigins: SignInReturnOriginsApiIface;\n /** The project's publisher handle. */\n publisher: ProjectPublisherApiIface;\n /** Which of the project's names resolve as `handle/name` from any organization. */\n publicNames: PublicNamesApiIface;\n /** Where the project lets its secrets go beyond model vendors' own APIs. */\n allowedEndpoints: AllowedEndpointsApiIface;\n}\n\nexport const createProjectClient = (args: {\n context: ClientContextIface;\n start: AgentStartDepsIface;\n channelSourceOf: ChannelSourceOf;\n projectId: string;\n}): ProjectClientIface => {\n const { context, projectId } = args;\n const agents = createProjectAgentsApi({ context, projectId, codec: args.start.codec });\n // The document must be stored before the platform can check a harness against it.\n const store = async (agent: AgentInput, signal?: AbortSignal): Promise<string> =>\n (await agents.store({ agent, signal })).hash;\n return {\n ...createProjectResourceApi({ context, projectId }),\n id: projectId,\n sessions: createProjectSessionsApi({ context, projectId, start: args.start }),\n conversations: createProjectConversationsApi({ context, projectId, start: args.start }),\n agents,\n sandboxes: createSandboxesApi({ context, projectId }),\n sandboxSetups: createSandboxSetupsApi({ context, projectId }),\n integrations: createIntegrationsApi({ context, projectId }),\n decisions: createProjectDecisionsApi({ context, projectId }),\n harnesses: createHarnessesApi({ context, projectId, store }),\n acpAdapters: createAcpAdaptersApi({ context, projectId }),\n channels: createProjectChannelsApi({ context, projectId, sourceOf: args.channelSourceOf }),\n channelApps: createChannelAppsApi({ context, projectId }),\n schedules: createProjectSchedulesApi({ context, projectId }),\n events: createEventsApi({ context, projectId }),\n eventSubscriptions: createEventSubscriptionsApi({\n context,\n basePath: `/v1/projects/${encodePath(projectId)}/event-subscriptions`,\n }),\n sandboxProviders: createSandboxProvidersApi({ context, projectId }),\n oauthClients: createOAuthClientsApi({ context, projectId }),\n signInReturnOrigins: createSignInReturnOriginsApi({ context, projectId }),\n publisher: createProjectPublisherApi({ context, projectId }),\n publicNames: createPublicNamesApi({ context, projectId }),\n allowedEndpoints: createAllowedEndpointsApi({ context, projectId }),\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iCAAgE;AAEzE;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AACP,SAAS,kBAA2C;AACpD,SAAS,qCAAwE;AACjF;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,6BAAwD;AACjE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,8BAA0D;AACnE,SAAS,gCAA8D;AACvE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,iCAAgE;AACzE,SAAS,iCAAgE;AACzE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,gCAA8D;AAEvE,SAAS,iCAAgE;AAqClE,MAAM,sBAAsB,CAAC,SAKV;AACxB,QAAM,EAAE,SAAS,UAAU,IAAI;AAC/B,QAAM,SAAS,uBAAuB,EAAE,SAAS,WAAW,OAAO,KAAK,MAAM,MAAM,CAAC;AAErF,QAAM,QAAQ,OAAO,OAAmB,YACrC,MAAM,OAAO,MAAM,EAAE,OAAO,OAAO,CAAC,GAAG;AAC1C,SAAO;AAAA,IACL,GAAG,yBAAyB,EAAE,SAAS,UAAU,CAAC;AAAA,IAClD,IAAI;AAAA,IACJ,UAAU,yBAAyB,EAAE,SAAS,WAAW,OAAO,KAAK,MAAM,CAAC;AAAA,IAC5E,eAAe,8BAA8B,EAAE,SAAS,WAAW,OAAO,KAAK,MAAM,CAAC;AAAA,IACtF;AAAA,IACA,WAAW,mBAAmB,EAAE,SAAS,UAAU,CAAC;AAAA,IACpD,eAAe,uBAAuB,EAAE,SAAS,UAAU,CAAC;AAAA,IAC5D,cAAc,sBAAsB,EAAE,SAAS,UAAU,CAAC;AAAA,IAC1D,WAAW,0BAA0B,EAAE,SAAS,UAAU,CAAC;AAAA,IAC3D,WAAW,mBAAmB,EAAE,SAAS,WAAW,MAAM,CAAC;AAAA,IAC3D,aAAa,qBAAqB,EAAE,SAAS,UAAU,CAAC;AAAA,IACxD,UAAU,yBAAyB,EAAE,SAAS,WAAW,UAAU,KAAK,gBAAgB,CAAC;AAAA,IACzF,aAAa,qBAAqB,EAAE,SAAS,UAAU,CAAC;AAAA,IACxD,WAAW,0BAA0B,EAAE,SAAS,UAAU,CAAC;AAAA,IAC3D,QAAQ,gBAAgB,EAAE,SAAS,UAAU,CAAC;AAAA,IAC9C,oBAAoB,4BAA4B;AAAA,MAC9C;AAAA,MACA,UAAU,gBAAgB,WAAW,SAAS,CAAC;AAAA,IACjD,CAAC;AAAA,IACD,kBAAkB,0BAA0B,EAAE,SAAS,UAAU,CAAC;AAAA,IAClE,cAAc,sBAAsB,EAAE,SAAS,UAAU,CAAC;AAAA,IAC1D,qBAAqB,6BAA6B,EAAE,SAAS,UAAU,CAAC;AAAA,IACxE,WAAW,0BAA0B,EAAE,SAAS,UAAU,CAAC;AAAA,IAC3D,aAAa,qBAAqB,EAAE,SAAS,UAAU,CAAC;AAAA,IACxD,kBAAkB,0BAA0B,EAAE,SAAS,UAAU,CAAC;AAAA,EACpE;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finalai/agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Agent authoring, client APIs, and CLI.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
117
|
"@agentclientprotocol/sdk": "1.8.0",
|
|
118
|
-
"@finalai/agent-definition": "0.
|
|
119
|
-
"@finalai/agent-protocol": "0.
|
|
120
|
-
"@finalai/agent-provider": "0.
|
|
121
|
-
"@finalai/final-agent-provider": "0.
|
|
118
|
+
"@finalai/agent-definition": "0.15.0",
|
|
119
|
+
"@finalai/agent-protocol": "0.15.0",
|
|
120
|
+
"@finalai/agent-provider": "0.16.0",
|
|
121
|
+
"@finalai/final-agent-provider": "0.17.1",
|
|
122
122
|
"@finalai/websockets": "0.1.8",
|
|
123
123
|
"ws": "^8.21.3",
|
|
124
124
|
"zod": "4.6.6"
|