cognite-function-apps 0.13.0__tar.gz → 0.14.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 (116) hide show
  1. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/agents/agentic-workflows.agent.md +53 -13
  2. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/aw/actions-lock.json +3 -3
  3. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/renovate.json +7 -0
  4. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/workflows/copilot-setup-steps.yml +2 -2
  5. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/workflows/python-package.yml +28 -13
  6. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.pre-commit-config.yaml +1 -1
  7. cognite_function_apps-0.14.0/.release-please-manifest.json +3 -0
  8. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/CHANGELOG.md +40 -0
  9. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/PKG-INFO +3 -2
  10. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/dev-server.md +2 -2
  11. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/examples/handler.py +2 -2
  12. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/pyproject.toml +2 -1
  13. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/__init__.py +2 -0
  14. cognite_function_apps-0.14.0/src/cognite_function_apps/_type_utils.py +10 -0
  15. cognite_function_apps-0.14.0/src/cognite_function_apps/_version.py +1 -0
  16. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/app.py +24 -3
  17. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/base_client.py +8 -1
  18. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/cli.py +4 -3
  19. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/client.py +1 -1
  20. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/convert.py +68 -53
  21. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/dependency_registry.py +5 -9
  22. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/formatting.py +10 -4
  23. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/mcp.py +21 -2
  24. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/models.py +32 -0
  25. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/routing.py +38 -4
  26. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/schema.py +32 -12
  27. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/service.py +14 -0
  28. cognite_function_apps-0.14.0/tests/conftest_type_checking.py +26 -0
  29. cognite_function_apps-0.14.0/tests/test_app.py +344 -0
  30. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_cli.py +11 -0
  31. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_client_generation.py +30 -0
  32. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_convert_edge_cases.py +138 -2
  33. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_error_handling.py +5 -3
  34. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_handle_function.py +183 -5
  35. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_logger.py +1 -1
  36. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_mcp.py +108 -1
  37. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_models.py +26 -0
  38. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_routing.py +94 -0
  39. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_schema.py +97 -0
  40. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/uv.lock +143 -143
  41. cognite_function_apps-0.13.0/.github/workflows/repo-assist.lock.yml +0 -1842
  42. cognite_function_apps-0.13.0/.github/workflows/repo-assist.md +0 -391
  43. cognite_function_apps-0.13.0/.release-please-manifest.json +0 -3
  44. cognite_function_apps-0.13.0/src/cognite_function_apps/_version.py +0 -1
  45. cognite_function_apps-0.13.0/tests/test_app.py +0 -153
  46. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.claude/settings.json +0 -0
  47. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.gemini/config.yaml +0 -0
  48. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.gitattributes +0 -0
  49. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/workflows/conventional-pr-title.yml +0 -0
  50. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/workflows/deploy-docs.yml +0 -0
  51. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/workflows/python-publish.yml +0 -0
  52. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.github/workflows/release-please.yml +0 -0
  53. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.gitignore +0 -0
  54. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.nojekyll +0 -0
  55. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/.python-version +0 -0
  56. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/AGENTS.md +0 -0
  57. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/CLAUDE.md +0 -0
  58. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/CODEOWNERS +0 -0
  59. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/LICENSE +0 -0
  60. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/README.md +0 -0
  61. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/RELEASING.md +0 -0
  62. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/Terminology.md +0 -0
  63. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/adr/response-customization.md +0 -0
  64. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/codecov.yml +0 -0
  65. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/api-reference.md +0 -0
  66. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/app-composition.md +0 -0
  67. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/architecture.md +0 -0
  68. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/async-support.md +0 -0
  69. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/contributing.md +0 -0
  70. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/dependency-injection.md +0 -0
  71. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/error-handling.md +0 -0
  72. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/function-client.md +0 -0
  73. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/index.md +0 -0
  74. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/introspection.md +0 -0
  75. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/logging.md +0 -0
  76. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/mcp.md +0 -0
  77. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/release-process.md +0 -0
  78. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/response-customization.md +0 -0
  79. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/stylesheets/extra.css +0 -0
  80. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/tracing.md +0 -0
  81. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs/type-safety.md +0 -0
  82. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs-src/error-handling.py +0 -0
  83. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs-src/function-client.py +0 -0
  84. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs-src/introspection.py +0 -0
  85. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs-src/logging.py +0 -0
  86. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs-src/tracing.py +0 -0
  87. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/docs-src/type-safety.py +0 -0
  88. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/examples/dev.py +0 -0
  89. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/examples/requirements.txt +0 -0
  90. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/justfile +0 -0
  91. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/mkdocs.yml +0 -0
  92. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/release-please-config.json +0 -0
  93. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/client_generation.py +0 -0
  94. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/devserver/__init__.py +0 -0
  95. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/devserver/asgi.py +0 -0
  96. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/devserver/auth.py +0 -0
  97. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/devserver/swagger.py +0 -0
  98. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/introspection.py +0 -0
  99. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/logger.py +0 -0
  100. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/py.typed +0 -0
  101. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/templates/__init__.py +0 -0
  102. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/templates/client_template.jinja2 +0 -0
  103. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/src/cognite_function_apps/tracer.py +0 -0
  104. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/__init__.py +0 -0
  105. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/conftest.py +0 -0
  106. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/conftest_pep563.py +0 -0
  107. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_asgi.py +0 -0
  108. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_async_handlers.py +0 -0
  109. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_convert.py +0 -0
  110. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_convert_property_based.py +0 -0
  111. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_dependency_injection.py +0 -0
  112. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_formatting.py +0 -0
  113. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_introspection.py +0 -0
  114. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_swagger.py +0 -0
  115. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_trace_propagation.py +0 -0
  116. {cognite_function_apps-0.13.0 → cognite_function_apps-0.14.0}/tests/test_tracer.py +0 -0
