skilld-sdk 0.1.1 → 0.2.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.
@@ -44,7 +44,7 @@ declare const SKILLD_V1_ERROR_TITLES: {
44
44
  readonly SERVICE_UNAVAILABLE: "Service unavailable";
45
45
  };
46
46
  /** Every operation can answer these, so no descriptor lists them. */
47
- declare const SKILLD_V1_IMPLICIT_ERRORS: readonly ["INTERNAL_ERROR", "SERVICE_UNAVAILABLE"];
47
+ declare const SKILLD_V1_IMPLICIT_ERRORS: readonly ["RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE"];
48
48
  /** A retry can succeed for these codes, and for no others. */
49
49
  declare const SKILLD_V1_RETRYABLE_ERRORS: ReadonlySet<SkilldV1ErrorCode>;
50
50
  type SkilldV1Method = typeof SKILLD_V1_METHODS[number];
@@ -917,7 +917,7 @@ declare const likesV1: SkilldV1Registry<{
917
917
  readonly status: 204;
918
918
  readonly body: null;
919
919
  };
920
- readonly errors: readonly ["INVALID_REQUEST", "AUTH_REQUIRED", "NOT_FOUND", "RATE_LIMITED"];
920
+ readonly errors: readonly ["INVALID_REQUEST", "AUTH_REQUIRED", "NOT_FOUND"];
921
921
  readonly lifecycle: {
922
922
  readonly introduced: "1.0.0";
923
923
  };
@@ -3742,6 +3742,25 @@ declare const skillDetailSchema: CompatibleSchema<z.ZodObject<{
3742
3742
  readonly generatedSummary: z.ZodNullable<z.ZodString>;
3743
3743
  /** The SKILL.md text the registry last read, frontmatter included. */
3744
3744
  readonly markdown: z.ZodNullable<z.ZodString>;
3745
+ /**
3746
+ * What the SKILL.md and the file names ask an Agent to do, matched by the
3747
+ * fixed rules in `skilld-protocol/behaviors`. `skilld run` checks every file,
3748
+ * so it can find more. A behavior with tier `ask` stops `skilld run` until the
3749
+ * user approves it. An empty list never means the Skill does nothing.
3750
+ */
3751
+ readonly behaviors: z.ZodArray<z.ZodObject<{
3752
+ id: z.ZodString;
3753
+ tier: z.ZodEnum<{
3754
+ ask: "ask";
3755
+ show: "show";
3756
+ }>;
3757
+ label: z.ZodString;
3758
+ locations: z.ZodArray<z.ZodObject<{
3759
+ path: z.ZodString;
3760
+ line: z.ZodNullable<z.ZodNumber>;
3761
+ }, z.core.$strict>>;
3762
+ total: z.ZodNumber;
3763
+ }, z.core.$strict>>;
3745
3764
  readonly owner: z.ZodString;
3746
3765
  readonly repository: z.ZodString;
3747
3766
  readonly name: z.ZodString;
@@ -3779,6 +3798,25 @@ declare const skillDetailSchema: CompatibleSchema<z.ZodObject<{
3779
3798
  readonly generatedSummary: z.ZodNullable<z.ZodString>;
3780
3799
  /** The SKILL.md text the registry last read, frontmatter included. */
3781
3800
  readonly markdown: z.ZodNullable<z.ZodString>;
3801
+ /**
3802
+ * What the SKILL.md and the file names ask an Agent to do, matched by the
3803
+ * fixed rules in `skilld-protocol/behaviors`. `skilld run` checks every file,
3804
+ * so it can find more. A behavior with tier `ask` stops `skilld run` until the
3805
+ * user approves it. An empty list never means the Skill does nothing.
3806
+ */
3807
+ readonly behaviors: z.ZodArray<z.ZodObject<{
3808
+ id: z.ZodString;
3809
+ tier: z.ZodEnum<{
3810
+ ask: "ask";
3811
+ show: "show";
3812
+ }>;
3813
+ label: z.ZodString;
3814
+ locations: z.ZodArray<z.ZodObject<{
3815
+ path: z.ZodString;
3816
+ line: z.ZodNullable<z.ZodNumber>;
3817
+ }, z.core.$strict>>;
3818
+ total: z.ZodNumber;
3819
+ }, z.core.$strict>>;
3782
3820
  readonly owner: z.ZodString;
3783
3821
  readonly repository: z.ZodString;
3784
3822
  readonly name: z.ZodString;
@@ -3953,6 +3991,25 @@ declare const skillsV1: SkilldV1Registry<{
3953
3991
  readonly generatedSummary: z.ZodNullable<z.ZodString>;
3954
3992
  /** The SKILL.md text the registry last read, frontmatter included. */
3955
3993
  readonly markdown: z.ZodNullable<z.ZodString>;
3994
+ /**
3995
+ * What the SKILL.md and the file names ask an Agent to do, matched by the
3996
+ * fixed rules in `skilld-protocol/behaviors`. `skilld run` checks every file,
3997
+ * so it can find more. A behavior with tier `ask` stops `skilld run` until the
3998
+ * user approves it. An empty list never means the Skill does nothing.
3999
+ */
4000
+ readonly behaviors: z.ZodArray<z.ZodObject<{
4001
+ id: z.ZodString;
4002
+ tier: z.ZodEnum<{
4003
+ ask: "ask";
4004
+ show: "show";
4005
+ }>;
4006
+ label: z.ZodString;
4007
+ locations: z.ZodArray<z.ZodObject<{
4008
+ path: z.ZodString;
4009
+ line: z.ZodNullable<z.ZodNumber>;
4010
+ }, z.core.$strict>>;
4011
+ total: z.ZodNumber;
4012
+ }, z.core.$strict>>;
3956
4013
  readonly owner: z.ZodString;
3957
4014
  readonly repository: z.ZodString;
3958
4015
  readonly name: z.ZodString;
@@ -3990,6 +4047,25 @@ declare const skillsV1: SkilldV1Registry<{
3990
4047
  readonly generatedSummary: z.ZodNullable<z.ZodString>;
3991
4048
  /** The SKILL.md text the registry last read, frontmatter included. */
3992
4049
  readonly markdown: z.ZodNullable<z.ZodString>;
4050
+ /**
4051
+ * What the SKILL.md and the file names ask an Agent to do, matched by the
4052
+ * fixed rules in `skilld-protocol/behaviors`. `skilld run` checks every file,
4053
+ * so it can find more. A behavior with tier `ask` stops `skilld run` until the
4054
+ * user approves it. An empty list never means the Skill does nothing.
4055
+ */
4056
+ readonly behaviors: z.ZodArray<z.ZodObject<{
4057
+ id: z.ZodString;
4058
+ tier: z.ZodEnum<{
4059
+ ask: "ask";
4060
+ show: "show";
4061
+ }>;
4062
+ label: z.ZodString;
4063
+ locations: z.ZodArray<z.ZodObject<{
4064
+ path: z.ZodString;
4065
+ line: z.ZodNullable<z.ZodNumber>;
4066
+ }, z.core.$strict>>;
4067
+ total: z.ZodNumber;
4068
+ }, z.core.$strict>>;
3993
4069
  readonly owner: z.ZodString;
3994
4070
  readonly repository: z.ZodString;
3995
4071
  readonly name: z.ZodString;
@@ -4010,7 +4086,7 @@ declare const skillsV1: SkilldV1Registry<{
4010
4086
  };
4011
4087
  readonly docs: {
4012
4088
  readonly summary: "Get a Skill";
4013
- readonly description: "One Skill with its provenance: the Owner, the exact SKILL.md, the commit the registry read, and the run and install commands.";
4089
+ readonly description: "One Skill with its provenance: the Owner, the exact SKILL.md, the commit the registry read, and the run and install commands. `behaviors` lists what the SKILL.md and the file names ask an Agent to do. `skilld run` checks every file, so it can find more. A behavior with tier `ask` stops `skilld run` until the user approves it.";
4014
4090
  readonly tag: "Skills";
4015
4091
  readonly examples: readonly [{
4016
4092
  readonly request: {
@@ -4036,6 +4112,16 @@ declare const skillsV1: SkilldV1Registry<{
4036
4112
  }];
4037
4113
  readonly generatedSummary: "Checks interface code against a published list of web design rules.";
4038
4114
  readonly markdown: "---\nname: web-design-guidelines\ndescription: Review UI code for compliance with web interface guidelines.\n---\n\n# Web Design Guidelines\n";
4115
+ readonly behaviors: readonly [{
4116
+ readonly id: "shell";
4117
+ readonly tier: "show";
4118
+ readonly label: "Runs shell commands";
4119
+ readonly locations: readonly [{
4120
+ readonly path: "SKILL.md";
4121
+ readonly line: 12;
4122
+ }];
4123
+ readonly total: 1;
4124
+ }];
4039
4125
  readonly owner: "vercel-labs";
4040
4126
  readonly repository: "agent-skills";
4041
4127
  readonly name: "web-design-guidelines";
@@ -4272,6 +4358,19 @@ declare const skilldV1Protocol: {
4272
4358
  }, import("zod/v4/core").$strict>>;
4273
4359
  readonly generatedSummary: import("zod").ZodNullable<import("zod").ZodString>;
4274
4360
  readonly markdown: import("zod").ZodNullable<import("zod").ZodString>;
4361
+ readonly behaviors: import("zod").ZodArray<import("zod").ZodObject<{
4362
+ id: import("zod").ZodString;
4363
+ tier: import("zod").ZodEnum<{
4364
+ ask: "ask";
4365
+ show: "show";
4366
+ }>;
4367
+ label: import("zod").ZodString;
4368
+ locations: import("zod").ZodArray<import("zod").ZodObject<{
4369
+ path: import("zod").ZodString;
4370
+ line: import("zod").ZodNullable<import("zod").ZodNumber>;
4371
+ }, import("zod/v4/core").$strict>>;
4372
+ total: import("zod").ZodNumber;
4373
+ }, import("zod/v4/core").$strict>>;
4275
4374
  readonly owner: import("zod").ZodString;
4276
4375
  readonly repository: import("zod").ZodString;
4277
4376
  readonly name: import("zod").ZodString;
@@ -4300,6 +4399,19 @@ declare const skilldV1Protocol: {
4300
4399
  }, import("zod/v4/core").$strict>>;
4301
4400
  readonly generatedSummary: import("zod").ZodNullable<import("zod").ZodString>;
4302
4401
  readonly markdown: import("zod").ZodNullable<import("zod").ZodString>;
4402
+ readonly behaviors: import("zod").ZodArray<import("zod").ZodObject<{
4403
+ id: import("zod").ZodString;
4404
+ tier: import("zod").ZodEnum<{
4405
+ ask: "ask";
4406
+ show: "show";
4407
+ }>;
4408
+ label: import("zod").ZodString;
4409
+ locations: import("zod").ZodArray<import("zod").ZodObject<{
4410
+ path: import("zod").ZodString;
4411
+ line: import("zod").ZodNullable<import("zod").ZodNumber>;
4412
+ }, import("zod/v4/core").$strict>>;
4413
+ total: import("zod").ZodNumber;
4414
+ }, import("zod/v4/core").$strict>>;
4303
4415
  readonly owner: import("zod").ZodString;
4304
4416
  readonly repository: import("zod").ZodString;
4305
4417
  readonly name: import("zod").ZodString;
@@ -4320,7 +4432,7 @@ declare const skilldV1Protocol: {
4320
4432
  };
4321
4433
  readonly docs: {
4322
4434
  readonly summary: "Get a Skill";
4323
- readonly description: "One Skill with its provenance: the Owner, the exact SKILL.md, the commit the registry read, and the run and install commands.";
4435
+ readonly description: "One Skill with its provenance: the Owner, the exact SKILL.md, the commit the registry read, and the run and install commands. `behaviors` lists what the SKILL.md and the file names ask an Agent to do. `skilld run` checks every file, so it can find more. A behavior with tier `ask` stops `skilld run` until the user approves it.";
4324
4436
  readonly tag: "Skills";
4325
4437
  readonly examples: readonly [{
4326
4438
  readonly request: {
@@ -4346,6 +4458,16 @@ declare const skilldV1Protocol: {
4346
4458
  }];
4347
4459
  readonly generatedSummary: "Checks interface code against a published list of web design rules.";
4348
4460
  readonly markdown: "---\nname: web-design-guidelines\ndescription: Review UI code for compliance with web interface guidelines.\n---\n\n# Web Design Guidelines\n";
4461
+ readonly behaviors: readonly [{
4462
+ readonly id: "shell";
4463
+ readonly tier: "show";
4464
+ readonly label: "Runs shell commands";
4465
+ readonly locations: readonly [{
4466
+ readonly path: "SKILL.md";
4467
+ readonly line: 12;
4468
+ }];
4469
+ readonly total: 1;
4470
+ }];
4349
4471
  readonly owner: "vercel-labs";
4350
4472
  readonly repository: "agent-skills";
4351
4473
  readonly name: "web-design-guidelines";
@@ -6198,7 +6320,7 @@ declare const skilldV1Protocol: {
6198
6320
  readonly status: 204;
6199
6321
  readonly body: null;
6200
6322
  };
6201
- readonly errors: readonly ["INVALID_REQUEST", "AUTH_REQUIRED", "NOT_FOUND", "RATE_LIMITED"];
6323
+ readonly errors: readonly ["INVALID_REQUEST", "AUTH_REQUIRED", "NOT_FOUND"];
6202
6324
  readonly lifecycle: {
6203
6325
  readonly introduced: "1.0.0";
6204
6326
  };
package/dist/contract.mjs CHANGED
@@ -59,7 +59,11 @@ const SKILLD_V1_ERROR_TITLES = {
59
59
  SERVICE_UNAVAILABLE: "Service unavailable"
60
60
  };
61
61
  /** Every operation can answer these, so no descriptor lists them. */
62
- const SKILLD_V1_IMPLICIT_ERRORS = ["INTERNAL_ERROR", "SERVICE_UNAVAILABLE"];
62
+ const SKILLD_V1_IMPLICIT_ERRORS = [
63
+ "RATE_LIMITED",
64
+ "INTERNAL_ERROR",
65
+ "SERVICE_UNAVAILABLE"
66
+ ];
63
67
  /** A retry can succeed for these codes, and for no others. */
64
68
  const SKILLD_V1_RETRYABLE_ERRORS = /* @__PURE__ */ new Set(["RATE_LIMITED", "SERVICE_UNAVAILABLE"]);
65
69
  function pathParameterNames(path) {
@@ -697,8 +701,7 @@ const likesV1 = defineRegistry({
697
701
  errors: [
698
702
  "INVALID_REQUEST",
699
703
  "AUTH_REQUIRED",
700
- "NOT_FOUND",
701
- "RATE_LIMITED"
704
+ "NOT_FOUND"
702
705
  ],
703
706
  lifecycle: { introduced: "1.0.0" },
704
707
  docs: {
@@ -2243,7 +2246,23 @@ const skillDetailSchema = defineResponseObject({
2243
2246
  /** Machine-generated from the SKILL.md. Never written by the author. */
2244
2247
  generatedSummary: z.string().nullable(),
2245
2248
  /** The SKILL.md text the registry last read, frontmatter included. */
2246
- markdown: z.string().nullable()
2249
+ markdown: z.string().nullable(),
2250
+ /**
2251
+ * What the SKILL.md and the file names ask an Agent to do, matched by the
2252
+ * fixed rules in `skilld-protocol/behaviors`. `skilld run` checks every file,
2253
+ * so it can find more. A behavior with tier `ask` stops `skilld run` until the
2254
+ * user approves it. An empty list never means the Skill does nothing.
2255
+ */
2256
+ behaviors: z.array(z.strictObject({
2257
+ id: z.string(),
2258
+ tier: z.enum(["ask", "show"]),
2259
+ label: z.string(),
2260
+ locations: z.array(z.strictObject({
2261
+ path: z.string(),
2262
+ line: z.number().int().positive().nullable()
2263
+ })).max(5),
2264
+ total: countSchema
2265
+ }))
2247
2266
  });
2248
2267
  /**
2249
2268
  * The skilld.dev/skills listing. Stars order it by default. Likes order it
@@ -2345,7 +2364,7 @@ const skillsV1 = defineRegistry({
2345
2364
  lifecycle: { introduced: "1.0.0" },
2346
2365
  docs: {
2347
2366
  summary: "Get a Skill",
2348
- description: "One Skill with its provenance: the Owner, the exact SKILL.md, the commit the registry read, and the run and install commands.",
2367
+ description: "One Skill with its provenance: the Owner, the exact SKILL.md, the commit the registry read, and the run and install commands. `behaviors` lists what the SKILL.md and the file names ask an Agent to do. `skilld run` checks every file, so it can find more. A behavior with tier `ask` stops `skilld run` until the user approves it.",
2349
2368
  tag: "Skills",
2350
2369
  examples: [{
2351
2370
  request: { params: {
@@ -2369,7 +2388,17 @@ const skillsV1 = defineRegistry({
2369
2388
  size: 4210
2370
2389
  }],
2371
2390
  generatedSummary: "Checks interface code against a published list of web design rules.",
2372
- markdown: "---\nname: web-design-guidelines\ndescription: Review UI code for compliance with web interface guidelines.\n---\n\n# Web Design Guidelines\n"
2391
+ markdown: "---\nname: web-design-guidelines\ndescription: Review UI code for compliance with web interface guidelines.\n---\n\n# Web Design Guidelines\n",
2392
+ behaviors: [{
2393
+ id: "shell",
2394
+ tier: "show",
2395
+ label: "Runs shell commands",
2396
+ locations: [{
2397
+ path: "SKILL.md",
2398
+ line: 12
2399
+ }],
2400
+ total: 1
2401
+ }]
2373
2402
  }
2374
2403
  }]
2375
2404
  }