@knowledge-stack/ksapi 1.135.0 → 1.136.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.
Files changed (144) hide show
  1. package/.openapi-generator/FILES +28 -4
  2. package/README.md +29 -4
  3. package/dist/apis/FoldersApi.d.ts +9 -9
  4. package/dist/apis/FoldersApi.js +2 -2
  5. package/dist/apis/SkillsApi.d.ts +579 -0
  6. package/dist/apis/SkillsApi.js +786 -0
  7. package/dist/apis/WorkflowDefinitionsApi.d.ts +3 -0
  8. package/dist/apis/WorkflowDefinitionsApi.js +3 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/FoldersApi.d.ts +9 -9
  12. package/dist/esm/apis/FoldersApi.js +3 -3
  13. package/dist/esm/apis/SkillsApi.d.ts +579 -0
  14. package/dist/esm/apis/SkillsApi.js +749 -0
  15. package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +3 -0
  16. package/dist/esm/apis/WorkflowDefinitionsApi.js +3 -0
  17. package/dist/esm/apis/index.d.ts +1 -0
  18. package/dist/esm/apis/index.js +1 -0
  19. package/dist/esm/models/ActivateSkillVersionRequest.d.ts +47 -0
  20. package/dist/esm/models/ActivateSkillVersionRequest.js +42 -0
  21. package/dist/esm/models/CreateSkillRequest.d.ts +60 -0
  22. package/dist/esm/models/CreateSkillRequest.js +59 -0
  23. package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
  24. package/dist/esm/models/CreateWorkflowDefinitionRequest.js +6 -0
  25. package/dist/esm/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.d.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.d.ts} +9 -6
  26. package/dist/esm/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.js → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.js} +11 -6
  27. package/dist/esm/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.d.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.d.ts} +16 -16
  28. package/dist/esm/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.js → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.js} +12 -12
  29. package/dist/esm/models/PaginatedResponseSkillResponse.d.ts +66 -0
  30. package/dist/esm/models/PaginatedResponseSkillResponse.js +70 -0
  31. package/dist/esm/models/PartType.d.ts +1 -0
  32. package/dist/esm/models/PartType.js +2 -1
  33. package/dist/esm/models/ReferenceType.d.ts +1 -0
  34. package/dist/esm/models/ReferenceType.js +1 -0
  35. package/dist/esm/models/SearchSkillsRequest.d.ts +59 -0
  36. package/dist/esm/models/SearchSkillsRequest.js +64 -0
  37. package/dist/esm/models/SearchSkillsResponse.d.ts +48 -0
  38. package/dist/esm/models/SearchSkillsResponse.js +43 -0
  39. package/dist/esm/models/SkillOrder.d.ts +26 -0
  40. package/dist/esm/models/SkillOrder.js +44 -0
  41. package/dist/esm/models/SkillResponse.d.ts +147 -0
  42. package/dist/esm/models/SkillResponse.js +101 -0
  43. package/dist/esm/models/SkillScriptFile.d.ts +53 -0
  44. package/dist/esm/models/SkillScriptFile.js +52 -0
  45. package/dist/esm/models/SkillSearchResult.d.ts +71 -0
  46. package/dist/esm/models/SkillSearchResult.js +60 -0
  47. package/dist/esm/models/SkillVersionResponse.d.ts +71 -0
  48. package/dist/esm/models/SkillVersionResponse.js +58 -0
  49. package/dist/esm/models/UpdateSkillRequest.d.ts +54 -0
  50. package/dist/esm/models/UpdateSkillRequest.js +50 -0
  51. package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
  52. package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +6 -0
  53. package/dist/esm/models/WorkflowDefinitionResponse.d.ts +6 -0
  54. package/dist/esm/models/WorkflowDefinitionResponse.js +2 -0
  55. package/dist/esm/models/WorkflowRunSnapshot.d.ts +6 -0
  56. package/dist/esm/models/WorkflowRunSnapshot.js +2 -0
  57. package/dist/esm/models/index.d.ts +13 -2
  58. package/dist/esm/models/index.js +13 -2
  59. package/dist/models/ActivateSkillVersionRequest.d.ts +47 -0
  60. package/dist/models/ActivateSkillVersionRequest.js +50 -0
  61. package/dist/models/CreateSkillRequest.d.ts +60 -0
  62. package/dist/models/CreateSkillRequest.js +67 -0
  63. package/dist/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
  64. package/dist/models/CreateWorkflowDefinitionRequest.js +6 -0
  65. package/dist/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.d.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.d.ts} +9 -6
  66. package/dist/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.js → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.js} +15 -10
  67. package/dist/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.d.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.d.ts} +16 -16
  68. package/dist/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.js → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.js} +18 -18
  69. package/dist/models/PaginatedResponseSkillResponse.d.ts +66 -0
  70. package/dist/models/PaginatedResponseSkillResponse.js +78 -0
  71. package/dist/models/PartType.d.ts +1 -0
  72. package/dist/models/PartType.js +2 -1
  73. package/dist/models/ReferenceType.d.ts +1 -0
  74. package/dist/models/ReferenceType.js +1 -0
  75. package/dist/models/SearchSkillsRequest.d.ts +59 -0
  76. package/dist/models/SearchSkillsRequest.js +72 -0
  77. package/dist/models/SearchSkillsResponse.d.ts +48 -0
  78. package/dist/models/SearchSkillsResponse.js +51 -0
  79. package/dist/models/SkillOrder.d.ts +26 -0
  80. package/dist/models/SkillOrder.js +52 -0
  81. package/dist/models/SkillResponse.d.ts +147 -0
  82. package/dist/models/SkillResponse.js +109 -0
  83. package/dist/models/SkillScriptFile.d.ts +53 -0
  84. package/dist/models/SkillScriptFile.js +60 -0
  85. package/dist/models/SkillSearchResult.d.ts +71 -0
  86. package/dist/models/SkillSearchResult.js +68 -0
  87. package/dist/models/SkillVersionResponse.d.ts +71 -0
  88. package/dist/models/SkillVersionResponse.js +66 -0
  89. package/dist/models/UpdateSkillRequest.d.ts +54 -0
  90. package/dist/models/UpdateSkillRequest.js +58 -0
  91. package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
  92. package/dist/models/UpdateWorkflowDefinitionRequest.js +6 -0
  93. package/dist/models/WorkflowDefinitionResponse.d.ts +6 -0
  94. package/dist/models/WorkflowDefinitionResponse.js +2 -0
  95. package/dist/models/WorkflowRunSnapshot.d.ts +6 -0
  96. package/dist/models/WorkflowRunSnapshot.js +2 -0
  97. package/dist/models/index.d.ts +13 -2
  98. package/dist/models/index.js +13 -2
  99. package/docs/ActivateSkillVersionRequest.md +35 -0
  100. package/docs/ChunksApi.md +1 -1
  101. package/docs/CreateSkillRequest.md +39 -0
  102. package/docs/CreateWorkflowDefinitionRequest.md +2 -0
  103. package/docs/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.md → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md} +12 -4
  104. package/docs/FoldersApi.md +4 -4
  105. package/docs/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.md → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.md} +5 -5
  106. package/docs/PaginatedResponseSkillResponse.md +40 -0
  107. package/docs/SearchSkillsRequest.md +39 -0
  108. package/docs/SearchSkillsResponse.md +34 -0
  109. package/docs/SkillOrder.md +33 -0
  110. package/docs/SkillResponse.md +65 -0
  111. package/docs/SkillScriptFile.md +37 -0
  112. package/docs/SkillSearchResult.md +43 -0
  113. package/docs/SkillVersionResponse.md +43 -0
  114. package/docs/SkillsApi.md +1093 -0
  115. package/docs/UpdateSkillRequest.md +37 -0
  116. package/docs/UpdateWorkflowDefinitionRequest.md +2 -0
  117. package/docs/WorkflowDefinitionResponse.md +2 -0
  118. package/docs/WorkflowDefinitionsApi.md +4 -1
  119. package/docs/WorkflowRunSnapshot.md +2 -0
  120. package/package.json +1 -1
  121. package/src/apis/FoldersApi.ts +13 -13
  122. package/src/apis/SkillsApi.ts +1321 -0
  123. package/src/apis/WorkflowDefinitionsApi.ts +7 -0
  124. package/src/apis/index.ts +1 -0
  125. package/src/models/ActivateSkillVersionRequest.ts +82 -0
  126. package/src/models/CreateSkillRequest.ts +115 -0
  127. package/src/models/CreateWorkflowDefinitionRequest.ts +12 -0
  128. package/src/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.ts} +19 -8
  129. package/src/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.ts} +25 -25
  130. package/src/models/PaginatedResponseSkillResponse.ts +130 -0
  131. package/src/models/PartType.ts +2 -1
  132. package/src/models/ReferenceType.ts +1 -0
  133. package/src/models/SearchSkillsRequest.ts +114 -0
  134. package/src/models/SearchSkillsResponse.ts +90 -0
  135. package/src/models/SkillOrder.ts +54 -0
  136. package/src/models/SkillResponse.ts +244 -0
  137. package/src/models/SkillScriptFile.ts +95 -0
  138. package/src/models/SkillSearchResult.ts +119 -0
  139. package/src/models/SkillVersionResponse.ts +118 -0
  140. package/src/models/UpdateSkillRequest.ts +102 -0
  141. package/src/models/UpdateWorkflowDefinitionRequest.ts +12 -0
  142. package/src/models/WorkflowDefinitionResponse.ts +8 -0
  143. package/src/models/WorkflowRunSnapshot.ts +8 -0
  144. package/src/models/index.ts +13 -2
