codecraftai-agent-kit 1.3.1__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/LICENSE.md +30 -21
  2. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/PKG-INFO +4 -3
  3. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/pyproject.toml +4 -3
  4. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/agent.py +153 -55
  5. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/agentconfiguration.py +3 -16
  6. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/agentkitfactoryprotocol.py +188 -0
  7. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/agentregistry.py +10 -1
  8. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/appcontextpaths.py +65 -0
  9. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/approvalgate.py +95 -32
  10. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/asyncagent.py +13 -8
  11. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/builtins/filereadtool.py +144 -0
  12. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/builtins/filewritetool.py +40 -1
  13. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/builtins/httprequesttool.py +334 -0
  14. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/builtins/shellcommandtool.py +291 -0
  15. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/builtins/workspacepath.py +68 -0
  16. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/circuitbreaker.py +37 -3
  17. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/concurrencybridge.py +13 -3
  18. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/conditionevaluator.py +35 -2
  19. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationlayer.py +12 -1
  20. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationmanager.py +77 -47
  21. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationserializer.py +63 -19
  22. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/debuginspector.py +22 -0
  23. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/degradationmanager.py +40 -3
  24. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/errors.py +162 -0
  25. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/filedeadletterstore.py +3 -1
  26. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/filememorystore.py +42 -6
  27. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/healthmonitor.py +38 -3
  28. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/identifierfilename.py +36 -0
  29. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/inmemorystore.py +24 -3
  30. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmtoolbridge.py +4 -1
  31. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/logexporter.py +2 -5
  32. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memoryindex.py +35 -4
  33. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memorystore.py +32 -2
  34. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/message.py +66 -1
  35. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/messageenvelope.py +16 -1
  36. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/messagingconfiguration.py +3 -11
  37. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/metricsexporter.py +2 -5
  38. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/observabilityconfiguration.py +3 -16
  39. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/observabilitypipeline.py +6 -2
  40. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/adapters/awsplatformadapter.py +38 -9
  41. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/adapters/azureplatformadapter.py +115 -34
  42. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/adapters/gcpplatformadapter.py +30 -10
  43. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/adapters/localplatformadapter.py +60 -4
  44. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/deployment/deploymentdescriptorparser.py +2 -8
  45. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/platformconfiguration.py +14 -20
  46. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/platformdetector.py +18 -14
  47. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/platformruntime.py +65 -19
  48. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/pluginmanager.py +32 -0
  49. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/prompttemplate.py +9 -2
  50. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/prompttemplateregistry.py +6 -4
  51. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/protobufmessageserializer.py +22 -0
  52. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/requestresponsehandler.py +40 -1
  53. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/resiliencepipeline.py +64 -30
  54. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/steps/approvalstep.py +21 -11
  55. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/structuredlogger.py +38 -1
  56. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolschema.py +7 -0
  57. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/traceexporter.py +2 -5
  58. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transportconfiguration.py +58 -11
  59. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transports/grpctransport.py +45 -12
  60. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transports/httptransport.py +84 -16
  61. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transports/websockettransport.py +10 -14
  62. codecraftai_agent_kit-1.4.0/source/packages/ccai/agentkit/versionordering.py +59 -0
  63. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowconfiguration.py +3 -11
  64. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowdefinition.py +50 -1
  65. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowexecutor.py +96 -13
  66. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowregistry.py +5 -3
  67. codecraftai_agent_kit-1.3.1/source/packages/ccai/agentkit/builtins/filereadtool.py +0 -90
  68. codecraftai_agent_kit-1.3.1/source/packages/ccai/agentkit/builtins/httprequesttool.py +0 -169
  69. codecraftai_agent_kit-1.3.1/source/packages/ccai/agentkit/builtins/shellcommandtool.py +0 -190
  70. codecraftai_agent_kit-1.3.1/source/packages/ccai/agentkit/errors.py +0 -95
  71. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/README.rst +0 -0
  72. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/__init__.py +0 -0
  73. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/addressresolver.py +0 -0
  74. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/agentaddress.py +0 -0
  75. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/agentidentity.py +0 -0
  76. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/agentstatemachine.py +0 -0
  77. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/alternateproviderstrategy.py +0 -0
  78. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/approvalrequest.py +0 -0
  79. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/breakpoint.py +0 -0
  80. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/builtinagentmetrics.py +0 -0
  81. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/builtins/__init__.py +0 -0
  82. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/cachedresultstrategy.py +0 -0
  83. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/checkpointmanager.py +0 -0
  84. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/circuitbreakerconfiguration.py +0 -0
  85. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/circuitbreakerevent.py +0 -0
  86. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/circuitbreakerhealthcheck.py +0 -0
  87. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/circuitbreakerregistry.py +0 -0
  88. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/circuitbreakerstate.py +0 -0
  89. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/clearcacheaction.py +0 -0
  90. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/concurrencymodel.py +0 -0
  91. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationchangeevent.py +0 -0
  92. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationerrors.py +0 -0
  93. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationlayersource.py +0 -0
  94. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationschema.py +0 -0
  95. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationschemafield.py +0 -0
  96. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/configurationvalidationresult.py +0 -0
  97. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/contextsummarizer.py +0 -0
  98. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/contextwindow.py +0 -0
  99. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/contextwindowstrategy.py +0 -0
  100. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/correlationcontext.py +0 -0
  101. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/costestimate.py +0 -0
  102. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/costtracker.py +0 -0
  103. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/deadletterentry.py +0 -0
  104. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/deadletterquery.py +0 -0
  105. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/deadletterqueue.py +0 -0
  106. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/deadletterstore.py +0 -0
  107. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/debugsession.py +0 -0
  108. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/defaultvaluestrategy.py +0 -0
  109. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/degradationchangeevent.py +0 -0
  110. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/degradationlevel.py +0 -0
  111. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/degradationpolicy.py +0 -0
  112. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/degradationstrategy.py +0 -0
  113. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/embeddingprovider.py +0 -0
  114. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/executionrecord.py +0 -0
  115. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/executionrecorder.py +0 -0
  116. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/executionrecording.py +0 -0
  117. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/executionreplayer.py +0 -0
  118. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/expirationpolicy.py +0 -0
  119. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/fallbackchain.py +0 -0
  120. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/featureflag.py +0 -0
  121. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/featureflagevaluator.py +0 -0
  122. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/featureflagregistry.py +0 -0
  123. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/healthcheck.py +0 -0
  124. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/healthcheckregistry.py +0 -0
  125. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/healthstatus.py +0 -0
  126. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/hotreloadmonitor.py +0 -0
  127. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/hotreloadpolicy.py +0 -0
  128. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/inmemorydeadletterstore.py +0 -0
  129. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/jsonmessageserializer.py +0 -0
  130. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/jsonoutputparser.py +0 -0
  131. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/lifecyclestate.py +0 -0
  132. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmconversation.py +0 -0
  133. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmerrors.py +0 -0
  134. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmmessage.py +0 -0
  135. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmprovider.py +0 -0
  136. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmproviderregistry.py +0 -0
  137. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmresponse.py +0 -0
  138. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmstreamchunk.py +0 -0
  139. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/llmstreamhandler.py +0 -0
  140. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/logformatter.py +0 -0
  141. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memoryconfiguration.py +0 -0
  142. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memoryentry.py +0 -0
  143. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memoryerrors.py +0 -0
  144. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memoryquery.py +0 -0
  145. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memoryqueryresult.py +0 -0
  146. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memoryscope.py +0 -0
  147. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memorystorehealthcheck.py +0 -0
  148. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/memorystoreregistry.py +0 -0
  149. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/messagepattern.py +0 -0
  150. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/messagerouter.py +0 -0
  151. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/messageserializer.py +0 -0
  152. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/messageserializerregistry.py +0 -0
  153. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/messagingerrors.py +0 -0
  154. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/metricdefinition.py +0 -0
  155. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/metricmeasurement.py +0 -0
  156. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/metricscollector.py +0 -0
  157. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/metricsregistry.py +0 -0
  158. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/metricssnapshot.py +0 -0
  159. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/metrictype.py +0 -0
  160. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/msgpackmessageserializer.py +0 -0
  161. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/observabilityerror.py +0 -0
  162. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/outputparser.py +0 -0
  163. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/outputschema.py +0 -0
  164. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/parallelbranch.py +0 -0
  165. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/__init__.py +0 -0
  166. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/adapters/__init__.py +0 -0
  167. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/adapters/platformadapter.py +0 -0
  168. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/deployment/__init__.py +0 -0
  169. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/deployment/deploymentdescriptor.py +0 -0
  170. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/deployment/deploymentdescriptorprinter.py +0 -0
  171. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/errors.py +0 -0
  172. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/platformserviceregistry.py +0 -0
  173. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/platformtype.py +0 -0
  174. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/services/__init__.py +0 -0
  175. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/services/computeservice.py +0 -0
  176. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/services/invocationresult.py +0 -0
  177. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/services/messagingservice.py +0 -0
  178. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/services/platformservice.py +0 -0
  179. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/services/queuemessage.py +0 -0
  180. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/services/storageobject.py +0 -0
  181. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/platform/services/storageservice.py +0 -0
  182. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/pluginconfiguration.py +0 -0
  183. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/plugindependency.py +0 -0
  184. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/plugindescriptor.py +0 -0
  185. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/pluginlifecyclehook.py +0 -0
  186. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/pluginstatus.py +0 -0
  187. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/pooledagent.py +0 -0
  188. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/pubsubbroker.py +0 -0
  189. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/py.typed +0 -0
  190. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/reconnecttransportaction.py +0 -0
  191. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/regexoutputparser.py +0 -0
  192. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/resetcircuitbreakeraction.py +0 -0
  193. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/resilienceconfiguration.py +0 -0
  194. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/resilienceerrors.py +0 -0
  195. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/retryattempt.py +0 -0
  196. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/retryexecutor.py +0 -0
  197. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/retrypolicy.py +0 -0
  198. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/retryresult.py +0 -0
  199. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/selfhealingaction.py +0 -0
  200. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/selfhealingpolicy.py +0 -0
  201. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/selfhealingresult.py +0 -0
  202. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/stepexecutionstatus.py +0 -0
  203. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/stepresult.py +0 -0
  204. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/steps/__init__.py +0 -0
  205. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/steps/agentstep.py +0 -0
  206. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/steps/llmstep.py +0 -0
  207. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/steps/subworkflowstep.py +0 -0
  208. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/steps/toolstep.py +0 -0
  209. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/structuredlogentry.py +0 -0
  210. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/subscription.py +0 -0
  211. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/threadedagent.py +0 -0
  212. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/tokenusage.py +0 -0
  213. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/tool.py +0 -0
  214. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolchain.py +0 -0
  215. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolchainexecutor.py +0 -0
  216. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolchainresult.py +0 -0
  217. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/tooldescriptor.py +0 -0
  218. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolerrors.py +0 -0
  219. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolexecutor.py +0 -0
  220. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolfactory.py +0 -0
  221. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolregistry.py +0 -0
  222. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/toolresult.py +0 -0
  223. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/tracecontext.py +0 -0
  224. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/traceevent.py +0 -0
  225. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/tracer.py +0 -0
  226. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/tracespan.py +0 -0
  227. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transitionrecord.py +0 -0
  228. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transport.py +0 -0
  229. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transporthealthcheck.py +0 -0
  230. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transportregistry.py +0 -0
  231. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transports/__init__.py +0 -0
  232. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/transports/messagequeuetransport.py +0 -0
  233. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowcheckpoint.py +0 -0
  234. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowcontext.py +0 -0
  235. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowedge.py +0 -0
  236. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowerrors.py +0 -0
  237. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowexecutionstatus.py +0 -0
  238. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowresult.py +0 -0
  239. {codecraftai_agent_kit-1.3.1 → codecraftai_agent_kit-1.4.0}/source/packages/ccai/agentkit/workflowstep.py +0 -0
