@kaiban/sdk 0.1.3 → 0.1.5

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/index.d.ts CHANGED
@@ -1,14 +1,5 @@
1
1
  export * from './lib/client';
2
2
  export * from './lib/http/errors';
3
3
  export * from './lib/http/types';
4
- export * from './lib/resources/ActivitiesClient';
5
- export * from './lib/resources/AgentsClient';
6
- export * from './lib/resources/BoardsClient';
7
- export * from './lib/resources/CardsClient';
8
- export * from './lib/resources/ExternalChannelsClient';
9
- export * from './lib/resources/ResourcesClient';
10
- export * from './lib/resources/TeamsClient';
11
- export * from './types/a2a-data-parts';
12
4
  export * from './types/entities';
13
- export * from './types/requests';
14
5
  export * from './types/responses';
package/dist/index.js CHANGED
@@ -1,14 +1,5 @@
1
1
  export * from './lib/client';
2
2
  export * from './lib/http/errors';
3
3
  export * from './lib/http/types';
4
- export * from './lib/resources/ActivitiesClient';
5
- export * from './lib/resources/AgentsClient';
6
- export * from './lib/resources/BoardsClient';
7
- export * from './lib/resources/CardsClient';
8
- export * from './lib/resources/ExternalChannelsClient';
9
- export * from './lib/resources/ResourcesClient';
10
- export * from './lib/resources/TeamsClient';
11
- export * from './types/a2a-data-parts';
12
4
  export * from './types/entities';
13
- export * from './types/requests';
14
5
  export * from './types/responses';
@@ -6,8 +6,8 @@ export declare const AgentType: {
6
6
  readonly A2A: "a2a";
7
7
  };
8
8
  export declare const AgentStatus: {
9
- readonly ACTIVE: "active";
10
9
  readonly DRAFT: "draft";
10
+ readonly ACTIVE: "active";
11
11
  readonly INACTIVE: "inactive";
12
12
  };
