@dual-os/linear-api 6.0.4 → 6.0.6

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 (39) hide show
  1. package/Runner.js +229 -463
  2. package/Runner.js.map +5 -9
  3. package/bundle-inventory.json +1 -1
  4. package/dist/auth.js +4 -4
  5. package/dist/channel/internal/webhook.js +3 -3
  6. package/dist/channel/linear-app-client.js +3 -3
  7. package/dist/channel/linear-app-definition.js +3 -3
  8. package/dist/channel/linear-app.js +6 -6
  9. package/dist/generated/http.js +5 -5
  10. package/dist/generated/operations.js +6 -6
  11. package/dist/generated/plugin.js +8 -8
  12. package/dist/plugin.js +11 -11
  13. package/dist/triggers.js +7 -7
  14. package/dual-contracts.json +1 -0
  15. package/dual-plugin.json +1 -1
  16. package/package.json +1 -1
  17. package/{plugin-5bqv66ke.js → plugin-0jjx6wrv.js} +3 -3
  18. package/{plugin-9w5999vc.js → plugin-2j6qrbsr.js} +3 -3
  19. package/{plugin-dbxxf9k5.js → plugin-7kckxk75.js} +3 -3
  20. package/{plugin-d4a2ytg0.js → plugin-ahbd9ttm.js} +296 -303
  21. package/{plugin-d4a2ytg0.js.map → plugin-ahbd9ttm.js.map} +7 -9
  22. package/{plugin-s3mapcpn.js → plugin-cmxmbpzy.js} +3 -3
  23. package/{plugin-bcdkw9ac.js → plugin-d2qpfdcz.js} +5 -5
  24. package/{plugin-v0kgp19h.js → plugin-djc9kq8k.js} +54 -39
  25. package/{plugin-v0kgp19h.js.map → plugin-djc9kq8k.js.map} +5 -4
  26. package/{plugin-xv11dhcc.js → plugin-fxgg72q4.js} +5 -5
  27. package/{plugin-e503g25g.js → plugin-tcgb970h.js} +9 -9
  28. package/{plugin-e503g25g.js.map → plugin-tcgb970h.js.map} +2 -2
  29. package/{plugin-15tbf6dq.js → plugin-w5daqkj4.js} +2 -2
  30. package/{plugin-srg9rdjf.js → plugin-wemjvjrr.js} +2 -2
  31. /package/licenses/{@dual-os_sdk@0.8.1 → @dual-os_sdk@0.10.0}/LICENSE +0 -0
  32. /package/{plugin-5bqv66ke.js.map → plugin-0jjx6wrv.js.map} +0 -0
  33. /package/{plugin-9w5999vc.js.map → plugin-2j6qrbsr.js.map} +0 -0
  34. /package/{plugin-dbxxf9k5.js.map → plugin-7kckxk75.js.map} +0 -0
  35. /package/{plugin-s3mapcpn.js.map → plugin-cmxmbpzy.js.map} +0 -0
  36. /package/{plugin-bcdkw9ac.js.map → plugin-d2qpfdcz.js.map} +0 -0
  37. /package/{plugin-xv11dhcc.js.map → plugin-fxgg72q4.js.map} +0 -0
  38. /package/{plugin-15tbf6dq.js.map → plugin-w5daqkj4.js.map} +0 -0
  39. /package/{plugin-srg9rdjf.js.map → plugin-wemjvjrr.js.map} +0 -0
@@ -24,11 +24,11 @@ import {
24
24
  TaggedError2,
25
25
  Action_exports,
26
26
  Trigger_exports
27
- } from "./plugin-d4a2ytg0.js";
27
+ } from "./plugin-ahbd9ttm.js";
28
28
  import {
29
29
  mutation_webhookCreate2,
30
30
  mutation_webhookDelete2
31
- } from "./plugin-5bqv66ke.js";
31
+ } from "./plugin-0jjx6wrv.js";
32
32
 
33
33
  // dist/triggers.js
