@squidcloud/jira-client 1.0.513 → 1.0.515

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.
@@ -9,6 +9,8 @@ export interface AiAgentDatabaseIntegrationOptions {
9
9
  verboseStatusUpdates?: boolean;
10
10
  /** Full AI query options for advanced configuration of the query execution. */
11
11
  aiQueryOptions?: AiQueryOptions;
12
+ /** Whether the agent's instructions list the database's glossary terms. Default: true. */
13
+ includeGlossary?: boolean;
12
14
  }
13
15
  /**
14
16
  * Configuration options for AI agent API integration.
@@ -5,6 +5,7 @@ import { AiOntologyId } from './ai-ontology.public-types';
5
5
  import { AiFunctionId, AiFunctionIdWithContext, UserAiChatModelName } from './backend.public-types';
6
6
  import { AiAgentId, AiContextId, AiKnowledgeBaseId, AppId, IntegrationId } from './communication.public-types';
7
7
  import { DocumentExtractionMethod } from './extraction.public-types';
8
+ import { GlossaryId } from './glossary.public-types';
8
9
  import { IntegrationType } from './integration.public-types';
9
10
  import { JobId } from './job.public-types';
10
11
  import { SecretKey } from './secret.public-types';
@@ -626,10 +627,15 @@ export interface BaseAiChatOptions {
626
627
  */
627
628
  allowSourceDownloads?: boolean;
628
629
  /**
629
- * The ontology whose accepted relationships this agent's answers and database queries follow. Honored ONLY from the
630
+ * The ontologies whose accepted relationships this agent's answers and database queries follow. Honored ONLY from the
630
631
  * agent's stored options; the per-request value is ignored.
631
632
  */
632
- ontologyId?: AiOntologyId;
633
+ ontologyIds?: AiOntologyId[];
634
+ /**
635
+ * Global glossaries whose terms are added to the agent's instructions. Honored ONLY from the agent's stored options;
636
+ * the per-request value is ignored.
637
+ */
638
+ glossaryIds?: GlossaryId[];
633
639
  /**
634
640
  * The format of the response from the AI model. Defaults to 'text'. A `json_schema` format is
635
641
  * refused for a model whose provider has no way to carry a schema — see
@@ -51,7 +51,7 @@ export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-
51
51
  * Public Gemini chat model names (active models only).
52
52
  * @category AI
53
53
  */
54
- export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-4-carbon", "gemini-4-argon", "gemini-4-hydrogen", "gemini-3.8-flash", "gemini-3.5-flash-lite"];
54
+ export declare const GEMINI_CHAT_MODEL_NAMES: readonly ["gemini-4-carbon", "gemini-4-argon", "gemini-4-neon", "gemini-4-hydrogen", "gemini-3.8-flash", "gemini-3.5-flash-lite"];
55
55
  /**
56
56
  * Public Grok chat model names (active models only).
57
57
  * @category AI
@@ -66,7 +66,7 @@ export declare const ANTHROPIC_CHAT_MODEL_NAMES: readonly ["claude-fable-5-2", "
66
66
  * The supported AI model names.
67
67
  * @category AI
68
68
  */
69
- export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-luna", "gpt-6-luna", "gpt-6.1-terra", "gpt-6.2-astra", "gpt-6.2-sol", "claude-fable-5-2", "claude-haiku-5-5", "claude-opus-5-5", "claude-sonnet-5-5", "gemini-4-carbon", "gemini-4-argon", "gemini-4-hydrogen", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
69
+ export declare const VENDOR_AI_CHAT_MODEL_NAMES: readonly ["gpt-5.6-sol", "gpt-5.6-luna", "gpt-6-luna", "gpt-6.1-terra", "gpt-6.2-astra", "gpt-6.2-sol", "claude-fable-5-2", "claude-haiku-5-5", "claude-opus-5-5", "claude-sonnet-5-5", "gemini-4-carbon", "gemini-4-argon", "gemini-4-neon", "gemini-4-hydrogen", "gemini-3.8-flash", "gemini-3.5-flash-lite", "grok-4.6", "grok-4-1-fast-reasoning", "grok-4-1-fast-non-reasoning"];
70
70
  /** Checks if the given model name is a global AI chat model name. */
71
71
  export declare function isVendorAiChatModelName(modelName: unknown): modelName is VendorAiChatModelName;
72
72
  /**
@@ -4,12 +4,6 @@ import { AiKnowledgeBaseId, IntegrationId } from './communication.public-types';
4
4
  * @category AI
5
5
  */
6
6
  export type AiOntologyId = string;
7
- /**
8
- * Review state of an ontology relationship. Only accepted relationships reach models. Imports and generation save
9
- * `accepted` rows; a row without `reviewedAt` and with a source other than `human` is unreviewed.
10
- * @category AI
11
- */
12
- export type AiOntologyRelationshipStatus = 'suggested' | 'accepted' | 'rejected';
13
7
  /**
14
8
  * Where an ontology relationship came from. `declared` covers declared and manual schema associations.
15
9
  * @category AI
@@ -68,17 +62,18 @@ export interface AiOntologyGenerationRun {
68
62
  startedAt: number;
69
63
  /** End time in epoch milliseconds. */
70
64
  endedAt?: number;
71
- /** How many relationships the run added. A run only adds: it never removes a stored row. */
65
+ /** How many relationships the run proposes to add. */
72
66
  relationshipsAdded: number;
73
- /**
74
- * How many unreviewed imported relationships labelled with their association name the run gave a business label. It
75
- * changes nothing else of a stored row.
76
- */
67
+ /** How many imported relationships labelled with their association name the run gave a business label. */
77
68
  relationshipsRenamed?: number;
78
- /** How many business entities the run added. */
69
+ /** How many business entities the run proposes to add. */
79
70
  entitiesAdded: number;
80
- /** How many properties the run added. */
71
+ /** How many properties the run proposes to add. */
81
72
  propertiesAdded: number;
73
+ /** How many relationships, entities and properties the run proposes to remove. */
74
+ rowsRemoved?: number;
75
+ /** Whether the run left a result to read with {@link GetAiOntologyGenerationResultRequest}. */
76
+ hasResult?: boolean;
82
77
  /** Things the run left out. */
