@squidcloud/jira-client 1.0.504 → 1.0.505

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.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,i)=>{if(Array.isArray(i))for(var s=0;s<i.length;){var n=i[s++],r=i[s++];e.o(t,n)?0===r&&s++:0===r?Object.defineProperty(t,n,{enumerable:!0,value:i[s++]}):Object.defineProperty(t,n,{enumerable:!0,get:r})}else for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};let t={};e.r(t),e.d(t,{PRIORITY_LABELS:()=>i,RELATED_ISSUES_MODE_ENUM:()=>s,SquidJiraClient:()=>n});const i={1:"Highest",2:"High",3:"Medium",4:"Low",5:"Lowest"},s=["RESOLVED","ALL","NONE"];class n{constructor(e,t){this.squid=e,this.integrationId=t}async searchIssues(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("searchJiraIssuesExecutable",t)}async searchByJql(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("searchJiraIssuesByJqlExecutable",t)}async getIssue(e,t){const i={integrationId:this.integrationId,issueKey:e,relatedIssuesMode:t};return this.squid.executeFunction("getJiraIssueDetailsExecutable",i)}async createIssue(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("createJiraIssueExecutable",t)}async updateIssue(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("updateJiraIssueExecutable",t)}async addLabels(e,t){const i={integrationId:this.integrationId,issueKey:e,labels:t};return this.squid.executeFunction("addJiraLabelsExecutable",i)}async addComment(e,t){const i={integrationId:this.integrationId,issueKey:e,body:t};return this.squid.executeFunction("addJiraCommentExecutable",i)}async transitionIssue(e,t){const i={integrationId:this.integrationId,issueKey:e,transitionName:t};return this.squid.executeFunction("transitionJiraIssueExecutable",i)}async listProjects(){const e={integrationId:this.integrationId};return this.squid.executeFunction("listJiraProjectsExecutable",e)}async getAuthUrl(e){return(await this.squid.executeFunction("getJiraOAuthUrlExecutable",{integrationId:this.integrationId,scopes:e})).url}async saveAuthCode(e){return this.squid.executeFunction("saveJiraAuthCodeExecutable",{integrationId:this.integrationId,authCode:e})}}const r=exports;for(var a in t)r[a]=t[a];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";const e={d:(t,i)=>{for(var s in i)e.o(i,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};let t={};e.r(t),e.d(t,{PRIORITY_LABELS:()=>i,RELATED_ISSUES_MODE_ENUM:()=>s,SquidJiraClient:()=>n});const i={1:"Highest",2:"High",3:"Medium",4:"Low",5:"Lowest"},s=["RESOLVED","ALL","NONE"];class n{constructor(e,t){this.squid=e,this.integrationId=t}async searchIssues(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("searchJiraIssuesExecutable",t)}async searchByJql(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("searchJiraIssuesByJqlExecutable",t)}async getIssue(e,t){const i={integrationId:this.integrationId,issueKey:e,relatedIssuesMode:t};return this.squid.executeFunction("getJiraIssueDetailsExecutable",i)}async createIssue(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("createJiraIssueExecutable",t)}async updateIssue(e){const t={...e,integrationId:this.integrationId};return this.squid.executeFunction("updateJiraIssueExecutable",t)}async addLabels(e,t){const i={integrationId:this.integrationId,issueKey:e,labels:t};return this.squid.executeFunction("addJiraLabelsExecutable",i)}async addComment(e,t){const i={integrationId:this.integrationId,issueKey:e,body:t};return this.squid.executeFunction("addJiraCommentExecutable",i)}async transitionIssue(e,t){const i={integrationId:this.integrationId,issueKey:e,transitionName:t};return this.squid.executeFunction("transitionJiraIssueExecutable",i)}async listProjects(){const e={integrationId:this.integrationId};return this.squid.executeFunction("listJiraProjectsExecutable",e)}async getAuthUrl(e){return(await this.squid.executeFunction("getJiraOAuthUrlExecutable",{integrationId:this.integrationId,scopes:e})).url}async saveAuthCode(e){return this.squid.executeFunction("saveJiraAuthCodeExecutable",{integrationId:this.integrationId,authCode:e})}}const r=exports;for(var a in t)r[a]=t[a];t.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
@@ -432,6 +432,13 @@ export interface AiModelRoutingOptions {
432
432
  models: VendorAiChatModelName[];
433
433
  /** The vendor model that makes the choice. */
434
434
  routingModel: VendorAiChatModelName;
435
+ /**
436
+ * How to choose, in plain language: the routing model follows it over its default rule, which
437
+ * takes the cheapest candidate that can answer well. Up to 2000 characters. The routing model
438
+ * sees each candidate's price, context window and benchmark measurements, so an instruction can
439
+ * refer to them ("never pay more than $0.01 per answer", "prefer the model measured on coding").
440
+ */
441
+ instructions?: string;
435
442
  }