34
34
  var LinearSignatureError = class extends TaggedError2()("LinearSignatureError", {}) {
@@ -135,4 +135,4 @@ var handlers2 = { event: {
135
135
  export { triggers2, handlers2 };
136
136
 
137
137
  //# debugId=15AFE37A5253660164756E2164756E21
138
- //# sourceMappingURL=plugin-s3mapcpn.js.map
138
+ //# sourceMappingURL=plugin-cmxmbpzy.js.map
@@ -4,10 +4,10 @@ import {
4
4
  Action_exports,
5
5
  Group_exports,
6
6
  Plugin_exports
7
- } from "./plugin-d4a2ytg0.js";
7
+ } from "./plugin-ahbd9ttm.js";
8
8
  import {
9
9
  authMethods2
10
- } from "./plugin-9w5999vc.js";
10
+ } from "./plugin-2j6qrbsr.js";
11
11
  import {
12
12
  mutation_agentActivityCreate2,
13
13
  mutation_agentActivityCreatePrompt2,
@@ -521,11 +521,11 @@ import {
521
521
  query_webhooks2,
522
522
  query_workflowState2,
523
523
  query_workflowStates2
524
- } from "./plugin-5bqv66ke.js";
524
+ } from "./plugin-0jjx6wrv.js";
525
525
  import {
526
526
  triggers2,
527
527
  handlers2
528
- } from "./plugin-s3mapcpn.js";
528
+ } from "./plugin-cmxmbpzy.js";
529
529
 
530
530
  // dist/generated/plugin.js
