@rcrsr/rill 0.15.0 → 0.17.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/README.md +37 -21
- package/dist/ast-nodes.d.ts +2 -13
- package/dist/ast-nodes.js +0 -1
- package/dist/ast-unions.d.ts +0 -1
- package/dist/ast-unions.js +0 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +0 -1
- package/dist/error-classes.d.ts +0 -1
- package/dist/error-classes.js +0 -1
- package/dist/error-formatter.d.ts +0 -1
- package/dist/error-formatter.js +0 -1
- package/dist/error-registry.d.ts +0 -1
- package/dist/error-registry.js +32 -1
- package/dist/ext/crypto/index.d.ts +3 -4
- package/dist/ext/crypto/index.js +66 -64
- package/dist/ext/exec/index.d.ts +3 -4
- package/dist/ext/exec/index.js +17 -12
- package/dist/ext/exec/runner.d.ts +0 -1
- package/dist/ext/exec/runner.js +0 -1
- package/dist/ext/fetch/index.d.ts +3 -4
- package/dist/ext/fetch/index.js +23 -49
- package/dist/ext/fetch/request.d.ts +0 -1
- package/dist/ext/fetch/request.js +0 -1
- package/dist/ext/fs/index.d.ts +3 -4
- package/dist/ext/fs/index.js +268 -266
- package/dist/ext/fs/sandbox.d.ts +0 -1
- package/dist/ext/fs/sandbox.js +0 -1
- package/dist/ext/kv/index.d.ts +3 -4
- package/dist/ext/kv/index.js +216 -215
- package/dist/ext/kv/store.d.ts +0 -1
- package/dist/ext/kv/store.js +2 -2
- package/dist/ext-parse-bridge.d.ts +10 -0
- package/dist/ext-parse-bridge.js +10 -0
- package/dist/generated/introspection-data.d.ts +1 -2
- package/dist/generated/introspection-data.js +385 -297
- package/dist/generated/version-data.d.ts +1 -2
- package/dist/generated/version-data.js +2 -3
- package/dist/highlight-map.d.ts +0 -1
- package/dist/highlight-map.js +0 -1
- package/dist/index.d.ts +15 -5
- package/dist/index.js +14 -6
- package/dist/lexer/errors.d.ts +0 -1
- package/dist/lexer/errors.js +0 -1
- package/dist/lexer/helpers.d.ts +0 -1
- package/dist/lexer/helpers.js +0 -1
- package/dist/lexer/index.d.ts +0 -1
- package/dist/lexer/index.js +0 -1
- package/dist/lexer/operators.d.ts +0 -1
- package/dist/lexer/operators.js +0 -1
- package/dist/lexer/readers.d.ts +0 -1
- package/dist/lexer/readers.js +0 -1
- package/dist/lexer/state.d.ts +0 -1
- package/dist/lexer/state.js +0 -1
- package/dist/lexer/tokenizer.d.ts +0 -1
- package/dist/lexer/tokenizer.js +0 -1
- package/dist/parser/helpers.d.ts +0 -1
- package/dist/parser/helpers.js +0 -1
- package/dist/parser/index.d.ts +0 -1
- package/dist/parser/index.js +0 -1
- package/dist/parser/parser-collect.d.ts +0 -1
- package/dist/parser/parser-collect.js +0 -1
- package/dist/parser/parser-control.d.ts +0 -1
- package/dist/parser/parser-control.js +0 -1
- package/dist/parser/parser-expr.d.ts +0 -1
- package/dist/parser/parser-expr.js +0 -1
- package/dist/parser/parser-extract.d.ts +0 -1
- package/dist/parser/parser-extract.js +0 -1
- package/dist/parser/parser-functions.d.ts +0 -1
- package/dist/parser/parser-functions.js +0 -1
- package/dist/parser/parser-literals.d.ts +0 -1
- package/dist/parser/parser-literals.js +4 -2
- package/dist/parser/parser-script.d.ts +0 -1
- package/dist/parser/parser-script.js +0 -1
- package/dist/parser/parser-shape.d.ts +2 -3
- package/dist/parser/parser-shape.js +8 -52
- package/dist/parser/parser-types.d.ts +28 -2
- package/dist/parser/parser-types.js +76 -13
- package/dist/parser/parser-use.d.ts +0 -1
- package/dist/parser/parser-use.js +7 -2
- package/dist/parser/parser-variables.d.ts +0 -1
- package/dist/parser/parser-variables.js +0 -1
- package/dist/parser/parser.d.ts +0 -1
- package/dist/parser/parser.js +0 -1
- package/dist/parser/state.d.ts +0 -1
- package/dist/parser/state.js +0 -1
- package/dist/runtime/core/callable.d.ts +59 -20
- package/dist/runtime/core/callable.js +188 -39
- package/dist/runtime/core/context.d.ts +0 -12
- package/dist/runtime/core/context.js +77 -77
- package/dist/runtime/core/equals.d.ts +0 -1
- package/dist/runtime/core/equals.js +35 -3
- package/dist/runtime/core/eval/base.d.ts +0 -1
- package/dist/runtime/core/eval/base.js +0 -1
- package/dist/runtime/core/eval/evaluator.d.ts +0 -1
- package/dist/runtime/core/eval/evaluator.js +0 -1
- package/dist/runtime/core/eval/index.d.ts +2 -3
- package/dist/runtime/core/eval/index.js +11 -1
- package/dist/runtime/core/eval/mixins/annotations.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/annotations.js +0 -1
- package/dist/runtime/core/eval/mixins/closures.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/closures.js +92 -70
- package/dist/runtime/core/eval/mixins/collections.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/collections.js +9 -4
- package/dist/runtime/core/eval/mixins/control-flow.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/control-flow.js +0 -1
- package/dist/runtime/core/eval/mixins/conversion.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/conversion.js +196 -188
- package/dist/runtime/core/eval/mixins/core.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/core.js +2 -3
- package/dist/runtime/core/eval/mixins/expressions.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/expressions.js +35 -28
- package/dist/runtime/core/eval/mixins/extraction.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/extraction.js +8 -9
- package/dist/runtime/core/eval/mixins/list-dispatch.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/list-dispatch.js +0 -1
- package/dist/runtime/core/eval/mixins/literals.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/literals.js +6 -10
- package/dist/runtime/core/eval/mixins/types.d.ts +2 -1
- package/dist/runtime/core/eval/mixins/types.js +231 -261
- package/dist/runtime/core/eval/mixins/use.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/use.js +0 -1
- package/dist/runtime/core/eval/mixins/variables.d.ts +0 -1
- package/dist/runtime/core/eval/mixins/variables.js +16 -15
- package/dist/runtime/core/eval/types.d.ts +0 -1
- package/dist/runtime/core/eval/types.js +0 -1
- package/dist/runtime/core/execute.d.ts +0 -1
- package/dist/runtime/core/execute.js +0 -1
- package/dist/runtime/core/field-descriptor.d.ts +4 -5
- package/dist/runtime/core/field-descriptor.js +2 -2
- package/dist/runtime/core/introspection.d.ts +0 -1
- package/dist/runtime/core/introspection.js +6 -7
- package/dist/runtime/core/markers.d.ts +12 -0
- package/dist/runtime/core/markers.js +7 -0
- package/dist/runtime/core/resolvers.d.ts +0 -1
- package/dist/runtime/core/resolvers.js +0 -1
- package/dist/runtime/core/signals.d.ts +0 -1
- package/dist/runtime/core/signals.js +0 -1
- package/dist/runtime/core/type-registrations.d.ts +136 -0
- package/dist/runtime/core/type-registrations.js +749 -0
- package/dist/runtime/core/type-structures.d.ts +128 -0
- package/dist/runtime/core/type-structures.js +12 -0
- package/dist/runtime/core/types.d.ts +15 -4
- package/dist/runtime/core/types.js +0 -1
- package/dist/runtime/core/values.d.ts +88 -146
- package/dist/runtime/core/values.js +466 -470
- package/dist/runtime/ext/builtins.d.ts +0 -1
- package/dist/runtime/ext/builtins.js +125 -80
- package/dist/runtime/ext/extensions.d.ts +30 -125
- package/dist/runtime/ext/extensions.js +0 -94
- package/dist/runtime/ext/test-context.d.ts +28 -0
- package/dist/runtime/ext/test-context.js +154 -0
- package/dist/runtime/index.d.ts +22 -9
- package/dist/runtime/index.js +18 -5
- package/dist/signature-parser.d.ts +2 -3
- package/dist/signature-parser.js +19 -17
- package/dist/source-location.d.ts +0 -1
- package/dist/source-location.js +0 -1
- package/dist/token-types.d.ts +0 -1
- package/dist/token-types.js +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -1
- package/dist/value-types.d.ts +15 -12
- package/dist/value-types.js +0 -1
- package/package.json +2 -1
- package/dist/ast-nodes.d.ts.map +0 -1
- package/dist/ast-nodes.js.map +0 -1
- package/dist/ast-unions.d.ts.map +0 -1
- package/dist/ast-unions.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/error-classes.d.ts.map +0 -1
- package/dist/error-classes.js.map +0 -1
- package/dist/error-formatter.d.ts.map +0 -1
- package/dist/error-formatter.js.map +0 -1
- package/dist/error-registry.d.ts.map +0 -1
- package/dist/error-registry.js.map +0 -1
- package/dist/ext/crypto/index.d.ts.map +0 -1
- package/dist/ext/crypto/index.js.map +0 -1
- package/dist/ext/exec/index.d.ts.map +0 -1
- package/dist/ext/exec/index.js.map +0 -1
- package/dist/ext/exec/runner.d.ts.map +0 -1
- package/dist/ext/exec/runner.js.map +0 -1
- package/dist/ext/fetch/index.d.ts.map +0 -1
- package/dist/ext/fetch/index.js.map +0 -1
- package/dist/ext/fetch/request.d.ts.map +0 -1
- package/dist/ext/fetch/request.js.map +0 -1
- package/dist/ext/fs/index.d.ts.map +0 -1
- package/dist/ext/fs/index.js.map +0 -1
- package/dist/ext/fs/sandbox.d.ts.map +0 -1
- package/dist/ext/fs/sandbox.js.map +0 -1
- package/dist/ext/kv/index.d.ts.map +0 -1
- package/dist/ext/kv/index.js.map +0 -1
- package/dist/ext/kv/store.d.ts.map +0 -1
- package/dist/ext/kv/store.js.map +0 -1
- package/dist/generated/introspection-data.d.ts.map +0 -1
- package/dist/generated/introspection-data.js.map +0 -1
- package/dist/generated/version-data.d.ts.map +0 -1
- package/dist/generated/version-data.js.map +0 -1
- package/dist/highlight-map.d.ts.map +0 -1
- package/dist/highlight-map.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lexer/errors.d.ts.map +0 -1
- package/dist/lexer/errors.js.map +0 -1
- package/dist/lexer/helpers.d.ts.map +0 -1
- package/dist/lexer/helpers.js.map +0 -1
- package/dist/lexer/index.d.ts.map +0 -1
- package/dist/lexer/index.js.map +0 -1
- package/dist/lexer/operators.d.ts.map +0 -1
- package/dist/lexer/operators.js.map +0 -1
- package/dist/lexer/readers.d.ts.map +0 -1
- package/dist/lexer/readers.js.map +0 -1
- package/dist/lexer/state.d.ts.map +0 -1
- package/dist/lexer/state.js.map +0 -1
- package/dist/lexer/tokenizer.d.ts.map +0 -1
- package/dist/lexer/tokenizer.js.map +0 -1
- package/dist/parser/helpers.d.ts.map +0 -1
- package/dist/parser/helpers.js.map +0 -1
- package/dist/parser/index.d.ts.map +0 -1
- package/dist/parser/index.js.map +0 -1
- package/dist/parser/parser-collect.d.ts.map +0 -1
- package/dist/parser/parser-collect.js.map +0 -1
- package/dist/parser/parser-control.d.ts.map +0 -1
- package/dist/parser/parser-control.js.map +0 -1
- package/dist/parser/parser-expr.d.ts.map +0 -1
- package/dist/parser/parser-expr.js.map +0 -1
- package/dist/parser/parser-extract.d.ts.map +0 -1
- package/dist/parser/parser-extract.js.map +0 -1
- package/dist/parser/parser-functions.d.ts.map +0 -1
- package/dist/parser/parser-functions.js.map +0 -1
- package/dist/parser/parser-literals.d.ts.map +0 -1
- package/dist/parser/parser-literals.js.map +0 -1
- package/dist/parser/parser-script.d.ts.map +0 -1
- package/dist/parser/parser-script.js.map +0 -1
- package/dist/parser/parser-shape.d.ts.map +0 -1
- package/dist/parser/parser-shape.js.map +0 -1
- package/dist/parser/parser-types.d.ts.map +0 -1
- package/dist/parser/parser-types.js.map +0 -1
- package/dist/parser/parser-use.d.ts.map +0 -1
- package/dist/parser/parser-use.js.map +0 -1
- package/dist/parser/parser-variables.d.ts.map +0 -1
- package/dist/parser/parser-variables.js.map +0 -1
- package/dist/parser/parser.d.ts.map +0 -1
- package/dist/parser/parser.js.map +0 -1
- package/dist/parser/state.d.ts.map +0 -1
- package/dist/parser/state.js.map +0 -1
- package/dist/runtime/core/callable.d.ts.map +0 -1
- package/dist/runtime/core/callable.js.map +0 -1
- package/dist/runtime/core/context.d.ts.map +0 -1
- package/dist/runtime/core/context.js.map +0 -1
- package/dist/runtime/core/equals.d.ts.map +0 -1
- package/dist/runtime/core/equals.js.map +0 -1
- package/dist/runtime/core/eval/base.d.ts.map +0 -1
- package/dist/runtime/core/eval/base.js.map +0 -1
- package/dist/runtime/core/eval/evaluator.d.ts.map +0 -1
- package/dist/runtime/core/eval/evaluator.js.map +0 -1
- package/dist/runtime/core/eval/index.d.ts.map +0 -1
- package/dist/runtime/core/eval/index.js.map +0 -1
- package/dist/runtime/core/eval/mixins/annotations.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/annotations.js.map +0 -1
- package/dist/runtime/core/eval/mixins/closures.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/closures.js.map +0 -1
- package/dist/runtime/core/eval/mixins/collections.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/collections.js.map +0 -1
- package/dist/runtime/core/eval/mixins/control-flow.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/control-flow.js.map +0 -1
- package/dist/runtime/core/eval/mixins/conversion.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/conversion.js.map +0 -1
- package/dist/runtime/core/eval/mixins/core.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/core.js.map +0 -1
- package/dist/runtime/core/eval/mixins/expressions.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/expressions.js.map +0 -1
- package/dist/runtime/core/eval/mixins/extraction.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/extraction.js.map +0 -1
- package/dist/runtime/core/eval/mixins/list-dispatch.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/list-dispatch.js.map +0 -1
- package/dist/runtime/core/eval/mixins/literals.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/literals.js.map +0 -1
- package/dist/runtime/core/eval/mixins/types.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/types.js.map +0 -1
- package/dist/runtime/core/eval/mixins/use.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/use.js.map +0 -1
- package/dist/runtime/core/eval/mixins/variables.d.ts.map +0 -1
- package/dist/runtime/core/eval/mixins/variables.js.map +0 -1
- package/dist/runtime/core/eval/types.d.ts.map +0 -1
- package/dist/runtime/core/eval/types.js.map +0 -1
- package/dist/runtime/core/execute.d.ts.map +0 -1
- package/dist/runtime/core/execute.js.map +0 -1
- package/dist/runtime/core/field-descriptor.d.ts.map +0 -1
- package/dist/runtime/core/field-descriptor.js.map +0 -1
- package/dist/runtime/core/introspection.d.ts.map +0 -1
- package/dist/runtime/core/introspection.js.map +0 -1
- package/dist/runtime/core/resolvers.d.ts.map +0 -1
- package/dist/runtime/core/resolvers.js.map +0 -1
- package/dist/runtime/core/signals.d.ts.map +0 -1
- package/dist/runtime/core/signals.js.map +0 -1
- package/dist/runtime/core/types.d.ts.map +0 -1
- package/dist/runtime/core/types.js.map +0 -1
- package/dist/runtime/core/values.d.ts.map +0 -1
- package/dist/runtime/core/values.js.map +0 -1
- package/dist/runtime/ext/builtins.d.ts.map +0 -1
- package/dist/runtime/ext/builtins.js.map +0 -1
- package/dist/runtime/ext/extensions.d.ts.map +0 -1
- package/dist/runtime/ext/extensions.js.map +0 -1
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js.map +0 -1
- package/dist/signature-parser.d.ts.map +0 -1
- package/dist/signature-parser.js.map +0 -1
- package/dist/source-location.d.ts.map +0 -1
- package/dist/source-location.js.map +0 -1
- package/dist/token-types.d.ts.map +0 -1
- package/dist/token-types.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/value-types.d.ts.map +0 -1
- package/dist/value-types.js.map +0 -1
package/README.md
CHANGED
|
@@ -13,24 +13,34 @@ npm install @rcrsr/rill
|
|
|
13
13
|
## Quick Start
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { parse, execute, createRuntimeContext } from '@rcrsr/rill';
|
|
16
|
+
import { parse, execute, createRuntimeContext, toCallable } from '@rcrsr/rill';
|
|
17
|
+
import type { ExtensionFactoryResult } from '@rcrsr/rill';
|
|
18
|
+
|
|
19
|
+
function createMyExtension(): ExtensionFactoryResult {
|
|
20
|
+
return {
|
|
21
|
+
value: {
|
|
22
|
+
prompt: toCallable({
|
|
23
|
+
params: [{ name: 'message', type: { kind: 'string' } }],
|
|
24
|
+
fn: async (args) => await callYourLLM(args.message),
|
|
25
|
+
annotations: { description: 'Call your LLM' },
|
|
26
|
+
returnType: { kind: 'string' },
|
|
27
|
+
}),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const ext = createMyExtension();
|
|
33
|
+
const ctx = createRuntimeContext({
|
|
34
|
+
variables: { app: ext.value },
|
|
35
|
+
});
|
|
17
36
|
|
|
18
37
|
const script = `
|
|
19
|
-
prompt("Analyze this code for issues")
|
|
38
|
+
app.prompt("Analyze this code for issues")
|
|
20
39
|
-> .contains("ERROR") ? error($) ! "Analysis complete"
|
|
21
40
|
`;
|
|
22
41
|
|
|
23
|
-
const ctx = createRuntimeContext({
|
|
24
|
-
functions: {
|
|
25
|
-
prompt: {
|
|
26
|
-
params: [{ name: 'message', type: 'string' }],
|
|
27
|
-
fn: async (args) => await callYourLLM(args[0]),
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
|
|
32
42
|
const result = await execute(parse(script), ctx);
|
|
33
|
-
console.log(result.
|
|
43
|
+
console.log(result.result);
|
|
34
44
|
```
|
|
35
45
|
|
|
36
46
|
## API
|
|
@@ -47,25 +57,31 @@ Source Text → parse() → AST → execute() → Result
|
|
|
47
57
|
| `execute(ast, ctx)` | Execute an AST with a runtime context |
|
|
48
58
|
| `createRuntimeContext(opts)` | Create a configured runtime context |
|
|
49
59
|
| `callable(fn, isProperty?)` | Wrap a function as a rill-callable value |
|
|
50
|
-
| `
|
|
60
|
+
| `toCallable(def)` | Convert a `RillFunction` to an `ApplicationCallable` |
|
|
61
|
+
| `createTestContext(extensions)` | Wire extensions for testing without config infrastructure |
|
|
51
62
|
|
|
52
63
|
### Runtime Options
|
|
53
64
|
|
|
54
65
|
```typescript
|
|
66
|
+
const ext = createMyExtension();
|
|
67
|
+
|
|
55
68
|
const ctx = createRuntimeContext({
|
|
56
|
-
//
|
|
69
|
+
// Extension values injected as variables (recommended)
|
|
70
|
+
variables: {
|
|
71
|
+
app: ext.value,
|
|
72
|
+
config: { greeting: 'hello' },
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
// Legacy: direct function registration (still supported)
|
|
57
76
|
functions: {
|
|
58
77
|
prompt: {
|
|
59
|
-
params: [{ name: 'text', type: 'string' }],
|
|
78
|
+
params: [{ name: 'text', type: { kind: 'string' } }],
|
|
60
79
|
fn: async (args, ctx, location) => { /* ... */ },
|
|
80
|
+
annotations: {},
|
|
81
|
+
returnType: { kind: 'string' },
|
|
61
82
|
},
|
|
62
83
|
},
|
|
63
84
|
|
|
64
|
-
// Variables injected into script scope
|
|
65
|
-
variables: {
|
|
66
|
-
config: { greeting: 'hello' },
|
|
67
|
-
},
|
|
68
|
-
|
|
69
85
|
// Callbacks
|
|
70
86
|
callbacks: {
|
|
71
87
|
onLog: (value) => console.log(value),
|
|
@@ -159,7 +175,7 @@ import { createCryptoExtension } from '@rcrsr/rill/ext/crypto';
|
|
|
159
175
|
| `@rcrsr/rill/ext/kv` | `createKvExtension(config)` | Key-value store with JSON persistence and schema validation |
|
|
160
176
|
| `@rcrsr/rill/ext/crypto` | `createCryptoExtension(config)` | Cryptographic functions (hash, hmac, uuid, random) |
|
|
161
177
|
|
|
162
|
-
Each factory returns an `
|
|
178
|
+
Each factory returns an `ExtensionFactoryResult` with a `value` dict of host functions and optional lifecycle hooks (`dispose`, `suspend`, `restore`) ready to integrate into your runtime context.
|
|
163
179
|
|
|
164
180
|
> **Note:** These extensions require Node.js APIs and are not compatible with browser environments.
|
|
165
181
|
|
package/dist/ast-nodes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SourceSpan } from './source-location.js';
|
|
2
|
-
import type { RillTypeName, TypeRef } from './value-types.js';
|
|
2
|
+
import type { FieldArg, RillTypeName, TypeRef } from './value-types.js';
|
|
3
3
|
interface BaseNode {
|
|
4
4
|
readonly span: SourceSpan;
|
|
5
5
|
}
|
|
@@ -245,18 +245,8 @@ export interface DictEntryNode extends BaseNode {
|
|
|
245
245
|
export interface TypeConstructorNode extends BaseNode {
|
|
246
246
|
readonly type: 'TypeConstructor';
|
|
247
247
|
readonly constructorName: 'list' | 'dict' | 'tuple' | 'ordered';
|
|
248
|
-
readonly args:
|
|
248
|
+
readonly args: FieldArg[];
|
|
249
249
|
}
|
|
250
|
-
export type TypeConstructorArg = {
|
|
251
|
-
kind: 'positional';
|
|
252
|
-
value: ExpressionNode;
|
|
253
|
-
defaultValue?: LiteralNode;
|
|
254
|
-
} | {
|
|
255
|
-
kind: 'named';
|
|
256
|
-
name: string;
|
|
257
|
-
value: ExpressionNode;
|
|
258
|
-
defaultValue?: LiteralNode;
|
|
259
|
-
};
|
|
260
250
|
/**
|
|
261
251
|
* Closure signature literal: |param: type, ...| :returnType
|
|
262
252
|
* Represents a closure type signature as a first-class value.
|
|
@@ -812,4 +802,3 @@ export interface UseExprNode extends BaseNode {
|
|
|
812
802
|
export type SimplePrimaryNode = LiteralNode | VariableNode | HostCallNode | MethodCallNode | BlockNode | BinaryExprNode | UnaryExprNode | GroupedExprNode | PostfixExprNode | TypeAssertionNode | TypeCheckNode;
|
|
813
803
|
export type ASTNode = ScriptNode | FrontmatterNode | ClosureNode | ClosureParamNode | StatementNode | CaptureNode | BreakNode | ReturnNode | PassNode | AssertNode | PipeChainNode | PostfixExprNode | MethodCallNode | InvokeNode | AnnotationAccessNode | HostCallNode | HostRefNode | ClosureCallNode | PipeInvokeNode | VariableNode | ConditionalNode | WhileLoopNode | DoWhileLoopNode | BlockNode | StringLiteralNode | InterpolationNode | NumberLiteralNode | BoolLiteralNode | ListSpreadNode | DictNode | DictEntryNode | BinaryExprNode | UnaryExprNode | GroupedExprNode | DestructureNode | DestructPatternNode | SliceNode | TypeAssertionNode | TypeCheckNode | TypeConstructorNode | ClosureSigLiteralNode | AnnotatedStatementNode | AnnotatedExprNode | NamedArgNode | SpreadArgNode | EachExprNode | MapExprNode | FoldExprNode | FilterExprNode | RecoveryErrorNode | ErrorNode | TypeNameExprNode | ListLiteralNode | DictLiteralNode | TupleLiteralNode | OrderedLiteralNode | DestructNode | ConvertNode | UseExprNode;
|
|
814
804
|
export {};
|
|
815
|
-
//# sourceMappingURL=ast-nodes.d.ts.map
|
package/dist/ast-nodes.js
CHANGED
package/dist/ast-unions.d.ts
CHANGED
|
@@ -3,4 +3,3 @@
|
|
|
3
3
|
* String union of all AST node type literals.
|
|
4
4
|
*/
|
|
5
5
|
export type NodeType = 'Script' | 'Frontmatter' | 'Closure' | 'ClosureParam' | 'Statement' | 'PipeChain' | 'PostfixExpr' | 'MethodCall' | 'Invoke' | 'AnnotationAccess' | 'HostCall' | 'HostRef' | 'ClosureCall' | 'PipeInvoke' | 'Variable' | 'Capture' | 'Conditional' | 'WhileLoop' | 'DoWhileLoop' | 'Block' | 'StringLiteral' | 'Interpolation' | 'NumberLiteral' | 'BoolLiteral' | 'ListSpread' | 'Dict' | 'DictEntry' | 'Break' | 'Return' | 'Pass' | 'Assert' | 'BinaryExpr' | 'UnaryExpr' | 'GroupedExpr' | 'Destructure' | 'DestructPattern' | 'Slice' | 'TypeAssertion' | 'TypeCheck' | 'AnnotatedStatement' | 'AnnotatedExpr' | 'NamedArg' | 'SpreadArg' | 'EachExpr' | 'MapExpr' | 'FoldExpr' | 'FilterExpr' | 'RecoveryError' | 'Error' | 'TypeNameExpr' | 'TypeConstructor' | 'ClosureSigLiteral' | 'ListLiteral' | 'DictLiteral' | 'TupleLiteral' | 'OrderedLiteral' | 'Destruct' | 'Convert' | 'UseExpr';
|
|
6
|
-
//# sourceMappingURL=ast-unions.d.ts.map
|
package/dist/ast-unions.js
CHANGED
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
package/dist/error-classes.d.ts
CHANGED
package/dist/error-classes.js
CHANGED
package/dist/error-formatter.js
CHANGED
package/dist/error-registry.d.ts
CHANGED
package/dist/error-registry.js
CHANGED
|
@@ -336,6 +336,24 @@ const ERROR_DEFINITIONS = [
|
|
|
336
336
|
},
|
|
337
337
|
],
|
|
338
338
|
},
|
|
339
|
+
{
|
|
340
|
+
errorId: 'RILL-P014',
|
|
341
|
+
category: 'parse',
|
|
342
|
+
description: 'Malformed type argument list',
|
|
343
|
+
messageTemplate: '{details}',
|
|
344
|
+
cause: 'A type argument list has a syntax error: missing comma, closing paren, or invalid argument.',
|
|
345
|
+
resolution: 'Check the type argument list for missing commas or closing parentheses.',
|
|
346
|
+
examples: [
|
|
347
|
+
{
|
|
348
|
+
description: 'Missing comma between type arguments',
|
|
349
|
+
code: 'list(string number) # Error: expected , or )',
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
description: 'Missing closing paren',
|
|
353
|
+
code: 'dict(key: string # Error: expected )',
|
|
354
|
+
},
|
|
355
|
+
],
|
|
356
|
+
},
|
|
339
357
|
{
|
|
340
358
|
errorId: 'RILL-P020',
|
|
341
359
|
category: 'parse',
|
|
@@ -1093,6 +1111,20 @@ const ERROR_DEFINITIONS = [
|
|
|
1093
1111
|
},
|
|
1094
1112
|
],
|
|
1095
1113
|
},
|
|
1114
|
+
{
|
|
1115
|
+
errorId: 'RILL-R045',
|
|
1116
|
+
category: 'runtime',
|
|
1117
|
+
description: 'Too many arguments passed to callable',
|
|
1118
|
+
messageTemplate: 'Expected {expected} args, got {actual}',
|
|
1119
|
+
cause: 'The number of arguments passed to a callable exceeds the number of declared parameters.',
|
|
1120
|
+
resolution: 'Remove the excess arguments or add more parameters to the callable definition.',
|
|
1121
|
+
examples: [
|
|
1122
|
+
{
|
|
1123
|
+
description: 'Too many arguments to a two-param closure',
|
|
1124
|
+
code: '|x: number, y: number| { x + y } -> app::call(1, 2, 3) # 3 args, 2 params',
|
|
1125
|
+
},
|
|
1126
|
+
],
|
|
1127
|
+
},
|
|
1096
1128
|
// Resolver errors (RILL-R050–RILL-R059)
|
|
1097
1129
|
{
|
|
1098
1130
|
errorId: 'RILL-R050',
|
|
@@ -1472,4 +1504,3 @@ export function getHelpUrl(errorId, version) {
|
|
|
1472
1504
|
const anchor = errorId.toLowerCase();
|
|
1473
1505
|
return `https://github.com/rcrsr/rill/blob/v${version}/docs/ref-errors.md#${anchor}`;
|
|
1474
1506
|
}
|
|
1475
|
-
//# sourceMappingURL=error-registry.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides cryptographic functions via thin wrapper around node:crypto.
|
|
5
5
|
* Functions: hash, hmac, uuid, random
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { ExtensionFactoryResult, ExtensionConfigSchema, ExtensionManifest } from '../../runtime/ext/extensions.js';
|
|
8
8
|
export declare const configSchema: ExtensionConfigSchema;
|
|
9
9
|
/** Crypto extension configuration */
|
|
10
10
|
export interface CryptoConfig {
|
|
@@ -19,7 +19,7 @@ export interface CryptoConfig {
|
|
|
19
19
|
* Returns 4 functions: hash, hmac, uuid, random.
|
|
20
20
|
*
|
|
21
21
|
* @param config - Crypto configuration
|
|
22
|
-
* @returns
|
|
22
|
+
* @returns ExtensionFactoryResult with 4 crypto functions
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```typescript
|
|
@@ -29,6 +29,5 @@ export interface CryptoConfig {
|
|
|
29
29
|
* });
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
export declare function createCryptoExtension(config?: CryptoConfig):
|
|
32
|
+
export declare function createCryptoExtension(config?: CryptoConfig): ExtensionFactoryResult;
|
|
33
33
|
export declare const extensionManifest: ExtensionManifest;
|
|
34
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/ext/crypto/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import crypto from 'node:crypto';
|
|
8
8
|
import { RuntimeError } from '../../error-classes.js';
|
|
9
|
+
import { toCallable } from '../../runtime/core/callable.js';
|
|
9
10
|
import { rillTypeToTypeValue, } from '../../runtime/core/values.js';
|
|
10
11
|
// ============================================================
|
|
11
12
|
// TYPES
|
|
@@ -23,7 +24,7 @@ export const configSchema = {
|
|
|
23
24
|
* Returns 4 functions: hash, hmac, uuid, random.
|
|
24
25
|
*
|
|
25
26
|
* @param config - Crypto configuration
|
|
26
|
-
* @returns
|
|
27
|
+
* @returns ExtensionFactoryResult with 4 crypto functions
|
|
27
28
|
*
|
|
28
29
|
* @example
|
|
29
30
|
* ```typescript
|
|
@@ -56,8 +57,8 @@ export function createCryptoExtension(config = {}) {
|
|
|
56
57
|
* IR-23
|
|
57
58
|
*/
|
|
58
59
|
const hash = async (args) => {
|
|
59
|
-
const input = args[
|
|
60
|
-
const algorithm = args[
|
|
60
|
+
const input = args['input'];
|
|
61
|
+
const algorithm = args['algorithm'] ?? defaultAlgorithm;
|
|
61
62
|
// EC-27: Invalid algorithm
|
|
62
63
|
validateAlgorithm(algorithm);
|
|
63
64
|
const hashObject = crypto.createHash(algorithm);
|
|
@@ -73,8 +74,8 @@ export function createCryptoExtension(config = {}) {
|
|
|
73
74
|
if (!hmacKey) {
|
|
74
75
|
throw new RuntimeError('RILL-R004', 'hmacKey required for hmac() — set in config', undefined, {});
|
|
75
76
|
}
|
|
76
|
-
const input = args[
|
|
77
|
-
const algorithm = args[
|
|
77
|
+
const input = args['input'];
|
|
78
|
+
const algorithm = args['algorithm'] ?? defaultAlgorithm;
|
|
78
79
|
// EC-27: Invalid algorithm
|
|
79
80
|
validateAlgorithm(algorithm);
|
|
80
81
|
const hmacObject = crypto.createHmac(algorithm, hmacKey);
|
|
@@ -93,71 +94,73 @@ export function createCryptoExtension(config = {}) {
|
|
|
93
94
|
* IR-26
|
|
94
95
|
*/
|
|
95
96
|
const random = async (args) => {
|
|
96
|
-
const bytes = args[
|
|
97
|
+
const bytes = args['bytes'];
|
|
97
98
|
return crypto.randomBytes(bytes).toString('hex');
|
|
98
99
|
};
|
|
99
100
|
// ============================================================
|
|
100
101
|
// EXTENSION RESULT
|
|
101
102
|
// ============================================================
|
|
102
103
|
return {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
value: {
|
|
105
|
+
hash: toCallable({
|
|
106
|
+
params: [
|
|
107
|
+
{
|
|
108
|
+
name: 'input',
|
|
109
|
+
type: { kind: 'string' },
|
|
110
|
+
defaultValue: undefined,
|
|
111
|
+
annotations: { description: 'Content to hash' },
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'algorithm',
|
|
115
|
+
type: { kind: 'string' },
|
|
116
|
+
defaultValue: defaultAlgorithm,
|
|
117
|
+
annotations: { description: 'Hash algorithm' },
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
fn: hash,
|
|
121
|
+
annotations: { description: 'Hash content, returns hex output' },
|
|
122
|
+
returnType: rillTypeToTypeValue({ kind: 'string' }),
|
|
123
|
+
}),
|
|
124
|
+
hmac: toCallable({
|
|
125
|
+
params: [
|
|
126
|
+
{
|
|
127
|
+
name: 'input',
|
|
128
|
+
type: { kind: 'string' },
|
|
129
|
+
defaultValue: undefined,
|
|
130
|
+
annotations: { description: 'Content to authenticate' },
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: 'algorithm',
|
|
134
|
+
type: { kind: 'string' },
|
|
135
|
+
defaultValue: defaultAlgorithm,
|
|
136
|
+
annotations: { description: 'Hash algorithm' },
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
fn: hmac,
|
|
140
|
+
annotations: {
|
|
141
|
+
description: 'Generate HMAC signature, returns hex output',
|
|
110
142
|
},
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
|
|
132
|
-
type: { type: 'string' },
|
|
133
|
-
defaultValue: defaultAlgorithm,
|
|
134
|
-
annotations: { description: 'Hash algorithm' },
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
|
-
fn: hmac,
|
|
138
|
-
annotations: {
|
|
139
|
-
description: 'Generate HMAC signature, returns hex output',
|
|
140
|
-
},
|
|
141
|
-
returnType: rillTypeToTypeValue({ type: 'string' }),
|
|
142
|
-
},
|
|
143
|
-
uuid: {
|
|
144
|
-
params: [],
|
|
145
|
-
fn: uuid,
|
|
146
|
-
annotations: { description: 'Generate random UUID v4' },
|
|
147
|
-
returnType: rillTypeToTypeValue({ type: 'string' }),
|
|
148
|
-
},
|
|
149
|
-
random: {
|
|
150
|
-
params: [
|
|
151
|
-
{
|
|
152
|
-
name: 'bytes',
|
|
153
|
-
type: { type: 'number' },
|
|
154
|
-
defaultValue: undefined,
|
|
155
|
-
annotations: { description: 'Number of bytes' },
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
fn: random,
|
|
159
|
-
annotations: { description: 'Generate random bytes as hex string' },
|
|
160
|
-
returnType: rillTypeToTypeValue({ type: 'string' }),
|
|
143
|
+
returnType: rillTypeToTypeValue({ kind: 'string' }),
|
|
144
|
+
}),
|
|
145
|
+
uuid: toCallable({
|
|
146
|
+
params: [],
|
|
147
|
+
fn: uuid,
|
|
148
|
+
annotations: { description: 'Generate random UUID v4' },
|
|
149
|
+
returnType: rillTypeToTypeValue({ kind: 'string' }),
|
|
150
|
+
}),
|
|
151
|
+
random: toCallable({
|
|
152
|
+
params: [
|
|
153
|
+
{
|
|
154
|
+
name: 'bytes',
|
|
155
|
+
type: { kind: 'number' },
|
|
156
|
+
defaultValue: undefined,
|
|
157
|
+
annotations: { description: 'Number of bytes' },
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
fn: random,
|
|
161
|
+
annotations: { description: 'Generate random bytes as hex string' },
|
|
162
|
+
returnType: rillTypeToTypeValue({ kind: 'string' }),
|
|
163
|
+
}),
|
|
161
164
|
},
|
|
162
165
|
};
|
|
163
166
|
}
|
|
@@ -168,4 +171,3 @@ export const extensionManifest = {
|
|
|
168
171
|
factory: createCryptoExtension,
|
|
169
172
|
configSchema,
|
|
170
173
|
};
|
|
171
|
-
//# sourceMappingURL=index.js.map
|
package/dist/ext/exec/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides sandboxed command execution via allowlist/blocklist security controls.
|
|
5
5
|
* Each declared command becomes a function with argument validation and process isolation.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { ExtensionFactoryResult, ExtensionConfigSchema, ExtensionManifest } from '../../runtime/ext/extensions.js';
|
|
8
8
|
import { type CommandConfig } from './runner.js';
|
|
9
9
|
export declare const configSchema: ExtensionConfigSchema;
|
|
10
10
|
/** exec extension configuration */
|
|
@@ -27,7 +27,7 @@ export type { CommandConfig };
|
|
|
27
27
|
* Returns dispose() function to abort in-flight processes.
|
|
28
28
|
*
|
|
29
29
|
* @param config - Command definitions and defaults
|
|
30
|
-
* @returns
|
|
30
|
+
* @returns ExtensionFactoryResult with command functions and dispose
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* ```typescript
|
|
@@ -42,6 +42,5 @@ export type { CommandConfig };
|
|
|
42
42
|
* });
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
export declare function createExecExtension(config: ExecConfig):
|
|
45
|
+
export declare function createExecExtension(config: ExecConfig): ExtensionFactoryResult;
|
|
46
46
|
export declare const extensionManifest: ExtensionManifest;
|
|
47
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/ext/exec/index.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Provides sandboxed command execution via allowlist/blocklist security controls.
|
|
5
5
|
* Each declared command becomes a function with argument validation and process isolation.
|
|
6
6
|
*/
|
|
7
|
+
import { toCallable } from '../../runtime/core/callable.js';
|
|
7
8
|
import { rillTypeToTypeValue, } from '../../runtime/core/values.js';
|
|
8
9
|
import { runCommand, } from './runner.js';
|
|
9
10
|
// ============================================================
|
|
@@ -23,7 +24,7 @@ export const configSchema = {
|
|
|
23
24
|
* Returns dispose() function to abort in-flight processes.
|
|
24
25
|
*
|
|
25
26
|
* @param config - Command definitions and defaults
|
|
26
|
-
* @returns
|
|
27
|
+
* @returns ExtensionFactoryResult with command functions and dispose
|
|
27
28
|
*
|
|
28
29
|
* @example
|
|
29
30
|
* ```typescript
|
|
@@ -80,9 +81,9 @@ export function createExecExtension(config) {
|
|
|
80
81
|
for (const [commandName, commandConfig] of Object.entries(config.commands)) {
|
|
81
82
|
// Create function for this command
|
|
82
83
|
const commandFn = async (args) => {
|
|
83
|
-
// Extract args and stdin from
|
|
84
|
-
const argsParam = args[
|
|
85
|
-
const stdinParam = args[
|
|
84
|
+
// Extract args and stdin from named arg map
|
|
85
|
+
const argsParam = args['args'] ?? [];
|
|
86
|
+
const stdinParam = args['stdin'];
|
|
86
87
|
// Convert args to string array
|
|
87
88
|
const stringArgs = argsParam.map((arg) => String(arg));
|
|
88
89
|
// Create abort controller for this execution
|
|
@@ -118,13 +119,13 @@ export function createExecExtension(config) {
|
|
|
118
119
|
params: [
|
|
119
120
|
{
|
|
120
121
|
name: 'args',
|
|
121
|
-
type: {
|
|
122
|
+
type: { kind: 'list' },
|
|
122
123
|
defaultValue: [],
|
|
123
124
|
annotations: { description: 'Command arguments' },
|
|
124
125
|
},
|
|
125
126
|
{
|
|
126
127
|
name: 'stdin',
|
|
127
|
-
type: {
|
|
128
|
+
type: { kind: 'string' },
|
|
128
129
|
defaultValue: '',
|
|
129
130
|
annotations: { description: 'Standard input data' },
|
|
130
131
|
},
|
|
@@ -133,7 +134,7 @@ export function createExecExtension(config) {
|
|
|
133
134
|
annotations: {
|
|
134
135
|
description: commandConfig.description ?? `Execute ${commandName} command`,
|
|
135
136
|
},
|
|
136
|
-
returnType: rillTypeToTypeValue({
|
|
137
|
+
returnType: rillTypeToTypeValue({ kind: 'dict' }),
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
140
|
// ============================================================
|
|
@@ -153,7 +154,7 @@ export function createExecExtension(config) {
|
|
|
153
154
|
params: [],
|
|
154
155
|
fn: commands,
|
|
155
156
|
annotations: { description: 'List all configured commands' },
|
|
156
|
-
returnType: rillTypeToTypeValue({
|
|
157
|
+
returnType: rillTypeToTypeValue({ kind: 'list' }),
|
|
157
158
|
};
|
|
158
159
|
// ============================================================
|
|
159
160
|
// DISPOSE FUNCTION
|
|
@@ -169,9 +170,14 @@ export function createExecExtension(config) {
|
|
|
169
170
|
// ============================================================
|
|
170
171
|
// EXTENSION RESULT
|
|
171
172
|
// ============================================================
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
const callableDict = {};
|
|
174
|
+
for (const [name, def] of Object.entries(functions)) {
|
|
175
|
+
callableDict[name] = toCallable(def);
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
value: callableDict,
|
|
179
|
+
dispose,
|
|
180
|
+
};
|
|
175
181
|
}
|
|
176
182
|
// ============================================================
|
|
177
183
|
// MANIFEST
|
|
@@ -180,4 +186,3 @@ export const extensionManifest = {
|
|
|
180
186
|
factory: createExecExtension,
|
|
181
187
|
configSchema,
|
|
182
188
|
};
|
|
183
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -59,4 +59,3 @@ export interface CommandResult {
|
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
61
|
export declare function runCommand(commandName: string, config: CommandConfig, args: readonly string[], stdinData?: string | undefined, signal?: AbortSignal | undefined): Promise<CommandResult>;
|
|
62
|
-
//# sourceMappingURL=runner.d.ts.map
|
package/dist/ext/exec/runner.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Scripts call endpoints with positional args or single dict argument.
|
|
6
6
|
* All URLs are constructed from config - scripts cannot specify arbitrary URLs.
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
8
|
+
import type { ExtensionFactoryResult, ExtensionConfigSchema, ExtensionManifest } from '../../runtime/ext/extensions.js';
|
|
9
9
|
export declare const configSchema: ExtensionConfigSchema;
|
|
10
10
|
/** Parameter definition for endpoint */
|
|
11
11
|
export interface EndpointParam {
|
|
@@ -46,7 +46,7 @@ export interface FetchConfig {
|
|
|
46
46
|
* All URLs constructed from config - scripts cannot create arbitrary URLs.
|
|
47
47
|
*
|
|
48
48
|
* @param config - Fetch configuration with endpoints
|
|
49
|
-
* @returns
|
|
49
|
+
* @returns ExtensionFactoryResult with endpoint functions and introspection
|
|
50
50
|
* @throws Error on invalid configuration
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
@@ -65,6 +65,5 @@ export interface FetchConfig {
|
|
|
65
65
|
* });
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export declare function createFetchExtension(config: FetchConfig):
|
|
68
|
+
export declare function createFetchExtension(config: FetchConfig): ExtensionFactoryResult;
|
|
69
69
|
export declare const extensionManifest: ExtensionManifest;
|
|
70
|
-
//# sourceMappingURL=index.d.ts.map
|