@@ -19,7 +19,13 @@ This is a **dispatcher agent** that routes your request to the appropriate speci
19
19
  - **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
20
20
  - **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
21
21
  - **Analyzing test coverage**: Routes to `test-coverage` prompt — consult this whenever the workflow reads, analyzes, or reports on test coverage data from PRs or CI runs
22
+ - **Rendering ASCII charts in markdown**: Routes to `asciicharts` guide — consult this whenever the workflow needs compact charts that render reliably in GitHub issues, comments, or discussions
22
23
  - **CLI commands and triggering workflows**: Routes to `cli-commands` guide — consult this whenever the user asks how to run, compile, debug, or manage workflows from the command line, or when they need the MCP tool equivalent of a `gh aw` command
24
+ - **Reducing token consumption / cost optimization**: Routes to `token-optimization` guide — consult this whenever the user asks how to reduce token usage, lower costs, speed up workflows, or measure the impact of prompt changes with experiments
25
+ - **Choosing workflow architectures and design patterns**: Routes to `patterns` guide — consult this whenever the user asks for strategy, architecture, operating models, or pattern selection for agentic workflows
26
+
27
+ > [!IMPORTANT]
28
+ > For architecture/pattern-selection requests, load `https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/patterns.md` first.
23
29
 
24
30
  Workflows may optionally include:
25
31
 
@@ -31,7 +37,7 @@ Workflows may optionally include:
31
37
  - Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
32
38
  - Workflow lock files: `.github/workflows/*.lock.yml`
33
39
  - Shared components: `.github/workflows/shared/*.md`
34
- - Configuration: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/github-agentic-workflows.md
40
+ - Configuration: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/github-agentic-workflows.md
35
41
 
36
42
  ## Problems This Solves
37
43
 
@@ -53,7 +59,7 @@ When you interact with this agent, it will:
53
59
  ### Create New Workflow
54
60
  **Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet
55
61
 
56
- **Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/create-agentic-workflow.md
62
+ **Prompt file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/create-agentic-workflow.md
57
63
 
58
64
  **Use cases**:
59
65
  - "Create a workflow that triages issues"
@@ -63,7 +69,7 @@ When you interact with this agent, it will:
63
69
  ### Update Existing Workflow
64
70
  **Load when**: User wants to modify, improve, or refactor an existing workflow
65
71
 
66
- **Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/update-agentic-workflow.md
72
+ **Prompt file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/update-agentic-workflow.md
67
73
 
68
74
  **Use cases**:
69
75
  - "Add web-fetch tool to the issue-classifier workflow"
@@ -73,7 +79,7 @@ When you interact with this agent, it will:
73
79
  ### Debug Workflow