83
78
  warnings: string[];
84
79
  /** The failure, when the run failed. */
@@ -99,12 +94,17 @@ export interface AiOntology {
99
94
  integrationIds: IntegrationId[];
100
95
  /** The knowledge bases attached to the ontology, each with a knowledge graph. */
101
96
  knowledgeBaseIds: AiKnowledgeBaseId[];
97
+ /**
98
+ * Global glossaries whose terms guide generation, with the glossaries of the attached databases. They are context
99
+ * only: generation proposes nothing just because a term exists.
100
+ */
101
+ glossaryIds: string[];
102
102
  /** The last run that generated relationships, business entities or properties. */
103
103
  lastGenerationRun?: AiOntologyGenerationRun;
104
- /** Number of accepted relationships. Set only on the ontologies of a list. */
105
- acceptedRelationshipCount?: number;
106
- /** Number of accepted business entities. Set only on the ontologies of a list. */
107
- acceptedEntityCount?: number;
104
+ /** Number of relationships. Set only on the ontologies of a list. */
105
+ relationshipCount?: number;
106
+ /** Number of business entities. Set only on the ontologies of a list. */
107
+ entityCount?: number;
108
108
  /** Creation time in epoch milliseconds. */
109
109
  createdAt: number;
110
110
  /** Last update time in epoch milliseconds. */
@@ -129,9 +129,7 @@ export interface AiOntologyRelationship {
129
129
  label: string;
130
130
  /** What the relationship means. */
131
131
  description?: string;
132
- /** Review state. A row without `reviewedAt` and with a source other than `human` is unreviewed. */
133
- status: AiOntologyRelationshipStatus;
134
- /** Where the relationship came from. */
132
+ /** Where the relationship came from. A person's edit makes it `human`, which imports and runs leave alone. */
135
133
  source: AiOntologyRelationshipSource;
136
134
  /** From 0 to 1, when inference or a model proposed the relationship. */
137
135
  confidence?: number;
@@ -150,8 +148,8 @@ export interface AiOntologyRelationship {
150
148
  /**
151
149
  * Output only: the entity of the referencing side on this read. The stored choice when it is still eligible, else
152
150
  * none; with no choice stored, the only eligible entity that has the table as a member, else the only one that has it
153
- * as a supporting table. An eligible entity is in the ontology, not rejected, and has the side's table as a member or
154
- * a supporting table.
151
+ * as a supporting table. An eligible entity is in the ontology and has the side's table as a member or a supporting
152
+ * table.
155
153
  */
156
154
  resolvedFromEntityId?: string;
157
155
  /** Output only: the entity of the referenced side on this read, resolved as `resolvedFromEntityId` is. */
@@ -162,10 +160,6 @@ export interface AiOntologyRelationship {
162
160
  createdAt: number;
163
161
  /** Last update time in epoch milliseconds. */
164
162
  updatedAt: number;
165
- /** Who accepted or rejected the relationship. The caller's claim, not an authenticated identity. */
166
- reviewedBy?: string;
167
- /** When the relationship was reviewed, in epoch milliseconds. */
168
- reviewedAt?: number;
169
163
  }
170
164
  /**
171
165
  * The editable fields of an ontology relationship.
@@ -181,8 +175,7 @@ export interface AiOntologyRelationshipInput {
181
175
  /** What the relationship means. */
182
176
  description?: string;
183
177
  /**
184
- * The entity of the referencing side: one of the ontology, not rejected, with the side's table as a member or a
185
- * supporting table. On update an omitted value, or the stored one sent back, is kept without being checked again;
178
+ * The entity of the referencing side: one of the ontology with the side's table as a member or a supporting table. On update an omitted value, or the stored one sent back, is kept without being checked again;
186
179
  * `null` clears it. When the update moves the side to another table, a value sent is checked, and an omitted one
187
180
  * the new table makes invalid is removed.
188
181
  */
@@ -227,7 +220,7 @@ export interface GetAiOntologyResponse {
227
220
  export interface AiOntologyResponse {
228
221
  /** The ontology. */
229
222
  ontology: AiOntology;
230
- /** Things the request left out, such as imported relationships past the relationship limit. */
223
+ /** Things the request left out. */
231
224
  warnings: string[];
232
225
  }
233
226
  /**
@@ -247,6 +240,8 @@ export interface CreateAiOntologyRequest {
247
240
  * source) and no enforced access control (`ONTOLOGY_KNOWLEDGE_BASE_ACCESS_RESTRICTED`).
248
241
  */
249
242
  knowledgeBaseIds?: AiKnowledgeBaseId[];
243
+ /** Global glossaries whose terms guide generation. Each must exist and be global. */
244
+ glossaryIds?: string[];
250
245
  }
251
246
  /**
252
247
  * Request to update an ontology. It replaces the name, the description, the attached databases and, when given, the
@@ -267,6 +262,8 @@ export interface UpdateAiOntologyRequest {
267
262
  * knowledge base loses what the ontology stored about it.
268
263
  */
269
264
  knowledgeBaseIds?: AiKnowledgeBaseId[];
265
+ /** Global glossaries whose terms guide generation, as in {@link CreateAiOntologyRequest}. Omitted keeps them. */
266
+ glossaryIds?: string[];
270
267
  }
271
268
  /**
272
269
  * Request to delete an ontology with its relationships, entities and properties.
@@ -283,8 +280,6 @@ export interface DeleteAiOntologyRequest {
283
280
  export interface ListAiOntologyRelationshipsRequest {
284
281
  /** Id of the ontology. */
285
282
  ontologyId: AiOntologyId;
286
- /** Returns only relationships in this state. */
287
- status?: AiOntologyRelationshipStatus;
288
283
  }
289
284
  /**
290
285
  * Response to {@link ListAiOntologyRelationshipsRequest}.
@@ -419,14 +414,12 @@ export interface FollowAiOntologyRelationshipResponse {
419
414
  note: string;
420
415
  }
421
416
  /**
422
- * Request to create an accepted relationship by hand.
417
+ * Request to create a relationship by hand. It is saved at once.
423
418
  * @category AI
424
419
  */
425
420
  export interface CreateAiOntologyRelationshipRequest extends AiOntologyRelationshipInput {
426
421
  /** Id of the ontology. */
427
422
  ontologyId: AiOntologyId;
428
- /** The caller's claim of who they are, not an authenticated identity. */
429
- actor?: string;
430
423
  }
431
424
  /**
432
425
  * Request to update a relationship. It replaces the sides, label and description; an omitted `fromEntityId`,
@@ -454,21 +447,6 @@ export interface DeleteAiOntologyRelationshipRequest {
454
447
  /** Id of the relationship. */
455
448
  id: string;
456
449
  }
