@khotan/cli 1.3.0 → 1.4.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/dist/khotan.js +233 -2
- package/package.json +1 -1
package/dist/khotan.js
CHANGED
|
@@ -19,7 +19,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
19
19
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
20
|
|
|
21
21
|
// ../khotan-core/src/version.ts
|
|
22
|
-
var CATALOG_SCHEMA_VERSION = 2, CATALOG_VERSION = "2026-10-
|
|
22
|
+
var CATALOG_SCHEMA_VERSION = 2, CATALOG_VERSION = "2026-10-30", KHOTAN_ADAPTER_NAME = "khotan", KHOTAN_ADAPTER_VERSION = "0.10.0", SUPPORTED_CATALOG_SCHEMA_VERSIONS;
|
|
23
23
|
var init_version = __esm(() => {
|
|
24
24
|
SUPPORTED_CATALOG_SCHEMA_VERSIONS = [
|
|
25
25
|
CATALOG_SCHEMA_VERSION
|
|
@@ -486,7 +486,7 @@ var idField = (name, description) => ({
|
|
|
486
486
|
type: "string",
|
|
487
487
|
required: true,
|
|
488
488
|
description
|
|
489
|
-
}), article = (noun) => /^[aeiou]/i.test(noun) ? "an" : "a", tagsDescription = "Full tag list, comma-separated or repeatable; it replaces the stored list, and an empty value clears it. The server lowercases each tag and turns spaces into hyphens. Up to 10 tags of 1-32 lowercase letters, digits, or single hyphens.", identityCapabilities, databaseCapabilities, redisCapabilities, bucketCapabilities, fileCapabilities, folderCapabilities, contextCapabilities, appsCapabilities, pipelinesCapabilities, oauthLifecycleCapabilities, integrationsCapabilities, emailSubscriptionCapabilities, projectCapabilities, organizationCapabilities, feedbackCapabilities, capabilities, khotanCatalog, capabilitiesById;
|
|
489
|
+
}), article = (noun) => /^[aeiou]/i.test(noun) ? "an" : "a", tagsDescription = "Full tag list, comma-separated or repeatable; it replaces the stored list, and an empty value clears it. The server lowercases each tag and turns spaces into hyphens. Up to 10 tags of 1-32 lowercase letters, digits, or single hyphens.", identityCapabilities, databaseCapabilities, redisCapabilities, bucketCapabilities, fileCapabilities, folderCapabilities, contextCapabilities, appsCapabilities, pipelinesCapabilities, oauthLifecycleCapabilities, integrationsCapabilities, emailSubscriptionCapabilities, projectCapabilities, traceCapabilities, organizationCapabilities, feedbackCapabilities, capabilities, khotanCatalog, capabilitiesById;
|
|
490
490
|
var init_catalog = __esm(() => {
|
|
491
491
|
init_version();
|
|
492
492
|
identityCapabilities = [
|
|
@@ -1698,6 +1698,22 @@ var init_catalog = __esm(() => {
|
|
|
1698
1698
|
cli: { command: ["projects", "linear", "bind"], summary: "Bind a project to Linear" }
|
|
1699
1699
|
}
|
|
1700
1700
|
];
|
|
1701
|
+
traceCapabilities = [
|
|
1702
|
+
{
|
|
1703
|
+
id: "traces.search",
|
|
1704
|
+
domain: "traces",
|
|
1705
|
+
safety: "read",
|
|
1706
|
+
auth: true,
|
|
1707
|
+
title: "Search implementation traces",
|
|
1708
|
+
description: "Hybrid semantic + full-text search over captured coding sessions (Cursor, Claude, Codex, Devin); returns one ranked passage per conversation with its thread id. Requires the developer role.",
|
|
1709
|
+
input: [
|
|
1710
|
+
{ name: "q", location: "query", type: "string", required: true, description: "Natural-language search query." },
|
|
1711
|
+
{ name: "k", location: "query", type: "number", default: 10, description: "Maximum number of results to return (1-50)." }
|
|
1712
|
+
],
|
|
1713
|
+
http: { method: "GET", path: "/api/v1/traces/search", operationId: "searchImplementationTraces" },
|
|
1714
|
+
cli: { command: ["traces", "search"], summary: "Search implementation traces", defaultOutput: "table" }
|
|
1715
|
+
}
|
|
1716
|
+
];
|
|
1701
1717
|
organizationCapabilities = [
|
|
1702
1718
|
{
|
|
1703
1719
|
id: "organization.brand.get",
|
|
@@ -1790,6 +1806,7 @@ var init_catalog = __esm(() => {
|
|
|
1790
1806
|
...oauthLifecycleCapabilities.filter((capability) => capability.domain === "pipelines"),
|
|
1791
1807
|
...fileCapabilities,
|
|
1792
1808
|
...contextCapabilities,
|
|
1809
|
+
...traceCapabilities,
|
|
1793
1810
|
...integrationsCapabilities,
|
|
1794
1811
|
...databaseCapabilities,
|
|
1795
1812
|
...redisCapabilities,
|
|
@@ -1933,6 +1950,7 @@ var init_reference = __esm(() => {
|
|
|
1933
1950
|
files: "Files",
|
|
1934
1951
|
folders: "Folders",
|
|
1935
1952
|
context: "Context documents",
|
|
1953
|
+
traces: "Implementation traces",
|
|
1936
1954
|
projects: "Projects",
|
|
1937
1955
|
integrations: "Integrations",
|
|
1938
1956
|
organization: "Organization",
|
|
@@ -1949,6 +1967,7 @@ var init_reference = __esm(() => {
|
|
|
1949
1967
|
files: "files",
|
|
1950
1968
|
folders: "folders",
|
|
1951
1969
|
context: "context documents",
|
|
1970
|
+
traces: "implementation traces",
|
|
1952
1971
|
projects: "projects",
|
|
1953
1972
|
integrations: "integrations",
|
|
1954
1973
|
organization: "organization brand",
|
|
@@ -23407,6 +23426,218 @@ var init_spec = __esm(() => {
|
|
|
23407
23426
|
]
|
|
23408
23427
|
}
|
|
23409
23428
|
},
|
|
23429
|
+
"/api/v1/traces/search": {
|
|
23430
|
+
get: {
|
|
23431
|
+
responses: {
|
|
23432
|
+
"200": {
|
|
23433
|
+
description: "Ranked passages, most relevant first.",
|
|
23434
|
+
content: {
|
|
23435
|
+
"application/json": {
|
|
23436
|
+
schema: {
|
|
23437
|
+
type: "object",
|
|
23438
|
+
properties: {
|
|
23439
|
+
results: {
|
|
23440
|
+
type: "array",
|
|
23441
|
+
items: {
|
|
23442
|
+
type: "object",
|
|
23443
|
+
properties: {
|
|
23444
|
+
threadId: {
|
|
23445
|
+
type: "string",
|
|
23446
|
+
description: "The trace thread. Open it on the dashboard at /data/implementation/{threadId}."
|
|
23447
|
+
},
|
|
23448
|
+
title: {
|
|
23449
|
+
type: "string",
|
|
23450
|
+
description: "The thread's first request, cut to 200 characters."
|
|
23451
|
+
},
|
|
23452
|
+
projectName: {
|
|
23453
|
+
type: "string"
|
|
23454
|
+
},
|
|
23455
|
+
tool: {
|
|
23456
|
+
nullable: true,
|
|
23457
|
+
description: "The coding tool: cursor, claude, codex, or devin.",
|
|
23458
|
+
type: "string"
|
|
23459
|
+
},
|
|
23460
|
+
branch: {
|
|
23461
|
+
nullable: true,
|
|
23462
|
+
type: "string"
|
|
23463
|
+
},
|
|
23464
|
+
actor: {
|
|
23465
|
+
nullable: true,
|
|
23466
|
+
description: "Who ran the session: the member's email, else the device label.",
|
|
23467
|
+
type: "string"
|
|
23468
|
+
},
|
|
23469
|
+
startedDay: {
|
|
23470
|
+
nullable: true,
|
|
23471
|
+
description: "The day the thread started, as YYYY-MM-DD.",
|
|
23472
|
+
type: "string"
|
|
23473
|
+
},
|
|
23474
|
+
chunkIndex: {
|
|
23475
|
+
type: "integer",
|
|
23476
|
+
minimum: -9007199254740991,
|
|
23477
|
+
maximum: 9007199254740991,
|
|
23478
|
+
description: "Position of the passage within the thread."
|
|
23479
|
+
},
|
|
23480
|
+
content: {
|
|
23481
|
+
type: "string",
|
|
23482
|
+
description: "The matching passage: user requests and assistant replies."
|
|
23483
|
+
},
|
|
23484
|
+
score: {
|
|
23485
|
+
type: "number",
|
|
23486
|
+
description: "Relevance score; higher is more relevant. The reranker's score from 0 to 1, or the Reciprocal Rank Fusion score when reranking is unavailable."
|
|
23487
|
+
}
|
|
23488
|
+
},
|
|
23489
|
+
required: [
|
|
23490
|
+
"threadId",
|
|
23491
|
+
"title",
|
|
23492
|
+
"projectName",
|
|
23493
|
+
"tool",
|
|
23494
|
+
"branch",
|
|
23495
|
+
"actor",
|
|
23496
|
+
"startedDay",
|
|
23497
|
+
"chunkIndex",
|
|
23498
|
+
"content",
|
|
23499
|
+
"score"
|
|
23500
|
+
],
|
|
23501
|
+
additionalProperties: false
|
|
23502
|
+
}
|
|
23503
|
+
}
|
|
23504
|
+
},
|
|
23505
|
+
required: [
|
|
23506
|
+
"results"
|
|
23507
|
+
],
|
|
23508
|
+
additionalProperties: false
|
|
23509
|
+
}
|
|
23510
|
+
}
|
|
23511
|
+
},
|
|
23512
|
+
headers: {
|
|
23513
|
+
"RateLimit-Limit": {
|
|
23514
|
+
description: "Configured request quota for this route's rate-limit window (decimal integer).",
|
|
23515
|
+
schema: {
|
|
23516
|
+
type: "integer"
|
|
23517
|
+
}
|
|
23518
|
+
},
|
|
23519
|
+
"RateLimit-Remaining": {
|
|
23520
|
+
description: "Requests remaining in the current window after this response (decimal integer, never negative).",
|
|
23521
|
+
schema: {
|
|
23522
|
+
type: "integer"
|
|
23523
|
+
}
|
|
23524
|
+
},
|
|
23525
|
+
"RateLimit-Reset": {
|
|
23526
|
+
description: "Whole seconds until the caller may expect capacity to free in the sliding window.",
|
|
23527
|
+
schema: {
|
|
23528
|
+
type: "integer"
|
|
23529
|
+
}
|
|
23530
|
+
}
|
|
23531
|
+
}
|
|
23532
|
+
},
|
|
23533
|
+
"400": {
|
|
23534
|
+
description: "The request was malformed or failed validation.",
|
|
23535
|
+
content: {
|
|
23536
|
+
"application/json": {
|
|
23537
|
+
schema: {
|
|
23538
|
+
$ref: "#/components/schemas/Error"
|
|
23539
|
+
}
|
|
23540
|
+
}
|
|
23541
|
+
}
|
|
23542
|
+
},
|
|
23543
|
+
"401": {
|
|
23544
|
+
description: "Authentication is missing or invalid.",
|
|
23545
|
+
content: {
|
|
23546
|
+
"application/json": {
|
|
23547
|
+
schema: {
|
|
23548
|
+
$ref: "#/components/schemas/Error"
|
|
23549
|
+
}
|
|
23550
|
+
}
|
|
23551
|
+
}
|
|
23552
|
+
},
|
|
23553
|
+
"403": {
|
|
23554
|
+
description: "The caller is not permitted to perform this action.",
|
|
23555
|
+
content: {
|
|
23556
|
+
"application/json": {
|
|
23557
|
+
schema: {
|
|
23558
|
+
$ref: "#/components/schemas/Error"
|
|
23559
|
+
}
|
|
23560
|
+
}
|
|
23561
|
+
}
|
|
23562
|
+
},
|
|
23563
|
+
"429": {
|
|
23564
|
+
description: "Too many requests; retry after the indicated delay.",
|
|
23565
|
+
content: {
|
|
23566
|
+
"application/json": {
|
|
23567
|
+
schema: {
|
|
23568
|
+
$ref: "#/components/schemas/Error"
|
|
23569
|
+
}
|
|
23570
|
+
}
|
|
23571
|
+
},
|
|
23572
|
+
headers: {
|
|
23573
|
+
"RateLimit-Limit": {
|
|
23574
|
+
description: "Configured request quota for this route's rate-limit window (decimal integer).",
|
|
23575
|
+
schema: {
|
|
23576
|
+
type: "integer"
|
|
23577
|
+
}
|
|
23578
|
+
},
|
|
23579
|
+
"RateLimit-Remaining": {
|
|
23580
|
+
description: "Requests remaining in the current window after this response (decimal integer, never negative).",
|
|
23581
|
+
schema: {
|
|
23582
|
+
type: "integer"
|
|
23583
|
+
}
|
|
23584
|
+
},
|
|
23585
|
+
"RateLimit-Reset": {
|
|
23586
|
+
description: "Whole seconds until the caller may expect capacity to free in the sliding window.",
|
|
23587
|
+
schema: {
|
|
23588
|
+
type: "integer"
|
|
23589
|
+
}
|
|
23590
|
+
},
|
|
23591
|
+
"Retry-After": {
|
|
23592
|
+
description: "Whole seconds until the caller may retry after a rate-limit rejection.",
|
|
23593
|
+
schema: {
|
|
23594
|
+
type: "integer"
|
|
23595
|
+
}
|
|
23596
|
+
}
|
|
23597
|
+
}
|
|
23598
|
+
}
|
|
23599
|
+
},
|
|
23600
|
+
summary: "Search implementation traces",
|
|
23601
|
+
description: "Hybrid semantic + full-text search over the organization's implementation traces, reranked for relevance. Returns the best passage from each matching conversation, with its thread id, title, project, tool, branch, actor, start day, and a relevance score. Requires the developer role.",
|
|
23602
|
+
tags: [
|
|
23603
|
+
"Implementation traces"
|
|
23604
|
+
],
|
|
23605
|
+
operationId: "searchImplementationTraces",
|
|
23606
|
+
parameters: [
|
|
23607
|
+
{
|
|
23608
|
+
name: "q",
|
|
23609
|
+
in: "query",
|
|
23610
|
+
required: true,
|
|
23611
|
+
schema: {
|
|
23612
|
+
type: "string",
|
|
23613
|
+
minLength: 1,
|
|
23614
|
+
maxLength: 500,
|
|
23615
|
+
description: "Natural-language search query. Retrieval is hybrid: semantic vector similarity over trace passages combined with full-text search, then reranked."
|
|
23616
|
+
}
|
|
23617
|
+
},
|
|
23618
|
+
{
|
|
23619
|
+
name: "k",
|
|
23620
|
+
in: "query",
|
|
23621
|
+
required: false,
|
|
23622
|
+
schema: {
|
|
23623
|
+
default: 10,
|
|
23624
|
+
description: "Maximum number of results to return (1-50; default 10).",
|
|
23625
|
+
type: "integer",
|
|
23626
|
+
minimum: 1,
|
|
23627
|
+
maximum: 50
|
|
23628
|
+
}
|
|
23629
|
+
}
|
|
23630
|
+
],
|
|
23631
|
+
security: [
|
|
23632
|
+
{
|
|
23633
|
+
bearerAuth: []
|
|
23634
|
+
},
|
|
23635
|
+
{
|
|
23636
|
+
apiKeyHeader: []
|
|
23637
|
+
}
|
|
23638
|
+
]
|
|
23639
|
+
}
|
|
23640
|
+
},
|
|
23410
23641
|
"/api/v1/context": {
|
|
23411
23642
|
get: {
|
|
23412
23643
|
responses: {
|