74
80
  **Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors
75
81
 
76
- **Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/debug-agentic-workflow.md
82
+ **Prompt file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/debug-agentic-workflow.md
77
83
 
78
84
  **Use cases**:
79
85
  - "Why is this workflow failing?"
@@ -83,7 +89,7 @@ When you interact with this agent, it will:
83
89
  ### Upgrade Agentic Workflows
84
90
  **Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations
85
91
 
86
- **Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/upgrade-agentic-workflows.md
92
+ **Prompt file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/upgrade-agentic-workflows.md
87
93
 
88
94
  **Use cases**:
89
95
  - "Upgrade all workflows to the latest version"
@@ -93,7 +99,7 @@ When you interact with this agent, it will:
93
99
  ### Create a Report-Generating Workflow
94
100
  **Load when**: The workflow being created or updated produces reports — recurring status updates, audit summaries, analyses, or any structured output posted as a GitHub issue, discussion, or comment
95
101
 
96
- **Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/report.md
102
+ **Prompt file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/report.md
97
103
 
98
104
  **Use cases**:
99
105
  - "Create a weekly CI health report"
@@ -103,7 +109,7 @@ When you interact with this agent, it will:
103
109
  ### Create Shared Agentic Workflow
104
110
  **Load when**: User wants to create a reusable workflow component or wrap an MCP server
105
111
 
106
- **Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/create-shared-agentic-workflow.md
112
+ **Prompt file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/create-shared-agentic-workflow.md
107
113
 
108
114
  **Use cases**:
109
115
  - "Create a shared component for Notion integration"
@@ -113,7 +119,7 @@ When you interact with this agent, it will:
113
119
  ### Fix Dependabot PRs
