@yolk-sdk/emulators 0.1.0-canary.115 → 0.1.0-canary.116
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.
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ const anthropicClaudeUsageRecording = {
|
|
|
12
12
|
status: 200,
|
|
13
13
|
headers: { "content-type": "application/json" },
|
|
14
14
|
streamed: false,
|
|
15
|
-
chunks: ["{\"five_hour\":{\"utilization\":18,\"resets_at\":\"2026-10-01T05:00:00.000Z\"},\"seven_day\":{\"utilization\":42,\"resets_at\":\"2026-10-06T00:00:00.000Z\"}}"]
|
|
15
|
+
chunks: ["{\"five_hour\":{\"utilization\":18,\"resets_at\":\"2026-10-01T05:00:00.000Z\"},\"seven_day\":{\"utilization\":42,\"resets_at\":\"2026-10-06T00:00:00.000Z\"},\"limits\":[{\"kind\":\"weekly_scoped\",\"percent\":64,\"resets_at\":\"2026-10-06T00:00:00.000Z\",\"scope\":{\"model\":{\"id\":null,\"display_name\":\"Opus\"}}}]}"]
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
const codexUsageRecording = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-usage-recordings.mjs","names":[],"sources":["../src/subscription-usage-recordings.ts"],"sourcesContent":["/**\n * Subscription-usage recordings the `/anthropic`, `/codex`, and `/xai` usage routes answer from.\n *\n * Copied as data from the committed (synthetic, unverified) conformance fixtures; never imported.\n * `test/fixture-recordings.test.ts` fails when a fixture changes and this copy does not. Internal;\n * not a package export.\n */\nimport type { FixtureRecording } from './fixture-route.ts'\n\nexport const anthropicClaudeUsageRecording: FixtureRecording = {\n fixtureId: 'anthropic.claude.usage.snapshot.synthetic',\n caseId: 'anthropic.claude.usage.snapshot',\n request: {\n method: 'GET',\n path: '/api/oauth/usage',\n query: '',\n headers: {\n accept: 'application/json'\n }\n },\n response: {\n status: 200,\n headers: {\n 'content-type': 'application/json'\n },\n streamed: false,\n chunks: [\n '{\"five_hour\":{\"utilization\":18,\"resets_at\":\"2026-10-01T05:00:00.000Z\"},\"seven_day\":{\"utilization\":42,\"resets_at\":\"2026-10-06T00:00:00.000Z\"}}'\n ]\n }\n}\n\nexport const codexUsageRecording: FixtureRecording = {\n fixtureId: 'openai.codex.usage.snapshot.synthetic',\n caseId: 'openai.codex.usage.snapshot',\n request: {\n method: 'GET',\n path: '/backend-api/wham/usage',\n query: '',\n headers: {\n accept: 'application/json'\n }\n },\n response: {\n status: 200,\n headers: {\n 'content-type': 'application/json'\n },\n streamed: false,\n chunks: [\n '{\"rate_limit\":{\"primary_window\":{\"used_percent\":23,\"limit_window_seconds\":18000,\"reset_after_seconds\":7200,\"reset_at\":1790007200},\"secondary_window\":{\"used_percent\":51,\"limit_window_seconds\":604800,\"reset_after_seconds\":259200,\"reset_at\":1790259200}}}'\n ]\n }\n}\n\nexport const xAiGrokUsageRecording: FixtureRecording = {\n fixtureId: 'xai.grok.usage.snapshot.synthetic',\n caseId: 'xai.grok.usage.snapshot',\n request: {\n method: 'GET',\n path: '/v1/billing',\n query: '?format=credits',\n headers: {\n accept: 'application/json'\n }\n },\n response: {\n status: 200,\n headers: {\n 'content-type': 'application/json'\n },\n streamed: false,\n chunks: [\n '{\"config\":{\"creditUsagePercent\":37.5,\"currentPeriod\":{\"type\":\"monthly\",\"start\":\"2026-09-01T00:00:00.000Z\",\"end\":\"2026-10-01T00:00:00.000Z\"}}}'\n ]\n }\n}\n"],"mappings":";AASA,MAAa,gCAAkD;CAC7D,WAAW;CACX,QAAQ;CACR,SAAS;EACP,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS,EACP,QAAQ,mBACV;CACF;CACA,UAAU;EACR,QAAQ;EACR,SAAS,EACP,gBAAgB,mBAClB;EACA,UAAU;EACV,QAAQ,CACN
|
|
1
|
+
{"version":3,"file":"subscription-usage-recordings.mjs","names":[],"sources":["../src/subscription-usage-recordings.ts"],"sourcesContent":["/**\n * Subscription-usage recordings the `/anthropic`, `/codex`, and `/xai` usage routes answer from.\n *\n * Copied as data from the committed (synthetic, unverified) conformance fixtures; never imported.\n * `test/fixture-recordings.test.ts` fails when a fixture changes and this copy does not. Internal;\n * not a package export.\n */\nimport type { FixtureRecording } from './fixture-route.ts'\n\nexport const anthropicClaudeUsageRecording: FixtureRecording = {\n fixtureId: 'anthropic.claude.usage.snapshot.synthetic',\n caseId: 'anthropic.claude.usage.snapshot',\n request: {\n method: 'GET',\n path: '/api/oauth/usage',\n query: '',\n headers: {\n accept: 'application/json'\n }\n },\n response: {\n status: 200,\n headers: {\n 'content-type': 'application/json'\n },\n streamed: false,\n chunks: [\n '{\"five_hour\":{\"utilization\":18,\"resets_at\":\"2026-10-01T05:00:00.000Z\"},\"seven_day\":{\"utilization\":42,\"resets_at\":\"2026-10-06T00:00:00.000Z\"},\"limits\":[{\"kind\":\"weekly_scoped\",\"percent\":64,\"resets_at\":\"2026-10-06T00:00:00.000Z\",\"scope\":{\"model\":{\"id\":null,\"display_name\":\"Opus\"}}}]}'\n ]\n }\n}\n\nexport const codexUsageRecording: FixtureRecording = {\n fixtureId: 'openai.codex.usage.snapshot.synthetic',\n caseId: 'openai.codex.usage.snapshot',\n request: {\n method: 'GET',\n path: '/backend-api/wham/usage',\n query: '',\n headers: {\n accept: 'application/json'\n }\n },\n response: {\n status: 200,\n headers: {\n 'content-type': 'application/json'\n },\n streamed: false,\n chunks: [\n '{\"rate_limit\":{\"primary_window\":{\"used_percent\":23,\"limit_window_seconds\":18000,\"reset_after_seconds\":7200,\"reset_at\":1790007200},\"secondary_window\":{\"used_percent\":51,\"limit_window_seconds\":604800,\"reset_after_seconds\":259200,\"reset_at\":1790259200}}}'\n ]\n }\n}\n\nexport const xAiGrokUsageRecording: FixtureRecording = {\n fixtureId: 'xai.grok.usage.snapshot.synthetic',\n caseId: 'xai.grok.usage.snapshot',\n request: {\n method: 'GET',\n path: '/v1/billing',\n query: '?format=credits',\n headers: {\n accept: 'application/json'\n }\n },\n response: {\n status: 200,\n headers: {\n 'content-type': 'application/json'\n },\n streamed: false,\n chunks: [\n '{\"config\":{\"creditUsagePercent\":37.5,\"currentPeriod\":{\"type\":\"monthly\",\"start\":\"2026-09-01T00:00:00.000Z\",\"end\":\"2026-10-01T00:00:00.000Z\"}}}'\n ]\n }\n}\n"],"mappings":";AASA,MAAa,gCAAkD;CAC7D,WAAW;CACX,QAAQ;CACR,SAAS;EACP,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS,EACP,QAAQ,mBACV;CACF;CACA,UAAU;EACR,QAAQ;EACR,SAAS,EACP,gBAAgB,mBAClB;EACA,UAAU;EACV,QAAQ,CACN,iUACF;CACF;AACF;AAEA,MAAa,sBAAwC;CACnD,WAAW;CACX,QAAQ;CACR,SAAS;EACP,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS,EACP,QAAQ,mBACV;CACF;CACA,UAAU;EACR,QAAQ;EACR,SAAS,EACP,gBAAgB,mBAClB;EACA,UAAU;EACV,QAAQ,CACN,mRACF;CACF;AACF;AAEA,MAAa,wBAA0C;CACrD,WAAW;CACX,QAAQ;CACR,SAAS;EACP,QAAQ;EACR,MAAM;EACN,OAAO;EACP,SAAS,EACP,QAAQ,mBACV;CACF;CACA,UAAU;EACR,QAAQ;EACR,SAAS,EACP,gBAAgB,mBAClB;EACA,UAAU;EACV,QAAQ,CACN,iKACF;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolk-sdk/emulators",
|
|
3
|
-
"version": "0.1.0-canary.
|
|
3
|
+
"version": "0.1.0-canary.116",
|
|
4
4
|
"description": "Experimental emulators for outside services: an Effect HttpClient router, Vercel AI Gateway, OpenAI Chat Completions, Anthropic Messages, OpenAI Responses (Codex, xAI Grok), and OpenCode Go fetch-handler emulators with subscription-usage routes, fixture-driven fake EmailClient and R2 (R2Presigner, R2ObjectClient) backends, stateful Fortnox, Microsoft Graph, Dropbox, Notion, Todoist, Telegram, GitHub, Google (Gmail, Calendar, Drive), LinkedIn search (Exa, Enrich Layer), and synthetic and Afloat MCP emulators, and a loopback Node server.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -140,13 +140,13 @@
|
|
|
140
140
|
},
|
|
141
141
|
"dependencies": {
|
|
142
142
|
"@emulators/core": "0.12.0",
|
|
143
|
-
"effect": "4.0.
|
|
143
|
+
"effect": "4.0.5"
|
|
144
144
|
},
|
|
145
145
|
"devDependencies": {
|
|
146
|
-
"@yolk-sdk/
|
|
147
|
-
"@yolk-sdk/conformance": "^0.1.0-canary.
|
|
148
|
-
"@yolk-sdk/
|
|
149
|
-
"@yolk-sdk/
|
|
146
|
+
"@yolk-sdk/agent": "^0.1.0-canary.116",
|
|
147
|
+
"@yolk-sdk/conformance": "^0.1.0-canary.116",
|
|
148
|
+
"@yolk-sdk/connectors": "^0.1.0-canary.116",
|
|
149
|
+
"@yolk-sdk/mcp": "^0.1.0-canary.116"
|
|
150
150
|
},
|
|
151
151
|
"scripts": {
|
|
152
152
|
"build": "tsdown",
|
|
@@ -25,7 +25,7 @@ export const anthropicClaudeUsageRecording: FixtureRecording = {
|
|
|
25
25
|
},
|
|
26
26
|
streamed: false,
|
|
27
27
|
chunks: [
|
|
28
|
-
'{"five_hour":{"utilization":18,"resets_at":"2026-10-01T05:00:00.000Z"},"seven_day":{"utilization":42,"resets_at":"2026-10-06T00:00:00.000Z"}}'
|
|
28
|
+
'{"five_hour":{"utilization":18,"resets_at":"2026-10-01T05:00:00.000Z"},"seven_day":{"utilization":42,"resets_at":"2026-10-06T00:00:00.000Z"},"limits":[{"kind":"weekly_scoped","percent":64,"resets_at":"2026-10-06T00:00:00.000Z","scope":{"model":{"id":null,"display_name":"Opus"}}}]}'
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
}
|