@dual-os/linear-api 6.0.5 → 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.
- package/Runner.js +3 -3
- package/Runner.js.map +2 -2
- package/bundle-inventory.json +1 -1
- package/dist/auth.js +4 -4
- package/dist/channel/internal/webhook.js +3 -3
- package/dist/channel/linear-app-client.js +3 -3
- package/dist/channel/linear-app-definition.js +3 -3
- package/dist/channel/linear-app.js +6 -6
- package/dist/generated/http.js +5 -5
- package/dist/generated/operations.js +6 -6
- package/dist/generated/plugin.js +8 -8
- package/dist/plugin.js +11 -11
- package/dist/triggers.js +7 -7
- package/dual-contracts.json +1 -0
- package/dual-plugin.json +1 -1
- package/package.json +1 -1
- package/{plugin-evq9z31a.js → plugin-0jjx6wrv.js} +3 -3
- package/{plugin-c5xtmfce.js → plugin-2j6qrbsr.js} +3 -3
- package/{plugin-292sech3.js → plugin-7kckxk75.js} +3 -3
- package/{plugin-9vdeenc2.js → plugin-ahbd9ttm.js} +159 -118
- package/{plugin-9vdeenc2.js.map → plugin-ahbd9ttm.js.map} +7 -8
- package/{plugin-jgac4d6v.js → plugin-cmxmbpzy.js} +3 -3
- package/{plugin-acwx0zjc.js → plugin-d2qpfdcz.js} +5 -5
- package/{plugin-0pkez622.js → plugin-djc9kq8k.js} +45 -30
- package/{plugin-0pkez622.js.map → plugin-djc9kq8k.js.map} +5 -4
- package/{plugin-5d2kw2pq.js → plugin-fxgg72q4.js} +5 -5
- package/{plugin-pbx41zqr.js → plugin-tcgb970h.js} +2 -2
- package/{plugin-aaq7c99y.js → plugin-w5daqkj4.js} +2 -2
- package/{plugin-03c4ezxj.js → plugin-wemjvjrr.js} +2 -2
- /package/licenses/{@dual-os_sdk@0.9.0 → @dual-os_sdk@0.10.0}/LICENSE +0 -0
- /package/{plugin-evq9z31a.js.map → plugin-0jjx6wrv.js.map} +0 -0
- /package/{plugin-c5xtmfce.js.map → plugin-2j6qrbsr.js.map} +0 -0
- /package/{plugin-292sech3.js.map → plugin-7kckxk75.js.map} +0 -0
- /package/{plugin-jgac4d6v.js.map → plugin-cmxmbpzy.js.map} +0 -0
- /package/{plugin-acwx0zjc.js.map → plugin-d2qpfdcz.js.map} +0 -0
- /package/{plugin-5d2kw2pq.js.map → plugin-fxgg72q4.js.map} +0 -0
- /package/{plugin-pbx41zqr.js.map → plugin-tcgb970h.js.map} +0 -0
- /package/{plugin-aaq7c99y.js.map → plugin-w5daqkj4.js.map} +0 -0
- /package/{plugin-03c4ezxj.js.map → plugin-wemjvjrr.js.map} +0 -0
|
@@ -3900,7 +3900,7 @@ var flatten3 = (self) => flatMap5(self, identity);
|
|
|
3900
3900
|
var map6 = /* @__PURE__ */ dual(2, (self, f) => new ContImpl(self, mapCont, f));
|
|
3901
3901
|
var mapEager = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMap(self, f) : map6(self, f));
|
|
3902
3902
|
var mapErrorEager = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMapError(self, f) : mapError3(self, f));
|
|
3903
|
-
var mapBothEager = /* @__PURE__ */ dual(2, (self, options) => effectIsExit(self) ? exitMapBoth(self, options) :
|
|
3903
|
+
var mapBothEager = /* @__PURE__ */ dual(2, (self, options) => effectIsExit(self) ? exitMapBoth(self, options) : mapBoth2(self, options));
|
|
3904
3904
|
var exitInterrupt = (fiberId) => exitFailCause(causeInterrupt(fiberId));
|
|
3905
3905
|
var exitIsSuccess = (self) => self._tag === "Success";
|
|
3906
3906
|
var exitIsFailure = (self) => self._tag === "Failure";
|
|
@@ -4021,7 +4021,7 @@ var catchReason2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, err
|
|
|
4021
4021
|
return orElse ? orElse(reason, e) : fail8(e);
|
|
4022
4022
|
}));
|
|
4023
4023
|
var mapError3 = /* @__PURE__ */ dual(2, (self, f) => catchCause(self, (cause) => failCause2(causeMap(cause, f))));
|
|
4024
|
-
var
|
|
4024
|
+
var mapBoth2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(self, {
|
|
4025
4025
|
onFailure: (cause) => failCause2(causeMap(cause, options.onFailure)),
|
|
4026
4026
|
onSuccess: (a) => sync2(() => options.onSuccess(a))
|
|
4027
4027
|
}));
|
|
@@ -5977,6 +5977,7 @@ var catchCause2 = catchCause;
|
|
|
5977
5977
|
var catchIf = catchIf2;
|
|
5978
5978
|
var catchCauseIf = catchCauseIf2;
|
|
5979
5979
|
var mapError = mapError3;
|
|
5980
|
+
var mapBoth = mapBoth2;
|
|
5980
5981
|
var orDie = orDie2;
|
|
5981
5982
|
var tapError3 = tapError2;
|
|
5982
5983
|
var ignore = ignore2;
|
|
@@ -9585,33 +9586,33 @@ var toType2 = /* @__PURE__ */ memoizeIdempotent((ast) => {
|
|
|
9585
9586
|
return type;
|
|
9586
9587
|
});
|
|
9587
9588
|
var toEncoded = /* @__PURE__ */ memoizeIdempotent((ast) => {
|
|
9588
|
-
return toType2(
|
|
9589
|
+
return toType2(flip3(ast));
|
|
9589
9590
|
});
|
|
9590
9591
|
function flipEncoding(ast, encoding) {
|
|
9591
9592
|
const links = encoding;
|
|
9592
9593
|
const len = links.length;
|
|
9593
9594
|
const last = links[len - 1];
|
|
9594
|
-
const ls = [new Link(
|
|
9595
|
+
const ls = [new Link(flip3(replaceEncoding(ast, undefined)), links[0].transformation.flip())];
|
|
9595
9596
|
for (let i = 1;i < len; i++) {
|
|
9596
|
-
ls.unshift(new Link(
|
|
9597
|
+
ls.unshift(new Link(flip3(links[i - 1].to), links[i].transformation.flip()));
|
|
9597
9598
|
}
|
|
9598
|
-
const to =
|
|
9599
|
+
const to = flip3(last.to);
|
|
9599
9600
|
if (to.encoding) {
|
|
9600
9601
|
return replaceEncoding(to, [...to.encoding, ...ls]);
|
|
9601
9602
|
} else {
|
|
9602
9603
|
return replaceEncoding(to, ls);
|
|
9603
9604
|
}
|
|
9604
9605
|
}
|
|
9605
|
-
var
|
|
9606
|
+
var flip3 = /* @__PURE__ */ memoize((ast) => {
|
|
9606
9607
|
if (ast.encoding) {
|
|
9607
9608
|
return flipEncoding(ast, ast.encoding);
|
|
9608
9609
|
}
|
|
9609
9610
|
const owner = getContextOwner(ast);
|
|
9610
9611
|
if (owner !== ast) {
|
|
9611
|
-
const flipped =
|
|
9612
|
+
const flipped = flip3(owner);
|
|
9612
9613
|
return flipped === owner ? ast : replaceContext(flipped, ast.context);
|
|
9613
9614
|
}
|
|
9614
|
-
return "flip" in ast ? ast.flip(
|
|
9615
|
+
return "flip" in ast ? ast.flip(flip3) : ("recur" in ast) ? ast.recur(flip3) : ast;
|
|
9615
9616
|
});
|
|
9616
9617
|
function fromConst(ast, value) {
|
|
9617
9618
|
const succeed = value === 0 ? sameExit : succeed7(value);
|
|
@@ -10150,7 +10151,7 @@ function decodeUnknownOption(schema, options) {
|
|
|
10150
10151
|
}
|
|
10151
10152
|
var decodeOption2 = decodeUnknownOption;
|
|
10152
10153
|
function encodeUnknownEffect(schema, options) {
|
|
10153
|
-
const parser = run2(
|
|
10154
|
+
const parser = run2(flip3(schema.ast));
|
|
10154
10155
|
return options === undefined ? parser : (input, overrideOptions) => parser(input, mergeParseOptions(options, overrideOptions));
|
|
10155
10156
|
}
|
|
10156
10157
|
var mergeParseOptions = (options, overrideOptions) => overrideOptions ? {
|
|
@@ -11948,6 +11949,19 @@ var optional = /* @__PURE__ */ lambda((self) => {
|
|
|
11948
11949
|
var toType = /* @__PURE__ */ lambda((schema) => make19(toType2(schema.ast), {
|
|
11949
11950
|
schema
|
|
11950
11951
|
}));
|
|
11952
|
+
var FlipTypeId = "~effect/Schema/flip";
|
|
11953
|
+
function isFlip$(schema) {
|
|
11954
|
+
return hasProperty(schema, FlipTypeId) && schema[FlipTypeId] === FlipTypeId;
|
|
11955
|
+
}
|
|
11956
|
+
function flip(schema) {
|
|
11957
|
+
if (isFlip$(schema)) {
|
|
11958
|
+
return schema.schema.rebuild(flip3(schema.ast));
|
|
11959
|
+
}
|
|
11960
|
+
return make19(flip3(schema.ast), {
|
|
11961
|
+
[FlipTypeId]: FlipTypeId,
|
|
11962
|
+
schema
|
|
11963
|
+
});
|
|
11964
|
+
}
|
|
11951
11965
|
function Literal(literal) {
|
|
11952
11966
|
const out = make19(new Literal2(literal), {
|
|
11953
11967
|
literal,
|
|
@@ -13731,6 +13745,46 @@ var filterMapArray = /* @__PURE__ */ dual(2, (self, filter) => transformPull(sel
|
|
|
13731
13745
|
}
|
|
13732
13746
|
return isReadonlyArrayNonEmpty(passes) ? succeed4(passes) : flatMap3(pull, loop);
|
|
13733
13747
|
}))));
|
|
13748
|
+
var mapAccum = /* @__PURE__ */ dual((args) => isChannel(args[0]), (self, initial, f, options) => fromTransform((upstream, scope) => map4(toTransform(self)(upstream, scope), (pull) => {
|
|
13749
|
+
let state = initial();
|
|
13750
|
+
let current;
|
|
13751
|
+
let index = 0;
|
|
13752
|
+
let cause;
|
|
13753
|
+
const pullNext = matchCauseEffect2(pull, {
|
|
13754
|
+
onFailure(cause_) {
|
|
13755
|
+
cause = cause_;
|
|
13756
|
+
const b = options?.onHalt && options.onHalt(state);
|
|
13757
|
+
return b && b.length > 0 ? succeed4([state, b]) : failCause(cause_);
|
|
13758
|
+
},
|
|
13759
|
+
onSuccess(a) {
|
|
13760
|
+
const b = f(state, a);
|
|
13761
|
+
return isArray(b) ? succeed4(b) : b;
|
|
13762
|
+
}
|
|
13763
|
+
});
|
|
13764
|
+
const pump = suspend(function loop() {
|
|
13765
|
+
if (current === undefined) {
|
|
13766
|
+
if (cause)
|
|
13767
|
+
return failCause(cause);
|
|
13768
|
+
return flatMap3(pullNext, ([newState, values]) => {
|
|
13769
|
+
state = newState;
|
|
13770
|
+
if (values.length === 0) {
|
|
13771
|
+
return loop();
|
|
13772
|
+
} else if (values.length === 1) {
|
|
13773
|
+
return succeed4(values[0]);
|
|
13774
|
+
}
|
|
13775
|
+
current = values;
|
|
13776
|
+
return loop();
|
|
13777
|
+
});
|
|
13778
|
+
}
|
|
13779
|
+
const next = current[index++];
|
|
13780
|
+
if (index >= current.length) {
|
|
13781
|
+
current = undefined;
|
|
13782
|
+
index = 0;
|
|
13783
|
+
}
|
|
13784
|
+
return succeed4(next);
|
|
13785
|
+
});
|
|
13786
|
+
return pump;
|
|
13787
|
+
})));
|
|
13734
13788
|
var tapError4 = /* @__PURE__ */ dual(2, (self, f) => transformPull(self, (pull) => succeed4(tapError3(pull, (err) => isDone3(err) ? void_2 : asVoid2(f(err))))));
|
|
13735
13789
|
var mergeAll3 = /* @__PURE__ */ dual(2, (channels, {
|
|
13736
13790
|
bufferSize = 16,
|
|
@@ -14053,6 +14107,13 @@ var merge = /* @__PURE__ */ dual((args) => isStream(args[0]) && isStream(args[1]
|
|
|
14053
14107
|
var mergeEffect2 = /* @__PURE__ */ dual(2, (self, effect) => self.channel.pipe(mergeEffect(effect), fromChannel));
|
|
14054
14108
|
var filterMap2 = /* @__PURE__ */ dual(2, (self, filter) => fromChannel(filterMapArray(toChannel(self), filter)));
|
|
14055
14109
|
var tapError = /* @__PURE__ */ dual(2, (self, f) => self.channel.pipe(tapError4(f), fromChannel));
|
|
14110
|
+
var emptyArr = /* @__PURE__ */ empty();
|
|
14111
|
+
var mapAccumEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, initial, f, options) => self.channel.pipe(flattenArray, mapAccum(initial, (state, a) => map4(f(state, a), ([state, values]) => [state, isReadonlyArrayNonEmpty(values) ? of(values) : empty()]), options?.onHalt ? {
|
|
14112
|
+
onHalt(state) {
|
|
14113
|
+
const arr = options.onHalt(state);
|
|
14114
|
+
return isReadonlyArrayNonEmpty(arr) ? of(arr) : emptyArr;
|
|
14115
|
+
}
|
|
14116
|
+
} : undefined), fromChannel));
|
|
14056
14117
|
var transduce = /* @__PURE__ */ dual(2, (self, sink) => transformPull2(self, (upstream, scope) => sync(() => {
|
|
14057
14118
|
let done2;
|
|
14058
14119
|
let leftover;
|
|
@@ -14086,17 +14147,10 @@ var runCollect = (self) => runFold(self.channel, () => [], (acc, chunk) => {
|
|
|
14086
14147
|
return acc;
|
|
14087
14148
|
});
|
|
14088
14149
|
var runHead = (self) => map4(runHead2(self.channel), map(getUnsafe2(0)));
|
|
14089
|
-
var runForEach2 = /* @__PURE__ */ dual(2, (self, f) => runForEach(self.channel, (arr) => {
|
|
14090
|
-
let i = 0;
|
|
14091
|
-
return whileLoop2({
|
|
14092
|
-
while: () => i < arr.length,
|
|
14093
|
-
body: () => f(arr[i++]),
|
|
14094
|
-
step: constVoid
|
|
14095
|
-
});
|
|
14096
|
-
}));
|
|
14097
14150
|
var runDrain = (self) => runDrain2(self.channel);
|
|
14098
14151
|
var mkString = (self) => runFold(self.channel, () => "", (acc, chunk) => acc + chunk.join(""));
|
|
14099
14152
|
var mkArrayBuffer = (self) => map4(mkUint8Array(self.channel), (bytes) => bytes.buffer);
|
|
14153
|
+
var mkUint8Array2 = (self) => mkUint8Array(self.channel);
|
|
14100
14154
|
var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, context, options) => {
|
|
14101
14155
|
let currentResolve = undefined;
|
|
14102
14156
|
let fiber = undefined;
|
|
@@ -15266,7 +15320,7 @@ var fetch = /* @__PURE__ */ make25((request, url, signal, fiber) => {
|
|
|
15266
15320
|
return send(undefined);
|
|
15267
15321
|
});
|
|
15268
15322
|
var layer2 = /* @__PURE__ */ layerMergedContext(/* @__PURE__ */ succeed4(fetch));
|
|
15269
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15323
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/_virtual/_rolldown/runtime.js
|
|
15270
15324
|
var __defProp = Object.defineProperty;
|
|
15271
15325
|
var __exportAll3 = (all, no_symbols) => {
|
|
15272
15326
|
let target = {};
|
|
@@ -15280,7 +15334,7 @@ var __exportAll3 = (all, no_symbols) => {
|
|
|
15280
15334
|
return target;
|
|
15281
15335
|
};
|
|
15282
15336
|
|
|
15283
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15337
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DefinitionError.js
|
|
15284
15338
|
var DefinitionIdentifierKindSchema = Literals([
|
|
15285
15339
|
"dual",
|
|
15286
15340
|
"plugin",
|
|
@@ -15332,7 +15386,7 @@ var DuplicateAuthMethodIdentifierError = class extends TaggedError2()("Duplicate
|
|
|
15332
15386
|
}) {
|
|
15333
15387
|
};
|
|
15334
15388
|
|
|
15335
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15389
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/identifier.js
|
|
15336
15390
|
var identifierSchema = String3.check(isPattern2(/^[a-z0-9]+(?:-[a-z0-9]+)*$/));
|
|
15337
15391
|
var isIdentifier = is(identifierSchema);
|
|
15338
15392
|
var validateIdentifier = (kind, identifier) => {
|
|
@@ -15357,12 +15411,12 @@ var validateIdentifier = (kind, identifier) => {
|
|
|
15357
15411
|
});
|
|
15358
15412
|
};
|
|
15359
15413
|
|
|
15360
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15414
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/proto.js
|
|
15361
15415
|
var PipeableProto = { pipe() {
|
|
15362
15416
|
return pipeArguments(this, arguments);
|
|
15363
15417
|
} };
|
|
15364
15418
|
|
|
15365
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15419
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Action.js
|
|
15366
15420
|
var Action_exports = /* @__PURE__ */ __exportAll3({
|
|
15367
15421
|
ActionHandlerError: () => ActionHandlerError,
|
|
15368
15422
|
RetryableActionHandlerError: () => RetryableActionHandlerError,
|
|
@@ -15475,7 +15529,7 @@ var make26 = (identifier, options) => {
|
|
|
15475
15529
|
};
|
|
15476
15530
|
var isAction = (u) => hasProperty(u, TypeId29);
|
|
15477
15531
|
|
|
15478
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15532
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethodBinding.js
|
|
15479
15533
|
var makeBinding = (options) => ({
|
|
15480
15534
|
connectionId: options.connectionId,
|
|
15481
15535
|
method: options.method,
|
|
@@ -15485,7 +15539,7 @@ var makeBinding = (options) => ({
|
|
|
15485
15539
|
});
|
|
15486
15540
|
var isBindingForMethod = (binding, method) => binding.method === method;
|
|
15487
15541
|
|
|
15488
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15542
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuth2TokenRefresher.js
|
|
15489
15543
|
var OAuth2TokenRefresher_exports = /* @__PURE__ */ __exportAll3({
|
|
15490
15544
|
OAuth2TokenRefresher: () => OAuth2TokenRefresher_exports,
|
|
15491
15545
|
Service: () => Service3
|
|
@@ -15493,7 +15547,7 @@ var OAuth2TokenRefresher_exports = /* @__PURE__ */ __exportAll3({
|
|
|
15493
15547
|
var Service3 = class extends Service()("@dual-os/sdk/AuthMethod/OAuth2TokenRefresher") {
|
|
15494
15548
|
};
|
|
15495
15549
|
|
|
15496
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15550
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethodExecution.js
|
|
15497
15551
|
var hookError = (methodIdentifier, operation, cause) => new AuthMethodHookError({
|
|
15498
15552
|
cause,
|
|
15499
15553
|
methodIdentifier,
|
|
@@ -15655,7 +15709,7 @@ var test = (method, material, context) => {
|
|
|
15655
15709
|
return decodeMaterial(method, material).pipe(flatMap3((decodedMaterial) => testHook === undefined ? succeed4({ ok: true }) : runHook(impl.identifier, "test", () => testHook(decodedMaterial, hookContext(context)))));
|
|
15656
15710
|
};
|
|
15657
15711
|
|
|
15658
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15712
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethod.js
|
|
15659
15713
|
var AuthMethod_exports = /* @__PURE__ */ __exportAll3({
|
|
15660
15714
|
AuthMethodHookError: () => AuthMethodHookError,
|
|
15661
15715
|
AuthMethodHookOperation: () => AuthMethodHookOperation,
|
|
@@ -15829,18 +15883,29 @@ var oauth2 = (identifier, options) => {
|
|
|
15829
15883
|
};
|
|
15830
15884
|
var isAuthMethod = (u) => hasProperty(u, TypeId30);
|
|
15831
15885
|
|
|
15832
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15833
|
-
var
|
|
15834
|
-
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
}),
|
|
15838
|
-
contentType: NullOr(String3),
|
|
15839
|
-
filename: NullOr(String3),
|
|
15886
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Files.js
|
|
15887
|
+
var File3 = TaggedStruct("File", {
|
|
15888
|
+
contentType: String3,
|
|
15889
|
+
id: NonEmptyString,
|
|
15890
|
+
name: String3,
|
|
15840
15891
|
sizeBytes: Natural
|
|
15892
|
+
}).annotate({ description: "A file: pass the reference a file input or an earlier step returned." });
|
|
15893
|
+
var FileError = class extends TaggedError2()("FileError", {
|
|
15894
|
+
cause: optionalKey(Redacted(Unknown, { disallowJsonEncode: true })),
|
|
15895
|
+
message: String3
|
|
15896
|
+
}) {
|
|
15897
|
+
};
|
|
15898
|
+
var Service4 = class extends Service()("@dual-os/sdk/Files/Service") {
|
|
15899
|
+
};
|
|
15900
|
+
var service3 = pipe(serviceOption(Service4), flatMap3(fromOption2(() => FileError.make({ message: "Files are only available during a Dual plugin invocation" }))));
|
|
15901
|
+
var read = fnUntraced(function* (file) {
|
|
15902
|
+
return yield* (yield* service3).read(file);
|
|
15903
|
+
});
|
|
15904
|
+
var write = fnUntraced(function* (file) {
|
|
15905
|
+
return yield* (yield* service3).write(file);
|
|
15841
15906
|
});
|
|
15842
15907
|
|
|
15843
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15908
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannel.js
|
|
15844
15909
|
var AgentChannel_exports = /* @__PURE__ */ __exportAll3({
|
|
15845
15910
|
AccessOutcome: () => AccessOutcome,
|
|
15846
15911
|
AgentChannel: () => AgentChannel_exports,
|
|
@@ -16107,7 +16172,7 @@ var ContextMessage = Struct({
|
|
|
16107
16172
|
...contextMessageFields,
|
|
16108
16173
|
assets: optionalKey(ArraySchema(Asset).check(isMaxLength(20)))
|
|
16109
16174
|
});
|
|
16110
|
-
var AssetFile =
|
|
16175
|
+
var AssetFile = File3.check(makeFilter2((file) => file.sizeBytes > 0 && file.sizeBytes <= 10485760));
|
|
16111
16176
|
var FailureCode = Literals([
|
|
16112
16177
|
"rejected",
|
|
16113
16178
|
"unauthorized",
|
|
@@ -16412,7 +16477,7 @@ var make28 = (identifier, options) => {
|
|
|
16412
16477
|
};
|
|
16413
16478
|
var isAgentChannel = (value) => hasProperty(value, TypeId31);
|
|
16414
16479
|
|
|
16415
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16480
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/handler-context.js
|
|
16416
16481
|
var groupKeyPrefix = "@dual-os/sdk/Plugin/Handlers/";
|
|
16417
16482
|
var handlerGroupKey = (pluginId) => `${groupKeyPrefix}${pluginId}`;
|
|
16418
16483
|
var isGroupKey = startsWith(groupKeyPrefix);
|
|
@@ -16433,13 +16498,13 @@ var findHandler = (context, providerId, handlerKey) => {
|
|
|
16433
16498
|
return isMap(group) ? group.get(handlerKey) : undefined;
|
|
16434
16499
|
};
|
|
16435
16500
|
|
|
16436
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16501
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/schema-runtime.js
|
|
16437
16502
|
function decodeJson(schema, value) {
|
|
16438
16503
|
return decodeUnknownEffect(toCodecJson2(schema))(value);
|
|
16439
16504
|
}
|
|
16440
16505
|
var decodeJsonMapError = (schema, value, mapError2) => decodeJson(schema, value).pipe(mapError(mapError2));
|
|
16441
16506
|
|
|
16442
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16507
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/ConnectionResolver.js
|
|
16443
16508
|
var ConnectionIdNotAllowedError = class extends TaggedError2()("ConnectionIdNotAllowedError", {
|
|
16444
16509
|
connectionId: String3,
|
|
16445
16510
|
phase: optional(String3),
|
|
@@ -16532,10 +16597,10 @@ var ConnectionResolverStoreError = class extends TaggedError2()("ConnectionResol
|
|
|
16532
16597
|
])
|
|
16533
16598
|
}) {
|
|
16534
16599
|
};
|
|
16535
|
-
var
|
|
16600
|
+
var Service5 = class extends Service()("@dual-os/sdk/ConnectionResolver") {
|
|
16536
16601
|
};
|
|
16537
16602
|
|
|
16538
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16603
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/auth-execution.js
|
|
16539
16604
|
var knownAuthMethodIds = (methods) => methods.map((method) => method.identifier);
|
|
16540
16605
|
var fullAuthMethodId = (providerId, method) => `${providerId}/${method.identifier}`;
|
|
16541
16606
|
var findMethod = (providerId, methods, methodId) => methods.find((method) => method.identifier === methodId || fullAuthMethodId(providerId, method) === methodId);
|
|
@@ -16570,7 +16635,7 @@ var failConnectionIdNotAllowed = (targetKind, targetId, phase, providerId, conne
|
|
|
16570
16635
|
targetKind
|
|
16571
16636
|
}));
|
|
16572
16637
|
var resolveRuntimeConnection = (targetKind, targetId, phase, providerId, methods, connectionId, context) => gen(function* () {
|
|
16573
|
-
const resolved = yield* (yield*
|
|
16638
|
+
const resolved = yield* (yield* Service5).resolve({
|
|
16574
16639
|
target: {
|
|
16575
16640
|
providerId,
|
|
16576
16641
|
targetId,
|
|
@@ -16595,7 +16660,7 @@ var resolveRuntimeConnection = (targetKind, targetId, phase, providerId, methods
|
|
|
16595
16660
|
});
|
|
16596
16661
|
});
|
|
16597
16662
|
|
|
16598
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16663
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/trigger-runtime-shared.js
|
|
16599
16664
|
var decodeConfig = (triggerId, schema, value) => decodeJsonMapError(schema, value, (error) => new InvalidTriggerConfigError({
|
|
16600
16665
|
description: error.message,
|
|
16601
16666
|
triggerId
|
|
@@ -16730,7 +16795,7 @@ var withRuntimeContext = (entry, phase, connectionId, context2, run) => {
|
|
|
16730
16795
|
return resolveRuntimeConnection("trigger", entry.triggerId, phase, entry.providerId, requiredAuthMethods, connectionId, context2).pipe(flatMap3((binding) => run(runtimeContext(authRuntimeContext(binding)))));
|
|
16731
16796
|
};
|
|
16732
16797
|
|
|
16733
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16798
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/trigger-runtime.js
|
|
16734
16799
|
var runPhase = (options) => gen(function* () {
|
|
16735
16800
|
const { entry, phase, request } = options;
|
|
16736
16801
|
const runtime = yield* options.hook;
|
|
@@ -16813,7 +16878,7 @@ var poll2 = (entry, request) => runPhase({
|
|
|
16813
16878
|
phase: "poll",
|
|
16814
16879
|
request
|
|
16815
16880
|
});
|
|
16816
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16881
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Trigger.js
|
|
16817
16882
|
var Trigger_exports = /* @__PURE__ */ __exportAll3({
|
|
16818
16883
|
InvalidTriggerConfigError: () => InvalidTriggerConfigError,
|
|
16819
16884
|
InvalidTriggerOutputError: () => InvalidTriggerOutputError,
|
|
@@ -17025,10 +17090,10 @@ var verify2 = verify;
|
|
|
17025
17090
|
var parse3 = parse2;
|
|
17026
17091
|
var poll3 = poll2;
|
|
17027
17092
|
|
|
17028
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17093
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/collection-utils.js
|
|
17029
17094
|
var appendElements = (existing, additions) => [...existing, ...additions];
|
|
17030
17095
|
|
|
17031
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17096
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/children.js
|
|
17032
17097
|
var partitionChildren = (children) => ({
|
|
17033
17098
|
actions: children.filter(isAction),
|
|
17034
17099
|
groups: children.filter(isGroup),
|
|
@@ -17068,7 +17133,7 @@ var assertUniqueMixedChildIdentifiers = (ownerKind, ownerIdentifier, existing, a
|
|
|
17068
17133
|
assertAdditions(ownerKind, ownerIdentifier, seenChildren(existing), additions.map((addition) => [addition, childKind(addition)]));
|
|
17069
17134
|
};
|
|
17070
17135
|
|
|
17071
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17136
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Group.js
|
|
17072
17137
|
var Group_exports = /* @__PURE__ */ __exportAll3({
|
|
17073
17138
|
TypeId: () => TypeId33,
|
|
17074
17139
|
add: () => add4,
|
|
@@ -17130,7 +17195,7 @@ var withAction = dual(2, (value, action) => appendChildren(value, [action], "act
|
|
|
17130
17195
|
var withTrigger = dual(2, (value, trigger) => appendChildren(value, [trigger], "trigger"));
|
|
17131
17196
|
var add4 = dual((args) => isGroup(args[0]), (group, ...children) => appendChildren(group, children));
|
|
17132
17197
|
|
|
17133
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17198
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/auth-runtime.js
|
|
17134
17199
|
var assertNoDuplicateAuthMethodIdentifiers = (providerIdentifier, methods) => {
|
|
17135
17200
|
const seen = /* @__PURE__ */ new Set;
|
|
17136
17201
|
for (const method of methods) {
|
|
@@ -17143,7 +17208,7 @@ var assertNoDuplicateAuthMethodIdentifiers = (providerIdentifier, methods) => {
|
|
|
17143
17208
|
}
|
|
17144
17209
|
};
|
|
17145
17210
|
|
|
17146
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17211
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/capabilities.js
|
|
17147
17212
|
var walkCapabilities = (provider, select) => {
|
|
17148
17213
|
const entries = [];
|
|
17149
17214
|
const visit = (owner, prefix) => {
|
|
@@ -17162,7 +17227,7 @@ var walkCapabilities = (provider, select) => {
|
|
|
17162
17227
|
return entries;
|
|
17163
17228
|
};
|
|
17164
17229
|
|
|
17165
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17230
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/plugin-handlers.js
|
|
17166
17231
|
var missingDeclaration = (kind, localId, pluginId) => {
|
|
17167
17232
|
throw new Error(`missing ${kind} handler for "${localId}" in plugin "${pluginId}"`);
|
|
17168
17233
|
};
|
|
@@ -17207,7 +17272,7 @@ var toHandlers = (plugin, handlers) => gen(function* () {
|
|
|
17207
17272
|
return makeUnsafe(/* @__PURE__ */ new Map([[handlerGroupKey(plugin.identifier), map]]));
|
|
17208
17273
|
});
|
|
17209
17274
|
|
|
17210
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17275
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Plugin.js
|
|
17211
17276
|
var Plugin_exports = /* @__PURE__ */ __exportAll3({
|
|
17212
17277
|
TypeId: () => TypeId34,
|
|
17213
17278
|
add: () => add5,
|
|
@@ -17378,7 +17443,7 @@ var toLayer2 = (plugin, build) => effectContext(gen(function* () {
|
|
|
17378
17443
|
return yield* toHandlers(plugin, handlers);
|
|
17379
17444
|
}));
|
|
17380
17445
|
|
|
17381
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17446
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannelRuntime.js
|
|
17382
17447
|
var ConnectionContext = Struct({
|
|
17383
17448
|
actor: optionalKey(Union([Struct({
|
|
17384
17449
|
kind: Literal("user"),
|
|
@@ -17413,7 +17478,7 @@ var AccessInput = Struct({
|
|
|
17413
17478
|
deploymentSettings: Unknown,
|
|
17414
17479
|
identity: VerifiedIdentity
|
|
17415
17480
|
});
|
|
17416
|
-
var
|
|
17481
|
+
var Service6 = class extends Service()("@dual-os/sdk/AgentChannelRuntime") {
|
|
17417
17482
|
};
|
|
17418
17483
|
var fail11 = (code) => new ChannelError({ code });
|
|
17419
17484
|
var safe = (effect2, code) => effect2.pipe(catchCause2((cause) => hasInterrupts(cause) ? interrupt : fail5(fail11(code))));
|
|
@@ -17465,7 +17530,7 @@ var resolveAuth = fn("AgentChannelRuntime.resolveAuth")(function* (providerId, c
|
|
|
17465
17530
|
}
|
|
17466
17531
|
if (connectionId === undefined)
|
|
17467
17532
|
return yield* fail11("invalid_auth");
|
|
17468
|
-
const resolver = yield* serviceOption(
|
|
17533
|
+
const resolver = yield* serviceOption(Service5);
|
|
17469
17534
|
if (isNone(resolver))
|
|
17470
17535
|
return yield* fail11("invalid_auth");
|
|
17471
17536
|
const raw = yield* safe(suspend(() => resolver.value.resolve({
|
|
@@ -17513,7 +17578,7 @@ var find = (plugins, pin) => {
|
|
|
17513
17578
|
};
|
|
17514
17579
|
}
|
|
17515
17580
|
};
|
|
17516
|
-
var layer4 = (plugins) => effect(
|
|
17581
|
+
var layer4 = (plugins) => effect(Service6, gen(function* () {
|
|
17517
17582
|
const context2 = yield* context();
|
|
17518
17583
|
const get = fn("AgentChannelRuntime.get")(function* (input) {
|
|
17519
17584
|
const pin = yield* decode4(Pin, input, "invalid_input");
|
|
@@ -17653,7 +17718,7 @@ var layer4 = (plugins) => effect(Service5, gen(function* () {
|
|
|
17653
17718
|
const value = yield* decodeData(schema, request.value, "invalid_input");
|
|
17654
17719
|
return yield* json2(yield* safe(encodeUnknownEffect2(schema)(value, strict), "invalid_input"), "invalid_input");
|
|
17655
17720
|
});
|
|
17656
|
-
return
|
|
17721
|
+
return Service6.of({
|
|
17657
17722
|
checkAccess: (input) => run(checkAccess(input)),
|
|
17658
17723
|
decodeDefinitionSettings: (input) => run(decodeSettings("definitionSettings")(input)),
|
|
17659
17724
|
decodeDeploymentSettings: (input) => run(decodeSettings("deploymentSettings")(input)),
|
|
@@ -17662,7 +17727,7 @@ var layer4 = (plugins) => effect(Service5, gen(function* () {
|
|
|
17662
17727
|
});
|
|
17663
17728
|
}));
|
|
17664
17729
|
|
|
17665
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17730
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AiProvider.js
|
|
17666
17731
|
var TypeId35 = "@dual-os/sdk/AiProvider";
|
|
17667
17732
|
var RuntimeConfig = Struct({
|
|
17668
17733
|
apiKey: optional(String3),
|
|
@@ -17720,7 +17785,7 @@ var withAuthMethods2 = dual(2, (provider, methods) => {
|
|
|
17720
17785
|
var withAuthMethod2 = dual(2, (provider, method) => withAuthMethods2(provider, [method]));
|
|
17721
17786
|
var withRuntimeConfig = dual(2, (provider, resolve) => makeProvider2(optionsFromProvider(provider), provider.authMethods, resolve));
|
|
17722
17787
|
|
|
17723
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17788
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/actions.js
|
|
17724
17789
|
var entriesOf = (installation) => walkCapabilities(installation.plugin, (owner) => owner.actions).map(({ localId, canonicalId, node }) => ({
|
|
17725
17790
|
action: node,
|
|
17726
17791
|
actionId: canonicalId,
|
|
@@ -17741,7 +17806,7 @@ var resolveAction = (installations, actionId, version) => {
|
|
|
17741
17806
|
return entry === undefined || version !== undefined && entry.pluginVersion !== version ? undefined : entry;
|
|
17742
17807
|
};
|
|
17743
17808
|
|
|
17744
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17809
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/triggers.js
|
|
17745
17810
|
var entriesOf2 = (installation) => walkCapabilities(installation.plugin, (owner) => owner.triggers).map((walked) => ({
|
|
17746
17811
|
authMethods: installation.plugin.authMethods,
|
|
17747
17812
|
localId: walked.localId,
|
|
@@ -17762,7 +17827,7 @@ var resolveRuntimeTrigger = (installations, triggerId, version) => {
|
|
|
17762
17827
|
return entry === undefined || version !== undefined && entry.pluginVersion !== version ? undefined : entry;
|
|
17763
17828
|
};
|
|
17764
17829
|
|
|
17765
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17830
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/registry.js
|
|
17766
17831
|
var authMethodId = (providerId, methodId) => `${providerId}/${methodId}`;
|
|
17767
17832
|
var schemaJson = (schema) => toJsonSchemaDocument2(schema, { onExcessProperty: "error" });
|
|
17768
17833
|
var authMethodMetadataJson = (method) => {
|
|
@@ -17921,7 +17986,7 @@ var materializeResolvedRegistry = (input) => {
|
|
|
17921
17986
|
};
|
|
17922
17987
|
};
|
|
17923
17988
|
|
|
17924
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17989
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DualRegistry.js
|
|
17925
17990
|
var TriggerNotFoundError = class extends TaggedError2()("TriggerNotFoundError", { triggerId: String3 }) {
|
|
17926
17991
|
};
|
|
17927
17992
|
var materializePlugin = (plugin, options) => ({
|
|
@@ -17940,7 +18005,7 @@ var materializePlugin = (plugin, options) => ({
|
|
|
17940
18005
|
}).providers
|
|
17941
18006
|
});
|
|
17942
18007
|
|
|
17943
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
18008
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/invoke.js
|
|
17944
18009
|
var FieldIssue = class extends Class4("FieldIssue")({
|
|
17945
18010
|
message: String3,
|
|
17946
18011
|
path: String3
|
|
@@ -18013,7 +18078,7 @@ var invokeResolvedActionJson = (providerId, actionId, pluginVersion, action, aut
|
|
|
18013
18078
|
fields: schemaErrorFields(error)
|
|
18014
18079
|
}))));
|
|
18015
18080
|
|
|
18016
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
18081
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DualRuntime.js
|
|
18017
18082
|
var install = (plugin, version) => ({
|
|
18018
18083
|
plugin,
|
|
18019
18084
|
version
|
|
@@ -18080,7 +18145,7 @@ var toLayer = (app) => {
|
|
|
18080
18145
|
})) : succeed4(method);
|
|
18081
18146
|
};
|
|
18082
18147
|
return effect(Service2, gen(function* () {
|
|
18083
|
-
const channels = yield*
|
|
18148
|
+
const channels = yield* Service6;
|
|
18084
18149
|
const context2 = yield* context();
|
|
18085
18150
|
const appContext = indexGroups(context2);
|
|
18086
18151
|
const provideRuntimeContext = (effect2) => effect2.pipe(updateContext2((input) => merge2(appContext, input)));
|
|
@@ -18217,29 +18282,7 @@ var toLayer = (app) => {
|
|
|
18217
18282
|
})).pipe(provide(layer4(app.plugins.map((installation) => installation.plugin))), provide(app.layer));
|
|
18218
18283
|
};
|
|
18219
18284
|
|
|
18220
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
18221
|
-
var File3 = TaggedStruct("File", {
|
|
18222
|
-
contentType: String3,
|
|
18223
|
-
id: NonEmptyString,
|
|
18224
|
-
name: String3,
|
|
18225
|
-
sizeBytes: Natural
|
|
18226
|
-
}).annotate({ description: "A file: pass the reference a file input or an earlier step returned." });
|
|
18227
|
-
var FileError = class extends TaggedError2()("FileError", {
|
|
18228
|
-
cause: optionalKey(Redacted(Unknown, { disallowJsonEncode: true })),
|
|
18229
|
-
message: String3
|
|
18230
|
-
}) {
|
|
18231
|
-
};
|
|
18232
|
-
var Service6 = class extends Service()("@dual-os/sdk/Files/Service") {
|
|
18233
|
-
};
|
|
18234
|
-
var service3 = pipe(serviceOption(Service6), flatMap3(fromOption2(() => FileError.make({ message: "Files are only available when Dual calls the action" }))));
|
|
18235
|
-
var read = fnUntraced(function* (file) {
|
|
18236
|
-
return yield* (yield* service3).read(file);
|
|
18237
|
-
});
|
|
18238
|
-
var write = fnUntraced(function* (file) {
|
|
18239
|
-
return yield* (yield* service3).write(file);
|
|
18240
|
-
});
|
|
18241
|
-
|
|
18242
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.9.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuthFlow.js
|
|
18285
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuthFlow.js
|
|
18243
18286
|
var OAuthConnectionValidationFailed = class extends TaggedError2()("OAuthConnectionValidationFailed", {
|
|
18244
18287
|
cause: optionalKey(Redacted(Defect())),
|
|
18245
18288
|
message: String3
|
|
@@ -18655,7 +18698,7 @@ var oauth2TokenRefresherLayer = effect(Service3, gen(function* () {
|
|
|
18655
18698
|
}).pipe(map4((refreshed) => refreshed.tokens)) });
|
|
18656
18699
|
}));
|
|
18657
18700
|
|
|
18658
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
18701
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/remote-runtime.js
|
|
18659
18702
|
var Identity = Struct({
|
|
18660
18703
|
artifactDigest: String3.check(isPattern2(/^[a-f0-9]{128}$/u)),
|
|
18661
18704
|
invocationId: NonEmptyString,
|
|
@@ -18836,13 +18879,14 @@ function failure(error) {
|
|
|
18836
18879
|
retryable: false
|
|
18837
18880
|
};
|
|
18838
18881
|
}
|
|
18839
|
-
var unavailableFiles =
|
|
18882
|
+
var unavailableFiles = Service4.of({
|
|
18840
18883
|
read: () => fail5(FileError.make({ message: "Dual Files is not available to this operation" })),
|
|
18841
18884
|
write: () => fail5(FileError.make({ message: "Dual Files is not available to this operation" }))
|
|
18842
18885
|
});
|
|
18843
|
-
var filesUnavailable = succeed3(
|
|
18886
|
+
var filesUnavailable = succeed3(Service4, unavailableFiles);
|
|
18844
18887
|
var FileFailure = Struct({ message: String3 });
|
|
18845
18888
|
function filesService(access, http) {
|
|
18889
|
+
let writes = 0;
|
|
18846
18890
|
const client = mapRequest(http, flow(prependUrl(`${access.url}/api/plugin-files`), bearerToken(access.token)));
|
|
18847
18891
|
function call(request, read) {
|
|
18848
18892
|
return pipe(gen(function* () {
|
|
@@ -18855,13 +18899,16 @@ function filesService(access, http) {
|
|
|
18855
18899
|
message: "Cannot reach Dual Files"
|
|
18856
18900
|
})));
|
|
18857
18901
|
}
|
|
18858
|
-
return
|
|
18902
|
+
return Service4.of({
|
|
18859
18903
|
read: (file) => call(get7(`/${encodeURIComponent(file.id)}`), (response) => map4(response.arrayBuffer, (buffer) => new Uint8Array(buffer))),
|
|
18860
|
-
write: (file) => call(pipe(post("", { urlParams: {
|
|
18904
|
+
write: (file) => suspend(() => call(pipe(post("", { urlParams: {
|
|
18905
|
+
name: file.name,
|
|
18906
|
+
writeIndex: `${writes++}`
|
|
18907
|
+
} }), bodyUint8Array(file.bytes, file.contentType ?? undefined)), (response) => flatMap3(response.json, decodeUnknownEffect(File3))))
|
|
18861
18908
|
});
|
|
18862
18909
|
}
|
|
18863
18910
|
function connectionService(request) {
|
|
18864
|
-
return
|
|
18911
|
+
return Service5.of({ resolve: (input) => {
|
|
18865
18912
|
const selected = request.connection;
|
|
18866
18913
|
if (selected === undefined)
|
|
18867
18914
|
return fail5(ConnectionRequiredError.make(input.target));
|
|
@@ -18968,7 +19015,7 @@ var execute = fn("RemoteRuntime.execute")(function* (request) {
|
|
|
18968
19015
|
},
|
|
18969
19016
|
identity: request.identity
|
|
18970
19017
|
};
|
|
18971
|
-
return yield* pipe(run3(request), provideService(
|
|
19018
|
+
return yield* pipe(run3(request), provideService(Service5, connectionService(request)), provideService(Service4, pipe(fromUndefinedOr(request.files), flatMap((access) => map(http, (client) => filesService(access, client))), getOrElse(() => unavailableFiles))), flatMap3(fnUntraced(function* (value) {
|
|
18972
19019
|
if (value === undefined)
|
|
18973
19020
|
return {
|
|
18974
19021
|
_tag: "success",
|
|
@@ -18995,7 +19042,7 @@ var execute = fn("RemoteRuntime.execute")(function* (request) {
|
|
|
18995
19042
|
})));
|
|
18996
19043
|
});
|
|
18997
19044
|
|
|
18998
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
19045
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/PluginRuntime.js
|
|
18999
19046
|
var PluginExecutionError = class extends TaggedError2()("PluginExecutionError", {
|
|
19000
19047
|
category: Literals([
|
|
19001
19048
|
"transport",
|
|
@@ -19009,6 +19056,7 @@ var PluginExecutionError = class extends TaggedError2()("PluginExecutionError",
|
|
|
19009
19056
|
}) {
|
|
19010
19057
|
};
|
|
19011
19058
|
var maxPayloadBytes = 1048576;
|
|
19059
|
+
var maxResponseBytes = 52428800;
|
|
19012
19060
|
var maxMetadataBytes = 67108864;
|
|
19013
19061
|
var maxChannelResultBytes = 16777216;
|
|
19014
19062
|
var OAuthContinuation = Struct({
|
|
@@ -19111,7 +19159,7 @@ function responseLimit(request) {
|
|
|
19111
19159
|
return maxMetadataBytes;
|
|
19112
19160
|
if ("context" in request && request.operation._tag === "channelExecute")
|
|
19113
19161
|
return maxChannelResultBytes;
|
|
19114
|
-
return
|
|
19162
|
+
return maxResponseBytes;
|
|
19115
19163
|
}
|
|
19116
19164
|
var Invocation = Struct({
|
|
19117
19165
|
entrypoint: String3.check(isPattern2(/^[A-Za-z0-9_-]+(?:[./][A-Za-z0-9_-]+)*$/u)),
|
|
@@ -19132,24 +19180,17 @@ var encodeRequest = fnUntraced(function* (request) {
|
|
|
19132
19180
|
return encoded;
|
|
19133
19181
|
});
|
|
19134
19182
|
var readBounded = fnUntraced(function* (input, maximum = maxPayloadBytes) {
|
|
19135
|
-
|
|
19136
|
-
bytes: Buffer.alloc(maximum),
|
|
19137
|
-
size: 0
|
|
19138
|
-
};
|
|
19139
|
-
yield* pipe(input, runForEach2((chunk) => gen(function* () {
|
|
19140
|
-
if (output.size + chunk.byteLength > maximum)
|
|
19141
|
-
return yield* PluginExecutionError.make({
|
|
19142
|
-
category: "protocol",
|
|
19143
|
-
message: "Plugin payload exceeds its transport limit"
|
|
19144
|
-
});
|
|
19145
|
-
Buffer.from(chunk).copy(output.bytes, output.size);
|
|
19146
|
-
output.size += chunk.byteLength;
|
|
19147
|
-
})), mapError((cause) => PluginExecutionError.make({
|
|
19148
|
-
cause: make4(cause),
|
|
19183
|
+
return yield* pipe(input, mapAccumEffect(() => 0, (size, chunk) => size + chunk.byteLength > maximum ? fail5(PluginExecutionError.make({
|
|
19149
19184
|
category: "protocol",
|
|
19150
|
-
message: "
|
|
19151
|
-
})))
|
|
19152
|
-
|
|
19185
|
+
message: "Plugin payload exceeds its transport limit"
|
|
19186
|
+
})) : succeed4([size + chunk.byteLength, [chunk]])), mkUint8Array2, mapBoth({
|
|
19187
|
+
onSuccess: (bytes) => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString("utf8"),
|
|
19188
|
+
onFailure: (cause) => PluginExecutionError.make({
|
|
19189
|
+
cause: make4(cause),
|
|
19190
|
+
category: "protocol",
|
|
19191
|
+
message: "Cannot read plugin payload"
|
|
19192
|
+
})
|
|
19193
|
+
}));
|
|
19153
19194
|
});
|
|
19154
19195
|
var verifyResponse = fnUntraced(function* (request, response) {
|
|
19155
19196
|
if (response.identity.invocationId !== request.identity.invocationId || response.identity.artifactDigest !== request.identity.artifactDigest || response.identity.organizationId !== request.identity.organizationId || response.identity.pluginKey !== request.identity.pluginKey || response.identity.pluginVersion !== request.identity.pluginVersion)
|
|
@@ -19257,7 +19298,7 @@ var execute3 = fnUntraced(function* (request) {
|
|
|
19257
19298
|
return yield* executeChannelSettings(request);
|
|
19258
19299
|
});
|
|
19259
19300
|
|
|
19260
|
-
export { pipeArguments, dual, identity, constVoid, pipe, flow, isString, isUndefined, isNotUndefined, isNotNull, isNullish, isNotNullish, isObject, hasProperty, equals, byReferenceUnsafe, format, NodeInspectSymbol, toJson, BaseProto, PipeInspectableProto, Prototype, String2, Number2, mapInput, none, some, isNone, isSome, match, getOrElse, orElse, fromNullishOr, fromUndefinedOr, getOrNull, getOrUndefined, liftThrowable, map, flatMap, filter, liftPredicate, Service, makeUnsafe, add, getUnsafe, get, Reference, succeed, fail, failVoid, fromOption, try_, isSuccess, match2, getOrThrow, fromEntries, toEntries, has, map2, ensure, match3, append, appendAll, isArray, isReadonlyArrayNonEmpty, getUnsafe2, head, headNonEmpty, takeRight, findFirst, sort, sortWith, zip, contains, empty, of, map3, flatMap2, getSomes, filterMap, filter2, reduce, fromNullishOr2, every, some2, dedupe, join, fromInputUnsafe, isFinite, millis, toMillis, TaggedClass, Error2, TaggedError, scopeRemoveFinalizerUnsafe, fiberEnterUninterruptibleUnsafe, fail2, squash, hasInterrupts, Done, done, UnknownError, succeed2, fail3, void_, isSuccess2, isFailure, makeUnsafe2, _await, done2, fail4, isDone, isDoneUnsafe, doneUnsafe, Scope, make, makeUnsafe3, addFinalizerExit, addFinalizer, forkUnsafe, close, makeMemoMapUnsafe, buildWithMemoMap, buildWithScope, succeed3, effect, mergeAll, provide, provideMerge, currentTimeMillis, increment, between, toUpperCase, toLowerCase, capitalize, replace, trim, slice, isEmpty, isNonEmpty, split, startsWith, endsWith, match4, replaceAll, catchDone, isDoneCause, isEffect, all, forEach, promise, tryPromise, succeed4, suspend, sync, void_2, undefined_, callback, never, gen, fail5, failSync, failCause, die, try_2, withFiber, fromOption2, flatMap3, flatten, andThen, tap, result, map4, as, zipWith, catch_, catchTag, catchReason, catchIf, catchCauseIf, mapError, orDie, ignore, ignoreCause, timeout, timeoutOrElse, sleep, raceFirst, filterOrElse, matchEffect, context, provideContext, serviceOption, provideService, scope, scoped, acquireRelease, addFinalizer2, ensuring, onError, onExit, cached, interrupt, uninterruptible, uninterruptibleMask, forever, forkChild, forkIn, forkScoped, runFork, runForkWith, runCallbackWith, runCallback, runPromise, runPromiseWith, runPromiseExit, runPromiseExitWith, runSync, runSyncWith, runSyncExit, runSyncExitWith, fnUntraced, fn, clockWith, effectify, await_, join2, interrupt2, getCurrent, runIn, make2, sliding, offer, offerUnsafe, failCauseUnsafe, endUnsafe, take, poll, encode, encode2, decode, makeZoned, make3, toUtc, toDateUtc, toEpochMillis, formatIso, formatIsoOffset, isRedacted, make4, value, empty2, empty3, InvalidValue, compose,
|
|
19301
|
+
export { pipeArguments, dual, identity, constVoid, pipe, flow, isString, isUndefined, isNotUndefined, isNotNull, isNullish, isNotNullish, isObject, hasProperty, equals, byReferenceUnsafe, format, NodeInspectSymbol, toJson, BaseProto, PipeInspectableProto, Prototype, String2, Number2, mapInput, none, some, isNone, isSome, match, getOrElse, orElse, fromNullishOr, fromUndefinedOr, getOrNull, getOrUndefined, liftThrowable, map, flatMap, filter, liftPredicate, Service, makeUnsafe, add, getUnsafe, get, Reference, succeed, fail, failVoid, fromOption, try_, isSuccess, match2, getOrThrow, fromEntries, toEntries, has, map2, ensure, match3, append, appendAll, isArray, isReadonlyArrayNonEmpty, getUnsafe2, head, headNonEmpty, takeRight, findFirst, sort, sortWith, zip, contains, empty, of, map3, flatMap2, getSomes, filterMap, filter2, reduce, fromNullishOr2, every, some2, dedupe, join, fromInputUnsafe, isFinite, millis, toMillis, TaggedClass, Error2, TaggedError, scopeRemoveFinalizerUnsafe, fiberEnterUninterruptibleUnsafe, fail2, squash, hasInterrupts, Done, done, UnknownError, succeed2, fail3, void_, isSuccess2, isFailure, makeUnsafe2, _await, done2, fail4, isDone, isDoneUnsafe, doneUnsafe, Scope, make, makeUnsafe3, addFinalizerExit, addFinalizer, forkUnsafe, close, makeMemoMapUnsafe, buildWithMemoMap, buildWithScope, succeed3, effect, mergeAll, provide, provideMerge, currentTimeMillis, increment, between, toUpperCase, toLowerCase, capitalize, replace, trim, slice, isEmpty, isNonEmpty, split, startsWith, endsWith, match4, replaceAll, catchDone, isDoneCause, isEffect, all, forEach, promise, tryPromise, succeed4, suspend, sync, void_2, undefined_, callback, never, gen, fail5, failSync, failCause, die, try_2, withFiber, fromOption2, flatMap3, flatten, andThen, tap, result, map4, as, zipWith, catch_, catchTag, catchReason, catchIf, catchCauseIf, mapError, mapBoth, orDie, ignore, ignoreCause, timeout, timeoutOrElse, sleep, raceFirst, filterOrElse, matchEffect, context, provideContext, serviceOption, provideService, scope, scoped, acquireRelease, addFinalizer2, ensuring, onError, onExit, cached, interrupt, uninterruptible, uninterruptibleMask, forever, forkChild, forkIn, forkScoped, runFork, runForkWith, runCallbackWith, runCallback, runPromise, runPromiseWith, runPromiseExit, runPromiseExitWith, runSync, runSyncWith, runSyncExit, runSyncExitWith, fnUntraced, fn, clockWith, effectify, await_, join2, interrupt2, getCurrent, runIn, make2, sliding, offer, offerUnsafe, failCauseUnsafe, endUnsafe, take, poll, encode, encode2, decode, makeZoned, make3, toUtc, toDateUtc, toEpochMillis, formatIso, formatIsoOffset, isRedacted, make4, value, empty2, empty3, InvalidValue, compose, transformEffect, is, decodeUnknownEffect, decodeEffect, decodeOption, encodeEffect, isSchema, optionalKey, optional, toType, flip, Literal, Never, Unknown, String3, Number3, Boolean2, Struct, Record, StructWithRest, ArraySchema, Union, Literals, NullOr, suspend2, decodeTo, tag, TaggedStruct, Finite, Int, Natural, isMaxLength, NonEmptyString, Defect, fromJsonString, Uint8Array2, Uint8ArrayFromBase64, Uint8ArrayFromHex, DateTimeUtcFromString, Error3, TaggedError2, toEquivalence, Json, makeUnsafe4, make5, get2, set, update, fromTransform, toTransform, mapDone, unwrap, isStream, fromChannel, fromEffect, fromPull, callback2, empty4, suspend3, fail6, fromIterable, paginate, unwrap2, mapEffect, flatMap4, drainFork, merge, filterMap2, tapError, transduce, decodeText, splitLines, run, runCollect, runHead, runDrain, mkString, layer, fromUnknown, value2, when, whenOr, discriminatorsExhaustive, orElse2, __exportAll3, empty5, HttpClientError, InvalidUrlError, makeWith, post, put, del, setMethod, setHeader, setHeaders, bearerToken, acceptJson, setUrl, setUrlParam, setBody, bodyUint8Array, bodyJsonUnsafe, bodyFormDataRecord, schemaBodyJson, HttpClient, transformResponse, filterStatusOk, mapRequest, mapRequestEffect, RequestInit, layer2, Action_exports, ActionHandlerError, fromHttpClientFailure, AuthMethod_exports, File3, read, write, AgentChannel_exports, Key, Event, commandSchema, materializePlugin, Trigger_exports, fromPlugin, Service2, toLayer, Group_exports, layer3, oauth2TokenRefresherLayer, Plugin_exports, make6, isPlugin, filesUnavailable, PluginExecutionError, decodeInput, encodeOutput, responseLimit, execute3 };
|
|
19261
19302
|
|
|
19262
|
-
//# debugId=
|
|
19263
|
-
//# sourceMappingURL=plugin-
|
|
19303
|
+
//# debugId=177F6432AA9FC66F64756E2164756E21
|
|
19304
|
+
//# sourceMappingURL=plugin-ahbd9ttm.js.map
|