457
- /**
458
- * Request to accept, reject or reset a relationship.
459
- * @category AI
460
- */
461
- export interface ReviewAiOntologyRelationshipRequest {
462
- /** Id of the relationship. */
463
- id: string;
464
- /**
465
- * The decision. `reset` returns the relationship to suggested and clears `reviewedAt`, so the next import may refresh
466
- * or delete an imported row.
467
- */
468
- decision: 'accept' | 'reject' | 'reset';
469
- /** The caller's claim of who they are, not an authenticated identity. */
470
- actor?: string;
471
- }
472
450
  /**
473
451
  * Where a business entity came from.
474
452
  * @category AI
@@ -529,9 +507,7 @@ export interface AiOntologyEntity {
529
507
  * agent that cannot read one of the tables sees the entity without its description.
530
508
  */
531
509
  supportingTables?: AiOntologySupportingTable[];
532
- /** Review state. A row without `reviewedAt` and with a source other than `human` is unreviewed. */
533
- status: AiOntologyRelationshipStatus;
534
- /** Where the entity came from. */
510
+ /** Where the entity came from. A person's edit makes it `human`, which runs leave alone. */
535
511
  source: AiOntologyEntitySource;
536
512
  /** Why the entity was proposed. */
537
513
  reasoning?: string;
@@ -539,10 +515,6 @@ export interface AiOntologyEntity {
539
515
  createdAt: number;
540
516
  /** Last update time in epoch milliseconds. */
541
517
  updatedAt: number;
542
- /** Who accepted or rejected the entity. The caller's claim, not an authenticated identity. */
543
- reviewedBy?: string;
544
- /** When the entity was reviewed, in epoch milliseconds. */
545
- reviewedAt?: number;
546
518
  }
547
519
  /**
548
520
  * The editable fields of a business entity.
@@ -565,8 +537,6 @@ export interface AiOntologyEntityInput {
565
537
  export interface ListAiOntologyEntitiesRequest {
566
538
  /** Id of the ontology. */
567
539
  ontologyId: AiOntologyId;
568
- /** Returns only entities in this state. */
569
- status?: AiOntologyRelationshipStatus;
570
540
  }
571
541
  /**
572
542
  * Response to {@link ListAiOntologyEntitiesRequest}.
@@ -577,14 +547,12 @@ export interface ListAiOntologyEntitiesResponse {
577
547
  entities: AiOntologyEntity[];
578
548
  }
579
549
  /**
580
- * Request to create an accepted business entity by hand.
550
+ * Request to create a business entity by hand. It is saved at once.
581
551
  * @category AI
582
552
  */
583
553
  export interface CreateAiOntologyEntityRequest extends AiOntologyEntityInput {
584
554
  /** Id of the ontology. */
585
555
  ontologyId: AiOntologyId;
586
- /** The caller's claim of who they are, not an authenticated identity. */
587
- actor?: string;
588
556
  }
589
557
  /**
590
558
  * Request to update a business entity. It replaces the name, the description and the members.
@@ -610,18 +578,6 @@ export interface DeleteAiOntologyEntityRequest {
610
578
  /** Id of the entity. */
611
579
  id: string;
612
580
  }
613
- /**
614
- * Request to accept, reject or reset a business entity.
615
- * @category AI
616
- */
617
- export interface ReviewAiOntologyEntityRequest {
618
- /** Id of the entity. */
619
- id: string;
620
- /** The decision. `reset` returns the entity to suggested and clears `reviewedAt`. */
621
- decision: ReviewAiOntologyRelationshipRequest['decision'];
622
- /** The caller's claim of who they are, not an authenticated identity. */
623
- actor?: string;
624
- }
625
581
  /**
626
582
  * The value type of an entity property.
627
583
  * @category AI
@@ -669,15 +625,13 @@ export interface AiOntologyProperty {
669
625
  * the only source (`ONTOLOGY_PROPERTY_SUPPORTING_SOURCE_ALONE`).
670
626
  */
671
627
  sources: AiOntologyPropertySource[];
672
- /** More columns a generation run found for a reviewed or edited property; unused until an update moves them. */
628
+ /** More columns a generation run found for a property a person made or edited; unused until an update moves them. */
673
629
  suggestedSources?: AiOntologyPropertySource[];
674
630
  /** What the values reveal; absent means unclassified, not safe. */
675
631
  sensitivity?: AiOntologyPropertySensitivity;
676
632
  /** `false` keeps the property from agents and AI queries; absent means visible. */
677
633
  agentVisible?: boolean;
678
- /** Review state. A row without `reviewedAt` and with a source other than `human` is unreviewed. */
679
- status: AiOntologyRelationshipStatus;
680
- /** Where the property came from. */
634
+ /** Where the property came from. A person's edit makes it `human`; runs then only suggest sources for it. */
681
635
  source: 'ai' | 'human';
682
636
  /** Why the property was proposed. */
683
637
  reasoning?: string;
@@ -685,10 +639,6 @@ export interface AiOntologyProperty {
685
639
  createdAt: number;
686
640
  /** Last update time in epoch milliseconds. */
687
641
  updatedAt: number;
688
- /** Who accepted or rejected the property. The caller's claim, not an authenticated identity. */
689
- reviewedBy?: string;
690
- /** When the property was reviewed, in epoch milliseconds. */
691
- reviewedAt?: number;
692
642
  }
693
643
  /**
694
644
  * Request to list the properties of an ontology.
@@ -699,8 +649,6 @@ export interface ListAiOntologyPropertiesRequest {
699
649
  ontologyId: AiOntologyId;
700
650
  /** Returns only the properties of this entity. */