@@ -1,5 +1,5 @@
1
1
  # Code Craft AI - Source Available License
2
- Version 1.0, October 2026
2
+ Version 1.1, November 2026
3
3
 
4
4
  Copyright (C) 2026, Code Craft AI LLC
5
5
 
@@ -7,12 +7,12 @@ Everyone is permitted to copy and distribute verbatim copies of *This License* d
7
7
 
8
8
  *This License* covers the Python Automation Kit, the full suite of software published by *Licensor* that consists of every `codecraftai-*` package, every `pychestrate` package, and the `pychestrate` server.
9
9
 
10
- *The Software* is source available. Its source code is published so that anyone can read it, learn from it, and use it, but *This License* is not an open source license. *The Software* is free to use for *Non-Commercial Use*. *Commercial Use* is permitted in exchange for a *Usage Fee* that is based on a reasonable estimation of the income derived from *The Software*, as described in section 5. When a company migrates a product or service to *The Software* from another code base, the *Profit* from that product or service is not counted toward the *Usage Fee* for two years, as described in section 5.4. For assurance of costs, a company can disclose its usage and estimated returns to *Licensor* and negotiate a fixed license cost, as described in section 5.10.
10
+ *The Software* is source available. Its source code is published so that anyone can read it, learn from it, and use it, but *This License* is not an open source license. *The Software* is free to use for *Non-Commercial Use*. *Commercial Use* is permitted in exchange for a *Usage Fee* that is based on a reasonable estimation of the income derived from *The Software*, as described in section 5. That estimation starts from *Gross Income*, not net profit, so spending on research and development or other operating expenses does not reduce it. When a company migrates a product or service to *The Software* from another code base, the *Gross Income* from that product or service is not counted toward the *Usage Fee* for two years, as described in section 5.4. For assurance of costs, a company can disclose its usage and estimated returns to *Licensor* and negotiate a fixed license cost, as described in section 5.10.
11
11
 
