lalph 0.3.53 → 0.3.54
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/cli.mjs +639 -443
- package/package.json +5 -5
- package/src/Clanka.ts +25 -13
- package/src/GitFlow.ts +1 -1
- package/src/PromptGen.ts +11 -12
package/dist/cli.mjs
CHANGED
|
@@ -21,8 +21,8 @@ import { lstat, readdir as readdir$1, readlink, realpath } from "node:fs/promise
|
|
|
21
21
|
import * as NodeUrl from "node:url";
|
|
22
22
|
import { fileURLToPath } from "node:url";
|
|
23
23
|
import * as readline from "node:readline";
|
|
24
|
-
import { StringDecoder } from "node:string_decoder";
|
|
25
24
|
import * as NodeVm from "node:vm";
|
|
25
|
+
import { StringDecoder } from "node:string_decoder";
|
|
26
26
|
import process$1 from "node:process";
|
|
27
27
|
import tty from "node:tty";
|
|
28
28
|
//#region \0rolldown/runtime.js
|
|
@@ -3396,7 +3396,7 @@ const liftThrowable = (f) => (...a) => {
|
|
|
3396
3396
|
};
|
|
3397
3397
|
//#endregion
|
|
3398
3398
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/Duration.js
|
|
3399
|
-
const TypeId$
|
|
3399
|
+
const TypeId$73 = "~effect/time/Duration";
|
|
3400
3400
|
const bigint0$2 = /* @__PURE__ */ BigInt(0);
|
|
3401
3401
|
const bigint24 = /* @__PURE__ */ BigInt(24);
|
|
3402
3402
|
const bigint60 = /* @__PURE__ */ BigInt(60);
|
|
@@ -3451,7 +3451,7 @@ const fromInputUnsafe = (input) => {
|
|
|
3451
3451
|
}
|
|
3452
3452
|
case "object": {
|
|
3453
3453
|
if (input === null) break;
|
|
3454
|
-
if (TypeId$
|
|
3454
|
+
if (TypeId$73 in input) return input;
|
|
3455
3455
|
if (Array.isArray(input)) {
|
|
3456
3456
|
if (input.length !== 2 || !input.every(isNumber$1)) return invalid(input);
|
|
3457
3457
|
if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero$1;
|
|
@@ -3486,7 +3486,7 @@ const zeroDurationValue = {
|
|
|
3486
3486
|
const infinityDurationValue = { _tag: "Infinity" };
|
|
3487
3487
|
const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
|
|
3488
3488
|
const DurationProto = {
|
|
3489
|
-
[TypeId$
|
|
3489
|
+
[TypeId$73]: TypeId$73,
|
|
3490
3490
|
[symbol$6]() {
|
|
3491
3491
|
return structure(this.value);
|
|
3492
3492
|
},
|
|
@@ -3563,7 +3563,7 @@ const make$77 = (input) => {
|
|
|
3563
3563
|
* @since 2.0.0
|
|
3564
3564
|
* @category guards
|
|
3565
3565
|
*/
|
|
3566
|
-
const isDuration = (u) => hasProperty(u, TypeId$
|
|
3566
|
+
const isDuration = (u) => hasProperty(u, TypeId$73);
|
|
3567
3567
|
/**
|
|
3568
3568
|
* Checks if a Duration is finite (not infinite).
|
|
3569
3569
|
*
|
|
@@ -4349,9 +4349,9 @@ const isArrayNonEmpty$1 = (self) => self.length > 0;
|
|
|
4349
4349
|
/**
|
|
4350
4350
|
* @since 2.0.0
|
|
4351
4351
|
*/
|
|
4352
|
-
const TypeId$
|
|
4352
|
+
const TypeId$72 = "~effect/data/Option";
|
|
4353
4353
|
const CommonProto$1 = {
|
|
4354
|
-
[TypeId$
|
|
4354
|
+
[TypeId$72]: { _A: (_) => _ },
|
|
4355
4355
|
...PipeInspectableProto,
|
|
4356
4356
|
...YieldableProto
|
|
4357
4357
|
};
|
|
@@ -4402,7 +4402,7 @@ const NoneProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Co
|
|
|
4402
4402
|
}
|
|
4403
4403
|
});
|
|
4404
4404
|
/** @internal */
|
|
4405
|
-
const isOption$1 = (input) => hasProperty(input, TypeId$
|
|
4405
|
+
const isOption$1 = (input) => hasProperty(input, TypeId$72);
|
|
4406
4406
|
/** @internal */
|
|
4407
4407
|
const isNone$1 = (fa) => fa._tag === "None";
|
|
4408
4408
|
/** @internal */
|
|
@@ -4417,9 +4417,9 @@ const some$3 = (value) => {
|
|
|
4417
4417
|
};
|
|
4418
4418
|
//#endregion
|
|
4419
4419
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/internal/result.js
|
|
4420
|
-
const TypeId$
|
|
4420
|
+
const TypeId$71 = "~effect/data/Result";
|
|
4421
4421
|
const CommonProto = {
|
|
4422
|
-
[TypeId$
|
|
4422
|
+
[TypeId$71]: {
|
|
4423
4423
|
_A: (_) => _,
|
|
4424
4424
|
_E: (_) => _
|
|
4425
4425
|
},
|
|
@@ -4473,7 +4473,7 @@ const FailureProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create
|
|
|
4473
4473
|
}
|
|
4474
4474
|
});
|
|
4475
4475
|
/** @internal */
|
|
4476
|
-
const isResult$1 = (input) => hasProperty(input, TypeId$
|
|
4476
|
+
const isResult$1 = (input) => hasProperty(input, TypeId$71);
|
|
4477
4477
|
/** @internal */
|
|
4478
4478
|
const isFailure$5 = (result) => result._tag === "Failure";
|
|
4479
4479
|
/** @internal */
|
|
@@ -6652,7 +6652,7 @@ const ServiceProto = {
|
|
|
6652
6652
|
}
|
|
6653
6653
|
};
|
|
6654
6654
|
const ReferenceTypeId = "~effect/ServiceMap/Reference";
|
|
6655
|
-
const TypeId$
|
|
6655
|
+
const TypeId$70 = "~effect/ServiceMap";
|
|
6656
6656
|
/**
|
|
6657
6657
|
* @example
|
|
6658
6658
|
* ```ts
|
|
@@ -6676,7 +6676,7 @@ const makeUnsafe$14 = (mapUnsafe) => {
|
|
|
6676
6676
|
};
|
|
6677
6677
|
const Proto$27 = {
|
|
6678
6678
|
...PipeInspectableProto,
|
|
6679
|
-
[TypeId$
|
|
6679
|
+
[TypeId$70]: { _Services: (_) => _ },
|
|
6680
6680
|
toJSON() {
|
|
6681
6681
|
return {
|
|
6682
6682
|
_id: "ServiceMap",
|
|
@@ -6709,7 +6709,7 @@ const Proto$27 = {
|
|
|
6709
6709
|
* @since 4.0.0
|
|
6710
6710
|
* @category Guards
|
|
6711
6711
|
*/
|
|
6712
|
-
const isServiceMap = (u) => hasProperty(u, TypeId$
|
|
6712
|
+
const isServiceMap = (u) => hasProperty(u, TypeId$70);
|
|
6713
6713
|
/**
|
|
6714
6714
|
* Checks if the provided argument is a `Reference`.
|
|
6715
6715
|
*
|
|
@@ -10626,7 +10626,7 @@ const close = scopeClose;
|
|
|
10626
10626
|
const closeUnsafe = scopeCloseUnsafe;
|
|
10627
10627
|
//#endregion
|
|
10628
10628
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/Layer.js
|
|
10629
|
-
const TypeId$
|
|
10629
|
+
const TypeId$69 = "~effect/Layer";
|
|
10630
10630
|
const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
10631
10631
|
/**
|
|
10632
10632
|
* Returns `true` if the specified value is a `Layer`, `false` otherwise.
|
|
@@ -10651,9 +10651,9 @@ const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
|
10651
10651
|
* @since 2.0.0
|
|
10652
10652
|
* @category getters
|
|
10653
10653
|
*/
|
|
10654
|
-
const isLayer = (u) => hasProperty(u, TypeId$
|
|
10654
|
+
const isLayer = (u) => hasProperty(u, TypeId$69);
|
|
10655
10655
|
const LayerProto = {
|
|
10656
|
-
[TypeId$
|
|
10656
|
+
[TypeId$69]: {
|
|
10657
10657
|
_ROut: identity,
|
|
10658
10658
|
_E: identity,
|
|
10659
10659
|
_RIn: identity
|
|
@@ -11541,9 +11541,9 @@ const makeUnimplemented = (error) => {
|
|
|
11541
11541
|
* @since 3.16.0
|
|
11542
11542
|
* @category Type IDs
|
|
11543
11543
|
*/
|
|
11544
|
-
const TypeId$
|
|
11544
|
+
const TypeId$68 = "~effect/ExecutionPlan";
|
|
11545
11545
|
const Proto$26 = {
|
|
11546
|
-
[TypeId$
|
|
11546
|
+
[TypeId$68]: TypeId$68,
|
|
11547
11547
|
get withRequirements() {
|
|
11548
11548
|
const self = this;
|
|
11549
11549
|
return servicesWith$1((services) => succeed$7(makeProto$1(self.steps.map((step) => ({
|
|
@@ -12073,11 +12073,11 @@ const Clock = ClockRef;
|
|
|
12073
12073
|
//#endregion
|
|
12074
12074
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/internal/dateTime.js
|
|
12075
12075
|
/** @internal */
|
|
12076
|
-
const TypeId$
|
|
12076
|
+
const TypeId$66 = "~effect/time/DateTime";
|
|
12077
12077
|
/** @internal */
|
|
12078
12078
|
const TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
12079
12079
|
const Proto$25 = {
|
|
12080
|
-
[TypeId$
|
|
12080
|
+
[TypeId$66]: TypeId$66,
|
|
12081
12081
|
pipe() {
|
|
12082
12082
|
return pipeArguments(this, arguments);
|
|
12083
12083
|
},
|
|
@@ -12145,7 +12145,7 @@ const makeZonedProto = (epochMillis, zone, partsUtc) => {
|
|
|
12145
12145
|
return self;
|
|
12146
12146
|
};
|
|
12147
12147
|
/** @internal */
|
|
12148
|
-
const isDateTime$1 = (u) => hasProperty(u, TypeId$
|
|
12148
|
+
const isDateTime$1 = (u) => hasProperty(u, TypeId$66);
|
|
12149
12149
|
const isDateTimeArgs = (args) => isDateTime$1(args[0]);
|
|
12150
12150
|
/** @internal */
|
|
12151
12151
|
const isUtc$1 = (self) => self._tag === "Utc";
|
|
@@ -12633,7 +12633,7 @@ const matchEffect$1 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffec
|
|
|
12633
12633
|
*
|
|
12634
12634
|
* @since 2.0.0
|
|
12635
12635
|
*/
|
|
12636
|
-
const TypeId$
|
|
12636
|
+
const TypeId$65 = "~effect/Schedule";
|
|
12637
12637
|
/**
|
|
12638
12638
|
* @since 4.0.0
|
|
12639
12639
|
* @category Metadata
|
|
@@ -12649,7 +12649,7 @@ const CurrentMetadata = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetada
|
|
|
12649
12649
|
elapsedSincePrevious: 0
|
|
12650
12650
|
}) });
|
|
12651
12651
|
const ScheduleProto = {
|
|
12652
|
-
[TypeId$
|
|
12652
|
+
[TypeId$65]: {
|
|
12653
12653
|
_Out: identity,
|
|
12654
12654
|
_In: identity,
|
|
12655
12655
|
_Env: identity
|
|
@@ -12677,7 +12677,7 @@ const ScheduleProto = {
|
|
|
12677
12677
|
* @since 2.0.0
|
|
12678
12678
|
* @category guards
|
|
12679
12679
|
*/
|
|
12680
|
-
const isSchedule = (u) => hasProperty(u, TypeId$
|
|
12680
|
+
const isSchedule = (u) => hasProperty(u, TypeId$65);
|
|
12681
12681
|
/**
|
|
12682
12682
|
* Creates a Schedule from a step function that returns a Pull.
|
|
12683
12683
|
*
|
|
@@ -13147,7 +13147,7 @@ const buildFromOptions = (options) => {
|
|
|
13147
13147
|
};
|
|
13148
13148
|
//#endregion
|
|
13149
13149
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/Request.js
|
|
13150
|
-
const TypeId$
|
|
13150
|
+
const TypeId$64 = "~effect/Request";
|
|
13151
13151
|
const requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
13152
13152
|
_E: (_) => _,
|
|
13153
13153
|
_A: (_) => _,
|
|
@@ -13158,11 +13158,11 @@ const requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
|
13158
13158
|
*/
|
|
13159
13159
|
const RequestPrototype = {
|
|
13160
13160
|
...StructuralProto,
|
|
13161
|
-
[TypeId$
|
|
13161
|
+
[TypeId$64]: requestVariance
|
|
13162
13162
|
};
|
|
13163
13163
|
//#endregion
|
|
13164
13164
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/Effect.js
|
|
13165
|
-
const TypeId$
|
|
13165
|
+
const TypeId$63 = EffectTypeId$1;
|
|
13166
13166
|
/**
|
|
13167
13167
|
* Tests if a value is an `Effect`.
|
|
13168
13168
|
*
|
|
@@ -13177,7 +13177,7 @@ const TypeId$62 = EffectTypeId$1;
|
|
|
13177
13177
|
* @since 2.0.0
|
|
13178
13178
|
* @category Guards
|
|
13179
13179
|
*/
|
|
13180
|
-
const isEffect = (u) => typeof u === "object" && u !== null && TypeId$
|
|
13180
|
+
const isEffect = (u) => typeof u === "object" && u !== null && TypeId$63 in u;
|
|
13181
13181
|
/**
|
|
13182
13182
|
* Combines multiple effects into one, returning results based on the input
|
|
13183
13183
|
* structure.
|
|
@@ -18214,7 +18214,7 @@ const stringOrRedacted = (val) => typeof val === "string" ? val : value$3(val);
|
|
|
18214
18214
|
*
|
|
18215
18215
|
* @since 3.3.0
|
|
18216
18216
|
*/
|
|
18217
|
-
const TypeId$
|
|
18217
|
+
const TypeId$62 = "~effect/data/Redacted";
|
|
18218
18218
|
/**
|
|
18219
18219
|
* @example
|
|
18220
18220
|
* ```ts
|
|
@@ -18230,7 +18230,7 @@ const TypeId$61 = "~effect/data/Redacted";
|
|
|
18230
18230
|
* @since 3.3.0
|
|
18231
18231
|
* @category refinements
|
|
18232
18232
|
*/
|
|
18233
|
-
const isRedacted = (u) => hasProperty(u, TypeId$
|
|
18233
|
+
const isRedacted = (u) => hasProperty(u, TypeId$62);
|
|
18234
18234
|
/**
|
|
18235
18235
|
* This function creates a `Redacted<A>` instance from a given value `A`,
|
|
18236
18236
|
* securely hiding its content.
|
|
@@ -18252,7 +18252,7 @@ const make$69 = (value, options) => {
|
|
|
18252
18252
|
return self;
|
|
18253
18253
|
};
|
|
18254
18254
|
const Proto$24 = {
|
|
18255
|
-
[TypeId$
|
|
18255
|
+
[TypeId$62]: { _A: (_) => _ },
|
|
18256
18256
|
label: void 0,
|
|
18257
18257
|
...PipeInspectableProto,
|
|
18258
18258
|
toJSON() {
|
|
@@ -18312,7 +18312,7 @@ const value$2 = value$3;
|
|
|
18312
18312
|
const makeEquivalence$2 = (isEquivalent) => make$76((x, y) => isEquivalent(value$2(x), value$2(y)));
|
|
18313
18313
|
//#endregion
|
|
18314
18314
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/SchemaIssue.js
|
|
18315
|
-
const TypeId$
|
|
18315
|
+
const TypeId$61 = "~effect/SchemaIssue/Issue";
|
|
18316
18316
|
/**
|
|
18317
18317
|
* Returns `true` if the given value is an {@link Issue}.
|
|
18318
18318
|
*
|
|
@@ -18343,10 +18343,10 @@ const TypeId$60 = "~effect/SchemaIssue/Issue";
|
|
|
18343
18343
|
* @since 4.0.0
|
|
18344
18344
|
*/
|
|
18345
18345
|
function isIssue(u) {
|
|
18346
|
-
return hasProperty(u, TypeId$
|
|
18346
|
+
return hasProperty(u, TypeId$61);
|
|
18347
18347
|
}
|
|
18348
18348
|
var Base$1 = class {
|
|
18349
|
-
[TypeId$
|
|
18349
|
+
[TypeId$61] = TypeId$61;
|
|
18350
18350
|
toString() {
|
|
18351
18351
|
return defaultFormatter$1(this);
|
|
18352
18352
|
}
|
|
@@ -19723,9 +19723,9 @@ function encodeBase64() {
|
|
|
19723
19723
|
function decodeBase64() {
|
|
19724
19724
|
return transformOrFail$1((input) => mapError$5(decodeBase64$1(input), (e) => new InvalidValue$1(some$2(input), { message: e.message })).asEffect());
|
|
19725
19725
|
}
|
|
19726
|
-
const TypeId$
|
|
19726
|
+
const TypeId$60 = "~effect/BigDecimal";
|
|
19727
19727
|
const BigDecimalProto = {
|
|
19728
|
-
[TypeId$
|
|
19728
|
+
[TypeId$60]: TypeId$60,
|
|
19729
19729
|
[symbol$6]() {
|
|
19730
19730
|
const normalized = normalize$1(this);
|
|
19731
19731
|
return combine$2(hash(normalized.value), number$5(normalized.scale));
|
|
@@ -19766,7 +19766,7 @@ const BigDecimalProto = {
|
|
|
19766
19766
|
* @since 2.0.0
|
|
19767
19767
|
* @category guards
|
|
19768
19768
|
*/
|
|
19769
|
-
const isBigDecimal = (u) => hasProperty(u, TypeId$
|
|
19769
|
+
const isBigDecimal = (u) => hasProperty(u, TypeId$60);
|
|
19770
19770
|
/**
|
|
19771
19771
|
* Creates a `BigDecimal` from a `bigint` value and a scale.
|
|
19772
19772
|
*
|
|
@@ -20167,7 +20167,7 @@ var Middleware = class Middleware {
|
|
|
20167
20167
|
return new Middleware(this.encode, this.decode);
|
|
20168
20168
|
}
|
|
20169
20169
|
};
|
|
20170
|
-
const TypeId$
|
|
20170
|
+
const TypeId$59 = "~effect/SchemaTransformation/Transformation";
|
|
20171
20171
|
/**
|
|
20172
20172
|
* A bidirectional transformation between a decoded type `T` and an encoded
|
|
20173
20173
|
* type `E`, built from a pair of `Getter`s.
|
|
@@ -20209,7 +20209,7 @@ const TypeId$58 = "~effect/SchemaTransformation/Transformation";
|
|
|
20209
20209
|
* @since 4.0.0
|
|
20210
20210
|
*/
|
|
20211
20211
|
var Transformation = class Transformation {
|
|
20212
|
-
[TypeId$
|
|
20212
|
+
[TypeId$59] = TypeId$59;
|
|
20213
20213
|
_tag = "Transformation";
|
|
20214
20214
|
decode;
|
|
20215
20215
|
encode;
|
|
@@ -20253,7 +20253,7 @@ var Transformation = class Transformation {
|
|
|
20253
20253
|
* @since 4.0.0
|
|
20254
20254
|
*/
|
|
20255
20255
|
function isTransformation(u) {
|
|
20256
|
-
return hasProperty(u, TypeId$
|
|
20256
|
+
return hasProperty(u, TypeId$59);
|
|
20257
20257
|
}
|
|
20258
20258
|
/**
|
|
20259
20259
|
* Constructs a `Transformation` from an object with `decode` and `encode`
|
|
@@ -20729,7 +20729,7 @@ function makeGuard(tag) {
|
|
|
20729
20729
|
* @since 4.0.0
|
|
20730
20730
|
*/
|
|
20731
20731
|
function isAST(u) {
|
|
20732
|
-
return hasProperty(u, TypeId$
|
|
20732
|
+
return hasProperty(u, TypeId$58) && u[TypeId$58] === TypeId$58;
|
|
20733
20733
|
}
|
|
20734
20734
|
/**
|
|
20735
20735
|
* Narrows an {@link AST} to {@link Declaration}.
|
|
@@ -20840,7 +20840,7 @@ var Context = class {
|
|
|
20840
20840
|
this.annotations = annotations;
|
|
20841
20841
|
}
|
|
20842
20842
|
};
|
|
20843
|
-
const TypeId$
|
|
20843
|
+
const TypeId$58 = "~effect/Schema";
|
|
20844
20844
|
/**
|
|
20845
20845
|
* Abstract base class for all {@link AST} node variants.
|
|
20846
20846
|
*
|
|
@@ -20861,7 +20861,7 @@ const TypeId$57 = "~effect/Schema";
|
|
|
20861
20861
|
* @since 4.0.0
|
|
20862
20862
|
*/
|
|
20863
20863
|
var Base = class {
|
|
20864
|
-
[TypeId$
|
|
20864
|
+
[TypeId$58] = TypeId$58;
|
|
20865
20865
|
annotations;
|
|
20866
20866
|
checks;
|
|
20867
20867
|
encoding;
|
|
@@ -22688,7 +22688,7 @@ function nominal() {
|
|
|
22688
22688
|
/**
|
|
22689
22689
|
* @since 4.0.0
|
|
22690
22690
|
*/
|
|
22691
|
-
const TypeId$
|
|
22691
|
+
const TypeId$57 = "~effect/platform/PlatformError";
|
|
22692
22692
|
/**
|
|
22693
22693
|
* @since 4.0.0
|
|
22694
22694
|
* @category Models
|
|
@@ -22728,7 +22728,7 @@ var PlatformError = class extends TaggedError("PlatformError") {
|
|
|
22728
22728
|
/**
|
|
22729
22729
|
* @since 4.0.0
|
|
22730
22730
|
*/
|
|
22731
|
-
[TypeId$
|
|
22731
|
+
[TypeId$57] = TypeId$57;
|
|
22732
22732
|
get message() {
|
|
22733
22733
|
return this.reason.message;
|
|
22734
22734
|
}
|
|
@@ -22815,7 +22815,7 @@ const badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
|
22815
22815
|
*
|
|
22816
22816
|
* @since 2.0.0
|
|
22817
22817
|
*/
|
|
22818
|
-
const TypeId$
|
|
22818
|
+
const TypeId$56 = "~effect/collections/Chunk";
|
|
22819
22819
|
function copy$1(src, srcPos, dest, destPos, len) {
|
|
22820
22820
|
for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) dest[destPos + i - srcPos] = src[i];
|
|
22821
22821
|
return dest;
|
|
@@ -22844,7 +22844,7 @@ const emptyArray = [];
|
|
|
22844
22844
|
const makeEquivalence$1 = (isEquivalent) => make$76((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, getUnsafe$4(that, i))));
|
|
22845
22845
|
const _equivalence = /* @__PURE__ */ makeEquivalence$1(equals$2);
|
|
22846
22846
|
const ChunkProto = {
|
|
22847
|
-
[TypeId$
|
|
22847
|
+
[TypeId$56]: { _A: (_) => _ },
|
|
22848
22848
|
toString() {
|
|
22849
22849
|
return `Chunk(${format$4(toReadonlyArray(this))})`;
|
|
22850
22850
|
},
|
|
@@ -22929,7 +22929,7 @@ const makeChunk = (backing) => {
|
|
|
22929
22929
|
* @category constructors
|
|
22930
22930
|
* @since 2.0.0
|
|
22931
22931
|
*/
|
|
22932
|
-
const isChunk = (u) => hasProperty(u, TypeId$
|
|
22932
|
+
const isChunk = (u) => hasProperty(u, TypeId$56);
|
|
22933
22933
|
const _empty = /* @__PURE__ */ makeChunk({ _tag: "IEmpty" });
|
|
22934
22934
|
/**
|
|
22935
22935
|
* Creates an empty `Chunk`.
|
|
@@ -24042,9 +24042,9 @@ const filter$4 = (self, f) => {
|
|
|
24042
24042
|
const remove$6 = (self, value) => filter$4(self, (v) => v !== value);
|
|
24043
24043
|
//#endregion
|
|
24044
24044
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/MutableRef.js
|
|
24045
|
-
const TypeId$
|
|
24045
|
+
const TypeId$55 = "~effect/MutableRef";
|
|
24046
24046
|
const MutableRefProto = {
|
|
24047
|
-
[TypeId$
|
|
24047
|
+
[TypeId$55]: TypeId$55,
|
|
24048
24048
|
...PipeInspectableProto,
|
|
24049
24049
|
toJSON() {
|
|
24050
24050
|
return {
|
|
@@ -24192,6 +24192,50 @@ const setAndGet = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
24192
24192
|
});
|
|
24193
24193
|
/**
|
|
24194
24194
|
* Updates the MutableRef with the result of applying a function to its current value,
|
|
24195
|
+
* and returns the reference.
|
|
24196
|
+
*
|
|
24197
|
+
* @example
|
|
24198
|
+
* ```ts
|
|
24199
|
+
* import { MutableRef } from "effect"
|
|
24200
|
+
*
|
|
24201
|
+
* const counter = MutableRef.make(5)
|
|
24202
|
+
*
|
|
24203
|
+
* // Increment the counter
|
|
24204
|
+
* MutableRef.update(counter, (n) => n + 1)
|
|
24205
|
+
* console.log(MutableRef.get(counter)) // 6
|
|
24206
|
+
*
|
|
24207
|
+
* // Chain updates (since it returns the ref)
|
|
24208
|
+
* const result = MutableRef.update(counter, (n) => n * 2)
|
|
24209
|
+
* console.log(result === counter) // true (same reference)
|
|
24210
|
+
* console.log(MutableRef.get(counter)) // 12
|
|
24211
|
+
*
|
|
24212
|
+
* // Transform string
|
|
24213
|
+
* const message = MutableRef.make("hello")
|
|
24214
|
+
* MutableRef.update(message, (s) => s.toUpperCase())
|
|
24215
|
+
* console.log(MutableRef.get(message)) // "HELLO"
|
|
24216
|
+
*
|
|
24217
|
+
* // Update complex objects
|
|
24218
|
+
* const user = MutableRef.make({ name: "Alice", age: 30 })
|
|
24219
|
+
* MutableRef.update(user, (u) => ({ ...u, age: u.age + 1 }))
|
|
24220
|
+
* console.log(MutableRef.get(user)) // { name: "Alice", age: 31 }
|
|
24221
|
+
*
|
|
24222
|
+
* // Pipe-able version
|
|
24223
|
+
* const double = MutableRef.update((n: number) => n * 2)
|
|
24224
|
+
* double(counter)
|
|
24225
|
+
* console.log(MutableRef.get(counter)) // 24
|
|
24226
|
+
*
|
|
24227
|
+
* // Array operations
|
|
24228
|
+
* const list = MutableRef.make<Array<number>>([1, 2, 3])
|
|
24229
|
+
* MutableRef.update(list, (arr) => [...arr, 4])
|
|
24230
|
+
* console.log(MutableRef.get(list)) // [1, 2, 3, 4]
|
|
24231
|
+
* ```
|
|
24232
|
+
*
|
|
24233
|
+
* @since 2.0.0
|
|
24234
|
+
* @category general
|
|
24235
|
+
*/
|
|
24236
|
+
const update = /* @__PURE__ */ dual(2, (self, f) => set$9(self, f(get$14(self))));
|
|
24237
|
+
/**
|
|
24238
|
+
* Updates the MutableRef with the result of applying a function to its current value,
|
|
24195
24239
|
* and returns the new value.
|
|
24196
24240
|
*
|
|
24197
24241
|
* @example
|
|
@@ -24268,7 +24312,7 @@ const updateAndGet = /* @__PURE__ */ dual(2, (self, f) => setAndGet(self, f(get$
|
|
|
24268
24312
|
*
|
|
24269
24313
|
* @since 2.0.0
|
|
24270
24314
|
*/
|
|
24271
|
-
const TypeId$
|
|
24315
|
+
const TypeId$54 = "~effect/PubSub";
|
|
24272
24316
|
const SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
24273
24317
|
/**
|
|
24274
24318
|
* Creates a PubSub with a custom atomic implementation and strategy.
|
|
@@ -25307,7 +25351,7 @@ var SubscriptionImpl = class {
|
|
|
25307
25351
|
}
|
|
25308
25352
|
};
|
|
25309
25353
|
var PubSubImpl = class {
|
|
25310
|
-
[TypeId$
|
|
25354
|
+
[TypeId$54] = { _A: identity };
|
|
25311
25355
|
pubsub;
|
|
25312
25356
|
subscribers;
|
|
25313
25357
|
scope;
|
|
@@ -25638,7 +25682,7 @@ const emptyReplayWindow = {
|
|
|
25638
25682
|
/**
|
|
25639
25683
|
* @since 3.8.0
|
|
25640
25684
|
*/
|
|
25641
|
-
const TypeId$
|
|
25685
|
+
const TypeId$53 = "~effect/Queue";
|
|
25642
25686
|
const EnqueueTypeId = "~effect/Queue/Enqueue";
|
|
25643
25687
|
const DequeueTypeId = "~effect/Queue/Dequeue";
|
|
25644
25688
|
const variance$1 = {
|
|
@@ -25646,7 +25690,7 @@ const variance$1 = {
|
|
|
25646
25690
|
_E: identity
|
|
25647
25691
|
};
|
|
25648
25692
|
const QueueProto = {
|
|
25649
|
-
[TypeId$
|
|
25693
|
+
[TypeId$53]: variance$1,
|
|
25650
25694
|
[EnqueueTypeId]: variance$1,
|
|
25651
25695
|
[DequeueTypeId]: variance$1,
|
|
25652
25696
|
...PipeInspectableProto,
|
|
@@ -26454,9 +26498,9 @@ const finalize$1 = (self, exit) => {
|
|
|
26454
26498
|
};
|
|
26455
26499
|
//#endregion
|
|
26456
26500
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/MutableHashMap.js
|
|
26457
|
-
const TypeId$
|
|
26501
|
+
const TypeId$52 = "~effect/collections/MutableHashMap";
|
|
26458
26502
|
const MutableHashMapProto = {
|
|
26459
|
-
[TypeId$
|
|
26503
|
+
[TypeId$52]: TypeId$52,
|
|
26460
26504
|
[Symbol.iterator]() {
|
|
26461
26505
|
return this.backing[Symbol.iterator]();
|
|
26462
26506
|
},
|
|
@@ -26925,7 +26969,7 @@ const toPull$2 = (take) => isExit(take) ? isSuccess$3(take) ? done(take.value) :
|
|
|
26925
26969
|
*
|
|
26926
26970
|
* @since 2.0.0
|
|
26927
26971
|
*/
|
|
26928
|
-
const TypeId$
|
|
26972
|
+
const TypeId$51 = "~effect/Channel";
|
|
26929
26973
|
/**
|
|
26930
26974
|
* Tests if a value is a `Channel`.
|
|
26931
26975
|
*
|
|
@@ -26941,9 +26985,9 @@ const TypeId$50 = "~effect/Channel";
|
|
|
26941
26985
|
* @category guards
|
|
26942
26986
|
* @since 3.5.4
|
|
26943
26987
|
*/
|
|
26944
|
-
const isChannel = (u) => hasProperty(u, TypeId$
|
|
26988
|
+
const isChannel = (u) => hasProperty(u, TypeId$51);
|
|
26945
26989
|
const ChannelProto = {
|
|
26946
|
-
[TypeId$
|
|
26990
|
+
[TypeId$51]: {
|
|
26947
26991
|
_Env: identity,
|
|
26948
26992
|
_InErr: identity,
|
|
26949
26993
|
_InElem: identity,
|
|
@@ -28598,14 +28642,14 @@ const toPubSubTake$1 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(functi
|
|
|
28598
28642
|
}));
|
|
28599
28643
|
//#endregion
|
|
28600
28644
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/internal/stream.js
|
|
28601
|
-
const TypeId$
|
|
28645
|
+
const TypeId$50 = "~effect/Stream";
|
|
28602
28646
|
const streamVariance = {
|
|
28603
28647
|
_R: identity,
|
|
28604
28648
|
_E: identity,
|
|
28605
28649
|
_A: identity
|
|
28606
28650
|
};
|
|
28607
28651
|
const StreamProto = {
|
|
28608
|
-
[TypeId$
|
|
28652
|
+
[TypeId$50]: streamVariance,
|
|
28609
28653
|
pipe() {
|
|
28610
28654
|
return pipeArguments(this, arguments);
|
|
28611
28655
|
}
|
|
@@ -28618,7 +28662,7 @@ const fromChannel$2 = (channel) => {
|
|
|
28618
28662
|
};
|
|
28619
28663
|
//#endregion
|
|
28620
28664
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/Sink.js
|
|
28621
|
-
const TypeId$
|
|
28665
|
+
const TypeId$49 = "~effect/Sink";
|
|
28622
28666
|
const endVoid = /* @__PURE__ */ succeed$3([void 0]);
|
|
28623
28667
|
const sinkVariance = {
|
|
28624
28668
|
_A: identity,
|
|
@@ -28628,7 +28672,7 @@ const sinkVariance = {
|
|
|
28628
28672
|
_R: identity
|
|
28629
28673
|
};
|
|
28630
28674
|
const SinkProto = {
|
|
28631
|
-
[TypeId$
|
|
28675
|
+
[TypeId$49]: sinkVariance,
|
|
28632
28676
|
pipe() {
|
|
28633
28677
|
return pipeArguments(this, arguments);
|
|
28634
28678
|
}
|
|
@@ -28650,7 +28694,7 @@ const SinkProto = {
|
|
|
28650
28694
|
* @since 2.0.0
|
|
28651
28695
|
* @category guards
|
|
28652
28696
|
*/
|
|
28653
|
-
const isSink = (u) => hasProperty(u, TypeId$
|
|
28697
|
+
const isSink = (u) => hasProperty(u, TypeId$49);
|
|
28654
28698
|
/**
|
|
28655
28699
|
* Creates a sink from a `Channel`.
|
|
28656
28700
|
*
|
|
@@ -28798,9 +28842,9 @@ const unwrap$1 = (effect) => fromChannel$1(unwrap$2(map$8(effect, toChannel$1)))
|
|
|
28798
28842
|
/**
|
|
28799
28843
|
* @since 3.5.0
|
|
28800
28844
|
*/
|
|
28801
|
-
const TypeId$
|
|
28845
|
+
const TypeId$48 = "~effect/RcMap";
|
|
28802
28846
|
const makeUnsafe$7 = (options) => ({
|
|
28803
|
-
[TypeId$
|
|
28847
|
+
[TypeId$48]: TypeId$48,
|
|
28804
28848
|
lookup: options.lookup,
|
|
28805
28849
|
services: options.services,
|
|
28806
28850
|
scope: options.scope,
|
|
@@ -28993,7 +29037,7 @@ const invalidate$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function
|
|
|
28993
29037
|
}, uninterruptible));
|
|
28994
29038
|
//#endregion
|
|
28995
29039
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/internal/rcRef.js
|
|
28996
|
-
const TypeId$
|
|
29040
|
+
const TypeId$47 = "~effect/RcRef";
|
|
28997
29041
|
const stateEmpty = { _tag: "Empty" };
|
|
28998
29042
|
const stateClosed = { _tag: "Closed" };
|
|
28999
29043
|
const variance = {
|
|
@@ -29001,7 +29045,7 @@ const variance = {
|
|
|
29001
29045
|
_E: identity
|
|
29002
29046
|
};
|
|
29003
29047
|
var RcRefImpl = class {
|
|
29004
|
-
[TypeId$
|
|
29048
|
+
[TypeId$47] = variance;
|
|
29005
29049
|
pipe() {
|
|
29006
29050
|
return pipeArguments(this, arguments);
|
|
29007
29051
|
}
|
|
@@ -29153,7 +29197,7 @@ const get$10 = get$11;
|
|
|
29153
29197
|
/**
|
|
29154
29198
|
* @since 2.0.0
|
|
29155
29199
|
*/
|
|
29156
|
-
const TypeId$
|
|
29200
|
+
const TypeId$46 = "~effect/Stream";
|
|
29157
29201
|
/**
|
|
29158
29202
|
* Checks whether a value is a Stream.
|
|
29159
29203
|
*
|
|
@@ -29177,7 +29221,7 @@ const TypeId$45 = "~effect/Stream";
|
|
|
29177
29221
|
* @since 2.0.0
|
|
29178
29222
|
* @category Guards
|
|
29179
29223
|
*/
|
|
29180
|
-
const isStream = (u) => hasProperty(u, TypeId$
|
|
29224
|
+
const isStream = (u) => hasProperty(u, TypeId$46);
|
|
29181
29225
|
/**
|
|
29182
29226
|
* Creates a stream from a array-emitting `Channel`.
|
|
29183
29227
|
*
|
|
@@ -31169,7 +31213,7 @@ const toPubSubTake = /* @__PURE__ */ dual(2, (self, options) => toPubSubTake$1(s
|
|
|
31169
31213
|
*
|
|
31170
31214
|
* @since 4.0.0
|
|
31171
31215
|
*/
|
|
31172
|
-
const TypeId$
|
|
31216
|
+
const TypeId$45 = "~effect/platform/FileSystem";
|
|
31173
31217
|
/**
|
|
31174
31218
|
* Creates a `Size` from various numeric input types.
|
|
31175
31219
|
*
|
|
@@ -31258,7 +31302,7 @@ const FileSystem = /* @__PURE__ */ Service$1("effect/platform/FileSystem");
|
|
|
31258
31302
|
*/
|
|
31259
31303
|
const make$55 = (impl) => FileSystem.of({
|
|
31260
31304
|
...impl,
|
|
31261
|
-
[TypeId$
|
|
31305
|
+
[TypeId$45]: TypeId$45,
|
|
31262
31306
|
exists: (path) => pipe$1(impl.access(path), as$1(true), catchTag$1("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed$3(false) : fail$6(e))),
|
|
31263
31307
|
readFileString: (path, encoding) => flatMap$4(impl.readFile(path), (_) => try_({
|
|
31264
31308
|
try: () => new TextDecoder(encoding).decode(_),
|
|
@@ -31360,7 +31404,7 @@ var WatchBackend = class extends Service$1()("effect/platform/FileSystem/WatchBa
|
|
|
31360
31404
|
/**
|
|
31361
31405
|
* @since 4.0.0
|
|
31362
31406
|
*/
|
|
31363
|
-
const TypeId$
|
|
31407
|
+
const TypeId$44 = "~effect/platform/Path";
|
|
31364
31408
|
/**
|
|
31365
31409
|
* @since 4.0.0
|
|
31366
31410
|
* @category tag
|
|
@@ -31552,7 +31596,7 @@ function encodePathChars(filepath) {
|
|
|
31552
31596
|
return filepath;
|
|
31553
31597
|
}
|
|
31554
31598
|
const posixImpl = /* @__PURE__ */ Path$1.of({
|
|
31555
|
-
[TypeId$
|
|
31599
|
+
[TypeId$44]: TypeId$44,
|
|
31556
31600
|
resolve: resolve$1,
|
|
31557
31601
|
normalize(path) {
|
|
31558
31602
|
if (path.length === 0) return ".";
|
|
@@ -32836,6 +32880,11 @@ function decodeUnknownEffect$1(schema) {
|
|
|
32836
32880
|
* @category Decoding
|
|
32837
32881
|
* @since 4.0.0
|
|
32838
32882
|
*/
|
|
32883
|
+
const decodeEffect$1 = decodeUnknownEffect$1;
|
|
32884
|
+
/**
|
|
32885
|
+
* @category Decoding
|
|
32886
|
+
* @since 4.0.0
|
|
32887
|
+
*/
|
|
32839
32888
|
function decodeUnknownOption$1(schema) {
|
|
32840
32889
|
return asOption(decodeUnknownEffect$1(schema));
|
|
32841
32890
|
}
|
|
@@ -32862,6 +32911,11 @@ function encodeUnknownEffect$1(schema) {
|
|
|
32862
32911
|
* @category Encoding
|
|
32863
32912
|
* @since 4.0.0
|
|
32864
32913
|
*/
|
|
32914
|
+
const encodeEffect$1 = encodeUnknownEffect$1;
|
|
32915
|
+
/**
|
|
32916
|
+
* @category Encoding
|
|
32917
|
+
* @since 4.0.0
|
|
32918
|
+
*/
|
|
32865
32919
|
function encodeUnknownSync$1(schema) {
|
|
32866
32920
|
return asSync(encodeUnknownEffect$1(schema));
|
|
32867
32921
|
}
|
|
@@ -33033,9 +33087,9 @@ function escapeToken(token) {
|
|
|
33033
33087
|
//#endregion
|
|
33034
33088
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/internal/schema/schema.js
|
|
33035
33089
|
/** @internal */
|
|
33036
|
-
const TypeId$
|
|
33090
|
+
const TypeId$43 = "~effect/Schema/Schema";
|
|
33037
33091
|
const SchemaProto = {
|
|
33038
|
-
[TypeId$
|
|
33092
|
+
[TypeId$43]: TypeId$43,
|
|
33039
33093
|
pipe() {
|
|
33040
33094
|
return pipeArguments(this, arguments);
|
|
33041
33095
|
},
|
|
@@ -33770,7 +33824,7 @@ function getPartPattern(part) {
|
|
|
33770
33824
|
*
|
|
33771
33825
|
* @since 4.0.0
|
|
33772
33826
|
*/
|
|
33773
|
-
const TypeId$
|
|
33827
|
+
const TypeId$42 = TypeId$43;
|
|
33774
33828
|
/**
|
|
33775
33829
|
* Creates a schema for a **parametric** type (a generic container such as
|
|
33776
33830
|
* `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
|
|
@@ -34096,7 +34150,7 @@ const make$50 = make$51;
|
|
|
34096
34150
|
* @since 4.0.0
|
|
34097
34151
|
*/
|
|
34098
34152
|
function isSchema(u) {
|
|
34099
|
-
return hasProperty(u, TypeId$
|
|
34153
|
+
return hasProperty(u, TypeId$42) && u[TypeId$42] === TypeId$42;
|
|
34100
34154
|
}
|
|
34101
34155
|
/**
|
|
34102
34156
|
* Creates an exact optional key schema for struct fields. Unlike `optional`,
|
|
@@ -35881,7 +35935,7 @@ function makeClass(Inherited, identifier, struct$1, annotations) {
|
|
|
35881
35935
|
toString() {
|
|
35882
35936
|
return `${identifier}(${format$4({ ...this })})`;
|
|
35883
35937
|
}
|
|
35884
|
-
static [TypeId$
|
|
35938
|
+
static [TypeId$42] = TypeId$42;
|
|
35885
35939
|
get [ClassTypeId]() {
|
|
35886
35940
|
return ClassTypeId;
|
|
35887
35941
|
}
|
|
@@ -36240,7 +36294,7 @@ const Json = /* @__PURE__ */ make$50(Json$1);
|
|
|
36240
36294
|
const MutableJson = /* @__PURE__ */ make$50(MutableJson$1);
|
|
36241
36295
|
//#endregion
|
|
36242
36296
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/Config.js
|
|
36243
|
-
const TypeId$
|
|
36297
|
+
const TypeId$41 = "~effect/Config";
|
|
36244
36298
|
/**
|
|
36245
36299
|
* The error type produced when config loading or validation fails.
|
|
36246
36300
|
*
|
|
@@ -36277,7 +36331,7 @@ var ConfigError = class {
|
|
|
36277
36331
|
const Proto$22 = {
|
|
36278
36332
|
...PipeInspectableProto,
|
|
36279
36333
|
...YieldableProto,
|
|
36280
|
-
[TypeId$
|
|
36334
|
+
[TypeId$41]: TypeId$41,
|
|
36281
36335
|
asEffect() {
|
|
36282
36336
|
return flatMap$4(ConfigProvider.asEffect(), (provider) => this.parse(provider));
|
|
36283
36337
|
},
|
|
@@ -36906,7 +36960,7 @@ const getErrorReported = (u) => {
|
|
|
36906
36960
|
* @since 4.0.0
|
|
36907
36961
|
* @category type id
|
|
36908
36962
|
*/
|
|
36909
|
-
const TypeId$
|
|
36963
|
+
const TypeId$40 = "~effect/cli/CliError";
|
|
36910
36964
|
/**
|
|
36911
36965
|
* Type guard to check if a value is a CLI error.
|
|
36912
36966
|
*
|
|
@@ -36936,7 +36990,7 @@ const TypeId$39 = "~effect/cli/CliError";
|
|
|
36936
36990
|
* @since 4.0.0
|
|
36937
36991
|
* @category guards
|
|
36938
36992
|
*/
|
|
36939
|
-
const isCliError = (u) => hasProperty(u, TypeId$
|
|
36993
|
+
const isCliError = (u) => hasProperty(u, TypeId$40);
|
|
36940
36994
|
/**
|
|
36941
36995
|
* Error thrown when an unrecognized option is encountered.
|
|
36942
36996
|
*
|
|
@@ -36969,7 +37023,7 @@ const isCliError = (u) => hasProperty(u, TypeId$39);
|
|
|
36969
37023
|
* @since 4.0.0
|
|
36970
37024
|
* @category models
|
|
36971
37025
|
*/
|
|
36972
|
-
var UnrecognizedOption = class extends ErrorClass(`${TypeId$
|
|
37026
|
+
var UnrecognizedOption = class extends ErrorClass(`${TypeId$40}/UnrecognizedOption`)({
|
|
36973
37027
|
_tag: /* @__PURE__ */ tag("UnrecognizedOption"),
|
|
36974
37028
|
option: String$1,
|
|
36975
37029
|
command: /* @__PURE__ */ optional$3(/* @__PURE__ */ Array$1(String$1)),
|
|
@@ -36978,7 +37032,7 @@ var UnrecognizedOption = class extends ErrorClass(`${TypeId$39}/UnrecognizedOpti
|
|
|
36978
37032
|
/**
|
|
36979
37033
|
* @since 4.0.0
|
|
36980
37034
|
*/
|
|
36981
|
-
[TypeId$
|
|
37035
|
+
[TypeId$40] = TypeId$40;
|
|
36982
37036
|
/**
|
|
36983
37037
|
* @since 4.0.0
|
|
36984
37038
|
*/
|
|
@@ -37008,7 +37062,7 @@ var UnrecognizedOption = class extends ErrorClass(`${TypeId$39}/UnrecognizedOpti
|
|
|
37008
37062
|
* @since 4.0.0
|
|
37009
37063
|
* @category models
|
|
37010
37064
|
*/
|
|
37011
|
-
var DuplicateOption = class extends ErrorClass(`${TypeId$
|
|
37065
|
+
var DuplicateOption = class extends ErrorClass(`${TypeId$40}/DuplicateOption`)({
|
|
37012
37066
|
_tag: /* @__PURE__ */ tag("DuplicateOption"),
|
|
37013
37067
|
option: String$1,
|
|
37014
37068
|
parentCommand: String$1,
|
|
@@ -37017,7 +37071,7 @@ var DuplicateOption = class extends ErrorClass(`${TypeId$39}/DuplicateOption`)({
|
|
|
37017
37071
|
/**
|
|
37018
37072
|
* @since 4.0.0
|
|
37019
37073
|
*/
|
|
37020
|
-
[TypeId$
|
|
37074
|
+
[TypeId$40] = TypeId$40;
|
|
37021
37075
|
/**
|
|
37022
37076
|
* @since 4.0.0
|
|
37023
37077
|
*/
|
|
@@ -37054,14 +37108,14 @@ var DuplicateOption = class extends ErrorClass(`${TypeId$39}/DuplicateOption`)({
|
|
|
37054
37108
|
* @since 4.0.0
|
|
37055
37109
|
* @category models
|
|
37056
37110
|
*/
|
|
37057
|
-
var MissingOption = class extends ErrorClass(`${TypeId$
|
|
37111
|
+
var MissingOption = class extends ErrorClass(`${TypeId$40}/MissingOption`)({
|
|
37058
37112
|
_tag: /* @__PURE__ */ tag("MissingOption"),
|
|
37059
37113
|
option: String$1
|
|
37060
37114
|
}) {
|
|
37061
37115
|
/**
|
|
37062
37116
|
* @since 4.0.0
|
|
37063
37117
|
*/
|
|
37064
|
-
[TypeId$
|
|
37118
|
+
[TypeId$40] = TypeId$40;
|
|
37065
37119
|
/**
|
|
37066
37120
|
* @since 4.0.0
|
|
37067
37121
|
*/
|
|
@@ -37097,14 +37151,14 @@ var MissingOption = class extends ErrorClass(`${TypeId$39}/MissingOption`)({
|
|
|
37097
37151
|
* @since 4.0.0
|
|
37098
37152
|
* @category models
|
|
37099
37153
|
*/
|
|
37100
|
-
var MissingArgument = class extends ErrorClass(`${TypeId$
|
|
37154
|
+
var MissingArgument = class extends ErrorClass(`${TypeId$40}/MissingArgument`)({
|
|
37101
37155
|
_tag: /* @__PURE__ */ tag("MissingArgument"),
|
|
37102
37156
|
argument: String$1
|
|
37103
37157
|
}) {
|
|
37104
37158
|
/**
|
|
37105
37159
|
* @since 4.0.0
|
|
37106
37160
|
*/
|
|
37107
|
-
[TypeId$
|
|
37161
|
+
[TypeId$40] = TypeId$40;
|
|
37108
37162
|
/**
|
|
37109
37163
|
* @since 4.0.0
|
|
37110
37164
|
*/
|
|
@@ -37145,7 +37199,7 @@ var MissingArgument = class extends ErrorClass(`${TypeId$39}/MissingArgument`)({
|
|
|
37145
37199
|
* @since 4.0.0
|
|
37146
37200
|
* @category models
|
|
37147
37201
|
*/
|
|
37148
|
-
var InvalidValue = class extends ErrorClass(`${TypeId$
|
|
37202
|
+
var InvalidValue = class extends ErrorClass(`${TypeId$40}/InvalidValue`)({
|
|
37149
37203
|
_tag: /* @__PURE__ */ tag("InvalidValue"),
|
|
37150
37204
|
option: String$1,
|
|
37151
37205
|
value: String$1,
|
|
@@ -37155,7 +37209,7 @@ var InvalidValue = class extends ErrorClass(`${TypeId$39}/InvalidValue`)({
|
|
|
37155
37209
|
/**
|
|
37156
37210
|
* @since 4.0.0
|
|
37157
37211
|
*/
|
|
37158
|
-
[TypeId$
|
|
37212
|
+
[TypeId$40] = TypeId$40;
|
|
37159
37213
|
/**
|
|
37160
37214
|
* @since 4.0.0
|
|
37161
37215
|
*/
|
|
@@ -37199,7 +37253,7 @@ var InvalidValue = class extends ErrorClass(`${TypeId$39}/InvalidValue`)({
|
|
|
37199
37253
|
* @since 4.0.0
|
|
37200
37254
|
* @category models
|
|
37201
37255
|
*/
|
|
37202
|
-
var UnknownSubcommand = class extends ErrorClass(`${TypeId$
|
|
37256
|
+
var UnknownSubcommand = class extends ErrorClass(`${TypeId$40}/UnknownSubcommand`)({
|
|
37203
37257
|
_tag: /* @__PURE__ */ tag("UnknownSubcommand"),
|
|
37204
37258
|
subcommand: String$1,
|
|
37205
37259
|
parent: /* @__PURE__ */ optional$3(/* @__PURE__ */ Array$1(String$1)),
|
|
@@ -37208,7 +37262,7 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$39}/UnknownSubcommand
|
|
|
37208
37262
|
/**
|
|
37209
37263
|
* @since 4.0.0
|
|
37210
37264
|
*/
|
|
37211
|
-
[TypeId$
|
|
37265
|
+
[TypeId$40] = TypeId$40;
|
|
37212
37266
|
/**
|
|
37213
37267
|
* @since 4.0.0
|
|
37214
37268
|
*/
|
|
@@ -37252,14 +37306,14 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$39}/UnknownSubcommand
|
|
|
37252
37306
|
* @since 4.0.0
|
|
37253
37307
|
* @category models
|
|
37254
37308
|
*/
|
|
37255
|
-
var UserError = class extends ErrorClass(`${TypeId$
|
|
37309
|
+
var UserError = class extends ErrorClass(`${TypeId$40}/UserError`)({
|
|
37256
37310
|
_tag: /* @__PURE__ */ tag("UserError"),
|
|
37257
37311
|
cause: Defect
|
|
37258
37312
|
}) {
|
|
37259
37313
|
/**
|
|
37260
37314
|
* @since 4.0.0
|
|
37261
37315
|
*/
|
|
37262
|
-
[TypeId$
|
|
37316
|
+
[TypeId$40] = TypeId$40;
|
|
37263
37317
|
};
|
|
37264
37318
|
const NonShowHelpErrors = /* @__PURE__ */ Union([
|
|
37265
37319
|
UnrecognizedOption,
|
|
@@ -37277,12 +37331,12 @@ const NonShowHelpErrors = /* @__PURE__ */ Union([
|
|
|
37277
37331
|
* @since 4.0.0
|
|
37278
37332
|
* @category models
|
|
37279
37333
|
*/
|
|
37280
|
-
var ShowHelp = class extends ErrorClass(`${TypeId$
|
|
37334
|
+
var ShowHelp = class extends ErrorClass(`${TypeId$40}/ShowHelp`)({
|
|
37281
37335
|
_tag: /* @__PURE__ */ tag("ShowHelp"),
|
|
37282
37336
|
commandPath: /* @__PURE__ */ Array$1(String$1),
|
|
37283
37337
|
errors: /* @__PURE__ */ Array$1(NonShowHelpErrors)
|
|
37284
37338
|
}) {
|
|
37285
|
-
[TypeId$
|
|
37339
|
+
[TypeId$40] = TypeId$40;
|
|
37286
37340
|
[errorExitCode] = this.errors.length ? 1 : 0;
|
|
37287
37341
|
[errorReported] = false;
|
|
37288
37342
|
get message() {
|
|
@@ -47989,7 +48043,7 @@ const getTypeName = (primitive) => {
|
|
|
47989
48043
|
const getChoiceKeys = (primitive) => primitive._tag === "Choice" ? primitive.choiceKeys : void 0;
|
|
47990
48044
|
//#endregion
|
|
47991
48045
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/Terminal.js
|
|
47992
|
-
const TypeId$
|
|
48046
|
+
const TypeId$39 = "~effect/platform/Terminal";
|
|
47993
48047
|
const QuitErrorTypeId = "effect/platform/Terminal/QuitError";
|
|
47994
48048
|
/**
|
|
47995
48049
|
* A `QuitError` represents an error that occurs when a user attempts to
|
|
@@ -48022,7 +48076,7 @@ const Terminal = /* @__PURE__ */ Service$1("effect/platform/Terminal");
|
|
|
48022
48076
|
*/
|
|
48023
48077
|
const make$48 = (impl) => Terminal.of({
|
|
48024
48078
|
...impl,
|
|
48025
|
-
[TypeId$
|
|
48079
|
+
[TypeId$39]: TypeId$39
|
|
48026
48080
|
});
|
|
48027
48081
|
//#endregion
|
|
48028
48082
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/unstable/cli/internal/ansi.js
|
|
@@ -48105,7 +48159,7 @@ const eraseLines = (rows) => {
|
|
|
48105
48159
|
/**
|
|
48106
48160
|
* @since 4.0.0
|
|
48107
48161
|
*/
|
|
48108
|
-
const TypeId$
|
|
48162
|
+
const TypeId$38 = "~effect/cli/Prompt";
|
|
48109
48163
|
const defaultFigures = {
|
|
48110
48164
|
arrowUp: "↑",
|
|
48111
48165
|
arrowDown: "↓",
|
|
@@ -48326,7 +48380,7 @@ const toggle = (options) => {
|
|
|
48326
48380
|
};
|
|
48327
48381
|
const proto$1 = {
|
|
48328
48382
|
...YieldableProto,
|
|
48329
|
-
[TypeId$
|
|
48383
|
+
[TypeId$38]: { _Output: (_) => _ },
|
|
48330
48384
|
asEffect() {
|
|
48331
48385
|
return run$5(this);
|
|
48332
48386
|
},
|
|
@@ -49114,7 +49168,7 @@ const entriesToDisplay = (cursor, total, maxVisible) => {
|
|
|
49114
49168
|
*
|
|
49115
49169
|
* @since 4.0.0
|
|
49116
49170
|
*/
|
|
49117
|
-
const TypeId$
|
|
49171
|
+
const TypeId$37 = "~effect/cli/Param";
|
|
49118
49172
|
/**
|
|
49119
49173
|
* Kind discriminator for positional argument parameters.
|
|
49120
49174
|
*
|
|
@@ -49130,7 +49184,7 @@ const argumentKind = "argument";
|
|
|
49130
49184
|
*/
|
|
49131
49185
|
const flagKind = "flag";
|
|
49132
49186
|
const Proto$20 = {
|
|
49133
|
-
[TypeId$
|
|
49187
|
+
[TypeId$37]: { _A: identity },
|
|
49134
49188
|
pipe() {
|
|
49135
49189
|
return pipeArguments(this, arguments);
|
|
49136
49190
|
}
|
|
@@ -49154,7 +49208,7 @@ const Proto$20 = {
|
|
|
49154
49208
|
* @since 4.0.0
|
|
49155
49209
|
* @category refinements
|
|
49156
49210
|
*/
|
|
49157
|
-
const isParam = (u) => hasProperty(u, TypeId$
|
|
49211
|
+
const isParam = (u) => hasProperty(u, TypeId$37);
|
|
49158
49212
|
/**
|
|
49159
49213
|
* Type guard to check if a Single param is a flag (not an argument).
|
|
49160
49214
|
*
|
|
@@ -50186,18 +50240,18 @@ const warn = (...args) => consoleWith((console) => sync$1(() => {
|
|
|
50186
50240
|
* @since 4.0.0
|
|
50187
50241
|
* @category Type IDs
|
|
50188
50242
|
*/
|
|
50189
|
-
const TypeId$
|
|
50243
|
+
const TypeId$36 = "~effect/Stdio";
|
|
50190
50244
|
/**
|
|
50191
50245
|
* @since 4.0.0
|
|
50192
50246
|
* @category Services
|
|
50193
50247
|
*/
|
|
50194
|
-
const Stdio = /* @__PURE__ */ Service$1(TypeId$
|
|
50248
|
+
const Stdio = /* @__PURE__ */ Service$1(TypeId$36);
|
|
50195
50249
|
/**
|
|
50196
50250
|
* @since 4.0.0
|
|
50197
50251
|
* @category Constructors
|
|
50198
50252
|
*/
|
|
50199
50253
|
const make$47 = (options) => ({
|
|
50200
|
-
[TypeId$
|
|
50254
|
+
[TypeId$36]: TypeId$36,
|
|
50201
50255
|
...options
|
|
50202
50256
|
});
|
|
50203
50257
|
//#endregion
|
|
@@ -50992,7 +51046,7 @@ const reconstructTree = (tree, results) => {
|
|
|
50992
51046
|
* Internal implementation details for CLI commands.
|
|
50993
51047
|
* Public API is in ../Command.ts
|
|
50994
51048
|
*/
|
|
50995
|
-
const TypeId$
|
|
51049
|
+
const TypeId$35 = "~effect/cli/Command";
|
|
50996
51050
|
/**
|
|
50997
51051
|
* Casts a Command to its internal implementation.
|
|
50998
51052
|
* For use by internal modules that need access to config, parse, handle, etc.
|
|
@@ -51070,7 +51124,7 @@ const makeCommand = (options) => {
|
|
|
51070
51124
|
};
|
|
51071
51125
|
};
|
|
51072
51126
|
return Object.assign(Object.create(Proto$19), {
|
|
51073
|
-
[TypeId$
|
|
51127
|
+
[TypeId$35]: TypeId$35,
|
|
51074
51128
|
name: options.name,
|
|
51075
51129
|
examples: options.examples ?? [],
|
|
51076
51130
|
annotations,
|
|
@@ -51853,7 +51907,7 @@ const scanCommandLevel = (tokens, context) => {
|
|
|
51853
51907
|
* @since 4.0.0
|
|
51854
51908
|
* @category Guards
|
|
51855
51909
|
*/
|
|
51856
|
-
const isCommand$1 = (u) => hasProperty(u, TypeId$
|
|
51910
|
+
const isCommand$1 = (u) => hasProperty(u, TypeId$35);
|
|
51857
51911
|
/**
|
|
51858
51912
|
* Creates a Command from a name, optional config, optional handler function, and optional description.
|
|
51859
51913
|
*
|
|
@@ -52350,7 +52404,7 @@ const runWith = (command, config) => {
|
|
|
52350
52404
|
/**
|
|
52351
52405
|
* @since 4.0.0
|
|
52352
52406
|
*/
|
|
52353
|
-
const TypeId$
|
|
52407
|
+
const TypeId$34 = "~effect/Cache";
|
|
52354
52408
|
/**
|
|
52355
52409
|
* Creates a cache with dynamic time-to-live based on the result and key.
|
|
52356
52410
|
*
|
|
@@ -52478,7 +52532,7 @@ const make$45 = (options) => makeWith$2({
|
|
|
52478
52532
|
});
|
|
52479
52533
|
const Proto$18 = {
|
|
52480
52534
|
...PipeInspectableProto,
|
|
52481
|
-
[TypeId$
|
|
52535
|
+
[TypeId$34]: TypeId$34,
|
|
52482
52536
|
toJSON() {
|
|
52483
52537
|
return {
|
|
52484
52538
|
_id: "Cache",
|
|
@@ -52796,7 +52850,7 @@ const ignore = "~effect/ErrorReporter/ignore";
|
|
|
52796
52850
|
/**
|
|
52797
52851
|
* @since 2.0.0
|
|
52798
52852
|
*/
|
|
52799
|
-
const TypeId$
|
|
52853
|
+
const TypeId$33 = "~effect/FiberHandle";
|
|
52800
52854
|
/**
|
|
52801
52855
|
* @example
|
|
52802
52856
|
* ```ts
|
|
@@ -52813,9 +52867,9 @@ const TypeId$32 = "~effect/FiberHandle";
|
|
|
52813
52867
|
* @since 2.0.0
|
|
52814
52868
|
* @category refinements
|
|
52815
52869
|
*/
|
|
52816
|
-
const isFiberHandle = (u) => hasProperty(u, TypeId$
|
|
52870
|
+
const isFiberHandle = (u) => hasProperty(u, TypeId$33);
|
|
52817
52871
|
const Proto$17 = {
|
|
52818
|
-
[TypeId$
|
|
52872
|
+
[TypeId$33]: TypeId$33,
|
|
52819
52873
|
...PipeInspectableProto,
|
|
52820
52874
|
toJSON() {
|
|
52821
52875
|
return {
|
|
@@ -52991,7 +53045,7 @@ const runImpl$2 = (self, effect, options) => withFiber((parent) => {
|
|
|
52991
53045
|
/**
|
|
52992
53046
|
* @since 2.0.0
|
|
52993
53047
|
*/
|
|
52994
|
-
const TypeId$
|
|
53048
|
+
const TypeId$32 = "~effect/FiberMap";
|
|
52995
53049
|
/**
|
|
52996
53050
|
* @example
|
|
52997
53051
|
* ```ts
|
|
@@ -53009,9 +53063,9 @@ const TypeId$31 = "~effect/FiberMap";
|
|
|
53009
53063
|
* @since 2.0.0
|
|
53010
53064
|
* @category refinements
|
|
53011
53065
|
*/
|
|
53012
|
-
const isFiberMap = (u) => hasProperty(u, TypeId$
|
|
53066
|
+
const isFiberMap = (u) => hasProperty(u, TypeId$32);
|
|
53013
53067
|
const Proto$16 = {
|
|
53014
|
-
[TypeId$
|
|
53068
|
+
[TypeId$32]: TypeId$32,
|
|
53015
53069
|
[Symbol.iterator]() {
|
|
53016
53070
|
if (this.state._tag === "Closed") return empty$19();
|
|
53017
53071
|
return this.state.backing[Symbol.iterator]();
|
|
@@ -53221,7 +53275,7 @@ const runImpl$1 = (self, key, effect, options) => withFiber((parent) => {
|
|
|
53221
53275
|
/**
|
|
53222
53276
|
* @since 2.0.0
|
|
53223
53277
|
*/
|
|
53224
|
-
const TypeId$
|
|
53278
|
+
const TypeId$31 = "~effect/FiberSet";
|
|
53225
53279
|
/**
|
|
53226
53280
|
* Checks if a value is a FiberSet.
|
|
53227
53281
|
*
|
|
@@ -53239,9 +53293,9 @@ const TypeId$30 = "~effect/FiberSet";
|
|
|
53239
53293
|
* })
|
|
53240
53294
|
* ```
|
|
53241
53295
|
*/
|
|
53242
|
-
const isFiberSet = (u) => hasProperty(u, TypeId$
|
|
53296
|
+
const isFiberSet = (u) => hasProperty(u, TypeId$31);
|
|
53243
53297
|
const Proto$15 = {
|
|
53244
|
-
[TypeId$
|
|
53298
|
+
[TypeId$31]: TypeId$31,
|
|
53245
53299
|
[Symbol.iterator]() {
|
|
53246
53300
|
if (this.state._tag === "Closed") return empty$19();
|
|
53247
53301
|
return this.state.backing[Symbol.iterator]();
|
|
@@ -53507,7 +53561,7 @@ const symbol$2 = "~effect/interfaces/PrimaryKey";
|
|
|
53507
53561
|
const value$1 = (self) => self[symbol$2]();
|
|
53508
53562
|
//#endregion
|
|
53509
53563
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/LayerMap.js
|
|
53510
|
-
const TypeId$
|
|
53564
|
+
const TypeId$30 = "~effect/LayerMap";
|
|
53511
53565
|
/**
|
|
53512
53566
|
* @since 3.14.0
|
|
53513
53567
|
* @category Constructors
|
|
@@ -53558,7 +53612,7 @@ const make$41 = /* @__PURE__ */ fnUntraced(function* (lookup, options) {
|
|
|
53558
53612
|
idleTimeToLive: options?.idleTimeToLive
|
|
53559
53613
|
});
|
|
53560
53614
|
return identity({
|
|
53561
|
-
[TypeId$
|
|
53615
|
+
[TypeId$30]: TypeId$30,
|
|
53562
53616
|
rcMap,
|
|
53563
53617
|
get: (key) => effectServices(get$12(rcMap, key)),
|
|
53564
53618
|
services: (key) => get$12(rcMap, key),
|
|
@@ -54046,7 +54100,7 @@ const invalidate = (keys) => Reactivity.use((r) => r.invalidate(keys));
|
|
|
54046
54100
|
* @since 4.0.0
|
|
54047
54101
|
* @category layers
|
|
54048
54102
|
*/
|
|
54049
|
-
const layer$
|
|
54103
|
+
const layer$26 = /* @__PURE__ */ effect$1(Reactivity)(make$39);
|
|
54050
54104
|
function stringOrHash(u) {
|
|
54051
54105
|
switch (typeof u) {
|
|
54052
54106
|
case "string":
|
|
@@ -54072,7 +54126,7 @@ const keysToHashes = (keys, f) => {
|
|
|
54072
54126
|
/**
|
|
54073
54127
|
* @since 4.0.0
|
|
54074
54128
|
*/
|
|
54075
|
-
const TypeId$
|
|
54129
|
+
const TypeId$29 = "~effect/persistence/KeyValueStore";
|
|
54076
54130
|
const ErrorTypeId$1 = "~effect/persistence/KeyValueStore/KeyValueStoreError";
|
|
54077
54131
|
/**
|
|
54078
54132
|
* @since 4.0.0
|
|
@@ -54094,7 +54148,7 @@ const KeyValueStore = /* @__PURE__ */ Service$1("effect/persistence/KeyValueStor
|
|
|
54094
54148
|
* @category constructors
|
|
54095
54149
|
*/
|
|
54096
54150
|
const make$38 = (options) => KeyValueStore.of({
|
|
54097
|
-
[TypeId$
|
|
54151
|
+
[TypeId$29]: TypeId$29,
|
|
54098
54152
|
has: (key) => map$8(options.get(key), isNotUndefined),
|
|
54099
54153
|
isEmpty: map$8(options.size, (size) => size === 0),
|
|
54100
54154
|
modify: (key, f) => flatMap$4(options.get(key), (o) => {
|
|
@@ -54297,7 +54351,7 @@ var BackingPersistence = class extends Service$1()("effect/persistence/BackingPe
|
|
|
54297
54351
|
* @since 4.0.0
|
|
54298
54352
|
* @category layers
|
|
54299
54353
|
*/
|
|
54300
|
-
const layer$
|
|
54354
|
+
const layer$25 = /* @__PURE__ */ effect$1(Persistence)(/* @__PURE__ */ gen(function* () {
|
|
54301
54355
|
const backing = yield* BackingPersistence;
|
|
54302
54356
|
const scope$6 = yield* scope;
|
|
54303
54357
|
return Persistence.of({ make: fnUntraced(function* (options) {
|
|
@@ -54434,17 +54488,17 @@ const layerBackingKvs = /* @__PURE__ */ effect$1(BackingPersistence)(/* @__PURE_
|
|
|
54434
54488
|
* @since 4.0.0
|
|
54435
54489
|
* @category layers
|
|
54436
54490
|
*/
|
|
54437
|
-
const layerKvs$1 = /* @__PURE__ */ layer$
|
|
54491
|
+
const layerKvs$1 = /* @__PURE__ */ layer$25.pipe(/* @__PURE__ */ provide$3(layerBackingKvs));
|
|
54438
54492
|
/**
|
|
54439
54493
|
* @since 4.0.0
|
|
54440
54494
|
*/
|
|
54441
54495
|
const unsafeTtlToExpires = (clock, ttl) => ttl ? clock.currentTimeMillisUnsafe() + toMillis(ttl) : null;
|
|
54442
54496
|
//#endregion
|
|
54443
54497
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/SynchronizedRef.js
|
|
54444
|
-
const TypeId$
|
|
54498
|
+
const TypeId$28 = "~effect/SynchronizedRef";
|
|
54445
54499
|
const Proto$14 = {
|
|
54446
54500
|
...PipeInspectableProto,
|
|
54447
|
-
[TypeId$
|
|
54501
|
+
[TypeId$28]: TypeId$28,
|
|
54448
54502
|
toJSON() {
|
|
54449
54503
|
return {
|
|
54450
54504
|
_id: "SynchronizedRef",
|
|
@@ -54467,10 +54521,10 @@ const makeUnsafe$1 = (value) => {
|
|
|
54467
54521
|
/**
|
|
54468
54522
|
* @since 2.0.0
|
|
54469
54523
|
*/
|
|
54470
|
-
const TypeId$
|
|
54524
|
+
const TypeId$27 = "~effect/ScopedRef";
|
|
54471
54525
|
const Proto$13 = {
|
|
54472
54526
|
...PipeInspectableProto,
|
|
54473
|
-
[TypeId$
|
|
54527
|
+
[TypeId$27]: TypeId$27,
|
|
54474
54528
|
toJSON() {
|
|
54475
54529
|
return {
|
|
54476
54530
|
_id: "ScopedRef",
|
|
@@ -54532,12 +54586,12 @@ const set$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function* (self
|
|
|
54532
54586
|
/**
|
|
54533
54587
|
* @since 2.0.0
|
|
54534
54588
|
*/
|
|
54535
|
-
const TypeId$
|
|
54589
|
+
const TypeId$26 = "~effect/SubscriptionRef";
|
|
54536
54590
|
/**
|
|
54537
54591
|
* @since 4.0.0
|
|
54538
54592
|
* @category guards
|
|
54539
54593
|
*/
|
|
54540
|
-
const isSubscriptionRef = (u) => typeof u === "object" && u != null && TypeId$
|
|
54594
|
+
const isSubscriptionRef = (u) => typeof u === "object" && u != null && TypeId$26 in u;
|
|
54541
54595
|
({ ...PipeInspectableProto });
|
|
54542
54596
|
/**
|
|
54543
54597
|
* Creates a stream that emits the current value and all subsequent changes to
|
|
@@ -56131,11 +56185,11 @@ const make$37 = (spawn) => {
|
|
|
56131
56185
|
var ChildProcessSpawner = class extends Service$1()("effect/process/ChildProcessSpawner") {};
|
|
56132
56186
|
//#endregion
|
|
56133
56187
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/unstable/process/ChildProcess.js
|
|
56134
|
-
const TypeId$
|
|
56188
|
+
const TypeId$25 = "~effect/unstable/process/ChildProcess";
|
|
56135
56189
|
const Proto$11 = {
|
|
56136
56190
|
...PipeInspectableProto,
|
|
56137
56191
|
...YieldableProto,
|
|
56138
|
-
[TypeId$
|
|
56192
|
+
[TypeId$25]: TypeId$25,
|
|
56139
56193
|
asEffect() {
|
|
56140
56194
|
return ChildProcessSpawner.use((_) => _.spawn(this));
|
|
56141
56195
|
}
|
|
@@ -56146,7 +56200,7 @@ const Proto$11 = {
|
|
|
56146
56200
|
* @since 4.0.0
|
|
56147
56201
|
* @category Guards
|
|
56148
56202
|
*/
|
|
56149
|
-
const isCommand = (u) => hasProperty(u, TypeId$
|
|
56203
|
+
const isCommand = (u) => hasProperty(u, TypeId$25);
|
|
56150
56204
|
const makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto$11), {
|
|
56151
56205
|
_tag: "StandardCommand",
|
|
56152
56206
|
command,
|
|
@@ -56677,7 +56731,7 @@ const toPlatformError = (method, error, command) => {
|
|
|
56677
56731
|
* @since 4.0.0
|
|
56678
56732
|
* @category Layers
|
|
56679
56733
|
*/
|
|
56680
|
-
const layer$
|
|
56734
|
+
const layer$24 = /* @__PURE__ */ effect$1(ChildProcessSpawner, /* @__PURE__ */ gen(function* () {
|
|
56681
56735
|
const fs = yield* FileSystem;
|
|
56682
56736
|
const path = yield* Path$1;
|
|
56683
56737
|
const resolveWorkingDirectory = fnUntraced(function* (options) {
|
|
@@ -56999,11 +57053,11 @@ const flattenCommand = (command) => {
|
|
|
56999
57053
|
/**
|
|
57000
57054
|
* @since 4.0.0
|
|
57001
57055
|
*/
|
|
57002
|
-
const TypeId$
|
|
57056
|
+
const TypeId$24 = "~effect/http/Cookies";
|
|
57003
57057
|
const CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
57004
57058
|
TaggedError("CookieError");
|
|
57005
57059
|
const Proto$10 = {
|
|
57006
|
-
[TypeId$
|
|
57060
|
+
[TypeId$24]: TypeId$24,
|
|
57007
57061
|
...BaseProto,
|
|
57008
57062
|
toJSON() {
|
|
57009
57063
|
return {
|
|
@@ -57269,10 +57323,10 @@ const tryDecodeURIComponent = (str) => {
|
|
|
57269
57323
|
* @since 4.0.0
|
|
57270
57324
|
* @category type ids
|
|
57271
57325
|
*/
|
|
57272
|
-
const TypeId$
|
|
57326
|
+
const TypeId$23 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
|
|
57273
57327
|
const Proto$9 = /* @__PURE__ */ Object.create(null);
|
|
57274
57328
|
Object.defineProperties(Proto$9, {
|
|
57275
|
-
[TypeId$
|
|
57329
|
+
[TypeId$23]: { value: TypeId$23 },
|
|
57276
57330
|
[symbolRedactable]: { value(context) {
|
|
57277
57331
|
return redact(this, get$15(context, CurrentRedactedNames));
|
|
57278
57332
|
} },
|
|
@@ -57386,12 +57440,12 @@ const CurrentRedactedNames = /* @__PURE__ */ Reference("effect/Headers/CurrentRe
|
|
|
57386
57440
|
/**
|
|
57387
57441
|
* @since 4.0.0
|
|
57388
57442
|
*/
|
|
57389
|
-
const TypeId$
|
|
57443
|
+
const TypeId$22 = "~effect/http/HttpClientError";
|
|
57390
57444
|
/**
|
|
57391
57445
|
* @since 4.0.0
|
|
57392
57446
|
* @category guards
|
|
57393
57447
|
*/
|
|
57394
|
-
const isHttpClientError = (u) => hasProperty(u, TypeId$
|
|
57448
|
+
const isHttpClientError = (u) => hasProperty(u, TypeId$22);
|
|
57395
57449
|
/**
|
|
57396
57450
|
* @since 4.0.0
|
|
57397
57451
|
* @category error
|
|
@@ -57407,7 +57461,7 @@ var HttpClientError = class extends TaggedError("HttpClientError") {
|
|
|
57407
57461
|
/**
|
|
57408
57462
|
* @since 4.0.0
|
|
57409
57463
|
*/
|
|
57410
|
-
[TypeId$
|
|
57464
|
+
[TypeId$22] = TypeId$22;
|
|
57411
57465
|
/**
|
|
57412
57466
|
* @since 4.0.0
|
|
57413
57467
|
*/
|
|
@@ -57524,15 +57578,15 @@ var EmptyBodyError = class extends TaggedError("EmptyBodyError") {
|
|
|
57524
57578
|
/**
|
|
57525
57579
|
* @since 4.0.0
|
|
57526
57580
|
*/
|
|
57527
|
-
const TypeId$
|
|
57581
|
+
const TypeId$21 = "~effect/http/UrlParams";
|
|
57528
57582
|
/**
|
|
57529
57583
|
* @since 4.0.0
|
|
57530
57584
|
* @category Guards
|
|
57531
57585
|
*/
|
|
57532
|
-
const isUrlParams = (u) => hasProperty(u, TypeId$
|
|
57586
|
+
const isUrlParams = (u) => hasProperty(u, TypeId$21);
|
|
57533
57587
|
const Proto$8 = {
|
|
57534
57588
|
...PipeInspectableProto,
|
|
57535
|
-
[TypeId$
|
|
57589
|
+
[TypeId$21]: TypeId$21,
|
|
57536
57590
|
[Symbol.iterator]() {
|
|
57537
57591
|
return this.params[Symbol.iterator]();
|
|
57538
57592
|
},
|
|
@@ -57736,12 +57790,12 @@ const schemaRecord = /* @__PURE__ */ UrlParamsSchema.pipe(/* @__PURE__ */ decode
|
|
|
57736
57790
|
/**
|
|
57737
57791
|
* @since 4.0.0
|
|
57738
57792
|
*/
|
|
57739
|
-
const TypeId$
|
|
57793
|
+
const TypeId$20 = "~effect/http/HttpBody";
|
|
57740
57794
|
TaggedError("HttpBodyError");
|
|
57741
57795
|
var Proto$7 = class {
|
|
57742
|
-
[TypeId$
|
|
57796
|
+
[TypeId$20];
|
|
57743
57797
|
constructor() {
|
|
57744
|
-
this[TypeId$
|
|
57798
|
+
this[TypeId$20] = TypeId$20;
|
|
57745
57799
|
}
|
|
57746
57800
|
[NodeInspectSymbol]() {
|
|
57747
57801
|
return this.toJSON();
|
|
@@ -57872,9 +57926,9 @@ var FormData$1 = class extends Proto$7 {
|
|
|
57872
57926
|
const formData = (body) => new FormData$1(body);
|
|
57873
57927
|
//#endregion
|
|
57874
57928
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/unstable/http/HttpClientRequest.js
|
|
57875
|
-
const TypeId$
|
|
57929
|
+
const TypeId$19 = "~effect/http/HttpClientRequest";
|
|
57876
57930
|
const Proto$6 = {
|
|
57877
|
-
[TypeId$
|
|
57931
|
+
[TypeId$19]: TypeId$19,
|
|
57878
57932
|
...BaseProto,
|
|
57879
57933
|
toJSON() {
|
|
57880
57934
|
return {
|
|
@@ -58049,7 +58103,7 @@ const bodyFormData = /* @__PURE__ */ dual(2, (self, body) => setBody(self, formD
|
|
|
58049
58103
|
* @since 4.0.0
|
|
58050
58104
|
* @category Type IDs
|
|
58051
58105
|
*/
|
|
58052
|
-
const TypeId$
|
|
58106
|
+
const TypeId$18 = "~effect/http/HttpIncomingMessage";
|
|
58053
58107
|
/**
|
|
58054
58108
|
* @since 4.0.0
|
|
58055
58109
|
* @category schema
|
|
@@ -58100,7 +58154,7 @@ const inspect$1 = (self, that) => {
|
|
|
58100
58154
|
* @since 4.0.0
|
|
58101
58155
|
* @category Type IDs
|
|
58102
58156
|
*/
|
|
58103
|
-
const TypeId$
|
|
58157
|
+
const TypeId$17 = "~effect/http/HttpClientResponse";
|
|
58104
58158
|
/**
|
|
58105
58159
|
* @since 4.0.0
|
|
58106
58160
|
* @category constructors
|
|
@@ -58129,16 +58183,16 @@ const filterStatusOk$1 = (self) => self.status >= 200 && self.status < 300 ? suc
|
|
|
58129
58183
|
description: "non 2xx status code"
|
|
58130
58184
|
}) }));
|
|
58131
58185
|
var WebHttpClientResponse = class extends Class$3 {
|
|
58186
|
+
[TypeId$18];
|
|
58132
58187
|
[TypeId$17];
|
|
58133
|
-
[TypeId$16];
|
|
58134
58188
|
request;
|
|
58135
58189
|
source;
|
|
58136
58190
|
constructor(request, source) {
|
|
58137
58191
|
super();
|
|
58138
58192
|
this.request = request;
|
|
58139
58193
|
this.source = source;
|
|
58194
|
+
this[TypeId$18] = TypeId$18;
|
|
58140
58195
|
this[TypeId$17] = TypeId$17;
|
|
58141
|
-
this[TypeId$16] = TypeId$16;
|
|
58142
58196
|
}
|
|
58143
58197
|
toJSON() {
|
|
58144
58198
|
return inspect$1(this, {
|
|
@@ -58315,7 +58369,12 @@ const w3c = (headers) => {
|
|
|
58315
58369
|
};
|
|
58316
58370
|
//#endregion
|
|
58317
58371
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/unstable/http/HttpClient.js
|
|
58318
|
-
const TypeId$
|
|
58372
|
+
const TypeId$16 = "~effect/http/HttpClient";
|
|
58373
|
+
/**
|
|
58374
|
+
* @since 4.0.0
|
|
58375
|
+
* @category Guards
|
|
58376
|
+
*/
|
|
58377
|
+
const isHttpClient = (u) => hasProperty(u, TypeId$16);
|
|
58319
58378
|
/**
|
|
58320
58379
|
* @since 4.0.0
|
|
58321
58380
|
* @category tags
|
|
@@ -58347,7 +58406,7 @@ const makeWith = (postprocess, preprocess) => {
|
|
|
58347
58406
|
return self;
|
|
58348
58407
|
};
|
|
58349
58408
|
const Proto$5 = {
|
|
58350
|
-
[TypeId$
|
|
58409
|
+
[TypeId$16]: TypeId$16,
|
|
58351
58410
|
pipe() {
|
|
58352
58411
|
return pipeArguments(this, arguments);
|
|
58353
58412
|
},
|
|
@@ -58457,6 +58516,16 @@ const retryTransient = /* @__PURE__ */ dual(2, (self, options) => {
|
|
|
58457
58516
|
})));
|
|
58458
58517
|
});
|
|
58459
58518
|
/**
|
|
58519
|
+
* Follows HTTP redirects up to a specified number of times.
|
|
58520
|
+
*
|
|
58521
|
+
* @since 4.0.0
|
|
58522
|
+
* @category redirects
|
|
58523
|
+
*/
|
|
58524
|
+
const followRedirects = /* @__PURE__ */ dual((args) => isHttpClient(args[0]), (self, maxRedirects) => makeWith((request) => {
|
|
58525
|
+
const loop = (request, redirects) => flatMap$4(self.postprocess(succeed$3(request)), (response) => response.status >= 300 && response.status < 400 && response.headers.location && redirects < (maxRedirects ?? 10) ? loop(setUrl(request, new URL(response.headers.location, response.request.url)), redirects + 1) : succeed$3(response));
|
|
58526
|
+
return flatMap$4(request, (request) => loop(request, 0));
|
|
58527
|
+
}, self.preprocess));
|
|
58528
|
+
/**
|
|
58460
58529
|
* @since 4.0.0
|
|
58461
58530
|
* @category References
|
|
58462
58531
|
*/
|
|
@@ -58510,8 +58579,8 @@ var InterruptibleResponse = class {
|
|
|
58510
58579
|
this.original = original;
|
|
58511
58580
|
this.controller = controller;
|
|
58512
58581
|
}
|
|
58513
|
-
[TypeId$16] = TypeId$16;
|
|
58514
58582
|
[TypeId$17] = TypeId$17;
|
|
58583
|
+
[TypeId$18] = TypeId$18;
|
|
58515
58584
|
applyInterrupt(effect) {
|
|
58516
58585
|
return suspend$3(() => {
|
|
58517
58586
|
responseRegistry.unregister(this.original);
|
|
@@ -59215,11 +59284,11 @@ function isSuccess$1(u) {
|
|
|
59215
59284
|
/**
|
|
59216
59285
|
* @since 4.0.0
|
|
59217
59286
|
*/
|
|
59218
|
-
const TypeId$
|
|
59287
|
+
const TypeId$15 = "~effect/http/HttpServerResponse";
|
|
59219
59288
|
/**
|
|
59220
59289
|
* @since 4.0.0
|
|
59221
59290
|
*/
|
|
59222
|
-
const isHttpServerResponse = (u) => hasProperty(u, TypeId$
|
|
59291
|
+
const isHttpServerResponse = (u) => hasProperty(u, TypeId$15);
|
|
59223
59292
|
/**
|
|
59224
59293
|
* @since 4.0.0
|
|
59225
59294
|
* @category constructors
|
|
@@ -59272,7 +59341,7 @@ const raw = (body, options) => makeResponse$2({
|
|
|
59272
59341
|
});
|
|
59273
59342
|
const Proto$4 = {
|
|
59274
59343
|
...PipeInspectableProto,
|
|
59275
|
-
[TypeId$
|
|
59344
|
+
[TypeId$15]: TypeId$15,
|
|
59276
59345
|
[ignore]: true,
|
|
59277
59346
|
toJSON() {
|
|
59278
59347
|
return {
|
|
@@ -59341,7 +59410,7 @@ const toResponseOrElseDefect = (u, orElse) => {
|
|
|
59341
59410
|
/**
|
|
59342
59411
|
* @since 4.0.0
|
|
59343
59412
|
*/
|
|
59344
|
-
const TypeId$
|
|
59413
|
+
const TypeId$14 = "~effect/http/HttpServerError";
|
|
59345
59414
|
/**
|
|
59346
59415
|
* @since 4.0.0
|
|
59347
59416
|
* @category error
|
|
@@ -59354,7 +59423,7 @@ var HttpServerError = class extends TaggedError("HttpServerError") {
|
|
|
59354
59423
|
});
|
|
59355
59424
|
else super(props);
|
|
59356
59425
|
}
|
|
59357
|
-
[TypeId$
|
|
59426
|
+
[TypeId$14] = TypeId$14;
|
|
59358
59427
|
stack = `${this.name}: ${this.message}`;
|
|
59359
59428
|
get request() {
|
|
59360
59429
|
return this.reason.request;
|
|
@@ -59514,7 +59583,7 @@ const exitResponse = (exit) => {
|
|
|
59514
59583
|
* @since 4.0.0
|
|
59515
59584
|
* @category Type IDs
|
|
59516
59585
|
*/
|
|
59517
|
-
const TypeId$
|
|
59586
|
+
const TypeId$13 = "~effect/socket/Socket";
|
|
59518
59587
|
/**
|
|
59519
59588
|
* @since 4.0.0
|
|
59520
59589
|
* @category tags
|
|
@@ -59718,7 +59787,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber) => {
|
|
|
59718
59787
|
}));
|
|
59719
59788
|
const writer = succeed$3(write);
|
|
59720
59789
|
return succeed$3(Socket.of({
|
|
59721
|
-
[TypeId$
|
|
59790
|
+
[TypeId$13]: TypeId$13,
|
|
59722
59791
|
run,
|
|
59723
59792
|
runRaw,
|
|
59724
59793
|
writer
|
|
@@ -60623,7 +60692,7 @@ const decodeField = decodeField$1;
|
|
|
60623
60692
|
/**
|
|
60624
60693
|
* @since 4.0.0
|
|
60625
60694
|
*/
|
|
60626
|
-
const TypeId$
|
|
60695
|
+
const TypeId$12 = "~effect/http/Multipart";
|
|
60627
60696
|
const MultipartErrorTypeId = "~effect/http/Multipart/MultipartError";
|
|
60628
60697
|
/**
|
|
60629
60698
|
* @since 4.0.0
|
|
@@ -60671,10 +60740,10 @@ const makeConfig = (headers) => withFiber((fiber) => {
|
|
|
60671
60740
|
});
|
|
60672
60741
|
});
|
|
60673
60742
|
var PartBase$1 = class extends Class$3 {
|
|
60674
|
-
[TypeId$
|
|
60743
|
+
[TypeId$12];
|
|
60675
60744
|
constructor() {
|
|
60676
60745
|
super();
|
|
60677
|
-
this[TypeId$
|
|
60746
|
+
this[TypeId$12] = TypeId$12;
|
|
60678
60747
|
}
|
|
60679
60748
|
};
|
|
60680
60749
|
const defaultWriteFile = (path, file) => flatMap$4(FileSystem.asEffect(), (fs) => mapError$2(run$7(file.content, fs.sink(path)), (cause) => MultipartError.fromReason("InternalError", cause)));
|
|
@@ -60753,7 +60822,7 @@ const FieldMimeTypes = /* @__PURE__ */ Reference("effect/http/Multipart/FieldMim
|
|
|
60753
60822
|
* @since 4.0.0
|
|
60754
60823
|
* @category Type IDs
|
|
60755
60824
|
*/
|
|
60756
|
-
const TypeId$
|
|
60825
|
+
const TypeId$11 = "~effect/http/HttpServerRequest";
|
|
60757
60826
|
/**
|
|
60758
60827
|
* @since 4.0.0
|
|
60759
60828
|
* @category context
|
|
@@ -60988,7 +61057,7 @@ const fromFileWeb = (file) => {
|
|
|
60988
61057
|
* @since 4.0.0
|
|
60989
61058
|
* @category Layers
|
|
60990
61059
|
*/
|
|
60991
|
-
const layer$
|
|
61060
|
+
const layer$23 = /* @__PURE__ */ succeed$4(Generator)({
|
|
60992
61061
|
fromFileInfo(info) {
|
|
60993
61062
|
return sync(() => ({
|
|
60994
61063
|
_tag: "Strong",
|
|
@@ -61109,7 +61178,7 @@ const withLogAddress = (layer) => effectDiscard(logAddress).pipe(provideMerge(la
|
|
|
61109
61178
|
/**
|
|
61110
61179
|
* @since 4.0.0
|
|
61111
61180
|
*/
|
|
61112
|
-
const TypeId$
|
|
61181
|
+
const TypeId$10 = "~effect/http/HttpRouter";
|
|
61113
61182
|
/**
|
|
61114
61183
|
* @since 4.0.0
|
|
61115
61184
|
* @category HttpRouter
|
|
@@ -61145,7 +61214,7 @@ const make$20 = /* @__PURE__ */ gen(function* () {
|
|
|
61145
61214
|
return void_$1;
|
|
61146
61215
|
});
|
|
61147
61216
|
return HttpRouter.of({
|
|
61148
|
-
[TypeId$
|
|
61217
|
+
[TypeId$10]: TypeId$10,
|
|
61149
61218
|
prefixed(prefix) {
|
|
61150
61219
|
return HttpRouter.of({
|
|
61151
61220
|
...this,
|
|
@@ -61245,7 +61314,7 @@ const add = (method, path, handler, options) => use((router) => router.add(metho
|
|
|
61245
61314
|
* @since 4.0.0
|
|
61246
61315
|
* @category HttpRouter
|
|
61247
61316
|
*/
|
|
61248
|
-
const layer$
|
|
61317
|
+
const layer$21 = /* @__PURE__ */ effect$1(HttpRouter)(make$20);
|
|
61249
61318
|
const RouteTypeId = "~effect/http/HttpRouter/Route";
|
|
61250
61319
|
const makeRoute = (options) => ({
|
|
61251
61320
|
...options,
|
|
@@ -61414,7 +61483,7 @@ middleware(withLoggerDisabled).layer;
|
|
|
61414
61483
|
const serve = (appLayer, options) => {
|
|
61415
61484
|
let middleware = options?.middleware;
|
|
61416
61485
|
if (options?.disableLogger !== true) middleware = middleware ? compose$1(middleware, logger) : logger;
|
|
61417
|
-
const RouterLayer = options?.routerConfig ? provide$3(layer$
|
|
61486
|
+
const RouterLayer = options?.routerConfig ? provide$3(layer$21, succeed$4(RouterConfig)(options.routerConfig)) : layer$21;
|
|
61418
61487
|
return gen(function* () {
|
|
61419
61488
|
const handler = (yield* HttpRouter).asHttpEffect();
|
|
61420
61489
|
return middleware ? serve$1(handler, middleware) : serve$1(handler);
|
|
@@ -65274,7 +65343,7 @@ const makeFileSystem = /* @__PURE__ */ map$8(/* @__PURE__ */ serviceOption(Watch
|
|
|
65274
65343
|
* @since 1.0.0
|
|
65275
65344
|
* @category layer
|
|
65276
65345
|
*/
|
|
65277
|
-
const layer$
|
|
65346
|
+
const layer$19 = /* @__PURE__ */ effect$1(FileSystem)(makeFileSystem);
|
|
65278
65347
|
//#endregion
|
|
65279
65348
|
//#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.31_effect@4.0.0-beta.31_ioredis@5.9.2/node_modules/@effect/platform-node/dist/NodeHttpIncomingMessage.js
|
|
65280
65349
|
/**
|
|
@@ -65288,13 +65357,13 @@ var NodeHttpIncomingMessage = class extends Class$3 {
|
|
|
65288
65357
|
/**
|
|
65289
65358
|
* @since 1.0.0
|
|
65290
65359
|
*/
|
|
65291
|
-
[TypeId$
|
|
65360
|
+
[TypeId$18];
|
|
65292
65361
|
source;
|
|
65293
65362
|
onError;
|
|
65294
65363
|
remoteAddressOverride;
|
|
65295
65364
|
constructor(source, onError, remoteAddressOverride) {
|
|
65296
65365
|
super();
|
|
65297
|
-
this[TypeId$
|
|
65366
|
+
this[TypeId$18] = TypeId$18;
|
|
65298
65367
|
this.source = source;
|
|
65299
65368
|
this.onError = onError;
|
|
65300
65369
|
this.remoteAddressOverride = remoteAddressOverride;
|
|
@@ -85849,7 +85918,7 @@ var RequestInit = class extends Service$1()("effect/http/FetchHttpClient/Request
|
|
|
85849
85918
|
* @since 4.0.0
|
|
85850
85919
|
* @category layers
|
|
85851
85920
|
*/
|
|
85852
|
-
const layer$
|
|
85921
|
+
const layer$18 = /* @__PURE__ */ layerMergedServices(/* @__PURE__ */ succeed$3(/* @__PURE__ */ make$31((request, url, signal, fiber) => {
|
|
85853
85922
|
const fetch = fiber.getRef(Fetch);
|
|
85854
85923
|
const options = fiber.services.mapUnsafe.get(RequestInit.key) ?? {};
|
|
85855
85924
|
const headers = options.headers ? merge$3(fromInput$1(options.headers), request.headers) : request.headers;
|
|
@@ -85935,14 +86004,14 @@ function convertBody(body) {
|
|
|
85935
86004
|
}
|
|
85936
86005
|
function noopErrorHandler(_) {}
|
|
85937
86006
|
var UndiciResponse = class extends Class$3 {
|
|
86007
|
+
[TypeId$18];
|
|
85938
86008
|
[TypeId$17];
|
|
85939
|
-
[TypeId$16];
|
|
85940
86009
|
request;
|
|
85941
86010
|
source;
|
|
85942
86011
|
constructor(request, source) {
|
|
85943
86012
|
super();
|
|
86013
|
+
this[TypeId$18] = TypeId$18;
|
|
85944
86014
|
this[TypeId$17] = TypeId$17;
|
|
85945
|
-
this[TypeId$16] = TypeId$16;
|
|
85946
86015
|
this.request = request;
|
|
85947
86016
|
this.source = source;
|
|
85948
86017
|
source.body.on("error", noopErrorHandler);
|
|
@@ -86079,7 +86148,7 @@ const make$19 = /* @__PURE__ */ make$22({
|
|
|
86079
86148
|
* @since 1.0.0
|
|
86080
86149
|
* @category Layers
|
|
86081
86150
|
*/
|
|
86082
|
-
const layer$
|
|
86151
|
+
const layer$17 = /* @__PURE__ */ pipe$1(/* @__PURE__ */ effect$1(HttpPlatform)(make$19), /* @__PURE__ */ provide$3(layer$19), /* @__PURE__ */ provide$3(layer$23));
|
|
86083
86152
|
//#endregion
|
|
86084
86153
|
//#region node_modules/.pnpm/multipasta@0.2.7/node_modules/multipasta/dist/esm/node.js
|
|
86085
86154
|
var MultipastaStream = class extends Duplex {
|
|
@@ -86188,10 +86257,10 @@ const persisted = (source, headers) => toPersisted(stream$1(source, headers), (p
|
|
|
86188
86257
|
}));
|
|
86189
86258
|
const convertPart = (part) => part._tag === "Field" ? new FieldImpl(part.info, part.value) : new FileImpl(part);
|
|
86190
86259
|
var PartBase = class extends Class$3 {
|
|
86191
|
-
[TypeId$
|
|
86260
|
+
[TypeId$12];
|
|
86192
86261
|
constructor() {
|
|
86193
86262
|
super();
|
|
86194
|
-
this[TypeId$
|
|
86263
|
+
this[TypeId$12] = TypeId$12;
|
|
86195
86264
|
}
|
|
86196
86265
|
};
|
|
86197
86266
|
var FieldImpl = class extends PartBase {
|
|
@@ -86288,8 +86357,8 @@ const toFileUrl = (path) => try_({
|
|
|
86288
86357
|
* @since 1.0.0
|
|
86289
86358
|
* @category layer
|
|
86290
86359
|
*/
|
|
86291
|
-
const layer$
|
|
86292
|
-
[TypeId$
|
|
86360
|
+
const layer$15 = /* @__PURE__ */ succeed$4(Path$1)({
|
|
86361
|
+
[TypeId$44]: TypeId$44,
|
|
86293
86362
|
...Path,
|
|
86294
86363
|
fromFileUrl,
|
|
86295
86364
|
toFileUrl
|
|
@@ -86303,7 +86372,7 @@ const layer$14 = /* @__PURE__ */ succeed$4(Path$1)({
|
|
|
86303
86372
|
* @since 1.0.0
|
|
86304
86373
|
* @category layer
|
|
86305
86374
|
*/
|
|
86306
|
-
const layer$
|
|
86375
|
+
const layer$13 = /* @__PURE__ */ succeed$4(Stdio, /* @__PURE__ */ make$47({
|
|
86307
86376
|
args: /* @__PURE__ */ sync(() => process.argv.slice(2)),
|
|
86308
86377
|
stdout: (options) => fromWritable({
|
|
86309
86378
|
evaluate: () => process.stdout,
|
|
@@ -86340,7 +86409,7 @@ const layer$12 = /* @__PURE__ */ succeed$4(Stdio, /* @__PURE__ */ make$47({
|
|
|
86340
86409
|
* @since 1.0.0
|
|
86341
86410
|
* @category layers
|
|
86342
86411
|
*/
|
|
86343
|
-
const layer$
|
|
86412
|
+
const layer$12 = /* @__PURE__ */ effect$1(Terminal, /* @__PURE__ */ (/* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
|
|
86344
86413
|
const stdin = process.stdin;
|
|
86345
86414
|
const stdout = process.stdout;
|
|
86346
86415
|
const rlRef = yield* make$56({ acquire: acquireRelease(sync(() => {
|
|
@@ -86405,7 +86474,7 @@ function defaultShouldQuit(input) {
|
|
|
86405
86474
|
* @since 1.0.0
|
|
86406
86475
|
* @category layer
|
|
86407
86476
|
*/
|
|
86408
|
-
const layer$
|
|
86477
|
+
const layer$10 = /* @__PURE__ */ provideMerge(layer$24, /* @__PURE__ */ mergeAll$2(layer$19, layer$15, layer$13, layer$12));
|
|
86409
86478
|
//#endregion
|
|
86410
86479
|
//#region node_modules/.pnpm/@effect+platform-node@4.0.0-beta.31_effect@4.0.0-beta.31_ioredis@5.9.2/node_modules/@effect/platform-node/dist/NodeHttpServer.js
|
|
86411
86480
|
/**
|
|
@@ -86518,7 +86587,7 @@ const makeUpgradeHandler = (lazyWss, httpEffect, options) => {
|
|
|
86518
86587
|
});
|
|
86519
86588
|
};
|
|
86520
86589
|
var ServerRequestImpl = class ServerRequestImpl extends NodeHttpIncomingMessage {
|
|
86521
|
-
[TypeId$
|
|
86590
|
+
[TypeId$11];
|
|
86522
86591
|
response;
|
|
86523
86592
|
upgradeEffect;
|
|
86524
86593
|
url;
|
|
@@ -86528,7 +86597,7 @@ var ServerRequestImpl = class ServerRequestImpl extends NodeHttpIncomingMessage
|
|
|
86528
86597
|
request: this,
|
|
86529
86598
|
cause
|
|
86530
86599
|
}) }), remoteAddressOverride);
|
|
86531
|
-
this[TypeId$
|
|
86600
|
+
this[TypeId$11] = TypeId$11;
|
|
86532
86601
|
this.response = response;
|
|
86533
86602
|
this.upgradeEffect = upgradeEffect;
|
|
86534
86603
|
this.url = url;
|
|
@@ -86590,12 +86659,12 @@ const layerServer = /* @__PURE__ */ flow(make$15, /* @__PURE__ */ effect$1(HttpS
|
|
|
86590
86659
|
* @since 1.0.0
|
|
86591
86660
|
* @category Layers
|
|
86592
86661
|
*/
|
|
86593
|
-
const layerHttpServices = /* @__PURE__ */ mergeAll$2(layer$
|
|
86662
|
+
const layerHttpServices = /* @__PURE__ */ mergeAll$2(layer$17, layerWeak, layer$10);
|
|
86594
86663
|
/**
|
|
86595
86664
|
* @since 1.0.0
|
|
86596
86665
|
* @category Layers
|
|
86597
86666
|
*/
|
|
86598
|
-
const layer$
|
|
86667
|
+
const layer$9 = (evaluate, options) => mergeAll$2(layerServer(evaluate, options), layerHttpServices);
|
|
86599
86668
|
Http.createServer;
|
|
86600
86669
|
const handleResponse = (request, response) => {
|
|
86601
86670
|
const nodeResponse = request.resolvedResponse;
|
|
@@ -86748,7 +86817,7 @@ const runMain = /* @__PURE__ */ makeRunMain(({ fiber, teardown }) => {
|
|
|
86748
86817
|
/**
|
|
86749
86818
|
* @since 4.0.0
|
|
86750
86819
|
*/
|
|
86751
|
-
const TypeId$
|
|
86820
|
+
const TypeId$9 = "~effect/persistence/PersistedCache";
|
|
86752
86821
|
/**
|
|
86753
86822
|
* @since 4.0.0
|
|
86754
86823
|
* @category Constructors
|
|
@@ -86771,7 +86840,7 @@ const make$14 = /* @__PURE__ */ fnUntraced(function* (options) {
|
|
|
86771
86840
|
requireServicesAt: options.requireServicesAt
|
|
86772
86841
|
});
|
|
86773
86842
|
return identity({
|
|
86774
|
-
[TypeId$
|
|
86843
|
+
[TypeId$9]: TypeId$9,
|
|
86775
86844
|
inMemory,
|
|
86776
86845
|
get: (key) => get$7(inMemory, key),
|
|
86777
86846
|
invalidate: (key) => flatMap$4(store.remove(key), () => invalidate$1(inMemory, key))
|
|
@@ -86779,7 +86848,7 @@ const make$14 = /* @__PURE__ */ fnUntraced(function* (options) {
|
|
|
86779
86848
|
});
|
|
86780
86849
|
//#endregion
|
|
86781
86850
|
//#region src/shared/platform.ts
|
|
86782
|
-
const PlatformServices = layer$
|
|
86851
|
+
const PlatformServices = layer$10;
|
|
86783
86852
|
//#endregion
|
|
86784
86853
|
//#region src/domain/Project.ts
|
|
86785
86854
|
const ProjectId = String$1.pipe(brand("lalph/ProjectId"));
|
|
@@ -87287,12 +87356,12 @@ const toExit = (self) => {
|
|
|
87287
87356
|
* @since 4.0.0
|
|
87288
87357
|
* @category type ids
|
|
87289
87358
|
*/
|
|
87290
|
-
const TypeId$
|
|
87359
|
+
const TypeId$7 = "~effect/reactivity/AtomRegistry";
|
|
87291
87360
|
/**
|
|
87292
87361
|
* @since 4.0.0
|
|
87293
87362
|
* @category guards
|
|
87294
87363
|
*/
|
|
87295
|
-
const isAtomRegistry = (u) => hasProperty(u, TypeId$
|
|
87364
|
+
const isAtomRegistry = (u) => hasProperty(u, TypeId$7);
|
|
87296
87365
|
/**
|
|
87297
87366
|
* @since 4.0.0
|
|
87298
87367
|
* @category constructors
|
|
@@ -87302,7 +87371,7 @@ const make$13 = (options) => new RegistryImpl(options?.initialValues, options?.s
|
|
|
87302
87371
|
* @since 4.0.0
|
|
87303
87372
|
* @category Tags
|
|
87304
87373
|
*/
|
|
87305
|
-
const AtomRegistry = /* @__PURE__ */ Service$1(TypeId$
|
|
87374
|
+
const AtomRegistry = /* @__PURE__ */ Service$1(TypeId$7);
|
|
87306
87375
|
/**
|
|
87307
87376
|
* @since 4.0.0
|
|
87308
87377
|
* @category Layers
|
|
@@ -87320,7 +87389,7 @@ const layerOptions = (options) => effect$1(AtomRegistry, gen(function* () {
|
|
|
87320
87389
|
* @since 4.0.0
|
|
87321
87390
|
* @category Layers
|
|
87322
87391
|
*/
|
|
87323
|
-
const layer$
|
|
87392
|
+
const layer$8 = /* @__PURE__ */ layerOptions();
|
|
87324
87393
|
/**
|
|
87325
87394
|
* @since 4.0.0
|
|
87326
87395
|
* @category Conversions
|
|
@@ -87363,7 +87432,7 @@ const notifyListener = (listener) => {
|
|
|
87363
87432
|
const SerializableTypeId = "~effect-atom/atom/Atom/Serializable";
|
|
87364
87433
|
const atomKey = (atom) => SerializableTypeId in atom ? atom[SerializableTypeId].key : atom;
|
|
87365
87434
|
var RegistryImpl = class {
|
|
87366
|
-
[TypeId$
|
|
87435
|
+
[TypeId$7];
|
|
87367
87436
|
timeoutResolution;
|
|
87368
87437
|
defaultIdleTTL;
|
|
87369
87438
|
scheduler;
|
|
@@ -87371,7 +87440,7 @@ var RegistryImpl = class {
|
|
|
87371
87440
|
onNodeAdded;
|
|
87372
87441
|
onNodeRemoved;
|
|
87373
87442
|
constructor(initialValues, scheduleTask, timeoutResolution, defaultIdleTTL) {
|
|
87374
|
-
this[TypeId$
|
|
87443
|
+
this[TypeId$7] = TypeId$7;
|
|
87375
87444
|
this.scheduler = new MixedScheduler("sync", scheduleTask);
|
|
87376
87445
|
this.schedulerAsync = new MixedScheduler("async", scheduleTask);
|
|
87377
87446
|
this.defaultIdleTTL = defaultIdleTTL;
|
|
@@ -87907,12 +87976,12 @@ function batchRebuildNode(node) {
|
|
|
87907
87976
|
* @since 4.0.0
|
|
87908
87977
|
* @category type ids
|
|
87909
87978
|
*/
|
|
87910
|
-
const TypeId$
|
|
87979
|
+
const TypeId$6 = "~effect/reactivity/Atom";
|
|
87911
87980
|
/**
|
|
87912
87981
|
* @since 4.0.0
|
|
87913
87982
|
* @category Guards
|
|
87914
87983
|
*/
|
|
87915
|
-
const isAtom = (u) => hasProperty(u, TypeId$
|
|
87984
|
+
const isAtom = (u) => hasProperty(u, TypeId$6);
|
|
87916
87985
|
/**
|
|
87917
87986
|
* @since 4.0.0
|
|
87918
87987
|
* @category type ids
|
|
@@ -87928,7 +87997,7 @@ const removeTtl = /* @__PURE__ */ (/* @__PURE__ */ dual(2, (self, durationInput)
|
|
|
87928
87997
|
});
|
|
87929
87998
|
}))(0);
|
|
87930
87999
|
const AtomProto = {
|
|
87931
|
-
[TypeId$
|
|
88000
|
+
[TypeId$6]: TypeId$6,
|
|
87932
88001
|
...PipeInspectableProto,
|
|
87933
88002
|
toJSON() {
|
|
87934
88003
|
return {
|
|
@@ -88113,7 +88182,7 @@ function runCallbackSync(services, effect, onExit, uninterruptible = false) {
|
|
|
88113
88182
|
* @category constructors
|
|
88114
88183
|
*/
|
|
88115
88184
|
const context = (options) => {
|
|
88116
|
-
let globalLayer = layer$
|
|
88185
|
+
let globalLayer = layer$26;
|
|
88117
88186
|
function factory(create) {
|
|
88118
88187
|
const self = Object.create(RuntimeProto);
|
|
88119
88188
|
self.keepAlive = false;
|
|
@@ -88130,9 +88199,9 @@ const context = (options) => {
|
|
|
88130
88199
|
}
|
|
88131
88200
|
factory.memoMap = options.memoMap;
|
|
88132
88201
|
factory.addGlobalLayer = (layer) => {
|
|
88133
|
-
globalLayer = provideMerge(globalLayer, provide$3(layer, layer$
|
|
88202
|
+
globalLayer = provideMerge(globalLayer, provide$3(layer, layer$26));
|
|
88134
88203
|
};
|
|
88135
|
-
const reactivityAtom = removeTtl(make$12(servicesWith((services) => buildWithMemoMap(layer$
|
|
88204
|
+
const reactivityAtom = removeTtl(make$12(servicesWith((services) => buildWithMemoMap(layer$26, options.memoMap, get$15(services, Scope))).pipe(map$8(get$15(Reactivity)))));
|
|
88136
88205
|
factory.withReactivity = (keys) => (atom) => transform$1(atom, (get) => {
|
|
88137
88206
|
const reactivity = getOrThrow(get(reactivityAtom));
|
|
88138
88207
|
get.addFinalizer(reactivity.registerUnsafe(keys, () => {
|
|
@@ -88438,7 +88507,7 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
|
|
|
88438
88507
|
static layer = effect$1(this, this.make).pipe(provide$3([
|
|
88439
88508
|
layerKvs,
|
|
88440
88509
|
ProjectsKvs.layer,
|
|
88441
|
-
layer$
|
|
88510
|
+
layer$26
|
|
88442
88511
|
]));
|
|
88443
88512
|
static get(setting) {
|
|
88444
88513
|
return Settings.use((_) => _.get(setting));
|
|
@@ -173546,7 +173615,7 @@ var TokenManager$1 = class extends Service$1()("lalph/Linear/TokenManager", { ma
|
|
|
173546
173615
|
})), {
|
|
173547
173616
|
disableListenLog: true,
|
|
173548
173617
|
disableLogger: true
|
|
173549
|
-
}).pipe(provide$3(layer$
|
|
173618
|
+
}).pipe(provide$3(layer$9(createServer, { port: 34338 })), build, orDie$2);
|
|
173550
173619
|
const redirectUri = `http://localhost:34338/callback`;
|
|
173551
173620
|
const verifier = crypto.randomUUID();
|
|
173552
173621
|
const verifierSha256 = yield* promise(() => crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier)));
|
|
@@ -173573,7 +173642,7 @@ var TokenManager$1 = class extends Service$1()("lalph/Linear/TokenManager", { ma
|
|
|
173573
173642
|
}, option$1);
|
|
173574
173643
|
return { get };
|
|
173575
173644
|
}) }) {
|
|
173576
|
-
static layer = effect$1(this, this.make).pipe(provide$3([layerKvs, layer$
|
|
173645
|
+
static layer = effect$1(this, this.make).pipe(provide$3([layerKvs, layer$18]));
|
|
173577
173646
|
};
|
|
173578
173647
|
var AccessToken$1 = class AccessToken$1 extends Class$1("lalph/Linear/AccessToken")({
|
|
173579
173648
|
token: String$1,
|
|
@@ -175298,7 +175367,7 @@ const AiErrorReason = /* @__PURE__ */ Union([
|
|
|
175298
175367
|
ToolkitRequiredError,
|
|
175299
175368
|
InvalidUserInputError
|
|
175300
175369
|
]);
|
|
175301
|
-
const TypeId$
|
|
175370
|
+
const TypeId$5 = "~effect/unstable/ai/AiError/AiError";
|
|
175302
175371
|
/**
|
|
175303
175372
|
* Top-level AI error wrapper using the `reason` pattern.
|
|
175304
175373
|
*
|
|
@@ -175339,7 +175408,7 @@ var AiError = class extends ErrorClass("effect/ai/AiError/AiError")({
|
|
|
175339
175408
|
/**
|
|
175340
175409
|
* @since 1.0.0
|
|
175341
175410
|
*/
|
|
175342
|
-
[TypeId$
|
|
175411
|
+
[TypeId$5] = TypeId$5;
|
|
175343
175412
|
/**
|
|
175344
175413
|
* Delegates to the underlying reason's `isRetryable` getter.
|
|
175345
175414
|
*
|
|
@@ -175762,9 +175831,33 @@ const Message$1 = /* @__PURE__ */ Union([
|
|
|
175762
175831
|
content: Array$1(Union([ToolResultPart, ToolApprovalResponsePart]))
|
|
175763
175832
|
}).annotate({ identifier: "ToolMessage" })
|
|
175764
175833
|
]);
|
|
175765
|
-
const TypeId$
|
|
175834
|
+
const TypeId$4 = "~effect/unstable/ai/Prompt";
|
|
175835
|
+
/**
|
|
175836
|
+
* Type guard to check if a value is a Prompt.
|
|
175837
|
+
*
|
|
175838
|
+
* @since 4.0.0
|
|
175839
|
+
* @category guards
|
|
175840
|
+
*/
|
|
175841
|
+
const isPrompt = (u) => hasProperty(u, TypeId$4);
|
|
175842
|
+
const $Prompt = /* @__PURE__ */ declare((u) => isPrompt(u), { identifier: "Prompt" });
|
|
175843
|
+
/**
|
|
175844
|
+
* Describes a schema that represents a `Prompt` instance.
|
|
175845
|
+
*
|
|
175846
|
+
* @since 4.0.0
|
|
175847
|
+
* @category schemas
|
|
175848
|
+
*/
|
|
175849
|
+
const Prompt$1 = /* @__PURE__ */ Struct({ content: Array$1(toEncoded(Message$1)) }).pipe(/* @__PURE__ */ decodeTo($Prompt, /* @__PURE__ */ transformOrFail({
|
|
175850
|
+
decode: (input) => mapBothEager(decodeEffect$1(Array$1(Message$1))(input.content), {
|
|
175851
|
+
onSuccess: makePrompt,
|
|
175852
|
+
onFailure: () => new InvalidValue$1(some$2(input.content), { message: "Invalid Prompt messages" })
|
|
175853
|
+
}),
|
|
175854
|
+
encode: (prompt) => mapBothEager(encodeEffect$1(Array$1(Message$1))(prompt.content), {
|
|
175855
|
+
onSuccess: (messages) => ({ content: messages }),
|
|
175856
|
+
onFailure: () => new InvalidValue$1(some$2(prompt.content), { message: "Invalid Prompt messages" })
|
|
175857
|
+
})
|
|
175858
|
+
})));
|
|
175766
175859
|
const Proto$3 = {
|
|
175767
|
-
[TypeId$
|
|
175860
|
+
[TypeId$4]: TypeId$4,
|
|
175768
175861
|
pipe() {
|
|
175769
175862
|
return pipeArguments(this, arguments);
|
|
175770
175863
|
}
|
|
@@ -176119,11 +176212,11 @@ const addGenAIAnnotations$2 = /* @__PURE__ */ dual(2, (span, options) => {
|
|
|
176119
176212
|
var CurrentSpanTransformer = class extends Service$1()("effect/ai/Telemetry/CurrentSpanTransformer") {};
|
|
176120
176213
|
//#endregion
|
|
176121
176214
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/unstable/ai/Toolkit.js
|
|
176122
|
-
const TypeId$
|
|
176215
|
+
const TypeId$3 = "~effect/ai/Toolkit";
|
|
176123
176216
|
const Proto$2 = {
|
|
176124
176217
|
...YieldableProto,
|
|
176125
176218
|
...PipeInspectableProto,
|
|
176126
|
-
[TypeId$
|
|
176219
|
+
[TypeId$3]: TypeId$3,
|
|
176127
176220
|
of: identity,
|
|
176128
176221
|
toHandlers(build) {
|
|
176129
176222
|
return gen({ self: this }, function* () {
|
|
@@ -176969,7 +177062,7 @@ const applySpanTransformer = (transformer, response, options) => {
|
|
|
176969
177062
|
* @since 1.0.0
|
|
176970
177063
|
* @category type ids
|
|
176971
177064
|
*/
|
|
176972
|
-
const TypeId$
|
|
177065
|
+
const TypeId$2 = "~effect/ai/Tool";
|
|
176973
177066
|
/**
|
|
176974
177067
|
* @since 1.0.0
|
|
176975
177068
|
* @category type ids
|
|
@@ -177090,7 +177183,7 @@ const isProviderDefined = (u) => hasProperty(u, ProviderDefinedTypeId);
|
|
|
177090
177183
|
*/
|
|
177091
177184
|
const isDynamic = (u) => hasProperty(u, DynamicTypeId);
|
|
177092
177185
|
const Proto$1 = {
|
|
177093
|
-
[TypeId$
|
|
177186
|
+
[TypeId$2]: { _Requirements: identity },
|
|
177094
177187
|
pipe() {
|
|
177095
177188
|
return pipeArguments(this, arguments);
|
|
177096
177189
|
},
|
|
@@ -177404,7 +177497,7 @@ const unsafeSecureJsonParse = (text) => {
|
|
|
177404
177497
|
*
|
|
177405
177498
|
* @since 4.0.0
|
|
177406
177499
|
*/
|
|
177407
|
-
const TypeId = "~effect/ai/Model";
|
|
177500
|
+
const TypeId$1 = "~effect/ai/Model";
|
|
177408
177501
|
/**
|
|
177409
177502
|
* Service tag that provides the current large language model provider name.
|
|
177410
177503
|
*
|
|
@@ -177430,7 +177523,7 @@ var ModelName = class extends Service$1()("effect/unstable/ai/Model/ModelName")
|
|
|
177430
177523
|
const Proto = {
|
|
177431
177524
|
...YieldableProto,
|
|
177432
177525
|
...PipeInspectableProto,
|
|
177433
|
-
[TypeId]: TypeId,
|
|
177526
|
+
[TypeId$1]: TypeId$1,
|
|
177434
177527
|
["~effect/Layer"]: {
|
|
177435
177528
|
_ROut: identity,
|
|
177436
177529
|
_E: identity,
|
|
@@ -180900,7 +180993,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
|
|
|
180900
180993
|
});
|
|
180901
180994
|
Ze.glob = Ze;
|
|
180902
180995
|
//#endregion
|
|
180903
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
180996
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/ApplyPatch.js
|
|
180904
180997
|
/**
|
|
180905
180998
|
* @since 1.0.0
|
|
180906
180999
|
*/
|
|
@@ -195773,7 +195866,7 @@ var StreamableHTTPClientTransport = class {
|
|
|
195773
195866
|
}
|
|
195774
195867
|
};
|
|
195775
195868
|
//#endregion
|
|
195776
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
195869
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/McpClient.js
|
|
195777
195870
|
/**
|
|
195778
195871
|
* @since 1.0.0
|
|
195779
195872
|
*/
|
|
@@ -195791,7 +195884,7 @@ var McpClientError = class extends TaggedErrorClass()("McpClientError", { cause:
|
|
|
195791
195884
|
* @since 1.0.0
|
|
195792
195885
|
* @category Layers
|
|
195793
195886
|
*/
|
|
195794
|
-
const layer$
|
|
195887
|
+
const layer$7 = effect$1(McpClient, gen(function* () {
|
|
195795
195888
|
const client = yield* acquireRelease(sync(() => new Client({
|
|
195796
195889
|
name: "clanka",
|
|
195797
195890
|
version: "0.1.0"
|
|
@@ -195818,7 +195911,7 @@ const layer$6 = effect$1(McpClient, gen(function* () {
|
|
|
195818
195911
|
});
|
|
195819
195912
|
}));
|
|
195820
195913
|
//#endregion
|
|
195821
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
195914
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/ExaSearch.js
|
|
195822
195915
|
/**
|
|
195823
195916
|
* @since 1.0.0
|
|
195824
195917
|
*/
|
|
@@ -195848,7 +195941,7 @@ var ExaError = class extends TaggedErrorClass()("ExaError", { cause: Defect }) {
|
|
|
195848
195941
|
* @since 1.0.0
|
|
195849
195942
|
* @category Layers
|
|
195850
195943
|
*/
|
|
195851
|
-
const layer$
|
|
195944
|
+
const layer$6 = effect$1(ExaSearch, gen(function* () {
|
|
195852
195945
|
const client = yield* McpClient;
|
|
195853
195946
|
yield* client.connect({ url: "https://mcp.exa.ai/mcp" }).pipe(orDie$2);
|
|
195854
195947
|
const decode = decodeUnknownEffect(NonEmptyArray(ExaSearchResult));
|
|
@@ -195861,7 +195954,7 @@ const layer$5 = effect$1(ExaSearch, gen(function* () {
|
|
|
195861
195954
|
}
|
|
195862
195955
|
}), flatMap$4(decode)))[0].text;
|
|
195863
195956
|
}, mapError$2((cause) => new ExaError({ cause }))) });
|
|
195864
|
-
})).pipe(provide$3(layer$
|
|
195957
|
+
})).pipe(provide$3(layer$7));
|
|
195865
195958
|
//#endregion
|
|
195866
195959
|
//#region node_modules/.pnpm/@mixmark-io+domino@2.2.0/node_modules/@mixmark-io/domino/lib/Event.js
|
|
195867
195960
|
var require_Event = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
@@ -210768,7 +210861,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
210768
210861
|
exports.impl = impl;
|
|
210769
210862
|
}));
|
|
210770
210863
|
//#endregion
|
|
210771
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
210864
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/WebToMarkdown.js
|
|
210772
210865
|
/**
|
|
210773
210866
|
* @since 1.0.0
|
|
210774
210867
|
*/
|
|
@@ -211485,8 +211578,8 @@ var WebToMarkdown = class extends Service$1()("clanka/WebToMarkdown") {};
|
|
|
211485
211578
|
* @since 1.0.0
|
|
211486
211579
|
* @category Layers
|
|
211487
211580
|
*/
|
|
211488
|
-
const layer$
|
|
211489
|
-
const client = (yield* HttpClient).pipe(filterStatusOk, retryTransient({ times: 3 }));
|
|
211581
|
+
const layer$5 = effect$1(WebToMarkdown, gen(function* () {
|
|
211582
|
+
const client = (yield* HttpClient).pipe(followRedirects(), filterStatusOk, retryTransient({ times: 3 }));
|
|
211490
211583
|
const toRemove = new Set([
|
|
211491
211584
|
"head",
|
|
211492
211585
|
"footer",
|
|
@@ -211532,7 +211625,7 @@ const layer$4 = effect$1(WebToMarkdown, gen(function* () {
|
|
|
211532
211625
|
});
|
|
211533
211626
|
}));
|
|
211534
211627
|
//#endregion
|
|
211535
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
211628
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/AgentTools.js
|
|
211536
211629
|
/**
|
|
211537
211630
|
* @since 1.0.0
|
|
211538
211631
|
*/
|
|
@@ -211545,12 +211638,12 @@ var CurrentDirectory = class extends Service$1()("clanka/AgentTools/CurrentDirec
|
|
|
211545
211638
|
* @since 1.0.0
|
|
211546
211639
|
* @category Context
|
|
211547
211640
|
*/
|
|
211548
|
-
var
|
|
211641
|
+
var TaskCompleter = class extends Service$1()("clanka/AgentTools/TaskCompleter") {};
|
|
211549
211642
|
/**
|
|
211550
211643
|
* @since 1.0.0
|
|
211551
211644
|
* @category Context
|
|
211552
211645
|
*/
|
|
211553
|
-
var
|
|
211646
|
+
var SubagentExecutor = class extends Service$1()("clanka/AgentTools/SubagentExecutor") {};
|
|
211554
211647
|
/**
|
|
211555
211648
|
* @since 1.0.0
|
|
211556
211649
|
* @category Toolkit
|
|
@@ -211625,7 +211718,7 @@ const AgentTools = make$9(make$7("readFile", {
|
|
|
211625
211718
|
description: "Delegate a task to another software engineer. Returns the result of the task.",
|
|
211626
211719
|
parameters: String$1.annotate({ identifier: "task" }),
|
|
211627
211720
|
success: String$1,
|
|
211628
|
-
dependencies: [
|
|
211721
|
+
dependencies: [SubagentExecutor]
|
|
211629
211722
|
}), make$7("webSearch", {
|
|
211630
211723
|
description: "Search the web for recent information.",
|
|
211631
211724
|
parameters: ExaSearchOptions,
|
|
@@ -211640,7 +211733,7 @@ const AgentTools = make$9(make$7("readFile", {
|
|
|
211640
211733
|
}), make$7("taskComplete", {
|
|
211641
211734
|
description: "Only call this when the task is fully complete and you have a final output message to send.",
|
|
211642
211735
|
parameters: String$1.annotate({ identifier: "output" }),
|
|
211643
|
-
dependencies: [
|
|
211736
|
+
dependencies: [TaskCompleter]
|
|
211644
211737
|
}));
|
|
211645
211738
|
/**
|
|
211646
211739
|
* @since 1.0.0
|
|
@@ -211842,10 +211935,10 @@ const AgentToolHandlersNoDeps = AgentTools.toLayer(gen(function* () {
|
|
|
211842
211935
|
}, orDie$2),
|
|
211843
211936
|
delegate: fn("AgentTools.delegate")(function* (prompt) {
|
|
211844
211937
|
yield* logInfo(`Calling "delegate"`);
|
|
211845
|
-
return yield* (yield*
|
|
211938
|
+
return yield* (yield* SubagentExecutor)(prompt);
|
|
211846
211939
|
}, orDie$2),
|
|
211847
211940
|
taskComplete: fn("AgentTools.taskComplete")(function* (message) {
|
|
211848
|
-
yield*
|
|
211941
|
+
yield* (yield* TaskCompleter)(message);
|
|
211849
211942
|
})
|
|
211850
211943
|
});
|
|
211851
211944
|
}));
|
|
@@ -211853,91 +211946,11 @@ const AgentToolHandlersNoDeps = AgentTools.toLayer(gen(function* () {
|
|
|
211853
211946
|
* @since 1.0.0
|
|
211854
211947
|
* @category Layers
|
|
211855
211948
|
*/
|
|
211856
|
-
const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$
|
|
211949
|
+
const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$6, layer$5]));
|
|
211857
211950
|
AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
|
|
211858
211951
|
var ApplyPatchError = class extends TaggedClass$1("ApplyPatchError") {};
|
|
211859
211952
|
//#endregion
|
|
211860
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
211861
|
-
/**
|
|
211862
|
-
* @since 1.0.0
|
|
211863
|
-
*/
|
|
211864
|
-
/**
|
|
211865
|
-
* @since 1.0.0
|
|
211866
|
-
* @category Services
|
|
211867
|
-
*/
|
|
211868
|
-
var Executor = class Executor extends Service$1()("clanka/Executor") {
|
|
211869
|
-
static layer = effect$1(Executor, gen(function* () {
|
|
211870
|
-
const execute = fnUntraced(function* (options) {
|
|
211871
|
-
const output = yield* unbounded();
|
|
211872
|
-
const console = yield* makeConsole(output);
|
|
211873
|
-
const handlerScope = makeUnsafe$12("parallel");
|
|
211874
|
-
const trackFiber = runIn(handlerScope);
|
|
211875
|
-
yield* gen(function* () {
|
|
211876
|
-
const console = yield* Console$1;
|
|
211877
|
-
const services$6 = yield* services();
|
|
211878
|
-
let running = 0;
|
|
211879
|
-
const script = new NodeVm.Script(`async function main() {
|
|
211880
|
-
${options.script}
|
|
211881
|
-
}`);
|
|
211882
|
-
const sandbox = {
|
|
211883
|
-
main: defaultMain,
|
|
211884
|
-
console,
|
|
211885
|
-
fetch,
|
|
211886
|
-
process: void 0
|
|
211887
|
-
};
|
|
211888
|
-
for (const [name, tool] of Object.entries(options.tools.tools)) {
|
|
211889
|
-
const handler = services$6.mapUnsafe.get(tool.id);
|
|
211890
|
-
const runFork = runForkWith(merge$7(services$6, handler.services));
|
|
211891
|
-
sandbox[name] = function(params) {
|
|
211892
|
-
running++;
|
|
211893
|
-
const fiber = trackFiber(runFork(handler.handler(params, {})));
|
|
211894
|
-
return new Promise((resolve, reject) => {
|
|
211895
|
-
fiber.addObserver((exit) => {
|
|
211896
|
-
running--;
|
|
211897
|
-
if (exit._tag === "Success") resolve(exit.value);
|
|
211898
|
-
else {
|
|
211899
|
-
if (hasInterruptsOnly(exit.cause)) return;
|
|
211900
|
-
reject(squash(exit.cause));
|
|
211901
|
-
}
|
|
211902
|
-
});
|
|
211903
|
-
});
|
|
211904
|
-
};
|
|
211905
|
-
}
|
|
211906
|
-
script.runInNewContext(sandbox, { timeout: 1e3 });
|
|
211907
|
-
yield* promise(sandbox.main);
|
|
211908
|
-
while (true) {
|
|
211909
|
-
yield* yieldNow;
|
|
211910
|
-
if (running === 0) break;
|
|
211911
|
-
}
|
|
211912
|
-
}).pipe(ensuring$2(close(handlerScope, void_$2)), catchCause$1(logFatal), provideService$2(Console$1, console), ensuring$2(end(output)), forkScoped);
|
|
211913
|
-
return fromQueue(output);
|
|
211914
|
-
}, unwrap);
|
|
211915
|
-
return Executor.of({ execute });
|
|
211916
|
-
}));
|
|
211917
|
-
};
|
|
211918
|
-
const defaultMain = () => Promise.resolve();
|
|
211919
|
-
const makeConsole = fn(function* (queue) {
|
|
211920
|
-
const writable = new QueueWriteStream(queue);
|
|
211921
|
-
const newConsole = new NodeConsole.Console(writable);
|
|
211922
|
-
yield* addFinalizer(() => {
|
|
211923
|
-
writable.end();
|
|
211924
|
-
return void_$1;
|
|
211925
|
-
});
|
|
211926
|
-
return newConsole;
|
|
211927
|
-
});
|
|
211928
|
-
var QueueWriteStream = class extends Writable {
|
|
211929
|
-
queue;
|
|
211930
|
-
constructor(queue) {
|
|
211931
|
-
super();
|
|
211932
|
-
this.queue = queue;
|
|
211933
|
-
}
|
|
211934
|
-
_write(chunk, _encoding, callback) {
|
|
211935
|
-
offerUnsafe(this.queue, chunk.toString());
|
|
211936
|
-
callback();
|
|
211937
|
-
}
|
|
211938
|
-
};
|
|
211939
|
-
//#endregion
|
|
211940
|
-
//#region node_modules/.pnpm/clanka@0.0.28_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-o_0e80b96f8e1012e90aa014799a383a7c/node_modules/clanka/dist/TypeBuilder.js
|
|
211953
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/TypeBuilder.js
|
|
211941
211954
|
const resolveDocumentation = resolveAt("documentation");
|
|
211942
211955
|
const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
|
|
211943
211956
|
const Precedence = {
|
|
@@ -212210,7 +212223,7 @@ const render = (schema, options) => {
|
|
|
212210
212223
|
return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
|
|
212211
212224
|
};
|
|
212212
212225
|
//#endregion
|
|
212213
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
212226
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/ToolkitRenderer.js
|
|
212214
212227
|
/**
|
|
212215
212228
|
* @since 1.0.0
|
|
212216
212229
|
*/
|
|
@@ -212232,29 +212245,135 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
|
|
|
212232
212245
|
}) });
|
|
212233
212246
|
};
|
|
212234
212247
|
//#endregion
|
|
212235
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
212248
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/AgentExecutor.js
|
|
212236
212249
|
/**
|
|
212237
212250
|
* @since 1.0.0
|
|
212238
212251
|
*/
|
|
212239
212252
|
/**
|
|
212240
|
-
*
|
|
212241
|
-
*
|
|
212253
|
+
* @since 1.0.0
|
|
212254
|
+
* @category Services
|
|
212255
|
+
*/
|
|
212256
|
+
var AgentExecutor = class extends Service$1()("clanka/AgentExecutor") {};
|
|
212257
|
+
/**
|
|
212242
212258
|
* @since 1.0.0
|
|
212243
212259
|
* @category Constructors
|
|
212244
212260
|
*/
|
|
212245
|
-
const
|
|
212261
|
+
const makeLocal = fnUntraced(function* (options) {
|
|
212246
212262
|
const fs = yield* FileSystem;
|
|
212247
212263
|
const pathService = yield* Path$1;
|
|
212248
|
-
const executor = yield* Executor;
|
|
212249
212264
|
const renderer = yield* ToolkitRenderer;
|
|
212250
|
-
const
|
|
212251
|
-
const
|
|
212252
|
-
const
|
|
212253
|
-
const
|
|
212265
|
+
const AllTools = merge$2(AgentTools, options.tools ?? empty);
|
|
212266
|
+
const tools = yield* AllTools;
|
|
212267
|
+
const toolsDts = succeed$3(renderer.render(AllTools));
|
|
212268
|
+
const services$6 = yield* services();
|
|
212269
|
+
const toolEntries = Object.entries(tools.tools).map(([name, tool]) => {
|
|
212270
|
+
const handler = services$6.mapUnsafe.get(tool.id);
|
|
212271
|
+
return {
|
|
212272
|
+
name,
|
|
212273
|
+
services: merge$7(services$6, handler.services),
|
|
212274
|
+
handler: handler.handler
|
|
212275
|
+
};
|
|
212276
|
+
});
|
|
212277
|
+
const execute = fnUntraced(function* (opts) {
|
|
212278
|
+
const output = yield* unbounded();
|
|
212279
|
+
const console = yield* makeConsole(output);
|
|
212280
|
+
const handlerScope = makeUnsafe$12("parallel");
|
|
212281
|
+
const trackFiber = runIn(handlerScope);
|
|
212282
|
+
const taskServices = make$75(TaskCompleter, opts.onTaskComplete).pipe(add$3(CurrentDirectory, options.directory), add$3(SubagentExecutor, opts.onSubagent), add$3(Console$1, console));
|
|
212283
|
+
yield* gen(function* () {
|
|
212284
|
+
const console = yield* Console$1;
|
|
212285
|
+
let running = 0;
|
|
212286
|
+
const vmScript = new NodeVm.Script(`async function main() {
|
|
212287
|
+
${opts.script}
|
|
212288
|
+
}`);
|
|
212289
|
+
const sandbox = {
|
|
212290
|
+
main: defaultMain,
|
|
212291
|
+
console,
|
|
212292
|
+
fetch,
|
|
212293
|
+
process: void 0
|
|
212294
|
+
};
|
|
212295
|
+
for (let i = 0; i < toolEntries.length; i++) {
|
|
212296
|
+
const { name, handler, services } = toolEntries[i];
|
|
212297
|
+
const runFork = runForkWith(merge$7(services, taskServices));
|
|
212298
|
+
sandbox[name] = function(params) {
|
|
212299
|
+
running++;
|
|
212300
|
+
const fiber = trackFiber(runFork(handler(params, {})));
|
|
212301
|
+
return new Promise((resolve, reject) => {
|
|
212302
|
+
fiber.addObserver((exit) => {
|
|
212303
|
+
running--;
|
|
212304
|
+
if (exit._tag === "Success") return resolve(exit.value);
|
|
212305
|
+
if (hasInterruptsOnly(exit.cause)) return;
|
|
212306
|
+
reject(squash(exit.cause));
|
|
212307
|
+
});
|
|
212308
|
+
});
|
|
212309
|
+
};
|
|
212310
|
+
}
|
|
212311
|
+
vmScript.runInNewContext(sandbox, { timeout: 1e3 });
|
|
212312
|
+
yield* promise(sandbox.main);
|
|
212313
|
+
while (true) {
|
|
212314
|
+
yield* yieldNow;
|
|
212315
|
+
if (running === 0) break;
|
|
212316
|
+
}
|
|
212317
|
+
}).pipe(ensuring$2(close(handlerScope, void_$2)), catchCause$1(logFatal), provideService$2(Console$1, console), ensuring$2(end(output)), forkScoped);
|
|
212318
|
+
return fromQueue(output);
|
|
212319
|
+
}, unwrap);
|
|
212320
|
+
return AgentExecutor.of({
|
|
212321
|
+
toolsDts,
|
|
212322
|
+
agentsMd: pipe$1(fs.readFileString(pathService.join(options.directory, "AGENTS.md")), option$1),
|
|
212323
|
+
execute
|
|
212324
|
+
});
|
|
212325
|
+
});
|
|
212326
|
+
/**
|
|
212327
|
+
* @since 1.0.0
|
|
212328
|
+
* @category Layers
|
|
212329
|
+
*/
|
|
212330
|
+
const layerLocal$1 = (options) => effect$1(AgentExecutor, makeLocal(options)).pipe(provide$3([AgentToolHandlers, ToolkitRenderer.layer]));
|
|
212331
|
+
const defaultMain = () => Promise.resolve();
|
|
212332
|
+
const makeConsole = fn(function* (queue) {
|
|
212333
|
+
const writable = new QueueWriteStream(queue);
|
|
212334
|
+
const newConsole = new NodeConsole.Console(writable);
|
|
212335
|
+
yield* addFinalizer(() => {
|
|
212336
|
+
writable.end();
|
|
212337
|
+
return void_$1;
|
|
212338
|
+
});
|
|
212339
|
+
return newConsole;
|
|
212340
|
+
});
|
|
212341
|
+
var QueueWriteStream = class extends Writable {
|
|
212342
|
+
queue;
|
|
212343
|
+
constructor(queue) {
|
|
212344
|
+
super();
|
|
212345
|
+
this.queue = queue;
|
|
212346
|
+
}
|
|
212347
|
+
_write(chunk, _encoding, callback) {
|
|
212348
|
+
offerUnsafe(this.queue, chunk.toString());
|
|
212349
|
+
callback();
|
|
212350
|
+
}
|
|
212351
|
+
};
|
|
212352
|
+
//#endregion
|
|
212353
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/Agent.js
|
|
212354
|
+
/**
|
|
212355
|
+
* @since 1.0.0
|
|
212356
|
+
*/
|
|
212357
|
+
/**
|
|
212358
|
+
* @since 1.0.0
|
|
212359
|
+
* @category Models
|
|
212360
|
+
*/
|
|
212361
|
+
const TypeId = "~clanka/Agent";
|
|
212362
|
+
/**
|
|
212363
|
+
* @since 1.0.0
|
|
212364
|
+
* @category Service
|
|
212365
|
+
*/
|
|
212366
|
+
const Agent = Service$1("clanka/Agent");
|
|
212367
|
+
/**
|
|
212368
|
+
* @since 1.0.0
|
|
212369
|
+
* @category Constructors
|
|
212370
|
+
*/
|
|
212371
|
+
const make$5 = gen(function* () {
|
|
212372
|
+
const executor = yield* AgentExecutor;
|
|
212254
212373
|
const singleTool = yield* SingleTools.asEffect().pipe(provide$1(SingleToolHandlers));
|
|
212255
|
-
const
|
|
212374
|
+
const toolsDts = yield* executor.toolsDts;
|
|
212256
212375
|
const pendingMessages = /* @__PURE__ */ new Set();
|
|
212257
|
-
const agentsMd = yield* pipe$1(
|
|
212376
|
+
const agentsMd = yield* pipe$1(executor.agentsMd, map$8(map$15((content) => `# AGENTS.md
|
|
212258
212377
|
|
|
212259
212378
|
The following instructions are from ./AGENTS.md in the current directory.
|
|
212260
212379
|
You do not need to read this file again.
|
|
@@ -212263,25 +212382,31 @@ You do not need to read this file again.
|
|
|
212263
212382
|
|
|
212264
212383
|
<!-- AGENTS.md start -->
|
|
212265
212384
|
${content}
|
|
212266
|
-
<!-- AGENTS.md end -->`)
|
|
212385
|
+
<!-- AGENTS.md end -->`)));
|
|
212267
212386
|
let agentCounter = 0;
|
|
212268
212387
|
const outputBuffer = /* @__PURE__ */ new Map();
|
|
212269
212388
|
let currentOutputAgent = null;
|
|
212270
|
-
|
|
212389
|
+
let history = make$63(empty$1);
|
|
212390
|
+
const spawn = fnUntraced(function* (opts) {
|
|
212391
|
+
const agentId = opts.agentId;
|
|
212271
212392
|
const ai = yield* LanguageModel;
|
|
212393
|
+
const subagentModel = yield* serviceOption(SubagentModel);
|
|
212272
212394
|
const modelConfig = yield* AgentModelConfig;
|
|
212395
|
+
const services$5 = yield* services();
|
|
212396
|
+
let finalSummary = none$4();
|
|
212273
212397
|
const singleToolMode = modelConfig.supportsNoTools !== true;
|
|
212274
|
-
const deferred = yield* make$73();
|
|
212275
212398
|
const output = yield* make$61();
|
|
212276
|
-
|
|
212277
|
-
|
|
212399
|
+
const prompt = opts.disableHistory ? make$63(empty$1) : history;
|
|
212400
|
+
update(prompt, concat(opts.prompt));
|
|
212401
|
+
let system = (typeof opts.system === "function" ? opts.system : defaultSystem)({
|
|
212402
|
+
toolInstructions: generateSystemTools(toolsDts, !singleToolMode),
|
|
212278
212403
|
agentsMd: getOrElse$2(agentsMd, () => "")
|
|
212279
212404
|
});
|
|
212280
|
-
if (typeof
|
|
212405
|
+
if (typeof opts.system === "string") system += `\n${opts.system}\n`;
|
|
212281
212406
|
function maybeSend(options) {
|
|
212282
|
-
if (currentOutputAgent === null || currentOutputAgent === agentId) {
|
|
212407
|
+
if (currentOutputAgent === null || currentOutputAgent === opts.agentId) {
|
|
212283
212408
|
offerUnsafe(output, options.part);
|
|
212284
|
-
if (options.acquire) currentOutputAgent = agentId;
|
|
212409
|
+
if (options.acquire) currentOutputAgent = opts.agentId;
|
|
212285
212410
|
if (options.release) {
|
|
212286
212411
|
currentOutputAgent = null;
|
|
212287
212412
|
for (const [id, state] of outputBuffer) {
|
|
@@ -212296,54 +212421,59 @@ ${content}
|
|
|
212296
212421
|
}
|
|
212297
212422
|
return;
|
|
212298
212423
|
}
|
|
212299
|
-
let state = outputBuffer.get(agentId);
|
|
212424
|
+
let state = outputBuffer.get(opts.agentId);
|
|
212300
212425
|
if (!state) {
|
|
212301
212426
|
state = [];
|
|
212302
|
-
outputBuffer.set(agentId, state);
|
|
212427
|
+
outputBuffer.set(opts.agentId, state);
|
|
212303
212428
|
}
|
|
212304
212429
|
state.push(options.part);
|
|
212305
212430
|
}
|
|
212306
|
-
const
|
|
212431
|
+
const spawnSubagent = fnUntraced(function* (prompt) {
|
|
212307
212432
|
let id = agentCounter++;
|
|
212308
|
-
const stream = spawn(
|
|
212433
|
+
const stream = spawn({
|
|
212434
|
+
agentId: id,
|
|
212435
|
+
prompt: make$10(`You have been asked using the "delegate" function to complete the following task. Try to avoid using the "delegate" function yourself unless strictly necessary:
|
|
212309
212436
|
|
|
212310
|
-
${prompt}`)
|
|
212311
|
-
|
|
212312
|
-
|
|
212313
|
-
|
|
212314
|
-
|
|
212315
|
-
|
|
212316
|
-
|
|
212317
|
-
|
|
212318
|
-
|
|
212319
|
-
|
|
212320
|
-
|
|
212321
|
-
|
|
212322
|
-
|
|
212323
|
-
|
|
212324
|
-
|
|
212325
|
-
|
|
212326
|
-
|
|
212327
|
-
|
|
212328
|
-
|
|
212329
|
-
|
|
212330
|
-
|
|
212331
|
-
|
|
212332
|
-
|
|
212333
|
-
|
|
212334
|
-
|
|
212335
|
-
|
|
212336
|
-
|
|
212337
|
-
|
|
212338
|
-
|
|
212339
|
-
|
|
212340
|
-
|
|
212341
|
-
|
|
212342
|
-
|
|
212343
|
-
|
|
212344
|
-
|
|
212345
|
-
|
|
212346
|
-
|
|
212437
|
+
${prompt}`),
|
|
212438
|
+
system: opts.system,
|
|
212439
|
+
disableHistory: true
|
|
212440
|
+
});
|
|
212441
|
+
const provider = yield* ProviderName;
|
|
212442
|
+
const model = yield* ModelName;
|
|
212443
|
+
maybeSend({
|
|
212444
|
+
agentId: opts.agentId,
|
|
212445
|
+
part: new SubagentStart({
|
|
212446
|
+
id,
|
|
212447
|
+
prompt,
|
|
212448
|
+
model,
|
|
212449
|
+
provider
|
|
212450
|
+
}),
|
|
212451
|
+
release: true
|
|
212452
|
+
});
|
|
212453
|
+
return yield* stream.pipe(runForEachArray((parts) => {
|
|
212454
|
+
for (const part of parts) switch (part._tag) {
|
|
212455
|
+
case "AgentStart": break;
|
|
212456
|
+
case "SubagentStart":
|
|
212457
|
+
case "SubagentComplete":
|
|
212458
|
+
case "SubagentPart":
|
|
212459
|
+
offerUnsafe(output, part);
|
|
212460
|
+
break;
|
|
212461
|
+
default:
|
|
212462
|
+
offerUnsafe(output, new SubagentPart({
|
|
212463
|
+
id,
|
|
212464
|
+
part
|
|
212465
|
+
}));
|
|
212466
|
+
break;
|
|
212467
|
+
}
|
|
212468
|
+
return void_$1;
|
|
212469
|
+
}), as$1(""), catchTag$1("AgentFinished", (finished) => {
|
|
212470
|
+
offerUnsafe(output, new SubagentComplete({
|
|
212471
|
+
id,
|
|
212472
|
+
summary: finished.summary
|
|
212473
|
+
}));
|
|
212474
|
+
return succeed$3(finished.summary);
|
|
212475
|
+
}), orDie$2);
|
|
212476
|
+
}, isSome(subagentModel) ? provideServices(subagentModel.value) : provideServices(services$5));
|
|
212347
212477
|
const executeScript = fnUntraced(function* (script) {
|
|
212348
212478
|
maybeSend({
|
|
212349
212479
|
agentId,
|
|
@@ -212351,48 +212481,51 @@ ${prompt}`));
|
|
|
212351
212481
|
release: true
|
|
212352
212482
|
});
|
|
212353
212483
|
const output = yield* pipe$1(executor.execute({
|
|
212354
|
-
|
|
212355
|
-
|
|
212356
|
-
|
|
212484
|
+
script,
|
|
212485
|
+
onSubagent: spawnSubagent,
|
|
212486
|
+
onTaskComplete: (summary) => sync(() => {
|
|
212487
|
+
finalSummary = some$2(summary);
|
|
212488
|
+
})
|
|
212489
|
+
}), mkString);
|
|
212357
212490
|
maybeSend({
|
|
212358
212491
|
agentId,
|
|
212359
212492
|
part: new ScriptOutput({ output })
|
|
212360
212493
|
});
|
|
212361
212494
|
return output;
|
|
212362
212495
|
});
|
|
212363
|
-
if (!modelConfig.systemPromptTransform) prompt
|
|
212496
|
+
if (!modelConfig.systemPromptTransform) update(prompt, setSystem(system));
|
|
212364
212497
|
let currentScript = "";
|
|
212365
212498
|
yield* gen(function* () {
|
|
212366
212499
|
while (true) {
|
|
212367
212500
|
if (!singleToolMode && currentScript.length > 0) {
|
|
212368
212501
|
const result = yield* executeScript(currentScript);
|
|
212369
|
-
prompt
|
|
212502
|
+
update(prompt, concat([{
|
|
212370
212503
|
role: modelConfig.supportsAssistantPrefill ? "assistant" : "user",
|
|
212371
212504
|
content: `Javascript output:\n\n${result}`
|
|
212372
|
-
}]);
|
|
212505
|
+
}]));
|
|
212373
212506
|
currentScript = "";
|
|
212374
212507
|
}
|
|
212375
|
-
if (
|
|
212376
|
-
yield* fail$4(output, new AgentFinished({ summary:
|
|
212508
|
+
if (isSome(finalSummary)) {
|
|
212509
|
+
yield* fail$4(output, new AgentFinished({ summary: finalSummary.value }));
|
|
212377
212510
|
return;
|
|
212378
212511
|
}
|
|
212379
212512
|
if (pendingMessages.size > 0) {
|
|
212380
|
-
prompt
|
|
212513
|
+
update(prompt, concat(Array$2.from(pendingMessages, ({ message, resume }) => {
|
|
212381
212514
|
resume(void_$1);
|
|
212382
212515
|
return {
|
|
212383
212516
|
role: "user",
|
|
212384
212517
|
content: message
|
|
212385
212518
|
};
|
|
212386
|
-
}));
|
|
212519
|
+
})));
|
|
212387
212520
|
pendingMessages.clear();
|
|
212388
212521
|
}
|
|
212389
212522
|
let response = empty$17();
|
|
212390
212523
|
let reasoningStarted = false;
|
|
212391
212524
|
let hadReasoningDelta = false;
|
|
212392
212525
|
yield* pipe$1(ai.streamText(singleToolMode ? {
|
|
212393
|
-
prompt,
|
|
212526
|
+
prompt: prompt.current,
|
|
212394
212527
|
toolkit: singleTool
|
|
212395
|
-
} : { prompt }), takeUntil((part) => {
|
|
212528
|
+
} : { prompt: prompt.current }), takeUntil((part) => {
|
|
212396
212529
|
if (!singleToolMode && part.type === "text-end" && currentScript.trim().length > 0) return true;
|
|
212397
212530
|
if ((part.type === "text-end" || part.type === "reasoning-end") && pendingMessages.size > 0) return true;
|
|
212398
212531
|
return false;
|
|
@@ -212483,10 +212616,10 @@ ${prompt}`));
|
|
|
212483
212616
|
response = [];
|
|
212484
212617
|
return err.isRetryable;
|
|
212485
212618
|
} }), modelConfig.systemPromptTransform ? (effect) => modelConfig.systemPromptTransform(system, effect) : identity);
|
|
212486
|
-
prompt
|
|
212619
|
+
update(prompt, concat(fromResponseParts(response)));
|
|
212487
212620
|
currentScript = currentScript.trim();
|
|
212488
212621
|
}
|
|
212489
|
-
}).pipe(
|
|
212622
|
+
}).pipe(provideService$2(ScriptExecutor, (script) => {
|
|
212490
212623
|
maybeSend({
|
|
212491
212624
|
agentId,
|
|
212492
212625
|
part: new ScriptStart()
|
|
@@ -212496,11 +212629,26 @@ ${prompt}`));
|
|
|
212496
212629
|
part: new ScriptDelta({ delta: script })
|
|
212497
212630
|
});
|
|
212498
212631
|
return executeScript(script);
|
|
212499
|
-
})
|
|
212632
|
+
}), catchCause$1((cause) => failCause$1(output, cause)), forkScoped);
|
|
212633
|
+
yield* offer(output, new AgentStart({
|
|
212634
|
+
id: opts.agentId,
|
|
212635
|
+
prompt: opts.prompt,
|
|
212636
|
+
provider: yield* ProviderName,
|
|
212637
|
+
model: yield* ModelName
|
|
212638
|
+
}));
|
|
212500
212639
|
return fromQueue(output);
|
|
212501
212640
|
}, unwrap);
|
|
212502
|
-
|
|
212503
|
-
|
|
212641
|
+
const sendLock = makeUnsafe$8(1);
|
|
212642
|
+
return Agent.of({
|
|
212643
|
+
[TypeId]: TypeId,
|
|
212644
|
+
send: (options) => spawn({
|
|
212645
|
+
agentId: agentCounter++,
|
|
212646
|
+
prompt: make$10(options.prompt),
|
|
212647
|
+
system: options.system
|
|
212648
|
+
}).pipe(broadcast({
|
|
212649
|
+
capacity: "unbounded",
|
|
212650
|
+
replay: 1
|
|
212651
|
+
}), sendLock.withPermit),
|
|
212504
212652
|
steer: (message) => callback$1((resume) => {
|
|
212505
212653
|
const entry = {
|
|
212506
212654
|
message,
|
|
@@ -212563,6 +212711,7 @@ You have the following functions available to you:
|
|
|
212563
212711
|
\`\`\`ts
|
|
212564
212712
|
${toolsDts}
|
|
212565
212713
|
|
|
212714
|
+
/** The global Fetch API available for making HTTP requests. */
|
|
212566
212715
|
declare const fetch: typeof globalThis.fetch
|
|
212567
212716
|
\`\`\``;
|
|
212568
212717
|
};
|
|
@@ -212578,6 +212727,7 @@ You have the following functions available to you:
|
|
|
212578
212727
|
\`\`\`ts
|
|
212579
212728
|
${toolsDts}
|
|
212580
212729
|
|
|
212730
|
+
// The global Fetch API available for making HTTP requests.
|
|
212581
212731
|
declare const fetch: typeof globalThis.fetch
|
|
212582
212732
|
\`\`\``;
|
|
212583
212733
|
};
|
|
@@ -212593,18 +212743,47 @@ const SingleToolHandlers = SingleTools.toLayer({ execute: fnUntraced(function* (
|
|
|
212593
212743
|
}) });
|
|
212594
212744
|
/**
|
|
212595
212745
|
* @since 1.0.0
|
|
212746
|
+
* @category Layers
|
|
212747
|
+
*/
|
|
212748
|
+
const layer$4 = effect$1(Agent, make$5);
|
|
212749
|
+
/**
|
|
212750
|
+
* Create an Agent layer that uses a local AgentExecutor.
|
|
212751
|
+
*
|
|
212752
|
+
* @since 1.0.0
|
|
212753
|
+
* @category Layers
|
|
212754
|
+
*/
|
|
212755
|
+
const layerLocal = (options) => layer$4.pipe(provide$3(layerLocal$1(options)));
|
|
212756
|
+
/**
|
|
212757
|
+
* @since 1.0.0
|
|
212758
|
+
* @category Subagent model
|
|
212759
|
+
*/
|
|
212760
|
+
var SubagentModel = class extends Service$1()("clanka/Agent/SubagentModel") {};
|
|
212761
|
+
/**
|
|
212762
|
+
* @since 1.0.0
|
|
212763
|
+
* @category Subagent model
|
|
212764
|
+
*/
|
|
212765
|
+
const layerSubagentModel = (layer) => effect$1(SubagentModel, build(layer));
|
|
212766
|
+
/**
|
|
212767
|
+
* @since 1.0.0
|
|
212596
212768
|
* @category System prompts
|
|
212597
212769
|
*/
|
|
212598
212770
|
var AgentModelConfig = class AgentModelConfig extends Reference("clanka/Agent/SystemPromptTransform", { defaultValue: () => ({}) }) {
|
|
212599
212771
|
static layer = (options) => succeed$4(AgentModelConfig, options);
|
|
212600
212772
|
};
|
|
212601
212773
|
/**
|
|
212602
|
-
* A layer that provides most of the common services needed to run an agent.
|
|
212603
|
-
*
|
|
212604
212774
|
* @since 1.0.0
|
|
212605
|
-
* @category
|
|
212775
|
+
* @category Output
|
|
212606
212776
|
*/
|
|
212607
|
-
|
|
212777
|
+
var AgentStart = class extends TaggedClass()("AgentStart", {
|
|
212778
|
+
id: Number$1,
|
|
212779
|
+
prompt: Prompt$1,
|
|
212780
|
+
provider: String$1,
|
|
212781
|
+
model: String$1
|
|
212782
|
+
}) {
|
|
212783
|
+
get modelAndProvider() {
|
|
212784
|
+
return `${this.provider}/${this.model}`;
|
|
212785
|
+
}
|
|
212786
|
+
};
|
|
212608
212787
|
/**
|
|
212609
212788
|
* @since 1.0.0
|
|
212610
212789
|
* @category Output
|
|
@@ -212644,11 +212823,6 @@ var ScriptOutput = class extends TaggedClass()("ScriptOutput", { output: String$
|
|
|
212644
212823
|
* @since 1.0.0
|
|
212645
212824
|
* @category Output
|
|
212646
212825
|
*/
|
|
212647
|
-
var AgentFinished = class extends TaggedErrorClass()("AgentFinished", { summary: String$1 }) {};
|
|
212648
|
-
/**
|
|
212649
|
-
* @since 1.0.0
|
|
212650
|
-
* @category Output
|
|
212651
|
-
*/
|
|
212652
212826
|
var SubagentStart = class extends TaggedClass()("SubagentStart", {
|
|
212653
212827
|
id: Number$1,
|
|
212654
212828
|
prompt: String$1,
|
|
@@ -212685,6 +212859,7 @@ var SubagentPart = class extends TaggedClass()("SubagentPart", {
|
|
|
212685
212859
|
part: ContentPart
|
|
212686
212860
|
}) {};
|
|
212687
212861
|
Union([
|
|
212862
|
+
AgentStart,
|
|
212688
212863
|
ReasoningStart,
|
|
212689
212864
|
ReasoningDelta,
|
|
212690
212865
|
ReasoningEnd,
|
|
@@ -212696,6 +212871,11 @@ Union([
|
|
|
212696
212871
|
SubagentComplete,
|
|
212697
212872
|
SubagentPart
|
|
212698
212873
|
]);
|
|
212874
|
+
/**
|
|
212875
|
+
* @since 1.0.0
|
|
212876
|
+
* @category Output
|
|
212877
|
+
*/
|
|
212878
|
+
var AgentFinished = class extends TaggedErrorClass()("AgentFinished", { summary: String$1 }) {};
|
|
212699
212879
|
//#endregion
|
|
212700
212880
|
//#region node_modules/.pnpm/effect@4.0.0-beta.31/node_modules/effect/dist/unstable/encoding/Sse.js
|
|
212701
212881
|
/**
|
|
@@ -223007,7 +223187,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
|
|
|
223007
223187
|
})));
|
|
223008
223188
|
});
|
|
223009
223189
|
//#endregion
|
|
223010
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
223190
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/CodexAuth.js
|
|
223011
223191
|
/**
|
|
223012
223192
|
* @since 1.0.0
|
|
223013
223193
|
*/
|
|
@@ -223227,7 +223407,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
|
|
|
223227
223407
|
static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
|
|
223228
223408
|
};
|
|
223229
223409
|
//#endregion
|
|
223230
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
223410
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/Codex.js
|
|
223231
223411
|
/**
|
|
223232
223412
|
* @since 1.0.0
|
|
223233
223413
|
*/
|
|
@@ -224542,7 +224722,7 @@ const getUsageDetailNumber = (details, field) => {
|
|
|
224542
224722
|
return typeof value === "number" ? value : void 0;
|
|
224543
224723
|
};
|
|
224544
224724
|
//#endregion
|
|
224545
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
224725
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/CopilotAuth.js
|
|
224546
224726
|
/**
|
|
224547
224727
|
* @since 1.0.0
|
|
224548
224728
|
*/
|
|
@@ -224733,7 +224913,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
|
|
|
224733
224913
|
static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
|
|
224734
224914
|
};
|
|
224735
224915
|
//#endregion
|
|
224736
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
224916
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/Copilot.js
|
|
224737
224917
|
/**
|
|
224738
224918
|
* @since 1.0.0
|
|
224739
224919
|
*/
|
|
@@ -225156,7 +225336,7 @@ Object.defineProperties(createChalk.prototype, styles);
|
|
|
225156
225336
|
const chalk = createChalk();
|
|
225157
225337
|
createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
225158
225338
|
//#endregion
|
|
225159
|
-
//#region node_modules/.pnpm/clanka@0.
|
|
225339
|
+
//#region node_modules/.pnpm/clanka@0.1.1_@effect+ai-openai-compat@4.0.0-beta.31_effect@4.0.0-beta.31__@effect+ai-op_ed38e05bd36269a4c69a0bceacc63201/node_modules/clanka/dist/OutputFormatter.js
|
|
225160
225340
|
/**
|
|
225161
225341
|
* @since 1.0.0
|
|
225162
225342
|
*/
|
|
@@ -225171,6 +225351,7 @@ const pretty = (stream) => stream.pipe(map$6((output) => {
|
|
|
225171
225351
|
output = output.part;
|
|
225172
225352
|
}
|
|
225173
225353
|
switch (output._tag) {
|
|
225354
|
+
case "AgentStart": return `${chalkAgentHeading(`${subagentIcon} Agent #${output.id} starting (${output.modelAndProvider})`)}\n\n${promptToString(output.prompt)}\n\n`;
|
|
225174
225355
|
case "SubagentStart": return `${chalkSubagentHeading(`${subagentIcon} Subagent #${output.id} starting (${output.modelAndProvider})`)}
|
|
225175
225356
|
|
|
225176
225357
|
${chalk.dim(output.prompt)}\n\n`;
|
|
@@ -225190,6 +225371,19 @@ ${output.summary}\n\n`;
|
|
|
225190
225371
|
}
|
|
225191
225372
|
}
|
|
225192
225373
|
}), catchTag("AgentFinished", (finished) => succeed$1(`\n${chalk.bold.green(`${doneIcon} Task complete:`)}\n\n${finished.summary}`)));
|
|
225374
|
+
const promptToString = (prompt) => {
|
|
225375
|
+
let textParts = [];
|
|
225376
|
+
for (const message of prompt.content) {
|
|
225377
|
+
if (message.role !== "user") continue;
|
|
225378
|
+
let content = message.content;
|
|
225379
|
+
for (const part of content) {
|
|
225380
|
+
if (part.type !== "text") continue;
|
|
225381
|
+
textParts.push(part.text);
|
|
225382
|
+
}
|
|
225383
|
+
}
|
|
225384
|
+
return textParts.join("\n");
|
|
225385
|
+
};
|
|
225386
|
+
const chalkAgentHeading = chalk.bold.green;
|
|
225193
225387
|
const chalkScriptHeading = chalk.bold.blue;
|
|
225194
225388
|
const chalkSubagentHeading = chalk.bold.magenta;
|
|
225195
225389
|
const chalkReasoningHeading = chalk.bold.yellow;
|
|
@@ -225641,7 +225835,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
225641
225835
|
});
|
|
225642
225836
|
})).pipe(provide$3([
|
|
225643
225837
|
Linear.layer,
|
|
225644
|
-
layer$
|
|
225838
|
+
layer$26,
|
|
225645
225839
|
Settings.layer
|
|
225646
225840
|
]));
|
|
225647
225841
|
var LinearError = class extends ErrorClass("lalph/LinearError")({
|
|
@@ -231932,7 +232126,7 @@ var TokenManager = class extends Service$1()("lalph/Github/TokenManager", { make
|
|
|
231932
232126
|
});
|
|
231933
232127
|
return { get };
|
|
231934
232128
|
}) }) {
|
|
231935
|
-
static layer = effect$1(this, this.make).pipe(provide$3([layerKvs, layer$
|
|
232129
|
+
static layer = effect$1(this, this.make).pipe(provide$3([layerKvs, layer$18]));
|
|
231936
232130
|
};
|
|
231937
232131
|
var AccessToken = class AccessToken extends Class$1("lalph/Github/AccessToken")({ token: String$1 }) {
|
|
231938
232132
|
static fromResponse(res) {
|
|
@@ -232479,7 +232673,7 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
232479
232673
|
})).pipe(provide$3([
|
|
232480
232674
|
Github.layer,
|
|
232481
232675
|
GithubCli.layer,
|
|
232482
|
-
layer$
|
|
232676
|
+
layer$26,
|
|
232483
232677
|
Settings.layer
|
|
232484
232678
|
]));
|
|
232485
232679
|
const selectedProjectFilter = new ProjectSetting("github.projectFilter", Option(Struct({
|
|
@@ -232749,8 +232943,9 @@ The following instructions should be done without interaction or asking for perm
|
|
|
232749
232943
|
- Only start tasks that are in a "todo" state.
|
|
232750
232944
|
- You **cannot** start tasks unless they have an empty \`blockedBy\` field.${options.gitFlow.requiresGithubPr ? `
|
|
232751
232945
|
- Check if there is an open Github PR for the chosen task. If there is, note the PR number for inclusion in the task.json file.
|
|
232752
|
-
|
|
232753
|
-
|
|
232946
|
+
- If the task mentions a pull request, then use that instead
|
|
232947
|
+
- Only include "open" PRs that are not yet merged.
|
|
232948
|
+
- The pull request will contain the task id in the title or description.` : ""}
|
|
232754
232949
|
- Once you have chosen a task, save its information in a "task.json" file alongside
|
|
232755
232950
|
the prd.yml file. Use the following format:
|
|
232756
232951
|
|
|
@@ -232772,13 +232967,11 @@ Set \`githubPrNumber\` to the PR number if one exists, otherwise use \`null\`.
|
|
|
232772
232967
|
be the task YOU decide as the most important to work on next, not just the
|
|
232773
232968
|
first task in the list.${options.gitFlow.requiresGithubPr ? `
|
|
232774
232969
|
- Check if there is an open Github PR for the chosen task. If there is, note the PR number for inclusion when calling "chooseTask".
|
|
232775
|
-
|
|
232776
|
-
|
|
232970
|
+
- If the task mentions a pull request, then use that instead
|
|
232971
|
+
- Only include "open" PRs that are not yet merged.
|
|
232972
|
+
- The pull request will contain the task id in the title or description.` : ""}
|
|
232777
232973
|
- Use the "chooseTask" function to select the task you have chosen.
|
|
232778
|
-
|
|
232779
|
-
|
|
232780
|
-
Set \`githubPrNumber\` to the PR number if one exists, otherwise use \`null\`.
|
|
232781
|
-
` : "\n\nLeave `githubPrNumber` as null."}
|
|
232974
|
+
${options.gitFlow.requiresGithubPr ? `\n - Set \`githubPrNumber\` to the PR number if one exists, otherwise use \`null\`.` : "\n Leave `githubPrNumber` as null."}
|
|
232782
232975
|
`;
|
|
232783
232976
|
const keyInformation = (options) => `## Important: Adding new tasks
|
|
232784
232977
|
|
|
@@ -233535,15 +233728,15 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
|
|
|
233535
233728
|
static layerNoWorktree = effect$1(this, this.make);
|
|
233536
233729
|
static layer = this.layerNoWorktree.pipe(provideMerge(Worktree.layer));
|
|
233537
233730
|
static layerProvided = this.layer.pipe(provide$3([
|
|
233538
|
-
layer$
|
|
233539
|
-
layer$
|
|
233731
|
+
layer$8,
|
|
233732
|
+
layer$26,
|
|
233540
233733
|
CurrentIssueSource.layer,
|
|
233541
233734
|
Settings.layer
|
|
233542
233735
|
]));
|
|
233543
233736
|
static layerLocal = this.layerNoWorktree.pipe(provideMerge(Worktree.layerLocal));
|
|
233544
233737
|
static layerLocalProvided = this.layerLocal.pipe(provide$3([
|
|
233545
|
-
layer$
|
|
233546
|
-
layer$
|
|
233738
|
+
layer$8,
|
|
233739
|
+
layer$26,
|
|
233547
233740
|
CurrentIssueSource.layer
|
|
233548
233741
|
]));
|
|
233549
233742
|
};
|
|
@@ -233670,19 +233863,22 @@ const ClankaMuxerLayer = effectDiscard(gen(function* () {
|
|
|
233670
233863
|
const runClanka = fnUntraced(function* (options) {
|
|
233671
233864
|
const models = yield* ClankaModels;
|
|
233672
233865
|
const muxer = yield* Muxer;
|
|
233673
|
-
const agent = yield*
|
|
233674
|
-
|
|
233675
|
-
|
|
233676
|
-
|
|
233677
|
-
})
|
|
233678
|
-
yield* muxer.add(
|
|
233679
|
-
let stream = options.stallTimeout ? withStallTimeout(options.stallTimeout)(
|
|
233866
|
+
const agent = yield* Agent;
|
|
233867
|
+
const output = yield* pipe$1(agent.send({
|
|
233868
|
+
prompt: options.prompt,
|
|
233869
|
+
system: options.system
|
|
233870
|
+
}), provide$1([models.get(options.model), layerSubagentModel(clankaSubagent(models, options.model))]));
|
|
233871
|
+
yield* muxer.add(output);
|
|
233872
|
+
let stream = options.stallTimeout ? withStallTimeout(options.stallTimeout)(output) : output;
|
|
233680
233873
|
if (options.steer) yield* options.steer.pipe(switchMap(fnUntraced(function* (message) {
|
|
233681
233874
|
yield* log$1(`Received steer message: ${message}`);
|
|
233682
233875
|
yield* agent.steer(message);
|
|
233683
233876
|
}, fromEffectDrain)), runDrain, forkScoped);
|
|
233684
233877
|
yield* stream.pipe(runDrain, catchTag$1("AgentFinished", () => void_$1));
|
|
233685
|
-
}, scoped$1, provide$1(
|
|
233878
|
+
}, scoped$1, (effect, options) => provide$1(effect, layerLocal({
|
|
233879
|
+
directory: options.directory,
|
|
233880
|
+
tools: options.withChoose ? TaskChooseTools : TaskTools
|
|
233881
|
+
}), { local: true }), provide$1([layerUndici, TaskToolsHandlers]));
|
|
233686
233882
|
//#endregion
|
|
233687
233883
|
//#region src/Agents/worker.ts
|
|
233688
233884
|
const agentWorker = fnUntraced(function* (options) {
|
|
@@ -233722,7 +233918,7 @@ const GitFlowPR = succeed$4(GitFlow, GitFlow.of({
|
|
|
233722
233918
|
requiresGithubPr: true,
|
|
233723
233919
|
branch: void 0,
|
|
233724
233920
|
setupInstructions: ({ githubPrNumber }) => githubPrNumber ? `The Github PR #${githubPrNumber} has been detected for this task and the branch has been checked out.
|
|
233725
|
-
-
|
|
233921
|
+
- **REVIEW FEEDBACK** in the .lalph/feedback.md file.` : `Create a new branch for the task using the format \`{task id}/description\`, using the current HEAD as the base (don't checkout any other branches first).`,
|
|
233726
233922
|
commitInstructions: (options) => `${!options.githubPrNumber ? `Create a pull request for this task. If the target branch does not exist, create it first.` : "Commit and push your changes to the pull request."}
|
|
233727
233923
|
${options.githubPrInstructions}
|
|
233728
233924
|
The PR description should include a summary of the changes made.${options.targetBranch ? `\n - The target branch for the PR should be \`${options.targetBranch}\`.` : ""}
|
|
@@ -233804,7 +234000,7 @@ But you **do not** need to git push your changes or switch branches.
|
|
|
233804
234000
|
});
|
|
233805
234001
|
})
|
|
233806
234002
|
});
|
|
233807
|
-
})).pipe(provide$3(layer$
|
|
234003
|
+
})).pipe(provide$3(layer$8));
|
|
233808
234004
|
var GitFlowError = class extends TaggedError("GitFlowError") {};
|
|
233809
234005
|
//#endregion
|
|
233810
234006
|
//#region src/Agents/chooser.ts
|
|
@@ -234127,8 +234323,8 @@ const commandRoot = make$46("lalph", {
|
|
|
234127
234323
|
GithubCli.layer,
|
|
234128
234324
|
Settings.layer,
|
|
234129
234325
|
CurrentIssueSource.layer,
|
|
234130
|
-
layer$
|
|
234131
|
-
layer$
|
|
234326
|
+
layer$8,
|
|
234327
|
+
layer$26
|
|
234132
234328
|
]))));
|
|
234133
234329
|
const watchTaskState = fnUntraced(function* (options) {
|
|
234134
234330
|
const registry = yield* AtomRegistry;
|
|
@@ -234431,7 +234627,7 @@ const commandEdit = make$46("edit").pipe(withDescription("Open the selected proj
|
|
|
234431
234627
|
const commandSource = make$46("source").pipe(withDescription("Select the issue source to use (e.g. GitHub Issues or Linear). This applies to all projects."), withHandler(() => selectIssueSource), provide(Settings.layer));
|
|
234432
234628
|
//#endregion
|
|
234433
234629
|
//#region package.json
|
|
234434
|
-
var version = "0.3.
|
|
234630
|
+
var version = "0.3.54";
|
|
234435
234631
|
//#endregion
|
|
234436
234632
|
//#region src/commands/projects/ls.ts
|
|
234437
234633
|
const commandProjectsLs = make$46("ls").pipe(withDescription("List configured projects and how they run (enabled state, concurrency, branch, git flow, review agent)."), withHandler(fnUntraced(function* () {
|