701
651
  entityId?: string;
702
- /** Returns only properties in this state. */
703
- status?: AiOntologyRelationshipStatus;
704
652
  }
705
653
  /**
706
654
  * Response to {@link ListAiOntologyPropertiesRequest}.
@@ -732,8 +680,6 @@ export interface CreateAiOntologyPropertyRequest {
732
680
  sensitivity?: AiOntologyPropertySensitivity;
733
681
  /** `false` keeps the property from agents and AI queries. */
734
682
  agentVisible?: boolean;
735
- /** Review state. Defaults to `accepted`. An accepted or rejected property is stored as reviewed. */
736
- status?: AiOntologyRelationshipStatus;
737
683
  /** Where the property came from. Defaults to `human`. */
738
684
  source?: 'ai' | 'human';
739
685
  }
@@ -780,54 +726,35 @@ export interface DeleteAiOntologyPropertyRequest {
780
726
  id: string;
781
727
  }
782
728
  /**
783
- * Request to accept, reject or reset properties.
784
- * @category AI
785
- */
786
- export interface ReviewAiOntologyPropertiesRequest {
787
- /** Ids of the properties. */
788
- ids: string[];
789
- /** The decision. `reset` returns the properties to suggested and clears `reviewedAt`. */
790
- decision: ReviewAiOntologyRelationshipRequest['decision'];
791
- /** The caller's claim of who they are, not an authenticated identity. */
792
- actor?: string;
793
- }
794
- /**
795
- * Response to {@link ReviewAiOntologyPropertiesRequest}.
796
- * @category AI
797
- */
798
- export interface ReviewAiOntologyPropertiesResponse {
799
- /** The properties the review changed. */
800
- changed: AiOntologyProperty[];
801
- /** The properties left as they were, with the reason. */
802
- skipped: Array<{
803
- id: string;
804
- reason: string;
805
- }>;
806
- }
807
- /**
808
- * Request to generate the relationships, business entities and properties of an ontology. Answered by
809
- * {@link AiOntologyResponse}.
729
+ * Request to generate the relationships, business entities and properties of an ontology. The run saves nothing: it
730
+ * proposes the whole content, read with {@link GetAiOntologyGenerationResultRequest} and stored with
731
+ * {@link SaveAiOntologyContentRequest}. Answered by {@link AiOntologyResponse}.
810
732
  * @category AI
811
733
  */
812
734
  export interface GenerateAiOntologyRequest {
813
735
  /** Id of the ontology. */
814
736
  ontologyId: AiOntologyId;
815
- /** The status the run saves what it generates with. Defaults to `accepted`. */
816
- saveAs?: AiOntologyGenerationSaveStatus;
817
737
  /**
818
- * Whether the run uses the stored ontology as its reference. Defaults to `true`: the model sees the stored rows and
819
- * the run only adds to them, apart from what is derived: the schema import refreshes unreviewed imported
820
- * relationships and removes those whose association is gone, and the knowledge base records are refreshed as
821
- * {@link AiOntologyKnowledgeBase} describes. With `false` the run first deletes every relationship, business entity,
822
- * property and knowledge base record, reviewed and hand-made ones included, and generates everything again. That is
823
- * refused with `ONTOLOGY_HAS_NO_SOURCES` when nothing is attached, and fails, deleting nothing, when a database has
824
- * no stored schema or a knowledge base is gone or may not be in an ontology.
738
+ * Whether the run starts from the stored content. Defaults to `true`: it adds to the stored rows, refreshes the
739
+ * imported relationships people did not edit and removes those whose association is gone. With `false` it starts
740
+ * from nothing and generates everything again, refused with `ONTOLOGY_HAS_NO_SOURCES` when nothing is attached.
825
741
  */
826
742
  usePreviousOntology?: boolean;
743
+ /**
744
+ * `update` (the default) adds what is missing. `regenerate` reads the sources without the AI-generated rows and
745
+ * proposes removing those it does not find again; rows people made or edited stay. It needs `usePreviousOntology`
746
+ * left `true` (`ONTOLOGY_REGENERATE_STARTS_OVER`).
747
+ */
748
+ mode?: AiOntologyGenerationMode;
827
749
  }
828
750
  /**
829
- * Request to generate only the properties of business entities of an ontology. Answered by
830
- * {@link AiOntologyResponse}.
751
+ * How a generation run treats what the ontology already has.
752
+ * @category AI
753
+ */
754
+ export type AiOntologyGenerationMode = 'update' | 'regenerate';
755
+ /**
756
+ * Request to generate only the properties of business entities of an ontology, as a run that saves nothing, see
757
+ * {@link GenerateAiOntologyRequest}. Answered by {@link AiOntologyResponse}.
831
758
  * @category AI
832
759
  */