12
12
  ## 1. Definitions
13
13
 
14
14
  ### 1.1 *This License* or *The License*
15
- **This License** or **The License** refers to version 1.0 of the Code Craft AI - Source Available License.
15
+ **This License** or **The License** refers to version 1.1 of the Code Craft AI - Source Available License.
16
16
 
17
17
  ### 1.2 Licensor
18
18
  **Licensor** refers to Code Craft AI LLC.
@@ -42,14 +42,14 @@ Everyone is permitted to copy and distribute verbatim copies of *This License* d
42
42
  ### 1.9 Fiscal Year
43
43
  **Fiscal Year** means the annual accounting period that *You* use for financial reporting.
44
44
 
45
- ### 1.10 Profit
46
- **Profit** means the net profit that *You* earn from the *Commercial Activity* during a *Fiscal Year*, determined under the accounting principles that *You* regularly use for financial reporting.
45
+ ### 1.10 Gross Income
46
+ **Gross Income** means, for each product or service in connection with which *You* make *Commercial Use* of *The Software*, the gross profit that *You* earn from that product or service during a *Fiscal Year*: the revenue from that product or service, less its cost of goods sold or cost of revenue, determined under the accounting principles that *You* regularly use for financial reporting. *Gross Income* is calculated before operating expenses, such as research and development, sales and marketing, and general and administrative expenses, and before interest and taxes. *Gross Income* is measured for the products and services that *The Software* is used for, not for *Your* business as a whole.
47
47
 
48
48
  ### 1.11 Contribution Estimate
49
- **Contribution Estimate** means *Your* reasonable, good faith estimate of the portion of the *Profit* that *The Software* contributed to, expressed as a number from 0 to 1.
49
+ **Contribution Estimate** means *Your* reasonable, good faith estimate of the portion of the *Gross Income* that *The Software* contributed to, expressed as a number from 0 to 1.
50
50
 
51
51
  ### 1.12 Derived Income
52
- **Derived Income** means the portion of the *Profit* for a *Fiscal Year* that is derived from *The Software*, calculated as described in section 5.2.
52
+ **Derived Income** means the portion of the *Gross Income* for a *Fiscal Year* that is derived from *The Software*, calculated as described in section 5.2.
53
53
 
54
54
  ### 1.13 Usage Fee
55
55
  **Usage Fee** means the yearly fee for *Commercial Use* that is set by the table in section 5.3.
@@ -58,7 +58,7 @@ Everyone is permitted to copy and distribute verbatim copies of *This License* d
58
58
  **Migration** means moving the work for one of *Your* products or services from a code base other than *The Software*, such as another framework, another library, or *Your* own code, to *The Software*.
59
59
 
60
60
  ### 1.15 Migration Period
61
- **Migration Period** means the two (2) year period, described in section 5.4, during which the *Profit* from a product or service that *You* are migrating to *The Software* is not counted.
61
+ **Migration Period** means the two (2) year period, described in section 5.4, during which the *Gross Income* from a product or service that *You* are migrating to *The Software* is not counted.
62
62
 
63
63
  ## 2. License Grant
64
64
 
@@ -96,11 +96,11 @@ For each *Fiscal Year* in which *You* make *Commercial Use* of *The Software*, *
96
96
  ### 5.2 Derived Income
97
97
  The *Derived Income* for a *Fiscal Year* is calculated as follows:
98
98
 
99
- (Contribution Estimate) * (Profit) = (Derived Income)
99
+ (Contribution Estimate) * (Gross Income) = (Derived Income)
100
100
 
101
- If *You* make *Commercial Use* of *The Software* for more than one product or service, calculate the *Derived Income* for each product or service using its own *Contribution Estimate* and *Profit*, and add the results together. The *Profit* from a product or service that is in its *Migration Period* is not counted, as described in section 5.4.
101
+ If *You* make *Commercial Use* of *The Software* for more than one product or service, calculate the *Derived Income* for each product or service using its own *Contribution Estimate* and *Gross Income*, and add the results together. The *Gross Income* from a product or service that is in its *Migration Period* is not counted, as described in section 5.4.
102
102
 
103
- If the *Profit* from a product or service for a *Fiscal Year* is zero or less, then the *Derived Income* from that product or service for that *Fiscal Year* is zero.
103
+ If the *Gross Income* from a product or service for a *Fiscal Year* is zero or less, then the *Derived Income* from that product or service for that *Fiscal Year* is zero.
104
104
 
105
105
  ### 5.3 Usage Fee
106
106
  The *Usage Fee* for a *Fiscal Year* is set by the *Derived Income* for that *Fiscal Year*, as shown in the following table.
@@ -113,56 +113,65 @@ The *Usage Fee* for a *Fiscal Year* is set by the *Derived Income* for that *Fis
113
113
  | More than 100,000,000, up to and including 1,000,000,000 | 250,000 |
114
114
  | More than 1,000,000,000 | 500,000 |
115
115
 
116
- All amounts in this section 5 are in United States dollars. If *You* report *Profit* in a different currency, convert the *Derived Income* to United States dollars using the average exchange rate for the *Fiscal Year*.
116
+ All amounts in this section 5 are in United States dollars. If *You* report *Gross Income* in a different currency, convert the *Derived Income* to United States dollars using the average exchange rate for the *Fiscal Year*.
117
117
 
118
118
  ### 5.4 Migration Allowance
119
- When *You* migrate a product or service to *The Software*, the *Profit* from that product or service is not counted when calculating the *Derived Income* during its *Migration Period* (the **Migration Allowance**).
119
+ When *You* migrate a product or service to *The Software*, the *Gross Income* from that product or service is not counted when calculating the *Derived Income* during its *Migration Period* (the **Migration Allowance**).
120
120
 
121
121
  The *Migration Period* for a product or service begins on the date that *You* first make *Commercial Use* of *The Software* for that product or service as part of its *Migration*, and ends two (2) years after that date.
122
122
 
123
123
  The *Migration Allowance* applies to each product or service separately, and *You* may use it for every product or service that *You* migrate. Each product or service has only one *Migration Period*.
124
124
 
125
- If a *Fiscal Year* is only partly within the *Migration Period* of a product or service, the *Profit* from that product or service for that *Fiscal Year* is reduced in proportion to the number of days of that *Fiscal Year* that fall within its *Migration Period*.
125
+ If a *Fiscal Year* is only partly within the *Migration Period* of a product or service, the *Gross Income* from that product or service for that *Fiscal Year* is reduced in proportion to the number of days of that *Fiscal Year* that fall within its *Migration Period*.
126
126
 
