@knowledge-stack/ksapi 3.16.2 → 3.17.1

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 (114) hide show
  1. package/.openapi-generator/FILES +26 -4
  2. package/README.md +23 -4
  3. package/dist/apis/MemoryApi.d.ts +5 -5
  4. package/dist/apis/MemoryApi.js +1 -1
  5. package/dist/apis/WorkflowMemoryApi.d.ts +17 -17
  6. package/dist/apis/WorkflowMemoryApi.js +4 -4
  7. package/dist/apis/WorkflowRepositoryApi.d.ts +419 -0
  8. package/dist/apis/WorkflowRepositoryApi.js +595 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/MemoryApi.d.ts +5 -5
  12. package/dist/esm/apis/MemoryApi.js +2 -2
  13. package/dist/esm/apis/WorkflowMemoryApi.d.ts +17 -17
  14. package/dist/esm/apis/WorkflowMemoryApi.js +5 -5
  15. package/dist/esm/apis/WorkflowRepositoryApi.d.ts +419 -0
  16. package/dist/esm/apis/WorkflowRepositoryApi.js +558 -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/ErrorResponse.d.ts +7 -0
  20. package/dist/esm/models/ErrorResponse.js +7 -0
  21. package/dist/esm/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
  22. package/dist/esm/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +9 -9
  23. package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
  24. package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +12 -12
  25. package/dist/esm/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
  26. package/dist/esm/models/PaginatedResponseRepoVersionResponse.js +70 -0
  27. package/dist/esm/models/RecordRepoSaveSkipRequest.d.ts +60 -0
  28. package/dist/esm/models/RecordRepoSaveSkipRequest.js +55 -0
  29. package/dist/esm/models/RepoBranchResponse.d.ts +126 -0
  30. package/dist/esm/models/RepoBranchResponse.js +95 -0
  31. package/dist/esm/models/RepoCommitSummary.d.ts +71 -0
  32. package/dist/esm/models/RepoCommitSummary.js +60 -0
  33. package/dist/esm/models/RepoSaveSkipReason.d.ts +36 -0
  34. package/dist/esm/models/RepoSaveSkipReason.js +54 -0
  35. package/dist/esm/models/RepoSnapshot.d.ts +59 -0
  36. package/dist/esm/models/RepoSnapshot.js +50 -0
  37. package/dist/esm/models/RepoTreeEntry.d.ts +59 -0
  38. package/dist/esm/models/RepoTreeEntry.js +52 -0
  39. package/dist/esm/models/RepoTreeResponse.d.ts +54 -0
  40. package/dist/esm/models/RepoTreeResponse.js +49 -0
  41. package/dist/esm/models/RepoVersionResponse.d.ts +95 -0
  42. package/dist/esm/models/RepoVersionResponse.js +74 -0
  43. package/dist/esm/models/WorkflowRepoResponse.d.ts +102 -0
  44. package/dist/esm/models/WorkflowRepoResponse.js +81 -0
  45. package/dist/esm/models/WorkflowRunSnapshot.d.ts +7 -0
  46. package/dist/esm/models/WorkflowRunSnapshot.js +3 -0
  47. package/dist/esm/models/index.d.ts +12 -2
  48. package/dist/esm/models/index.js +12 -2
  49. package/dist/models/ErrorResponse.d.ts +7 -0
  50. package/dist/models/ErrorResponse.js +7 -0
  51. package/dist/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
  52. package/dist/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +15 -15
  53. package/dist/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
  54. package/dist/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +18 -18
  55. package/dist/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
  56. package/dist/models/PaginatedResponseRepoVersionResponse.js +78 -0
  57. package/dist/models/RecordRepoSaveSkipRequest.d.ts +60 -0
  58. package/dist/models/RecordRepoSaveSkipRequest.js +63 -0
  59. package/dist/models/RepoBranchResponse.d.ts +126 -0
  60. package/dist/models/RepoBranchResponse.js +103 -0
  61. package/dist/models/RepoCommitSummary.d.ts +71 -0
  62. package/dist/models/RepoCommitSummary.js +68 -0
  63. package/dist/models/RepoSaveSkipReason.d.ts +36 -0
  64. package/dist/models/RepoSaveSkipReason.js +62 -0
  65. package/dist/models/RepoSnapshot.d.ts +59 -0
  66. package/dist/models/RepoSnapshot.js +58 -0
  67. package/dist/models/RepoTreeEntry.d.ts +59 -0
  68. package/dist/models/RepoTreeEntry.js +60 -0
  69. package/dist/models/RepoTreeResponse.d.ts +54 -0
  70. package/dist/models/RepoTreeResponse.js +57 -0
  71. package/dist/models/RepoVersionResponse.d.ts +95 -0
  72. package/dist/models/RepoVersionResponse.js +82 -0
  73. package/dist/models/WorkflowRepoResponse.d.ts +102 -0
  74. package/dist/models/WorkflowRepoResponse.js +89 -0
  75. package/dist/models/WorkflowRunSnapshot.d.ts +7 -0
  76. package/dist/models/WorkflowRunSnapshot.js +3 -0
  77. package/dist/models/index.d.ts +12 -2
  78. package/dist/models/index.js +12 -2
  79. package/docs/MemoryApi.md +2 -2
  80. package/docs/{MemoryChunkResponse.md → MemoryEntryResponse.md} +4 -4
  81. package/docs/{PaginatedResponseMemoryChunkResponse.md → PaginatedResponseMemoryEntryResponse.md} +5 -5
  82. package/docs/PaginatedResponseRepoVersionResponse.md +40 -0
  83. package/docs/RecordRepoSaveSkipRequest.md +38 -0
  84. package/docs/RepoBranchResponse.md +61 -0
  85. package/docs/RepoCommitSummary.md +42 -0
  86. package/docs/RepoSaveSkipReason.md +33 -0
  87. package/docs/RepoSnapshot.md +39 -0
  88. package/docs/RepoTreeEntry.md +38 -0
  89. package/docs/RepoTreeResponse.md +36 -0
  90. package/docs/RepoVersionResponse.md +51 -0
  91. package/docs/WorkflowMemoryApi.md +8 -8
  92. package/docs/WorkflowRepoResponse.md +53 -0
  93. package/docs/WorkflowRepositoryApi.md +745 -0
  94. package/docs/WorkflowRunSnapshot.md +2 -0
  95. package/package.json +1 -1
  96. package/src/apis/MemoryApi.ts +8 -8
  97. package/src/apis/WorkflowMemoryApi.ts +26 -26
  98. package/src/apis/WorkflowRepositoryApi.ts +1002 -0
  99. package/src/apis/index.ts +1 -0
  100. package/src/models/ErrorResponse.ts +7 -0
  101. package/src/models/{MemoryChunkResponse.ts → MemoryEntryResponse.ts} +14 -14
  102. package/src/models/{PaginatedResponseMemoryChunkResponse.ts → PaginatedResponseMemoryEntryResponse.ts} +25 -25
  103. package/src/models/PaginatedResponseRepoVersionResponse.ts +130 -0
  104. package/src/models/RecordRepoSaveSkipRequest.ts +113 -0
  105. package/src/models/RepoBranchResponse.ts +207 -0
  106. package/src/models/RepoCommitSummary.ts +119 -0
  107. package/src/models/RepoSaveSkipReason.ts +64 -0
  108. package/src/models/RepoSnapshot.ts +100 -0
  109. package/src/models/RepoTreeEntry.ts +101 -0
  110. package/src/models/RepoTreeResponse.ts +100 -0
  111. package/src/models/RepoVersionResponse.ts +154 -0
  112. package/src/models/WorkflowRepoResponse.ts +172 -0
  113. package/src/models/WorkflowRunSnapshot.ts +15 -0
  114. package/src/models/index.ts +12 -2
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface RepoCommitSummary
16
+ */
17
+ export interface RepoCommitSummary {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof RepoCommitSummary
22
+ */
23
+ sha: string;
24
+ /**
25
+ * First line of the commit message.
26
+ * @type {string}
27
+ * @memberof RepoCommitSummary
28
+ */
29
+ subject: string;
30
+ /**
31
+ *
32
+ * @type {Date}
33
+ * @memberof RepoCommitSummary
34
+ */
35
+ authoredAt: Date;
36
+ /**
37
+ * The run saving this repository snapshot.
38
+ * @type {string}
39
+ * @memberof RepoCommitSummary
40
+ */
41
+ runId: string | null;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof RepoCommitSummary
46
+ */
47
+ savedByUserId: string;
48
+ }
49
+ export declare const RepoCommitSummaryPropertyValidationAttributesMap: {
50
+ [property: string]: {
51
+ maxLength?: number;
52
+ minLength?: number;
53
+ pattern?: string;
54
+ maximum?: number;
55
+ exclusiveMaximum?: boolean;
56
+ minimum?: number;
57
+ exclusiveMinimum?: boolean;
58
+ multipleOf?: number;
59
+ maxItems?: number;
60
+ minItems?: number;
61
+ uniqueItems?: boolean;
62
+ };
63
+ };
64
+ /**
65
+ * Check if a given object implements the RepoCommitSummary interface.
66
+ */
67
+ export declare function instanceOfRepoCommitSummary(value: object): value is RepoCommitSummary;
68
+ export declare function RepoCommitSummaryFromJSON(json: any): RepoCommitSummary;
69
+ export declare function RepoCommitSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoCommitSummary;
70
+ export declare function RepoCommitSummaryToJSON(json: any): RepoCommitSummary;
71
+ export declare function RepoCommitSummaryToJSONTyped(value?: RepoCommitSummary | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RepoCommitSummaryPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfRepoCommitSummary = instanceOfRepoCommitSummary;
18
+ exports.RepoCommitSummaryFromJSON = RepoCommitSummaryFromJSON;
19
+ exports.RepoCommitSummaryFromJSONTyped = RepoCommitSummaryFromJSONTyped;
20
+ exports.RepoCommitSummaryToJSON = RepoCommitSummaryToJSON;
21
+ exports.RepoCommitSummaryToJSONTyped = RepoCommitSummaryToJSONTyped;
22
+ exports.RepoCommitSummaryPropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the RepoCommitSummary interface.
25
+ */
26
+ function instanceOfRepoCommitSummary(value) {
27
+ if (!('sha' in value) || value['sha'] === undefined)
28
+ return false;
29
+ if (!('subject' in value) || value['subject'] === undefined)
30
+ return false;
31
+ if (!('authoredAt' in value) || value['authoredAt'] === undefined)
32
+ return false;
33
+ if (!('runId' in value) || value['runId'] === undefined)
34
+ return false;
35
+ if (!('savedByUserId' in value) || value['savedByUserId'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function RepoCommitSummaryFromJSON(json) {
40
+ return RepoCommitSummaryFromJSONTyped(json, false);
41
+ }
42
+ function RepoCommitSummaryFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'sha': json['sha'],
48
+ 'subject': json['subject'],
49
+ 'authoredAt': (new Date(json['authored_at'])),
50
+ 'runId': json['run_id'],
51
+ 'savedByUserId': json['saved_by_user_id'],
52
+ };
53
+ }
54
+ function RepoCommitSummaryToJSON(json) {
55
+ return RepoCommitSummaryToJSONTyped(json, false);
56
+ }
57
+ function RepoCommitSummaryToJSONTyped(value, ignoreDiscriminator = false) {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+ return {
62
+ 'sha': value['sha'],
63
+ 'subject': value['subject'],
64
+ 'authored_at': value['authoredAt'].toISOString(),
65
+ 'run_id': value['runId'],
66
+ 'saved_by_user_id': value['savedByUserId'],
67
+ };
68
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Why retention or integration could not complete.
14
+ *
15
+ * ``conflict``: integration failed; a retained branch remains recoverable.
16
+ * ``history_rewrite``:
17
+ * the run rewrote saved history. ``no_write``: the turn's user cannot write the
18
+ * workflow. ``uncommitted``: changes were never committed to the assigned branch.
19
+ * ``rejected``: the platform refused the bundle (too large, unsafe paths).
20
+ * ``failed``: the checkout or the save itself failed.
21
+ * @export
22
+ */
23
+ export declare const RepoSaveSkipReason: {
24
+ readonly Conflict: 'conflict';
25
+ readonly HistoryRewrite: 'history_rewrite';
26
+ readonly NoWrite: 'no_write';
27
+ readonly Uncommitted: 'uncommitted';
28
+ readonly Rejected: 'rejected';
29
+ readonly Failed: 'failed';
30
+ };
31
+ export type RepoSaveSkipReason = typeof RepoSaveSkipReason[keyof typeof RepoSaveSkipReason];
32
+ export declare function instanceOfRepoSaveSkipReason(value: any): boolean;
33
+ export declare function RepoSaveSkipReasonFromJSON(json: any): RepoSaveSkipReason;
34
+ export declare function RepoSaveSkipReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoSaveSkipReason;
35
+ export declare function RepoSaveSkipReasonToJSON(value?: RepoSaveSkipReason | null): any;
36
+ export declare function RepoSaveSkipReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): RepoSaveSkipReason;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RepoSaveSkipReason = void 0;
17
+ exports.instanceOfRepoSaveSkipReason = instanceOfRepoSaveSkipReason;
18
+ exports.RepoSaveSkipReasonFromJSON = RepoSaveSkipReasonFromJSON;
19
+ exports.RepoSaveSkipReasonFromJSONTyped = RepoSaveSkipReasonFromJSONTyped;
20
+ exports.RepoSaveSkipReasonToJSON = RepoSaveSkipReasonToJSON;
21
+ exports.RepoSaveSkipReasonToJSONTyped = RepoSaveSkipReasonToJSONTyped;
22
+ /**
23
+ * Why retention or integration could not complete.
24
+ *
25
+ * ``conflict``: integration failed; a retained branch remains recoverable.
26
+ * ``history_rewrite``:
27
+ * the run rewrote saved history. ``no_write``: the turn's user cannot write the
28
+ * workflow. ``uncommitted``: changes were never committed to the assigned branch.
29
+ * ``rejected``: the platform refused the bundle (too large, unsafe paths).
30
+ * ``failed``: the checkout or the save itself failed.
31
+ * @export
32
+ */
33
+ exports.RepoSaveSkipReason = {
34
+ Conflict: 'conflict',
35
+ HistoryRewrite: 'history_rewrite',
36
+ NoWrite: 'no_write',
37
+ Uncommitted: 'uncommitted',
38
+ Rejected: 'rejected',
39
+ Failed: 'failed'
40
+ };
41
+ function instanceOfRepoSaveSkipReason(value) {
42
+ for (const key in exports.RepoSaveSkipReason) {
43
+ if (Object.prototype.hasOwnProperty.call(exports.RepoSaveSkipReason, key)) {
44
+ if (exports.RepoSaveSkipReason[key] === value) {
45
+ return true;
46
+ }
47
+ }
48
+ }
49
+ return false;
50
+ }
51
+ function RepoSaveSkipReasonFromJSON(json) {
52
+ return RepoSaveSkipReasonFromJSONTyped(json, false);
53
+ }
54
+ function RepoSaveSkipReasonFromJSONTyped(json, ignoreDiscriminator) {
55
+ return json;
56
+ }
57
+ function RepoSaveSkipReasonToJSON(value) {
58
+ return value;
59
+ }
60
+ function RepoSaveSkipReasonToJSONTyped(value, ignoreDiscriminator) {
61
+ return value;
62
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * The workflow repository version a run was started against.
14
+ * @export
15
+ * @interface RepoSnapshot
16
+ */
17
+ export interface RepoSnapshot {
18
+ /**
19
+ * Commit id of main the run checks out
20
+ * @type {string}
21
+ * @memberof RepoSnapshot
22
+ */
23
+ commit: string;
24
+ /**
25
+ * DocumentVersion holding that main's bundle
26
+ * @type {string}
27
+ * @memberof RepoSnapshot
28
+ */
29
+ versionId: string;
30
+ /**
31
+ * Instruction version (DOCUMENT_VERSION path_part) that repository version was saved against; the runner compares it with this run's pinned instruction.
32
+ * @type {string}
33
+ * @memberof RepoSnapshot
34
+ */
35
+ instructionVersionId?: string | null;
36
+ }
37
+ export declare const RepoSnapshotPropertyValidationAttributesMap: {
38
+ [property: string]: {
39
+ maxLength?: number;
40
+ minLength?: number;
41
+ pattern?: string;
42
+ maximum?: number;
43
+ exclusiveMaximum?: boolean;
44
+ minimum?: number;
45
+ exclusiveMinimum?: boolean;
46
+ multipleOf?: number;
47
+ maxItems?: number;
48
+ minItems?: number;
49
+ uniqueItems?: boolean;
50
+ };
51
+ };
52
+ /**
53
+ * Check if a given object implements the RepoSnapshot interface.
54
+ */
55
+ export declare function instanceOfRepoSnapshot(value: object): value is RepoSnapshot;
56
+ export declare function RepoSnapshotFromJSON(json: any): RepoSnapshot;
57
+ export declare function RepoSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoSnapshot;
58
+ export declare function RepoSnapshotToJSON(json: any): RepoSnapshot;
59
+ export declare function RepoSnapshotToJSONTyped(value?: RepoSnapshot | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RepoSnapshotPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfRepoSnapshot = instanceOfRepoSnapshot;
18
+ exports.RepoSnapshotFromJSON = RepoSnapshotFromJSON;
19
+ exports.RepoSnapshotFromJSONTyped = RepoSnapshotFromJSONTyped;
20
+ exports.RepoSnapshotToJSON = RepoSnapshotToJSON;
21
+ exports.RepoSnapshotToJSONTyped = RepoSnapshotToJSONTyped;
22
+ exports.RepoSnapshotPropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the RepoSnapshot interface.
25
+ */
26
+ function instanceOfRepoSnapshot(value) {
27
+ if (!('commit' in value) || value['commit'] === undefined)
28
+ return false;
29
+ if (!('versionId' in value) || value['versionId'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function RepoSnapshotFromJSON(json) {
34
+ return RepoSnapshotFromJSONTyped(json, false);
35
+ }
36
+ function RepoSnapshotFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'commit': json['commit'],
42
+ 'versionId': json['version_id'],
43
+ 'instructionVersionId': json['instruction_version_id'] == null ? undefined : json['instruction_version_id'],
44
+ };
45
+ }
46
+ function RepoSnapshotToJSON(json) {
47
+ return RepoSnapshotToJSONTyped(json, false);
48
+ }
49
+ function RepoSnapshotToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'commit': value['commit'],
55
+ 'version_id': value['versionId'],
56
+ 'instruction_version_id': value['instructionVersionId'],
57
+ };
58
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface RepoTreeEntry
16
+ */
17
+ export interface RepoTreeEntry {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof RepoTreeEntry
22
+ */
23
+ path: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof RepoTreeEntry
28
+ */
29
+ size: number;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof RepoTreeEntry
34
+ */
35
+ isBinary: boolean;
36
+ }
37
+ export declare const RepoTreeEntryPropertyValidationAttributesMap: {
38
+ [property: string]: {
39
+ maxLength?: number;
40
+ minLength?: number;
41
+ pattern?: string;
42
+ maximum?: number;
43
+ exclusiveMaximum?: boolean;
44
+ minimum?: number;
45
+ exclusiveMinimum?: boolean;
46
+ multipleOf?: number;
47
+ maxItems?: number;
48
+ minItems?: number;
49
+ uniqueItems?: boolean;
50
+ };
51
+ };
52
+ /**
53
+ * Check if a given object implements the RepoTreeEntry interface.
54
+ */
55
+ export declare function instanceOfRepoTreeEntry(value: object): value is RepoTreeEntry;
56
+ export declare function RepoTreeEntryFromJSON(json: any): RepoTreeEntry;
57
+ export declare function RepoTreeEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoTreeEntry;
58
+ export declare function RepoTreeEntryToJSON(json: any): RepoTreeEntry;
59
+ export declare function RepoTreeEntryToJSONTyped(value?: RepoTreeEntry | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RepoTreeEntryPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfRepoTreeEntry = instanceOfRepoTreeEntry;
18
+ exports.RepoTreeEntryFromJSON = RepoTreeEntryFromJSON;
19
+ exports.RepoTreeEntryFromJSONTyped = RepoTreeEntryFromJSONTyped;
20
+ exports.RepoTreeEntryToJSON = RepoTreeEntryToJSON;
21
+ exports.RepoTreeEntryToJSONTyped = RepoTreeEntryToJSONTyped;
22
+ exports.RepoTreeEntryPropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the RepoTreeEntry interface.
25
+ */
26
+ function instanceOfRepoTreeEntry(value) {
27
+ if (!('path' in value) || value['path'] === undefined)
28
+ return false;
29
+ if (!('size' in value) || value['size'] === undefined)
30
+ return false;
31
+ if (!('isBinary' in value) || value['isBinary'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function RepoTreeEntryFromJSON(json) {
36
+ return RepoTreeEntryFromJSONTyped(json, false);
37
+ }
38
+ function RepoTreeEntryFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'path': json['path'],
44
+ 'size': json['size'],
45
+ 'isBinary': json['is_binary'],
46
+ };
47
+ }
48
+ function RepoTreeEntryToJSON(json) {
49
+ return RepoTreeEntryToJSONTyped(json, false);
50
+ }
51
+ function RepoTreeEntryToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'path': value['path'],
57
+ 'size': value['size'],
58
+ 'is_binary': value['isBinary'],
59
+ };
60
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { RepoTreeEntry } from './RepoTreeEntry';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface RepoTreeResponse
17
+ */
18
+ export interface RepoTreeResponse {
19
+ /**
20
+ * Null when the repository does not exist.
21
+ * @type {string}
22
+ * @memberof RepoTreeResponse
23
+ */
24
+ commit: string | null;
25
+ /**
26
+ * Every file, path-sorted.
27
+ * @type {Array<RepoTreeEntry>}
28
+ * @memberof RepoTreeResponse
29
+ */
30
+ entries: Array<RepoTreeEntry>;
31
+ }
32
+ export declare const RepoTreeResponsePropertyValidationAttributesMap: {
33
+ [property: string]: {
34
+ maxLength?: number;
35
+ minLength?: number;
36
+ pattern?: string;
37
+ maximum?: number;
38
+ exclusiveMaximum?: boolean;
39
+ minimum?: number;
40
+ exclusiveMinimum?: boolean;
41
+ multipleOf?: number;
42
+ maxItems?: number;
43
+ minItems?: number;
44
+ uniqueItems?: boolean;
45
+ };
46
+ };
47
+ /**
48
+ * Check if a given object implements the RepoTreeResponse interface.
49
+ */
50
+ export declare function instanceOfRepoTreeResponse(value: object): value is RepoTreeResponse;
51
+ export declare function RepoTreeResponseFromJSON(json: any): RepoTreeResponse;
52
+ export declare function RepoTreeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoTreeResponse;
53
+ export declare function RepoTreeResponseToJSON(json: any): RepoTreeResponse;
54
+ export declare function RepoTreeResponseToJSONTyped(value?: RepoTreeResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RepoTreeResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfRepoTreeResponse = instanceOfRepoTreeResponse;
18
+ exports.RepoTreeResponseFromJSON = RepoTreeResponseFromJSON;
19
+ exports.RepoTreeResponseFromJSONTyped = RepoTreeResponseFromJSONTyped;
20
+ exports.RepoTreeResponseToJSON = RepoTreeResponseToJSON;
21
+ exports.RepoTreeResponseToJSONTyped = RepoTreeResponseToJSONTyped;
22
+ const RepoTreeEntry_1 = require("./RepoTreeEntry");
23
+ exports.RepoTreeResponsePropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the RepoTreeResponse interface.
26
+ */
27
+ function instanceOfRepoTreeResponse(value) {
28
+ if (!('commit' in value) || value['commit'] === undefined)
29
+ return false;
30
+ if (!('entries' in value) || value['entries'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ function RepoTreeResponseFromJSON(json) {
35
+ return RepoTreeResponseFromJSONTyped(json, false);
36
+ }
37
+ function RepoTreeResponseFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'commit': json['commit'],
43
+ 'entries': (json['entries'].map(RepoTreeEntry_1.RepoTreeEntryFromJSON)),
44
+ };
45
+ }
46
+ function RepoTreeResponseToJSON(json) {
47
+ return RepoTreeResponseToJSONTyped(json, false);
48
+ }
49
+ function RepoTreeResponseToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'commit': value['commit'],
55
+ 'entries': (value['entries'].map(RepoTreeEntry_1.RepoTreeEntryToJSON)),
56
+ };
57
+ }