liminal 0.5.17 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/Context.ts +11 -47
- package/L.ts +4 -0
- package/LEvent.ts +20 -53
- package/_emit.ts +16 -0
- package/assistant.ts +53 -0
- package/dist/Context.d.ts +15 -30
- package/dist/Context.js +9 -22
- package/dist/Context.js.map +1 -1
- package/dist/L.d.ts +4 -0
- package/dist/L.js +5 -0
- package/dist/L.js.map +1 -0
- package/dist/LEvent.d.ts +29 -62
- package/dist/LEvent.js +14 -46
- package/dist/LEvent.js.map +1 -1
- package/dist/_emit.d.ts +2 -0
- package/dist/_emit.js +16 -0
- package/dist/_emit.js.map +1 -0
- package/dist/assistant.d.ts +8 -0
- package/dist/assistant.js +46 -0
- package/dist/assistant.js.map +1 -0
- package/dist/index.d.ts +2 -13
- package/dist/index.js +2 -13
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +4 -0
- package/dist/messages.js +4 -0
- package/dist/messages.js.map +1 -0
- package/dist/set.d.ts +4 -0
- package/dist/set.js +9 -0
- package/dist/set.js.map +1 -0
- package/dist/strand.d.ts +16 -0
- package/dist/strand.js +16 -0
- package/dist/strand.js.map +1 -0
- package/dist/todo.test.js +3 -0
- package/dist/todo.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/user.d.ts +6 -0
- package/dist/user.js +18 -0
- package/dist/user.js.map +1 -0
- package/dist/util/JSONValue.d.ts +0 -3
- package/dist/util/JSONValue.js +1 -31
- package/dist/util/JSONValue.js.map +1 -1
- package/index.ts +2 -13
- package/messages.ts +5 -0
- package/package.json +4 -3
- package/set.ts +10 -0
- package/strand.ts +38 -0
- package/todo.test.ts +3 -0
- package/user.ts +24 -0
- package/util/JSONValue.ts +0 -30
- package/Adapter.ts +0 -27
- package/AdapterRegistry.ts +0 -78
- package/Config.ts +0 -13
- package/Definition.ts +0 -48
- package/EventBase.ts +0 -23
- package/Handler.ts +0 -4
- package/L/L.ts +0 -24
- package/L/all.ts +0 -39
- package/L/assistant.ts +0 -28
- package/L/catch.ts +0 -38
- package/L/continuation.ts +0 -14
- package/L/emit.ts +0 -16
- package/L/focus.ts +0 -17
- package/L/infer.ts +0 -34
- package/L/message.ts +0 -16
- package/L/reflect.ts +0 -13
- package/L/run.ts +0 -29
- package/L/schema/_schema_common.ts +0 -30
- package/L/schema/anyOf.ts +0 -10
- package/L/schema/array.ts +0 -13
- package/L/schema/boolean.ts +0 -8
- package/L/schema/const.ts +0 -18
- package/L/schema/enum.ts +0 -18
- package/L/schema/integer.ts +0 -6
- package/L/schema/null.ts +0 -8
- package/L/schema/number.ts +0 -8
- package/L/schema/object.ts +0 -21
- package/L/schema/string.ts +0 -11
- package/L/strand.ts +0 -22
- package/L/stream.ts +0 -16
- package/L/system.ts +0 -19
- package/L/user.ts +0 -19
- package/LiminalAssertionError.ts +0 -19
- package/Message.ts +0 -16
- package/Rune.test.ts +0 -5
- package/Rune.ts +0 -60
- package/Schema.ts +0 -185
- package/Strand.ts +0 -284
- package/Tool.ts +0 -26
- package/TypeAdapter.ts +0 -3
- package/dist/Adapter.d.ts +0 -18
- package/dist/Adapter.js +0 -13
- package/dist/Adapter.js.map +0 -1
- package/dist/AdapterRegistry.d.ts +0 -27
- package/dist/AdapterRegistry.js +0 -62
- package/dist/AdapterRegistry.js.map +0 -1
- package/dist/Config.d.ts +0 -12
- package/dist/Config.js +0 -2
- package/dist/Config.js.map +0 -1
- package/dist/Definition.d.ts +0 -24
- package/dist/Definition.js +0 -29
- package/dist/Definition.js.map +0 -1
- package/dist/EventBase.d.ts +0 -11
- package/dist/EventBase.js +0 -16
- package/dist/EventBase.js.map +0 -1
- package/dist/Handler.d.ts +0 -3
- package/dist/Handler.js +0 -2
- package/dist/Handler.js.map +0 -1
- package/dist/L/L.d.ts +0 -24
- package/dist/L/L.js +0 -25
- package/dist/L/L.js.map +0 -1
- package/dist/L/all.d.ts +0 -14
- package/dist/L/all.js +0 -20
- package/dist/L/all.js.map +0 -1
- package/dist/L/assistant.d.ts +0 -11
- package/dist/L/assistant.js +0 -15
- package/dist/L/assistant.js.map +0 -1
- package/dist/L/catch.d.ts +0 -16
- package/dist/L/catch.js +0 -25
- package/dist/L/catch.js.map +0 -1
- package/dist/L/continuation.d.ts +0 -4
- package/dist/L/continuation.js +0 -13
- package/dist/L/continuation.js.map +0 -1
- package/dist/L/emit.d.ts +0 -7
- package/dist/L/emit.js +0 -15
- package/dist/L/emit.js.map +0 -1
- package/dist/L/focus.d.ts +0 -8
- package/dist/L/focus.js +0 -14
- package/dist/L/focus.js.map +0 -1
- package/dist/L/infer.d.ts +0 -8
- package/dist/L/infer.js +0 -30
- package/dist/L/infer.js.map +0 -1
- package/dist/L/message.d.ts +0 -8
- package/dist/L/message.js +0 -14
- package/dist/L/message.js.map +0 -1
- package/dist/L/reflect.d.ts +0 -5
- package/dist/L/reflect.js +0 -11
- package/dist/L/reflect.js.map +0 -1
- package/dist/L/run.d.ts +0 -14
- package/dist/L/run.js +0 -16
- package/dist/L/run.js.map +0 -1
- package/dist/L/schema/_schema_common.d.ts +0 -6
- package/dist/L/schema/_schema_common.js +0 -20
- package/dist/L/schema/_schema_common.js.map +0 -1
- package/dist/L/schema/anyOf.d.ts +0 -5
- package/dist/L/schema/anyOf.js +0 -5
- package/dist/L/schema/anyOf.js.map +0 -1
- package/dist/L/schema/array.d.ts +0 -5
- package/dist/L/schema/array.js +0 -8
- package/dist/L/schema/array.js.map +0 -1
- package/dist/L/schema/boolean.d.ts +0 -6
- package/dist/L/schema/boolean.js +0 -4
- package/dist/L/schema/boolean.js.map +0 -1
- package/dist/L/schema/const.d.ts +0 -8
- package/dist/L/schema/const.js +0 -10
- package/dist/L/schema/const.js.map +0 -1
- package/dist/L/schema/enum.d.ts +0 -8
- package/dist/L/schema/enum.js +0 -10
- package/dist/L/schema/enum.js.map +0 -1
- package/dist/L/schema/integer.d.ts +0 -5
- package/dist/L/schema/integer.js +0 -3
- package/dist/L/schema/integer.js.map +0 -1
- package/dist/L/schema/null.d.ts +0 -6
- package/dist/L/schema/null.js +0 -4
- package/dist/L/schema/null.js.map +0 -1
- package/dist/L/schema/number.d.ts +0 -6
- package/dist/L/schema/number.js +0 -4
- package/dist/L/schema/number.js.map +0 -1
- package/dist/L/schema/object.d.ts +0 -9
- package/dist/L/schema/object.js +0 -12
- package/dist/L/schema/object.js.map +0 -1
- package/dist/L/schema/string.d.ts +0 -8
- package/dist/L/schema/string.js +0 -4
- package/dist/L/schema/string.js.map +0 -1
- package/dist/L/strand.d.ts +0 -9
- package/dist/L/strand.js +0 -16
- package/dist/L/strand.js.map +0 -1
- package/dist/L/stream.d.ts +0 -4
- package/dist/L/stream.js +0 -15
- package/dist/L/stream.js.map +0 -1
- package/dist/L/system.d.ts +0 -4
- package/dist/L/system.js +0 -9
- package/dist/L/system.js.map +0 -1
- package/dist/L/user.d.ts +0 -4
- package/dist/L/user.js +0 -9
- package/dist/L/user.js.map +0 -1
- package/dist/LiminalAssertionError.d.ts +0 -8
- package/dist/LiminalAssertionError.js +0 -20
- package/dist/LiminalAssertionError.js.map +0 -1
- package/dist/Message.d.ts +0 -14
- package/dist/Message.js +0 -2
- package/dist/Message.js.map +0 -1
- package/dist/Rune.d.ts +0 -46
- package/dist/Rune.js +0 -11
- package/dist/Rune.js.map +0 -1
- package/dist/Rune.test.js +0 -5
- package/dist/Rune.test.js.map +0 -1
- package/dist/Schema.d.ts +0 -46
- package/dist/Schema.js +0 -130
- package/dist/Schema.js.map +0 -1
- package/dist/Strand.d.ts +0 -81
- package/dist/Strand.js +0 -200
- package/dist/Strand.js.map +0 -1
- package/dist/Tool.d.ts +0 -10
- package/dist/Tool.js +0 -19
- package/dist/Tool.js.map +0 -1
- package/dist/TypeAdapter.d.ts +0 -1
- package/dist/TypeAdapter.js +0 -3
- package/dist/TypeAdapter.js.map +0 -1
- package/dist/errors.d.ts +0 -9
- package/dist/errors.js +0 -11
- package/dist/errors.js.map +0 -1
- package/dist/util/EnsureNarrow.d.ts +0 -1
- package/dist/util/EnsureNarrow.js +0 -2
- package/dist/util/EnsureNarrow.js.map +0 -1
- package/dist/util/attachCustomInspect.d.ts +0 -1
- package/dist/util/attachCustomInspect.js +0 -11
- package/dist/util/attachCustomInspect.js.map +0 -1
- package/errors.ts +0 -12
- package/util/EnsureNarrow.ts +0 -1
- package/util/attachCustomInspect.ts +0 -14
- /package/dist/{Rune.test.d.ts → todo.test.d.ts} +0 -0
package/dist/L/all.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"all.js","sourceRoot":"","sources":["../../L/all.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAG7C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AActC,MAAM,SAAS,CAAC,CAAC,GAAG,CAClB,WAAc,EACd,OAAiB;IAEjB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,OAAO,CAAA;IAC7B,MAAM,OAAO,GAAkB,EAAE,CAAA;IACjC,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/F,OAAO,CAAC,IAAI,CACV,IAAI,MAAM,CAAC,UAAU,EAAE;YACrB,MAAM;YACN,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;SACpD,CAAC,CACH,CAAA;IACH,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IACtE,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAA;IAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACjC,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;AAC1E,CAAC"}
|
package/dist/L/assistant.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { LEvent } from "../LEvent.ts";
|
|
2
|
-
import type { Rune } from "../Rune.ts";
|
|
3
|
-
import { Schema } from "../Schema.ts";
|
|
4
|
-
/**
|
|
5
|
-
* Produces an assistant message when yielded. Can be called with a schema
|
|
6
|
-
* for structured output. Otherwise produces a string.
|
|
7
|
-
*/
|
|
8
|
-
export interface assistant extends Iterable<Rune<LEvent>, string> {
|
|
9
|
-
<T>(schema: Schema<T>): Generator<Rune<LEvent>, T>;
|
|
10
|
-
}
|
|
11
|
-
export declare const assistant: assistant;
|
package/dist/L/assistant.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Schema } from "../Schema.js";
|
|
2
|
-
import { infer } from "./infer.js";
|
|
3
|
-
import { message } from "./message.js";
|
|
4
|
-
export const assistant = Object.assign(function* assistant(schema) {
|
|
5
|
-
const inference = yield* infer(schema);
|
|
6
|
-
yield* message("assistant", [{ part: inference }]);
|
|
7
|
-
return JSON.parse(inference);
|
|
8
|
-
}, {
|
|
9
|
-
*[Symbol.iterator]() {
|
|
10
|
-
const inference = yield* infer();
|
|
11
|
-
yield* message("assistant", [{ part: inference }]);
|
|
12
|
-
return inference;
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=assistant.js.map
|
package/dist/L/assistant.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assistant.js","sourceRoot":"","sources":["../../L/assistant.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAUtC,MAAM,CAAC,MAAM,SAAS,GAAc,MAAM,CAAC,MAAM,CAC/C,QAAQ,CAAC,CAAC,SAAS,CAAI,MAAiB;IACtC,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACtC,KAAK,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;IAClD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;AAC9B,CAAC,EACD;IACE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAChB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,KAAK,EAAE,CAAA;QAChC,KAAK,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;QAClD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF,CACF,CAAA"}
|
package/dist/L/catch.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Definition } from "../Definition.ts";
|
|
2
|
-
import type { LEvent } from "../LEvent.ts";
|
|
3
|
-
import type { Rune } from "../Rune.ts";
|
|
4
|
-
export { catch_ as catch };
|
|
5
|
-
/**
|
|
6
|
-
* Error handling utility that catches exceptions from running a definition.
|
|
7
|
-
* Returns a result object indicating whether the operation succeeded or failed.
|
|
8
|
-
*/
|
|
9
|
-
declare function catch_<Y extends Rune<any>, T>(definition: Definition<Y, T>): Generator<Rune<LEvent> | Rune<Y>, CatchResult<T>>;
|
|
10
|
-
export type CatchResult<T> = {
|
|
11
|
-
resolved: T;
|
|
12
|
-
rejected?: never;
|
|
13
|
-
} | {
|
|
14
|
-
resolved?: never;
|
|
15
|
-
rejected: unknown;
|
|
16
|
-
};
|
package/dist/L/catch.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Strand } from "../Strand.js";
|
|
2
|
-
import { continuation } from "./continuation.js";
|
|
3
|
-
import { reflect } from "./reflect.js";
|
|
4
|
-
export { catch_ as catch };
|
|
5
|
-
/**
|
|
6
|
-
* Error handling utility that catches exceptions from running a definition.
|
|
7
|
-
* Returns a result object indicating whether the operation succeeded or failed.
|
|
8
|
-
*/
|
|
9
|
-
function* catch_(definition) {
|
|
10
|
-
const parent = yield* reflect;
|
|
11
|
-
return yield* continuation("catch", async () => {
|
|
12
|
-
try {
|
|
13
|
-
const resolved = await new Strand(definition, {
|
|
14
|
-
parent,
|
|
15
|
-
context: parent.context.clone(),
|
|
16
|
-
}).then();
|
|
17
|
-
return { resolved };
|
|
18
|
-
}
|
|
19
|
-
catch (exception) {
|
|
20
|
-
return { rejected: exception };
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
Object.defineProperty(catch_, "name", { value: "catch" });
|
|
25
|
-
//# sourceMappingURL=catch.js.map
|
package/dist/L/catch.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catch.js","sourceRoot":"","sources":["../../L/catch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,CAAA;AAE1B;;;GAGG;AACH,QAAQ,CAAC,CAAC,MAAM,CACd,UAA4B;IAE5B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,OAAO,CAAA;IAC7B,OAAO,KAAK,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;QAC7C,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,MAAM,CAAC,UAAU,EAAE;gBAC5C,MAAM;gBACN,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;aAChC,CAAC,CAAC,IAAI,EAAE,CAAA;YACT,OAAO,EAAE,QAAQ,EAAE,CAAA;QACrB,CAAC;QAAC,OAAO,SAAkB,EAAE,CAAC;YAC5B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;QAChC,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AACD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA"}
|
package/dist/L/continuation.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { LEvent } from "../LEvent.ts";
|
|
2
|
-
import { Rune } from "../Rune.ts";
|
|
3
|
-
/** Yields a continuation rune that executes a function and passes its result to the next iteration. */
|
|
4
|
-
export declare function continuation<R>(debug: string, f: () => R): Generator<Rune<LEvent>, Awaited<R>>;
|
package/dist/L/continuation.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Rune, RuneKey } from "../Rune.js";
|
|
2
|
-
/** Yields a continuation rune that executes a function and passes its result to the next iteration. */
|
|
3
|
-
export function* continuation(debug, f) {
|
|
4
|
-
return yield {
|
|
5
|
-
[RuneKey]: true,
|
|
6
|
-
instruction: {
|
|
7
|
-
kind: "continue",
|
|
8
|
-
debug,
|
|
9
|
-
f,
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=continuation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"continuation.js","sourceRoot":"","sources":["../../L/continuation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAE1C,uGAAuG;AACvG,MAAM,SAAS,CAAC,CAAC,YAAY,CAAI,KAAa,EAAE,CAAU;IACxD,OAAO,MAAM;QACX,CAAC,OAAO,CAAC,EAAE,IAAI;QACf,WAAW,EAAE;YACX,IAAI,EAAE,UAAU;YAChB,KAAK;YACL,CAAC;SACF;KACF,CAAA;AACH,CAAC"}
|
package/dist/L/emit.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Rune } from "../Rune.ts";
|
|
2
|
-
import type { EnsureNarrow } from "../util/EnsureNarrow.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Emits an event to be supplied to handlers.
|
|
5
|
-
* Used for broadcasting state changes and triggering side effects.
|
|
6
|
-
*/
|
|
7
|
-
export declare function emit<E>(event: EnsureNarrow<E>): Generator<Rune<E>, void>;
|
package/dist/L/emit.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Rune, RuneKey } from "../Rune.js";
|
|
2
|
-
/**
|
|
3
|
-
* Emits an event to be supplied to handlers.
|
|
4
|
-
* Used for broadcasting state changes and triggering side effects.
|
|
5
|
-
*/
|
|
6
|
-
export function* emit(event) {
|
|
7
|
-
return yield {
|
|
8
|
-
[RuneKey]: true,
|
|
9
|
-
instruction: {
|
|
10
|
-
kind: "emit",
|
|
11
|
-
event,
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=emit.js.map
|
package/dist/L/emit.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emit.js","sourceRoot":"","sources":["../../L/emit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAG1C;;;GAGG;AACH,MAAM,SAAS,CAAC,CAAC,IAAI,CAAI,KAAsB;IAC7C,OAAO,MAAM;QACX,CAAC,OAAO,CAAC,EAAE,IAAI;QACf,WAAW,EAAE;YACX,IAAI,EAAE,MAAM;YACZ,KAAK;SACN;KACF,CAAA;AACH,CAAC"}
|
package/dist/L/focus.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Adapter } from "../Adapter.ts";
|
|
2
|
-
import type { LEvent } from "../LEvent.ts";
|
|
3
|
-
import type { Rune } from "../Rune.ts";
|
|
4
|
-
/**
|
|
5
|
-
* Registers a model in the current context and emits a model registration event.
|
|
6
|
-
* Returns the registered model instance.
|
|
7
|
-
*/
|
|
8
|
-
export declare function focus(adapter: Adapter): Generator<Rune<LEvent>, Adapter>;
|
package/dist/L/focus.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AdapterFocused } from "../LEvent.js";
|
|
2
|
-
import { emit } from "./emit.js";
|
|
3
|
-
import { reflect } from "./reflect.js";
|
|
4
|
-
/**
|
|
5
|
-
* Registers a model in the current context and emits a model registration event.
|
|
6
|
-
* Returns the registered model instance.
|
|
7
|
-
*/
|
|
8
|
-
export function* focus(adapter) {
|
|
9
|
-
const { context: { adapters } } = yield* reflect;
|
|
10
|
-
adapters.register(adapter);
|
|
11
|
-
yield* emit(new AdapterFocused(adapter));
|
|
12
|
-
return adapter;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=focus.js.map
|
package/dist/L/focus.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focus.js","sourceRoot":"","sources":["../../L/focus.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;GAGG;AACH,MAAM,SAAS,CAAC,CAAC,KAAK,CAAC,OAAgB;IACrC,MAAM,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAA;IAChD,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC1B,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;IACxC,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/dist/L/infer.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type LEvent } from "../LEvent.ts";
|
|
2
|
-
import type { Rune } from "../Rune.ts";
|
|
3
|
-
import { Schema } from "../Schema.ts";
|
|
4
|
-
/**
|
|
5
|
-
* Requests an inference from the current model, optionally with a schema.
|
|
6
|
-
* Emits inference-related events and returns the model's response as a string.
|
|
7
|
-
*/
|
|
8
|
-
export declare function infer(schema?: Schema): Generator<Rune<LEvent>, string>;
|
package/dist/L/infer.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { InferenceRequested, Inferred } from "../LEvent.js";
|
|
2
|
-
import { Schema } from "../Schema.js";
|
|
3
|
-
import { continuation } from "./continuation.js";
|
|
4
|
-
import { emit } from "./emit.js";
|
|
5
|
-
import { reflect } from "./reflect.js";
|
|
6
|
-
/**
|
|
7
|
-
* Requests an inference from the current model, optionally with a schema.
|
|
8
|
-
* Emits inference-related events and returns the model's response as a string.
|
|
9
|
-
*/
|
|
10
|
-
export function* infer(schema) {
|
|
11
|
-
const { context: { adapters: models, messages }, signal } = yield* reflect;
|
|
12
|
-
const model = models.ensure();
|
|
13
|
-
const requestId = crypto.randomUUID();
|
|
14
|
-
yield* emit(new InferenceRequested(requestId, schema));
|
|
15
|
-
let inference = yield* continuation("infer", model
|
|
16
|
-
.seal({
|
|
17
|
-
messages,
|
|
18
|
-
...schema && {
|
|
19
|
-
schema: schema.type === "object" ? schema : Schema.wrap(schema),
|
|
20
|
-
},
|
|
21
|
-
signal,
|
|
22
|
-
})
|
|
23
|
-
.resolve);
|
|
24
|
-
if (schema?.type && schema.type !== "object") {
|
|
25
|
-
inference = JSON.stringify(JSON.parse(inference).value);
|
|
26
|
-
}
|
|
27
|
-
yield* emit(new Inferred(requestId, inference));
|
|
28
|
-
return inference;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=infer.js.map
|
package/dist/L/infer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"infer.js","sourceRoot":"","sources":["../../L/infer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAe,MAAM,cAAc,CAAA;AAExE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;GAGG;AACH,MAAM,SAAS,CAAC,CAAC,KAAK,CAAC,MAAe;IACpC,MAAM,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAA;IAC1E,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,CAAA;IAC7B,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,EAAE,CAAA;IACrC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAA;IACtD,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC,YAAY,CACjC,OAAO,EACP,KAAK;SACF,IAAI,CAAC;QACJ,QAAQ;QACR,GAAG,MAAM,IAAI;YACX,MAAM,EAAE,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;SAChE;QACD,MAAM;KACP,CAAC;SACD,OAAO,CACX,CAAA;IACD,IAAI,MAAM,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7C,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAA;IACzD,CAAC;IACD,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAA;IAC/C,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
package/dist/L/message.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LEvent } from "../LEvent.ts";
|
|
2
|
-
import type { Content, MessageRole } from "../Message.ts";
|
|
3
|
-
import type { Rune } from "../Rune.ts";
|
|
4
|
-
/**
|
|
5
|
-
* Adds a new message to the current context's message list.
|
|
6
|
-
* Emits a message append event to observers.
|
|
7
|
-
*/
|
|
8
|
-
export declare function message(role: MessageRole, content: Array<Content>): Generator<Rune<LEvent>, void>;
|
package/dist/L/message.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LEvent, MessageAppended } from "../LEvent.js";
|
|
2
|
-
import { emit } from "./emit.js";
|
|
3
|
-
import { reflect } from "./reflect.js";
|
|
4
|
-
/**
|
|
5
|
-
* Adds a new message to the current context's message list.
|
|
6
|
-
* Emits a message append event to observers.
|
|
7
|
-
*/
|
|
8
|
-
export function* message(role, content) {
|
|
9
|
-
const { context: { messages } } = yield* reflect;
|
|
10
|
-
const message = { role, parts: content };
|
|
11
|
-
yield* emit(new MessageAppended(message));
|
|
12
|
-
messages.push(message);
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=message.js.map
|
package/dist/L/message.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../L/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAGtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;GAGG;AACH,MAAM,SAAS,CAAC,CAAC,OAAO,CAAC,IAAiB,EAAE,OAAuB;IACjE,MAAM,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAA;IAChD,MAAM,OAAO,GAAY,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;IACjD,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,CAAA;IACzC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/L/reflect.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { LEvent } from "../LEvent.ts";
|
|
2
|
-
import { Rune } from "../Rune.ts";
|
|
3
|
-
import type { Strand } from "../Strand.ts";
|
|
4
|
-
/** Returns the current strand instance, providing access to context and parent information. */
|
|
5
|
-
export declare const reflect: Iterable<Rune<LEvent>, Strand>;
|
package/dist/L/reflect.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Rune, RuneKey } from "../Rune.js";
|
|
2
|
-
/** Returns the current strand instance, providing access to context and parent information. */
|
|
3
|
-
export const reflect = {
|
|
4
|
-
*[Symbol.iterator]() {
|
|
5
|
-
return yield {
|
|
6
|
-
[RuneKey]: true,
|
|
7
|
-
instruction: { kind: "reflect" },
|
|
8
|
-
};
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=reflect.js.map
|
package/dist/L/reflect.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reflect.js","sourceRoot":"","sources":["../../L/reflect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAG1C,+FAA+F;AAC/F,MAAM,CAAC,MAAM,OAAO,GAAmC;IACrD,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAChB,OAAO,MAAM;YACX,CAAC,OAAO,CAAC,EAAE,IAAI;YACf,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SACjC,CAAA;IACH,CAAC;CACF,CAAA"}
|
package/dist/L/run.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Definition } from "../Definition.ts";
|
|
2
|
-
import type { Handler } from "../Handler.ts";
|
|
3
|
-
import type { Message } from "../Message.ts";
|
|
4
|
-
import type { Rune } from "../Rune.ts";
|
|
5
|
-
import { Strand } from "../Strand.ts";
|
|
6
|
-
import type { Tool } from "../Tool.ts";
|
|
7
|
-
/** Configuration options for running a definition. */
|
|
8
|
-
export interface RunConfig<Y extends Rune<any>> {
|
|
9
|
-
handler?: Handler<Y> | undefined;
|
|
10
|
-
messages?: Array<Message> | undefined;
|
|
11
|
-
tools?: Set<Tool> | undefined;
|
|
12
|
-
signal?: AbortSignal | undefined;
|
|
13
|
-
}
|
|
14
|
-
export declare function run<Y extends Rune<any>, T>(definition: Definition<Y, T>, config?: RunConfig<Y>): Strand<Y, T>;
|
package/dist/L/run.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AdapterRegistry } from "../AdapterRegistry.js";
|
|
2
|
-
import { Context } from "../Context.js";
|
|
3
|
-
import { Strand } from "../Strand.js";
|
|
4
|
-
export function run(definition, config) {
|
|
5
|
-
const context = Context({
|
|
6
|
-
handler: config?.handler,
|
|
7
|
-
adapters: new AdapterRegistry(),
|
|
8
|
-
messages: config?.messages ?? [],
|
|
9
|
-
tools: config?.tools ?? new Set(),
|
|
10
|
-
});
|
|
11
|
-
return new Strand(definition, {
|
|
12
|
-
signal: config?.signal,
|
|
13
|
-
...config && { context },
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=run.js.map
|
package/dist/L/run.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../L/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAKvC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAWrC,MAAM,UAAU,GAAG,CAAyB,UAA4B,EAAE,MAAqB;IAC7F,MAAM,OAAO,GAAG,OAAO,CAAC;QACtB,OAAO,EAAE,MAAM,EAAE,OAAO;QACxB,QAAQ,EAAE,IAAI,eAAe,EAAE;QAC/B,QAAQ,EAAE,MAAM,EAAE,QAAQ,IAAI,EAAE;QAChC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,IAAI,GAAG,EAAE;KAClC,CAAC,CAAA;IACF,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;QAC5B,MAAM,EAAE,MAAM,EAAE,MAAM;QACtB,GAAG,MAAM,IAAI,EAAE,OAAO,EAAE;KACzB,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Schema } from "../../Schema.ts";
|
|
2
|
-
export declare function make<S extends Schema>(schema: Omit<S, "T">, description?: string): S & TypeBase;
|
|
3
|
-
export interface TypeBase {
|
|
4
|
-
(template: TemplateStringsArray, ...substitutions: Array<string>): this;
|
|
5
|
-
(...values: Array<string>): this;
|
|
6
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { fixTemplateStrings } from "../../util/fixTemplateStrings.js";
|
|
2
|
-
import { isTemplateStringsArray } from "../../util/isTemplateStringsArray.js";
|
|
3
|
-
export function make(schema, description) {
|
|
4
|
-
const schema_ = {
|
|
5
|
-
...schema,
|
|
6
|
-
...description && { description },
|
|
7
|
-
};
|
|
8
|
-
const Type = Object.assign(function describe(e0, ...rest) {
|
|
9
|
-
const junction = isTemplateStringsArray(e0) ? String.raw(fixTemplateStrings(e0), ...rest) : e0;
|
|
10
|
-
return make(schema_, description ? `${description}${junction ? `\n\n${junction}` : ""}` : junction);
|
|
11
|
-
}, schema_);
|
|
12
|
-
Object.defineProperty(Type, "toJSON", {
|
|
13
|
-
value() {
|
|
14
|
-
return schema_;
|
|
15
|
-
},
|
|
16
|
-
enumerable: false,
|
|
17
|
-
});
|
|
18
|
-
return Type;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=_schema_common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_schema_common.js","sourceRoot":"","sources":["../../../L/schema/_schema_common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAE7E,MAAM,UAAU,IAAI,CAAmB,MAAoB,EAAE,WAAoB;IAC/E,MAAM,OAAO,GAAG;QACd,GAAG,MAAM;QACT,GAAG,WAAW,IAAI,EAAE,WAAW,EAAE;KAClC,CAAA;IAED,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,QAAQ,CAAC,EAAkC,EAAE,GAAG,IAAmB;QACrG,MAAM,QAAQ,GAAG,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAC9F,OAAO,IAAI,CACT,OAAO,EACP,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,OAAO,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAC9E,CAAA;IACH,CAAC,EAAE,OAAO,CAAC,CAAA;IACX,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE;QACpC,KAAK;YACH,OAAO,OAAO,CAAA;QAChB,CAAC;QACD,UAAU,EAAE,KAAK;KAClB,CAAC,CAAA;IACF,OAAO,IAAa,CAAA;AACtB,CAAC"}
|
package/dist/L/schema/anyOf.d.ts
DELETED
package/dist/L/schema/anyOf.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anyOf.js","sourceRoot":"","sources":["../../../L/schema/anyOf.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAM1C,MAAM,UAAU,KAAK,CAA2B,KAAS;IACvD,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/L/schema/array.d.ts
DELETED
package/dist/L/schema/array.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../L/schema/array.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAM1C,MAAM,UAAU,KAAK,CAAmB,KAAQ;IAC9C,OAAO,IAAI,CAAC;QACV,IAAI,EAAE,OAAO;QACb,KAAK;KACN,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/L/schema/boolean.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../../L/schema/boolean.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAA;AAIzD,MAAM,QAAQ,GAAa,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAEpD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,CAAA"}
|
package/dist/L/schema/const.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SchemaString } from "../../Schema.ts";
|
|
2
|
-
import { type TypeBase } from "./_schema_common.ts";
|
|
3
|
-
interface const_<K extends string> extends SchemaString<K>, TypeBase {
|
|
4
|
-
enum?: never;
|
|
5
|
-
const: K;
|
|
6
|
-
}
|
|
7
|
-
declare function const_<K extends string>(value: K): const_<K>;
|
|
8
|
-
export { const_ as const };
|
package/dist/L/schema/const.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../L/schema/const.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAA;AAOzD,SAAS,MAAM,CAAmB,KAAQ;IACxC,OAAO,IAAI,CAAC;QACV,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,KAAK;KACb,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;AAEzD,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,CAAA"}
|
package/dist/L/schema/enum.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SchemaString } from "../../Schema.ts";
|
|
2
|
-
import { type TypeBase } from "./_schema_common.ts";
|
|
3
|
-
interface enum_<V extends Array<string> = Array<string>> extends SchemaString<V[number]>, TypeBase {
|
|
4
|
-
enum: V;
|
|
5
|
-
const?: never;
|
|
6
|
-
}
|
|
7
|
-
declare function enum_<const V extends Array<string>>(...values: V): enum_<V>;
|
|
8
|
-
export { enum_ as enum };
|
package/dist/L/schema/enum.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../L/schema/enum.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAA;AAOzD,SAAS,KAAK,CAAgC,GAAG,MAAS;IACxD,OAAO,IAAI,CAAC;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM;KACb,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;AAEvD,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAA"}
|
package/dist/L/schema/integer.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../L/schema/integer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAA;AAIzD,MAAM,CAAC,MAAM,OAAO,GAAY,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA"}
|
package/dist/L/schema/null.d.ts
DELETED
package/dist/L/schema/null.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"null.js","sourceRoot":"","sources":["../../../L/schema/null.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAA;AAIzD,MAAM,KAAK,GAAU,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAE3C,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAA"}
|
package/dist/L/schema/number.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.js","sourceRoot":"","sources":["../../../L/schema/number.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAA;AAIzD,MAAM,OAAO,GAAY,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AAEjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Schema, SchemaObject } from "../../Schema.ts";
|
|
2
|
-
interface object_<F extends Record<string, Schema> = Record<string, Schema>> extends SchemaObject<{
|
|
3
|
-
[K in keyof F]: F[K]["T"];
|
|
4
|
-
}> {
|
|
5
|
-
properties: F;
|
|
6
|
-
required: Array<Extract<keyof F, string>>;
|
|
7
|
-
}
|
|
8
|
-
declare function object_<XR extends Record<string, Schema>>(properties: XR): object_<XR>;
|
|
9
|
-
export { object_ as object };
|
package/dist/L/schema/object.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { make } from "./_schema_common.js";
|
|
2
|
-
function object_(properties) {
|
|
3
|
-
return make({
|
|
4
|
-
type: "object",
|
|
5
|
-
properties,
|
|
6
|
-
additionalProperties: false,
|
|
7
|
-
required: Object.keys(properties),
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(object_, "name", { value: "object" });
|
|
11
|
-
export { object_ as object };
|
|
12
|
-
//# sourceMappingURL=object.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../L/schema/object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAS1C,SAAS,OAAO,CAAoC,UAAc;IAChE,OAAO,IAAI,CAAC;QACV,IAAI,EAAE,QAAQ;QACd,UAAU;QACV,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAU;KAC3C,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SchemaString } from "../../Schema.ts";
|
|
2
|
-
import { type TypeBase } from "./_schema_common.ts";
|
|
3
|
-
interface string_ extends SchemaString<string>, TypeBase {
|
|
4
|
-
enum?: never;
|
|
5
|
-
const?: never;
|
|
6
|
-
}
|
|
7
|
-
declare const string_: string_;
|
|
8
|
-
export { string_ as string };
|
package/dist/L/schema/string.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../L/schema/string.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAA;AAOzD,MAAM,OAAO,GAAY,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AAEjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,CAAA"}
|
package/dist/L/strand.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Context } from "../Context.ts";
|
|
2
|
-
import type { Definition } from "../Definition.ts";
|
|
3
|
-
import type { LEvent } from "../LEvent.ts";
|
|
4
|
-
import { type Rune } from "../Rune.ts";
|
|
5
|
-
/**
|
|
6
|
-
* Creates a child strand that executes a definition.
|
|
7
|
-
* Optionally specify the context. Otherwise the current context is inherited.
|
|
8
|
-
*/
|
|
9
|
-
export declare function strand<Y extends Rune<any>, T>(definition: Definition<Y, T>, context?: Context): Generator<Rune<LEvent>, T>;
|
package/dist/L/strand.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RuneKey } from "../Rune.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a child strand that executes a definition.
|
|
4
|
-
* Optionally specify the context. Otherwise the current context is inherited.
|
|
5
|
-
*/
|
|
6
|
-
export function* strand(definition, context) {
|
|
7
|
-
return yield {
|
|
8
|
-
[RuneKey]: true,
|
|
9
|
-
instruction: {
|
|
10
|
-
kind: "create_child",
|
|
11
|
-
definition,
|
|
12
|
-
context,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=strand.js.map
|
package/dist/L/strand.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"strand.js","sourceRoot":"","sources":["../../L/strand.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,OAAO,EAAE,MAAM,YAAY,CAAA;AAE/C;;;GAGG;AACH,MAAM,SAAS,CAAC,CAAC,MAAM,CACrB,UAA4B,EAC5B,OAAiB;IAEjB,OAAO,MAAM;QACX,CAAC,OAAO,CAAC,EAAE,IAAI;QACf,WAAW,EAAE;YACX,IAAI,EAAE,cAAc;YACpB,UAAU;YACV,OAAO;SACR;KACF,CAAA;AACH,CAAC"}
|
package/dist/L/stream.d.ts
DELETED
package/dist/L/stream.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { InferenceRequested } from "../LEvent.js";
|
|
2
|
-
import { continuation } from "./continuation.js";
|
|
3
|
-
import { emit } from "./emit.js";
|
|
4
|
-
import { reflect } from "./reflect.js";
|
|
5
|
-
/** Creates a readable stream of content from the current model. */
|
|
6
|
-
export const stream = {
|
|
7
|
-
*[Symbol.iterator]() {
|
|
8
|
-
const { context: { adapters, messages }, signal } = yield* reflect;
|
|
9
|
-
const adapter = adapters.ensure();
|
|
10
|
-
const requestId = crypto.randomUUID();
|
|
11
|
-
yield* emit(new InferenceRequested(requestId));
|
|
12
|
-
return yield* continuation("stream", adapter.seal({ messages, signal }).stream);
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=stream.js.map
|
package/dist/L/stream.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../L/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAe,MAAM,cAAc,CAAA;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,mEAAmE;AACnE,MAAM,CAAC,MAAM,MAAM,GAAmD;IACpE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAChB,MAAM,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAA;QAClE,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;QACjC,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,EAAE,CAAA;QACrC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAA;QAC9C,OAAO,KAAK,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;IACjF,CAAC;CACF,CAAA"}
|
package/dist/L/system.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { LEvent } from "../LEvent.ts";
|
|
2
|
-
import type { Rune } from "../Rune.ts";
|
|
3
|
-
export declare function system(template: TemplateStringsArray, ...substitutions: Array<number | string>): Generator<Rune<LEvent>, void>;
|
|
4
|
-
export declare function system(value: string): Generator<Rune<LEvent>, void>;
|