127
- For example, a company tests product A with *The Software* and pays a *Usage Fee* based on the *Profit* from product A. On March 1, 2027, the company begins moving the testing of product B from a different test framework to *The Software*. The company does not count the *Profit* from product B in its *Derived Income* from March 1, 2027 until March 1, 2029. Starting March 1, 2029, the *Profit* from product B is counted. If the company later migrates product C, the *Profit* from product C is not counted for two years from the start of its own *Migration*.
127
+ For example, a company tests product A with *The Software* and pays a *Usage Fee* based on the *Gross Income* from product A. On March 1, 2027, the company begins moving the testing of product B from a different test framework to *The Software*. The company does not count the *Gross Income* from product B in its *Derived Income* from March 1, 2027 until March 1, 2029. Starting March 1, 2029, the *Gross Income* from product B is counted. If the company later migrates product C, the *Gross Income* from product C is not counted for two years from the start of its own *Migration*.
128
128
 
129
129
  ### 5.5 Contribution Estimate
130
130
  *You* are responsible for making the *Contribution Estimate*. A *Contribution Estimate* must be reasonable and made in good faith. The *Contribution Estimate* for a product or service covers all of the *Components* that *You* *Use* for that product or service. When making the *Contribution Estimate*, *You* should consider how important *The Software* is to the *Commercial Activity*, how much of the *Commercial Activity* depends on *The Software*, and the effort and cost that *You* would otherwise need to spend to accomplish what *The Software* accomplishes for *You*.
131
131
 
132
132
  The following table is a guide for making the *Contribution Estimate*. When *Your* *Commercial Use* of *The Software* matches an entry in the table, the *Contribution Estimate* in that entry is a reasonable *Contribution Estimate*. When *Your* *Commercial Use* does not match an entry in the table, make the *Contribution Estimate* by comparing *Your* *Commercial Use* with the entries in the table. When more than one entry matches the same *Commercial Activity*, use the entry with the highest *Contribution Estimate*.
133
133
 
134
+ Many products are not software, such as devices, machines, vehicles, and other physical goods, and software accounts for only part of what such a product is worth. For a product or service that is not software, *You* may reduce the *Contribution Estimate* in proportion to the share of the value of the shipped product that its software reasonably accounts for. To do so, multiply the *Contribution Estimate* from the table by that share, expressed as a number from 0 to 1. *You* must keep records that reasonably support that share, as described in section 5.8.
135
+
134
136
  | Commercial Use of *The Software* | Contribution Estimate |
135
137
  |----------------------------------|-----------------------|
136
138
  | Quality Assurance (QA) and Continuous Integration (CI): *The Software* is used to test or validate the products or services of the *Commercial Activity*, or to run their build and test pipelines | 0.3 |
137
139
  | Products Completely Based on *The Software*: the products or services of the *Commercial Activity* are built completely on *The Software* | 0.5 |
138
140
 
139
141
  ### 5.6 Examples
140
- A company earns 1,000,000,000 in *Profit* from a product line during a *Fiscal Year*. The company uses *The Software* for the QA and CI of that product line, so the *Contribution Estimate* is 0.3.
142
+ A company earns 1,000,000,000 in *Gross Income* from a product line during a *Fiscal Year*. The company uses *The Software* for the QA and CI of that product line, so the *Contribution Estimate* is 0.3.
141
143
 
142
144
  0.3 * 1,000,000,000 = 300,000,000
143
145
 
144
146
  The *Derived Income* of 300,000,000 is more than 100,000,000 and not more than 1,000,000,000, so the *Usage Fee* for that *Fiscal Year* is 250,000.
145
147
 
146
- A company earns 4,000,000 in *Profit* from a product during a *Fiscal Year*. The product is built completely on *The Software*, so the *Contribution Estimate* is 0.5.
148
+ A company earns 4,000,000 in *Gross Income* from a product during a *Fiscal Year*. The product is built completely on *The Software*, so the *Contribution Estimate* is 0.5.
147
149
 
148
150
  0.5 * 4,000,000 = 2,000,000
149
151
 
150
152
  The *Derived Income* of 2,000,000 is more than 1,000,000 and not more than 10,000,000, so the *Usage Fee* for that *Fiscal Year* is 50,000.
151
153
 
152
- A company earns 3,000,000 in *Profit* from a product line during a *Fiscal Year*. The company uses *The Software* for the QA and CI of that product line, so the *Contribution Estimate* is 0.3.
154
+ A company earns 3,000,000 in *Gross Income* from a product line during a *Fiscal Year*. The company uses *The Software* for the QA and CI of that product line, so the *Contribution Estimate* is 0.3.
153
155
 
154
156
  0.3 * 3,000,000 = 900,000
155
157
 
156
158
  The *Derived Income* of 900,000 is 1,000,000 or less, so there is no *Usage Fee* for that *Fiscal Year*.
157
159
 
160
+ A company earns 50,000,000 in *Gross Income* from a line of medical devices during a *Fiscal Year*. The company uses *The Software* for the QA and CI of the devices, so the *Contribution Estimate* from the table is 0.3. The devices are not software, and the company reasonably estimates that their software accounts for one fifth (0.2) of the value of each shipped device, so the company reduces the *Contribution Estimate* to 0.06.
161
+
162
+ 0.3 * 0.2 = 0.06
163
+ 0.06 * 50,000,000 = 3,000,000
164
+
165
+ The *Derived Income* of 3,000,000 is more than 1,000,000 and not more than 10,000,000, so the *Usage Fee* for that *Fiscal Year* is 50,000. Without the reduction, the *Derived Income* would be 15,000,000 and the *Usage Fee* would be 100,000.
166
+
158
167
  ### 5.7 Reporting and Payment
159
- Within one hundred twenty (120) days after the end of each *Fiscal Year* for which a *Usage Fee* is owed, *You* must pay the *Usage Fee* to *Licensor* and provide *Licensor* with a written statement that shows the *Profit*, the *Contribution Estimate*, the reasoning used to make the *Contribution Estimate*, the *Derived Income*, and the *Usage Fee*. *Usage Fees* are payable in United States dollars. If any *Profit* is not counted under section 5.4, the statement must also identify each product or service that is in a *Migration Period* and show the dates of its *Migration Period*. No statement is required for a *Fiscal Year* in which no *Usage Fee* is owed.
168
+ Within one hundred twenty (120) days after the end of each *Fiscal Year* for which a *Usage Fee* is owed, *You* must pay the *Usage Fee* to *Licensor* and provide *Licensor* with a written statement that shows the *Gross Income*, the *Contribution Estimate*, the reasoning used to make the *Contribution Estimate*, the *Derived Income*, and the *Usage Fee*. *Usage Fees* are payable in United States dollars. If any *Gross Income* is not counted under section 5.4, the statement must also identify each product or service that is in a *Migration Period* and show the dates of its *Migration Period*. No statement is required for a *Fiscal Year* in which no *Usage Fee* is owed.
160
169
 
