hindsight-client 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
- hindsight_client/__init__.py +9 -8
- hindsight_client/hindsight_client.py +394 -59
- {hindsight_client-0.3.0.dist-info → hindsight_client-0.4.0.dist-info}/METADATA +1 -1
- hindsight_client-0.4.0.dist-info/RECORD +89 -0
- hindsight_client_api/__init__.py +24 -0
- hindsight_client_api/api/__init__.py +2 -0
- hindsight_client_api/api/banks_api.py +997 -131
- hindsight_client_api/api/directives_api.py +1619 -0
- hindsight_client_api/api/entities_api.py +9 -6
- hindsight_client_api/api/mental_models_api.py +1897 -0
- hindsight_client_api/api/monitoring_api.py +246 -0
- hindsight_client_api/api/operations_api.py +350 -4
- hindsight_client_api/models/__init__.py +22 -0
- hindsight_client_api/models/add_background_request.py +2 -2
- hindsight_client_api/models/async_operation_submit_response.py +89 -0
- hindsight_client_api/models/background_response.py +10 -3
- hindsight_client_api/models/bank_list_item.py +6 -6
- hindsight_client_api/models/bank_profile_response.py +11 -4
- hindsight_client_api/models/bank_stats_response.py +15 -4
- hindsight_client_api/models/consolidation_response.py +89 -0
- hindsight_client_api/models/create_bank_request.py +8 -1
- hindsight_client_api/models/create_directive_request.py +95 -0
- hindsight_client_api/models/create_mental_model_request.py +100 -0
- hindsight_client_api/models/create_mental_model_response.py +87 -0
- hindsight_client_api/models/directive_list_response.py +95 -0
- hindsight_client_api/models/directive_response.py +113 -0
- hindsight_client_api/models/features_info.py +91 -0
- hindsight_client_api/models/mental_model_list_response.py +95 -0
- hindsight_client_api/models/mental_model_response.py +126 -0
- hindsight_client_api/models/mental_model_trigger.py +87 -0
- hindsight_client_api/models/operation_response.py +1 -1
- hindsight_client_api/models/operation_status_response.py +131 -0
- hindsight_client_api/models/operations_list_response.py +8 -2
- hindsight_client_api/models/reflect_based_on.py +115 -0
- hindsight_client_api/models/reflect_directive.py +91 -0
- hindsight_client_api/models/reflect_include_options.py +13 -2
- hindsight_client_api/models/reflect_llm_call.py +89 -0
- hindsight_client_api/models/reflect_mental_model.py +96 -0
- hindsight_client_api/models/reflect_response.py +23 -11
- hindsight_client_api/models/reflect_tool_call.py +100 -0
- hindsight_client_api/models/reflect_trace.py +105 -0
- hindsight_client_api/models/tool_calls_include_options.py +87 -0
- hindsight_client_api/models/update_directive_request.py +120 -0
- hindsight_client_api/models/update_mental_model_request.py +125 -0
- hindsight_client_api/models/version_response.py +93 -0
- hindsight_client-0.3.0.dist-info/RECORD +0 -65
- {hindsight_client-0.3.0.dist-info → hindsight_client-0.4.0.dist-info}/WHEEL +0 -0
|
@@ -16,9 +16,11 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from pydantic import StrictStr
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
20
|
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
21
22
|
from hindsight_client_api.models.cancel_operation_response import CancelOperationResponse
|
|
23
|
+
from hindsight_client_api.models.operation_status_response import OperationStatusResponse
|
|
22
24
|
from hindsight_client_api.models.operations_list_response import OperationsListResponse
|
|
23
25
|
|
|
24
26
|
from hindsight_client_api.api_client import ApiClient, RequestSerialized
|
|
@@ -332,10 +334,306 @@ class OperationsApi:
|
|
|
332
334
|
|
|
333
335
|
|
|
334
336
|
|
|
337
|
+
@validate_call
|
|
338
|
+
async def get_operation_status(
|
|
339
|
+
self,
|
|
340
|
+
bank_id: StrictStr,
|
|
341
|
+
operation_id: StrictStr,
|
|
342
|
+
authorization: Optional[StrictStr] = None,
|
|
343
|
+
_request_timeout: Union[
|
|
344
|
+
None,
|
|
345
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
346
|
+
Tuple[
|
|
347
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
348
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
349
|
+
]
|
|
350
|
+
] = None,
|
|
351
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
352
|
+
_content_type: Optional[StrictStr] = None,
|
|
353
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
354
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
355
|
+
) -> OperationStatusResponse:
|
|
356
|
+
"""Get operation status
|
|
357
|
+
|
|
358
|
+
Get the status of a specific async operation. Returns 'pending', 'completed', or 'failed'. Completed operations are removed from storage, so 'completed' means the operation finished successfully.
|
|
359
|
+
|
|
360
|
+
:param bank_id: (required)
|
|
361
|
+
:type bank_id: str
|
|
362
|
+
:param operation_id: (required)
|
|
363
|
+
:type operation_id: str
|
|
364
|
+
:param authorization:
|
|
365
|
+
:type authorization: str
|
|
366
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
367
|
+
number provided, it will be total request
|
|
368
|
+
timeout. It can also be a pair (tuple) of
|
|
369
|
+
(connection, read) timeouts.
|
|
370
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
371
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
372
|
+
request; this effectively ignores the
|
|
373
|
+
authentication in the spec for a single request.
|
|
374
|
+
:type _request_auth: dict, optional
|
|
375
|
+
:param _content_type: force content-type for the request.
|
|
376
|
+
:type _content_type: str, Optional
|
|
377
|
+
:param _headers: set to override the headers for a single
|
|
378
|
+
request; this effectively ignores the headers
|
|
379
|
+
in the spec for a single request.
|
|
380
|
+
:type _headers: dict, optional
|
|
381
|
+
:param _host_index: set to override the host_index for a single
|
|
382
|
+
request; this effectively ignores the host_index
|
|
383
|
+
in the spec for a single request.
|
|
384
|
+
:type _host_index: int, optional
|
|
385
|
+
:return: Returns the result object.
|
|
386
|
+
""" # noqa: E501
|
|
387
|
+
|
|
388
|
+
_param = self._get_operation_status_serialize(
|
|
389
|
+
bank_id=bank_id,
|
|
390
|
+
operation_id=operation_id,
|
|
391
|
+
authorization=authorization,
|
|
392
|
+
_request_auth=_request_auth,
|
|
393
|
+
_content_type=_content_type,
|
|
394
|
+
_headers=_headers,
|
|
395
|
+
_host_index=_host_index
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
399
|
+
'200': "OperationStatusResponse",
|
|
400
|
+
'422': "HTTPValidationError",
|
|
401
|
+
}
|
|
402
|
+
response_data = await self.api_client.call_api(
|
|
403
|
+
*_param,
|
|
404
|
+
_request_timeout=_request_timeout
|
|
405
|
+
)
|
|
406
|
+
await response_data.read()
|
|
407
|
+
return self.api_client.response_deserialize(
|
|
408
|
+
response_data=response_data,
|
|
409
|
+
response_types_map=_response_types_map,
|
|
410
|
+
).data
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
@validate_call
|
|
414
|
+
async def get_operation_status_with_http_info(
|
|
415
|
+
self,
|
|
416
|
+
bank_id: StrictStr,
|
|
417
|
+
operation_id: StrictStr,
|
|
418
|
+
authorization: Optional[StrictStr] = None,
|
|
419
|
+
_request_timeout: Union[
|
|
420
|
+
None,
|
|
421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
422
|
+
Tuple[
|
|
423
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
424
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
425
|
+
]
|
|
426
|
+
] = None,
|
|
427
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
428
|
+
_content_type: Optional[StrictStr] = None,
|
|
429
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
430
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
431
|
+
) -> ApiResponse[OperationStatusResponse]:
|
|
432
|
+
"""Get operation status
|
|
433
|
+
|
|
434
|
+
Get the status of a specific async operation. Returns 'pending', 'completed', or 'failed'. Completed operations are removed from storage, so 'completed' means the operation finished successfully.
|
|
435
|
+
|
|
436
|
+
:param bank_id: (required)
|
|
437
|
+
:type bank_id: str
|
|
438
|
+
:param operation_id: (required)
|
|
439
|
+
:type operation_id: str
|
|
440
|
+
:param authorization:
|
|
441
|
+
:type authorization: str
|
|
442
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
443
|
+
number provided, it will be total request
|
|
444
|
+
timeout. It can also be a pair (tuple) of
|
|
445
|
+
(connection, read) timeouts.
|
|
446
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
447
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
448
|
+
request; this effectively ignores the
|
|
449
|
+
authentication in the spec for a single request.
|
|
450
|
+
:type _request_auth: dict, optional
|
|
451
|
+
:param _content_type: force content-type for the request.
|
|
452
|
+
:type _content_type: str, Optional
|
|
453
|
+
:param _headers: set to override the headers for a single
|
|
454
|
+
request; this effectively ignores the headers
|
|
455
|
+
in the spec for a single request.
|
|
456
|
+
:type _headers: dict, optional
|
|
457
|
+
:param _host_index: set to override the host_index for a single
|
|
458
|
+
request; this effectively ignores the host_index
|
|
459
|
+
in the spec for a single request.
|
|
460
|
+
:type _host_index: int, optional
|
|
461
|
+
:return: Returns the result object.
|
|
462
|
+
""" # noqa: E501
|
|
463
|
+
|
|
464
|
+
_param = self._get_operation_status_serialize(
|
|
465
|
+
bank_id=bank_id,
|
|
466
|
+
operation_id=operation_id,
|
|
467
|
+
authorization=authorization,
|
|
468
|
+
_request_auth=_request_auth,
|
|
469
|
+
_content_type=_content_type,
|
|
470
|
+
_headers=_headers,
|
|
471
|
+
_host_index=_host_index
|
|
472
|
+
)
|
|
473
|
+
|
|
474
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
475
|
+
'200': "OperationStatusResponse",
|
|
476
|
+
'422': "HTTPValidationError",
|
|
477
|
+
}
|
|
478
|
+
response_data = await self.api_client.call_api(
|
|
479
|
+
*_param,
|
|
480
|
+
_request_timeout=_request_timeout
|
|
481
|
+
)
|
|
482
|
+
await response_data.read()
|
|
483
|
+
return self.api_client.response_deserialize(
|
|
484
|
+
response_data=response_data,
|
|
485
|
+
response_types_map=_response_types_map,
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
@validate_call
|
|
490
|
+
async def get_operation_status_without_preload_content(
|
|
491
|
+
self,
|
|
492
|
+
bank_id: StrictStr,
|
|
493
|
+
operation_id: StrictStr,
|
|
494
|
+
authorization: Optional[StrictStr] = None,
|
|
495
|
+
_request_timeout: Union[
|
|
496
|
+
None,
|
|
497
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
498
|
+
Tuple[
|
|
499
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
500
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
501
|
+
]
|
|
502
|
+
] = None,
|
|
503
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
504
|
+
_content_type: Optional[StrictStr] = None,
|
|
505
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
506
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
507
|
+
) -> RESTResponseType:
|
|
508
|
+
"""Get operation status
|
|
509
|
+
|
|
510
|
+
Get the status of a specific async operation. Returns 'pending', 'completed', or 'failed'. Completed operations are removed from storage, so 'completed' means the operation finished successfully.
|
|
511
|
+
|
|
512
|
+
:param bank_id: (required)
|
|
513
|
+
:type bank_id: str
|
|
514
|
+
:param operation_id: (required)
|
|
515
|
+
:type operation_id: str
|
|
516
|
+
:param authorization:
|
|
517
|
+
:type authorization: str
|
|
518
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
519
|
+
number provided, it will be total request
|
|
520
|
+
timeout. It can also be a pair (tuple) of
|
|
521
|
+
(connection, read) timeouts.
|
|
522
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
523
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
524
|
+
request; this effectively ignores the
|
|
525
|
+
authentication in the spec for a single request.
|
|
526
|
+
:type _request_auth: dict, optional
|
|
527
|
+
:param _content_type: force content-type for the request.
|
|
528
|
+
:type _content_type: str, Optional
|
|
529
|
+
:param _headers: set to override the headers for a single
|
|
530
|
+
request; this effectively ignores the headers
|
|
531
|
+
in the spec for a single request.
|
|
532
|
+
:type _headers: dict, optional
|
|
533
|
+
:param _host_index: set to override the host_index for a single
|
|
534
|
+
request; this effectively ignores the host_index
|
|
535
|
+
in the spec for a single request.
|
|
536
|
+
:type _host_index: int, optional
|
|
537
|
+
:return: Returns the result object.
|
|
538
|
+
""" # noqa: E501
|
|
539
|
+
|
|
540
|
+
_param = self._get_operation_status_serialize(
|
|
541
|
+
bank_id=bank_id,
|
|
542
|
+
operation_id=operation_id,
|
|
543
|
+
authorization=authorization,
|
|
544
|
+
_request_auth=_request_auth,
|
|
545
|
+
_content_type=_content_type,
|
|
546
|
+
_headers=_headers,
|
|
547
|
+
_host_index=_host_index
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
551
|
+
'200': "OperationStatusResponse",
|
|
552
|
+
'422': "HTTPValidationError",
|
|
553
|
+
}
|
|
554
|
+
response_data = await self.api_client.call_api(
|
|
555
|
+
*_param,
|
|
556
|
+
_request_timeout=_request_timeout
|
|
557
|
+
)
|
|
558
|
+
return response_data.response
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
def _get_operation_status_serialize(
|
|
562
|
+
self,
|
|
563
|
+
bank_id,
|
|
564
|
+
operation_id,
|
|
565
|
+
authorization,
|
|
566
|
+
_request_auth,
|
|
567
|
+
_content_type,
|
|
568
|
+
_headers,
|
|
569
|
+
_host_index,
|
|
570
|
+
) -> RequestSerialized:
|
|
571
|
+
|
|
572
|
+
_host = None
|
|
573
|
+
|
|
574
|
+
_collection_formats: Dict[str, str] = {
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
_path_params: Dict[str, str] = {}
|
|
578
|
+
_query_params: List[Tuple[str, str]] = []
|
|
579
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
580
|
+
_form_params: List[Tuple[str, str]] = []
|
|
581
|
+
_files: Dict[
|
|
582
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
583
|
+
] = {}
|
|
584
|
+
_body_params: Optional[bytes] = None
|
|
585
|
+
|
|
586
|
+
# process the path parameters
|
|
587
|
+
if bank_id is not None:
|
|
588
|
+
_path_params['bank_id'] = bank_id
|
|
589
|
+
if operation_id is not None:
|
|
590
|
+
_path_params['operation_id'] = operation_id
|
|
591
|
+
# process the query parameters
|
|
592
|
+
# process the header parameters
|
|
593
|
+
if authorization is not None:
|
|
594
|
+
_header_params['authorization'] = authorization
|
|
595
|
+
# process the form parameters
|
|
596
|
+
# process the body parameter
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
# set the HTTP header `Accept`
|
|
600
|
+
if 'Accept' not in _header_params:
|
|
601
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
602
|
+
[
|
|
603
|
+
'application/json'
|
|
604
|
+
]
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
# authentication setting
|
|
609
|
+
_auth_settings: List[str] = [
|
|
610
|
+
]
|
|
611
|
+
|
|
612
|
+
return self.api_client.param_serialize(
|
|
613
|
+
method='GET',
|
|
614
|
+
resource_path='/v1/default/banks/{bank_id}/operations/{operation_id}',
|
|
615
|
+
path_params=_path_params,
|
|
616
|
+
query_params=_query_params,
|
|
617
|
+
header_params=_header_params,
|
|
618
|
+
body=_body_params,
|
|
619
|
+
post_params=_form_params,
|
|
620
|
+
files=_files,
|
|
621
|
+
auth_settings=_auth_settings,
|
|
622
|
+
collection_formats=_collection_formats,
|
|
623
|
+
_host=_host,
|
|
624
|
+
_request_auth=_request_auth
|
|
625
|
+
)
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
335
630
|
@validate_call
|
|
336
631
|
async def list_operations(
|
|
337
632
|
self,
|
|
338
633
|
bank_id: StrictStr,
|
|
634
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status: pending, completed, or failed")] = None,
|
|
635
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of operations to return")] = None,
|
|
636
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of operations to skip")] = None,
|
|
339
637
|
authorization: Optional[StrictStr] = None,
|
|
340
638
|
_request_timeout: Union[
|
|
341
639
|
None,
|
|
@@ -352,10 +650,16 @@ class OperationsApi:
|
|
|
352
650
|
) -> OperationsListResponse:
|
|
353
651
|
"""List async operations
|
|
354
652
|
|
|
355
|
-
Get a list of
|
|
653
|
+
Get a list of async operations for a specific agent, with optional filtering by status. Results are sorted by most recent first.
|
|
356
654
|
|
|
357
655
|
:param bank_id: (required)
|
|
358
656
|
:type bank_id: str
|
|
657
|
+
:param status: Filter by status: pending, completed, or failed
|
|
658
|
+
:type status: str
|
|
659
|
+
:param limit: Maximum number of operations to return
|
|
660
|
+
:type limit: int
|
|
661
|
+
:param offset: Number of operations to skip
|
|
662
|
+
:type offset: int
|
|
359
663
|
:param authorization:
|
|
360
664
|
:type authorization: str
|
|
361
665
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -382,6 +686,9 @@ class OperationsApi:
|
|
|
382
686
|
|
|
383
687
|
_param = self._list_operations_serialize(
|
|
384
688
|
bank_id=bank_id,
|
|
689
|
+
status=status,
|
|
690
|
+
limit=limit,
|
|
691
|
+
offset=offset,
|
|
385
692
|
authorization=authorization,
|
|
386
693
|
_request_auth=_request_auth,
|
|
387
694
|
_content_type=_content_type,
|
|
@@ -408,6 +715,9 @@ class OperationsApi:
|
|
|
408
715
|
async def list_operations_with_http_info(
|
|
409
716
|
self,
|
|
410
717
|
bank_id: StrictStr,
|
|
718
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status: pending, completed, or failed")] = None,
|
|
719
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of operations to return")] = None,
|
|
720
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of operations to skip")] = None,
|
|
411
721
|
authorization: Optional[StrictStr] = None,
|
|
412
722
|
_request_timeout: Union[
|
|
413
723
|
None,
|
|
@@ -424,10 +734,16 @@ class OperationsApi:
|
|
|
424
734
|
) -> ApiResponse[OperationsListResponse]:
|
|
425
735
|
"""List async operations
|
|
426
736
|
|
|
427
|
-
Get a list of
|
|
737
|
+
Get a list of async operations for a specific agent, with optional filtering by status. Results are sorted by most recent first.
|
|
428
738
|
|
|
429
739
|
:param bank_id: (required)
|
|
430
740
|
:type bank_id: str
|
|
741
|
+
:param status: Filter by status: pending, completed, or failed
|
|
742
|
+
:type status: str
|
|
743
|
+
:param limit: Maximum number of operations to return
|
|
744
|
+
:type limit: int
|
|
745
|
+
:param offset: Number of operations to skip
|
|
746
|
+
:type offset: int
|
|
431
747
|
:param authorization:
|
|
432
748
|
:type authorization: str
|
|
433
749
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -454,6 +770,9 @@ class OperationsApi:
|
|
|
454
770
|
|
|
455
771
|
_param = self._list_operations_serialize(
|
|
456
772
|
bank_id=bank_id,
|
|
773
|
+
status=status,
|
|
774
|
+
limit=limit,
|
|
775
|
+
offset=offset,
|
|
457
776
|
authorization=authorization,
|
|
458
777
|
_request_auth=_request_auth,
|
|
459
778
|
_content_type=_content_type,
|
|
@@ -480,6 +799,9 @@ class OperationsApi:
|
|
|
480
799
|
async def list_operations_without_preload_content(
|
|
481
800
|
self,
|
|
482
801
|
bank_id: StrictStr,
|
|
802
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status: pending, completed, or failed")] = None,
|
|
803
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of operations to return")] = None,
|
|
804
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of operations to skip")] = None,
|
|
483
805
|
authorization: Optional[StrictStr] = None,
|
|
484
806
|
_request_timeout: Union[
|
|
485
807
|
None,
|
|
@@ -496,10 +818,16 @@ class OperationsApi:
|
|
|
496
818
|
) -> RESTResponseType:
|
|
497
819
|
"""List async operations
|
|
498
820
|
|
|
499
|
-
Get a list of
|
|
821
|
+
Get a list of async operations for a specific agent, with optional filtering by status. Results are sorted by most recent first.
|
|
500
822
|
|
|
501
823
|
:param bank_id: (required)
|
|
502
824
|
:type bank_id: str
|
|
825
|
+
:param status: Filter by status: pending, completed, or failed
|
|
826
|
+
:type status: str
|
|
827
|
+
:param limit: Maximum number of operations to return
|
|
828
|
+
:type limit: int
|
|
829
|
+
:param offset: Number of operations to skip
|
|
830
|
+
:type offset: int
|
|
503
831
|
:param authorization:
|
|
504
832
|
:type authorization: str
|
|
505
833
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -526,6 +854,9 @@ class OperationsApi:
|
|
|
526
854
|
|
|
527
855
|
_param = self._list_operations_serialize(
|
|
528
856
|
bank_id=bank_id,
|
|
857
|
+
status=status,
|
|
858
|
+
limit=limit,
|
|
859
|
+
offset=offset,
|
|
529
860
|
authorization=authorization,
|
|
530
861
|
_request_auth=_request_auth,
|
|
531
862
|
_content_type=_content_type,
|
|
@@ -547,6 +878,9 @@ class OperationsApi:
|
|
|
547
878
|
def _list_operations_serialize(
|
|
548
879
|
self,
|
|
549
880
|
bank_id,
|
|
881
|
+
status,
|
|
882
|
+
limit,
|
|
883
|
+
offset,
|
|
550
884
|
authorization,
|
|
551
885
|
_request_auth,
|
|
552
886
|
_content_type,
|
|
@@ -572,6 +906,18 @@ class OperationsApi:
|
|
|
572
906
|
if bank_id is not None:
|
|
573
907
|
_path_params['bank_id'] = bank_id
|
|
574
908
|
# process the query parameters
|
|
909
|
+
if status is not None:
|
|
910
|
+
|
|
911
|
+
_query_params.append(('status', status))
|
|
912
|
+
|
|
913
|
+
if limit is not None:
|
|
914
|
+
|
|
915
|
+
_query_params.append(('limit', limit))
|
|
916
|
+
|
|
917
|
+
if offset is not None:
|
|
918
|
+
|
|
919
|
+
_query_params.append(('offset', offset))
|
|
920
|
+
|
|
575
921
|
# process the header parameters
|
|
576
922
|
if authorization is not None:
|
|
577
923
|
_header_params['authorization'] = authorization
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
# import models into model package
|
|
17
17
|
from hindsight_client_api.models.add_background_request import AddBackgroundRequest
|
|
18
|
+
from hindsight_client_api.models.async_operation_submit_response import AsyncOperationSubmitResponse
|
|
18
19
|
from hindsight_client_api.models.background_response import BackgroundResponse
|
|
19
20
|
from hindsight_client_api.models.bank_list_item import BankListItem
|
|
20
21
|
from hindsight_client_api.models.bank_list_response import BankListResponse
|
|
@@ -25,9 +26,15 @@ from hindsight_client_api.models.cancel_operation_response import CancelOperatio
|
|
|
25
26
|
from hindsight_client_api.models.chunk_data import ChunkData
|
|
26
27
|
from hindsight_client_api.models.chunk_include_options import ChunkIncludeOptions
|
|
27
28
|
from hindsight_client_api.models.chunk_response import ChunkResponse
|
|
29
|
+
from hindsight_client_api.models.consolidation_response import ConsolidationResponse
|
|
28
30
|
from hindsight_client_api.models.create_bank_request import CreateBankRequest
|
|
31
|
+
from hindsight_client_api.models.create_directive_request import CreateDirectiveRequest
|
|
32
|
+
from hindsight_client_api.models.create_mental_model_request import CreateMentalModelRequest
|
|
33
|
+
from hindsight_client_api.models.create_mental_model_response import CreateMentalModelResponse
|
|
29
34
|
from hindsight_client_api.models.delete_document_response import DeleteDocumentResponse
|
|
30
35
|
from hindsight_client_api.models.delete_response import DeleteResponse
|
|
36
|
+
from hindsight_client_api.models.directive_list_response import DirectiveListResponse
|
|
37
|
+
from hindsight_client_api.models.directive_response import DirectiveResponse
|
|
31
38
|
from hindsight_client_api.models.disposition_traits import DispositionTraits
|
|
32
39
|
from hindsight_client_api.models.document_response import DocumentResponse
|
|
33
40
|
from hindsight_client_api.models.entity_detail_response import EntityDetailResponse
|
|
@@ -37,6 +44,7 @@ from hindsight_client_api.models.entity_list_item import EntityListItem
|
|
|
37
44
|
from hindsight_client_api.models.entity_list_response import EntityListResponse
|
|
38
45
|
from hindsight_client_api.models.entity_observation_response import EntityObservationResponse
|
|
39
46
|
from hindsight_client_api.models.entity_state_response import EntityStateResponse
|
|
47
|
+
from hindsight_client_api.models.features_info import FeaturesInfo
|
|
40
48
|
from hindsight_client_api.models.graph_data_response import GraphDataResponse
|
|
41
49
|
from hindsight_client_api.models.http_validation_error import HTTPValidationError
|
|
42
50
|
from hindsight_client_api.models.include_options import IncludeOptions
|
|
@@ -44,19 +52,33 @@ from hindsight_client_api.models.list_documents_response import ListDocumentsRes
|
|
|
44
52
|
from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse
|
|
45
53
|
from hindsight_client_api.models.list_tags_response import ListTagsResponse
|
|
46
54
|
from hindsight_client_api.models.memory_item import MemoryItem
|
|
55
|
+
from hindsight_client_api.models.mental_model_list_response import MentalModelListResponse
|
|
56
|
+
from hindsight_client_api.models.mental_model_response import MentalModelResponse
|
|
57
|
+
from hindsight_client_api.models.mental_model_trigger import MentalModelTrigger
|
|
47
58
|
from hindsight_client_api.models.operation_response import OperationResponse
|
|
59
|
+
from hindsight_client_api.models.operation_status_response import OperationStatusResponse
|
|
48
60
|
from hindsight_client_api.models.operations_list_response import OperationsListResponse
|
|
49
61
|
from hindsight_client_api.models.recall_request import RecallRequest
|
|
50
62
|
from hindsight_client_api.models.recall_response import RecallResponse
|
|
51
63
|
from hindsight_client_api.models.recall_result import RecallResult
|
|
64
|
+
from hindsight_client_api.models.reflect_based_on import ReflectBasedOn
|
|
65
|
+
from hindsight_client_api.models.reflect_directive import ReflectDirective
|
|
52
66
|
from hindsight_client_api.models.reflect_fact import ReflectFact
|
|
53
67
|
from hindsight_client_api.models.reflect_include_options import ReflectIncludeOptions
|
|
68
|
+
from hindsight_client_api.models.reflect_llm_call import ReflectLLMCall
|
|
69
|
+
from hindsight_client_api.models.reflect_mental_model import ReflectMentalModel
|
|
54
70
|
from hindsight_client_api.models.reflect_request import ReflectRequest
|
|
55
71
|
from hindsight_client_api.models.reflect_response import ReflectResponse
|
|
72
|
+
from hindsight_client_api.models.reflect_tool_call import ReflectToolCall
|
|
73
|
+
from hindsight_client_api.models.reflect_trace import ReflectTrace
|
|
56
74
|
from hindsight_client_api.models.retain_request import RetainRequest
|
|
57
75
|
from hindsight_client_api.models.retain_response import RetainResponse
|
|
58
76
|
from hindsight_client_api.models.tag_item import TagItem
|
|
59
77
|
from hindsight_client_api.models.token_usage import TokenUsage
|
|
78
|
+
from hindsight_client_api.models.tool_calls_include_options import ToolCallsIncludeOptions
|
|
79
|
+
from hindsight_client_api.models.update_directive_request import UpdateDirectiveRequest
|
|
60
80
|
from hindsight_client_api.models.update_disposition_request import UpdateDispositionRequest
|
|
81
|
+
from hindsight_client_api.models.update_mental_model_request import UpdateMentalModelRequest
|
|
61
82
|
from hindsight_client_api.models.validation_error import ValidationError
|
|
62
83
|
from hindsight_client_api.models.validation_error_loc_inner import ValidationErrorLocInner
|
|
84
|
+
from hindsight_client_api.models.version_response import VersionResponse
|
|
@@ -24,10 +24,10 @@ from typing_extensions import Self
|
|
|
24
24
|
|
|
25
25
|
class AddBackgroundRequest(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
Request model for adding/merging background information.
|
|
27
|
+
Request model for adding/merging background information. Deprecated: use SetMissionRequest instead.
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
content: StrictStr = Field(description="New background information to add or merge")
|
|
30
|
-
update_disposition: Optional[StrictBool] = Field(default=True, description="
|
|
30
|
+
update_disposition: Optional[StrictBool] = Field(default=True, description="Deprecated - disposition is no longer auto-inferred from mission")
|
|
31
31
|
__properties: ClassVar[List[str]] = ["content", "update_disposition"]
|
|
32
32
|
|
|
33
33
|
model_config = ConfigDict(
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AsyncOperationSubmitResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Response model for submitting an async operation.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
operation_id: StrictStr
|
|
30
|
+
status: StrictStr
|
|
31
|
+
__properties: ClassVar[List[str]] = ["operation_id", "status"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of AsyncOperationSubmitResponse from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of AsyncOperationSubmitResponse from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"operation_id": obj.get("operation_id"),
|
|
85
|
+
"status": obj.get("status")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -25,11 +25,12 @@ from typing_extensions import Self
|
|
|
25
25
|
|
|
26
26
|
class BackgroundResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
Response model for background update.
|
|
28
|
+
Response model for background update. Deprecated: use MissionResponse instead.
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
|
|
30
|
+
mission: StrictStr
|
|
31
|
+
background: Optional[StrictStr] = None
|
|
31
32
|
disposition: Optional[DispositionTraits] = None
|
|
32
|
-
__properties: ClassVar[List[str]] = ["background", "disposition"]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["mission", "background", "disposition"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
36
|
populate_by_name=True,
|
|
@@ -73,6 +74,11 @@ class BackgroundResponse(BaseModel):
|
|
|
73
74
|
# override the default output from pydantic by calling `to_dict()` of disposition
|
|
74
75
|
if self.disposition:
|
|
75
76
|
_dict['disposition'] = self.disposition.to_dict()
|
|
77
|
+
# set to None if background (nullable) is None
|
|
78
|
+
# and model_fields_set contains the field
|
|
79
|
+
if self.background is None and "background" in self.model_fields_set:
|
|
80
|
+
_dict['background'] = None
|
|
81
|
+
|
|
76
82
|
# set to None if disposition (nullable) is None
|
|
77
83
|
# and model_fields_set contains the field
|
|
78
84
|
if self.disposition is None and "disposition" in self.model_fields_set:
|
|
@@ -90,6 +96,7 @@ class BackgroundResponse(BaseModel):
|
|
|
90
96
|
return cls.model_validate(obj)
|
|
91
97
|
|
|
92
98
|
_obj = cls.model_validate({
|
|
99
|
+
"mission": obj.get("mission"),
|
|
93
100
|
"background": obj.get("background"),
|
|
94
101
|
"disposition": DispositionTraits.from_dict(obj["disposition"]) if obj.get("disposition") is not None else None
|
|
95
102
|
})
|