@getmodus/sdk 0.10.0 → 0.11.0
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/CHANGELOG.md +5 -2
- package/README.md +8 -1
- package/dist/{_client-base-H5rt5EGy.d.cts → _client-base-DdnxB9JA.d.cts} +289 -25
- package/dist/{_client-base-H5rt5EGy.d.ts → _client-base-DdnxB9JA.d.ts} +289 -25
- package/dist/{chunk-NA3ZD35T.cjs → chunk-3MHHVC6C.cjs} +14 -2
- package/dist/chunk-3MHHVC6C.cjs.map +1 -0
- package/dist/{chunk-BMYCORZF.js → chunk-JVTQBBMZ.js} +14 -2
- package/dist/chunk-JVTQBBMZ.js.map +1 -0
- package/dist/index.cjs +157 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -8
- package/dist/index.d.ts +32 -8
- package/dist/index.js +36 -7
- package/dist/index.js.map +1 -1
- package/dist/management/index.cjs +259 -259
- package/dist/management/index.cjs.map +1 -1
- package/dist/management/index.d.cts +3 -3
- package/dist/management/index.d.ts +3 -3
- package/dist/management/index.js +3 -3
- package/dist/management/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-BMYCORZF.js.map +0 -1
- package/dist/chunk-NA3ZD35T.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HttpClient, c as components, M as ModusConfig, P as Page, V as VariationView, S as Scope, a as ScopeConversationsResource, C as Conversation, b as ConversationKind, d as ConversationListItem, W as WorkflowType, e as Workflow, f as
|
|
2
|
-
export { A as Agent,
|
|
1
|
+
import { H as HttpClient, c as components, M as ModusConfig, P as Page, V as VariationView, S as Scope, a as ScopeConversationsResource, C as Conversation, b as ConversationKind, d as ConversationListItem, W as WorkflowType, e as Workflow, f as ContextItemsQuery, g as ContextItemsQueryResult, h as ContextItem, i as ContextItemLookupRow, j as CustomContextItemsResource, k as ModusClientBase, l as ModusOptions } from './_client-base-DdnxB9JA.cjs';
|
|
2
|
+
export { A as Agent, m as AgentType, n as ContextItemAccessUpdate, o as ContextItemAncestor, p as ContextItemDeletion, q as ContextItemMove, r as ContextType, s as CreateCustomContextItemInput, t as CreatedCustomContextItem, u as CustomAttributeInput, v as CustomContextItemDeletion, w as CustomContextItemKind, x as CustomContextItemRelationInput, y as Message, O as OPERATIONS, z as OperationId, B as OperationSpec, D as ScopeStatus, E as ScopeVariation, F as Skill, G as SkillStatus, I as SkillVariation, J as SupervisionView, U as UpdateContextItemAccessInput, K as UpdateCustomContextItemInput, L as conversationScopeId, N as conversationSkillId, Q as operations, R as paths } from './_client-base-DdnxB9JA.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Base class for all Modus SDK errors.
|
|
@@ -1092,6 +1092,34 @@ declare class WorkflowsResource extends WorkflowsResourceBase {
|
|
|
1092
1092
|
chat(workflowId: number | string, message: string, options: ChatOptions): ChatSession;
|
|
1093
1093
|
}
|
|
1094
1094
|
|
|
1095
|
+
/** Generated base for the consumption `context.items` resource. */
|
|
1096
|
+
declare class ContextItemsResourceBase {
|
|
1097
|
+
protected readonly http: HttpClient;
|
|
1098
|
+
protected readonly config: ModusConfig;
|
|
1099
|
+
/** @internal */
|
|
1100
|
+
constructor(http: HttpClient, config: ModusConfig);
|
|
1101
|
+
/**
|
|
1102
|
+
* Query context items with SQL.
|
|
1103
|
+
*
|
|
1104
|
+
* Runs one read-only SQL statement over the `context_items` table and returns its rows. The query
|
|
1105
|
+
* sees only the items you can read. A query that is not read-only or not valid returns 400; one
|
|
1106
|
+
* that runs past 20 s returns 422.
|
|
1107
|
+
*
|
|
1108
|
+
* **Requires:** `context:read`
|
|
1109
|
+
*
|
|
1110
|
+
* @param query - Request body; see `ContextItemsQuery`.
|
|
1111
|
+
*
|
|
1112
|
+
* @example
|
|
1113
|
+
* ```ts
|
|
1114
|
+
* const result = await modus.context.items.query({
|
|
1115
|
+
* sql: 'SELECT context_type, count(*) AS items FROM context_items GROUP BY context_type',
|
|
1116
|
+
* })
|
|
1117
|
+
* result.rows
|
|
1118
|
+
* ```
|
|
1119
|
+
*/
|
|
1120
|
+
query(query: ContextItemsQuery): Promise<ContextItemsQueryResult>;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1095
1123
|
/**
|
|
1096
1124
|
* Read the org knowledge base (notes, metrics, saved queries, integration items).
|
|
1097
1125
|
*
|
|
@@ -1108,11 +1136,7 @@ declare class WorkflowsResource extends WorkflowsResourceBase {
|
|
|
1108
1136
|
* }
|
|
1109
1137
|
* ```
|
|
1110
1138
|
*/
|
|
1111
|
-
declare class ContextItemsResource {
|
|
1112
|
-
private readonly http;
|
|
1113
|
-
private readonly config;
|
|
1114
|
-
/** @internal */
|
|
1115
|
-
constructor(http: HttpClient, config: ModusConfig);
|
|
1139
|
+
declare class ContextItemsResource extends ContextItemsResourceBase {
|
|
1116
1140
|
/**
|
|
1117
1141
|
* List knowledge-base items.
|
|
1118
1142
|
*
|
|
@@ -1437,4 +1461,4 @@ declare class Modus extends ModusClientBase {
|
|
|
1437
1461
|
constructor(options?: ModusOptions);
|
|
1438
1462
|
}
|
|
1439
1463
|
|
|
1440
|
-
export { APIConnectionError, type ActiveConversationRun, type ActiveConversationRunStatus, type AgentRun, type AgentRunCreateRequest, type AgentRunListItem, type AgentRunStream, AgentWorkflowActionsResource, type ApprovalRequiredEvent, type ApprovalScope, type AssistantContentResetEvent, AuthenticationError, BadRequestError, type CancelRunRequest, type CancelledEvent, type ChatModel, type ChatOptions, type ChatResult, ChatSession, type ComposeSkillContextRequest, ConflictError, type Connection, type ConnectionSelection, ConnectionsResource, type ContentProjection, ContextItem, ContextItemLookupRow, ContextItemsResource, ContextResource, type ContextValueRow, Conversation, ConversationKind, ConversationListItem, type CreateAgentRunRequest, CustomContextItemsResource, type DoneEvent, type EditQueuedRunRequest, type ErrorEvent, type FollowUpRunRequest, type HttpIngestedDataRequest, type IngestedDataRequest, IngestedDataResource, type IngestedDataResponse, type IngestedDataResponseFormat, type IngestedDataUploadResult, InternalServerError, type InterruptRunRequest, type JsonObjectInput, Modus, ModusConfig, type ModusContextComposition, type ModusContextRequest, ModusConversationsResource, ModusError, ModusOptions, ModusResource, type ModusRunCreateRequest, NotFoundError, Page, PermissionDeniedError, RateLimitError, type RecordSuggestionEventRequest, type ResumeRunRequest, type RunAdmission, RunCancelledError, type RunEvent, type RunEventBase, type RunEventsPollResponse, type RunStatus, type RunTimeframe, Scope, ScopeConversationsResource, ScopesResource, type SkillContextComposition, type SkillRunCreateRequest, type SqlIngestedDataRequest, StreamTimeoutError, type StreamTimeoutEvent, type SuggestionEventSource, type SuggestionEventType, type SuggestionQuestion, SuggestionsResource, type TokenEvent, UnprocessableError, type UploadIngestedDataOptions, ValidationError, VariationView, Workflow, type WorkflowActionRequest, WorkflowRunsResource, WorkflowType, WorkflowsResource, components };
|
|
1464
|
+
export { APIConnectionError, type ActiveConversationRun, type ActiveConversationRunStatus, type AgentRun, type AgentRunCreateRequest, type AgentRunListItem, type AgentRunStream, AgentWorkflowActionsResource, type ApprovalRequiredEvent, type ApprovalScope, type AssistantContentResetEvent, AuthenticationError, BadRequestError, type CancelRunRequest, type CancelledEvent, type ChatModel, type ChatOptions, type ChatResult, ChatSession, type ComposeSkillContextRequest, ConflictError, type Connection, type ConnectionSelection, ConnectionsResource, type ContentProjection, ContextItem, ContextItemLookupRow, ContextItemsQuery, ContextItemsQueryResult, ContextItemsResource, ContextResource, type ContextValueRow, Conversation, ConversationKind, ConversationListItem, type CreateAgentRunRequest, CustomContextItemsResource, type DoneEvent, type EditQueuedRunRequest, type ErrorEvent, type FollowUpRunRequest, type HttpIngestedDataRequest, type IngestedDataRequest, IngestedDataResource, type IngestedDataResponse, type IngestedDataResponseFormat, type IngestedDataUploadResult, InternalServerError, type InterruptRunRequest, type JsonObjectInput, Modus, ModusConfig, type ModusContextComposition, type ModusContextRequest, ModusConversationsResource, ModusError, ModusOptions, ModusResource, type ModusRunCreateRequest, NotFoundError, Page, PermissionDeniedError, RateLimitError, type RecordSuggestionEventRequest, type ResumeRunRequest, type RunAdmission, RunCancelledError, type RunEvent, type RunEventBase, type RunEventsPollResponse, type RunStatus, type RunTimeframe, Scope, ScopeConversationsResource, ScopesResource, type SkillContextComposition, type SkillRunCreateRequest, type SqlIngestedDataRequest, StreamTimeoutError, type StreamTimeoutEvent, type SuggestionEventSource, type SuggestionEventType, type SuggestionQuestion, SuggestionsResource, type TokenEvent, UnprocessableError, type UploadIngestedDataOptions, ValidationError, VariationView, Workflow, type WorkflowActionRequest, WorkflowRunsResource, WorkflowType, WorkflowsResource, components };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HttpClient, c as components, M as ModusConfig, P as Page, V as VariationView, S as Scope, a as ScopeConversationsResource, C as Conversation, b as ConversationKind, d as ConversationListItem, W as WorkflowType, e as Workflow, f as
|
|
2
|
-
export { A as Agent,
|
|
1
|
+
import { H as HttpClient, c as components, M as ModusConfig, P as Page, V as VariationView, S as Scope, a as ScopeConversationsResource, C as Conversation, b as ConversationKind, d as ConversationListItem, W as WorkflowType, e as Workflow, f as ContextItemsQuery, g as ContextItemsQueryResult, h as ContextItem, i as ContextItemLookupRow, j as CustomContextItemsResource, k as ModusClientBase, l as ModusOptions } from './_client-base-DdnxB9JA.js';
|
|
2
|
+
export { A as Agent, m as AgentType, n as ContextItemAccessUpdate, o as ContextItemAncestor, p as ContextItemDeletion, q as ContextItemMove, r as ContextType, s as CreateCustomContextItemInput, t as CreatedCustomContextItem, u as CustomAttributeInput, v as CustomContextItemDeletion, w as CustomContextItemKind, x as CustomContextItemRelationInput, y as Message, O as OPERATIONS, z as OperationId, B as OperationSpec, D as ScopeStatus, E as ScopeVariation, F as Skill, G as SkillStatus, I as SkillVariation, J as SupervisionView, U as UpdateContextItemAccessInput, K as UpdateCustomContextItemInput, L as conversationScopeId, N as conversationSkillId, Q as operations, R as paths } from './_client-base-DdnxB9JA.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Base class for all Modus SDK errors.
|
|
@@ -1092,6 +1092,34 @@ declare class WorkflowsResource extends WorkflowsResourceBase {
|
|
|
1092
1092
|
chat(workflowId: number | string, message: string, options: ChatOptions): ChatSession;
|
|
1093
1093
|
}
|
|
1094
1094
|
|
|
1095
|
+
/** Generated base for the consumption `context.items` resource. */
|
|
1096
|
+
declare class ContextItemsResourceBase {
|
|
1097
|
+
protected readonly http: HttpClient;
|
|
1098
|
+
protected readonly config: ModusConfig;
|
|
1099
|
+
/** @internal */
|
|
1100
|
+
constructor(http: HttpClient, config: ModusConfig);
|
|
1101
|
+
/**
|
|
1102
|
+
* Query context items with SQL.
|
|
1103
|
+
*
|
|
1104
|
+
* Runs one read-only SQL statement over the `context_items` table and returns its rows. The query
|
|
1105
|
+
* sees only the items you can read. A query that is not read-only or not valid returns 400; one
|
|
1106
|
+
* that runs past 20 s returns 422.
|
|
1107
|
+
*
|
|
1108
|
+
* **Requires:** `context:read`
|
|
1109
|
+
*
|
|
1110
|
+
* @param query - Request body; see `ContextItemsQuery`.
|
|
1111
|
+
*
|
|
1112
|
+
* @example
|
|
1113
|
+
* ```ts
|
|
1114
|
+
* const result = await modus.context.items.query({
|
|
1115
|
+
* sql: 'SELECT context_type, count(*) AS items FROM context_items GROUP BY context_type',
|
|
1116
|
+
* })
|
|
1117
|
+
* result.rows
|
|
1118
|
+
* ```
|
|
1119
|
+
*/
|
|
1120
|
+
query(query: ContextItemsQuery): Promise<ContextItemsQueryResult>;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1095
1123
|
/**
|
|
1096
1124
|
* Read the org knowledge base (notes, metrics, saved queries, integration items).
|
|
1097
1125
|
*
|
|
@@ -1108,11 +1136,7 @@ declare class WorkflowsResource extends WorkflowsResourceBase {
|
|
|
1108
1136
|
* }
|
|
1109
1137
|
* ```
|
|
1110
1138
|
*/
|
|
1111
|
-
declare class ContextItemsResource {
|
|
1112
|
-
private readonly http;
|
|
1113
|
-
private readonly config;
|
|
1114
|
-
/** @internal */
|
|
1115
|
-
constructor(http: HttpClient, config: ModusConfig);
|
|
1139
|
+
declare class ContextItemsResource extends ContextItemsResourceBase {
|
|
1116
1140
|
/**
|
|
1117
1141
|
* List knowledge-base items.
|
|
1118
1142
|
*
|
|
@@ -1437,4 +1461,4 @@ declare class Modus extends ModusClientBase {
|
|
|
1437
1461
|
constructor(options?: ModusOptions);
|
|
1438
1462
|
}
|
|
1439
1463
|
|
|
1440
|
-
export { APIConnectionError, type ActiveConversationRun, type ActiveConversationRunStatus, type AgentRun, type AgentRunCreateRequest, type AgentRunListItem, type AgentRunStream, AgentWorkflowActionsResource, type ApprovalRequiredEvent, type ApprovalScope, type AssistantContentResetEvent, AuthenticationError, BadRequestError, type CancelRunRequest, type CancelledEvent, type ChatModel, type ChatOptions, type ChatResult, ChatSession, type ComposeSkillContextRequest, ConflictError, type Connection, type ConnectionSelection, ConnectionsResource, type ContentProjection, ContextItem, ContextItemLookupRow, ContextItemsResource, ContextResource, type ContextValueRow, Conversation, ConversationKind, ConversationListItem, type CreateAgentRunRequest, CustomContextItemsResource, type DoneEvent, type EditQueuedRunRequest, type ErrorEvent, type FollowUpRunRequest, type HttpIngestedDataRequest, type IngestedDataRequest, IngestedDataResource, type IngestedDataResponse, type IngestedDataResponseFormat, type IngestedDataUploadResult, InternalServerError, type InterruptRunRequest, type JsonObjectInput, Modus, ModusConfig, type ModusContextComposition, type ModusContextRequest, ModusConversationsResource, ModusError, ModusOptions, ModusResource, type ModusRunCreateRequest, NotFoundError, Page, PermissionDeniedError, RateLimitError, type RecordSuggestionEventRequest, type ResumeRunRequest, type RunAdmission, RunCancelledError, type RunEvent, type RunEventBase, type RunEventsPollResponse, type RunStatus, type RunTimeframe, Scope, ScopeConversationsResource, ScopesResource, type SkillContextComposition, type SkillRunCreateRequest, type SqlIngestedDataRequest, StreamTimeoutError, type StreamTimeoutEvent, type SuggestionEventSource, type SuggestionEventType, type SuggestionQuestion, SuggestionsResource, type TokenEvent, UnprocessableError, type UploadIngestedDataOptions, ValidationError, VariationView, Workflow, type WorkflowActionRequest, WorkflowRunsResource, WorkflowType, WorkflowsResource, components };
|
|
1464
|
+
export { APIConnectionError, type ActiveConversationRun, type ActiveConversationRunStatus, type AgentRun, type AgentRunCreateRequest, type AgentRunListItem, type AgentRunStream, AgentWorkflowActionsResource, type ApprovalRequiredEvent, type ApprovalScope, type AssistantContentResetEvent, AuthenticationError, BadRequestError, type CancelRunRequest, type CancelledEvent, type ChatModel, type ChatOptions, type ChatResult, ChatSession, type ComposeSkillContextRequest, ConflictError, type Connection, type ConnectionSelection, ConnectionsResource, type ContentProjection, ContextItem, ContextItemLookupRow, ContextItemsQuery, ContextItemsQueryResult, ContextItemsResource, ContextResource, type ContextValueRow, Conversation, ConversationKind, ConversationListItem, type CreateAgentRunRequest, CustomContextItemsResource, type DoneEvent, type EditQueuedRunRequest, type ErrorEvent, type FollowUpRunRequest, type HttpIngestedDataRequest, type IngestedDataRequest, IngestedDataResource, type IngestedDataResponse, type IngestedDataResponseFormat, type IngestedDataUploadResult, InternalServerError, type InterruptRunRequest, type JsonObjectInput, Modus, ModusConfig, type ModusContextComposition, type ModusContextRequest, ModusConversationsResource, ModusError, ModusOptions, ModusResource, type ModusRunCreateRequest, NotFoundError, Page, PermissionDeniedError, RateLimitError, type RecordSuggestionEventRequest, type ResumeRunRequest, type RunAdmission, RunCancelledError, type RunEvent, type RunEventBase, type RunEventsPollResponse, type RunStatus, type RunTimeframe, Scope, ScopeConversationsResource, ScopesResource, type SkillContextComposition, type SkillRunCreateRequest, type SqlIngestedDataRequest, StreamTimeoutError, type StreamTimeoutEvent, type SuggestionEventSource, type SuggestionEventType, type SuggestionQuestion, SuggestionsResource, type TokenEvent, UnprocessableError, type UploadIngestedDataOptions, ValidationError, VariationView, Workflow, type WorkflowActionRequest, WorkflowRunsResource, WorkflowType, WorkflowsResource, components };
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
validateChatModel,
|
|
32
32
|
validateId,
|
|
33
33
|
validatePageSize
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JVTQBBMZ.js";
|
|
35
35
|
|
|
36
36
|
// src/_agent_run_request.ts
|
|
37
37
|
import { randomUUID } from "crypto";
|
|
@@ -1080,6 +1080,40 @@ var ConnectionsResource = class extends ConnectionsResourceBase {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
};
|
|
1082
1082
|
|
|
1083
|
+
// src/_generated/resources/consumption/context/items.ts
|
|
1084
|
+
var ContextItemsResourceBase = class {
|
|
1085
|
+
/** @internal */
|
|
1086
|
+
constructor(http, config) {
|
|
1087
|
+
this.http = http;
|
|
1088
|
+
this.config = config;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Query context items with SQL.
|
|
1092
|
+
*
|
|
1093
|
+
* Runs one read-only SQL statement over the `context_items` table and returns its rows. The query
|
|
1094
|
+
* sees only the items you can read. A query that is not read-only or not valid returns 400; one
|
|
1095
|
+
* that runs past 20 s returns 422.
|
|
1096
|
+
*
|
|
1097
|
+
* **Requires:** `context:read`
|
|
1098
|
+
*
|
|
1099
|
+
* @param query - Request body; see `ContextItemsQuery`.
|
|
1100
|
+
*
|
|
1101
|
+
* @example
|
|
1102
|
+
* ```ts
|
|
1103
|
+
* const result = await modus.context.items.query({
|
|
1104
|
+
* sql: 'SELECT context_type, count(*) AS items FROM context_items GROUP BY context_type',
|
|
1105
|
+
* })
|
|
1106
|
+
* result.rows
|
|
1107
|
+
* ```
|
|
1108
|
+
*/
|
|
1109
|
+
async query(query) {
|
|
1110
|
+
const data = await invokeWithRetry(this.config, this.http, "ContextItemsQueryController_query", {
|
|
1111
|
+
jsonBody: omitUndefined(query)
|
|
1112
|
+
});
|
|
1113
|
+
return data;
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
|
|
1083
1117
|
// src/resources/context/items.ts
|
|
1084
1118
|
function contextListParams(pageSize, pageToken, filters = {}) {
|
|
1085
1119
|
const extra = {};
|
|
@@ -1106,12 +1140,7 @@ function parseLookupResponse(raw) {
|
|
|
1106
1140
|
if (item === null || item === void 0) return void 0;
|
|
1107
1141
|
return item;
|
|
1108
1142
|
}
|
|
1109
|
-
var ContextItemsResource = class {
|
|
1110
|
-
/** @internal */
|
|
1111
|
-
constructor(http, config) {
|
|
1112
|
-
this.http = http;
|
|
1113
|
-
this.config = config;
|
|
1114
|
-
}
|
|
1143
|
+
var ContextItemsResource = class extends ContextItemsResourceBase {
|
|
1115
1144
|
/**
|
|
1116
1145
|
* List knowledge-base items.
|
|
1117
1146
|
*
|