13
13
  export interface Agent {
@@ -17,7 +17,12 @@ export interface Agent {
17
17
  team_id: string;
18
18
  status: (typeof AgentStatus)[keyof typeof AgentStatus];
19
19
  type: (typeof AgentType)[keyof typeof AgentType];
20
- created_at?: ISODate;
20
+ roles: string[];
21
+ owner_id: string;
22
+ created_by: string;
23
+ monthly_budget: number;
24
+ config?: Record<string, unknown>;
25
+ created_at: ISODate;
21
26
  updated_at?: ISODate;
22
27
  }
23
28
  export declare const AgentFeedbackStatus: {
@@ -5,8 +5,8 @@ export const AgentType = {
5
5
  A2A: 'a2a',
6
6
  };
7
7
  export const AgentStatus = {
8
- ACTIVE: 'active',
9
8
  DRAFT: 'draft',
9
+ ACTIVE: 'active',
10
10
  INACTIVE: 'inactive',
11
11
  };
12
12
  export const AgentFeedbackStatus = {
@@ -1,22 +0,0 @@
1
- export type Empty = Record<string, never>;
2
- export interface ActivitiesBatchRequestItem {
3
- board_id: string;
4
- card_id: string;
5
- team_id: string;
6
- type: string;
7
- description: string;
8
- actor: {
9
- id: string;
10
- type: 'user' | 'agent' | 'system';
11
- name: string;
12
- };
13
- changes?: Array<{
14
- field: string;
15
- old_value: unknown;
16
- new_value: unknown;
17
- }>;
18
- metadata?: Record<string, unknown>;
19
- }
20
- export interface ActivitiesBatchRequest {
21
- items: ActivitiesBatchRequestItem[];
22
- }
@@ -1 +1,19 @@
1
- export {};
1
+ "use strict";
2
+ // export type Empty = Record<string, never>;
3
+ // export interface ActivitiesBatchRequestItem {
4
+ // board_id: string;
5
+ // card_id: string;
6
+ // team_id: string;
7
+ // type: string;
8
+ // description: string;
9
+ // actor: {
10
+ // id: string;
11
+ // type: 'user' | 'agent' | 'system';
12
+ // name: string;
13
+ // };
14
+ // changes?: Array<{ field: string; old_value: unknown; new_value: unknown }>;
15
+ // metadata?: Record<string, unknown>;
16
+ // }
17
+ // export interface ActivitiesBatchRequest {
18
+ // items: ActivitiesBatchRequestItem[];
19
+ // }
@@ -9,37 +9,6 @@ export interface PaginationMeta {
9
9
  /** Cursor for next page, null if no next page */
10
10
  next_cursor: string | null;
11
11
  }
12
- /**
13
- * API meta information returned with each response
14
- */
15
- export interface ResponseMeta {
16
- /** Server timestamp (ISO8601) */
17
- timestamp: string;
18
- /** Request ID included only when server generated it (client did not provide) */
19
- request_id?: string;
20
- }
21
- /**
22
- * Standard error object
23
- */
24
- export interface ApiErrorObject {
25
- code: 'invalid_argument' | 'unauthenticated' | 'permission_denied' | 'not_found' | 'conflict' | 'internal' | 'validation_error' | 'rate_limit_exceeded' | 'bad_gateway' | 'service_unavailable' | 'gateway_timeout' | string;
26
- message: string;
27
- details?: unknown;
28
- }
29
- /**
30
- * Generic success envelope
31
- */
32
- export interface SuccessEnvelope<T> {
33
- data: T;
34
- meta: ResponseMeta;
35
- }
36
- /**
37
- * Generic error envelope
38
- */
39
- export interface ErrorEnvelope {
40
- error: ApiErrorObject;
41
- meta: ResponseMeta;
42
- }
43
12
  /**
44
13
  * Generic paginated response format
45
14
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaiban/sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Official TypeScript SDK for the Kaiban API",
5
5
  "keywords": [
6
6
  "kaiban",
@@ -1,64 +0,0 @@
1
- import { Activity } from './entities';
2
- export declare const A2ADataPartType: {
3
- readonly TOOL_CALL_START: "tool_call_start";
4
- readonly TOOL_CALL_ARGS: "tool_call_args";
5
- readonly TOOL_CALL_END: "tool_call_end";
6
- readonly TOOL_CALL_RESULT: "tool_call_result";
7
- readonly TASK_INFO_MESSAGE: "task_info_message";
8
- readonly TASK_STEP_OUTPUT: "task_step_output";
9
- readonly USER_EVALUATION: "user_evaluation";
10
- readonly USER_THREAD_FEEDBACK: "user_thread_feedback";
11
- readonly KAIBAN_ACTIVITY: "kaiban_activity";
12
- readonly AGENT_STATUS: "agent_status";
13
- };
14
- export type A2ADataPartType = (typeof A2ADataPartType)[keyof typeof A2ADataPartType];
15
- export interface A2ADataPartBase<T extends A2ADataPartType, P extends object> {
16
- data: {
17
- type: T;
18
- } & P;
19
- }
20
- export type ToolCallStartPart = A2ADataPartBase<'tool_call_start', {
21
- toolName: string;
22
- }>;
23
- export type ToolCallArgsPart = A2ADataPartBase<'tool_call_args', {
24
- toolName: string;
25
- args: Record<string, unknown>;
26
- }>;
27
- export type ToolCallEndPart = A2ADataPartBase<'tool_call_end', {
28
- toolName: string;
29
- }>;
30
- export type ToolCallResultPart = A2ADataPartBase<'tool_call_result', {
31
- toolName: string;
32
- result: Record<string, unknown>;
33
- }>;
34
- export type TaskInfoMessagePart = A2ADataPartBase<'task_info_message', {
35
- message: string;
36
- }>;
37
- export type TaskStepOutputPart = A2ADataPartBase<'task_step_output', {
38
- stepName: string;
39
- output?: Record<string, unknown>;
40
- costs?: Array<{
41
- model: string;
42
- inputTokens: number;
43
- outputTokens: number;
44
- totalTokens: number;
45
- reasoningTokens: number;
46
- cachedInputTokens: number;
47
- }>;
48
- duration: number;
49
- }>;
50
- export type UserEvaluationPart = A2ADataPartBase<'user_evaluation', {
51
- messageId: string;
52
- evaluation: 'good' | 'bad';
53
- }>;
54
- export type UserThreadFeedbackPart = A2ADataPartBase<'user_thread_feedback', {
55
- wasHelpful: boolean;
56
- feedback: string;
57
- }>;
58
- export type KaibanActivityPart = A2ADataPartBase<'kaiban_activity', {
59
- activity: Activity;
60
- }>;
61
- export type AgentStatusPart = A2ADataPartBase<'agent_status', {
62
- status: string;
63
- }>;
64
- export type AnyA2ADataPart = ToolCallStartPart | ToolCallArgsPart | ToolCallEndPart | ToolCallResultPart | TaskInfoMessagePart | TaskStepOutputPart | UserEvaluationPart | UserThreadFeedbackPart | KaibanActivityPart | AgentStatusPart;
@@ -1,13 +0,0 @@
1
- // A2A Data Part type identifiers
2
- export const A2ADataPartType = {
3
- TOOL_CALL_START: 'tool_call_start',
4
- TOOL_CALL_ARGS: 'tool_call_args',
5
- TOOL_CALL_END: 'tool_call_end',
6
- TOOL_CALL_RESULT: 'tool_call_result',
7
- TASK_INFO_MESSAGE: 'task_info_message',
8
- TASK_STEP_OUTPUT: 'task_step_output',
9
- USER_EVALUATION: 'user_evaluation',
10
- USER_THREAD_FEEDBACK: 'user_thread_feedback',
11
- KAIBAN_ACTIVITY: 'kaiban_activity',
12
- AGENT_STATUS: 'agent_status',
13
- };