@knowledge-stack/ksapi 3.15.1 → 3.16.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.
@@ -331,6 +331,7 @@ docs/SheetVisibilityChange.md
331
331
  docs/SignInRequest.md
332
332
  docs/SignUpResponse.md
333
333
  docs/SkillFile.md
334
+ docs/SkillFileDocument.md
334
335
  docs/SkillOrder.md
335
336
  docs/SkillResponse.md
336
337
  docs/SkillSearchResult.md
@@ -810,6 +811,7 @@ src/models/SheetVisibilityChange.ts
810
811
  src/models/SignInRequest.ts
811
812
  src/models/SignUpResponse.ts
812
813
  src/models/SkillFile.ts
814
+ src/models/SkillFileDocument.ts
813
815
  src/models/SkillOrder.ts
814
816
  src/models/SkillResponse.ts
815
817
  src/models/SkillSearchResult.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@3.15.1
1
+ # @knowledge-stack/ksapi@3.16.1
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -614,6 +614,7 @@ All URIs are relative to *http://localhost:8000*
614
614
  - [SignInRequest](docs/SignInRequest.md)
615
615
  - [SignUpResponse](docs/SignUpResponse.md)
616
616
  - [SkillFile](docs/SkillFile.md)
617
+ - [SkillFileDocument](docs/SkillFileDocument.md)
617
618
  - [SkillOrder](docs/SkillOrder.md)
618
619
  - [SkillResponse](docs/SkillResponse.md)
619
620
  - [SkillSearchResult](docs/SkillSearchResult.md)