114
120
  **Load when**: User needs to close or fix open Dependabot PRs that update dependencies in generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`)
115
121
 
116
- **Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/dependabot.md
122
+ **Prompt file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/dependabot.md
117
123
 
118
124
  **Use cases**:
119
125
  - "Fix the open Dependabot PRs for npm dependencies"
@@ -123,17 +129,27 @@ When you interact with this agent, it will:
123
129
  ### Analyze Test Coverage
124
130
  **Load when**: The workflow reads, analyzes, or reports test coverage — whether triggered by a PR, a schedule, or a slash command. Always consult this prompt before designing the coverage data strategy.
125
131
 
126
- **Prompt file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/test-coverage.md
132
+ **Prompt file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/test-coverage.md
127
133
 
128
134
  **Use cases**:
129
135
  - "Create a workflow that comments coverage on PRs"
130
136
  - "Analyze coverage trends over time"
131
137
  - "Add a coverage gate that blocks PRs below a threshold"
132
138
 
139
+ ### Render ASCII Charts in Markdown
140
+ **Load when**: The workflow needs in-markdown charts (sparklines, bars, table+trend views) that must align cleanly and render reliably across GitHub surfaces, including mobile.
141
+
142
+ **Reference file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/asciicharts.md
143
+
144
+ **Use cases**:
145
+ - "Show a compact trend chart in an issue comment"
146
+ - "Render a dashboard table with sparkline trends"
147
+ - "Generate aligned ASCII bars for service metrics"
148
+
133
149
  ### CLI Commands Reference
134
150
  **Load when**: The user asks how to run, compile, debug, or manage workflows from the command line; needs the MCP tool equivalent of a `gh aw` command; or is in a restricted environment (e.g., Copilot Cloud) without direct CLI access.
135
151
 
136
- **Reference file**: https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/cli-commands.md
152
+ **Reference file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/cli-commands.md
137
153
 
138
154
  **Use cases**:
139
155
  - "How do I trigger workflow X on the main branch?"
@@ -141,6 +157,30 @@ When you interact with this agent, it will:
141
157
  - "I'm in Copilot Cloud — how do I compile a workflow?"
142
158
  - "Show me all available gh aw commands"
143
159
 
160
+ ### Token Consumption Optimization
161
+ **Load when**: The user asks how to reduce token usage, lower workflow costs, make a workflow faster or cheaper, or measure the impact of prompt or configuration changes.
162
+
163
+ **Reference file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/token-optimization.md
164
+
165
+ **Use cases**:
166
+ - "How do I reduce the token cost of this workflow?"
167
+ - "My workflow is too expensive — how do I optimize it?"
168
+ - "How do I compare token usage between two runs?"
169
+ - "Should I use gh-proxy or the MCP server?"
170
+ - "How do I use sub-agents to reduce costs?"
171
+ - "How do I measure the impact of a prompt change?"
172
+
173
+ ### Workflow Pattern Selection
174
+ **Load when**: The user asks for architecture, strategy, operating model selection, or pattern recommendations for building agentic workflows.
175
+
176
+ **Reference file**: https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/patterns.md
177
+
178
+ **Use cases**:
179
+ - "Which pattern should I use for multi-repo rollout?"
180
+ - "How should I structure this workflow architecture?"
181
+ - "What pattern fits slash-command triage?"
182
+ - "Should this be DispatchOps or DailyOps?"
183
+
144
184
  ## Instructions
145
185
 
146
186
  When a user interacts with you:
@@ -185,12 +225,12 @@ gh aw compile --validate
185
225
 
186
226
  ## Important Notes
187
227
 
188
- - Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/github-agentic-workflows.md for complete documentation
228
+ - Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/github-agentic-workflows.md for complete documentation
189
229
  - Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud
190
230
  - Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
191
231
  - **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
192
232
  - Follow security best practices: minimal permissions, explicit network access, no template injection
193
- - **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns.
233
+ - **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns.
194
234
  - **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself.
195
235
  - **Triggering runs**: Always use `gh aw run <workflow-name>` to trigger a workflow on demand — not `gh workflow run <file>.lock.yml`. `gh aw run` handles workflow resolution by short name, input parsing and validation, and correct run-tracking for agentic workflows. Use `--ref <branch>` to run on a specific branch.
196
- - **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see https://github.com/github/gh-aw/blob/v0.71.5/.github/aw/cli-commands.md
236
+ - **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see https://github.com/github/gh-aw/blob/v0.76.1/.github/aw/cli-commands.md
@@ -25,10 +25,10 @@
25
25
  "version": "v7.0.1",
26
26
  "sha": "043fb46d1a93c77aae656e7c1c64a875d1fc6a0a"
27
27
  },
28
- "github/gh-aw-actions/setup@v0.71.5": {
28
+ "github/gh-aw-actions/setup@v0.76.1": {
29
29
  "repo": "github/gh-aw-actions/setup",
30
- "version": "v0.71.5",
31
- "sha": "b8068426813005612b960b5ab0b8bd2c27142323"
30
+ "version": "v0.76.1",
31
+ "sha": "46d564922b082d0db93244972e8005ea6904ee5f"
32
32
  }
33
33
  }
34
34
  }
@@ -16,6 +16,13 @@
16
16
  ],
17
17
  "enabled": false,
18
18
  "description": "Disable Python version updates - we need to support Function runtimes from 3.10 to 3.12"
19
+ },
20
+ {
21
+ "matchDepNames": [
22
+ "github/gh-aw-actions"
23
+ ],
24
+ "enabled": false,
25
+ "description": "Disable gh-aw-actions updates - must be upgraded manually via 'gh aw upgrade' which runs codemods and recompiles workflows"
19
26
  }
20
27
  ]
21
28
  }
@@ -21,6 +21,6 @@ jobs:
21
21
  - name: Checkout repository
22
22
  uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
23
23
  - name: Install gh-aw extension
24
- uses: github/gh-aw-actions/setup-cli@23453ecc01928d28ee1e773e403b216b29e89a5b # v0.74.2
24
+ uses: github/gh-aw-actions/setup-cli@46d564922b082d0db93244972e8005ea6904ee5f # v0.76.1
25
25
  with:
26
- version: v0.71.5
26
+ version: v0.76.1
@@ -16,27 +16,21 @@ permissions:
16
16
  pull-requests: write # Allow posting test results as PR comments
17
17
 
18
18
  jobs:
19
- build:
19
+ lint:
20
20
  runs-on: ubuntu-latest
21
21
  if: ${{ github.actor != 'github-actions[bot]' }}
22
- strategy:
23
- matrix:
24
- python-version: ["3.10", "3.11", "3.12", "3.13"]
25
22
 
26
23
  steps:
27
24
  - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
28
- with:
29
- fetch-depth: 0
30
25
 
31
- - name: Set up Python ${{ matrix.python-version }}
32
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
26
+ - name: Set up uv
27
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
33
28
  with:
34
- python-version: ${{ matrix.python-version }}
29
+ python-version: "3.13"
30
+ enable-cache: true
35
31
 
36
32
  - name: Install dependencies
37
- run: |
38
- pipx install uv
39
- uv sync --all-extras
33
+ run: uv sync --all-extras
40
34
 
41
35
  - name: Check formatting
42
36
  run: |
@@ -46,13 +40,34 @@ jobs:
46
40
  run: |
47
41
  SKIP=ruff-format uv run pre-commit run --all-files --show-diff-on-failure
48
42
 
43
+ test:
44
+ runs-on: ubuntu-latest
45
+ if: ${{ github.actor != 'github-actions[bot]' }}
46
+ strategy:
47
+ matrix:
48
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
49
+
50
+ steps:
51
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
52
+ with:
53
+ fetch-depth: 0
54
+
55
+ - name: Set up uv
56
+ uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
57
+ with:
58
+ python-version: ${{ matrix.python-version }}
59
+ enable-cache: true
60
+
61
+ - name: Install dependencies
62
+ run: uv sync --all-extras
63
+
49
64
  - name: Test with pytest
50
65
  run: |
51
66
  uv run pytest --cov=src/cognite_function_apps --cov-report=xml --cov-report=term
52
67
 
53
68
  - name: Upload coverage reports to Codecov
54
- if: matrix.python-version == '3.13'
55
69
  uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6
56
70
  with:
57
71
  token: ${{ secrets.CODECOV_TOKEN }}
58
72
  slug: cognitedata/cognite-function-apps
73
+ flags: python${{ matrix.python-version }}
@@ -20,5 +20,5 @@ repos:
20
20
  language: node
21
21
  pass_filenames: false
22
22
  types: [python]
23
- additional_dependencies: ["pyright@1.1.409"]
23
+ additional_dependencies: ["pyright@1.1.410"]
24
24
  repo: local
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.14.0"
3
+ }
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.14.0](https://github.com/cognitedata/cognite-function-apps/compare/cognite-function-apps-v0.13.1...cognite-function-apps-v0.14.0) (2026-09-03)
4
+
5
+
6
+ ### Features
7
+
8
+ * return 405 MethodNotAllowed when path exists but method is wrong [Repo Assist] ([#195](https://github.com/cognitedata/cognite-function-apps/issues/195)) ([4b162b1](https://github.com/cognitedata/cognite-function-apps/commit/4b162b19bd40fce049ec2fe737b782a8e019007b))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * declare pydantic-settings in the cli extra ([#221](https://github.com/cognitedata/cognite-function-apps/issues/221)) ([e2dcee1](https://github.com/cognitedata/cognite-function-apps/commit/e2dcee1d05c5efef1fb5f62c3e752603b7e49b4c))
14
+ * handle HTTP 204 No Content in BaseFunctionClient._call_method [Repo Assist] ([#181](https://github.com/cognitedata/cognite-function-apps/issues/181)) ([130ffe0](https://github.com/cognitedata/cognite-function-apps/commit/130ffe059c1feff350b9b71b317221496fe4e649))
15
+ * include items schema for list/sequence-type query parameters [Repo Assist] ([#205](https://github.com/cognitedata/cognite-function-apps/issues/205)) ([cbec617](https://github.com/cognitedata/cognite-function-apps/commit/cbec6172d2feffd5ecdf4e7bcab4e74d79045d57))
16
+ * **mcp:** handle Optional and union types in MCP input schema [Repo Assist] ([#209](https://github.com/cognitedata/cognite-function-apps/issues/209)) ([7fddf87](https://github.com/cognitedata/cognite-function-apps/commit/7fddf8730aa61fbaf5ad7e603bbe1b4d271acfaf))
17
+ * use eu.honeycomb backend in handler example ([#200](https://github.com/cognitedata/cognite-function-apps/issues/200)) ([61ed4a6](https://github.com/cognitedata/cognite-function-apps/commit/61ed4a6c125504e3e8e401fdfde3c7248939aee8))
18
+
19
+
20
+ ### Code Refactoring
21
+
22
+ * pre-compile regex patterns in formatting.py ([#192](https://github.com/cognitedata/cognite-function-apps/issues/192)) ([c10e895](https://github.com/cognitedata/cognite-function-apps/commit/c10e8958fc99e95d7b36f664d21656a3f0b31526))
23
+
24
+ ## [0.13.1](https://github.com/cognitedata/cognite-function-apps/compare/cognite-function-apps-v0.13.0...cognite-function-apps-v0.13.1) (2026-06-05)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * guard get_type_hints in MCPApp.tool decorator against NameError [Repo Assist] ([#164](https://github.com/cognitedata/cognite-function-apps/issues/164)) ([f6a520a](https://github.com/cognitedata/cognite-function-apps/commit/f6a520a56d81223e5c27af65fd2921e0bb9cb45e))
30
+ * guard isinstance against subscripted generics for Python 3.10 compatibility ([#188](https://github.com/cognitedata/cognite-function-apps/issues/188)) ([438118b](https://github.com/cognitedata/cognite-function-apps/commit/438118b5e67512c516189ac29d96c07fceebc6b3))
31
+ * use inspect.cleandoc() for docstring descriptions to prevent empty OpenAPI summary [Repo Assist] ([#184](https://github.com/cognitedata/cognite-function-apps/issues/184)) ([6b95700](https://github.com/cognitedata/cognite-function-apps/commit/6b957001f0b60969d9a4dcb33a38ac64fabe9b52))
32
+
33
+
34
+ ### Performance Improvements
35
+
36
+ * cache has_var_keyword in RouteInfo and pre-compile Accept header regex [Repo Assist] ([#147](https://github.com/cognitedata/cognite-function-apps/issues/147)) ([c453c90](https://github.com/cognitedata/cognite-function-apps/commit/c453c905854b0517af64a131436f8789bab19f7b))
37
+
38
+
39
+ ### Code Refactoring
40
+
41
+ * extract _convert_union and _convert_basemodel from convert_value_to_type ([#194](https://github.com/cognitedata/cognite-function-apps/issues/194)) ([23e6150](https://github.com/cognitedata/cognite-function-apps/commit/23e6150eaa4ac85ff31fe6e939b95afbb0af5408))
42
+
3
43
  ## [0.13.0](https://github.com/cognitedata/cognite-function-apps/compare/cognite-function-apps-v0.12.0...cognite-function-apps-v0.13.0) (2026-05-22)
4
44
 
5
45
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: cognite-function-apps
3
- Version: 0.13.0
3
+ Version: 0.14.0
4
4
  Summary: FastAPI-style framework for building composable Function Apps for Cognite Functions with automatic OpenAPI schema generation and MCP integration
5
5
  Project-URL: Repository, https://github.com/cognitedata/cognite-function-apps
6
6
  Project-URL: Changelog, https://github.com/cognitedata/cognite-function-apps/releases
@@ -10,6 +10,7 @@ Requires-Dist: cognite-sdk>=7.87.0
10
10
  Requires-Dist: pydantic>=2.10.5
11
11
  Requires-Dist: typing-extensions>=4.11.0
12
12
  Provides-Extra: cli
13
+ Requires-Dist: pydantic-settings>=2.0.0; extra == 'cli'
13
14
  Requires-Dist: typer>=0.9.0; extra == 'cli'
14
15
  Requires-Dist: uvicorn>=0.37.0; extra == 'cli'
15
16
  Provides-Extra: tracing
@@ -15,7 +15,7 @@ The dev server allows you to test your Cognite Functions locally before deployin
15
15
 
16
16
  ### 1. Install CLI Support
17
17
 
18
- Install cognite-function-apps with CLI support to get the `fun` command and uvicorn:
18
+ Install cognite-function-apps with CLI support to get the `fun` command and the local server dependencies:
19
19
 
20
20
  ```bash