833
760
  export interface GenerateAiOntologyPropertiesRequest {
@@ -835,12 +762,10 @@ export interface GenerateAiOntologyPropertiesRequest {
835
762
  ontologyId: AiOntologyId;
836
763
  /** The entities to generate properties for, 1 to 50. Default: the entities that have no property yet. */
837
764
  entityIds?: string[];
838
- /** The status the run saves the properties with. Defaults to `accepted`. */
839
- saveAs?: AiOntologyGenerationSaveStatus;
840
765
  }
841
766
  /**
842
- * Request to refresh what an ontology stores about its attached knowledge bases, in a run of its own that saves its
843
- * topic links as accepted. Answered by {@link AiOntologyResponse}.
767
+ * Request to refresh what an ontology knows about its attached knowledge bases, as a run that saves nothing, see
768
+ * {@link GenerateAiOntologyRequest}. Answered by {@link AiOntologyResponse}.
844
769
  * @category AI
845
770
  */
846
771
  export interface RefreshAiOntologyKnowledgeBasesRequest {
@@ -848,12 +773,93 @@ export interface RefreshAiOntologyKnowledgeBasesRequest {
848
773
  ontologyId: AiOntologyId;
849
774
  }
850
775
  /**
851
- * The status a generation run saves what it generates with: `accepted` puts it to use at once, `suggested` keeps it
852
- * from agents until a review accepts it. The topics and summary of a knowledge base have no status and are refreshed
853
- * by every run.
776
+ * The relationships, business entities, properties and knowledge base records of an ontology.
777
+ * @category AI
778
+ */
779
+ export interface AiOntologyContent {
780
+ /** The relationships. */
781
+ relationships: AiOntologyRelationship[];
782
+ /** The business entities. */
783
+ entities: AiOntologyEntity[];
784
+ /** The properties. */
785
+ properties: AiOntologyProperty[];
786
+ /** One record per attached knowledge base a run has read. */
787
+ knowledgeBases: AiOntologyKnowledgeBase[];
788
+ }
789
+ /**
790
+ * Request to read the stored content of an ontology.
791
+ * @category AI
792
+ */
793
+ export interface GetAiOntologyContentRequest {
794
+ /** Id of the ontology. */
795
+ ontologyId: AiOntologyId;
796
+ }
797
+ /**
798
+ * Response that carries the content of an ontology.
799
+ * @category AI
800
+ */
801
+ export interface AiOntologyContentResponse {
802
+ /** The content. */
803
+ content: AiOntologyContent;
804
+ /** Identifies the stored content it is or builds on; a save sends it back. */
805
+ revision: string;
806
+ /** Things the request left out. */
807
+ warnings: string[];
808
+ }
809
+ /**
810
+ * Request to read the result of the last generation run, once it completed. The result is kept for a day, until a save
811
+ * of the content, a discard or the next run removes it.
812
+ * @category AI
813
+ */
814
+ export interface GetAiOntologyGenerationResultRequest {
815
+ /** Id of the ontology. */
816
+ ontologyId: AiOntologyId;
817
+ }
818
+ /**
819
+ * Response to {@link GetAiOntologyGenerationResultRequest}.
854
820
  * @category AI
855
821
  */
856
- export type AiOntologyGenerationSaveStatus = 'accepted' | 'suggested';
822
+ export interface GetAiOntologyGenerationResultResponse {
823
+ /**
824
+ * The content the run proposes: the stored content it started from with its changes. Its `revision` is that of the
825
+ * stored content, so a save fails when the content changed since the run started. Absent when there is no result.
826
+ */
827
+ result?: AiOntologyContentResponse & {
828
+ /** Whether the run started from nothing rather than from the stored content. */
829
+ startedOver: boolean;
830
+ /** When the run started, in epoch milliseconds; a discard sends it to remove only this result. */
831
+ startedAt: number;
832
+ };
833
+ }
834
+ /**
835
+ * Request to remove the result of the last finished generation run without saving it.
836
+ * @category AI
837
+ */
838
+ export interface DiscardAiOntologyGenerationResultRequest {
839
+ /** Id of the ontology. */
840
+ ontologyId: AiOntologyId;
841
+ /** Removes only the result of the run that started at this time, so a newer run's result is kept. */
842
+ startedAt?: number;
843
+ }
844
+ /**
845
+ * Request to replace the stored content of an ontology. New and changed rows are checked as a create or an update
846
+ * would check them; a row sent back unchanged is kept as stored. A row id the ontology does not store gets a new id,
847
+ * and references to it follow. Answered by {@link AiOntologyContentResponse}.
848
+ * @category AI
849
+ */
850
+ export interface SaveAiOntologyContentRequest {
851
+ /** Id of the ontology. */
852
+ ontologyId: AiOntologyId;
853
+ /** The whole content to store. */
854
+ content: AiOntologyContent;
855
+ /** The revision the content builds on; another one answers `ONTOLOGY_CONTENT_CHANGED` (409). */
856
+ revision: string;
857
+ /**
858
+ * Whether the content comes from a run that started from nothing. Otherwise an AI-made row the save removes is
859
+ * remembered, so runs do not propose it again.
860
+ */
861
+ startedOver?: boolean;
862
+ }
857
863
  /**
858
864
  * A root topic of the knowledge graph of an attached knowledge base.
859
865
  * @category AI
@@ -877,16 +883,10 @@ export interface AiOntologyKnowledgeBaseTopicLink {
877
883
  entityId: string;
878
884
  /** Why the model linked them; absent on a link a person added. */
879
885
  reasoning?: string;
880
- /** Review state; agents see only accepted links. A link without `reviewedAt` is unreviewed. */
881
- status: AiOntologyRelationshipStatus;
882
- /** Who accepted or rejected the link. The caller's claim, not an authenticated identity. */
883
- reviewedBy?: string;
884
- /** When the link was reviewed, in epoch milliseconds. */
885
- reviewedAt?: number;
886
886
  }
887
887
  /**
888
- * What an ontology stores about one attached knowledge base. A run replaces the summary and topics. Of the links it
889
- * replaces the unreviewed ones of the status it saves with, and none once a person set the links.
888
+ * What an ontology stores about one attached knowledge base. A run replaces the summary and topics and adds links,
889
+ * none once a person set the links.
890
890
  * @category AI
891
891
  */
892
892
  export interface AiOntologyKnowledgeBase {
@@ -927,8 +927,8 @@ export interface ListAiOntologyKnowledgeBasesResponse {
927
927
  knowledgeBases: AiOntologyKnowledgeBase[];
928
928
  }
929
929
  /**
930
- * Request to set the topic links of an attached knowledge base: the links named become the accepted links and every
931
- * other link is removed. Later runs keep these links.
930
+ * Request to set the topic links of an attached knowledge base: the links named replace every other link. Later runs
931
+ * keep these links.
932
932
  * @category AI
933
933
  */
934
934
  export interface UpdateAiOntologyKnowledgeBaseRequest {
@@ -942,26 +942,6 @@ export interface UpdateAiOntologyKnowledgeBaseRequest {
942
942
  */
943
943
  topicLinks: Array<Pick<AiOntologyKnowledgeBaseTopicLink, 'topicName' | 'entityId'>>;
944
944
  }
945
- /**
946
- * Request to accept, reject or reset topic links of an attached knowledge base. Answered by
947
- * {@link AiOntologyKnowledgeBaseResponse}.
948
- * @category AI
949
- */
950
- export interface ReviewAiOntologyKnowledgeBaseTopicLinksRequest {
951
- /** Id of the ontology. */
952
- ontologyId: AiOntologyId;
953
- /** Id of an attached knowledge base that a run has read. */
954
- knowledgeBaseId: AiKnowledgeBaseId;
955
- /** The links to review, 1 to `maxKnowledgeBaseTopicLinks`, each one a link of the record. */
956
- topicLinks: Array<Pick<AiOntologyKnowledgeBaseTopicLink, 'topicName' | 'entityId'>>;
957
- /**
958
- * The decision. `reset` returns the links to suggested and clears `reviewedAt`. Only a run that saves as suggested
959
- * may then replace them, and none once a person set the links; a run that saves as accepted keeps them suggested.
960
- */
961
- decision: ReviewAiOntologyRelationshipRequest['decision'];
962
- /** The caller's claim of who they are, not an authenticated identity. */
963
- actor?: string;
964
- }
965
945
  /**
966
946
  * Response that carries what an ontology stores about one knowledge base.
967
947
  * @category AI
@@ -997,7 +977,6 @@ export declare const AI_ONTOLOGY_LIMITS: {
997
977
  readonly maxReasoningLength: 2000;
998
978
  readonly maxColumnsPerSide: 16;
999
979
  readonly maxConfirmationColumnPairs: 10;
1000
- readonly maxActorLength: 200;
1001
980
  readonly maxTablesPerPrompt: 200;
1002
981
  readonly maxColumnsPerTableInPrompt: 100;
1003
982
  readonly maxToolCallsPerRun: 40;
@@ -1012,7 +991,6 @@ export declare const AI_ONTOLOGY_LIMITS: {
1012
991
  readonly maxPropertiesPerOntology: 2000;
1013
992
  readonly maxPropertySources: 20;
1014
993
  readonly maxPropertyDescriptionLength: 500;
1015
- readonly maxReviewedPropertiesPerCall: 200;
1016
994
  readonly maxEntitiesPerPropertyPass: 5;
1017
995
  readonly maxGeneratedPropertiesPerEntity: 30;
1018
996
  readonly maxEntitiesPerPropertyRun: 50;
@@ -1024,6 +1002,7 @@ export declare const AI_ONTOLOGY_LIMITS: {
1024
1002
  readonly maxFollowAgentRowsChars: 30000;
1025
1003
  readonly maxFollowLinkedReads: 5;
1026
1004
  readonly maxKnowledgeBasesPerOntology: 5;
1005
+ readonly maxGlossaryPromptChars: 30000;
1027
1006
  readonly maxKnowledgeBaseTopics: 20;
1028
1007
  readonly maxKnowledgeBaseTopicDescriptionLength: 250;
1029
1008
  readonly maxKnowledgeBaseSummaryLength: 500;
@@ -27,11 +27,13 @@ export interface AiQueryOptions {
27
27
  /** Whether to enable raw results output. */
28
28
  enableRawResults?: boolean;
29
29
  /**
30
- * Replaces the relationships the query sees in this database with the accepted ones of this ontology, when the
31
- * ontology attaches the database. Honored for any caller the query's security rules allow, since it only reshapes
32
- * the joins of this one database. An agent's database tool uses the agent's own `ontologyId` in place of this value.
30
+ * Replaces the relationships the query sees in this database with the accepted ones of those of these ontologies
31
+ * that attach the database, all of them together. Honored for any caller the query's security rules allow, since it
32
+ * only reshapes the joins of this one database. An agent's database tool uses the agent's own `ontologyIds` instead.
33
33
  */
34
- ontologyId?: AiOntologyId;
34
+ ontologyIds?: AiOntologyId[];
35
+ /** Options for the database's glossary, which guides every stage. */
36
+ semanticLayer?: AiQuerySemanticLayerOptions;
35
37
  /**
36
38
  * When the results are too large to analyze in the answer, skips the analysis and returns the raw results as
37
39
  * files instead, for a caller that processes them itself (e.g. an agent with `executePythonCode`). Default: false.
@@ -94,6 +96,26 @@ export interface AiQueryRequest {
94
96
  /** Additional options for query execution. */
95
97
  options?: AiQueryOptions;
96
98
  }
99
+ /**
100
+ * Options for the database's glossary in an AI query.
101
+ * @category AI
102
+ */
103
+ export interface AiQuerySemanticLayerOptions {
104
+ /** Whether the glossary terms are given to the model. Default: true. */
105
+ enabled?: boolean;
106
+ }
107
+ /**
108
+ * A glossary term an AI query gave the model.
109
+ * @category AI
110
+ */
111
+ export interface AiQueryProvidedDefinition {
112
+ /** What it is: a glossary term. */
113
+ type: 'term';
114
+ /** Id of the term. */
115
+ id: string;
116
+ /** Name of the term. */
117
+ name: string;
118
+ }
97
119
  /**
98
120
  * Options for the collection selection stage.
99
121
  *
@@ -210,6 +232,8 @@ export interface AiQueryResponse {
210
232
  * it cannot generate a valid query without more information.
211
233
  */
212
234
  clarificationQuestion?: string;
235
+ /** The glossary terms given to the model. The model may or may not have used them. */
236
+ providedDefinitions?: AiQueryProvidedDefinition[];
213
237
  }
214
238
  /**
215
239
  * The AI API call response
@@ -0,0 +1,323 @@
1
+ import { AiKnowledgeBaseId, IntegrationId } from './communication.public-types';
2
+ /**
3
+ * The id of a glossary.
4
+ * @category AI
5
+ */
6
+ export type GlossaryId = string;
7
+ /**
8
+ * What a glossary belongs to: one database, or the whole application.
9
+ * @category AI
10
+ */
11
+ export type GlossaryScope = {
12
+ type: 'database';
13
+ integrationId: IntegrationId;
14
+ } | {
15
+ type: 'global';
16
+ };
17
+ /**
18
+ * How a generation run treats the existing terms: `update` changes as little as the sources call for, `regenerate`
19
+ * builds the terms from the sources alone.
20
+ * @category AI
21
+ */
22
+ export type GlossaryGenerationMode = 'update' | 'regenerate';
23
+ /**
24
+ * Business vocabulary in plain language: what words like "Customer" or "Churn" mean.
25
+ * @category AI
26
+ */
27
+ export interface Glossary {
28
+ /** Unique id of the glossary. */
29
+ id: GlossaryId;
30
+ /** Name of the glossary. */
31
+ name: string;
32
+ /** What the glossary covers. */
33
+ description?: string;
34
+ /** The database the glossary belongs to, or the application for a global glossary. */
35
+ scope: GlossaryScope;
36
+ /** Global only: the databases whose glossaries feed generation. */
37
+ integrationIds: IntegrationId[];
38
+ /** Global only: the knowledge bases whose graphs feed generation. */
39
+ knowledgeBaseIds: AiKnowledgeBaseId[];
40
+ /** Guidance for generation, such as "We are a B2B insurer; skip HR terms". */
41
+ instructions?: string;
42
+ /** Incremented on every write; a save that carries an older one fails with a conflict. */
43
+ revision: number;
44
+ /** What the last saved generation read, by source; lets an unchanged update skip the model. */
45
+ generatedFrom?: Record<string, string>;
46
+ /** Number of terms. Set only on the glossaries of a list. */
47
+ termCount?: number;
48
+ /** Creation time in epoch milliseconds. */
49
+ createdAt: number;
50
+ /** Last update time in epoch milliseconds. */
51
+ updatedAt: number;
52
+ }
53
+ /**
54
+ * One term of a glossary.
55
+ * @category AI
56
+ */
57
+ export interface GlossaryTerm {
58
+ /** Unique id of the term within its glossary. */
59
+ id: string;
60
+ /** The term, such as "Customer". Unique within the glossary, ignoring case and spacing. */
61
+ name: string;
62
+ /** Plain-language definition; a database glossary's may say where the term lives in that database. */
63
+ description: string;
64
+ /** Other words people use for the term, such as "Customer" for "Account". */
65
+ synonyms?: string[];
66
+ /** Database glossaries only: the collections the term is relevant to. Empty means the whole database. */
67
+ collections?: string[];
68
+ /**
69
+ * Database glossaries only: a fragment of a query in the database's own language that selects the term, such as
70
+ * `name IS NOT NULL AND start_date IS NULL`. A hint to the model that writes queries, not a rule.
71
+ */
72
+ querySnippet?: string;
73
+ /** Creation time in epoch milliseconds. */
74
+ createdAt: number;
75
+ /** Last update time in epoch milliseconds. */
76
+ updatedAt: number;
77
+ }
78
+ /**
79
+ * A glossary as a caller writes it.
80
+ * @category AI
81
+ */
82
+ export interface GlossaryInput {
83
+ /** Id of the glossary; a new one is assigned when absent. A database glossary is found by its database. */
84
+ id?: GlossaryId;
85
+ /** Name of the glossary. */
86
+ name: string;
87
+ /** What the glossary covers. */
88
+ description?: string;
89
+ /** The database the glossary belongs to, or the application for a global glossary. */
90
+ scope: GlossaryScope;
91
+ /** Global only: the databases whose glossaries feed generation. */
92
+ integrationIds?: IntegrationId[];
93
+ /** Global only: the knowledge bases whose graphs feed generation; each needs a readable graph. */
94
+ knowledgeBaseIds?: AiKnowledgeBaseId[];
95
+ /** Guidance for generation. */
96
+ instructions?: string;
97
+ }
98
+ /**
99
+ * A term as a caller writes it.
100
+ * @category AI
101
+ */
102
+ export interface GlossaryTermInput {
103
+ /** Id of the term; a new one is assigned when absent. */
104
+ id?: string;
105
+ /** The term, such as "Customer". */
106
+ name: string;
107
+ /** Plain-language definition. */
108
+ description: string;
109
+ /** Other words people use for the term, as in {@link GlossaryTerm}. */
110
+ synonyms?: string[];
111
+ /** Database glossaries only: the collections the term is relevant to. Empty means the whole database. */
112
+ collections?: string[];
113
+ /** Database glossaries only: a query fragment that selects the term, as in {@link GlossaryTerm}. Empty means none. */
114
+ querySnippet?: string;
115
+ }
116
+ /**
117
+ * One change a generation run made to the terms it was given, with the model's reason.
118
+ * @category AI
119
+ */
120
+ export interface GlossaryChange {
121
+ /** What happened to the term. */
122
+ type: 'add' | 'update' | 'remove' | 'merge';
123
+ /** Name of the term the change is about; for a merge, the term the others were merged into. */
124
+ name: string;
125
+ /** Id of the existing term, for an update, remove or merge. */
126
+ termId?: string;
127
+ /** For a merge: the ids of the terms folded into `termId`. */
128
+ mergedTermIds?: string[];
129
+ /** Why the model made the change. */
130
+ reason: string;
131
+ }
132
+ /**
133
+ * Request to list the glossaries of the application.
134
+ * @category AI
135
+ */
136
+ export interface ListGlossariesRequest {
137
+ /** Limits the list to database or global glossaries. */
138
+ scope?: GlossaryScope['type'];
139
+ }
140
+ /**
141
+ * Response with the glossaries of the application.
142
+ * @category AI
143
+ */
144
+ export interface ListGlossariesResponse {
145
+ /** The glossaries, each with its term count. */
146
+ glossaries: Glossary[];
147
+ }
148
+ /**
149
+ * Request to get one glossary.
150
+ * @category AI
151
+ */
152
+ export interface GetGlossaryRequest {
153
+ /** Id of the glossary. */
154
+ id: GlossaryId;
155
+ }
156
+ /**
157
+ * Response with one glossary.
158
+ * @category AI
159
+ */
160
+ export interface GetGlossaryResponse {
161
+ /** The glossary, or undefined when it does not exist. */
162
+ glossary?: Glossary;
163
+ }
164
+ /**
165
+ * Request to get the glossary of a database.
166
+ * @category AI
167
+ */
168
+ export interface GetDatabaseGlossaryRequest {
169
+ /** Id of the database integration. */
170
+ integrationId: IntegrationId;
171
+ }
172
+ /**
173
+ * Request to list the terms of a glossary, one page at a time.
174
+ * @category AI
175
+ */
176
+ export interface ListGlossaryTermsRequest {
177
+ /** Id of the glossary. */
178
+ glossaryId: GlossaryId;
179
+ /** The cursor of the previous page. */
180
+ cursor?: string;
181
+ /** Page size; default 500, at most 1000. */
182
+ limit?: number;
183
+ /** Keeps the terms whose name contains this text, ignoring case. */
184
+ search?: string;
185
+ }
186
+ /**
187
+ * Response with one page of terms.
188
+ * @category AI
189
+ */
190
+ export interface ListGlossaryTermsResponse {
191
+ /** The terms of the page, by name. */
192
+ terms: GlossaryTerm[];
193
+ /** The cursor of the next page; absent on the last one. */
194
+ cursor?: string;
195
+ }
196
+ /**
197
+ * Request to save a glossary with all its terms: the stored terms become exactly `terms`.
198
+ * @category AI
199
+ */
200
+ export interface SaveGlossaryRequest {
201
+ /** The glossary. */
202
+ glossary: GlossaryInput;
203
+ /** Every term of the glossary. */
204
+ terms: GlossaryTermInput[];
205
+ /**
206
+ * The revision the terms were read at; a newer stored revision fails the save with a conflict. `0` says none was
207
+ * stored, so a glossary saved since fails it too. Omitted, the save replaces whatever is stored.
208
+ */
209
+ revision?: number;
210
+ /** Names of generated terms the person dropped before saving; generation does not propose them again. */
211
+ droppedNames?: string[];
212
+ /** Whether `terms` came from a `regenerate` run: the remembered names are replaced by `droppedNames`. */
213
+ regenerated?: boolean;
214
+ /** The `generatedFrom` of the generation `terms` came from. */
215
+ generatedFrom?: Record<string, string>;
216
+ }
217
+ /**
218
+ * Response with the saved glossary.
219
+ * @category AI
220
+ */
221
+ export interface SaveGlossaryResponse {
222
+ /** The glossary as stored. */
223
+ glossary: Glossary;
224
+ }
225
+ /**
226
+ * Request to add or change one term.
227
+ * @category AI
228
+ */
229
+ export interface UpdateGlossaryTermRequest {
230
+ /** Id of the glossary. */
231
+ glossaryId: GlossaryId;
232
+ /** The term; one with an unknown or absent id is added. */
233
+ term: GlossaryTermInput;
234
+ }
235
+ /**
236
+ * Response with the stored term.
237
+ * @category AI
238
+ */
239
+ export interface UpdateGlossaryTermResponse {
240
+ /** The term as stored. */
241
+ term: GlossaryTerm;
242
+ }
243
+ /**
244
+ * Request to delete one term. Its name is remembered, so generation does not propose it again.
245
+ * @category AI
246
+ */
247
+ export interface DeleteGlossaryTermRequest {
248
+ /** Id of the glossary. */
249
+ glossaryId: GlossaryId;
250
+ /** Id of the term. */
251
+ termId: string;
252
+ }
253
+ /**
254
+ * Request to delete a glossary and its terms.
255
+ * @category AI
256
+ */
257
+ export interface DeleteGlossaryRequest {
258
+ /** Id of the glossary. */
259
+ id: GlossaryId;
260
+ }
261
+ /**
262
+ * Request to list the names a glossary remembers as removed.
263
+ * @category AI
264
+ */
265
+ export interface ListGlossaryExcludedNamesRequest {
266
+ /** Id of the glossary. */
267
+ glossaryId: GlossaryId;
268
+ }
269
+ /**
270
+ * Response with the names a glossary remembers as removed.
271
+ * @category AI
272
+ */
273
+ export interface ListGlossaryExcludedNamesResponse {
274
+ /** The names, as first removed. */
275
+ names: string[];
276
+ }
277
+ /**
278
+ * Request to forget a removed name, so generation may propose it again.
279
+ * @category AI
280
+ */
281
+ export interface RestoreGlossaryExcludedNameRequest {
282
+ /** Id of the glossary. */
283
+ glossaryId: GlossaryId;
284
+ /** The name to forget. */
285
+ name: string;
286
+ }
287
+ /**
288
+ * Request to generate terms for a glossary draft. Nothing is saved.
289
+ * @category AI
290
+ */
291
+ export interface GenerateGlossaryRequest {
292
+ /** The glossary, saved or not. */
293
+ glossary: GlossaryInput;
294
+ /** The current draft of the terms; defaults to the saved terms. Ignored by `regenerate`. */
295
+ terms?: GlossaryTermInput[];
296
+ /** Default: `update`. */
297
+ mode?: GlossaryGenerationMode;
298
+ /**
299
+ * Extra instructions for this run only, such as "Add terms for our loyalty program". They are not saved; the
300
+ * glossary's own `instructions` still apply. A run with them always calls the model.
301
+ */
302
+ instructions?: string;
303
+ /** Names to skip besides those the glossary remembers, such as terms dropped from the current draft. */
304
+ excludedNames?: string[];
305
+ /** The `generatedFrom` of the draft; an update whose sources match it returns the draft unchanged. */
306
+ generatedFrom?: Record<string, string>;
307
+ }
308
+ /**
309
+ * Response with the generated draft.
310
+ * @category AI
311
+ */
312
+ export interface GenerateGlossaryResponse {
313
+ /** The terms of the new draft. */
314
+ terms: GlossaryTermInput[];
315
+ /** What changed against the terms given, each with a reason. */
316
+ changes: GlossaryChange[];
317
+ /** Sources that were skipped or could not be read. */
318
+ warnings: string[];
319
+ /** What this generation read, to pass to the save. */
320
+ generatedFrom: Record<string, string>;
321
+ /** True when no source changed, so the model was not called. */
322
+ unchanged: boolean;
323
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/jira-client",
3
- "version": "1.0.513",
3
+ "version": "1.0.515",
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",
@@ -22,7 +22,7 @@
22
22
  "author": "",
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
- "@squidcloud/client": "^1.0.513"
25
+ "@squidcloud/client": "^1.0.515"
26
26
  },
27
27
  "engines": {
28
28
  "node": ">=20.0.0"