@squidcloud/jira-jsm-client 1.0.499 → 1.0.501
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.
|
@@ -488,11 +488,28 @@ export interface BackupModelOptions {
|
|
|
488
488
|
/** Response length and detail level; supported by OpenAI models only. */
|
|
489
489
|
verbosity?: AiVerbosityLevel;
|
|
490
490
|
}
|
|
491
|
-
/**
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
491
|
+
/** Configures independent answer validation and bounded correction. @category AI */
|
|
492
|
+
export interface AiAnswerValidationOptions {
|
|
493
|
+
/** Judge model; defaults to the model that produced the initial answer. */
|
|
494
|
+
model?: AiChatModelSelection;
|
|
495
|
+
/** Additional acceptance criteria for the judge. */
|
|
496
|
+
instructions?: string;
|
|
497
|
+
/** Maximum answer attempts, including the initial answer. Defaults to 2; accepts 1–5. */
|
|
498
|
+
maxAttempts?: number;
|
|
499
|
+
}
|
|
500
|
+
/** Reports the judge's verdict for the returned answer. @category AI */
|
|
501
|
+
export interface AiAnswerValidationResult {
|
|
502
|
+
/** Whether the returned answer passed validation; false also covers incomplete validation. */
|
|
503
|
+
passed: boolean;
|
|
504
|
+
/** Concise explanation of the verdict or validation failure. */
|
|
505
|
+
summary: string;
|
|
506
|
+
/** Actionable defects or reasons validation could not complete. */
|
|
507
|
+
issues: Array<string>;
|
|
508
|
+
}
|
|
509
|
+
/** Shared options for agent chat requests. @category AI */
|
|
495
510
|
export interface BaseAiChatOptions {
|
|
511
|
+
/** Enables validation for non-CLI models; an empty object uses defaults. Judge read-only behavior is instruction-based. */
|
|
512
|
+
validation?: AiAnswerValidationOptions;
|
|
496
513
|
/**
|
|
497
514
|
* The maximum number of input tokens that Squid can use when making the request to the AI model.
|
|
498
515
|
* Defaults to the max tokens the model can accept.
|
|
@@ -1445,6 +1462,8 @@ export interface DeleteAgentRequest {
|
|
|
1445
1462
|
* @category AI
|
|
1446
1463
|
*/
|
|
1447
1464
|
export interface AiAskResponse {
|
|
1465
|
+
/** Judge verdict, present when answer validation is enabled. */
|
|
1466
|
+
validation?: AiAnswerValidationResult;
|
|
1448
1467
|
/** The response string from the agent */
|
|
1449
1468
|
responseString: string;
|
|
1450
1469
|
/** Optional annotations (e.g., file references) in the response */
|
|
@@ -1189,6 +1189,11 @@ export interface GeneratedMetadataFieldDescription {
|
|
|
1189
1189
|
export interface GetKnowledgeBaseGraphStatusRequest {
|
|
1190
1190
|
/** The id of the AiKnowledgeBase. */
|
|
1191
1191
|
knowledgeBaseId: AiKnowledgeBaseId;
|
|
1192
|
+
/**
|
|
1193
|
+
* Whether to include the topic table (`topics`, `topicEdges`). Default true. A poller that reads only the
|
|
1194
|
+
* build state can pass false: on a large graph the table runs to thousands of topics.
|
|
1195
|
+
*/
|
|
1196
|
+
includeTopics?: boolean;
|
|
1192
1197
|
}
|
|
1193
1198
|
/**
|
|
1194
1199
|
* Response structure for a knowledge base's GraphRAG build/readiness status. Drives the ai-eval
|
|
@@ -1552,17 +1557,20 @@ export interface RebuildKnowledgeBaseGraphRequest {
|
|
|
1552
1557
|
*/
|
|
1553
1558
|
ignoreActiveBulkJobs?: boolean;
|
|
1554
1559
|
}
|
|
1560
|
+
/** Hard ceiling on the nodes one graph explore returns: a larger `nodeLimit` is clamped down to this value. */
|
|
1561
|
+
export declare const KNOWLEDGE_BASE_GRAPH_EXPLORE_MAX_NODES = 1000;
|
|
1562
|
+
/** Longest `search` text a graph explore accepts; a longer one is rejected. */
|
|
1563
|
+
export declare const KNOWLEDGE_BASE_GRAPH_SEARCH_MAX_LENGTH = 200;
|
|
1555
1564
|
/**
|
|
1556
|
-
* Request structure for exploring a bounded subgraph of a knowledge base's graph (
|
|
1557
|
-
*
|
|
1558
|
-
*
|
|
1559
|
-
* here once implemented.
|
|
1565
|
+
* Request structure for exploring a bounded subgraph of a knowledge base's graph (visualization). By default
|
|
1566
|
+
* it returns the highest-degree entities and the relationships among them; `topicId`, `entityId` and `search`
|
|
1567
|
+
* select other entity pools, and `contextMetadataFilter` narrows any of them.
|
|
1560
1568
|
* @category AI
|
|
1561
1569
|
*/
|
|
1562
1570
|
export interface ExploreKnowledgeBaseGraphRequest {
|
|
1563
1571
|
/** The id of the AiKnowledgeBase. */
|
|
1564
1572
|
knowledgeBaseId: AiKnowledgeBaseId;
|
|
1565
|
-
/** Hard cap on returned nodes. Default 200,
|
|
1573
|
+
/** Hard cap on returned nodes. Default 200, at most {@link KNOWLEDGE_BASE_GRAPH_EXPLORE_MAX_NODES}. */
|
|
1566
1574
|
nodeLimit?: number;
|
|
1567
1575
|
/**
|
|
1568
1576
|
* Restricts the subgraph to entities under the given topic node id — any hierarchy level; an entity
|
|
@@ -1570,6 +1578,30 @@ export interface ExploreKnowledgeBaseGraphRequest {
|
|
|
1570
1578
|
* `TOPIC_NOT_FOUND`. Ids come from {@link KnowledgeBaseGraphTopic.id} and churn on rebuild.
|
|
1571
1579
|
*/
|
|
1572
1580
|
topicId?: string;
|
|
1581
|
+
/**
|
|
1582
|
+
* Centers the subgraph on one entity: the entity plus its neighbors, strongest relationships first. Ids
|
|
1583
|
+
* come from {@link KnowledgeBaseGraphNode.id} and churn on rebuild; an unknown id fails with
|
|
1584
|
+
* `ENTITY_NOT_FOUND`. Cannot be combined with `topicId` or `search`.
|
|
1585
|
+
*/
|
|
1586
|
+
entityId?: string;
|
|
1587
|
+
/**
|
|
1588
|
+
* Finds entities by name: exact names and aliases first, then prefixes, then substrings, each by degree.
|
|
1589
|
+
* When no name matches, returns the entities nearest in meaning instead (`searchMatch: 'similar'`).
|
|
1590
|
+
* At most {@link KNOWLEDGE_BASE_GRAPH_SEARCH_MAX_LENGTH} characters. Cannot be combined with `topicId` or
|
|
1591
|
+
* `entityId`.
|
|
1592
|
+
*/
|
|
1593
|
+
search?: string;
|
|
1594
|
+
/**
|
|
1595
|
+
* Keeps only the entities mentioned by contexts matching the filter. Without `entityId` or `search`, they
|
|
1596
|
+
* are ranked by how many matching contexts mention them. Filters on context-record metadata only, not on
|
|
1597
|
+
* per-chunk keys.
|
|
1598
|
+
*/
|
|
1599
|
+
contextMetadataFilter?: AiContextMetadataFilter;
|
|
1600
|
+
/**
|
|
1601
|
+
* Whether to attach the topic table (`topics`). Default true. A caller that already holds it can pass false:
|
|
1602
|
+
* on a large graph the table runs to thousands of topics.
|
|
1603
|
+
*/
|
|
1604
|
+
includeTopics?: boolean;
|
|
1573
1605
|
}
|
|
1574
1606
|
/** A node in an {@link ExploreKnowledgeBaseGraphResponse}. @category AI */
|
|
1575
1607
|
export interface KnowledgeBaseGraphNode {
|
|
@@ -1608,14 +1640,32 @@ export interface KnowledgeBaseGraphEdge {
|
|
|
1608
1640
|
export interface ExploreKnowledgeBaseGraphResponse {
|
|
1609
1641
|
/** The subgraph nodes. */
|
|
1610
1642
|
nodes: Array<KnowledgeBaseGraphNode>;
|
|
1611
|
-
/**
|
|
1643
|
+
/**
|
|
1644
|
+
* The subgraph edges (outgoing only, both endpoints present in `nodes`). Capped: past the cap only the
|
|
1645
|
+
* heaviest are returned and {@link edgesTruncated} is set.
|
|
1646
|
+
*/
|
|
1612
1647
|
edges: Array<KnowledgeBaseGraphEdge>;
|
|
1648
|
+
/** True when the nodes are linked by more relationships than `edges` carries. */
|
|
1649
|
+
edgesTruncated?: boolean;
|
|
1613
1650
|
/**
|
|
1614
1651
|
* The KB's topic (theme) nodes — the id→name/hierarchy table for the nodes' `topicPath` ids, so a
|
|
1615
1652
|
* visualization can label and group by theme without extra round trips. Present when the concept
|
|
1616
|
-
* layer has been built (a rebuild ran).
|
|
1653
|
+
* layer has been built (a rebuild ran). Under `contextMetadataFilter`, `docCount` counts only the
|
|
1654
|
+
* matching contexts.
|
|
1617
1655
|
*/
|
|
1618
1656
|
topics?: Array<KnowledgeBaseGraphTopic>;
|
|
1657
|
+
/**
|
|
1658
|
+
* Size of the pool the subgraph was cut from — the entities in scope, the topic's members, the entity's
|
|
1659
|
+
* neighbors or the search matches. Compare with `nodes.length` to offer more. Absent when not counted.
|
|
1660
|
+
*/
|
|
1661
|
+
totalCount?: number;
|
|
1662
|
+
/** How a `search` matched: by entity name, or by meaning when no name matched. */
|
|
1663
|
+
searchMatch?: 'name' | 'similar';
|
|
1664
|
+
/**
|
|
1665
|
+
* True when `contextMetadataFilter` matched more contexts than one request reads; the subgraph then
|
|
1666
|
+
* covers only the first of them.
|
|
1667
|
+
*/
|
|
1668
|
+
scopeTruncated?: boolean;
|
|
1619
1669
|
}
|
|
1620
1670
|
/**
|
|
1621
1671
|
* A topic (theme) node of the graph's concept layer, as referenced by
|
|
@@ -1656,12 +1706,14 @@ export interface KnowledgeBaseGraphTopicEdge {
|
|
|
1656
1706
|
* round trip with a complete answer — no per-level walking.
|
|
1657
1707
|
* @category AI
|
|
1658
1708
|
*/
|
|
1659
|
-
export type KnowledgeBaseGraphQueryOp = 'overview' | 'resolve' | 'describe' | 'subtree' | 'docsUnder' | 'conceptsOf' | 'neighborhood' | 'pathBetween' | 'globalSummary';
|
|
1709
|
+
export type KnowledgeBaseGraphQueryOp = 'overview' | 'resolve' | 'describe' | 'subtree' | 'docsUnder' | 'conceptsOf' | 'neighborhood' | 'pathBetween' | 'globalSummary' | 'relationship';
|
|
1660
1710
|
/**
|
|
1661
1711
|
* Request structure for querying a knowledge base's graph (documents, entities, topics, facets) through
|
|
1662
1712
|
* the closed op set. `ref` accepts a facet nodeId (`facet_…` — exact; the only persistable concept
|
|
1663
|
-
* handles)
|
|
1664
|
-
*
|
|
1713
|
+
* handles), a topic id from {@link KnowledgeBaseGraphTopic.id} or an entity id from
|
|
1714
|
+
* {@link KnowledgeBaseGraphNode.id} (both exact, both churn on rebuild) or a name, resolved server-side
|
|
1715
|
+
* (exact → alias → similarity). An unresolvable ref fails with `CONCEPT_NOT_FOUND` plus the nearest
|
|
1716
|
+
* matching names.
|
|
1665
1717
|
* @category AI
|
|
1666
1718
|
*/
|
|
1667
1719
|
export interface QueryKnowledgeBaseGraphRequest {
|
|
@@ -1669,9 +1721,12 @@ export interface QueryKnowledgeBaseGraphRequest {
|
|
|
1669
1721
|
knowledgeBaseId: AiKnowledgeBaseId;
|
|
1670
1722
|
/** The operation to run. */
|
|
1671
1723
|
op: KnowledgeBaseGraphQueryOp;
|
|
1672
|
-
/**
|
|
1724
|
+
/**
|
|
1725
|
+
* Node ref (name, facet nodeId, topic id or entity id). Required by resolve/describe/subtree/docsUnder/
|
|
1726
|
+
* neighborhood/pathBetween/relationship.
|
|
1727
|
+
*/
|
|
1673
1728
|
ref?: string;
|
|
1674
|
-
/** Second node ref for `pathBetween`. */
|
|
1729
|
+
/** Second node ref for `pathBetween`, and the target entity for `relationship`. */
|
|
1675
1730
|
refB?: string;
|
|
1676
1731
|
/** The document's contextId for `conceptsOf`. */
|
|
1677
1732
|
contextId?: string;
|
|
@@ -1683,8 +1738,16 @@ export interface QueryKnowledgeBaseGraphRequest {
|
|
|
1683
1738
|
hops?: number;
|
|
1684
1739
|
/** `docsUnder`: when true (default), include documents under the whole subtree, not just the node itself. */
|
|
1685
1740
|
recursive?: boolean;
|
|
1686
|
-
/**
|
|
1741
|
+
/**
|
|
1742
|
+
* `docsUnder` and `relationship`: maximum documents returned. Default 25, max 100 (`totalDocs` always
|
|
1743
|
+
* reports the full count).
|
|
1744
|
+
*/
|
|
1687
1745
|
limit?: number;
|
|
1746
|
+
/**
|
|
1747
|
+
* `docsUnder` and `relationship`: keeps only the documents whose context matches the filter. Filters on
|
|
1748
|
+
* context-record metadata only, not on per-chunk keys.
|
|
1749
|
+
*/
|
|
1750
|
+
contextMetadataFilter?: AiContextMetadataFilter;
|
|
1688
1751
|
}
|
|
1689
1752
|
/** One node matched by a graph query (`resolve`, and the anchors of other ops). @category AI */
|
|
1690
1753
|
export interface KnowledgeBaseGraphQueryMatch {
|
|
@@ -1767,6 +1830,27 @@ export interface KnowledgeBaseGraphQueryPath {
|
|
|
1767
1830
|
/** Thematic tier: names of concepts both refs sit under. */
|
|
1768
1831
|
sharedConcepts?: Array<string>;
|
|
1769
1832
|
}
|
|
1833
|
+
/**
|
|
1834
|
+
* A `relationship` answer: the direct relationship between two entities, in its asserted direction, and
|
|
1835
|
+
* the documents asserting it.
|
|
1836
|
+
* @category AI
|
|
1837
|
+
*/
|
|
1838
|
+
export interface KnowledgeBaseGraphQueryRelationship {
|
|
1839
|
+
/** Source entity name. */
|
|
1840
|
+
source: string;
|
|
1841
|
+
/** Target entity name. */
|
|
1842
|
+
target: string;
|
|
1843
|
+
/** Relationship label. */
|
|
1844
|
+
type: string;
|
|
1845
|
+
/** Relationship description, when the extraction produced one. */
|
|
1846
|
+
description?: string;
|
|
1847
|
+
/** How many times the relationship was asserted. */
|
|
1848
|
+
weight: number;
|
|
1849
|
+
/** Documents asserting the relationship (capped by `limit`). */
|
|
1850
|
+
documents: Array<KnowledgeBaseGraphQueryDoc>;
|
|
1851
|
+
/** Number of documents asserting it (compare with `documents.length` for truncation). */
|
|
1852
|
+
totalDocs: number;
|
|
1853
|
+
}
|
|
1770
1854
|
/**
|
|
1771
1855
|
* Response structure for a graph query. `op` echoes the request; exactly the fields that op produces
|
|
1772
1856
|
* are set (e.g. `matches` for `resolve`, `tree` for `subtree`).
|
|
@@ -1803,6 +1887,13 @@ export interface QueryKnowledgeBaseGraphResponse {
|
|
|
1803
1887
|
pathBetween?: KnowledgeBaseGraphQueryPath;
|
|
1804
1888
|
/** `globalSummary`: the KB's topic summaries ranked against the query, most relevant first. */
|
|
1805
1889
|
summaries?: Array<KnowledgeBaseGraphQueryGlobalSummary>;
|
|
1890
|
+
/** `relationship`: the relationship between `ref` and `refB` and the documents asserting it. */
|
|
1891
|
+
relationship?: KnowledgeBaseGraphQueryRelationship;
|
|
1892
|
+
/**
|
|
1893
|
+
* True when `contextMetadataFilter` matched more contexts than one request reads; the documents then come
|
|
1894
|
+
* from only the first of them.
|
|
1895
|
+
*/
|
|
1896
|
+
scopeTruncated?: boolean;
|
|
1806
1897
|
}
|
|
1807
1898
|
/**
|
|
1808
1899
|
* One context to stage through bulk ingestion. Unlike the sync request, `imageExtractionModel` is not
|
|
@@ -10,3 +10,48 @@ export declare const CONNECTOR_IDS: readonly ["bitbucket", "confluence", "connec
|
|
|
10
10
|
* @category Platform
|
|
11
11
|
*/
|
|
12
12
|
export type ConnectorId = (typeof CONNECTOR_IDS)[number];
|
|
13
|
+
/** Where one file/folder sits in a connector's own tracking, independent of the KB ledger. */
|
|
14
|
+
export type ConnectorPathStatusClassification = 'indexed' | 'staged' | 'failed' | 'skipped' | 'folder_tracked';
|
|
15
|
+
/** The durable ingestion status of one file in the knowledge base ledger, as {@link ConnectorPathStatusEntry.kbStatus}. */
|
|
16
|
+
export interface ConnectorKbFileStatus {
|
|
17
|
+
/** The file's current durable status in the knowledge base ledger. */
|
|
18
|
+
status: 'no_record' | 'in_progress' | 'completed' | 'failed';
|
|
19
|
+
/** Present only when `status` is `'failed'`. */
|
|
20
|
+
errorMessage?: string;
|
|
21
|
+
/** Present only when `status` is `'failed'`, when known. */
|
|
22
|
+
errorCode?: string;
|
|
23
|
+
/** When this status was last recorded; absent when `status` is `'no_record'`. */
|
|
24
|
+
updatedAt?: Date;
|
|
25
|
+
}
|
|
26
|
+
/** One file or folder a connector knows about at or under a searched path. */
|
|
27
|
+
export interface ConnectorPathStatusEntry {
|
|
28
|
+
/** The connector-specific id of the document. */
|
|
29
|
+
documentId: string;
|
|
30
|
+
/** The document's name. */
|
|
31
|
+
name: string;
|
|
32
|
+
/** Whether this document is a file or a folder. */
|
|
33
|
+
type: 'file' | 'folder';
|
|
34
|
+
/** Folder path, when this document was indexed through a folder. With `name`, forms the KB ledger's lookup path. */
|
|
35
|
+
folderPath?: string;
|
|
36
|
+
/** Where this document sits in the connector's own tracking. */
|
|
37
|
+
classification: ConnectorPathStatusClassification;
|
|
38
|
+
/** Message describing the most recent failure, when `classification` is `'failed'` or `'skipped'`. */
|
|
39
|
+
errorMessage?: string;
|
|
40
|
+
/** Last successful ingestion, when the document has one. */
|
|
41
|
+
lastIndexedDate?: Date;
|
|
42
|
+
/** The knowledge-base context ID this document maps to, when it has one. */
|
|
43
|
+
contextId?: string;
|
|
44
|
+
/** The KB ledger's own status for this file, when the connector resolved one. */
|
|
45
|
+
kbStatus?: ConnectorKbFileStatus;
|
|
46
|
+
}
|
|
47
|
+
/** A connector's own record of files/folders matching a searched path, from `Squid.getConnectorPathStatus`. */
|
|
48
|
+
export interface ConnectorPathStatusResult {
|
|
49
|
+
/** False when the integration's type doesn't expose path-status search (most types). */
|
|
50
|
+
supported: boolean;
|
|
51
|
+
/** The knowledge base this integration indexes into, when resolvable. */
|
|
52
|
+
knowledgeBaseId?: string;
|
|
53
|
+
/** The matching files/folders, absent when `supported` is false. */
|
|
54
|
+
entries?: Array<ConnectorPathStatusEntry>;
|
|
55
|
+
/** True when more matches exist than `entries` returns. */
|
|
56
|
+
truncated?: boolean;
|
|
57
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/jira-jsm-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.501",
|
|
4
4
|
"description": "Squid Jira Service Management Client - SDK for interacting with the JSM connector",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/jira-jsm-client/src/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "ISC",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"assertic": "^1.3.0",
|
|
28
|
-
"@squidcloud/client": "^1.0.
|
|
28
|
+
"@squidcloud/client": "^1.0.501"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=20.0.0"
|