@fungi.computer/mule 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/README.md +120 -2
- package/THIRD_PARTY_NOTICES +15 -0
- package/dist/contract.d.ts +192 -0
- package/dist/contract.js +1 -0
- package/dist/effect.d.ts +73 -0
- package/dist/effect.js +762 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +97 -0
- package/dist/testing.d.ts +15 -0
- package/dist/testing.js +14 -0
- package/docs/api/README.md +15 -0
- package/docs/api/effect.md +350 -0
- package/docs/api/index.md +889 -0
- package/docs/api/testing.md +45 -0
- package/package.json +69 -3
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/mule**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/mule](README.md) / testing
|
|
8
|
+
|
|
9
|
+
# testing
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### FauxModel
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type FauxModel = Readonly<{
|
|
17
|
+
model: Model<Api>;
|
|
18
|
+
stream: FauxProviderHandle["provider"]["streamSimple"];
|
|
19
|
+
setResponses: (replies) => void;
|
|
20
|
+
state: FauxProviderHandle["state"];
|
|
21
|
+
}>;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Deterministic model and stream with Pi's observable response state.
|
|
25
|
+
|
|
26
|
+
## Functions
|
|
27
|
+
|
|
28
|
+
### fauxModel()
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
function fauxModel(replies, options?): FauxModel;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Create a credential-free model for tests and runnable examples.
|
|
35
|
+
|
|
36
|
+
#### Parameters
|
|
37
|
+
|
|
38
|
+
| Parameter | Type |
|
|
39
|
+
| --------- | ----------------------------- |
|
|
40
|
+
| `replies` | readonly `FauxResponseStep`[] |
|
|
41
|
+
| `options` | `RegisterFauxProviderOptions` |
|
|
42
|
+
|
|
43
|
+
#### Returns
|
|
44
|
+
|
|
45
|
+
[`FauxModel`](#fauxmodel)
|
package/package.json
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/mule",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"author": "Levi <levi@technomancy.dev>",
|
|
5
|
+
"description": "Effect-native Pi model and tool loop",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./effect": {
|
|
15
|
+
"types": "./dist/effect.d.ts",
|
|
16
|
+
"import": "./dist/effect.js"
|
|
17
|
+
},
|
|
18
|
+
"./testing": {
|
|
19
|
+
"types": "./dist/testing.d.ts",
|
|
20
|
+
"import": "./dist/testing.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"docs/api",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE",
|
|
28
|
+
"THIRD_PARTY_NOTICES"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@earendil-works/pi-ai": "0.99.2",
|
|
32
|
+
"@fungi.computer/cairn": "0.0.1",
|
|
33
|
+
"effect": "4.0.2"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "24.13.3",
|
|
37
|
+
"typescript": "5.9.3",
|
|
38
|
+
"vitest": "4.1.11"
|
|
39
|
+
},
|
|
40
|
+
"botanical": {
|
|
41
|
+
"role": "package",
|
|
42
|
+
"operations": {
|
|
43
|
+
"lint": "required",
|
|
44
|
+
"typecheck": "required",
|
|
45
|
+
"build": "required",
|
|
46
|
+
"test": "required",
|
|
47
|
+
"docs": "required",
|
|
48
|
+
"pack": "required",
|
|
49
|
+
"smoke": "required",
|
|
50
|
+
"stranger": "required"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/fungi-computer/mule.git"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"lint": "eslint src test examples --max-warnings=0 && ../../node_modules/.bin/oxlint --config ../../oxlint.config.ts --deny-warnings src test examples",
|
|
60
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
61
|
+
"build": "pnpm run clean && tsc -p tsconfig.build.json",
|
|
62
|
+
"clean": "node --input-type=module --eval \"import { rm } from 'node:fs/promises'; await rm('dist', { recursive: true, force: true });\"",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"docs": "tsx ../../tooling/repository/src/docs/cli.ts check --root ../..",
|
|
65
|
+
"docs:write": "tsx ../../tooling/repository/src/docs/cli.ts write --root ../..",
|
|
66
|
+
"pack": "mkdir -p ../../.botanical/mule-pack && pnpm pack --pack-destination ../../.botanical/mule-pack",
|
|
67
|
+
"smoke": "node --input-type=module -e \"import('./dist/index.js').then(({mule}) => { if (!mule.run) process.exit(1); })\"",
|
|
68
|
+
"stranger": "tsx ../../tooling/repository/src/artifacts/cli.ts --repo-root ../.. .",
|
|
69
|
+
"format:check": "node ../../tooling/repository/scripts/format-package-check.mjs",
|
|
70
|
+
"lint:anti-slop": "node ../../tooling/repository/scripts/lint-package-anti-slop.mjs"
|
|
71
|
+
}
|
|
6
72
|
}
|