21
21
  pip install cognite-function-apps[cli]
@@ -23,7 +23,7 @@ pip install cognite-function-apps[cli]
23
23
  uv add cognite-function-apps --extra cli
24
24
  ```
25
25
 
26
- This installs both the framework and uvicorn (the development server).
26
+ This installs the framework plus typer, uvicorn, and pydantic-settings.
27
27
 
28
28
  ### 2. Set Environment Variables
29
29
 
@@ -49,8 +49,8 @@ app = FunctionApp(title="Asset Management API", version="1.0.0")
49
49
  mcp = create_mcp_app("asset-management-tools")
50
50
 
51
51
  # Tracing with backend presets:
52
- # - Production: backend="honeycomb" or "lightstep" (requires tracing-api-key secret)
53
- tracing = create_tracing_app(backend="honeycomb") # Free tier available at https://ui.honeycomb.io/
52
+ # - Production: backend="eu.honeycomb" or "lightstep" (requires tracing-api-key secret)
53
+ tracing = create_tracing_app(backend="eu.honeycomb") # Free tier available at https://ui.eu1.honeycomb.io/
54
54
 
55
55
  # - Local dev: Use TracingConfig for Jaeger (no auth)
56
56
  # from cognite_function_apps import TracingConfig
@@ -24,6 +24,7 @@ Changelog = "https://github.com/cognitedata/cognite-function-apps/releases"
24
24
  cli = [
25
25
  "uvicorn>=0.37.0",
26
26
  "typer>=0.9.0",
27
+ "pydantic-settings>=2.0.0",
27
28
  ]
28
29
 
29
30
  tracing = [
@@ -47,7 +48,7 @@ dev = [
47
48
  "pytest-cov>=6.0.0",
48
49
  "openapi-spec-validator>=0.7.0",
49
50
  "pre-commit>=4.3.0",
50
- "pyright>=1.1.406",
51
+ "pyright>=1.1.410",
51
52
  "ruff>=0.14.1",
52
53
  "hypothesis>=6.138.15",
53
54
  "uvicorn>=0.37.0",
@@ -27,6 +27,7 @@ from .models import (
27
27
  FunctionCallInfo,
28
28
  FunctionCallRuntimeError,
29
29
  HTTPMethod,
30
+ MethodNotAllowedError,
30
31
  NotAcceptableError,
31
32
  RequestHeaders,
32
33
  Response,
@@ -53,6 +54,7 @@ __all__ = [
53
54
  "FunctionTracer",
54
55
  "HTTPMethod",
55
56
  "MCPApp",
57
+ "MethodNotAllowedError",
56
58
  "NotAcceptableError",
57
59
  "ProviderFunction",
58
60
  "RequestHeaders",
@@ -0,0 +1,10 @@
1
+ """Shared type introspection utilities."""
2
+
3
+ import types
4
+ from typing import Any, Union, get_origin
5
+
6
+
7
+ def is_union_type(python_type: Any) -> bool:
8
+ """Return True if python_type is a union (Union[X, Y] / Optional[X] / X | Y)."""
9
+ origin = get_origin(python_type)
10
+ return origin is Union or origin is types.UnionType
@@ -0,0 +1 @@
1
+ __version__ = "0.14.0" # x-release-please-version
@@ -265,6 +265,26 @@ class FunctionApp:
265
265
  # Set the next app in the middleware chain
266
266
  self.next_app = next_app
267
267
 
268
+ def get_allowed_methods(self, path: str) -> list[HTTPMethod]:
269
+ """Return HTTP methods allowed for the given path across this app and all downstream apps.
270
+
271
+ Aggregates results from every app in the middleware chain, so a composed service
272
+ correctly reflects methods registered in any of the composed apps.
273
+
274
+ Args:
275
+ path: The request path to check (e.g., "/items/123")
276
+
277
+ Returns:
278
+ Sorted list of HTTPMethod values registered for this path across all apps,
279
+ or an empty list if no route matches the path at all.
280
+ """
281
+ allowed: set[HTTPMethod] = set()
282
+ current: FunctionApp | None = self
283
+ while current is not None:
284
+ allowed.update(current.router.get_allowed_methods(path))
285
+ current = current.next_app
286
+ return sorted(allowed, key=lambda m: m.value)
287
+
268
288
  def extract_path_params(self, path: str) -> Sequence[str]:
269
289
  """Extract parameter names from path like /items/{item_id}."""
270
290
  return self.router.extract_path_params(path)
@@ -323,7 +343,7 @@ class FunctionApp:
323
343
  parameters=params,
324
344
  type_hints=type_hints,
325
345
  path_params=self.extract_path_params(path),
326
- description=description or func.__doc__ or f"{method} {path}",
346
+ description=description or (inspect.cleandoc(func.__doc__) if func.__doc__ else "") or f"{method} {path}",
327
347
  content_type=content_type,
328
348
  accept=accept,
329
349
  status_code=status_code,
@@ -502,9 +522,10 @@ class FunctionApp:
502
522
  body_mapping: DataDict = body if (has_body and isinstance(body, Mapping)) else {}
503
523
  sig_params = route_match.signature.parameters
504
524
  combined_params = {**query, **body_mapping, **path_params}
505
- has_var_keyword = any(p.kind == inspect.Parameter.VAR_KEYWORD for p in sig_params.values())
506
525
  all_params = (
507
- combined_params if has_var_keyword else {k: v for k, v in combined_params.items() if k in sig_params}
526
+ combined_params
527
+ if route_match.has_var_keyword
528
+ else {k: v for k, v in combined_params.items() if k in sig_params}
508
529
  )
509
530
 
510
531
  func = route_match.endpoint
@@ -304,7 +304,7 @@ class BaseFunctionClient:
304
304
  params: Query parameters
305
305
 
306
306
  Returns:
307
- Unwrapped response data from the completed function call
307
+ Unwrapped response data from the completed function call, or None for HTTP 204 No Content.
308
308
 
309
309
  Raises:
310
310
  RuntimeError: If the function call failed or the response is malformed
@@ -314,6 +314,10 @@ class BaseFunctionClient:
314
314
  else:
315
315
  result = self._call_devserver(path, method, body, params)
316
316
 
317
+ # A None result means the server returned HTTP 204 No Content — treat as success with no data.
318
+ if result is None:
319
+ return None
320
+
317
321
  # Unwrap the outer runtime_status envelope.
318
322
  # Accept both camelCase (new infra) and snake_case (old infra) during the migration grace period.
319
323
  if isinstance(result, dict) and ("runtimeStatus" in result or "runtime_status" in result):
@@ -353,6 +357,9 @@ class BaseFunctionClient:
353
357
  Returns:
354
358
  Deserialized data if a Pydantic model, otherwise raw data
355
359
  """
360
+ if data is None:
361
+ return None
362
+
356
363
  # Get the module namespace where the actual client class is defined
357
364
  # This allows us to find models defined in generated clients
358
365
  module_namespace = sys.modules[type(self).__module__].__dict__
@@ -3,8 +3,8 @@
3
3
  This module provides CLI commands for working with Function Apps,
4
4
  including a development server for local testing.
5
5
 
6
- Note: This module can be safely imported even if CLI dependencies (typer, uvicorn)
7
- are not installed. Dependency checking only occurs when main() is executed.
6
+ Note: This module can be safely imported even if CLI dependencies (typer, uvicorn,
7
+ pydantic-settings) are not installed. Dependency checking only occurs when main() is executed.
8
8
  """
9
9
 
10
10
  import importlib.util
@@ -16,7 +16,6 @@ import tempfile
16
16
  from pathlib import Path
17
17
  from typing import Annotated
18
18
 
19
- from cognite_function_apps.devserver import create_asgi_app
20
19
  from cognite_function_apps.service import FunctionService
21
20
 
22
21
  logger = logging.getLogger(__name__)
@@ -121,6 +120,8 @@ def main() -> None:
121
120
  try:
122
121
  import typer # noqa: PLC0415
123
122
  import uvicorn # noqa: PLC0415
123
+
124
+ from cognite_function_apps.devserver import create_asgi_app # noqa: PLC0415
124
125
  except ImportError as e:
125
126
  logger.error(
126
127
  """Error: CLI dependencies not installed. Missing: %s
@@ -987,7 +987,7 @@ class FunctionClient(BaseFunctionClient):
987
987
  if isinstance(data, list):
988
988
  data = cast(list[object], data)
989
989
  return [model_class.model_validate(item) for item in data]
990
- else:
990
+ elif data is not None:
991
991
  # Single model response
992
992
  return model_class.model_validate(data)
993
993