feat(billing): bill Cursor executor usage via stream-json token parsing
Memind CI / Test, build, and release guards (push) Failing after 14m36s

Parse Cursor CLI usage from stream-json output and charge through billSessionUsage so subscription quota is consumed first and wallet overage applies when needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-27 10:16:38 +08:00
parent 884e819f70
commit f95d766f69
9 changed files with 344 additions and 8 deletions
+2
View File
@@ -42,6 +42,8 @@ test('buildCursorExecutorLaunchPlan includes workspace and mindspace hints', asy
assert.equal(plan.executor, 'cursor');
assert.equal(plan.cwd, '/tmp/mindspace/user-1');
assert.equal(plan.command, agentStub);
assert.ok(plan.args.includes('--output-format'));
assert.ok(plan.args.includes('stream-json'));
assert.ok(plan.args.includes('--workspace'));
assert.ok(plan.args.includes('/tmp/mindspace/user-1'));
assert.match(plan.args.at(-1) ?? '', /public\/.*\.html/);