@@ -0,0 +1,119 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * One skill matched by semantic search.
18
+ * @export
19
+ * @interface SkillSearchResult
20
+ */
21
+ export interface SkillSearchResult {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SkillSearchResult
26
+ */
27
+ skillId: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof SkillSearchResult
32
+ */
33
+ name: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof SkillSearchResult
38
+ */
39
+ description: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof SkillSearchResult
44
+ */
45
+ materializedPath: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof SkillSearchResult
50
+ */
51
+ score: number;
52
+ }
53
+ export const SkillSearchResultPropertyValidationAttributesMap: {
54
+ [property: string]: {
55
+ maxLength?: number,
56
+ minLength?: number,
57
+ pattern?: string,
58
+ maximum?: number,
59
+ exclusiveMaximum?: boolean,
60
+ minimum?: number,
61
+ exclusiveMinimum?: boolean,
62
+ multipleOf?: number,
63
+ maxItems?: number,
64
+ minItems?: number,
65
+ uniqueItems?: boolean
66
+ }
67
+ } = {
68
+ }
69
+
70
+
71
+ /**
72
+ * Check if a given object implements the SkillSearchResult interface.
73
+ */
74
+ export function instanceOfSkillSearchResult(value: object): value is SkillSearchResult {
75
+ if (!('skillId' in value) || value['skillId'] === undefined) return false;
76
+ if (!('name' in value) || value['name'] === undefined) return false;
77
+ if (!('description' in value) || value['description'] === undefined) return false;
78
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined) return false;
79
+ if (!('score' in value) || value['score'] === undefined) return false;
80
+ return true;
81
+ }
82
+
83
+ export function SkillSearchResultFromJSON(json: any): SkillSearchResult {
84
+ return SkillSearchResultFromJSONTyped(json, false);
85
+ }
86
+
87
+ export function SkillSearchResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillSearchResult {
88
+ if (json == null) {
89
+ return json;
90
+ }
91
+ return {
92
+
93
+ 'skillId': json['skill_id'],
94
+ 'name': json['name'],
95
+ 'description': json['description'],
96
+ 'materializedPath': json['materialized_path'],
97
+ 'score': json['score'],
98
+ };
99
+ }
100
+
101
+ export function SkillSearchResultToJSON(json: any): SkillSearchResult {
102
+ return SkillSearchResultToJSONTyped(json, false);
103
+ }
104
+
105
+ export function SkillSearchResultToJSONTyped(value?: SkillSearchResult | null, ignoreDiscriminator: boolean = false): any {
106
+ if (value == null) {
107
+ return value;
108
+ }
109
+
110
+ return {
111
+
112
+ 'skill_id': value['skillId'],
113
+ 'name': value['name'],
114
+ 'description': value['description'],
115
+ 'materialized_path': value['materializedPath'],
116
+ 'score': value['score'],
117
+ };
118
+ }
119
+
@@ -0,0 +1,118 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * One published version of a skill.
18
+ * @export
19
+ * @interface SkillVersionResponse
20
+ */
21
+ export interface SkillVersionResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SkillVersionResponse
26
+ */
27
+ versionId: string;
28
+ /**
29
+ * Monotonic version number (0, 1, 2, …)
30
+ * @type {number}
31
+ * @memberof SkillVersionResponse
32
+ */
33
+ version: number;
34
+ /**
35
+ * Content hash of the version bundle.
36
+ * @type {string}
37
+ * @memberof SkillVersionResponse
38
+ */
39
+ contentSha256?: string | null;
40
+ /**
41
+ *
42
+ * @type {boolean}
43
+ * @memberof SkillVersionResponse
44
+ */
45
+ isActive: boolean;
46
+ /**
47
+ *
48
+ * @type {Date}
49
+ * @memberof SkillVersionResponse
50
+ */
51
+ createdAt: Date;
52
+ }
53
+ export const SkillVersionResponsePropertyValidationAttributesMap: {
54
+ [property: string]: {
55
+ maxLength?: number,
56
+ minLength?: number,
57
+ pattern?: string,
58
+ maximum?: number,
59
+ exclusiveMaximum?: boolean,
60
+ minimum?: number,
61
+ exclusiveMinimum?: boolean,
62
+ multipleOf?: number,
63
+ maxItems?: number,
64
+ minItems?: number,
65
+ uniqueItems?: boolean
66
+ }
67
+ } = {
68
+ }
69
+
70
+
71
+ /**
72
+ * Check if a given object implements the SkillVersionResponse interface.
73
+ */
74
+ export function instanceOfSkillVersionResponse(value: object): value is SkillVersionResponse {
75
+ if (!('versionId' in value) || value['versionId'] === undefined) return false;
76
+ if (!('version' in value) || value['version'] === undefined) return false;
77
+ if (!('isActive' in value) || value['isActive'] === undefined) return false;
78
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
79
+ return true;
80
+ }
81
+
82
+ export function SkillVersionResponseFromJSON(json: any): SkillVersionResponse {
83
+ return SkillVersionResponseFromJSONTyped(json, false);
84
+ }
85
+
86
+ export function SkillVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillVersionResponse {
87
+ if (json == null) {
88
+ return json;
89
+ }
90
+ return {
91
+
92
+ 'versionId': json['version_id'],
93
+ 'version': json['version'],
94
+ 'contentSha256': json['content_sha256'] == null ? undefined : json['content_sha256'],
95
+ 'isActive': json['is_active'],
96
+ 'createdAt': (new Date(json['created_at'])),
97
+ };
98
+ }
99
+
100
+ export function SkillVersionResponseToJSON(json: any): SkillVersionResponse {
101
+ return SkillVersionResponseToJSONTyped(json, false);
102
+ }
103
+
104
+ export function SkillVersionResponseToJSONTyped(value?: SkillVersionResponse | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'version_id': value['versionId'],
112
+ 'version': value['version'],
113
+ 'content_sha256': value['contentSha256'],
114
+ 'is_active': value['isActive'],
115
+ 'created_at': value['createdAt'].toISOString(),
116
+ };
117
+ }
118
+
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { SkillScriptFile } from './SkillScriptFile';
17
+ import {
18
+ SkillScriptFileFromJSON,
19
+ SkillScriptFileFromJSONTyped,
20
+ SkillScriptFileToJSON,
21
+ SkillScriptFileToJSONTyped,
22
+ } from './SkillScriptFile';
23
+
24
+ /**
25
+ * Edit working-copy files in place (does NOT cut a version).
26
+ * @export
27
+ * @interface UpdateSkillRequest
28
+ */
29
+ export interface UpdateSkillRequest {
30
+ /**
31
+ * Replacement SKILL.md, written to the working copy in place; null leaves it unchanged. Publish a version to snapshot; the active version is unchanged until then.
32
+ * @type {string}
33
+ * @memberof UpdateSkillRequest
34
+ */
35
+ skillMd?: string | null;
36
+ /**
37
+ * Replace the working-copy scripts set (add/overwrite/remove to match); null leaves scripts unchanged, [] removes them all.
38
+ * @type {Array<SkillScriptFile>}
39
+ * @memberof UpdateSkillRequest
40
+ */
41
+ scripts?: Array<SkillScriptFile> | null;
42
+ }
43
+ export const UpdateSkillRequestPropertyValidationAttributesMap: {
44
+ [property: string]: {
45
+ maxLength?: number,
46
+ minLength?: number,
47
+ pattern?: string,
48
+ maximum?: number,
49
+ exclusiveMaximum?: boolean,
50
+ minimum?: number,
51
+ exclusiveMinimum?: boolean,
52
+ multipleOf?: number,
53
+ maxItems?: number,
54
+ minItems?: number,
55
+ uniqueItems?: boolean
56
+ }
57
+ } = {
58
+ scripts: {
59
+ maxItems: 50,
60
+ uniqueItems: false,
61
+ },
62
+ }
63
+
64
+
65
+ /**
66
+ * Check if a given object implements the UpdateSkillRequest interface.
67
+ */
68
+ export function instanceOfUpdateSkillRequest(value: object): value is UpdateSkillRequest {
69
+ return true;
70
+ }
71
+
72
+ export function UpdateSkillRequestFromJSON(json: any): UpdateSkillRequest {
73
+ return UpdateSkillRequestFromJSONTyped(json, false);
74
+ }
75
+
76
+ export function UpdateSkillRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSkillRequest {
77
+ if (json == null) {
78
+ return json;
79
+ }
80
+ return {
81
+
82
+ 'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
83
+ 'scripts': json['scripts'] == null ? undefined : ((json['scripts'] as Array<any>).map(SkillScriptFileFromJSON)),
84
+ };
85
+ }
86
+
87
+ export function UpdateSkillRequestToJSON(json: any): UpdateSkillRequest {
88
+ return UpdateSkillRequestToJSONTyped(json, false);
89
+ }
90
+
91
+ export function UpdateSkillRequestToJSONTyped(value?: UpdateSkillRequest | null, ignoreDiscriminator: boolean = false): any {
92
+ if (value == null) {
93
+ return value;
94
+ }
95
+
96
+ return {
97
+
98
+ 'skill_md': value['skillMd'],
99
+ 'scripts': value['scripts'] == null ? undefined : ((value['scripts'] as Array<any>).map(SkillScriptFileToJSON)),
100
+ };
101
+ }
102
+
@@ -61,6 +61,12 @@ export interface UpdateWorkflowDefinitionRequest {
61
61
  * @memberof UpdateWorkflowDefinitionRequest
62
62
  */
63
63
  approvalRequired: boolean;
64
+ /**
65
+ * Skill PDO ids force-loaded into every run by default. Retain-on-None PUT semantics: null (or omit) keeps the stored list, [] clears, a list replaces. Each must be a readable SKILL.
66
+ * @type {Array<string>}
67
+ * @memberof UpdateWorkflowDefinitionRequest
68
+ */
69
+ selectedSkillIds?: Array<string> | null;
64
70
  /**
65
71
  * Common files attached to every run (DOCUMENT / FOLDER / DATA_SOURCE / API_CONNECTION path_part ids). Like ``instruction_path_part_id``, this is the exception to PUT semantics: null (or omit) retains the stored list; pass [] to clear; pass a list to replace it wholesale. The caller must be able to read each one.
66
72
  * @type {Array<string>}
@@ -92,6 +98,10 @@ export const UpdateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
92
98
  minimum: 60,
93
99
  exclusiveMinimum: false,
94
100
  },
101
+ selectedSkillIds: {
102
+ maxItems: 20,
103
+ uniqueItems: false,
104
+ },
95
105
  commonFilePathPartIds: {
96
106
  maxItems: 20,
97
107
  uniqueItems: false,
@@ -126,6 +136,7 @@ export function UpdateWorkflowDefinitionRequestFromJSONTyped(json: any, ignoreDi
126
136
  'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
127
137
  'isActive': json['is_active'],
128
138
  'approvalRequired': json['approval_required'],
139
+ 'selectedSkillIds': json['selected_skill_ids'] == null ? undefined : json['selected_skill_ids'],
129
140
  'commonFilePathPartIds': json['common_file_path_part_ids'] == null ? undefined : json['common_file_path_part_ids'],
130
141
  };
131
142
  }
@@ -148,6 +159,7 @@ export function UpdateWorkflowDefinitionRequestToJSONTyped(value?: UpdateWorkflo
148
159
  'parent_path_part_id': value['parentPathPartId'],
149
160
  'is_active': value['isActive'],
150
161
  'approval_required': value['approvalRequired'],
162
+ 'selected_skill_ids': value['selectedSkillIds'],
151
163
  'common_file_path_part_ids': value['commonFilePathPartIds'],
152
164
  };
153
165
  }
@@ -125,6 +125,12 @@ export interface WorkflowDefinitionResponse {
125
125
  * @memberof WorkflowDefinitionResponse
126
126
  */
127
127
  isTemplate: boolean;
128
+ /**
129
+ * Skill PDO ids force-loaded into every run by default. The FE prefills these as the run's selected skills.
130
+ * @type {Array<string>}
131
+ * @memberof WorkflowDefinitionResponse
132
+ */
133
+ selectedSkillIds?: Array<string>;
128
134
  /**
129
135
  * Common files attached to every run (path_part ids). The FE renders these as 'attached to every run' on the workflow page.
130
136
  * @type {Array<string>}
@@ -248,6 +254,7 @@ export function WorkflowDefinitionResponseFromJSONTyped(json: any, ignoreDiscrim
248
254
  'isActive': json['is_active'],
249
255
  'approvalRequired': json['approval_required'],
250
256
  'isTemplate': json['is_template'],
257
+ 'selectedSkillIds': json['selected_skill_ids'] == null ? undefined : json['selected_skill_ids'],
251
258
  'commonFilePathPartIds': json['common_file_path_part_ids'] == null ? undefined : json['common_file_path_part_ids'],
252
259
  'createdFromId': json['created_from_id'],
253
260
  'copyCount': json['copy_count'] == null ? undefined : json['copy_count'],
@@ -283,6 +290,7 @@ export function WorkflowDefinitionResponseToJSONTyped(value?: WorkflowDefinition
283
290
  'is_active': value['isActive'],
284
291
  'approval_required': value['approvalRequired'],
285
292
  'is_template': value['isTemplate'],
293
+ 'selected_skill_ids': value['selectedSkillIds'],
286
294
  'common_file_path_part_ids': value['commonFilePathPartIds'],
287
295
  'created_from_id': value['createdFromId'],
288
296
  'copy_count': value['copyCount'],
@@ -85,6 +85,12 @@ export interface WorkflowRunSnapshot {
85
85
  * @memberof WorkflowRunSnapshot
86
86
  */
87
87
  userMessage?: string | null;
88
+ /**
89
+ * Skill PDO ids to force-load into the run at turn 0, merged with the definition's prefill. Definition selections are validated readable + SKILL at write time; every id is re-checked fail-closed when the run materializes (a skill deleted or revoked after selection is dropped, never bricking the run). The runner materializes each skill's ACTIVE published version into the agent's skills dir; the agent can still discover others via search. Empty for the common case; pre-feature snapshots default to empty.
90
+ * @type {Array<string>}
91
+ * @memberof WorkflowRunSnapshot
92
+ */
93
+ selectedSkillIds?: Array<string>;
88
94
  }
