feat(project): scaffold add runtime handler - #2018
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## refactor #2018 +/- ##
============================================
+ Coverage 97.04% 97.08% +0.03%
============================================
Files 370 371 +1
Lines 22287 22616 +329
============================================
+ Hits 21628 21956 +328
- Misses 659 660 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| .regex( | ||
| /^[a-zA-Z0-9_][a-zA-Z0-9_/.-]*\.(py|ts|js)(:[a-zA-Z_][a-zA-Z0-9_]*)?$/, | ||
| 'Must be a Python (.py) or TypeScript (.ts/.js) file path with optional handler (e.g., "main.py:handler" or "index.ts")', | ||
| ) as unknown as z.ZodType<FilePath>; |
There was a problem hiding this comment.
this forced me to cast in the handler, so I removed it. I think its a relic from old CLI.
| @@ -10,7 +10,7 @@ import { | |||
| TestGlobalConfigAccessor, | |||
There was a problem hiding this comment.
as a follow-up i think I'll break up this file.
| apiKey?: string; | ||
| }; | ||
|
|
||
| export const runtimeMemoryConfigSchema = z.discriminatedUnion("mode", [ |
There was a problem hiding this comment.
this proposed structure would allow us to support existing memories (not supported today), and more advanced configuration. By default, I think we give them the same default memory as old CLI, and the customer can customize here.
Project
runtimes cannot be added to a project post creation.
Solution
We mostly follow the pattern establish by harness, but with a few exceptions:
strands-py-bedrockorstrands-ts-gemini-no-memory. The help page would list all of these out so customers know their options.Testing
Setup a table based test for verifying flag validation and parsing. Will follow up on these tests once functionality is implemented in a follow-up.
Follow-up items
main.pywhich is unnecessary.