API Reference¶
This reference is generated from the public modules in the current package. RFCs may describe planned behavior that is not part of this API.
Composition¶
Explicit public composition root for PowerContext components.
Artifacts
¶
Bases: BaseModel
Compose shared Artifact persistence and read operations.
Source code in src/powercontext/context.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
add(draft)
async
¶
Commit an initial Artifact Revision without semantic generation.
Source code in src/powercontext/context.py
73 74 75 76 | |
get(artifact)
async
¶
Return the canonical exact Revision matching artifact.
Source code in src/powercontext/context.py
90 91 92 93 | |
latest(artifact)
async
¶
Return the latest visible Revision of artifact.
Source code in src/powercontext/context.py
95 96 97 98 | |
revise(artifact, draft)
async
¶
Commit a Revision using artifact as the optimistic base.
Source code in src/powercontext/context.py
78 79 80 81 82 83 84 85 86 87 88 | |
revisions(artifact)
async
¶
Return the visible history of artifact.
Source code in src/powercontext/context.py
100 101 102 103 | |
PowerContext
¶
Bases: BaseModel, Generic[SourcesT, ArtifactsT, TriggersT]
Bind three explicitly selected component groups without owning their lifecycle.
Source code in src/powercontext/context.py
18 19 20 21 22 23 24 25 | |
Sources
¶
Bases: BaseModel
Compose Source acquisition, persistence, and read operations.
Source code in src/powercontext/context.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
add(source)
async
¶
Persist a resolved Source without deriving Artifacts.
Source code in src/powercontext/context.py
41 42 43 44 45 46 47 | |
get(source)
async
¶
Return the canonical persisted Source matching source.
Source code in src/powercontext/context.py
49 50 51 52 | |
list()
async
¶
Return the Sources visible in the current catalog view.
Source code in src/powercontext/context.py
54 55 56 57 | |
read(source)
async
¶
Read the adapter-native value described by source.
Source code in src/powercontext/context.py
59 60 61 62 | |
resolve(value)
async
¶
Resolve an adapter-native input without persisting it.
Source code in src/powercontext/context.py
36 37 38 39 | |
Sources¶
Source
¶
Bases: BaseModel
Base value for an adapter-owned Source description.
Source code in src/powercontext/sources/models.py
31 32 33 34 35 36 | |
SourceAdapter
¶
Bases: Protocol[InputT, SourceT, ValueT_co]
Resolve one exact input class and read one concrete Source class.
Source code in src/powercontext/sources/adapters.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
input_class
instance-attribute
¶
The exact input class accepted by this adapter.
name
instance-attribute
¶
The stable registration name for this adapter.
source_class
instance-attribute
¶
The exact Source class produced and read by this adapter.
read(source)
async
¶
Read the adapter-native value described by a Source.
Source code in src/powercontext/sources/adapters.py
29 30 31 32 | |
resolve(value)
async
¶
Resolve an adapter-native value without changing a catalog.
Source code in src/powercontext/sources/adapters.py
24 25 26 27 | |
SourceCatalog
¶
A read-only Source catalog routed by actual adapters.
Source code in src/powercontext/sources/catalog.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
SourceCatalogBackend
¶
Bases: Protocol
Provide the Source reads required by SourceCatalog.
Source code in src/powercontext/sources/protocols.py
17 18 19 20 21 22 23 24 25 26 | |
list()
async
¶
Return the Sources visible in one backend view.
Source code in src/powercontext/sources/protocols.py
23 24 25 26 | |
SourceMaterialization
¶
Bases: StrEnum
Describe where the value read for a Source comes from.
Source code in src/powercontext/sources/models.py
11 12 13 14 15 | |
SourceRef
¶
Bases: BaseModel
A stable reference to one Source in the current catalog view.
Source code in src/powercontext/sources/models.py
18 19 20 21 22 23 24 25 26 27 28 | |
SourceStore
¶
Bases: Protocol[SourceT]
Persist resolved Sources for later catalog reads and lineage.
Source code in src/powercontext/sources/protocols.py
10 11 12 13 14 | |
Artifacts¶
Immutable artifacts and their read-only catalog contract.
Artifact
¶
Bases: BaseModel, Generic[ContentT]
An immutable snapshot in an artifact lifecycle.
Source code in src/powercontext/artifacts/models.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
as_ref()
¶
Return an exact reference to this revision.
Source code in src/powercontext/artifacts/models.py
76 77 78 79 | |
ArtifactCatalog
¶
Bases: Protocol[ArtifactT]
Read artifact revisions without owning their writes.
Source code in src/powercontext/artifacts/protocols.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
get(artifact)
async
¶
Return the canonical exact revision matching artifact.
Source code in src/powercontext/artifacts/protocols.py
17 18 19 20 | |
latest(artifact)
async
¶
Return the latest visible revision of artifact.
Source code in src/powercontext/artifacts/protocols.py
22 23 24 25 | |
revisions(artifact)
async
¶
Return the visible history of artifact in ascending revision order.
Source code in src/powercontext/artifacts/protocols.py
27 28 29 30 | |
ArtifactDraft
¶
Bases: BaseModel, Generic[ContentT]
Content and complete evidence supplied for one Artifact write.
Source code in src/powercontext/artifacts/models.py
40 41 42 43 44 45 46 47 48 49 50 51 52 | |
ArtifactLineage
¶
Bases: BaseModel
The direct evidence used to produce one artifact revision.
Source code in src/powercontext/artifacts/models.py
33 34 35 36 37 | |
ArtifactRef
¶
Bases: BaseModel
A stable reference to one exact artifact revision.
Source code in src/powercontext/artifacts/models.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
ArtifactStore
¶
Bases: Protocol[DraftT_contra, ArtifactT]
Commit new Artifact revisions from complete domain objects.
Source code in src/powercontext/artifacts/protocols.py
33 34 35 36 37 38 39 40 41 42 43 44 45 | |
add(draft)
async
¶
Commit the first revision represented by draft.
Source code in src/powercontext/artifacts/protocols.py
37 38 39 40 | |
revise(artifact, draft)
async
¶
Commit draft only if artifact remains the latest revision.
Source code in src/powercontext/artifacts/protocols.py
42 43 44 45 | |
Memory¶
Artifact-native Memory domain and service contracts.
CandidatePipeline
¶
Bases: Protocol
Produce untrusted Memory candidates from canonical bounded evidence.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
79 80 81 82 83 84 85 | |
extract(request)
async
¶
Return candidates that still require all service validations.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
82 83 84 85 | |
DefaultMemoryEvidenceProjector
¶
Expose only stable public evidence metadata unless a caller opts in to more.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
EmbeddingProfile
¶
Bases: BaseModel
The Memory embedding index contract for one deployment.
Source code in src/powercontext/builtin/artifacts/memory/models.py
20 21 22 23 24 25 26 27 | |
LLMMemoryCandidatePipeline
¶
Map schema-valid model proposals back to exact bounded domain values.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
extract(request)
async
¶
Generate and map candidates that still require MemoryService validation.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
LLMMemoryReranker
¶
Use one structured listwise generation request to select Memory hits.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
rerank(query, candidates, limit)
async
¶
Generate and normalize a sparse selection from the coarse ranks.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
Memory
¶
Bases: Artifact[MemoryContent]
An immutable snapshot in a Memory lifecycle.
Source code in src/powercontext/builtin/artifacts/memory/models.py
76 77 78 79 | |
MemoryBackend
¶
Bases: Protocol
Storage and retrieval capabilities required by the Memory Family.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
begin()
¶
Open the adapter-specific atomic write boundary.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
130 131 132 133 | |
capabilities()
async
¶
Return probed deployment capabilities.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
100 101 102 103 | |
changes(memory, since_revision)
async
¶
Read compact Revision changes without entry bodies.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
135 136 137 138 139 140 141 142 143 | |
entries(memory)
async
¶
Load the entry versions referenced by an exact manifest.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
115 116 117 118 | |
expand(hits)
async
¶
Load and validate exact versions anchored by hits.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
160 161 162 163 | |
get(memory)
async
¶
Load one exact Memory Revision.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
105 106 107 108 | |
latest(artifact_id)
async
¶
Load the current head of one Memory identity.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
110 111 112 113 | |
projections(memory)
async
¶
Load rebuildable active-head projections for an exact Memory Revision.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
120 121 122 123 | |
rebuild_projections(embedding_model=None)
async
¶
Rebuild active-head and search projections from authoritative revisions.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
125 126 127 128 | |
search(request)
async
¶
Return backend-ordered FTS/vector channels after manifest checks.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
155 156 157 158 | |
vector_complete(memories, profile)
async
¶
Derive fixed-profile vector completeness for selected heads.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
145 146 147 148 149 150 151 152 153 | |
MemoryBackendConfigurationError
¶
Bases: MemoryLayerError, RuntimeError
Raised when a repository cannot satisfy its declared configuration.
Source code in src/powercontext/builtin/artifacts/memory/errors.py
84 85 | |
MemoryCandidateRequest
¶
Bases: BaseModel
Canonical evidence and bounded current entries offered to a pipeline.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
26 27 28 29 30 31 | |
MemoryCapabilities
¶
Bases: BaseModel
Backend features available for the configured deployment.
Source code in src/powercontext/builtin/artifacts/memory/models.py
30 31 32 33 34 35 36 | |
MemoryChange
¶
Bases: BaseModel
A compact entry change recorded by one Memory Revision.
Source code in src/powercontext/builtin/artifacts/memory/models.py
55 56 57 58 59 60 61 62 | |
MemoryChannelHit
¶
Bases: BaseModel
An identity-preserving candidate returned by one search channel.
Source code in src/powercontext/builtin/artifacts/memory/models.py
116 117 118 119 120 121 122 123 | |
MemoryCitation
¶
Bases: BaseModel
A stable Handoff anchor for one exact entry version.
Source code in src/powercontext/builtin/artifacts/memory/models.py
157 158 159 160 161 162 | |
MemoryCommit
¶
Bases: BaseModel
A complete Memory Revision and every row changed atomically with it.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
43 44 45 46 47 48 49 50 | |
MemoryContent
¶
Bases: BaseModel
The complete canonical content of one Memory Artifact Revision.
Source code in src/powercontext/builtin/artifacts/memory/models.py
65 66 67 68 69 70 71 72 73 | |
MemoryEntryInput
¶
Bases: BaseModel
An untrusted proposed entry addition or content revision.
Source code in src/powercontext/builtin/artifacts/memory/models.py
82 83 84 85 86 87 88 89 90 | |
MemoryEntryVersion
¶
Bases: BaseModel
One immutable version of a logical Memory entry.
Source code in src/powercontext/builtin/artifacts/memory/models.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
MemoryEvidenceProjector
¶
Bases: Protocol
Project adapter-owned evidence values into explicit JSON-visible content.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
64 65 66 67 68 69 70 71 72 73 74 75 | |
project_artifact(artifact)
¶
Return the stable JSON projection exposed to the model.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
72 73 74 75 | |
project_source(source)
¶
Return the stable JSON projection exposed to the model.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
67 68 69 70 | |
MemoryExtractionCandidate
¶
Bases: BaseModel
One model-proposed addition or revision with operation-local citations.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
47 48 49 50 51 52 53 54 55 | |
MemoryExtractionCurrentEntry
¶
Bases: BaseModel
One active entry from the selected Memory head.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
32 33 34 35 36 37 | |
MemoryExtractionEvidence
¶
Bases: BaseModel
One operation-local evidence value visible to the generator.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
24 25 26 27 28 29 | |
MemoryExtractionInput
¶
Bases: BaseModel
Only bounded operation evidence and active current entries.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
40 41 42 43 44 | |
MemoryExtractionOutput
¶
Bases: BaseModel
Schema-bound Memory extraction output; an empty tuple is a no-op.
Source code in src/powercontext/builtin/artifacts/memory/extraction.py
58 59 60 61 | |
MemoryExtractionProfile
¶
Bases: StrEnum
Stable built-in policies for selecting Memory from bounded evidence.
Source code in src/powercontext/builtin/artifacts/memory/prompts.py
6 7 8 9 10 | |
MemoryHit
¶
Bases: BaseModel
A fused retrieval result anchored to exact Memory content.
Source code in src/powercontext/builtin/artifacts/memory/models.py
126 127 128 129 130 131 132 133 134 | |
MemoryLayerError
¶
Bases: PowerContextError
Base exception for Memory domain and repository failures.
Source code in src/powercontext/builtin/artifacts/memory/errors.py
6 7 | |
MemoryManifest
¶
Bases: BaseModel
The authoritative directory for one Memory Revision.
Source code in src/powercontext/builtin/artifacts/memory/models.py
48 49 50 51 52 | |
MemoryManifestEntry
¶
Bases: BaseModel
One logical entry pointer and state in an immutable Revision.
Source code in src/powercontext/builtin/artifacts/memory/models.py
39 40 41 42 43 44 45 | |
MemoryProjection
¶
Bases: BaseModel
A rebuildable active-head projection prepared outside a transaction.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
34 35 36 37 38 39 40 | |
MemoryRerankCandidate
¶
Bases: _StrictModel
One identity-preserving coarse candidate exposed to the model.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
44 45 46 47 48 | |
MemoryRerankDecision
dataclass
¶
A validated sparse selection and its portable inference metadata.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
65 66 67 68 69 70 71 72 | |
MemoryRerankInput
¶
Bases: _StrictModel
One query and its bounded listwise candidate pool.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
51 52 53 54 55 56 | |
MemoryRerankMode
¶
Bases: StrEnum
Deployment-selectable Memory reranking policies.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
33 34 35 36 37 | |
MemoryRerankOutput
¶
Bases: _StrictModel
Original coarse ranks selected in descending answer utility.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
59 60 61 62 | |
MemoryRerankTrace
¶
Bases: BaseModel
Observable listwise selection over one coarse retrieval pool.
Source code in src/powercontext/builtin/artifacts/memory/models.py
137 138 139 140 141 142 143 144 145 146 | |
MemoryReranker
¶
Bases: Protocol
Select final Memory hits from one already ordered coarse pool.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
rerank(query, candidates, limit)
async
¶
Return validated original ranks without changing hit identity.
Source code in src/powercontext/builtin/artifacts/memory/reranking.py
80 81 82 83 84 85 86 87 88 89 | |
MemoryRevisionChanges
¶
Bases: BaseModel
The compact changes stored by one exact Memory Revision.
Source code in src/powercontext/builtin/artifacts/memory/models.py
109 110 111 112 113 | |
MemorySearchChannels
¶
Bases: BaseModel
Backend-internal channel rankings before shared fusion.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
72 73 74 75 76 | |
MemorySearchRequest
¶
Bases: BaseModel
A fully validated backend search request for explicit current heads.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
60 61 62 63 64 65 66 67 68 69 | |
MemorySearchResult
¶
Bases: BaseModel
Search hits together with the mode actually executed.
Source code in src/powercontext/builtin/artifacts/memory/models.py
149 150 151 152 153 154 | |
MemoryService
¶
Validate and orchestrate Memory operations without exposing storage details.
Source code in src/powercontext/builtin/artifacts/memory/service.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 | |
apply(plan)
async
¶
Apply one prepared write through this service's transaction boundary.
Source code in src/powercontext/builtin/artifacts/memory/service.py
252 253 254 255 256 257 258 259 260 261 | |
changes(memory, *, since_revision=None)
async
¶
Read compact change summaries without expanding entry bodies.
Source code in src/powercontext/builtin/artifacts/memory/service.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
entries(memory)
async
¶
Return the entry objects referenced by one exact current Memory head.
Source code in src/powercontext/builtin/artifacts/memory/service.py
494 495 496 497 498 | |
expand(hits, *, layer='full')
async
¶
Expand exact hit anchors and reject cross-Revision substitutions.
Source code in src/powercontext/builtin/artifacts/memory/service.py
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | |
forget(memory, *, entries, reason=None)
async
¶
Deactivate logical entries without deleting immutable content.
Source code in src/powercontext/builtin/artifacts/memory/service.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
get(memory)
async
¶
Return the canonical exact Memory Revision matching memory.
Source code in src/powercontext/builtin/artifacts/memory/service.py
151 152 153 154 | |
head(artifact_id)
async
¶
Return the current Memory head by its stable Artifact identity.
Source code in src/powercontext/builtin/artifacts/memory/service.py
176 177 178 179 | |
latest(memory)
async
¶
Return the current head of the same Memory identity.
Source code in src/powercontext/builtin/artifacts/memory/service.py
156 157 158 159 160 | |
organize(memory, *, mode='default')
async
¶
Apply only exact deduplication and canonical normalization.
Source code in src/powercontext/builtin/artifacts/memory/service.py
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
plan_remember(*, memory, sources=(), artifacts=(), entries=(), mode='auto')
async
¶
Validate and prepare a write without mutating authoritative storage.
Source code in src/powercontext/builtin/artifacts/memory/service.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | |
reactivate(memory, *, entries, reason=None)
async
¶
Restore inactive logical entries without creating body versions.
Source code in src/powercontext/builtin/artifacts/memory/service.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
rebuild_projections(embedding_model=None)
async
¶
Rebuild current-head search projections from authoritative Memory revisions.
Source code in src/powercontext/builtin/artifacts/memory/service.py
500 501 502 503 | |
remember(*, memory, sources=(), artifacts=(), entries=(), mode='auto')
async
¶
Append or extract validated entry changes against one exact head.
Source code in src/powercontext/builtin/artifacts/memory/service.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
revision(memory)
async
¶
Return one exact Memory Revision by its stable reference.
Source code in src/powercontext/builtin/artifacts/memory/service.py
181 182 183 184 | |
revisions(memory)
async
¶
Return the visible Memory history in ascending Revision order.
Source code in src/powercontext/builtin/artifacts/memory/service.py
162 163 164 165 166 167 168 169 170 171 172 173 174 | |
search(query, *, memories, limit=10, mode='auto')
async
¶
Search explicit current Memory heads with capability-safe fallback.
Source code in src/powercontext/builtin/artifacts/memory/service.py
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | |
validate_citation(citation)
async
¶
Resolve one exact Handoff citation.
Source code in src/powercontext/builtin/artifacts/memory/service.py
505 506 507 508 509 510 511 512 513 514 515 516 | |
MemoryUnitOfWork
¶
Bases: Protocol
Commit authoritative and projection rows in one backend transaction.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
88 89 90 91 92 93 94 | |
commit(value)
async
¶
Validate and atomically commit one complete Revision.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
91 92 93 94 | |
MemoryWritePlan
¶
Bases: BaseModel
A side-effect-free result that can be committed in an outer transaction.
Source code in src/powercontext/builtin/artifacts/memory/protocols.py
53 54 55 56 57 | |
memory_extraction_instructions(profile)
¶
Return the Core-owned instructions for one validated profile.
Source code in src/powercontext/builtin/artifacts/memory/prompts.py
75 76 77 78 | |
memory_extraction_instructions_version(profile)
¶
Return the stable instruction identity for one validated profile.
Source code in src/powercontext/builtin/artifacts/memory/prompts.py
81 82 83 84 | |
Triggers¶
Pure Trigger contracts for integration-owned runtimes.
PolicyTransition
¶
Bases: BaseModel, Generic[StateT, ActionT_co]
The complete result of one pure Trigger activation.
Source code in src/powercontext/triggers/models.py
13 14 15 16 17 | |
Trigger
¶
Bases: Protocol[SignalT_contra, StateT, ActionT_co]
Map one signal and activation state to a pure transition.
Source code in src/powercontext/triggers/protocols.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
activate(signal, state)
¶
Evaluate a signal without persisting state or executing actions.
Source code in src/powercontext/triggers/protocols.py
22 23 24 25 26 27 28 29 30 | |
initial_state()
¶
Return the state used before the first activation.
Source code in src/powercontext/triggers/protocols.py
17 18 19 20 | |
Errors¶
Stable failures raised by PowerContext.
ArtifactError
¶
Bases: PowerContextError
Base exception for Artifact lookup and lifecycle failures.
Source code in src/powercontext/errors.py
88 89 | |
ArtifactFamilyMismatchError
¶
Bases: ArtifactError, ValueError
Raised when a Revision and Draft belong to different families.
Source code in src/powercontext/errors.py
109 110 111 112 113 114 115 | |
ArtifactNotFoundError
¶
Bases: ArtifactError, LookupError
Raised when an Artifact object is absent from a catalog.
Source code in src/powercontext/errors.py
92 93 94 95 96 97 | |
InvalidArtifactReferenceError
¶
Bases: ArtifactError, ValueError
Raised when an Artifact reference has an invalid identity or revision.
Source code in src/powercontext/errors.py
100 101 102 103 104 105 106 | |
InvalidSourceAdapterError
¶
Bases: SourceError, TypeError
Raised when an adapter does not satisfy the structural Source contract.
Source code in src/powercontext/errors.py
31 32 33 34 35 36 37 38 | |
InvalidSourceEntryError
¶
Bases: SourceError, TypeError
Raised when a catalog entry is not a Source value.
Source code in src/powercontext/errors.py
60 61 62 63 64 65 | |
InvalidSourceReferenceError
¶
Bases: SourceError, ValueError
Raised when a Source cannot produce a reference required by its contract.
Source code in src/powercontext/errors.py
51 52 53 54 55 56 57 | |
InvalidSourceResultError
¶
Bases: SourceError, TypeError
Raised when an adapter returns a Source outside its declaration.
Source code in src/powercontext/errors.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
PowerContextError
¶
Bases: Exception
Base exception for stable PowerContext failures.
Source code in src/powercontext/errors.py
6 7 | |
RevisionConflictError
¶
Bases: ArtifactError, RuntimeError
Raised when an Artifact write is based on a stale object.
Source code in src/powercontext/errors.py
118 119 120 121 122 123 124 | |
SourceAdapterNotFoundError
¶
Bases: SourceError, LookupError
Raised when no adapter owns an exact input or Source class.
Source code in src/powercontext/errors.py
22 23 24 25 26 27 28 | |
SourceConflictError
¶
Bases: SourceError, ValueError
Raised when immutable catalog routing would be ambiguous.
Source code in src/powercontext/errors.py
41 42 43 44 45 46 47 48 | |
SourceError
¶
Bases: PowerContextError
Base exception for Source adapter and access failures.
Source code in src/powercontext/errors.py
10 11 | |
SourceNotFoundError
¶
Bases: SourceError, LookupError
Raised when a Source object is absent from a catalog.
Source code in src/powercontext/errors.py
14 15 16 17 18 19 | |
HTTP models¶
Python Client SDK¶
Python Client SDK package for the public PowerContext HTTP API.
ClientError
¶
Bases: PowerContextError
Base exception for remote Client SDK failures.
Source code in src/powercontext/client/errors.py
8 9 10 11 | |
InvalidResponseError
¶
Bases: ClientError
Raised when a successful response violates the public schema.
Source code in src/powercontext/client/errors.py
22 23 24 25 26 27 28 | |
PowerContextClient
¶
Async Python facade for transport-level Server operations.
Source code in src/powercontext/client/client.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | |
aclose()
async
¶
Close only the HTTP client created by this facade.
Source code in src/powercontext/client/client.py
184 185 186 187 188 | |
activate_handoff(request)
async
¶
Evaluate the standard Handoff Trigger at one Source boundary.
Source code in src/powercontext/client/client.py
399 400 401 402 | |
approve_artifact_candidate(request)
async
¶
Approve the exact current Candidate version.
Source code in src/powercontext/client/client.py
504 505 506 507 | |
attach_handoff_report_workspace(request)
async
¶
Attach a Workspace to an exact Report Project using CAS.
Source code in src/powercontext/client/client.py
298 299 300 301 302 303 304 | |
capture_content_source(request)
async
¶
Capture raw content as durable Source evidence.
Source code in src/powercontext/client/client.py
369 370 371 372 | |
commit_handoff(request)
async
¶
Commit one finalized Handoff as a durable milestone.
Source code in src/powercontext/client/client.py
409 410 411 412 | |
continue_handoff(request)
async
¶
Resolve temporary or committed Handoff content as untrusted history.
Source code in src/powercontext/client/client.py
414 415 416 417 | |
create_handoff_report_project(request)
async
¶
Create one explicit Report Project.
Source code in src/powercontext/client/client.py
210 211 212 213 214 215 216 | |
detach_handoff_report_workspace(request)
async
¶
Detach a Workspace binding using its exact version.
Source code in src/powercontext/client/client.py
306 307 308 309 310 311 312 | |
download_handoff_report(request)
async
¶
Download a Markdown or canonical JSON report file.
Source code in src/powercontext/client/client.py
323 324 325 326 327 | |
finalize_handoff(request)
async
¶
Finalize an inspected Handoff Draft for direct transfer.
Source code in src/powercontext/client/client.py
404 405 406 407 | |
flush_memory(request)
async
¶
Run one bounded Source-to-Memory activation.
Source code in src/powercontext/client/client.py
374 375 376 377 | |
generate_experience(request)
async
¶
Generate a reviewed Experience Candidate from exact evidence.
Source code in src/powercontext/client/client.py
449 450 451 452 | |
generate_skill(request)
async
¶
Generate a reviewed managed Skill Candidate from explicit provenance.
Source code in src/powercontext/client/client.py
464 465 466 467 | |
get_artifact_candidate(request)
async
¶
Read the current head of one Candidate.
Source code in src/powercontext/client/client.py
499 500 501 502 | |
get_capabilities()
async
¶
Read behavior enabled by the assembled runtime.
Source code in src/powercontext/client/client.py
200 201 202 203 | |
get_experience(request)
async
¶
Read one exact approved Experience Revision.
Source code in src/powercontext/client/client.py
454 455 456 457 | |
get_handoff_report(request)
async
¶
Generate the current canonical Handoff Report projection.
Source code in src/powercontext/client/client.py
314 315 316 317 318 319 320 321 | |
get_handoff_report_project(request)
async
¶
Read one current Report Project descriptor.
Source code in src/powercontext/client/client.py
218 219 220 221 222 223 224 | |
get_handoff_report_workspace(request)
async
¶
Read one confirmed Workspace-to-Project binding.
Source code in src/powercontext/client/client.py
290 291 292 293 294 295 296 | |
get_liveness()
async
¶
Read process liveness.
Source code in src/powercontext/client/client.py
190 191 192 193 | |
get_memory_entry(request)
async
¶
Read one exact Memory entry version.
Source code in src/powercontext/client/client.py
424 425 426 427 | |
get_readiness()
async
¶
Read deployment readiness checks.
Source code in src/powercontext/client/client.py
195 196 197 198 | |
get_skill(request)
async
¶
Read one exact approved managed Skill Revision.
Source code in src/powercontext/client/client.py
469 470 471 472 | |
get_stats(request)
async
¶
Read current inventory and bounded usage for one scope.
Source code in src/powercontext/client/client.py
205 206 207 208 | |
import_external_skill(request)
async
¶
Snapshot an exact external package and propose a new managed Skill.
Source code in src/powercontext/client/client.py
489 490 491 492 | |
list_artifact_candidates(request)
async
¶
Page current Candidate heads in the Review Inbox.
Source code in src/powercontext/client/client.py
494 495 496 497 | |
list_external_skills(request)
async
¶
List external Skills after live local availability checks.
Source code in src/powercontext/client/client.py
479 480 481 482 | |
list_handoff_report_activities(request)
async
¶
List one frozen cursor page of Report-owned Activities.
Source code in src/powercontext/client/client.py
274 275 276 277 278 279 280 | |
list_handoff_report_projects(request)
async
¶
List Report Projects with cursor pagination.
Source code in src/powercontext/client/client.py
234 235 236 237 238 239 240 | |
list_handoff_report_workstreams(request)
async
¶
List Workstreams belonging to one Report Project.
Source code in src/powercontext/client/client.py
250 251 252 253 254 255 256 | |
list_memory_changes(request)
async
¶
Read compact Memory Revision changes.
Source code in src/powercontext/client/client.py
439 440 441 442 | |
list_memory_entries(request)
async
¶
List active entries, optionally including inactive entries for audit.
Source code in src/powercontext/client/client.py
419 420 421 422 | |
prepare_context(request)
async
¶
Prepare final bounded context for one Agent turn.
Source code in src/powercontext/client/client.py
389 390 391 392 | |
prepare_handoff(request)
async
¶
Generate one inspectable Handoff Draft from exact evidence.
Source code in src/powercontext/client/client.py
394 395 396 397 | |
propose_experience(request)
async
¶
Submit complete Experience content as a pending Candidate.
Source code in src/powercontext/client/client.py
444 445 446 447 | |
propose_skill(request)
async
¶
Submit complete managed Skill content as a pending Candidate.
Source code in src/powercontext/client/client.py
459 460 461 462 | |
purge_handoff_report_activities(request)
async
¶
Purge Report-owned Activities before an observation boundary.
Source code in src/powercontext/client/client.py
282 283 284 285 286 287 288 | |
record_handoff_report_activity(request)
async
¶
Record one explicit Report-owned Activity observation.
Source code in src/powercontext/client/client.py
266 267 268 269 270 271 272 | |
register_handoff_report_workstream(request)
async
¶
Register one existing scope as a Report Workstream.
Source code in src/powercontext/client/client.py
242 243 244 245 246 247 248 | |
reject_artifact_candidate(request)
async
¶
Reject the exact current Candidate version.
Source code in src/powercontext/client/client.py
509 510 511 512 | |
remember_memory(request)
async
¶
Save one explicit Memory entry without creating a Source.
Source code in src/powercontext/client/client.py
379 380 381 382 | |
resolve_external_skill(request)
async
¶
Resolve one exact local external Skill fingerprint without fallback.
Source code in src/powercontext/client/client.py
484 485 486 487 | |
retire_memory_entry(request)
async
¶
Deactivate one exact Memory entry without deleting history.
Source code in src/powercontext/client/client.py
434 435 436 437 | |
revise_artifact_candidate(request)
async
¶
Append a complete replacement Candidate proposal.
Source code in src/powercontext/client/client.py
514 515 516 517 | |
revise_memory_entry(request)
async
¶
Revise one exact active Memory entry.
Source code in src/powercontext/client/client.py
429 430 431 432 | |
scan_external_skills(request)
async
¶
Refresh the configured host-local external Skill Registry.
Source code in src/powercontext/client/client.py
474 475 476 477 | |
search_memory(request)
async
¶
Search active Memory entries in one scope.
Source code in src/powercontext/client/client.py
384 385 386 387 | |
update_handoff_report_project(request)
async
¶
CAS-update one Report Project descriptor.
Source code in src/powercontext/client/client.py
226 227 228 229 230 231 232 | |
update_handoff_report_workstream(request)
async
¶
CAS-update one Report Workstream descriptor.
Source code in src/powercontext/client/client.py
258 259 260 261 262 263 264 | |
ServerResponseError
¶
Bases: ClientError
Raised when the Server returns a non-success status.
Source code in src/powercontext/client/errors.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
TransportError
¶
Bases: ClientError
Raised when no valid HTTP response was received.
Source code in src/powercontext/client/errors.py
14 15 16 17 18 19 | |