@blazingagents/sdk 0.24.0 → 0.25.0
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/dist/contracts/api.d.ts +0 -245
- package/dist/contracts/api.js +0 -121
- package/dist/contracts/entities/agent-tools.d.ts +0 -4
- package/dist/contracts/entities/agent-tools.js +0 -15
- package/dist/contracts/entities/agents.d.ts +2 -109
- package/dist/contracts/entities/agents.js +15 -16
- package/dist/contracts/entities/artifacts.d.ts +0 -30
- package/dist/contracts/entities/artifacts.js +1 -36
- package/dist/contracts/entities/attribution.d.ts +0 -2
- package/dist/contracts/entities/chat-connections.d.ts +0 -3
- package/dist/contracts/entities/chat-connections.js +0 -3
- package/dist/contracts/entities/chat.d.ts +1 -17
- package/dist/contracts/entities/chat.js +4 -13
- package/dist/contracts/entities/mcp-connections.d.ts +0 -168
- package/dist/contracts/entities/mcp-connections.js +1 -171
- package/dist/contracts/entities/memories.d.ts +0 -8
- package/dist/contracts/entities/memories.js +2 -15
- package/dist/contracts/entities/merchant.d.ts +0 -19
- package/dist/contracts/entities/merchant.js +1 -26
- package/dist/contracts/entities/prompts.d.ts +1 -14
- package/dist/contracts/entities/prompts.js +2 -3
- package/dist/contracts/entities/providers.d.ts +0 -28
- package/dist/contracts/entities/providers.js +1 -24
- package/dist/contracts/entities/sessions.d.ts +0 -9
- package/dist/contracts/entities/sessions.js +4 -21
- package/dist/contracts/entities/skills.d.ts +0 -52
- package/dist/contracts/entities/skills.js +2 -60
- package/dist/contracts/entities/tasks.d.ts +1 -168
- package/dist/contracts/entities/tasks.js +5 -14
- package/dist/contracts/entities/tenants.d.ts +0 -6
- package/dist/contracts/entities/usage.d.ts +0 -1
- package/dist/contracts/entities/workspaces.d.ts +0 -6
- package/dist/contracts/entities/workspaces.js +2 -14
- package/dist/contracts/ids.d.ts +1 -68
- package/dist/contracts/ids.js +2 -91
- package/dist/contracts/index.d.ts +3 -3
- package/dist/contracts/index.js +3 -3
- package/dist/contracts/limitations.d.ts +8 -81
- package/dist/contracts/limitations.js +8 -82
- package/package.json +6 -6
|
@@ -2,34 +2,14 @@
|
|
|
2
2
|
* Effort-wide convention: every coded limit lives here as an UPPER_SNAKE_CASE
|
|
3
3
|
* constant. No scattered magic numbers.
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* API keys — max 5 per tenant, name ≤ 80 (docs/adr/0004).
|
|
7
|
-
*/
|
|
8
|
-
export const MAX_API_KEYS_PER_TENANT = 5;
|
|
9
|
-
export const MAX_API_KEY_NAME_LENGTH = 80;
|
|
10
|
-
/** API key token shape — `ba_` + 40 base62 chars (~230 bits entropy). */
|
|
11
|
-
export const API_KEY_BODY_LENGTH = 40;
|
|
12
|
-
// Display fragment — `ba_` + first 2 chars of the random body.
|
|
13
|
-
export const API_KEY_FRAGMENT_BODY_LENGTH = 2;
|
|
14
5
|
export const MAX_WORKSPACE_NAME_LENGTH = 80;
|
|
15
|
-
export const MAX_WORKSPACE_ARCHIVE_ENTRIES = 16_384;
|
|
16
|
-
export const DEFAULT_WORKSPACES_LIST_LIMIT = 50;
|
|
17
|
-
export const MAX_WORKSPACES_LIST_LIMIT = 200;
|
|
18
6
|
/**
|
|
19
|
-
* Agent Skills —
|
|
20
|
-
*
|
|
21
|
-
* specification accepted in ADR-0028.
|
|
7
|
+
* Agent Skills — frontmatter follows the Agent Skills specification accepted
|
|
8
|
+
* in ADR-0028.
|
|
22
9
|
*/
|
|
23
|
-
export const MAX_SKILLS_PER_AGENT = 100;
|
|
24
|
-
export const MAX_SKILL_UPLOAD_BYTES = 10 * 1024 * 1024;
|
|
25
|
-
export const MAX_SKILL_UNCOMPRESSED_BYTES = 10 * 1024 * 1024;
|
|
26
|
-
export const MAX_SKILL_FILES = 100;
|
|
27
10
|
export const MAX_SKILL_NAME_LENGTH = 64;
|
|
28
11
|
export const MAX_SKILL_DESCRIPTION_LENGTH = 1024;
|
|
29
|
-
export const MAX_SKILL_COMPATIBILITY_LENGTH = 500;
|
|
30
12
|
export const MAX_SKILL_COPY_DESTINATIONS = 30;
|
|
31
|
-
export const DEFAULT_SKILLS_LIST_LIMIT = 50;
|
|
32
|
-
export const MAX_SKILLS_LIST_LIMIT = 100;
|
|
33
13
|
export const DEFAULT_PROMPTS_LIST_LIMIT = 50;
|
|
34
14
|
export const MAX_PROMPTS_LIST_LIMIT = 100;
|
|
35
15
|
export const MAX_PROMPT_TEMPLATE_BYTES = 10 * 1024;
|
|
@@ -39,16 +19,9 @@ export const MAX_PROMPT_NAME_LENGTH = 80;
|
|
|
39
19
|
export const MAX_TASK_NAME_LENGTH = 80;
|
|
40
20
|
export const MAX_TASK_PROMPT_LENGTH = 6000;
|
|
41
21
|
export const MIN_TASK_INTERVAL_MS = 60_000;
|
|
42
|
-
/**
|
|
43
|
-
* Providers — max 20 per tenant, name ≤ 80.
|
|
44
|
-
*/
|
|
45
|
-
export const MAX_PROVIDERS_PER_TENANT = 20;
|
|
22
|
+
/** Providers — name ≤ 80. */
|
|
46
23
|
export const MAX_PROVIDER_NAME_LENGTH = 80;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* MCP Connections — max 50 per tenant, name ≤ 80, URL ≤ 2048.
|
|
50
|
-
*/
|
|
51
|
-
export const MAX_MCP_CONNECTIONS_PER_TENANT = 50;
|
|
24
|
+
/** MCP Connections — name ≤ 80, URL ≤ 2048. */
|
|
52
25
|
export const MAX_MCP_CONNECTIONS_PER_AGENT = 10;
|
|
53
26
|
export const MAX_MCP_CONNECTION_NAME_LENGTH = 80;
|
|
54
27
|
export const MAX_MCP_CONNECTION_URL_LENGTH = 2048;
|
|
@@ -61,54 +34,17 @@ export const MAX_MCP_SERVER_NAME_LENGTH = 200;
|
|
|
61
34
|
export const MAX_MCP_SERVER_VERSION_LENGTH = 100;
|
|
62
35
|
export const MAX_MCP_TOOL_NAME_LENGTH = 256;
|
|
63
36
|
export const MAX_MCP_TOOLS_PER_CONNECTION = 128;
|
|
64
|
-
export const MAX_MCP_TOOLS_PER_TURN = 256;
|
|
65
|
-
export const MAX_MCP_CONNECTION_SETUP_CONCURRENCY = 4;
|
|
66
|
-
export const MAX_MCP_TOOL_KEY_LENGTH = 63;
|
|
67
|
-
export const MAX_MCP_TOOL_DEFINITION_BYTES = 256 * 1024;
|
|
68
|
-
export const MAX_MCP_CONNECTION_TOOL_DEFINITIONS_BYTES = 1024 * 1024;
|
|
69
|
-
export const MAX_MCP_TOOL_RESULT_BYTES = 1024 * 1024;
|
|
70
37
|
export const MAX_MCP_ATTACHMENT_METADATA_KEYS = 32;
|
|
71
38
|
export const MAX_MCP_ATTACHMENT_METADATA_KEY_LENGTH = 64;
|
|
72
|
-
export const MAX_MCP_REQUEST_CONTEXT_BYTES = 16 * 1024;
|
|
73
39
|
/** Agents — name ≤ 80, instructions ≤ 3000. */
|
|
74
40
|
export const MAX_AGENT_NAME_LENGTH = 80;
|
|
75
41
|
export const DEFAULT_AGENTS_LIST_LIMIT = 50;
|
|
76
42
|
export const MAX_AGENTS_LIST_LIMIT = 100;
|
|
77
43
|
export const MAX_AGENT_INSTRUCTIONS_LENGTH = 3000;
|
|
78
|
-
/**
|
|
79
|
-
* Artifacts — 10 MiB per file, 10 publications per Tool call, and 100
|
|
80
|
-
* Artifacts per Session.
|
|
81
|
-
*/
|
|
44
|
+
/** Artifacts — 10 MiB per file. */
|
|
82
45
|
export const MAX_ARTIFACT_BYTES = 10 * 1024 * 1024;
|
|
83
|
-
|
|
84
|
-
export const MAX_ARTIFACTS_PER_SESSION = 100;
|
|
85
|
-
/**
|
|
86
|
-
* Sandbox operations — 30-second native Cloudflare commands under a bounded
|
|
87
|
-
* private HTTP caller budget that includes cold Container startup. File
|
|
88
|
-
* transfers are 10 MiB decoded under a 15 MiB authenticated internal JSON
|
|
89
|
-
* request.
|
|
90
|
-
*/
|
|
91
|
-
export const CLOUDFLARE_SANDBOX_EXEC_MS = 30_000;
|
|
92
|
-
export const MAX_SANDBOX_OPERATION_HTTP_MS = 160_000;
|
|
93
|
-
export const MAX_SANDBOX_FILE_TRANSFER_BYTES = 10 * 1024 * 1024;
|
|
94
|
-
export const MAX_SANDBOX_FILE_CHUNK_BYTES = 1024 * 1024;
|
|
95
|
-
export const MAX_SANDBOX_REQUEST_BODY_BYTES = 15 * 1024 * 1024;
|
|
96
|
-
/**
|
|
97
|
-
* Memories — one pool per Agent spanning all `userId` partitions, capped
|
|
98
|
-
* globally at 500 rows (LRU eviction on create), 10 KiB of text per memory
|
|
99
|
-
* (zod byte refine + DB `octet_length` check).
|
|
100
|
-
*/
|
|
101
|
-
export const MAX_MEMORIES_PER_AGENT = 500;
|
|
46
|
+
/** Memories — 10 KiB of text per memory. */
|
|
102
47
|
export const MAX_MEMORY_TEXT_BYTES = 10 * 1024;
|
|
103
|
-
export const DEFAULT_MEMORIES_LIST_LIMIT = 50;
|
|
104
|
-
export const MAX_MEMORIES_LIST_LIMIT = 100;
|
|
105
|
-
export const DEFAULT_MEMORY_TOOL_SEARCH_LIMIT = 10;
|
|
106
|
-
export const MAX_MEMORY_TOOL_SEARCH_LIMIT = 20;
|
|
107
|
-
/**
|
|
108
|
-
* Sessions — messages endpoint default limit 50, max 200.
|
|
109
|
-
*/
|
|
110
|
-
export const DEFAULT_SESSION_MESSAGES_LIMIT = 50;
|
|
111
|
-
export const MAX_SESSION_MESSAGES_LIMIT = 200;
|
|
112
48
|
/**
|
|
113
49
|
* Usage — range cap 31 days, default 30 days; top-N sessions default 50, max 200.
|
|
114
50
|
*/
|
|
@@ -126,19 +62,9 @@ export const MAX_QUOTA_RESET_DAY = 28;
|
|
|
126
62
|
*/
|
|
127
63
|
export const MAX_TENANT_NAME_LENGTH = 80;
|
|
128
64
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*/
|
|
132
|
-
export const TENANT_CREATION_BURST_LIMIT = 60;
|
|
133
|
-
export const TENANT_CREATION_BURST_WINDOW_MS = 60_000;
|
|
134
|
-
export const TENANT_CREATION_SUSTAINED_LIMIT = 1000;
|
|
135
|
-
export const TENANT_CREATION_SUSTAINED_WINDOW_MS = 86_400_000;
|
|
136
|
-
/**
|
|
137
|
-
* Merchant monetization (ADR-0048) — bindings/usage-event list paging, guard
|
|
138
|
-
* rule bounds, and the delivery-health summary window.
|
|
65
|
+
* Merchant monetization (ADR-0048) — guard rule bounds and the delivery-health
|
|
66
|
+
* summary window.
|
|
139
67
|
*/
|
|
140
|
-
export const DEFAULT_MERCHANT_LIST_LIMIT = 50;
|
|
141
|
-
export const MAX_MERCHANT_LIST_LIMIT = 200;
|
|
142
68
|
export const MAX_MERCHANT_PRODUCT_IDS = 100;
|
|
143
69
|
export const DEFAULT_MERCHANT_USAGE_SUMMARY_DAYS = 14;
|
|
144
70
|
export const MAX_MERCHANT_USAGE_SUMMARY_DAYS = 90;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blazingagents/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "TypeScript SDK for the Blazing Agents API",
|
|
5
5
|
"homepage": "https://docs.blazingagents.com",
|
|
6
6
|
"bugs": {
|
|
@@ -30,18 +30,17 @@
|
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
33
|
-
"check": "npm run typecheck && npm run test && npm run lint",
|
|
33
|
+
"check": "npm run typecheck && npm run test && npm run lint && npm run unused",
|
|
34
34
|
"fix": "ultracite fix",
|
|
35
35
|
"lint": "ultracite check",
|
|
36
36
|
"prepack": "npm run build",
|
|
37
37
|
"test": "vitest run --coverage",
|
|
38
38
|
"test:consumer": "node test-consumer.mjs",
|
|
39
|
-
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.tests.json"
|
|
39
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.tests.json",
|
|
40
|
+
"unused": "knip && knip --production --include exports,types,duplicates"
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"croner": "10.0.1"
|
|
43
|
-
"nanoid": "6.0.1",
|
|
44
|
-
"yaml": "2.9.0"
|
|
43
|
+
"croner": "10.0.1"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@biomejs/biome": "^2.5.8",
|
|
@@ -49,6 +48,7 @@
|
|
|
49
48
|
"@types/node": "^26.4.0",
|
|
50
49
|
"@vitest/coverage-v8": "^4.1.10",
|
|
51
50
|
"ai": "^7.0.84",
|
|
51
|
+
"knip": "^6.41.0",
|
|
52
52
|
"typescript": "^7.0.2",
|
|
53
53
|
"ultracite": "^7.10.2",
|
|
54
54
|
"vitest": "^4.1.10",
|