89
95
  export const WorkflowRunSnapshotPropertyValidationAttributesMap: {
90
96
  [property: string]: {
@@ -134,6 +140,7 @@ export function WorkflowRunSnapshotFromJSONTyped(json: any, ignoreDiscriminator:
134
140
  'inputs': ((json['inputs'] as Array<any>).map(InputSnapshotFromJSON)),
135
141
  'excludedCommonFiles': json['excluded_common_files'] == null ? undefined : ((json['excluded_common_files'] as Array<any>).map(ExcludedCommonFileFromJSON)),
136
142
  'userMessage': json['user_message'] == null ? undefined : json['user_message'],
143
+ 'selectedSkillIds': json['selected_skill_ids'] == null ? undefined : json['selected_skill_ids'],
137
144
  };
138
145
  }
139
146
 
@@ -154,6 +161,7 @@ export function WorkflowRunSnapshotToJSONTyped(value?: WorkflowRunSnapshot | nul
154
161
  'inputs': ((value['inputs'] as Array<any>).map(InputSnapshotToJSON)),
155
162
  'excluded_common_files': value['excludedCommonFiles'] == null ? undefined : ((value['excludedCommonFiles'] as Array<any>).map(ExcludedCommonFileToJSON)),
156
163
  'user_message': value['userMessage'],
164
+ 'selected_skill_ids': value['selectedSkillIds'],
157
165
  };
158
166
  }