161
170
  ### 5.8 Records and Review
162
- *You* must keep records that reasonably support each *Contribution Estimate*, each *Profit* figure, and the dates of any *Migration Period* for at least three (3) years after the end of the *Fiscal Year* that they apply to. No more than once in any twelve (12) month period, *Licensor* may ask in writing for the records that support a statement, and *You* must provide them within sixty (60) days of the request. *Licensor* will treat those records as confidential.
171
+ *You* must keep records that reasonably support each *Contribution Estimate*, including any share used to reduce it under section 5.5, each *Gross Income* figure, and the dates of any *Migration Period* for at least three (3) years after the end of the *Fiscal Year* that they apply to. No more than once in any twelve (12) month period, *Licensor* may ask in writing for the records that support a statement, and *You* must provide them within sixty (60) days of the request. *Licensor* will treat those records as confidential.
163
172
 
164
173
  ### 5.9 Disputes About the Usage Fee
165
- If *Licensor* believes that a *Contribution Estimate*, a *Profit* figure, or the dates of a *Migration Period* are not reasonable, *Licensor* will notify *You* in writing and explain why. *You* and *Licensor* will then negotiate in good faith for at least sixty (60) days to agree on a reasonable *Usage Fee*. If *You* and *Licensor* cannot agree, either party may resolve the dispute as described in section 8.
174
+ If *Licensor* believes that a *Contribution Estimate*, a *Gross Income* figure, or the dates of a *Migration Period* are not reasonable, *Licensor* will notify *You* in writing and explain why. *You* and *Licensor* will then negotiate in good faith for at least sixty (60) days to agree on a reasonable *Usage Fee*. If *You* and *Licensor* cannot agree, either party may resolve the dispute as described in section 8.
166
175
 
167
176
  ### 5.10 Fixed License Cost
168
177
  For assurance of costs, *You* may disclose to *Licensor* how *You* *Use* *The Software* and the returns that *You* estimate *You* will derive from it, and negotiate a fixed license cost with *Licensor*. A fixed license cost, and any other terms that *You* and *Licensor* agree to, must be set out in a writing signed by both *You* and *Licensor* (a **Fixed License Agreement**).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codecraftai-agent-kit
3
- Version: 1.3.1
3
+ Version: 1.4.0
4
4
  Summary: Code Craft AI - Agent Kit
5
5
  License-Expression: LicenseRef-CodeCraftAI-Source-Available
6
6
  License-File: LICENSE.md
@@ -16,11 +16,12 @@ Provides-Extra: serialization
16
16
  Requires-Dist: codecraftai-arcli (>=1.0.0,<2.0.0)
17
17
  Requires-Dist: codecraftai-credentials (>=1.0.0,<2.0.0)
18
18
  Requires-Dist: codecraftai-extension (>=1.0.0,<2.0.0)
19
+ Requires-Dist: codecraftai-foundations (>=1.3.0,<2.0.0)
19
20
  Requires-Dist: codecraftai-this-app (>=1.0.0,<2.0.0)
20
21
  Requires-Dist: msgpack (>=1.0.0,<2.0.0) ; extra == "msgpack"
21
22
  Requires-Dist: msgpack (>=1.0.0,<2.0.0) ; extra == "serialization"
22
- Requires-Dist: protobuf (>=4.21.0,<5.0.0) ; extra == "protobuf"
23
- Requires-Dist: protobuf (>=4.21.0,<5.0.0) ; extra == "serialization"
23
+ Requires-Dist: protobuf (>=5.29.6,<7.0.0) ; extra == "protobuf"
24
+ Requires-Dist: protobuf (>=5.29.6,<7.0.0) ; extra == "serialization"
24
25
  Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
25
26
  Project-URL: Issues, https://github.com/code-craft-ai-company/codecraftai-agent-kit/issues
26
27
  Project-URL: Repository, https://github.com/code-craft-ai-company/codecraftai-agent-kit
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codecraftai-agent-kit"
3
- version = "1.3.1"
3
+ version = "1.4.0"
4
4
  description = "Code Craft AI - Agent Kit"
5
5
  readme = "README.rst"
6
6
  license = "LicenseRef-CodeCraftAI-Source-Available"
@@ -18,13 +18,14 @@ dependencies = [
18
18
  "codecraftai-this-app>=1.0.0,<2.0.0",
19
19
  "codecraftai-credentials>=1.0.0,<2.0.0",
20
20
  "codecraftai-extension>=1.0.0,<2.0.0",
21
+ "codecraftai-foundations>=1.3.0,<2.0.0",
21
22
  "pyyaml>=6.0.1,<7.0.0",
22
23
  ]
23
24
 
24
25
  [project.optional-dependencies]
25
26
  msgpack = ["msgpack>=1.0.0,<2.0.0"]
26
- protobuf = ["protobuf>=4.21.0,<5.0.0"]
27
- serialization = ["msgpack>=1.0.0,<2.0.0", "protobuf>=4.21.0,<5.0.0"]
27
+ protobuf = ["protobuf>=5.29.6,<7.0.0"]
28
+ serialization = ["msgpack>=1.0.0,<2.0.0", "protobuf>=5.29.6,<7.0.0"]
28
29
 
29
30
  [project.urls]
30
31
  Repository = "https://github.com/code-craft-ai-company/codecraftai-agent-kit"
@@ -8,6 +8,7 @@
8
8
 
9
9
  import abc
10
10
  import logging
11
+ import math
11
12
  import os
12
13
  import threading
13
14
  import time
@@ -17,6 +18,8 @@ from typing import Dict
17
18
  from typing import List
18
19
  from typing import Optional
19
20
 
21
+ from ccai.agentkit.agentkitfactoryprotocol import ExtensionSupportNotInstalledError
22
+ from ccai.agentkit.agentkitfactoryprotocol import query_agentkit_extensions
20
23
  from ccai.agentkit.agentconfiguration import AgentConfiguration
21
24
  from ccai.agentkit.agentidentity import AgentIdentity
22
25
  from ccai.agentkit.agentregistry import AgentRegistry
@@ -101,6 +104,26 @@ DEFAULT_RECEIVE_POLL_INTERVAL = 0.05
101
104
  # The number of seconds stop_receiving waits for a receive loop thread to end.
102
105
  DEFAULT_RECEIVE_STOP_TIMEOUT = 5.0
103
106
 