436
443
  /**
437
444
  * The model of an `ask` or `chat` request: a concrete model, or a set of models a routing model chooses from.
@@ -460,8 +467,15 @@ export type AiChatRequestOptions = Omit<AllAiAgentChatOptions, 'model'> & {
460
467
  export interface AiModelRoutingResult {
461
468
  /** The model the routing model chose and the request was sent to. A `backupModel` may still have served it. */
462
469
  model: VendorAiChatModelName;
470
+ /**
471
+ * The reasoning effort the chosen model ran at: the routing model's own pick, or the request's or
472
+ * agent's effort resolved to a level the model accepts when one was set. Undefined is the model's default.
473
+ */
474
+ reasoningEffort?: AiReasoningEffort;
463
475
  /** The model that made the choice. */
464
476
  routingModel: VendorAiChatModelName;
477
+ /** The routing model's one-line justification of the choice. */
478
+ reason: string;
465
479
  /** Input tokens the routing call consumed. */
466
480
  inputTokens: number;
467
481
  /** Output tokens the routing call generated. */
@@ -517,8 +531,8 @@ export interface BaseAiChatOptions {
517
531
  */
518
532
  maxTokens?: number;
519
533
  /**
520
- * The maximum number of tokens the model should output.
521
- * Passed directly to the AI model. Can be used to control the output verbosity.
534
+ * The maximum number of tokens the model should output. Can be used to control the output verbosity.
535
+ * For a model from an AI connector, the model's configured max output tokens is the ceiling.
522
536
  */
523
537
  maxOutputTokens?: number;
524
538
  /** The context ID to use for the request. If not provided, the agent's default context will be used. */
@@ -701,17 +715,16 @@ export interface BaseAiChatOptions {
701
715
  */
702
716
  verbosity?: AiVerbosityLevel;
703
717
  /**
704
- * Enable LLMs built-in code interpreter for executing Python code.
718
+ * Enables a code interpreter for executing Python code.
705
719
  * - 'none': Code interpreter is disabled (default).
706
- * - 'llm': Use LLM's native code interpreter to run Python code.
707
- *
708
- * Note: Only supported by OpenAI, Anthropic and Gemini models. Ignored for other providers.
720
+ * - 'llm': The model runs Python in Squid's sandbox through a tool call. Requires a model that supports tool calling.
709
721
  */
710
722
  useCodeInterpreter?: 'none' | 'llm';
711
723
  /**
712
724
  * File IDs to include in the chat context.
713
725
  * These are IDs returned from the AI provider's Files API after uploading files.
714
- * Files are attached to the conversation and can be read/analyzed by the AI.
726
+ * Files are attached to the conversation and can be read/analyzed by the AI. With `useCodeInterpreter: 'llm'`,
727
+ * the files are given to the code interpreter instead.
715
728
  */
716
729
  fileIds?: string[];
717
730
  /**
@@ -1161,11 +1174,12 @@ export interface UpsertContextStatusSuccess extends BaseUpsertContextStatus {
1161
1174
  }
1162
1175
  /**
1163
1176
  * Names an upsert failure; `DUPLICATE_CONTENT` identifies existing content when contextId is omitted.
1164
- * `CONTENT_IN_FLIGHT`, `EMBEDDING_FAILED`, `EXTRACTION_TIMED_OUT`, `PROVIDER_ACCESS_DENIED`, and
1165
- * `SOURCE_UNREACHABLE` may succeed on retry. Document faults carry `retryable: false` because the same bytes fail again.
1177
+ * `CONTENT_IN_FLIGHT`, `EMBEDDED_CHILDREN_NOT_RECONCILED`, `EMBEDDING_FAILED`, `EXTRACTION_TIMED_OUT`,
1178
+ * `PROVIDER_ACCESS_DENIED`, and `SOURCE_UNREACHABLE` may succeed on retry. Document faults carry `retryable: false`
1179
+ * because the same bytes fail again.
1166
1180
  * @category AI
1167
1181
  */
1168
- export type UpsertContextErrorCode = 'CONTENT_IN_FLIGHT' | 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'EMBEDDING_FAILED' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
1182
+ export type UpsertContextErrorCode = 'CONTENT_IN_FLIGHT' | 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'EMBEDDED_CHILDREN_NOT_RECONCILED' | 'EMBEDDING_FAILED' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
1169
1183
  /**
1170
1184
  * The existing context a `DUPLICATE_CONTENT` rejection points at — where the byte-identical original
1171
1185
  * already lives.
@@ -38,8 +38,8 @@ export type AiFileProviderType = (typeof AI_FILE_PROVIDER_TYPES)[number];
38
38
  */
39
39
  export declare function isFileCapableProviderType(type: AiProviderType): type is AiFileProviderType;
40
40
  /**
41
- * The AI providers whose chat provider implements the code interpreter. Declared like
42
- * {@link AI_FILE_PROVIDER_TYPES}, so a provider that gains the interpreter is added here and nowhere else.
41
+ * Providers with a vendor-hosted code interpreter; unused by Squid.
42
+ * @deprecated The code interpreter runs in Squid's sandbox and works with any model that supports tool calling.
43
43
  */
44
44
  export declare const AI_CODE_INTERPRETER_PROVIDER_TYPES: readonly ["openai", "anthropic", "gemini"];
45
45
  /**
@@ -704,6 +704,12 @@ export declare const BULK_INGESTION_MAX_MULTIPART_FILE_BYTES: number;
704
704
  * @category AI
705
705
  */
706
706
  export declare const MAX_UPLOAD_FILE_BYTES: number;
707
+ /**
708
+ * Largest OneNote section (`.one`) a knowledge base ingests, on either lane. A section carries its attachments,
709
+ * each indexed as a context of its own, so it may exceed {@link MAX_UPLOAD_FILE_BYTES}.
710
+ * @category AI
711
+ */
712
+ export declare const MAX_ONENOTE_SECTION_BYTES: number;
707
713
  /**
708
714
  * @category AI
709
715
  */
@@ -2094,7 +2100,8 @@ export interface BulkIngestionJobStatusCounts {
2094
2100
  /**
2095
2101
  * Machine-readable class of a bulk-ingestion file failure, for outcomes to treat differently from real
2096
2102
  * failures. Terminal — reported with `retryable: false` — are `'CONTENT_TOO_LARGE'` (past the per-context
2097
- * ceiling), `'ENCRYPTED_DOCUMENT'`, `'IMAGE_OVER_PROVIDER_LIMIT'` (the OCR provider refuses an image in the
2103
+ * ceiling), `'ENCRYPTED_DOCUMENT'`, `'EXTRACTION_ABANDONED'` (each worker that took the file up died before
2104
+ * finishing it), `'IMAGE_OVER_PROVIDER_LIMIT'` (the OCR provider refuses an image in the
2098
2105
  * document as too large, even with the pages that draw it redrawn smaller), `'NO_EMBEDDABLE_CONTENT'`,
2099
2106
  * `'SOURCE_OVER_PROVIDER_LIMIT'` (the bytes exceed what the extraction provider accepts),
2100
2107
  * `'UNREADABLE_DOCUMENT'` (a PDF or Office file whose bytes cannot be opened as one), `'UNREADABLE_WORKBOOK'`
@@ -2108,7 +2115,7 @@ export interface BulkIngestionJobStatusCounts {
2108
2115
  * alone exceeds the ceiling fails this way in every job.
2109
2116
  * @category AI
2110
2117
  */
2111
- export type BulkIngestionFileErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'JOB_FULL' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
2118
+ export type BulkIngestionFileErrorCode = 'CONTENT_TOO_LARGE' | 'DUPLICATE_CONTENT' | 'ENCRYPTED_DOCUMENT' | 'EXTRACTION_ABANDONED' | 'EXTRACTION_TIMED_OUT' | 'IMAGE_OVER_PROVIDER_LIMIT' | 'JOB_FULL' | 'NO_EMBEDDABLE_CONTENT' | 'PROVIDER_ACCESS_DENIED' | 'SOURCE_OVER_PROVIDER_LIMIT' | 'SOURCE_UNREACHABLE' | 'UNREADABLE_DOCUMENT' | 'UNREADABLE_WORKBOOK' | 'UNSUPPORTED_FILE_TYPE';
2112
2119
  /**
2113
2120
  * Per-file/per-context status within a bulk-ingestion job, so a caller can see which file finished,
2114
2121
  * which is still processing, and why a file failed.
@@ -18,12 +18,12 @@ export interface ConnectorRunConfiguration {
18
18
  codeUrlId: string;
19
19
  }
20
20
  /**
21
- * Success response type for function execution.
22
- * ok is always true, functionResponse is always present.
21
+ * Success response type for function execution. `functionResponse` is absent when the function
22
+ * returned `undefined`: serialization drops the key.
23
23
  */
24
24
  export interface TenantExecuteFunctionSuccess<T = unknown> {
25
25
  ok: true;
26
- functionResponse: T;
26
+ functionResponse?: T;
27
27
  }
28
28
  /**
29
29
  * Error response type for function execution.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/jira-client",
3
- "version": "1.0.504",
3
+ "version": "1.0.505",
4
4
  "description": "Squid Jira Client - SDK for interacting with the Jira connector",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/jira-client/src/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
25
  "assertic": "^1.3.0",
26
- "@squidcloud/client": "^1.0.504"
26
+ "@squidcloud/client": "^1.0.505"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">=20.0.0"