@@ -756,7 +757,7 @@ and is automatically generated by the
756
757
  [OpenAPI Generator](https://openapi-generator.tech) project:
757
758
 
758
759
  - API version: `0.1.0`
759
- - Package version: `3.15.1`
760
+ - Package version: `3.16.1`
760
761
  - Generator version: `7.21.0`
761
762
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
762
763
 
@@ -223,7 +223,7 @@ export interface WorkflowRunsApiInterface {
223
223
  */
224
224
  resumeWorkflowRunRequestOpts(requestParameters: ResumeWorkflowRunRequest): Promise<runtime.RequestOpts>;
225
225
  /**
226
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
226
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
227
227
  * @summary Resume Workflow Run Handler
228
228
  * @param {string} runId
229
229
  * @param {*} [options] Override http request option.
@@ -232,7 +232,7 @@ export interface WorkflowRunsApiInterface {
232
232
  */
233
233
  resumeWorkflowRunRaw(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
234
234
  /**
235
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
235
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
236
236
  * Resume Workflow Run Handler
237
237
  */
238
238
  resumeWorkflowRun(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -244,7 +244,7 @@ export interface WorkflowRunsApiInterface {
244
244
  */
245
245
  retryWorkflowRunRequestOpts(requestParameters: RetryWorkflowRunRequest): Promise<runtime.RequestOpts>;
246
246
  /**
247
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
247
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
248
248
  * @summary Retry Workflow Run Handler
249
249
  * @param {string} runId
250
250
  * @param {*} [options] Override http request option.
@@ -253,7 +253,7 @@ export interface WorkflowRunsApiInterface {
253
253
  */
254
254
  retryWorkflowRunRaw(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
255
255
  /**
256
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
256
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
257
257
  * Retry Workflow Run Handler
258
258
  */
259
259
  retryWorkflowRun(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -446,12 +446,12 @@ export declare class WorkflowRunsApi extends runtime.BaseAPI implements Workflow
446
446
  */
447
447
  resumeWorkflowRunRequestOpts(requestParameters: ResumeWorkflowRunRequest): Promise<runtime.RequestOpts>;
448
448
  /**
449
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
449
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
450
450
  * Resume Workflow Run Handler
451
451
  */
452
452
  resumeWorkflowRunRaw(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
453
453
  /**
454
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
454
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
455
455
  * Resume Workflow Run Handler
456
456
  */
457
457
  resumeWorkflowRun(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -460,12 +460,12 @@ export declare class WorkflowRunsApi extends runtime.BaseAPI implements Workflow
460
460
  */
461
461
  retryWorkflowRunRequestOpts(requestParameters: RetryWorkflowRunRequest): Promise<runtime.RequestOpts>;
462
462
  /**
463
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
463
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
464
464
  * Retry Workflow Run Handler
465
465
  */
466
466
  retryWorkflowRunRaw(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
467
467
  /**
468
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
468
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
469
469
  * Retry Workflow Run Handler
470
470
  */
471
471
  retryWorkflowRun(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -379,7 +379,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
379
379
  });
380
380
  }
381
381
  /**
382
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
382
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
383
383
  * Resume Workflow Run Handler
384
384
  */
385
385
  resumeWorkflowRunRaw(requestParameters, initOverrides) {
@@ -390,7 +390,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
390
390
  });
391
391
  }
392
392
  /**
393
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
393
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
394
394
  * Resume Workflow Run Handler
395
395
  */
396
396
  resumeWorkflowRun(requestParameters, initOverrides) {
@@ -427,7 +427,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
427
427
  });
428
428
  }
429
429
  /**
430
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
430
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
431
431
  * Retry Workflow Run Handler
432
432
  */
433
433
  retryWorkflowRunRaw(requestParameters, initOverrides) {
@@ -438,7 +438,7 @@ class WorkflowRunsApi extends runtime.BaseAPI {
438
438
  });
439
439
  }
440
440
  /**
441
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
441
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
442
442
  * Retry Workflow Run Handler
443
443
  */
444
444
  retryWorkflowRun(requestParameters, initOverrides) {
@@ -223,7 +223,7 @@ export interface WorkflowRunsApiInterface {
223
223
  */
224
224
  resumeWorkflowRunRequestOpts(requestParameters: ResumeWorkflowRunRequest): Promise<runtime.RequestOpts>;
225
225
  /**
226
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
226
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
227
227
  * @summary Resume Workflow Run Handler
228
228
  * @param {string} runId
229
229
  * @param {*} [options] Override http request option.
@@ -232,7 +232,7 @@ export interface WorkflowRunsApiInterface {
232
232
  */
233
233
  resumeWorkflowRunRaw(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
234
234
  /**
235
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
235
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
236
236
  * Resume Workflow Run Handler
237
237
  */
238
238
  resumeWorkflowRun(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -244,7 +244,7 @@ export interface WorkflowRunsApiInterface {
244
244
  */
245
245
  retryWorkflowRunRequestOpts(requestParameters: RetryWorkflowRunRequest): Promise<runtime.RequestOpts>;
246
246
  /**
247
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
247
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
248
248
  * @summary Retry Workflow Run Handler
249
249
  * @param {string} runId
250
250
  * @param {*} [options] Override http request option.
@@ -253,7 +253,7 @@ export interface WorkflowRunsApiInterface {
253
253
  */
254
254
  retryWorkflowRunRaw(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
255
255
  /**
256
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
256
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
257
257
  * Retry Workflow Run Handler
258
258
  */
259
259
  retryWorkflowRun(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -446,12 +446,12 @@ export declare class WorkflowRunsApi extends runtime.BaseAPI implements Workflow
446
446
  */
447
447
  resumeWorkflowRunRequestOpts(requestParameters: ResumeWorkflowRunRequest): Promise<runtime.RequestOpts>;
448
448
  /**
449
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
449
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
450
450
  * Resume Workflow Run Handler
451
451
  */
452
452
  resumeWorkflowRunRaw(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
453
453
  /**
454
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
454
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
455
455
  * Resume Workflow Run Handler
456
456
  */
457
457
  resumeWorkflowRun(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -460,12 +460,12 @@ export declare class WorkflowRunsApi extends runtime.BaseAPI implements Workflow
460
460
  */
461
461
  retryWorkflowRunRequestOpts(requestParameters: RetryWorkflowRunRequest): Promise<runtime.RequestOpts>;
462
462
  /**
463
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
463
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
464
464
  * Retry Workflow Run Handler
465
465
  */
466
466
  retryWorkflowRunRaw(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
467
467
  /**
468
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
468
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
469
469
  * Retry Workflow Run Handler
470
470
  */
471
471
  retryWorkflowRun(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -343,7 +343,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
343
343
  });
344
344
  }
345
345
  /**
346
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
346
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
347
347
  * Resume Workflow Run Handler
348
348
  */
349
349
  resumeWorkflowRunRaw(requestParameters, initOverrides) {
@@ -354,7 +354,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
354
354
  });
355
355
  }
356
356
  /**
357
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
357
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
358
358
  * Resume Workflow Run Handler
359
359
  */
360
360
  resumeWorkflowRun(requestParameters, initOverrides) {
@@ -391,7 +391,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
391
391
  });
392
392
  }
393
393
  /**
394
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
394
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
395
395
  * Retry Workflow Run Handler
396
396
  */
397
397
  retryWorkflowRunRaw(requestParameters, initOverrides) {
@@ -402,7 +402,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI {
402
402
  });
403
403
  }
404
404
  /**
405
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
405
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
406
406
  * Retry Workflow Run Handler
407
407
  */
408
408
  retryWorkflowRun(requestParameters, initOverrides) {
@@ -0,0 +1,53 @@
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 SkillFileDocument
16
+ */
17
+ export interface SkillFileDocument {
18
+ /**
19
+ * Path relative to the skill root, e.g. SKILL.md
20
+ * @type {string}
21
+ * @memberof SkillFileDocument
22
+ */
23
+ path: string;
24
+ /**
25
+ * The file's Document id, as used in an @[doc:<id>] reference
26
+ * @type {string}
27
+ * @memberof SkillFileDocument
28
+ */
29
+ documentId: string;
30
+ }
31
+ export declare const SkillFileDocumentPropertyValidationAttributesMap: {
32
+ [property: string]: {
33
+ maxLength?: number;
34
+ minLength?: number;
35
+ pattern?: string;
36
+ maximum?: number;
37
+ exclusiveMaximum?: boolean;
38
+ minimum?: number;
39
+ exclusiveMinimum?: boolean;
40
+ multipleOf?: number;
41
+ maxItems?: number;
42
+ minItems?: number;
43
+ uniqueItems?: boolean;
44
+ };
45
+ };
46
+ /**
47
+ * Check if a given object implements the SkillFileDocument interface.
48
+ */
49
+ export declare function instanceOfSkillFileDocument(value: object): value is SkillFileDocument;
50
+ export declare function SkillFileDocumentFromJSON(json: any): SkillFileDocument;
51
+ export declare function SkillFileDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFileDocument;
52
+ export declare function SkillFileDocumentToJSON(json: any): SkillFileDocument;
53
+ export declare function SkillFileDocumentToJSONTyped(value?: SkillFileDocument | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
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
+ export const SkillFileDocumentPropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the SkillFileDocument interface.
17
+ */
18
+ export function instanceOfSkillFileDocument(value) {
19
+ if (!('path' in value) || value['path'] === undefined)
20
+ return false;
21
+ if (!('documentId' in value) || value['documentId'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function SkillFileDocumentFromJSON(json) {
26
+ return SkillFileDocumentFromJSONTyped(json, false);
27
+ }
28
+ export function SkillFileDocumentFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'path': json['path'],
34
+ 'documentId': json['document_id'],
35
+ };
36
+ }
37
+ export function SkillFileDocumentToJSON(json) {
38
+ return SkillFileDocumentToJSONTyped(json, false);
39
+ }
40
+ export function SkillFileDocumentToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'path': value['path'],
46
+ 'document_id': value['documentId'],
47
+ };
48
+ }
@@ -13,6 +13,7 @@ import type { ItemPermissions } from './ItemPermissions';
13
13
  import type { SkillFile } from './SkillFile';
14
14
  import type { PathPartApprovalState } from './PathPartApprovalState';
15
15
  import type { UserInfo } from './UserInfo';
16
+ import type { SkillFileDocument } from './SkillFileDocument';
16
17
  /**
17
18
  * Skill response; ``part_type`` is the folder-listing discriminator.
18
19
  * @export
@@ -85,6 +86,12 @@ export interface SkillResponse {
85
86
  * @memberof SkillResponse
86
87
  */
87
88
  files?: Array<SkillFile> | null;
89
+ /**
90
+ * Every working file with its Document id, SKILL.md included, sorted by path; populated with file_paths, empty on list.
91
+ * @type {Array<SkillFileDocument>}
92
+ * @memberof SkillResponse
93
+ */
94
+ fileDocuments?: Array<SkillFileDocument>;
88
95
  /**
89
96
  * Whether the working copy differs from the active published version. Always present (incl. list responses) so the UI can flag a skill with an unpublished draft.
90
97
  * @type {boolean}
@@ -15,6 +15,7 @@ import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissio
15
15
  import { SkillFileFromJSON, SkillFileToJSON, } from './SkillFile';
16
16
  import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
17
17
  import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
18
+ import { SkillFileDocumentFromJSON, SkillFileDocumentToJSON, } from './SkillFileDocument';
18
19
  /**
19
20
  * @export
20
21
  */
@@ -67,6 +68,7 @@ export function SkillResponseFromJSONTyped(json, ignoreDiscriminator) {
67
68
  'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
68
69
  'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
69
70
  'files': json['files'] == null ? undefined : (json['files'].map(SkillFileFromJSON)),
71
+ 'fileDocuments': json['file_documents'] == null ? undefined : (json['file_documents'].map(SkillFileDocumentFromJSON)),
70
72
  'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
71
73
  'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
72
74
  'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
@@ -94,6 +96,7 @@ export function SkillResponseToJSONTyped(value, ignoreDiscriminator = false) {
94
96
  'skill_md': value['skillMd'],
95
97
  'file_paths': value['filePaths'],
96
98
  'files': value['files'] == null ? undefined : (value['files'].map(SkillFileToJSON)),
99
+ 'file_documents': value['fileDocuments'] == null ? undefined : (value['fileDocuments'].map(SkillFileDocumentToJSON)),
97
100
  'has_unpublished_changes': value['hasUnpublishedChanges'],
98
101
  'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
99
102
  'owner': UserInfoToJSON(value['owner']),
@@ -299,6 +299,7 @@ export * from './SheetVisibilityChange';
299
299
  export * from './SignInRequest';
300
300
  export * from './SignUpResponse';
301
301
  export * from './SkillFile';
302
+ export * from './SkillFileDocument';
302
303
  export * from './SkillOrder';
303
304
  export * from './SkillResponse';
304
305
  export * from './SkillSearchResult';
@@ -301,6 +301,7 @@ export * from './SheetVisibilityChange';
301
301
  export * from './SignInRequest';
302
302
  export * from './SignUpResponse';
303
303
  export * from './SkillFile';
304
+ export * from './SkillFileDocument';
304
305
  export * from './SkillOrder';
305
306
  export * from './SkillResponse';
306
307
  export * from './SkillSearchResult';
@@ -0,0 +1,53 @@
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 SkillFileDocument
16
+ */
17
+ export interface SkillFileDocument {
18
+ /**
19
+ * Path relative to the skill root, e.g. SKILL.md
20
+ * @type {string}
21
+ * @memberof SkillFileDocument
22
+ */
23
+ path: string;
24
+ /**
25
+ * The file's Document id, as used in an @[doc:<id>] reference
26
+ * @type {string}
27
+ * @memberof SkillFileDocument
28
+ */
29
+ documentId: string;
30
+ }
31
+ export declare const SkillFileDocumentPropertyValidationAttributesMap: {
32
+ [property: string]: {
33
+ maxLength?: number;
34
+ minLength?: number;
35
+ pattern?: string;
36
+ maximum?: number;
37
+ exclusiveMaximum?: boolean;
38
+ minimum?: number;
39
+ exclusiveMinimum?: boolean;
40
+ multipleOf?: number;
41
+ maxItems?: number;
42
+ minItems?: number;
43
+ uniqueItems?: boolean;
44
+ };
45
+ };
46
+ /**
47
+ * Check if a given object implements the SkillFileDocument interface.
48
+ */
49
+ export declare function instanceOfSkillFileDocument(value: object): value is SkillFileDocument;
50
+ export declare function SkillFileDocumentFromJSON(json: any): SkillFileDocument;
51
+ export declare function SkillFileDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFileDocument;
52
+ export declare function SkillFileDocumentToJSON(json: any): SkillFileDocument;
53
+ export declare function SkillFileDocumentToJSONTyped(value?: SkillFileDocument | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,56 @@
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.SkillFileDocumentPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfSkillFileDocument = instanceOfSkillFileDocument;
18
+ exports.SkillFileDocumentFromJSON = SkillFileDocumentFromJSON;
19
+ exports.SkillFileDocumentFromJSONTyped = SkillFileDocumentFromJSONTyped;
20
+ exports.SkillFileDocumentToJSON = SkillFileDocumentToJSON;
21
+ exports.SkillFileDocumentToJSONTyped = SkillFileDocumentToJSONTyped;
22
+ exports.SkillFileDocumentPropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the SkillFileDocument interface.
25
+ */
26
+ function instanceOfSkillFileDocument(value) {
27
+ if (!('path' in value) || value['path'] === undefined)
28
+ return false;
29
+ if (!('documentId' in value) || value['documentId'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function SkillFileDocumentFromJSON(json) {
34
+ return SkillFileDocumentFromJSONTyped(json, false);
35
+ }
36
+ function SkillFileDocumentFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'path': json['path'],
42
+ 'documentId': json['document_id'],
43
+ };
44
+ }
45
+ function SkillFileDocumentToJSON(json) {
46
+ return SkillFileDocumentToJSONTyped(json, false);
47
+ }
48
+ function SkillFileDocumentToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'path': value['path'],
54
+ 'document_id': value['documentId'],
55
+ };
56
+ }
@@ -13,6 +13,7 @@ import type { ItemPermissions } from './ItemPermissions';
13
13
  import type { SkillFile } from './SkillFile';
14
14
  import type { PathPartApprovalState } from './PathPartApprovalState';
15
15
  import type { UserInfo } from './UserInfo';
16
+ import type { SkillFileDocument } from './SkillFileDocument';
16
17
  /**
17
18
  * Skill response; ``part_type`` is the folder-listing discriminator.
18
19
  * @export
@@ -85,6 +86,12 @@ export interface SkillResponse {
85
86
  * @memberof SkillResponse
86
87
  */
87
88
  files?: Array<SkillFile> | null;
89
+ /**
90
+ * Every working file with its Document id, SKILL.md included, sorted by path; populated with file_paths, empty on list.
91
+ * @type {Array<SkillFileDocument>}
92
+ * @memberof SkillResponse
93
+ */
94
+ fileDocuments?: Array<SkillFileDocument>;
88
95
  /**
89
96
  * Whether the working copy differs from the active published version. Always present (incl. list responses) so the UI can flag a skill with an unpublished draft.
90
97
  * @type {boolean}
@@ -23,6 +23,7 @@ const ItemPermissions_1 = require("./ItemPermissions");
23
23
  const SkillFile_1 = require("./SkillFile");
24
24
  const PathPartApprovalState_1 = require("./PathPartApprovalState");
25
25
  const UserInfo_1 = require("./UserInfo");
26
+ const SkillFileDocument_1 = require("./SkillFileDocument");
26
27
  /**
27
28
  * @export
28
29
  */
@@ -75,6 +76,7 @@ function SkillResponseFromJSONTyped(json, ignoreDiscriminator) {
75
76
  'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
76
77
  'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
77
78
  'files': json['files'] == null ? undefined : (json['files'].map(SkillFile_1.SkillFileFromJSON)),
79
+ 'fileDocuments': json['file_documents'] == null ? undefined : (json['file_documents'].map(SkillFileDocument_1.SkillFileDocumentFromJSON)),
78
80
  'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
79
81
  'approvalState': (0, PathPartApprovalState_1.PathPartApprovalStateFromJSON)(json['approval_state']),
80
82
  'owner': json['owner'] == null ? undefined : (0, UserInfo_1.UserInfoFromJSON)(json['owner']),
@@ -102,6 +104,7 @@ function SkillResponseToJSONTyped(value, ignoreDiscriminator = false) {
102
104
  'skill_md': value['skillMd'],
103
105
  'file_paths': value['filePaths'],
104
106
  'files': value['files'] == null ? undefined : (value['files'].map(SkillFile_1.SkillFileToJSON)),
107
+ 'file_documents': value['fileDocuments'] == null ? undefined : (value['fileDocuments'].map(SkillFileDocument_1.SkillFileDocumentToJSON)),
105
108
  'has_unpublished_changes': value['hasUnpublishedChanges'],
106
109
  'approval_state': (0, PathPartApprovalState_1.PathPartApprovalStateToJSON)(value['approvalState']),
107
110
  'owner': (0, UserInfo_1.UserInfoToJSON)(value['owner']),
@@ -299,6 +299,7 @@ export * from './SheetVisibilityChange';
299
299
  export * from './SignInRequest';
300
300
  export * from './SignUpResponse';
301
301
  export * from './SkillFile';
302
+ export * from './SkillFileDocument';
302
303
  export * from './SkillOrder';
303
304
  export * from './SkillResponse';
304
305
  export * from './SkillSearchResult';
@@ -317,6 +317,7 @@ __exportStar(require("./SheetVisibilityChange"), exports);
317
317
  __exportStar(require("./SignInRequest"), exports);
318
318
  __exportStar(require("./SignUpResponse"), exports);
319
319
  __exportStar(require("./SkillFile"), exports);
320
+ __exportStar(require("./SkillFileDocument"), exports);
320
321
  __exportStar(require("./SkillOrder"), exports);
321
322
  __exportStar(require("./SkillResponse"), exports);
322
323
  __exportStar(require("./SkillSearchResult"), exports);
@@ -75,6 +75,7 @@ Name | Type
75
75
  `skillMd` | string
76
76
  `filePaths` | Array&lt;string&gt;
77
77
  `files` | [Array&lt;SkillFile&gt;](SkillFile.md)
78
+ `fileDocuments` | [Array&lt;SkillFileDocument&gt;](SkillFileDocument.md)
78
79
  `hasUnpublishedChanges` | boolean
79
80
 
80
81
  ## Example
@@ -153,6 +154,7 @@ const example = {
153
154
  "skillMd": null,
154
155
  "filePaths": null,
155
156
  "files": null,
157
+ "fileDocuments": null,
156
158
  "hasUnpublishedChanges": null,
157
159
  } satisfies FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR
158
160
 
@@ -0,0 +1,36 @@
1
+
2
+ # SkillFileDocument
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `path` | string
10
+ `documentId` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { SkillFileDocument } from '@knowledge-stack/ksapi'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "path": null,
20
+ "documentId": null,
21
+ } satisfies SkillFileDocument
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as SkillFileDocument
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -18,6 +18,7 @@ Name | Type
18
18
  `skillMd` | string
19
19
  `filePaths` | Array&lt;string&gt;
20
20
  `files` | [Array&lt;SkillFile&gt;](SkillFile.md)
21
+ `fileDocuments` | [Array&lt;SkillFileDocument&gt;](SkillFileDocument.md)
21
22
  `hasUnpublishedChanges` | boolean
22
23
  `approvalState` | [PathPartApprovalState](PathPartApprovalState.md)
23
24
  `owner` | [UserInfo](UserInfo.md)
@@ -43,6 +44,7 @@ const example = {
43
44
  "skillMd": null,
44
45
  "filePaths": null,
45
46
  "files": null,
47
+ "fileDocuments": null,
46
48
  "hasUnpublishedChanges": null,
47
49
  "approvalState": null,
48
50
  "owner": null,
@@ -450,7 +450,7 @@ example().catch(console.error);
450
450
 
451
451
  Resume Workflow Run Handler
452
452
 
453
- Continue a FAILED run in place instead of restarting it. Unlike &#x60;&#x60;retry&#x60;&#x60; (which restarts the agent cold), &#x60;&#x60;resume&#x60;&#x60; loads the run\&#39;s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates &#x60;&#x60;/work/&#x60;&#x60;, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll &#x60;&#x60;GET /v1/workflow-runs/{run_id}&#x60;&#x60; (also given in the &#x60;&#x60;Location&#x60;&#x60; header) until &#x60;&#x60;execution_state&#x60;&#x60; is COMPLETED or FAILED.
453
+ Continue a FAILED run in place instead of restarting it. Unlike &#x60;&#x60;retry&#x60;&#x60; (which restarts the agent cold), &#x60;&#x60;resume&#x60;&#x60; loads the run\&#39;s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates &#x60;&#x60;/work/&#x60;&#x60;, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll &#x60;&#x60;GET /v1/workflow-runs/{run_id}&#x60;&#x60; (also given in the &#x60;&#x60;Location&#x60;&#x60; header) until &#x60;&#x60;execution_state&#x60;&#x60; is COMPLETED or FAILED.
454
454
 
455
455
  ### Example
456
456
 
@@ -525,7 +525,7 @@ example().catch(console.error);
525
525
 
526
526
  Retry Workflow Run Handler
527
527
 
528
- Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips &#x60;&#x60;FAILED -&gt; IN_PROGRESS&#x60;&#x60; against the run\&#39;s existing snapshot and re-dispatches with empty history. Use &#x60;&#x60;resume&#x60;&#x60; to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll &#x60;&#x60;GET /v1/workflow-runs/{run_id}&#x60;&#x60; (also given in the &#x60;&#x60;Location&#x60;&#x60; header) until &#x60;&#x60;execution_state&#x60;&#x60; is COMPLETED or FAILED.
528
+ Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips &#x60;&#x60;FAILED -&gt; IN_PROGRESS&#x60;&#x60; against the run\&#39;s existing snapshot and re-dispatches with empty history. Use &#x60;&#x60;resume&#x60;&#x60; to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll &#x60;&#x60;GET /v1/workflow-runs/{run_id}&#x60;&#x60; (also given in the &#x60;&#x60;Location&#x60;&#x60; header) until &#x60;&#x60;execution_state&#x60;&#x60; is COMPLETED or FAILED.
529
529
 
530
530
  ### Example
531
531
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "3.15.1",
3
+ "version": "3.16.1",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -304,7 +304,7 @@ export interface WorkflowRunsApiInterface {
304
304
  resumeWorkflowRunRequestOpts(requestParameters: ResumeWorkflowRunRequest): Promise<runtime.RequestOpts>;
305
305
 
306
306
  /**
307
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
307
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
308
308
  * @summary Resume Workflow Run Handler
309
309
  * @param {string} runId
310
310
  * @param {*} [options] Override http request option.
@@ -314,7 +314,7 @@ export interface WorkflowRunsApiInterface {
314
314
  resumeWorkflowRunRaw(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
315
315
 
316
316
  /**
317
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
317
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
318
318
  * Resume Workflow Run Handler
319
319
  */
320
320
  resumeWorkflowRun(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -328,7 +328,7 @@ export interface WorkflowRunsApiInterface {
328
328
  retryWorkflowRunRequestOpts(requestParameters: RetryWorkflowRunRequest): Promise<runtime.RequestOpts>;
329
329
 
330
330
  /**
331
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
331
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
332
332
  * @summary Retry Workflow Run Handler
333
333
  * @param {string} runId
334
334
  * @param {*} [options] Override http request option.
@@ -338,7 +338,7 @@ export interface WorkflowRunsApiInterface {
338
338
  retryWorkflowRunRaw(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
339
339
 
340
340
  /**
341
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
341
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
342
342
  * Retry Workflow Run Handler
343
343
  */
344
344
  retryWorkflowRun(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -854,7 +854,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
854
854
  }
855
855
 
856
856
  /**
857
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
857
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
858
858
  * Resume Workflow Run Handler
859
859
  */
860
860
  async resumeWorkflowRunRaw(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>> {
@@ -865,7 +865,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
865
865
  }
866
866
 
867
867
  /**
868
- * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards as retry: 409 if the run is not FAILED or was never started; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
868
+ * Continue a FAILED run in place instead of restarting it. Unlike ``retry`` (which restarts the agent cold), ``resume`` loads the run\'s surviving thread history — the checkpoint summary and any persisted partial reply — and re-hydrates ``/work/``, so a run that timed out or was stopped near the end finishes from where it left off rather than redoing the work. Same guards and never-started re-arm as retry; triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
869
869
  * Resume Workflow Run Handler
870
870
  */
871
871
  async resumeWorkflowRun(requestParameters: ResumeWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse> {
@@ -909,7 +909,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
909
909
  }
910
910
 
911
911
  /**
912
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
912
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
913
913
  * Retry Workflow Run Handler
914
914
  */
915
915
  async retryWorkflowRunRaw(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>> {
@@ -920,7 +920,7 @@ export class WorkflowRunsApi extends runtime.BaseAPI implements WorkflowRunsApiI
920
920
  }
921
921
 
922
922
  /**
923
- * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned) or was never started. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
923
+ * Re-run a FAILED run (including a user-stopped one) from scratch. Restarts the agent cold: flips ``FAILED -> IN_PROGRESS`` against the run\'s existing snapshot and re-dispatches with empty history. Use ``resume`` to continue from surviving history instead. 409 if the run is not FAILED (NOT_STARTED/PENDING use Start; COMPLETED is cloned); never-started re-arms. Triggerer or OWNER/ADMIN only. Runs in the background — poll ``GET /v1/workflow-runs/{run_id}`` (also given in the ``Location`` header) until ``execution_state`` is COMPLETED or FAILED.
924
924
  * Retry Workflow Run Handler
925
925
  */
926
926
  async retryWorkflowRun(requestParameters: RetryWorkflowRunRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse> {
@@ -0,0 +1,92 @@
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
+ *
18
+ * @export
19
+ * @interface SkillFileDocument
20
+ */
21
+ export interface SkillFileDocument {
22
+ /**
23
+ * Path relative to the skill root, e.g. SKILL.md
24
+ * @type {string}
25
+ * @memberof SkillFileDocument
26
+ */
27
+ path: string;
28
+ /**
29
+ * The file's Document id, as used in an @[doc:<id>] reference
30
+ * @type {string}
31
+ * @memberof SkillFileDocument
32
+ */
33
+ documentId: string;
34
+ }
35
+ export const SkillFileDocumentPropertyValidationAttributesMap: {
36
+ [property: string]: {
37
+ maxLength?: number,
38
+ minLength?: number,
39
+ pattern?: string,
40
+ maximum?: number,
41
+ exclusiveMaximum?: boolean,
42
+ minimum?: number,
43
+ exclusiveMinimum?: boolean,
44
+ multipleOf?: number,
45
+ maxItems?: number,
46
+ minItems?: number,
47
+ uniqueItems?: boolean
48
+ }
49
+ } = {
50
+ }
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the SkillFileDocument interface.
55
+ */
56
+ export function instanceOfSkillFileDocument(value: object): value is SkillFileDocument {
57
+ if (!('path' in value) || value['path'] === undefined) return false;
58
+ if (!('documentId' in value) || value['documentId'] === undefined) return false;
59
+ return true;
60
+ }
61
+
62
+ export function SkillFileDocumentFromJSON(json: any): SkillFileDocument {
63
+ return SkillFileDocumentFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function SkillFileDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFileDocument {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'path': json['path'],
73
+ 'documentId': json['document_id'],
74
+ };
75
+ }
76
+
77
+ export function SkillFileDocumentToJSON(json: any): SkillFileDocument {
78
+ return SkillFileDocumentToJSONTyped(json, false);
79
+ }
80
+
81
+ export function SkillFileDocumentToJSONTyped(value?: SkillFileDocument | null, ignoreDiscriminator: boolean = false): any {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+
86
+ return {
87
+
88
+ 'path': value['path'],
89
+ 'document_id': value['documentId'],
90
+ };
91
+ }
92
+
@@ -41,6 +41,13 @@ import {
41
41
  UserInfoToJSON,
42
42
  UserInfoToJSONTyped,
43
43
  } from './UserInfo';
44
+ import type { SkillFileDocument } from './SkillFileDocument';
45
+ import {
46
+ SkillFileDocumentFromJSON,
47
+ SkillFileDocumentFromJSONTyped,
48
+ SkillFileDocumentToJSON,
49
+ SkillFileDocumentToJSONTyped,
50
+ } from './SkillFileDocument';
44
51
 
45
52
  /**
46
53
  * Skill response; ``part_type`` is the folder-listing discriminator.
@@ -114,6 +121,12 @@ export interface SkillResponse {
114
121
  * @memberof SkillResponse
115
122
  */
116
123
  files?: Array<SkillFile> | null;
124
+ /**
125
+ * Every working file with its Document id, SKILL.md included, sorted by path; populated with file_paths, empty on list.
126
+ * @type {Array<SkillFileDocument>}
127
+ * @memberof SkillResponse
128
+ */
129
+ fileDocuments?: Array<SkillFileDocument>;
117
130
  /**
118
131
  * Whether the working copy differs from the active published version. Always present (incl. list responses) so the UI can flag a skill with an unpublished draft.
119
132
  * @type {boolean}
@@ -217,6 +230,7 @@ export function SkillResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
217
230
  'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
218
231
  'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
219
232
  'files': json['files'] == null ? undefined : ((json['files'] as Array<any>).map(SkillFileFromJSON)),
233
+ 'fileDocuments': json['file_documents'] == null ? undefined : ((json['file_documents'] as Array<any>).map(SkillFileDocumentFromJSON)),
220
234
  'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
221
235
  'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
222
236
  'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
@@ -248,6 +262,7 @@ export function SkillResponseToJSONTyped(value?: SkillResponse | null, ignoreDis
248
262
  'skill_md': value['skillMd'],
249
263
  'file_paths': value['filePaths'],
250
264
  'files': value['files'] == null ? undefined : ((value['files'] as Array<any>).map(SkillFileToJSON)),
265
+ 'file_documents': value['fileDocuments'] == null ? undefined : ((value['fileDocuments'] as Array<any>).map(SkillFileDocumentToJSON)),
251
266
  'has_unpublished_changes': value['hasUnpublishedChanges'],
252
267
  'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
253
268
  'owner': UserInfoToJSON(value['owner']),
@@ -301,6 +301,7 @@ export * from './SheetVisibilityChange';
301
301
  export * from './SignInRequest';
302
302
  export * from './SignUpResponse';
303
303
  export * from './SkillFile';
304
+ export * from './SkillFileDocument';
304
305
  export * from './SkillOrder';
305
306
  export * from './SkillResponse';
306
307
  export * from './SkillSearchResult';