107
+ # The number of characters counted as one token by the default token estimate.
108
+ DEFAULT_CHARACTERS_PER_TOKEN = 3
109
+
110
+
111
+ def estimate_token_count(text: str) -> int:
112
+ """
113
+ The default token counter of the agent's context window: a conservative
114
+ estimate of one token per DEFAULT_CHARACTERS_PER_TOKEN characters (and never
115
+ fewer tokens than words), so text without spaces such as minified JSON is not
116
+ counted as a single token (MYT-692).
117
+
118
+ :param text: The text to count.
119
+
120
+ :returns: The estimated number of tokens.
121
+ """
122
+ word_count = len(text.split())
123
+ character_estimate = math.ceil(len(text) / DEFAULT_CHARACTERS_PER_TOKEN)
124
+ rtnval = max(word_count, character_estimate)
125
+ return rtnval
126
+
104
127
 
105
128
  class Agent(abc.ABC):
106
129
  """
@@ -112,9 +135,11 @@ class Agent(abc.ABC):
112
135
  start, pause, resume, stop, and reset.
113
136
 
114
137
  :param configuration: The AgentConfiguration for this agent.
138
+ :param credential_resolver: Optional credential resolution service handed to the
139
+ agent's ToolExecutor, so tools that declare credential_names can run.
115
140
  """
116
141
 
117
- def __init__(self, configuration: AgentConfiguration) -> None:
142
+ def __init__(self, configuration: AgentConfiguration, credential_resolver=None) -> None:
118
143
  self._configuration: AgentConfiguration = configuration
119
144
  self._identity: AgentIdentity = self._create_identity_from_config(configuration)
120
145
  self._state_machine: AgentStateMachine = AgentStateMachine()
@@ -147,13 +172,14 @@ class Agent(abc.ABC):
147
172
  self._debug_session = None
148
173
 
149
174
  self._tool_registry = ToolRegistry()
150
- self._tool_executor = ToolExecutor()
175
+ self._tool_executor = ToolExecutor(credential_resolver=credential_resolver)
151
176
  self._tool_chain_executor = ToolChainExecutor(tool_executor=self._tool_executor)
152
177
 
153
178
  self._llm_provider_registry = LLMProviderRegistry()
154
179
  self._cost_tracker = CostTracker()
155
180
 
156
181
  self._memory_store: Optional[MemoryStore] = None
182
+ self._token_counter: Callable[[str], int] = estimate_token_count
157
183
  self._memory_store_registry: MemoryStoreRegistry = MemoryStoreRegistry()
158
184
  self._context_window: Optional[ContextWindow] = None
159
185
  self._memory_configuration: Optional[MemoryConfiguration] = None
@@ -185,10 +211,38 @@ class Agent(abc.ABC):
185
211
  configuration=platform_config
186
212
  )
187
213
 
214
+ self._initialize_observability()
215
+
216
+ # Register last, so a failure earlier in the constructor does not leave a
217
+ # half-built agent in the registry (MYT-297).
188
218
  AgentRegistry.instance().register(self)
189
219
 
190
- self._initialize_observability()
220
+ return
221
+
222
+ def set_token_counter(self, token_counter: Callable[[str], int]) -> None:
223
+ """
224
+ Sets the callable the context window uses to count the tokens of a text,
225
+ for example a tokenizer of the model in use. It takes effect when the
226
+ agent's memory is initialized.
227
+
228
+ :param token_counter: A callable that accepts a string and returns its token count.
229
+ """
230
+ if token_counter is None:
231
+ errmsg = "Agent.set_token_counter requires a callable token counter."
232
+ raise SemanticError(errmsg)
233
+
234
+ self._token_counter = token_counter
235
+ return
191
236
 
237
+ def set_credential_resolver(self, credential_resolver) -> None:
238
+ """
239
+ Sets the credential resolution service used by the agent's ToolExecutor, so
240
+ tools that declare credential_names can run.
241
+
242
+ :param credential_resolver: The credential resolution service, or None.
243
+ """
244
+ self._tool_executor = ToolExecutor(credential_resolver=credential_resolver)
245
+ self._tool_chain_executor = ToolChainExecutor(tool_executor=self._tool_executor)
192
246
  return
193
247
 
194
248
  @staticmethod
@@ -929,9 +983,7 @@ class Agent(abc.ABC):
929
983
  implementation to set up tools.
930
984
  """
931
985
  try:
932
- from ccai.extension import ExtensionPoint
933
- extension_point = ExtensionPoint("ccai.agentkit.tools")
934
- discovered_tools = extension_point.query()
986
+ discovered_tools = query_agentkit_extensions("ccai.agentkit.tools")
935
987
 
936
988
  for tool_entry in discovered_tools:
937
989
  try:
@@ -957,7 +1009,7 @@ class Agent(abc.ABC):
957
1009
  str(plugin_err),
958
1010
  )
959
1011
 
960
- except ImportError:
1012
+ except ExtensionSupportNotInstalledError:
961
1013
  self._logger.info(
962
1014
  "codecraftai-extension not available; skipping tool plugin discovery "
963
1015
  "for agent '%s'",
@@ -1003,7 +1055,7 @@ class Agent(abc.ABC):
1003
1055
  registers a default JsonMessageSerializer when no
1004
1056
  MessagingConfiguration is provided, and discovers Transport
1005
1057
  and MessageSerializer plugins from codecraftai-extension
1006
- ExtensionPoint entries.
1058
+ extension point entries (see ccai.agentkit.agentkitfactoryprotocol).
1007
1059
 
1008
1060
  Subclasses should call this method during their initialize()
1009
1061
  implementation to set up messaging.
@@ -1031,9 +1083,7 @@ class Agent(abc.ABC):
1031
1083
 
1032
1084
  # Discover and register Transport plugins
1033
1085
  try:
1034
- from ccai.extension import ExtensionPoint
1035
- transport_extension_point = ExtensionPoint("ccai.agentkit.transports")
1036
- discovered_transports = transport_extension_point.query()
1086
+ discovered_transports = query_agentkit_extensions("ccai.agentkit.transports")
1037
1087
 
1038
1088
  for transport_entry in discovered_transports:
1039
1089
  try:
@@ -1060,7 +1110,7 @@ class Agent(abc.ABC):
1060
1110
  str(plugin_err),
1061
1111
  )
1062
1112
 
1063
- except ImportError:
1113
+ except ExtensionSupportNotInstalledError:
1064
1114
  self._logger.info(
1065
1115
  "codecraftai-extension not available; skipping transport plugin "
1066
1116
  "discovery for agent '%s'",
@@ -1075,9 +1125,7 @@ class Agent(abc.ABC):
1075
1125
 
1076
1126
  # Discover and register MessageSerializer plugins
1077
1127
  try:
1078
- from ccai.extension import ExtensionPoint
1079
- serializer_extension_point = ExtensionPoint("ccai.agentkit.message_serializers")
1080
- discovered_serializers = serializer_extension_point.query()
1128
+ discovered_serializers = query_agentkit_extensions("ccai.agentkit.message_serializers")
1081
1129
 
1082
1130
  for serializer_entry in discovered_serializers:
1083
1131
  try:
@@ -1103,7 +1151,7 @@ class Agent(abc.ABC):
1103
1151
  str(plugin_err),
1104
1152
  )
1105
1153
 
1106
- except ImportError:
1154
+ except ExtensionSupportNotInstalledError:
1107
1155
  self._logger.info(
1108
1156
  "codecraftai-extension not available; skipping message serializer plugin "
1109
1157
  "discovery for agent '%s'",
@@ -1254,9 +1302,7 @@ class Agent(abc.ABC):
1254
1302
  Logs WARNING and skips on name-model conflict.
1255
1303
  """