531
531
  var mutation_agentActivityCreate = Action_exports.make("agent-activity-create", {
@@ -3612,4 +3612,4 @@ var linearApiPlugin2 = linearApiPluginBase2.pipe(Plugin_exports.provide(live), P
3612
3612
  export { linearApiPluginBase2, linearApiPlugin2 };
3613
3613
 
3614
3614
  //# debugId=C7700EAF472CA0F464756E2164756E21
3615
- //# sourceMappingURL=plugin-bcdkw9ac.js.map
3615
+ //# sourceMappingURL=plugin-d2qpfdcz.js.map
@@ -48,7 +48,7 @@ import {
48
48
  sort,
49
49
  zip,
50
50
  contains,
51
- empty2,
51
+ empty,
52
52
  map3,
53
53
  flatMap2,
54
54
  filterMap,
@@ -87,6 +87,7 @@ import {
87
87
  result,
88
88
  map4,
89
89
  mapError,
90
+ mapBoth,
90
91
  orDie,
91
92
  ignore,
92
93
  serviceOption,
@@ -105,11 +106,10 @@ import {
105
106
  toEpochMillis,
106
107
  formatIso,
107
108
  formatIsoOffset,
109
+ empty2,
108
110
  empty3,
109
- empty4,
110
111
  InvalidValue,
111
- compose2,
112
- transform,
112
+ compose,
113
113
  transformEffect,
114
114
  is,
115
115
  decodeUnknownEffect,
@@ -119,6 +119,7 @@ import {
119
119
  optionalKey,
120
120
  optional,
121
121
  toType,
122
+ flip,
122
123
  Literal,
123
124
  Unknown,
124
125
  String3,
@@ -130,6 +131,7 @@ import {
130
131
  Literals,
131
132
  NullOr,
132
133
  decodeTo,
134
+ TaggedStruct,
133
135
  Int,
134
136
  Natural,
135
137
  Defect,
@@ -153,7 +155,7 @@ import {
153
155
  runCollect,
154
156
  runHead,
155
157
  __exportAll3,
156
- empty6,
158
+ empty5,
157
159
  HttpClientError,
158
160
  InvalidUrlError,
159
161
  makeWith,
@@ -176,15 +178,14 @@ import {
176
178
  RequestInit,
177
179
  ActionHandlerError,
178
180
  fromHttpClientFailure,
179
- Schema,
181
+ File3,
182
+ read,
183
+ write,
180
184
  Key,
181
185
  Event,
182
186
  commandSchema,
183
- Service2,
184
- File3,
185
- read,
186
- write
187
- } from "./plugin-d4a2ytg0.js";
187
+ Service2
188
+ } from "./plugin-ahbd9ttm.js";
188
189
 
189
190
  // ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/random.js
190
191
  var Random = /* @__PURE__ */ Reference("effect/Random", {
@@ -387,7 +388,7 @@ class Retry extends (/* @__PURE__ */ TaggedClass("Retry")) {
387
388
  }
388
389
  }
389
390
 
390
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/Mcp.js
391
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Mcp.js
391
392
  var McpError = class extends TaggedError2()("McpError", {
392
393
  cause: optional(Defect()),
393
394
  message: String3
@@ -433,7 +434,7 @@ var responseTo = fnUntraced(function* (id, method, response) {
433
434
  const payloads = match3(pipe(response.headers["content-type"] ?? "", startsWith("text/event-stream")), {
434
435
  onFalse: () => fromEffect(response.text),
435
436
  onTrue: () => unwrap2(sync(() => {
436
- const events = make5(empty2());
437
+ const events = make5(empty());
437
438
  const parser = makeParser((event) => {
438
439
  if (event._tag === "Event")
439
440
  update(events, append(event.data));
@@ -446,7 +447,7 @@ var responseTo = fnUntraced(function* (id, method, response) {
446
447
  message: error.message
447
448
  }));
448
449
  const ready = get2(events);
449
- set(events, empty2());
450
+ set(events, empty());
450
451
  return succeed4(ready);
451
452
  }), flatMap4(fromIterable));
452
453
  }))
@@ -525,7 +526,18 @@ var listTools = fn("Mcp.listTools")(function* (client, endpoint, headers) {
525
526
  };
526
527
  }, scoped);
527
528
 
528
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/Http.js
529
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/ToolFile.js
530
+ var Schema = TaggedStruct("ToolFile", {
531
+ contentBase64: String3.annotate({
532
+ contentEncoding: "base64",
533
+ description: "Complete file bytes in Base64. Preserve this field without truncation."
534
+ }),
535
+ contentType: NullOr(String3),
536
+ filename: NullOr(String3),
537
+ sizeBytes: Natural
538
+ });
539
+
540
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Http.js
529
541
  var Http_exports = /* @__PURE__ */ __exportAll3({
530
542
  Base64FromFile: () => Base64FromFile2,
531
543
  Base64UrlFromFile: () => Base64UrlFromFile2,
@@ -626,11 +638,14 @@ var utf8 = new TextDecoder("utf-8", { fatal: true });
626
638
  function sniff(bytes) {
627
639
  return pipe(findFirst(signatures, (signature) => every(signature[1], (part) => every(part[1], (byte, index) => bytes[part[0] + index] === byte))), map((signature) => signature[0]), orElse(() => liftPredicate("text/plain", () => isSuccess(try_(() => utf8.decode(bytes))))), getOrNull);
628
640
  }
641
+ function fileContentType(bytes, declared) {
642
+ return declared === null || pipe(declared, startsWith("application/octet-stream")) ? sniff(bytes) ?? declared : declared;
643
+ }
629
644
  function toolFile(bytes, declared, filename) {
630
645
  return {
631
646
  _tag: "ToolFile",
632
647
  contentBase64: encode(bytes),
633
- contentType: declared === null || pipe(declared, startsWith("application/octet-stream")) ? sniff(bytes) ?? declared : declared,
648
+ contentType: fileContentType(bytes, declared),
634
649
  filename,
635
650
  sizeBytes: bytes.byteLength
636
651
  };
@@ -668,25 +683,23 @@ function textOf(carrier, content) {
668
683
  return `data:${content.contentType ?? sniff(content.bytes) ?? "application/octet-stream"};base64,${encode(content.bytes)}`;
669
684
  }
670
685
  function fileFrom(carrier) {
671
- return String3.pipe(decodeTo(Schema, {
672
- decode: compose2(contentOf(carrier), transform((content) => toolFile(content.bytes, content.contentType, null))),
673
- encode: transformEffect((file, options) => map4(decodeBytes(file.contentBase64, options), (bytes) => textOf(carrier, {
674
- bytes,
675
- contentType: file.contentType
686
+ return String3.pipe(decodeTo(File3, {
687
+ decode: compose(contentOf(carrier), transformEffect((content, options) => pipe(write({
688
+ bytes: content.bytes,
689
+ contentType: fileContentType(content.bytes, content.contentType),
690
+ name: "file"
691
+ }), mapError((error) => new InvalidValue({ expected: error.message }, content, options))))),
692
+ encode: transformEffect((file, options) => pipe(read(file), mapBoth({
693
+ onSuccess: (bytes) => textOf(carrier, {
694
+ bytes,
695
+ contentType: file.contentType
696
+ }),
697
+ onFailure: (error) => new InvalidValue({ expected: error.message }, file, options)
676
698
  })))
677
699
  }));
678
700
  }
679
701
  function encodedFrom(carrier) {
680
- return File2.pipe(decodeTo(String3, {
681
- decode: transform((file) => textOf(carrier, {
682
- bytes: file.contentBase64,
683
- contentType: file.contentType ?? null
684
- })),
685
- encode: compose2(contentOf(carrier), transform((content) => ({
686
- contentBase64: content.bytes,
687
- contentType: content.contentType
688
- })))
689
- }));
702
+ return flip(fileFrom(carrier));
690
703
  }
691
704
  var FileFromBase642 = fileFrom("base64");
692
705
  var FileFromBase64Url2 = fileFrom("base64url");
@@ -833,7 +846,7 @@ function continuation2(request, nextLink) {
833
846
  const next = URL.canParse(nextLink) ? new URL(nextLink) : undefined;
834
847
  if (next === undefined || !isSafeUrl(nextLink) || next.pathname !== declared.pathname)
835
848
  return refused("A continuation URL must be an HTTPS link to the same operation path");
836
- return succeed4(makeWith(request.method, `${declared.origin}${next.pathname}${next.search}`, empty4, none(), request.headers, empty6));
849
+ return succeed4(makeWith(request.method, `${declared.origin}${next.pathname}${next.search}`, empty3, none(), request.headers, empty5));
837
850
  }
838
851
  function preauthenticated2(method, url, ...steps) {
839
852
  if (!isSafeUrl(url))
@@ -849,8 +862,8 @@ function redirect(response) {
849
862
  return;
850
863
  const sent = response.request;
851
864
  const url = new URL(location, sent.url);
852
- const request = response.status === 303 && sent.method !== "GET" && sent.method !== "HEAD" || (response.status === 301 || response.status === 302) && sent.method === "POST" ? setBody(setMethod(sent, "GET"), empty6) : sent;
853
- return url.origin === new URL(sent.url).origin ? setUrl(request, url) : setUrl(makeWith(request.method, "", empty4, none(), empty3, request.body), url);
865
+ const request = response.status === 303 && sent.method !== "GET" && sent.method !== "HEAD" || (response.status === 301 || response.status === 302) && sent.method === "POST" ? setBody(setMethod(sent, "GET"), empty5) : sent;
866
+ return url.origin === new URL(sent.url).origin ? setUrl(request, url) : setUrl(makeWith(request.method, "", empty3, none(), empty2, request.body), url);
854
867
  }
855
868
  function follow(client, response, redirects) {
856
869
  const next = redirect(response);
@@ -878,12 +891,14 @@ var read2 = fnUntraced(function* (response, body) {
878
891
  }
879
892
  const bytes = new Uint8Array(yield* response.arrayBuffer);
880
893
  const name = dispositionName(response.headers["content-disposition"]);
881
- if (body === "file")
894
+ if (body === "file") {
895
+ const declared = response.headers["content-type"] ?? null;
882
896
  return yield* pipe(write({
883
897
  bytes,
884
- contentType: getOrNull(fromUndefinedOr(response.headers["content-type"])),
898
+ contentType: fileContentType(bytes, declared),
885
899
  name: name ?? "file"
886
900
  }), mapError(fileFailed));
901
+ }
887
902
  return toolFile(bytes, response.headers["content-type"] ?? null, name ?? null);
888
903
  });
889
904
  function make2(auth) {
@@ -1103,7 +1118,7 @@ Content-Type: ${contentType}\r
1103
1118
  };
1104
1119
  }
1105
1120
 
1106
- // ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannelConformance.js
1121
+ // ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannelConformance.js
1107
1122
  var Command = commandSchema(Json);
1108
1123
  var Fixture = Struct({
1109
1124
  activate: Command,
@@ -1253,5 +1268,5 @@ var run = fn("AgentChannelConformance.run")(function* (input) {
1253
1268
 
1254
1269
  export { Http_exports, File2, FileFromBase642, FileFromBase64Url2, Base64FromFile2, Base64UrlFromFile2, FileFromDataUri2, DataUriFromFile2, DateTimeFromUnixSeconds2, UnixSecondsFromDateTime2, DateTimeFromRfc28222, Rfc2822FromDateTime2, decoded2, path2, literal2, segments2, params2, form2, continuation2, preauthenticated2 };
1255
1270
 
1256
- //# debugId=9F07116ACF89E21E64756E2164756E21
1257
- //# sourceMappingURL=plugin-v0kgp19h.js.map
1271
+ //# debugId=765BA1D1F89E54B564756E2164756E21
1272
+ //# sourceMappingURL=plugin-djc9kq8k.js.map