159
167
 
@@ -3,6 +3,7 @@
3
3
  export * from './AcceptDisclaimerRequest';
4
4
  export * from './AcceptInviteResponse';
5
5
  export * from './AccessCheckResponse';
6
+ export * from './ActivateSkillVersionRequest';
6
7
  export * from './AddMemberRequest';
7
8
  export * from './AncestryResponse';
8
9
  export * from './ApiAuthConfig';
@@ -64,6 +65,7 @@ export * from './CreatePasswordUserRequest';
64
65
  export * from './CreatePermissionRequest';
65
66
  export * from './CreatePhonePasswordUserRequest';
66
67
  export * from './CreateSectionRequest';
68
+ export * from './CreateSkillRequest';
67
69
  export * from './CreateTagRequest';
68
70
  export * from './CreateThreadMessageRequest';
69
71
  export * from './CreateThreadRequest';
@@ -124,7 +126,7 @@ export * from './FeedbackTargetType';
124
126
  export * from './FolderAction';
125
127
  export * from './FolderActionResponse';
126
128
  export * from './FolderResponse';
127
- export * from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse';
129
+ export * from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
128
130
  export * from './GroupMemberOrder';
129
131
  export * from './GroupPermissionOrder';
130
132
  export * from './GroupPermissionResponse';
