[AAASM-2309] ✨ (scenarios): Add approval-gates/node/ TypeScript implementation#34
Open
Chisanan232 wants to merge 20 commits into
Open
[AAASM-2309] ✨ (scenarios): Add approval-gates/node/ TypeScript implementation#34Chisanan232 wants to merge 20 commits into
Chisanan232 wants to merge 20 commits into
Conversation
…and run instructions
…t and ApprovalPolicyEngine
…g → approved flow
…nt and ApprovalPolicyEngine
The SDK is not yet published to npm. Marking it optional lets pnpm install succeed for the real deps (js-yaml, tsx, vitest) while gracefully skipping the SDK — consistent with the pattern used by other node sub-projects in this repo (none carry a lock file until the SDK is published).
|
Contributor
Author
Code Review — Claude CodeCI status
All checks green. Scope completenessVerified against AAASM-2309 ticket requirements. All 7 expected Node.js files are present:
Note on diff size: The PR diff currently includes approval-gates Python and shared files from PR #33 because this branch was stacked on top of it. The extra files disappear once PR #33 merges to master. The net-new scope is solely the Code quality notes
Verdict✅ Ready to merge (after PR #33 merges first). All CI green, AAASM-2309 scope fully covered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changed
Adds the Node.js/TypeScript sub-project for the
scenarios/approval-gates/scenario. Readspolicy.yamlto find rules, evaluatesapproval_requireddecisions viaMockApprovalClient, and demonstrates the full pending → approved → executed cycle.Files added (
scenarios/approval-gates/node/):src/approval.ts— loads../policy.yaml,MockApprovalClient,evaluate()handles allow / deny / approval_requiredsrc/tools.ts—getBalance(ALLOWED immediately),transferFunds(requires approval)src/index.ts— main demo showing the approval cycle with formatted outputtests/smoke.test.ts— 12 vitest tests: policy rules, mock client approve/reject, evaluate outcomes, tool outputsRelated ticket
Closes AAASM-2309
How to verify
Checklist
[AAASM-XXXX] <GitEmoji> (<scope>): <summary>.envfiles committed