@tankpkg/sdk 0.15.7 → 0.16.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.
Files changed (2) hide show
  1. package/dist/index.mjs +41 -34
  2. package/package.json +14 -10
package/dist/index.mjs CHANGED
@@ -4166,6 +4166,42 @@ _enum([
4166
4166
  "org.member.remove",
4167
4167
  "org.delete"
4168
4168
  ]);
4169
+ const commandSchema = string().min(1, "command must not be empty");
4170
+ const argSchema = array(string()).default([]);
4171
+ const envSchema = record(string(), string()).optional();
4172
+ const remoteUrlSchema = string().url("remote must be a valid URL");
4173
+ const mcpServerSchema = union([object({
4174
+ command: commandSchema,
4175
+ args: argSchema,
4176
+ env: envSchema,
4177
+ requires_auth: literal(false).optional()
4178
+ }).strict(), object({
4179
+ remote: remoteUrlSchema,
4180
+ requires_auth: boolean().default(false),
4181
+ env: envSchema
4182
+ }).strict()]);
4183
+ const baseManifestFields = {
4184
+ name: string().min(1, "Name must not be empty").max(214, `Name must be 214 characters or fewer`).regex(/^@[a-z0-9-]+\/[a-z0-9][a-z0-9-]*$/, "Name must be scoped (@org/name), lowercase alphanumeric and hyphens"),
4185
+ version: string().regex(/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$/, "Version must be valid semver"),
4186
+ description: string().max(500, `Description must be 500 characters or fewer`).optional(),
4187
+ skills: record(string(), string()).optional(),
4188
+ permissions: permissionsSchema.optional(),
4189
+ repository: string().url("Repository must be a valid URL").optional(),
4190
+ visibility: _enum(["public", "private"]).optional(),
4191
+ audit: object({ min_score: number().min(0).max(10) }).strict().optional(),
4192
+ mcp_server: mcpServerSchema.optional()
4193
+ };
4194
+ object(baseManifestFields).strict();
4195
+ const publishConfigSchema = object({
4196
+ build: string().min(1, "publish.build must be a non-empty shell command").optional(),
4197
+ files: array(string().min(1)).optional()
4198
+ }).strict();
4199
+ object({
4200
+ ...baseManifestFields,
4201
+ atoms: array(record(string(), unknown())).optional(),
4202
+ includes: array(string()).optional(),
4203
+ publish: publishConfigSchema.optional()
4204
+ }).strict();
4169
4205
  const promptIRSchema = object({
4170
4206
  kind: literal("prompt"),
4171
4207
  name: string().min(1, "Prompt name must not be empty"),
@@ -4204,8 +4240,9 @@ const mcpServerConfigSchema = object({
4204
4240
  args: array(string()).optional(),
4205
4241
  env: record(string(), string()).optional(),
4206
4242
  runtime: string().min(1).optional(),
4207
- entry: string().min(1).optional()
4208
- }).strict().refine((data) => data.command || data.runtime && data.entry, "MCP config must have either \"command\" or both \"runtime\" and \"entry\"");
4243
+ entry: string().min(1).optional(),
4244
+ package: string().min(1).optional()
4245
+ }).strict().refine((data) => Boolean(data.command) || Boolean(data.runtime && (data.entry || data.package)), "MCP config must have either \"command\" or \"runtime\" plus one of \"entry\"/\"package\"");
4209
4246
  const toolIRSchema = object({
4210
4247
  kind: literal("tool"),
4211
4248
  name: string().min(1, "Tool name must not be empty"),
@@ -4234,22 +4271,9 @@ object({
4234
4271
  permissions: permissionsSchema.optional(),
4235
4272
  repository: string().url("Repository must be a valid URL").optional(),
4236
4273
  visibility: _enum(["public", "private"]).optional(),
4237
- audit: object({ min_score: number().min(0).max(10) }).strict().optional()
4274
+ audit: object({ min_score: number().min(0).max(10) }).strict().optional(),
4275
+ publish: publishConfigSchema.optional()
4238
4276
  }).strict();
4239
- const commandSchema = string().min(1, "command must not be empty");
4240
- const argSchema = array(string()).default([]);
4241
- const envSchema = record(string(), string()).optional();
4242
- const remoteUrlSchema = string().url("remote must be a valid URL");
4243
- const mcpServerSchema = union([object({
4244
- command: commandSchema,
4245
- args: argSchema,
4246
- env: envSchema,
4247
- requires_auth: literal(false).optional()
4248
- }).strict(), object({
4249
- remote: remoteUrlSchema,
4250
- requires_auth: boolean().default(false),
4251
- env: envSchema
4252
- }).strict()]);
4253
4277
  const perToolOverrideSchema = object({
4254
4278
  scan: boolean().optional(),
4255
4279
  blockOnMatch: boolean().optional()
@@ -4260,23 +4284,6 @@ object({
4260
4284
  resetPinsOnMismatch: boolean().optional(),
4261
4285
  perTool: record(string(), perToolOverrideSchema).optional()
4262
4286
  }).strict();
4263
- const baseManifestFields = {
4264
- name: string().min(1, "Name must not be empty").max(214, `Name must be 214 characters or fewer`).regex(/^@[a-z0-9-]+\/[a-z0-9][a-z0-9-]*$/, "Name must be scoped (@org/name), lowercase alphanumeric and hyphens"),
4265
- version: string().regex(/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$/, "Version must be valid semver"),
4266
- description: string().max(500, `Description must be 500 characters or fewer`).optional(),
4267
- skills: record(string(), string()).optional(),
4268
- permissions: permissionsSchema.optional(),
4269
- repository: string().url("Repository must be a valid URL").optional(),
4270
- visibility: _enum(["public", "private"]).optional(),
4271
- audit: object({ min_score: number().min(0).max(10) }).strict().optional(),
4272
- mcp_server: mcpServerSchema.optional()
4273
- };
4274
- object(baseManifestFields).strict();
4275
- object({
4276
- ...baseManifestFields,
4277
- atoms: array(record(string(), unknown())).optional(),
4278
- includes: array(string()).optional()
4279
- }).strict();
4280
4287
  const SKILL_SOURCES = [
4281
4288
  "registry",
4282
4289
  "github",
package/package.json CHANGED
@@ -1,8 +1,18 @@
1
1
  {
2
2
  "name": "@tankpkg/sdk",
3
- "version": "0.15.7",
3
+ "version": "0.16.0",
4
4
  "description": "Official TypeScript SDK for the Tank registry — search, download, install, and audit AI agent skills programmatically",
5
5
  "type": "module",
6
+ "homepage": "https://github.com/tankpkg/tank",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/tankpkg/tank.git",
10
+ "directory": "packages/sdk"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/tankpkg/tank/issues"
14
+ },
15
+ "license": "MIT",
6
16
  "exports": {
7
17
  ".": {
8
18
  "types": "./dist/index.d.ts",
@@ -23,23 +33,17 @@
23
33
  "lint:fix": "biome check --write ."
24
34
  },
25
35
  "dependencies": {
26
- "@internals/helpers": "workspace:*",
27
36
  "tar": "^7.5.11",
28
37
  "zod": "^4.3.6"
29
38
  },
30
39
  "devDependencies": {
40
+ "@internals/helpers": "workspace:*",
31
41
  "@internals/schemas": "workspace:*",
32
42
  "@types/node": "^25.5.0",
33
43
  "@types/tar": "^7.0.87",
34
44
  "tsdown": "^0.21.3",
35
45
  "vitest": "^4"
36
46
  },
37
- "peerDependencies": {
38
- "@internals/schemas": "workspace:*"
39
- },
40
- "peerDependenciesMeta": {
41
- "@internals/schemas": {
42
- "optional": true
43
- }
44
- }
47
+ "optionalDependencies": null,
48
+ "peerDependencies": null
45
49
  }