@@ -168,7 +170,7 @@ export * from './NetworkClass';
168
170
  export * from './NonFilesystemReferenceType';
169
171
  export * from './OnboardingCompanyRequest';
170
172
  export * from './OnboardingProfileRequest';
171
- export * from './PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator';
173
+ export * from './PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat';
172
174
  export * from './PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator';
173
175
  export * from './PaginatedResponseDocumentResponse';
174
176
  export * from './PaginatedResponseDocumentVersionResponse';
@@ -183,6 +185,7 @@ export * from './PaginatedResponseMemoryChunkResponse';
183
185
  export * from './PaginatedResponsePathPartResponse';
184
186
  export * from './PaginatedResponsePendingMemoryChunkResponse';
185
187
  export * from './PaginatedResponsePermissionResponse';
188
+ export * from './PaginatedResponseSkillResponse';
186
189
  export * from './PaginatedResponseTagResponse';
187
190
  export * from './PaginatedResponseTenantResponse';
188
191
  export * from './PaginatedResponseTenantUserResponse';
@@ -227,6 +230,8 @@ export * from './RunFolder';
227
230
  export * from './RunFolderRef';
228
231
  export * from './SSOInitiateResponse';
229
232
  export * from './ScoredChunkResponse';
233
+ export * from './SearchSkillsRequest';
234
+ export * from './SearchSkillsResponse';
230
235
  export * from './SearchSortOrder';
231
236
  export * from './SearchTablesRequest';
232
237
  export * from './SearchTablesResponse';
@@ -242,6 +247,11 @@ export * from './SetApprovalStateRequest';
242
247
  export * from './SetWorkflowRunApprovalRequest';
243
248
  export * from './SheetVisibilityChange';
244
249
  export * from './SignInRequest';
250
+ export * from './SkillOrder';
251
+ export * from './SkillResponse';
252
+ export * from './SkillScriptFile';
253
+ export * from './SkillSearchResult';
254
+ export * from './SkillVersionResponse';
245
255
  export * from './SortDirection';
246
256
  export * from './StartWorkflowRunRequest';
247
257
  export * from './Step';
@@ -298,6 +308,7 @@ export * from './UpdateGroupRequest';
298
308
  export * from './UpdateInviteRequest';
299
309
  export * from './UpdatePermissionRequest';
300
310
  export * from './UpdateSectionRequest';
311
+ export * from './UpdateSkillRequest';
301
312
  export * from './UpdateTableRequest';
302
313
  export * from './UpdateTagRequest';
303
314
  export * from './UpdateTenantRequest';