1256
1304
  try:
1257
- from ccai.extension import ExtensionPoint
1258
- extension_point = ExtensionPoint("ccai.agentkit.llm_providers")
1259
- discovered_providers = extension_point.query()
1305
+ discovered_providers = query_agentkit_extensions("ccai.agentkit.llm_providers")
1260
1306
 
1261
1307
  for provider_entry in discovered_providers:
1262
1308
  try:
@@ -1286,7 +1332,7 @@ class Agent(abc.ABC):
1286
1332
  str(plugin_err),
1287
1333
  )
1288
1334
 
1289
- except ImportError:
1335
+ except ExtensionSupportNotInstalledError:
1290
1336
  self._logger.info(
1291
1337
  "codecraftai-extension not available; skipping LLM provider plugin "
1292
1338
  "discovery for agent '%s'",
@@ -1373,7 +1419,7 @@ class Agent(abc.ABC):
1373
1419
  self._context_window = ContextWindow(
1374
1420
  max_tokens=max_tokens,
1375
1421
  strategy=strategy,
1376
- token_counter=lambda text: len(text.split()),
1422
+ token_counter=self._token_counter,
1377
1423
  )
1378
1424
  else:
1379
1425
  self._memory_store = InMemoryStore(store_name="primary")
@@ -1381,7 +1427,7 @@ class Agent(abc.ABC):
1381
1427
  self._context_window = ContextWindow(
1382
1428
  max_tokens=4096,
1383
1429
  strategy=ContextWindowStrategy.FIFO,
1384
- token_counter=lambda text: len(text.split()),
1430
+ token_counter=self._token_counter,
1385
1431
  )
1386
1432
 
1387
1433
  self._memory_store_registry = MemoryStoreRegistry()
@@ -1405,9 +1451,7 @@ class Agent(abc.ABC):
1405
1451
  Logs WARNING on store name conflict and skips.
1406
1452
  """
1407
1453
  try:
1408
- from ccai.extension import ExtensionPoint
1409
- extension_point = ExtensionPoint("ccai.agentkit.memory_backends")
1410
- discovered_stores = extension_point.query()
1454
+ discovered_stores = query_agentkit_extensions("ccai.agentkit.memory_backends")
1411
1455
 
1412
1456
  for store_entry in discovered_stores:
1413
1457
  try:
@@ -1433,7 +1477,7 @@ class Agent(abc.ABC):
1433
1477
  str(plugin_err),
1434
1478
  )
1435
1479
 
1436
- except ImportError:
1480
+ except ExtensionSupportNotInstalledError:
1437
1481
  self._logger.info(
1438
1482
  "codecraftai-extension not available; skipping memory backend plugin "
1439
1483
  "discovery for agent '%s'",
@@ -1478,7 +1522,7 @@ class Agent(abc.ABC):
1478
1522
  WorkflowConfiguration. If no WorkflowConfiguration is provided,
1479
1523
  defaults to a WorkflowConfiguration with default values.
1480
1524
 
1481
- Queries the "ccai.agentkit.workflow_steps" ExtensionPoint
1525
+ Queries the "ccai.agentkit.workflow_steps" extension point
1482
1526
  and registers all discovered WorkflowStep types.
1483
1527
 
1484
1528
  Subclasses should call this method during their initialize()
@@ -1502,11 +1546,9 @@ class Agent(abc.ABC):
1502
1546
  self._identity.identifier,
1503
1547
  )
1504
1548
 
1505
- # Discover workflow step plugins via ExtensionPoint
1549
+ # Discover workflow step plugins via the agent kit extension point
1506
1550
  try:
1507
- from ccai.extension import ExtensionPoint
1508
- extension_point = ExtensionPoint("ccai.agentkit.workflow_steps")
1509
- discovered_steps = extension_point.query()
1551
+ discovered_steps = query_agentkit_extensions("ccai.agentkit.workflow_steps")
1510
1552
 
1511
1553
  for step_entry in discovered_steps:
1512
1554
  try:
@@ -1525,7 +1567,7 @@ class Agent(abc.ABC):
1525
1567
  str(plugin_err),
1526
1568
  )
1527
1569
 
1528
- except ImportError:
1570
+ except ExtensionSupportNotInstalledError:
1529
1571
  self._logger.info(
1530
1572
  "codecraftai-extension not available; skipping workflow step plugin "
1531
1573
  "discovery for agent '%s'.",
@@ -1721,9 +1763,11 @@ class Agent(abc.ABC):
1721
1763
 
1722
1764
  :param execution_id: The workflow execution identifier.
1723
1765
  :param workflow_name: Optional workflow name to look up the WorkflowDefinition.
1766
+ When omitted, the workflow name (and version, when recorded) stored in
1767
+ the checkpoint is used.
1724
1768
 
1725
1769
  :returns: A WorkflowResult with the execution outcome.
1726
- :raises: SemanticError if the workflow name is provided but not found.
1770
+ :raises: SemanticError if the workflow is not found in the registry.
1727
1771
  """
1728
1772
  if self._workflow_executor is None:
1729
1773
  self._workflow_executor = WorkflowExecutor(
@@ -1731,11 +1775,23 @@ class Agent(abc.ABC):
1731
1775
  checkpoint_manager=self._checkpoint_manager
1732
1776
  )
1733
1777
 
1778
+ workflow_version = None
1779
+ if workflow_name is None and self._checkpoint_manager is not None:
1780
+ # Resume the workflow the checkpoint was saved for (MYT-298).
1781
+ checkpoint = self._checkpoint_manager.load_checkpoint(execution_id)
1782
+ if checkpoint is not None:
1783
+ workflow_name = checkpoint.workflow_name
1784
+ checkpoint_metadata = checkpoint.context_state.get("metadata") or {}
1785
+ workflow_version = checkpoint_metadata.get("workflow_version")
1786
+
1734
1787
  workflow = None
1735
1788
  if workflow_name is not None:
1736
- workflow = self._workflow_registry.lookup(workflow_name)
1789
+ workflow = self._workflow_registry.lookup(workflow_name, workflow_version)
1737
1790
  if workflow is None:
1738
- errmsg = "Workflow '{}' not found in the registry.".format(workflow_name)
1791
+ errmsg = "Workflow '{}'{} not found in the registry.".format(
1792
+ workflow_name,
1793
+ "" if workflow_version is None else " version '{}'".format(workflow_version)
1794
+ )
1739
1795
  raise SemanticError(errmsg)
1740
1796
 
1741
1797
  result = self._workflow_executor.resume(execution_id, workflow, agent=self)
@@ -2526,39 +2582,50 @@ class Agent(abc.ABC):
2526
2582
  if fallback_chain is None:
2527
2583
  break
2528
2584
 
2529
- next_pair = fallback_chain.next_provider(
2530
- current_provider_name, current_model_name
2585
+ # Walk the chain to the next registered provider. A chain may list the
2586
+ # primary provider or only the fallbacks: when the primary is not in the
2587
+ # chain, the chain is tried from its first entry (MYT-546). A chain entry
2588
+ # that is not registered is recorded as failed and skipped, never replaced
2589
+ # by a second call to the provider that already failed (MYT-299).
2590
+ next_pair = self._next_fallback_pair(
2591
+ fallback_chain, current_provider_name, current_model_name,
2592
+ provider_name, model_name
2531
2593
  )
2532
2594
 
2533
- if next_pair is None:
2534
- break
2595
+ fallback_provider = None
2596
+ while next_pair is not None:
2597
+ fallback_provider_name = next_pair[0]
2598
+ fallback_model_name = next_pair[1]
2535
2599
 
2536
- fallback_provider_name = next_pair[0]
2537
- fallback_model_name = next_pair[1]
2600
+ llm_logger.warning(
2601
+ "Falling back from provider '%s/%s' to '%s/%s'",
2602
+ current_provider_name, current_model_name,
2603
+ fallback_provider_name, fallback_model_name,
2604
+ )
2538
2605
 
2539
- llm_logger.warning(
2540
- "Falling back from provider '%s/%s' to '%s/%s'",
2541
- current_provider_name, current_model_name,
2542
- fallback_provider_name, fallback_model_name,
2543
- )
2606
+ fallback_provider = self._llm_provider_registry.lookup(
2607
+ fallback_provider_name, fallback_model_name
2608
+ )
2544
2609
 
2545
- fallback_provider = self._llm_provider_registry.lookup(
2546
- fallback_provider_name, fallback_model_name
2547
- )
2610
+ if fallback_provider is not None:
2611
+ break
2548
2612
 
2549
- if fallback_provider is None:
2550
2613
  failure_entry = {
2551
2614
  "provider_name": fallback_provider_name,
2552
2615
  "model_name": fallback_model_name,
2553
2616
  "error": "Provider not found in registry",
2554
2617
  }
2555
2618
  failed_providers.append(failure_entry)
2556
- current_provider_name = fallback_provider_name
2557
- current_model_name = fallback_model_name
2558
- continue
2559
2619
 
2560
- current_provider_name = fallback_provider_name
2561
- current_model_name = fallback_model_name
2620
+ next_pair = fallback_chain.next_provider(
2621
+ fallback_provider_name, fallback_model_name
2622
+ )
2623
+
2624
+ if fallback_provider is None:
2625
+ break
2626
+
2627
+ current_provider_name = next_pair[0]
2628
+ current_model_name = next_pair[1]
2562
2629
  current_provider = fallback_provider
2563
2630
 
2564
2631
  err_msg_lines = [
@@ -2583,6 +2650,37 @@ class Agent(abc.ABC):
2583
2650
  cause=Exception(err_msg),
2584
2651
  )
2585
2652
 
2653
+ def _next_fallback_pair(self, fallback_chain: FallbackChain, current_provider_name: str,
2654
+ current_model_name: str, primary_provider_name: str,
2655
+ primary_model_name: str) -> Optional[tuple]:
2656
+ """
2657
+ Returns the chain entry to try after the current provider.
2658
+
2659
+ When the current provider is the primary and the chain does not list it,
2660
+ the chain's first entry is returned, so a chain of fallbacks only works the
2661
+ same as one that starts with the primary.
2662
+
2663
+ :param fallback_chain: The FallbackChain.
2664
+ :param current_provider_name: The provider that just failed.
2665
+ :param current_model_name: The model that just failed.
2666
+ :param primary_provider_name: The provider the request started with.
2667
+ :param primary_model_name: The model the request started with.
2668
+
2669
+ :returns: A (provider_name, model_name) tuple, or None at the end of the chain.
2670
+ """
2671
+ chain_pairs = [tuple(entry) for entry in fallback_chain.providers]
2672
+ primary_pair = (primary_provider_name, primary_model_name)
2673
+ current_pair = (current_provider_name, current_model_name)
2674
+
2675
+ rtnval = None
2676
+ if current_pair == primary_pair and primary_pair not in chain_pairs:
2677
+ if len(chain_pairs) > 0:
2678
+ rtnval = chain_pairs[0]
2679
+ else:
2680
+ rtnval = fallback_chain.next_provider(current_provider_name, current_model_name)
2681
+
2682
+ return rtnval
2683
+
2586
2684
  def _attempt_completion_with_retries(
2587
2685
  self, provider: LLMProvider, provider_name: str, model_name: str,
2588
2686
  conversation: LLMConversation, retry_policy: RetryPolicy,
@@ -18,6 +18,7 @@ from typing import Optional
18
18
  import yaml
19
19
 
20
20
  from ccai.agentkit.errors import ConfigurationError
21
+ from ccai.agentkit.appcontextpaths import resolve_app_context_path
21
22
 
22
23
 
23
24
  class AgentConfiguration:
@@ -393,14 +394,7 @@ class AgentConfiguration:
393
394
  :returns: An AgentConfiguration instance.
394
395
  :raises: ConfigurationError
395
396
  """
396
- resolved_path = file_path
397
-
398
- if app_context is not None:
399
- try:
400
- base_dir = app_context.directory
401
- resolved_path = os.path.join(base_dir, file_path)
402
- except Exception:
403
- resolved_path = file_path
397
+ resolved_path = resolve_app_context_path(file_path, app_context)
404
398
 
405
399
  try:
406
400
  with open(resolved_path, "r") as file_handle:
@@ -456,14 +450,7 @@ class AgentConfiguration:
456
450
  :returns: An AgentConfiguration instance.
457
451
  :raises: ConfigurationError
458
452
  """
459
- resolved_path = file_path
460
-
461
- if app_context is not None:
462
- try:
463
- base_dir = app_context.directory
464
- resolved_path = os.path.join(base_dir, file_path)
465
- except Exception:
466
- resolved_path = file_path
453
+ resolved_path = resolve_app_context_path(file_path, app_context)
467
454
 
468
455
  try:
469
456
  with open(resolved_path, "r") as file_handle: