@avallon-labs/mcp 36.6.0-staging.913 → 36.7.0-staging.914

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/index.js CHANGED
@@ -54,5 +54,5 @@ function setupFetch() {
54
54
 
55
55
  // src/index.ts
56
56
  setupFetch();
57
- await import("./server-AI2JO577.js");
57
+ await import("./server-6RKVH344.js");
58
58
  //# sourceMappingURL=index.js.map
@@ -2393,6 +2393,53 @@ var deleteSecret = async (secretId, options) => {
2393
2393
  headers: res.headers
2394
2394
  };
2395
2395
  };
2396
+ var getCreateScheduleUrl = () => {
2397
+ return `/v1/schedules`;
2398
+ };
2399
+ var createSchedule = async (createScheduleBody, options) => {
2400
+ const res = await fetch(getCreateScheduleUrl(), {
2401
+ ...options,
2402
+ method: "POST",
2403
+ headers: { "Content-Type": "application/json", ...options?.headers },
2404
+ body: JSON.stringify(createScheduleBody)
2405
+ });
2406
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2407
+ const data = body ? JSON.parse(body) : {};
2408
+ return {
2409
+ data,
2410
+ status: res.status,
2411
+ headers: res.headers
2412
+ };
2413
+ };
2414
+ var getListSchedulesUrl = (params) => {
2415
+ const normalizedParams = new URLSearchParams();
2416
+ Object.entries(params || {}).forEach(([key, value]) => {
2417
+ if (value !== void 0) {
2418
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
2419
+ for (const [sk, sv] of Object.entries(value)) {
2420
+ if (sv !== void 0) normalizedParams.append(`${key}[${sk}]`, String(sv));
2421
+ }
2422
+ } else {
2423
+ normalizedParams.append(key, value === null ? "null" : String(value));
2424
+ }
2425
+ }
2426
+ });
2427
+ const stringifiedParams = normalizedParams.toString();
2428
+ return stringifiedParams.length > 0 ? `/v1/schedules?${stringifiedParams}` : `/v1/schedules`;
2429
+ };
2430
+ var listSchedules = async (params, options) => {
2431
+ const res = await fetch(getListSchedulesUrl(params), {
2432
+ ...options,
2433
+ method: "GET"
2434
+ });
2435
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
2436
+ const data = body ? JSON.parse(body) : {};
2437
+ return {
2438
+ data,
2439
+ status: res.status,
2440
+ headers: res.headers
2441
+ };
2442
+ };
2396
2443
  var getCreateToolUrl = () => {
2397
2444
  return `/v1/tools`;
2398
2445
  };
@@ -4121,6 +4168,28 @@ var deleteSecretHandler = async (args) => {
4121
4168
  ]
4122
4169
  };
4123
4170
  };
4171
+ var createScheduleHandler = async (args) => {
4172
+ const res = await createSchedule(args.bodyParams);
4173
+ return {
4174
+ content: [
4175
+ {
4176
+ type: "text",
4177
+ text: JSON.stringify(res)
4178
+ }
4179
+ ]
4180
+ };
4181
+ };
4182
+ var listSchedulesHandler = async (args) => {
4183
+ const res = await listSchedules(args.queryParams);
4184
+ return {
4185
+ content: [
4186
+ {
4187
+ type: "text",
4188
+ text: JSON.stringify(res)
4189
+ }
4190
+ ]
4191
+ };
4192
+ };
4124
4193
  var createToolHandler = async (args) => {
4125
4194
  const res = await createTool(args.bodyParams);
4126
4195
  return {
@@ -7560,7 +7629,8 @@ var GetProfileResponse = zod.object({
7560
7629
  "prompts:read",
7561
7630
  "prompts:write",
7562
7631
  "secrets:read",
7563
- "secrets:write"
7632
+ "secrets:write",
7633
+ "schedules:write"
7564
7634
  ])
7565
7635
  ),
7566
7636
  tenants: zod.object({
@@ -7700,6 +7770,124 @@ var DeleteSecretParams = zod.object({
7700
7770
  secretId: zod.string().uuid()
7701
7771
  });
7702
7772
  var DeleteSecretResponse = zod.object({});
7773
+ var createScheduleBodyRuleOneMinuteMin = 0;
7774
+ var createScheduleBodyRuleOneMinuteMax = 59;
7775
+ var createScheduleBodyRuleTwoHourMin = 0;
7776
+ var createScheduleBodyRuleTwoHourMax = 23;
7777
+ var createScheduleBodyRuleTwoMinuteMin = 0;
7778
+ var createScheduleBodyRuleTwoMinuteMax = 59;
7779
+ var createScheduleBodyRuleThreeWeekdayMax = 7;
7780
+ var createScheduleBodyRuleThreeHourMin = 0;
7781
+ var createScheduleBodyRuleThreeHourMax = 23;
7782
+ var createScheduleBodyRuleThreeMinuteMin = 0;
7783
+ var createScheduleBodyRuleThreeMinuteMax = 59;
7784
+ var createScheduleBodyNameMax = 200;
7785
+ var CreateScheduleBody = zod.object({
7786
+ action: zod.object({
7787
+ type: zod.literal("trigger_worker"),
7788
+ worker_id: zod.string().uuid(),
7789
+ scope: zod.union([
7790
+ zod.record(
7791
+ zod.string(),
7792
+ zod.union([zod.string(), zod.number(), zod.boolean(), zod.null()])
7793
+ ),
7794
+ zod.null()
7795
+ ]).optional().describe(
7796
+ "Scope of the runs this schedule creates. Omit or send null to run without artifacts."
7797
+ )
7798
+ }).describe("What the schedule does every time it fires"),
7799
+ rule: zod.union([
7800
+ zod.object({
7801
+ type: zod.literal("hourly"),
7802
+ minute: zod.number().min(createScheduleBodyRuleOneMinuteMin).max(createScheduleBodyRuleOneMinuteMax).describe("Minute, 0-59"),
7803
+ timezone: zod.string().describe('IANA time zone identifier, e.g. "America/Chicago"')
7804
+ }),
7805
+ zod.object({
7806
+ type: zod.literal("daily"),
7807
+ hour: zod.number().min(createScheduleBodyRuleTwoHourMin).max(createScheduleBodyRuleTwoHourMax).describe("Hour, 0-23"),
7808
+ minute: zod.number().min(createScheduleBodyRuleTwoMinuteMin).max(createScheduleBodyRuleTwoMinuteMax).describe("Minute, 0-59"),
7809
+ timezone: zod.string().describe('IANA time zone identifier, e.g. "America/Chicago"')
7810
+ }),
7811
+ zod.object({
7812
+ type: zod.literal("weekly"),
7813
+ weekday: zod.number().min(1).max(createScheduleBodyRuleThreeWeekdayMax).describe("ISO-8601 weekday, 1 = Monday through 7 = Sunday"),
7814
+ hour: zod.number().min(createScheduleBodyRuleThreeHourMin).max(createScheduleBodyRuleThreeHourMax).describe("Hour, 0-23"),
7815
+ minute: zod.number().min(createScheduleBodyRuleThreeMinuteMin).max(createScheduleBodyRuleThreeMinuteMax).describe("Minute, 0-59"),
7816
+ timezone: zod.string().describe('IANA time zone identifier, e.g. "America/Chicago"')
7817
+ })
7818
+ ]).describe("When the schedule fires, in the given time zone"),
7819
+ name: zod.string().min(1).max(createScheduleBodyNameMax).optional().describe('Human-readable name, e.g. "Nightly claim sweep"'),
7820
+ enabled: zod.boolean().optional().describe(
7821
+ "Whether the schedule starts firing right away. Defaults to true."
7822
+ )
7823
+ });
7824
+ var listSchedulesQueryCountDefault = 50;
7825
+ var listSchedulesQueryCountMax = 100;
7826
+ var listSchedulesQueryOffsetDefault = 0;
7827
+ var listSchedulesQueryOffsetMin = 0;
7828
+ var listSchedulesQuerySortByDefault = `created_at`;
7829
+ var listSchedulesQuerySortOrderDefault = `asc`;
7830
+ var ListSchedulesQueryParams = zod.object({
7831
+ worker_id: zod.string().uuid().optional().describe("Only schedules that trigger this worker"),
7832
+ count: zod.number().min(1).max(listSchedulesQueryCountMax).default(listSchedulesQueryCountDefault),
7833
+ offset: zod.number().min(listSchedulesQueryOffsetMin).default(listSchedulesQueryOffsetDefault),
7834
+ sort_by: zod.enum(["created_at", "next_run_at"]).default(listSchedulesQuerySortByDefault),
7835
+ sort_order: zod.enum(["asc", "desc"]).default(listSchedulesQuerySortOrderDefault)
7836
+ });
7837
+ var listSchedulesResponseRuleOneMinuteMin = 0;
7838
+ var listSchedulesResponseRuleOneMinuteMax = 59;
7839
+ var listSchedulesResponseRuleTwoHourMin = 0;
7840
+ var listSchedulesResponseRuleTwoHourMax = 23;
7841
+ var listSchedulesResponseRuleTwoMinuteMin = 0;
7842
+ var listSchedulesResponseRuleTwoMinuteMax = 59;
7843
+ var listSchedulesResponseRuleThreeWeekdayMax = 7;
7844
+ var listSchedulesResponseRuleThreeHourMin = 0;
7845
+ var listSchedulesResponseRuleThreeHourMax = 23;
7846
+ var listSchedulesResponseRuleThreeMinuteMin = 0;
7847
+ var listSchedulesResponseRuleThreeMinuteMax = 59;
7848
+ var ListSchedulesResponseItem = zod.object({
7849
+ id: zod.string().describe("Unique identifier for the schedule"),
7850
+ name: zod.union([zod.string(), zod.null()]).describe("Optional human-readable name"),
7851
+ action: zod.object({
7852
+ type: zod.literal("trigger_worker"),
7853
+ worker_id: zod.string().uuid(),
7854
+ scope: zod.union([
7855
+ zod.record(
7856
+ zod.string(),
7857
+ zod.union([zod.string(), zod.number(), zod.boolean(), zod.null()])
7858
+ ),
7859
+ zod.null()
7860
+ ]).optional().describe(
7861
+ "Scope of the runs this schedule creates. Omit or send null to run without artifacts."
7862
+ )
7863
+ }).describe("What the schedule does every time it fires"),
7864
+ rule: zod.union([
7865
+ zod.object({
7866
+ type: zod.literal("hourly"),
7867
+ minute: zod.number().min(listSchedulesResponseRuleOneMinuteMin).max(listSchedulesResponseRuleOneMinuteMax).describe("Minute, 0-59"),
7868
+ timezone: zod.string().describe('IANA time zone identifier, e.g. "America/Chicago"')
7869
+ }),
7870
+ zod.object({
7871
+ type: zod.literal("daily"),
7872
+ hour: zod.number().min(listSchedulesResponseRuleTwoHourMin).max(listSchedulesResponseRuleTwoHourMax).describe("Hour, 0-23"),
7873
+ minute: zod.number().min(listSchedulesResponseRuleTwoMinuteMin).max(listSchedulesResponseRuleTwoMinuteMax).describe("Minute, 0-59"),
7874
+ timezone: zod.string().describe('IANA time zone identifier, e.g. "America/Chicago"')
7875
+ }),
7876
+ zod.object({
7877
+ type: zod.literal("weekly"),
7878
+ weekday: zod.number().min(1).max(listSchedulesResponseRuleThreeWeekdayMax).describe("ISO-8601 weekday, 1 = Monday through 7 = Sunday"),
7879
+ hour: zod.number().min(listSchedulesResponseRuleThreeHourMin).max(listSchedulesResponseRuleThreeHourMax).describe("Hour, 0-23"),
7880
+ minute: zod.number().min(listSchedulesResponseRuleThreeMinuteMin).max(listSchedulesResponseRuleThreeMinuteMax).describe("Minute, 0-59"),
7881
+ timezone: zod.string().describe('IANA time zone identifier, e.g. "America/Chicago"')
7882
+ })
7883
+ ]).describe("When the schedule fires, in the given time zone"),
7884
+ enabled: zod.boolean().describe("Whether the schedule currently fires. Disabled never fires."),
7885
+ next_run_at: zod.union([zod.string().datetime({}), zod.null()]).describe("When the schedule fires next, in UTC. Null while disabled."),
7886
+ created_by: zod.string().describe("Actor that created the schedule"),
7887
+ created_at: zod.string().datetime({}).describe("Creation timestamp"),
7888
+ updated_at: zod.string().datetime({}).describe("Last update timestamp")
7889
+ });
7890
+ var ListSchedulesResponse = zod.array(ListSchedulesResponseItem);
7703
7891
  var CreateToolBody = zod.object({
7704
7892
  name: zod.string().min(1),
7705
7893
  code: zod.string().min(1),
@@ -9090,6 +9278,22 @@ server.tool(
9090
9278
  },
9091
9279
  deleteSecretHandler
9092
9280
  );
9281
+ server.tool(
9282
+ "createSchedule",
9283
+ "Create a schedule",
9284
+ {
9285
+ bodyParams: CreateScheduleBody
9286
+ },
9287
+ createScheduleHandler
9288
+ );
9289
+ server.tool(
9290
+ "listSchedules",
9291
+ "List schedules",
9292
+ {
9293
+ queryParams: ListSchedulesQueryParams
9294
+ },
9295
+ listSchedulesHandler
9296
+ );
9093
9297
  server.tool(
9094
9298
  "createTool",
9095
9299
  "Create tool",
@@ -9254,4 +9458,4 @@ var transport = new StdioServerTransport();
9254
9458
  server.connect(transport).then(() => {
9255
9459
  console.error("MCP server running on stdio");
9256
9460
  }).catch(console.error);
9257
- //# sourceMappingURL=server-AI2JO577.js.map
9461
+ //# sourceMappingURL=server-6RKVH344.js.map