agency-lang 0.7.0 → 0.7.2
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/lib/agents/agency-agent/agent.agency +169 -28
- package/dist/lib/agents/agency-agent/agent.js +579 -152
- package/dist/lib/agents/agency-agent/lib/attachments.js +2 -2
- package/dist/lib/agents/agency-agent/lib/config.agency +5 -0
- package/dist/lib/agents/agency-agent/lib/config.js +11 -0
- package/dist/lib/agents/agency-agent/lib/defaultPolicy.agency +106 -0
- package/dist/lib/agents/agency-agent/lib/defaultPolicy.js +764 -3
- package/dist/lib/agents/agency-agent/lib/modelFilters.js +1 -1
- package/dist/lib/agents/agency-agent/lib/resolution.js +4 -4
- package/dist/lib/agents/agency-agent/lib/search.js +3 -3
- package/dist/lib/agents/agency-agent/lib/settings.js +1 -1
- package/dist/lib/agents/agency-agent/lib/utils.js +1 -1
- package/dist/lib/agents/agency-agent/shared.agency +22 -0
- package/dist/lib/agents/agency-agent/shared.js +160 -3
- package/dist/lib/agents/agency-agent/subagents/code.js +1 -1
- package/dist/lib/agents/agency-agent/subagents/explorer.js +1 -1
- package/dist/lib/agents/agency-agent/subagents/oracle.js +1 -1
- package/dist/lib/agents/agency-agent/subagents/research.js +1 -1
- package/dist/lib/agents/agency-agent/subagents/review.js +4 -4
- package/dist/lib/agents/agency-agent/tests/agentTurn.js +1 -1
- package/dist/lib/agents/agency-agent/tests/attachments.js +1 -1
- package/dist/lib/agents/agency-agent/tests/attachmentsTurn.js +2 -2
- package/dist/lib/agents/agency-agent/tests/gitPolicy.js +3 -3
- package/dist/lib/agents/agency-agent/tests/oneShotRounds.agency +20 -0
- package/dist/lib/agents/agency-agent/tests/oneShotRounds.js +555 -0
- package/dist/lib/agents/agency-agent/tests/oneShotRounds.test.json +9 -0
- package/dist/lib/agents/review/agent.js +3 -3
- package/dist/lib/cli/doctor.d.ts +8 -0
- package/dist/lib/cli/doctor.js +21 -13
- package/dist/lib/cli/doctor.test.js +34 -0
- package/dist/lib/cli/help.js +1 -5
- package/dist/lib/cli/runBundledAgent.d.ts +17 -1
- package/dist/lib/cli/runBundledAgent.js +73 -2
- package/dist/lib/cli/runBundledAgent.test.d.ts +1 -0
- package/dist/lib/cli/runBundledAgent.test.js +96 -0
- package/dist/lib/config.d.ts +42 -33
- package/dist/lib/config.js +108 -6
- package/dist/lib/config.test.js +121 -2
- package/dist/lib/ir/prettyPrint.js +25 -4
- package/dist/lib/parseCache.js +8 -13
- package/dist/lib/parseCache.test.js +5 -8
- package/dist/lib/parser.js +5 -12
- package/dist/lib/preprocessors/typescriptPreprocessor.d.ts +0 -28
- package/dist/lib/preprocessors/typescriptPreprocessor.js +0 -245
- package/dist/lib/runtime/configOverrides.d.ts +17 -16
- package/dist/lib/runtime/configOverrides.js +27 -16
- package/dist/lib/runtime/configOverrides.test.js +116 -2
- package/dist/lib/runtime/prompt.js +7 -3
- package/dist/lib/runtime/runner.d.ts +2 -2
- package/dist/lib/runtime/runner.js +26 -7
- package/dist/lib/runtime/state/context.js +9 -2
- package/dist/lib/stdlib/llm.d.ts +1 -0
- package/dist/lib/stdlib/version.d.ts +1 -1
- package/dist/lib/stdlib/version.js +1 -1
- package/dist/scripts/agency.d.ts +2 -0
- package/dist/scripts/agency.js +55 -12
- package/dist/scripts/agency.test.js +73 -1
- package/package.json +1 -1
- package/stdlib/agency/eval.js +1 -1
- package/stdlib/agency.js +1 -1
- package/stdlib/agent.agency +9 -9
- package/stdlib/agent.js +5 -5
- package/stdlib/data/tech/hackernews.js +1 -1
- package/stdlib/index.js +15 -15
- package/stdlib/llm.agency +2 -1
- package/stdlib/llm.js +3 -3
- package/stdlib/markdown.js +1 -1
- package/stdlib/memory.js +2 -2
- package/stdlib/object.js +5 -5
- package/stdlib/policy.agency +21 -7
- package/stdlib/policy.js +45 -16
- package/stdlib/skills.js +1 -1
- package/stdlib/strategy.js +3 -3
- package/stdlib/thread.js +3 -3
- package/stdlib/ui/chart.js +2 -2
- package/stdlib/ui/cli.agency +1 -1
- package/stdlib/ui/cli.js +1 -1
- package/stdlib/ui/layout.js +3 -3
- package/stdlib/ui/table.js +2 -2
- package/stdlib/ui.js +3 -3
- package/dist/lib/agents/docs/cli/cli/agent.md +0 -16
- package/dist/lib/agents/docs/cli/cli/compile.md +0 -21
- package/dist/lib/agents/docs/cli/cli/coverage.md +0 -112
- package/dist/lib/agents/docs/cli/cli/debug.md +0 -41
- package/dist/lib/agents/docs/cli/cli/doc.md +0 -98
- package/dist/lib/agents/docs/cli/cli/editor-integration.md +0 -44
- package/dist/lib/agents/docs/cli/cli/eval-judge.md +0 -72
- package/dist/lib/agents/docs/cli/cli/eval.md +0 -194
- package/dist/lib/agents/docs/cli/cli/format.md +0 -23
- package/dist/lib/agents/docs/cli/cli/index.md +0 -7
- package/dist/lib/agents/docs/cli/cli/local.md +0 -92
- package/dist/lib/agents/docs/cli/cli/models.md +0 -63
- package/dist/lib/agents/docs/cli/cli/optimize.md +0 -338
- package/dist/lib/agents/docs/cli/cli/pack.md +0 -56
- package/dist/lib/agents/docs/cli/cli/policy.md +0 -23
- package/dist/lib/agents/docs/cli/cli/preprocess-and-ast.md +0 -21
- package/dist/lib/agents/docs/cli/cli/review.md +0 -16
- package/dist/lib/agents/docs/cli/cli/run.md +0 -79
- package/dist/lib/agents/docs/cli/cli/schedule.md +0 -89
- package/dist/lib/agents/docs/cli/cli/serve.md +0 -52
- package/dist/lib/agents/docs/cli/cli/test.md +0 -44
- package/dist/lib/agents/docs/cli/cli/trace-and-bundle.md +0 -75
- package/dist/lib/agents/docs/cli/cli/typecheck.md +0 -19
- package/dist/lib/agents/docs/guide/guide/advanced-types.md +0 -26
- package/dist/lib/agents/docs/guide/guide/agency-config-file.md +0 -212
- package/dist/lib/agents/docs/guide/guide/agency-packages.md +0 -54
- package/dist/lib/agents/docs/guide/guide/agency-stdlib.md +0 -14
- package/dist/lib/agents/docs/guide/guide/agency-vs-typescript.md +0 -33
- package/dist/lib/agents/docs/guide/guide/attachments.md +0 -56
- package/dist/lib/agents/docs/guide/guide/basic-syntax.md +0 -350
- package/dist/lib/agents/docs/guide/guide/blocks.md +0 -134
- package/dist/lib/agents/docs/guide/guide/build-integration.md +0 -99
- package/dist/lib/agents/docs/guide/guide/builtins.md +0 -84
- package/dist/lib/agents/docs/guide/guide/callbacks.md +0 -169
- package/dist/lib/agents/docs/guide/guide/checkpointing.md +0 -101
- package/dist/lib/agents/docs/guide/guide/cli-args.md +0 -190
- package/dist/lib/agents/docs/guide/guide/common-functions.md +0 -36
- package/dist/lib/agents/docs/guide/guide/compiling-and-running.md +0 -62
- package/dist/lib/agents/docs/guide/guide/concurrency.md +0 -108
- package/dist/lib/agents/docs/guide/guide/cross-thread-context.md +0 -226
- package/dist/lib/agents/docs/guide/guide/custom-providers.md +0 -195
- package/dist/lib/agents/docs/guide/guide/debugging.md +0 -67
- package/dist/lib/agents/docs/guide/guide/developer-tools.md +0 -90
- package/dist/lib/agents/docs/guide/guide/effects-and-raises.md +0 -137
- package/dist/lib/agents/docs/guide/guide/effects.md +0 -100
- package/dist/lib/agents/docs/guide/guide/error-handling.md +0 -161
- package/dist/lib/agents/docs/guide/guide/exercise-1.md +0 -32
- package/dist/lib/agents/docs/guide/guide/functions.md +0 -94
- package/dist/lib/agents/docs/guide/guide/getting-started.md +0 -35
- package/dist/lib/agents/docs/guide/guide/global-var-initialization.md +0 -70
- package/dist/lib/agents/docs/guide/guide/global-vs-static.md +0 -76
- package/dist/lib/agents/docs/guide/guide/guards.md +0 -134
- package/dist/lib/agents/docs/guide/guide/handlers.md +0 -196
- package/dist/lib/agents/docs/guide/guide/image-generation.md +0 -113
- package/dist/lib/agents/docs/guide/guide/imports-and-packages.md +0 -100
- package/dist/lib/agents/docs/guide/guide/interrupts-from-typescript.md +0 -84
- package/dist/lib/agents/docs/guide/guide/interrupts-part-2.md +0 -54
- package/dist/lib/agents/docs/guide/guide/interrupts.md +0 -139
- package/dist/lib/agents/docs/guide/guide/llm-part-2.md +0 -111
- package/dist/lib/agents/docs/guide/guide/llm.md +0 -109
- package/dist/lib/agents/docs/guide/guide/mcp.md +0 -295
- package/dist/lib/agents/docs/guide/guide/memory.md +0 -401
- package/dist/lib/agents/docs/guide/guide/message-threads.md +0 -111
- package/dist/lib/agents/docs/guide/guide/nodes.md +0 -50
- package/dist/lib/agents/docs/guide/guide/observability.md +0 -99
- package/dist/lib/agents/docs/guide/guide/partial-application.md +0 -96
- package/dist/lib/agents/docs/guide/guide/pattern-matching.md +0 -366
- package/dist/lib/agents/docs/guide/guide/policies.md +0 -67
- package/dist/lib/agents/docs/guide/guide/schema-parameter-injection.md +0 -101
- package/dist/lib/agents/docs/guide/guide/schemas.md +0 -99
- package/dist/lib/agents/docs/guide/guide/serving.md +0 -165
- package/dist/lib/agents/docs/guide/guide/state-isolation.md +0 -139
- package/dist/lib/agents/docs/guide/guide/streaming.md +0 -28
- package/dist/lib/agents/docs/guide/guide/tags.md +0 -72
- package/dist/lib/agents/docs/guide/guide/testing.md +0 -187
- package/dist/lib/agents/docs/guide/guide/troubleshooting.md +0 -86
- package/dist/lib/agents/docs/guide/guide/ts-helpers.md +0 -559
- package/dist/lib/agents/docs/guide/guide/ts-interop.md +0 -72
- package/dist/lib/agents/docs/guide/guide/type-validation.md +0 -187
- package/dist/lib/agents/docs/guide/guide/types.md +0 -181
- package/dist/lib/agents/docs/guide/guide/unused.md +0 -178
- package/dist/lib/agents/docs/guide/guide/unused2.md +0 -258
- package/dist/lib/agents/docs/guide/guide/value-parameterized-types.md +0 -186
- package/dist/lib/agents/docs/guide/guide/vscode-extension.md +0 -33
- package/dist/lib/agents/docs/guide/guide/why-agency.md +0 -323
- package/dist/lib/preprocessors/typescriptPreprocessor.config.test.js +0 -327
- package/stdlib/browser.js +0 -421
- package/stdlib/chart.js +0 -983
- package/stdlib/cli.js +0 -1116
- package/stdlib/email.js +0 -1104
- package/stdlib/imessage.js +0 -377
- package/stdlib/keyring.js +0 -803
- package/stdlib/layout.js +0 -3657
- package/stdlib/oauth.js +0 -862
- package/stdlib/schemas.js +0 -223
- package/stdlib/search.js +0 -629
- package/stdlib/sms.js +0 -419
- package/stdlib/table.js +0 -1419
- package/stdlib/threads.js +0 -1041
- package/stdlib/types.js +0 -222
- package/stdlib/validators.js +0 -1606
- /package/dist/lib/{preprocessors/typescriptPreprocessor.config.test.d.ts → cli/doctor.test.d.ts} +0 -0
package/stdlib/validators.js
DELETED
|
@@ -1,1606 +0,0 @@
|
|
|
1
|
-
import { print, printJSON, parseJSON, input, sleep, round, read, write, readImage, notify, range, mostCommon, keys, values, entries, emit, callback } from "agency-lang/stdlib/index.js";
|
|
2
|
-
import { _isEmail, _isUrl, _isUuid, _isInt, _isPositive, _isNegative, _min, _max, _minLength, _maxLength, _matches } from "agency-lang/stdlib-lib/validators.js";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import __process from "process";
|
|
5
|
-
import { z } from "agency-lang/zod";
|
|
6
|
-
import { nanoid } from "agency-lang";
|
|
7
|
-
import path from "path";
|
|
8
|
-
import {
|
|
9
|
-
RuntimeContext,
|
|
10
|
-
Runner,
|
|
11
|
-
setupFunction,
|
|
12
|
-
callHook,
|
|
13
|
-
checkpoint as __checkpoint_impl,
|
|
14
|
-
getCheckpoint as __getCheckpoint_impl,
|
|
15
|
-
restore as __restore_impl,
|
|
16
|
-
_run as __runtime_run_impl,
|
|
17
|
-
interrupt,
|
|
18
|
-
isInterrupt,
|
|
19
|
-
hasInterrupts,
|
|
20
|
-
isDebugger,
|
|
21
|
-
respondToInterrupts as _respondToInterrupts,
|
|
22
|
-
rewindFrom as _rewindFrom,
|
|
23
|
-
runExportedFunction as _runExportedFunction,
|
|
24
|
-
RestoreSignal,
|
|
25
|
-
AgencyAbort,
|
|
26
|
-
__registerGlobalsInit,
|
|
27
|
-
failure,
|
|
28
|
-
isFailure,
|
|
29
|
-
AgencyFunction as __AgencyFunction,
|
|
30
|
-
__call,
|
|
31
|
-
__stateStack,
|
|
32
|
-
__globals,
|
|
33
|
-
getRuntimeContext,
|
|
34
|
-
agencyStore,
|
|
35
|
-
functionRefReviver as __functionRefReviver,
|
|
36
|
-
DeterministicClient as __DeterministicClient,
|
|
37
|
-
createLogger as __createLogger
|
|
38
|
-
} from "agency-lang/runtime";
|
|
39
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
40
|
-
const __dirname = path.dirname(__filename);
|
|
41
|
-
const __cwd = __process.cwd();
|
|
42
|
-
const getDirname = () => __dirname;
|
|
43
|
-
const __globalCtx = new RuntimeContext({
|
|
44
|
-
statelogConfig: {
|
|
45
|
-
host: "https://statelog.adit.io",
|
|
46
|
-
apiKey: __process.env["STATELOG_API_KEY"] || "",
|
|
47
|
-
projectId: "agency-lang",
|
|
48
|
-
debugMode: false,
|
|
49
|
-
observability: true,
|
|
50
|
-
logFile: "log.jsonl"
|
|
51
|
-
},
|
|
52
|
-
smoltalkDefaults: {
|
|
53
|
-
apiKey: {
|
|
54
|
-
openAi: __process.env["OPENAI_API_KEY"] || "",
|
|
55
|
-
google: __process.env["GEMINI_API_KEY"] || "",
|
|
56
|
-
anthropic: __process.env["ANTHROPIC_API_KEY"] || "",
|
|
57
|
-
openRouter: __process.env["OPENROUTER_API_KEY"] || "",
|
|
58
|
-
deepInfra: __process.env["DEEPINFRA_API_KEY"] || "",
|
|
59
|
-
liteLlm: __process.env["LITELLM_API_KEY"] || "",
|
|
60
|
-
openAiCompat: __process.env["OPENAI_COMPAT_API_KEY"] || ""
|
|
61
|
-
},
|
|
62
|
-
baseUrl: {
|
|
63
|
-
liteLlm: __process.env["LITELLM_BASE_URL"] || "",
|
|
64
|
-
openAiCompat: __process.env["OPENAI_COMPAT_BASE_URL"] || ""
|
|
65
|
-
},
|
|
66
|
-
model: "gpt-4o-mini",
|
|
67
|
-
logLevel: "warn",
|
|
68
|
-
statelog: {
|
|
69
|
-
host: "https://statelog.adit.io",
|
|
70
|
-
projectId: "smoltalk",
|
|
71
|
-
apiKey: __process.env["STATELOG_SMOLTALK_API_KEY"] || "",
|
|
72
|
-
traceId: nanoid()
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
dirname: __dirname,
|
|
76
|
-
logLevel: "info",
|
|
77
|
-
traceConfig: {
|
|
78
|
-
program: "stdlib/validators.agency"
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
const graph = __globalCtx.graph;
|
|
82
|
-
function approve(value) {
|
|
83
|
-
return { type: "approve", value };
|
|
84
|
-
}
|
|
85
|
-
function reject(value) {
|
|
86
|
-
return { type: "reject", value };
|
|
87
|
-
}
|
|
88
|
-
function propagate() {
|
|
89
|
-
return { type: "propagate" };
|
|
90
|
-
}
|
|
91
|
-
const respondToInterrupts = (interrupts, responses, opts) => _respondToInterrupts({ ctx: __globalCtx, interrupts, responses, overrides: opts?.overrides, metadata: opts?.metadata, registerTopLevelCallbacks: __registerTopLevelCallbacks, moduleDir: __dirname });
|
|
92
|
-
const rewindFrom = (checkpoint2, overrides, opts) => _rewindFrom({ ctx: __globalCtx, checkpoint: checkpoint2, overrides, metadata: opts?.metadata, registerTopLevelCallbacks: __registerTopLevelCallbacks, moduleDir: __dirname });
|
|
93
|
-
const __invokeFunction = (fn, namedArgs) => _runExportedFunction({ ctx: __globalCtx, fn, namedArgs, initializeGlobals: __initializeGlobals, registerTopLevelCallbacks: __registerTopLevelCallbacks, moduleDir: __dirname });
|
|
94
|
-
const __setDebugger = (dbg) => {
|
|
95
|
-
__globalCtx.debuggerState = dbg;
|
|
96
|
-
};
|
|
97
|
-
const __setTraceFile = (filePath) => {
|
|
98
|
-
__globalCtx.traceConfig.traceFile = filePath;
|
|
99
|
-
};
|
|
100
|
-
const __setLLMClient = (client) => {
|
|
101
|
-
__globalCtx.setLLMClient(client);
|
|
102
|
-
};
|
|
103
|
-
const __getCheckpoints = () => __globalCtx.checkpoints;
|
|
104
|
-
if (__process.env.AGENCY_LLM_MOCKS) {
|
|
105
|
-
__globalCtx.setLLMClient(
|
|
106
|
-
new __DeterministicClient(JSON.parse(__process.env.AGENCY_LLM_MOCKS))
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
const __toolRegistry = __functionRefReviver.registry ??= {};
|
|
110
|
-
function __registerTool(value, _aliasName) {
|
|
111
|
-
if (__AgencyFunction.isAgencyFunction(value)) {
|
|
112
|
-
__toolRegistry[`${value.module}:${value.name}`] = value;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
const checkpoint = __AgencyFunction.create({ name: "checkpoint", module: "__runtime", fn: __checkpoint_impl, params: [], toolDefinition: null }, __toolRegistry);
|
|
116
|
-
const getCheckpoint = __AgencyFunction.create({ name: "getCheckpoint", module: "__runtime", fn: __getCheckpoint_impl, params: [{ name: "checkpointId", hasDefault: false, defaultValue: void 0, variadic: false }], toolDefinition: null }, __toolRegistry);
|
|
117
|
-
const restore = __AgencyFunction.create({ name: "restore", module: "__runtime", fn: __restore_impl, params: [{ name: "checkpointIdOrCheckpoint", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "options", hasDefault: false, defaultValue: void 0, variadic: false }], toolDefinition: null }, __toolRegistry);
|
|
118
|
-
const _run = __AgencyFunction.create({ name: "_run", module: "__runtime", fn: __runtime_run_impl, params: [{ name: "compiled", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "node", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "args", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "wallClock", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "memory", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "ipcPayload", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "stdout", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "configOverrides", hasDefault: false, defaultValue: void 0, variadic: false }, { name: "cwd", hasDefault: false, defaultValue: void 0, variadic: false }], toolDefinition: null }, __toolRegistry);
|
|
119
|
-
function setLLMClient(client) {
|
|
120
|
-
__globalCtx.setLLMClient(client);
|
|
121
|
-
}
|
|
122
|
-
function registerTools(tools) {
|
|
123
|
-
for (const tool of tools) {
|
|
124
|
-
if (__AgencyFunction.isAgencyFunction(tool)) {
|
|
125
|
-
__toolRegistry[`${tool.module}:${tool.name}`] = tool;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
__registerTool(print);
|
|
130
|
-
__registerTool(printJSON);
|
|
131
|
-
__registerTool(parseJSON);
|
|
132
|
-
__registerTool(input);
|
|
133
|
-
__registerTool(sleep);
|
|
134
|
-
__registerTool(round);
|
|
135
|
-
__registerTool(read);
|
|
136
|
-
__registerTool(write);
|
|
137
|
-
__registerTool(readImage);
|
|
138
|
-
__registerTool(notify);
|
|
139
|
-
__registerTool(range);
|
|
140
|
-
__registerTool(mostCommon);
|
|
141
|
-
__registerTool(keys);
|
|
142
|
-
__registerTool(values);
|
|
143
|
-
__registerTool(entries);
|
|
144
|
-
__registerTool(emit);
|
|
145
|
-
__registerTool(callback);
|
|
146
|
-
async function __initializeGlobals(__ctx) {
|
|
147
|
-
if (__ctx.globals.isInitialized("stdlib/validators.agency")) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
__ctx.globals.markInitialized("stdlib/validators.agency");
|
|
151
|
-
}
|
|
152
|
-
__registerGlobalsInit("stdlib/validators.agency", __initializeGlobals);
|
|
153
|
-
async function __registerTopLevelCallbacks(__ctx) {
|
|
154
|
-
__ctx.topLevelCallbacks = [];
|
|
155
|
-
}
|
|
156
|
-
__functionRefReviver.registry = __toolRegistry;
|
|
157
|
-
async function __isEmail_impl(value) {
|
|
158
|
-
const __setupData = setupFunction();
|
|
159
|
-
const __stack = __setupData.stack;
|
|
160
|
-
const __step = __setupData.step;
|
|
161
|
-
const __self = __setupData.self;
|
|
162
|
-
const __ctx = getRuntimeContext().ctx;
|
|
163
|
-
let __forked;
|
|
164
|
-
let __functionCompleted = false;
|
|
165
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
166
|
-
await __initializeGlobals(__ctx);
|
|
167
|
-
}
|
|
168
|
-
let __funcStartTime = performance.now();
|
|
169
|
-
__stack.args["value"] = value;
|
|
170
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
171
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "isEmail", threads: __setupData.threads });
|
|
172
|
-
let __resultCheckpointId = -1;
|
|
173
|
-
if (__ctx._pendingArgOverrides) {
|
|
174
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
175
|
-
__ctx._pendingArgOverrides = void 0;
|
|
176
|
-
if ("value" in __overrides) {
|
|
177
|
-
value = __overrides["value"];
|
|
178
|
-
__stack.args["value"] = value;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
try {
|
|
182
|
-
await agencyStore.run({
|
|
183
|
-
...getRuntimeContext(),
|
|
184
|
-
ctx: __ctx,
|
|
185
|
-
stack: __setupData.stateStack,
|
|
186
|
-
threads: __setupData.threads
|
|
187
|
-
}, async () => {
|
|
188
|
-
await runner.hook(0, async () => {
|
|
189
|
-
await callHook({
|
|
190
|
-
name: "onFunctionStart",
|
|
191
|
-
data: {
|
|
192
|
-
functionName: "isEmail",
|
|
193
|
-
args: {
|
|
194
|
-
value
|
|
195
|
-
},
|
|
196
|
-
isBuiltin: false,
|
|
197
|
-
moduleId: "stdlib/validators.agency"
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
await runner.step(1, async (runner2) => {
|
|
202
|
-
__functionCompleted = true;
|
|
203
|
-
runner2.halt(await __call(_isEmail, {
|
|
204
|
-
type: "positional",
|
|
205
|
-
args: [__stack.args.value]
|
|
206
|
-
}));
|
|
207
|
-
return;
|
|
208
|
-
});
|
|
209
|
-
});
|
|
210
|
-
if (runner.halted) {
|
|
211
|
-
if (isFailure(runner.haltResult)) {
|
|
212
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
213
|
-
}
|
|
214
|
-
return runner.haltResult;
|
|
215
|
-
}
|
|
216
|
-
} catch (__error) {
|
|
217
|
-
if (__error instanceof RestoreSignal) {
|
|
218
|
-
throw __error;
|
|
219
|
-
}
|
|
220
|
-
if (__error instanceof AgencyAbort) {
|
|
221
|
-
throw __error;
|
|
222
|
-
}
|
|
223
|
-
{
|
|
224
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
225
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
226
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
227
|
-
__log.error("Function isEmail threw an exception (converted to Failure): " + __errMsg);
|
|
228
|
-
if (__errStack) __log.error(__errStack);
|
|
229
|
-
__ctx.statelogClient?.error?.({
|
|
230
|
-
errorType: "runtimeError",
|
|
231
|
-
message: __errMsg,
|
|
232
|
-
functionName: "isEmail",
|
|
233
|
-
retryable: __self.__retryable
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
return failure(
|
|
237
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
238
|
-
{
|
|
239
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
240
|
-
retryable: __self.__retryable,
|
|
241
|
-
functionName: "isEmail",
|
|
242
|
-
args: __stack.args
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
} finally {
|
|
246
|
-
__stateStack()?.pop();
|
|
247
|
-
if (__functionCompleted) {
|
|
248
|
-
await callHook({
|
|
249
|
-
name: "onFunctionEnd",
|
|
250
|
-
data: {
|
|
251
|
-
functionName: "isEmail",
|
|
252
|
-
timeTaken: performance.now() - __funcStartTime
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
const isEmail = __AgencyFunction.create({
|
|
259
|
-
name: "isEmail",
|
|
260
|
-
module: "stdlib/validators.agency",
|
|
261
|
-
fn: __isEmail_impl,
|
|
262
|
-
params: [{
|
|
263
|
-
name: "value",
|
|
264
|
-
hasDefault: false,
|
|
265
|
-
defaultValue: void 0,
|
|
266
|
-
variadic: false,
|
|
267
|
-
isFunctionTyped: false
|
|
268
|
-
}],
|
|
269
|
-
toolDefinition: {
|
|
270
|
-
name: "isEmail",
|
|
271
|
-
description: `Returns success if value is a syntactically valid email address,
|
|
272
|
-
failure otherwise.
|
|
273
|
-
|
|
274
|
-
@param value - The string to check.`,
|
|
275
|
-
schema: z.object({ "value": z.string() })
|
|
276
|
-
},
|
|
277
|
-
safe: true,
|
|
278
|
-
exported: true
|
|
279
|
-
}, __toolRegistry);
|
|
280
|
-
async function __isUrl_impl(value) {
|
|
281
|
-
const __setupData = setupFunction();
|
|
282
|
-
const __stack = __setupData.stack;
|
|
283
|
-
const __step = __setupData.step;
|
|
284
|
-
const __self = __setupData.self;
|
|
285
|
-
const __ctx = getRuntimeContext().ctx;
|
|
286
|
-
let __forked;
|
|
287
|
-
let __functionCompleted = false;
|
|
288
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
289
|
-
await __initializeGlobals(__ctx);
|
|
290
|
-
}
|
|
291
|
-
let __funcStartTime = performance.now();
|
|
292
|
-
__stack.args["value"] = value;
|
|
293
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
294
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "isUrl", threads: __setupData.threads });
|
|
295
|
-
let __resultCheckpointId = -1;
|
|
296
|
-
if (__ctx._pendingArgOverrides) {
|
|
297
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
298
|
-
__ctx._pendingArgOverrides = void 0;
|
|
299
|
-
if ("value" in __overrides) {
|
|
300
|
-
value = __overrides["value"];
|
|
301
|
-
__stack.args["value"] = value;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
try {
|
|
305
|
-
await agencyStore.run({
|
|
306
|
-
...getRuntimeContext(),
|
|
307
|
-
ctx: __ctx,
|
|
308
|
-
stack: __setupData.stateStack,
|
|
309
|
-
threads: __setupData.threads
|
|
310
|
-
}, async () => {
|
|
311
|
-
await runner.hook(0, async () => {
|
|
312
|
-
await callHook({
|
|
313
|
-
name: "onFunctionStart",
|
|
314
|
-
data: {
|
|
315
|
-
functionName: "isUrl",
|
|
316
|
-
args: {
|
|
317
|
-
value
|
|
318
|
-
},
|
|
319
|
-
isBuiltin: false,
|
|
320
|
-
moduleId: "stdlib/validators.agency"
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
});
|
|
324
|
-
await runner.step(1, async (runner2) => {
|
|
325
|
-
__functionCompleted = true;
|
|
326
|
-
runner2.halt(await __call(_isUrl, {
|
|
327
|
-
type: "positional",
|
|
328
|
-
args: [__stack.args.value]
|
|
329
|
-
}));
|
|
330
|
-
return;
|
|
331
|
-
});
|
|
332
|
-
});
|
|
333
|
-
if (runner.halted) {
|
|
334
|
-
if (isFailure(runner.haltResult)) {
|
|
335
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
336
|
-
}
|
|
337
|
-
return runner.haltResult;
|
|
338
|
-
}
|
|
339
|
-
} catch (__error) {
|
|
340
|
-
if (__error instanceof RestoreSignal) {
|
|
341
|
-
throw __error;
|
|
342
|
-
}
|
|
343
|
-
if (__error instanceof AgencyAbort) {
|
|
344
|
-
throw __error;
|
|
345
|
-
}
|
|
346
|
-
{
|
|
347
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
348
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
349
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
350
|
-
__log.error("Function isUrl threw an exception (converted to Failure): " + __errMsg);
|
|
351
|
-
if (__errStack) __log.error(__errStack);
|
|
352
|
-
__ctx.statelogClient?.error?.({
|
|
353
|
-
errorType: "runtimeError",
|
|
354
|
-
message: __errMsg,
|
|
355
|
-
functionName: "isUrl",
|
|
356
|
-
retryable: __self.__retryable
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
return failure(
|
|
360
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
361
|
-
{
|
|
362
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
363
|
-
retryable: __self.__retryable,
|
|
364
|
-
functionName: "isUrl",
|
|
365
|
-
args: __stack.args
|
|
366
|
-
}
|
|
367
|
-
);
|
|
368
|
-
} finally {
|
|
369
|
-
__stateStack()?.pop();
|
|
370
|
-
if (__functionCompleted) {
|
|
371
|
-
await callHook({
|
|
372
|
-
name: "onFunctionEnd",
|
|
373
|
-
data: {
|
|
374
|
-
functionName: "isUrl",
|
|
375
|
-
timeTaken: performance.now() - __funcStartTime
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
const isUrl = __AgencyFunction.create({
|
|
382
|
-
name: "isUrl",
|
|
383
|
-
module: "stdlib/validators.agency",
|
|
384
|
-
fn: __isUrl_impl,
|
|
385
|
-
params: [{
|
|
386
|
-
name: "value",
|
|
387
|
-
hasDefault: false,
|
|
388
|
-
defaultValue: void 0,
|
|
389
|
-
variadic: false,
|
|
390
|
-
isFunctionTyped: false
|
|
391
|
-
}],
|
|
392
|
-
toolDefinition: {
|
|
393
|
-
name: "isUrl",
|
|
394
|
-
description: `Returns success if value is an http:// or https:// URL,
|
|
395
|
-
failure otherwise.
|
|
396
|
-
|
|
397
|
-
@param value - The string to check.`,
|
|
398
|
-
schema: z.object({ "value": z.string() })
|
|
399
|
-
},
|
|
400
|
-
safe: true,
|
|
401
|
-
exported: true
|
|
402
|
-
}, __toolRegistry);
|
|
403
|
-
async function __isUuid_impl(value) {
|
|
404
|
-
const __setupData = setupFunction();
|
|
405
|
-
const __stack = __setupData.stack;
|
|
406
|
-
const __step = __setupData.step;
|
|
407
|
-
const __self = __setupData.self;
|
|
408
|
-
const __ctx = getRuntimeContext().ctx;
|
|
409
|
-
let __forked;
|
|
410
|
-
let __functionCompleted = false;
|
|
411
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
412
|
-
await __initializeGlobals(__ctx);
|
|
413
|
-
}
|
|
414
|
-
let __funcStartTime = performance.now();
|
|
415
|
-
__stack.args["value"] = value;
|
|
416
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
417
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "isUuid", threads: __setupData.threads });
|
|
418
|
-
let __resultCheckpointId = -1;
|
|
419
|
-
if (__ctx._pendingArgOverrides) {
|
|
420
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
421
|
-
__ctx._pendingArgOverrides = void 0;
|
|
422
|
-
if ("value" in __overrides) {
|
|
423
|
-
value = __overrides["value"];
|
|
424
|
-
__stack.args["value"] = value;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
try {
|
|
428
|
-
await agencyStore.run({
|
|
429
|
-
...getRuntimeContext(),
|
|
430
|
-
ctx: __ctx,
|
|
431
|
-
stack: __setupData.stateStack,
|
|
432
|
-
threads: __setupData.threads
|
|
433
|
-
}, async () => {
|
|
434
|
-
await runner.hook(0, async () => {
|
|
435
|
-
await callHook({
|
|
436
|
-
name: "onFunctionStart",
|
|
437
|
-
data: {
|
|
438
|
-
functionName: "isUuid",
|
|
439
|
-
args: {
|
|
440
|
-
value
|
|
441
|
-
},
|
|
442
|
-
isBuiltin: false,
|
|
443
|
-
moduleId: "stdlib/validators.agency"
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
});
|
|
447
|
-
await runner.step(1, async (runner2) => {
|
|
448
|
-
__functionCompleted = true;
|
|
449
|
-
runner2.halt(await __call(_isUuid, {
|
|
450
|
-
type: "positional",
|
|
451
|
-
args: [__stack.args.value]
|
|
452
|
-
}));
|
|
453
|
-
return;
|
|
454
|
-
});
|
|
455
|
-
});
|
|
456
|
-
if (runner.halted) {
|
|
457
|
-
if (isFailure(runner.haltResult)) {
|
|
458
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
459
|
-
}
|
|
460
|
-
return runner.haltResult;
|
|
461
|
-
}
|
|
462
|
-
} catch (__error) {
|
|
463
|
-
if (__error instanceof RestoreSignal) {
|
|
464
|
-
throw __error;
|
|
465
|
-
}
|
|
466
|
-
if (__error instanceof AgencyAbort) {
|
|
467
|
-
throw __error;
|
|
468
|
-
}
|
|
469
|
-
{
|
|
470
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
471
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
472
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
473
|
-
__log.error("Function isUuid threw an exception (converted to Failure): " + __errMsg);
|
|
474
|
-
if (__errStack) __log.error(__errStack);
|
|
475
|
-
__ctx.statelogClient?.error?.({
|
|
476
|
-
errorType: "runtimeError",
|
|
477
|
-
message: __errMsg,
|
|
478
|
-
functionName: "isUuid",
|
|
479
|
-
retryable: __self.__retryable
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
return failure(
|
|
483
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
484
|
-
{
|
|
485
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
486
|
-
retryable: __self.__retryable,
|
|
487
|
-
functionName: "isUuid",
|
|
488
|
-
args: __stack.args
|
|
489
|
-
}
|
|
490
|
-
);
|
|
491
|
-
} finally {
|
|
492
|
-
__stateStack()?.pop();
|
|
493
|
-
if (__functionCompleted) {
|
|
494
|
-
await callHook({
|
|
495
|
-
name: "onFunctionEnd",
|
|
496
|
-
data: {
|
|
497
|
-
functionName: "isUuid",
|
|
498
|
-
timeTaken: performance.now() - __funcStartTime
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
const isUuid = __AgencyFunction.create({
|
|
505
|
-
name: "isUuid",
|
|
506
|
-
module: "stdlib/validators.agency",
|
|
507
|
-
fn: __isUuid_impl,
|
|
508
|
-
params: [{
|
|
509
|
-
name: "value",
|
|
510
|
-
hasDefault: false,
|
|
511
|
-
defaultValue: void 0,
|
|
512
|
-
variadic: false,
|
|
513
|
-
isFunctionTyped: false
|
|
514
|
-
}],
|
|
515
|
-
toolDefinition: {
|
|
516
|
-
name: "isUuid",
|
|
517
|
-
description: `Returns success if value is a canonical UUID string
|
|
518
|
-
(8-4-4-4-12 hex), failure otherwise.
|
|
519
|
-
|
|
520
|
-
@param value - The string to check.`,
|
|
521
|
-
schema: z.object({ "value": z.string() })
|
|
522
|
-
},
|
|
523
|
-
safe: true,
|
|
524
|
-
exported: true
|
|
525
|
-
}, __toolRegistry);
|
|
526
|
-
async function __isInt_impl(value) {
|
|
527
|
-
const __setupData = setupFunction();
|
|
528
|
-
const __stack = __setupData.stack;
|
|
529
|
-
const __step = __setupData.step;
|
|
530
|
-
const __self = __setupData.self;
|
|
531
|
-
const __ctx = getRuntimeContext().ctx;
|
|
532
|
-
let __forked;
|
|
533
|
-
let __functionCompleted = false;
|
|
534
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
535
|
-
await __initializeGlobals(__ctx);
|
|
536
|
-
}
|
|
537
|
-
let __funcStartTime = performance.now();
|
|
538
|
-
__stack.args["value"] = value;
|
|
539
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
540
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "isInt", threads: __setupData.threads });
|
|
541
|
-
let __resultCheckpointId = -1;
|
|
542
|
-
if (__ctx._pendingArgOverrides) {
|
|
543
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
544
|
-
__ctx._pendingArgOverrides = void 0;
|
|
545
|
-
if ("value" in __overrides) {
|
|
546
|
-
value = __overrides["value"];
|
|
547
|
-
__stack.args["value"] = value;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
try {
|
|
551
|
-
await agencyStore.run({
|
|
552
|
-
...getRuntimeContext(),
|
|
553
|
-
ctx: __ctx,
|
|
554
|
-
stack: __setupData.stateStack,
|
|
555
|
-
threads: __setupData.threads
|
|
556
|
-
}, async () => {
|
|
557
|
-
await runner.hook(0, async () => {
|
|
558
|
-
await callHook({
|
|
559
|
-
name: "onFunctionStart",
|
|
560
|
-
data: {
|
|
561
|
-
functionName: "isInt",
|
|
562
|
-
args: {
|
|
563
|
-
value
|
|
564
|
-
},
|
|
565
|
-
isBuiltin: false,
|
|
566
|
-
moduleId: "stdlib/validators.agency"
|
|
567
|
-
}
|
|
568
|
-
});
|
|
569
|
-
});
|
|
570
|
-
await runner.step(1, async (runner2) => {
|
|
571
|
-
__functionCompleted = true;
|
|
572
|
-
runner2.halt(await __call(_isInt, {
|
|
573
|
-
type: "positional",
|
|
574
|
-
args: [__stack.args.value]
|
|
575
|
-
}));
|
|
576
|
-
return;
|
|
577
|
-
});
|
|
578
|
-
});
|
|
579
|
-
if (runner.halted) {
|
|
580
|
-
if (isFailure(runner.haltResult)) {
|
|
581
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
582
|
-
}
|
|
583
|
-
return runner.haltResult;
|
|
584
|
-
}
|
|
585
|
-
} catch (__error) {
|
|
586
|
-
if (__error instanceof RestoreSignal) {
|
|
587
|
-
throw __error;
|
|
588
|
-
}
|
|
589
|
-
if (__error instanceof AgencyAbort) {
|
|
590
|
-
throw __error;
|
|
591
|
-
}
|
|
592
|
-
{
|
|
593
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
594
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
595
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
596
|
-
__log.error("Function isInt threw an exception (converted to Failure): " + __errMsg);
|
|
597
|
-
if (__errStack) __log.error(__errStack);
|
|
598
|
-
__ctx.statelogClient?.error?.({
|
|
599
|
-
errorType: "runtimeError",
|
|
600
|
-
message: __errMsg,
|
|
601
|
-
functionName: "isInt",
|
|
602
|
-
retryable: __self.__retryable
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
return failure(
|
|
606
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
607
|
-
{
|
|
608
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
609
|
-
retryable: __self.__retryable,
|
|
610
|
-
functionName: "isInt",
|
|
611
|
-
args: __stack.args
|
|
612
|
-
}
|
|
613
|
-
);
|
|
614
|
-
} finally {
|
|
615
|
-
__stateStack()?.pop();
|
|
616
|
-
if (__functionCompleted) {
|
|
617
|
-
await callHook({
|
|
618
|
-
name: "onFunctionEnd",
|
|
619
|
-
data: {
|
|
620
|
-
functionName: "isInt",
|
|
621
|
-
timeTaken: performance.now() - __funcStartTime
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
const isInt = __AgencyFunction.create({
|
|
628
|
-
name: "isInt",
|
|
629
|
-
module: "stdlib/validators.agency",
|
|
630
|
-
fn: __isInt_impl,
|
|
631
|
-
params: [{
|
|
632
|
-
name: "value",
|
|
633
|
-
hasDefault: false,
|
|
634
|
-
defaultValue: void 0,
|
|
635
|
-
variadic: false,
|
|
636
|
-
isFunctionTyped: false
|
|
637
|
-
}],
|
|
638
|
-
toolDefinition: {
|
|
639
|
-
name: "isInt",
|
|
640
|
-
description: `Returns success if value is an integer (no fractional component),
|
|
641
|
-
failure otherwise.
|
|
642
|
-
|
|
643
|
-
@param value - The number to check.`,
|
|
644
|
-
schema: z.object({ "value": z.number() })
|
|
645
|
-
},
|
|
646
|
-
safe: true,
|
|
647
|
-
exported: true
|
|
648
|
-
}, __toolRegistry);
|
|
649
|
-
async function __isPositive_impl(value) {
|
|
650
|
-
const __setupData = setupFunction();
|
|
651
|
-
const __stack = __setupData.stack;
|
|
652
|
-
const __step = __setupData.step;
|
|
653
|
-
const __self = __setupData.self;
|
|
654
|
-
const __ctx = getRuntimeContext().ctx;
|
|
655
|
-
let __forked;
|
|
656
|
-
let __functionCompleted = false;
|
|
657
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
658
|
-
await __initializeGlobals(__ctx);
|
|
659
|
-
}
|
|
660
|
-
let __funcStartTime = performance.now();
|
|
661
|
-
__stack.args["value"] = value;
|
|
662
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
663
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "isPositive", threads: __setupData.threads });
|
|
664
|
-
let __resultCheckpointId = -1;
|
|
665
|
-
if (__ctx._pendingArgOverrides) {
|
|
666
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
667
|
-
__ctx._pendingArgOverrides = void 0;
|
|
668
|
-
if ("value" in __overrides) {
|
|
669
|
-
value = __overrides["value"];
|
|
670
|
-
__stack.args["value"] = value;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
try {
|
|
674
|
-
await agencyStore.run({
|
|
675
|
-
...getRuntimeContext(),
|
|
676
|
-
ctx: __ctx,
|
|
677
|
-
stack: __setupData.stateStack,
|
|
678
|
-
threads: __setupData.threads
|
|
679
|
-
}, async () => {
|
|
680
|
-
await runner.hook(0, async () => {
|
|
681
|
-
await callHook({
|
|
682
|
-
name: "onFunctionStart",
|
|
683
|
-
data: {
|
|
684
|
-
functionName: "isPositive",
|
|
685
|
-
args: {
|
|
686
|
-
value
|
|
687
|
-
},
|
|
688
|
-
isBuiltin: false,
|
|
689
|
-
moduleId: "stdlib/validators.agency"
|
|
690
|
-
}
|
|
691
|
-
});
|
|
692
|
-
});
|
|
693
|
-
await runner.step(1, async (runner2) => {
|
|
694
|
-
__functionCompleted = true;
|
|
695
|
-
runner2.halt(await __call(_isPositive, {
|
|
696
|
-
type: "positional",
|
|
697
|
-
args: [__stack.args.value]
|
|
698
|
-
}));
|
|
699
|
-
return;
|
|
700
|
-
});
|
|
701
|
-
});
|
|
702
|
-
if (runner.halted) {
|
|
703
|
-
if (isFailure(runner.haltResult)) {
|
|
704
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
705
|
-
}
|
|
706
|
-
return runner.haltResult;
|
|
707
|
-
}
|
|
708
|
-
} catch (__error) {
|
|
709
|
-
if (__error instanceof RestoreSignal) {
|
|
710
|
-
throw __error;
|
|
711
|
-
}
|
|
712
|
-
if (__error instanceof AgencyAbort) {
|
|
713
|
-
throw __error;
|
|
714
|
-
}
|
|
715
|
-
{
|
|
716
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
717
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
718
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
719
|
-
__log.error("Function isPositive threw an exception (converted to Failure): " + __errMsg);
|
|
720
|
-
if (__errStack) __log.error(__errStack);
|
|
721
|
-
__ctx.statelogClient?.error?.({
|
|
722
|
-
errorType: "runtimeError",
|
|
723
|
-
message: __errMsg,
|
|
724
|
-
functionName: "isPositive",
|
|
725
|
-
retryable: __self.__retryable
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
return failure(
|
|
729
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
730
|
-
{
|
|
731
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
732
|
-
retryable: __self.__retryable,
|
|
733
|
-
functionName: "isPositive",
|
|
734
|
-
args: __stack.args
|
|
735
|
-
}
|
|
736
|
-
);
|
|
737
|
-
} finally {
|
|
738
|
-
__stateStack()?.pop();
|
|
739
|
-
if (__functionCompleted) {
|
|
740
|
-
await callHook({
|
|
741
|
-
name: "onFunctionEnd",
|
|
742
|
-
data: {
|
|
743
|
-
functionName: "isPositive",
|
|
744
|
-
timeTaken: performance.now() - __funcStartTime
|
|
745
|
-
}
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
const isPositive = __AgencyFunction.create({
|
|
751
|
-
name: "isPositive",
|
|
752
|
-
module: "stdlib/validators.agency",
|
|
753
|
-
fn: __isPositive_impl,
|
|
754
|
-
params: [{
|
|
755
|
-
name: "value",
|
|
756
|
-
hasDefault: false,
|
|
757
|
-
defaultValue: void 0,
|
|
758
|
-
variadic: false,
|
|
759
|
-
isFunctionTyped: false
|
|
760
|
-
}],
|
|
761
|
-
toolDefinition: {
|
|
762
|
-
name: "isPositive",
|
|
763
|
-
description: `Returns success if value > 0, failure otherwise.
|
|
764
|
-
|
|
765
|
-
@param value - The number to check.`,
|
|
766
|
-
schema: z.object({ "value": z.number() })
|
|
767
|
-
},
|
|
768
|
-
safe: true,
|
|
769
|
-
exported: true
|
|
770
|
-
}, __toolRegistry);
|
|
771
|
-
async function __isNegative_impl(value) {
|
|
772
|
-
const __setupData = setupFunction();
|
|
773
|
-
const __stack = __setupData.stack;
|
|
774
|
-
const __step = __setupData.step;
|
|
775
|
-
const __self = __setupData.self;
|
|
776
|
-
const __ctx = getRuntimeContext().ctx;
|
|
777
|
-
let __forked;
|
|
778
|
-
let __functionCompleted = false;
|
|
779
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
780
|
-
await __initializeGlobals(__ctx);
|
|
781
|
-
}
|
|
782
|
-
let __funcStartTime = performance.now();
|
|
783
|
-
__stack.args["value"] = value;
|
|
784
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
785
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "isNegative", threads: __setupData.threads });
|
|
786
|
-
let __resultCheckpointId = -1;
|
|
787
|
-
if (__ctx._pendingArgOverrides) {
|
|
788
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
789
|
-
__ctx._pendingArgOverrides = void 0;
|
|
790
|
-
if ("value" in __overrides) {
|
|
791
|
-
value = __overrides["value"];
|
|
792
|
-
__stack.args["value"] = value;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
try {
|
|
796
|
-
await agencyStore.run({
|
|
797
|
-
...getRuntimeContext(),
|
|
798
|
-
ctx: __ctx,
|
|
799
|
-
stack: __setupData.stateStack,
|
|
800
|
-
threads: __setupData.threads
|
|
801
|
-
}, async () => {
|
|
802
|
-
await runner.hook(0, async () => {
|
|
803
|
-
await callHook({
|
|
804
|
-
name: "onFunctionStart",
|
|
805
|
-
data: {
|
|
806
|
-
functionName: "isNegative",
|
|
807
|
-
args: {
|
|
808
|
-
value
|
|
809
|
-
},
|
|
810
|
-
isBuiltin: false,
|
|
811
|
-
moduleId: "stdlib/validators.agency"
|
|
812
|
-
}
|
|
813
|
-
});
|
|
814
|
-
});
|
|
815
|
-
await runner.step(1, async (runner2) => {
|
|
816
|
-
__functionCompleted = true;
|
|
817
|
-
runner2.halt(await __call(_isNegative, {
|
|
818
|
-
type: "positional",
|
|
819
|
-
args: [__stack.args.value]
|
|
820
|
-
}));
|
|
821
|
-
return;
|
|
822
|
-
});
|
|
823
|
-
});
|
|
824
|
-
if (runner.halted) {
|
|
825
|
-
if (isFailure(runner.haltResult)) {
|
|
826
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
827
|
-
}
|
|
828
|
-
return runner.haltResult;
|
|
829
|
-
}
|
|
830
|
-
} catch (__error) {
|
|
831
|
-
if (__error instanceof RestoreSignal) {
|
|
832
|
-
throw __error;
|
|
833
|
-
}
|
|
834
|
-
if (__error instanceof AgencyAbort) {
|
|
835
|
-
throw __error;
|
|
836
|
-
}
|
|
837
|
-
{
|
|
838
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
839
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
840
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
841
|
-
__log.error("Function isNegative threw an exception (converted to Failure): " + __errMsg);
|
|
842
|
-
if (__errStack) __log.error(__errStack);
|
|
843
|
-
__ctx.statelogClient?.error?.({
|
|
844
|
-
errorType: "runtimeError",
|
|
845
|
-
message: __errMsg,
|
|
846
|
-
functionName: "isNegative",
|
|
847
|
-
retryable: __self.__retryable
|
|
848
|
-
});
|
|
849
|
-
}
|
|
850
|
-
return failure(
|
|
851
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
852
|
-
{
|
|
853
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
854
|
-
retryable: __self.__retryable,
|
|
855
|
-
functionName: "isNegative",
|
|
856
|
-
args: __stack.args
|
|
857
|
-
}
|
|
858
|
-
);
|
|
859
|
-
} finally {
|
|
860
|
-
__stateStack()?.pop();
|
|
861
|
-
if (__functionCompleted) {
|
|
862
|
-
await callHook({
|
|
863
|
-
name: "onFunctionEnd",
|
|
864
|
-
data: {
|
|
865
|
-
functionName: "isNegative",
|
|
866
|
-
timeTaken: performance.now() - __funcStartTime
|
|
867
|
-
}
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
const isNegative = __AgencyFunction.create({
|
|
873
|
-
name: "isNegative",
|
|
874
|
-
module: "stdlib/validators.agency",
|
|
875
|
-
fn: __isNegative_impl,
|
|
876
|
-
params: [{
|
|
877
|
-
name: "value",
|
|
878
|
-
hasDefault: false,
|
|
879
|
-
defaultValue: void 0,
|
|
880
|
-
variadic: false,
|
|
881
|
-
isFunctionTyped: false
|
|
882
|
-
}],
|
|
883
|
-
toolDefinition: {
|
|
884
|
-
name: "isNegative",
|
|
885
|
-
description: `Returns success if value < 0, failure otherwise.
|
|
886
|
-
|
|
887
|
-
@param value - The number to check.`,
|
|
888
|
-
schema: z.object({ "value": z.number() })
|
|
889
|
-
},
|
|
890
|
-
safe: true,
|
|
891
|
-
exported: true
|
|
892
|
-
}, __toolRegistry);
|
|
893
|
-
async function __min_impl(n, value) {
|
|
894
|
-
const __setupData = setupFunction();
|
|
895
|
-
const __stack = __setupData.stack;
|
|
896
|
-
const __step = __setupData.step;
|
|
897
|
-
const __self = __setupData.self;
|
|
898
|
-
const __ctx = getRuntimeContext().ctx;
|
|
899
|
-
let __forked;
|
|
900
|
-
let __functionCompleted = false;
|
|
901
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
902
|
-
await __initializeGlobals(__ctx);
|
|
903
|
-
}
|
|
904
|
-
let __funcStartTime = performance.now();
|
|
905
|
-
__stack.args["n"] = n;
|
|
906
|
-
__stack.args["value"] = value;
|
|
907
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
908
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "min", threads: __setupData.threads });
|
|
909
|
-
let __resultCheckpointId = -1;
|
|
910
|
-
if (__ctx._pendingArgOverrides) {
|
|
911
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
912
|
-
__ctx._pendingArgOverrides = void 0;
|
|
913
|
-
if ("n" in __overrides) {
|
|
914
|
-
n = __overrides["n"];
|
|
915
|
-
__stack.args["n"] = n;
|
|
916
|
-
}
|
|
917
|
-
if ("value" in __overrides) {
|
|
918
|
-
value = __overrides["value"];
|
|
919
|
-
__stack.args["value"] = value;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
try {
|
|
923
|
-
await agencyStore.run({
|
|
924
|
-
...getRuntimeContext(),
|
|
925
|
-
ctx: __ctx,
|
|
926
|
-
stack: __setupData.stateStack,
|
|
927
|
-
threads: __setupData.threads
|
|
928
|
-
}, async () => {
|
|
929
|
-
await runner.hook(0, async () => {
|
|
930
|
-
await callHook({
|
|
931
|
-
name: "onFunctionStart",
|
|
932
|
-
data: {
|
|
933
|
-
functionName: "min",
|
|
934
|
-
args: {
|
|
935
|
-
n,
|
|
936
|
-
value
|
|
937
|
-
},
|
|
938
|
-
isBuiltin: false,
|
|
939
|
-
moduleId: "stdlib/validators.agency"
|
|
940
|
-
}
|
|
941
|
-
});
|
|
942
|
-
});
|
|
943
|
-
await runner.step(1, async (runner2) => {
|
|
944
|
-
__functionCompleted = true;
|
|
945
|
-
runner2.halt(await __call(_min, {
|
|
946
|
-
type: "positional",
|
|
947
|
-
args: [__stack.args.n, __stack.args.value]
|
|
948
|
-
}));
|
|
949
|
-
return;
|
|
950
|
-
});
|
|
951
|
-
});
|
|
952
|
-
if (runner.halted) {
|
|
953
|
-
if (isFailure(runner.haltResult)) {
|
|
954
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
955
|
-
}
|
|
956
|
-
return runner.haltResult;
|
|
957
|
-
}
|
|
958
|
-
} catch (__error) {
|
|
959
|
-
if (__error instanceof RestoreSignal) {
|
|
960
|
-
throw __error;
|
|
961
|
-
}
|
|
962
|
-
if (__error instanceof AgencyAbort) {
|
|
963
|
-
throw __error;
|
|
964
|
-
}
|
|
965
|
-
{
|
|
966
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
967
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
968
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
969
|
-
__log.error("Function min threw an exception (converted to Failure): " + __errMsg);
|
|
970
|
-
if (__errStack) __log.error(__errStack);
|
|
971
|
-
__ctx.statelogClient?.error?.({
|
|
972
|
-
errorType: "runtimeError",
|
|
973
|
-
message: __errMsg,
|
|
974
|
-
functionName: "min",
|
|
975
|
-
retryable: __self.__retryable
|
|
976
|
-
});
|
|
977
|
-
}
|
|
978
|
-
return failure(
|
|
979
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
980
|
-
{
|
|
981
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
982
|
-
retryable: __self.__retryable,
|
|
983
|
-
functionName: "min",
|
|
984
|
-
args: __stack.args
|
|
985
|
-
}
|
|
986
|
-
);
|
|
987
|
-
} finally {
|
|
988
|
-
__stateStack()?.pop();
|
|
989
|
-
if (__functionCompleted) {
|
|
990
|
-
await callHook({
|
|
991
|
-
name: "onFunctionEnd",
|
|
992
|
-
data: {
|
|
993
|
-
functionName: "min",
|
|
994
|
-
timeTaken: performance.now() - __funcStartTime
|
|
995
|
-
}
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
const min = __AgencyFunction.create({
|
|
1001
|
-
name: "min",
|
|
1002
|
-
module: "stdlib/validators.agency",
|
|
1003
|
-
fn: __min_impl,
|
|
1004
|
-
params: [{
|
|
1005
|
-
name: "n",
|
|
1006
|
-
hasDefault: false,
|
|
1007
|
-
defaultValue: void 0,
|
|
1008
|
-
variadic: false,
|
|
1009
|
-
isFunctionTyped: false
|
|
1010
|
-
}, {
|
|
1011
|
-
name: "value",
|
|
1012
|
-
hasDefault: false,
|
|
1013
|
-
defaultValue: void 0,
|
|
1014
|
-
variadic: false,
|
|
1015
|
-
isFunctionTyped: false
|
|
1016
|
-
}],
|
|
1017
|
-
toolDefinition: {
|
|
1018
|
-
name: "min",
|
|
1019
|
-
description: `Returns success if \`value >= n\`, failure otherwise. Bind \`n\` via PFA
|
|
1020
|
-
before passing to \`@validate(...)\`, e.g. \`@validate(min.partial(n: 0))\`.
|
|
1021
|
-
|
|
1022
|
-
@param n - The inclusive minimum allowed value.
|
|
1023
|
-
@param value - The number to check.`,
|
|
1024
|
-
schema: z.object({ "n": z.number(), "value": z.number() })
|
|
1025
|
-
},
|
|
1026
|
-
safe: true,
|
|
1027
|
-
exported: true
|
|
1028
|
-
}, __toolRegistry);
|
|
1029
|
-
async function __max_impl(n, value) {
|
|
1030
|
-
const __setupData = setupFunction();
|
|
1031
|
-
const __stack = __setupData.stack;
|
|
1032
|
-
const __step = __setupData.step;
|
|
1033
|
-
const __self = __setupData.self;
|
|
1034
|
-
const __ctx = getRuntimeContext().ctx;
|
|
1035
|
-
let __forked;
|
|
1036
|
-
let __functionCompleted = false;
|
|
1037
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
1038
|
-
await __initializeGlobals(__ctx);
|
|
1039
|
-
}
|
|
1040
|
-
let __funcStartTime = performance.now();
|
|
1041
|
-
__stack.args["n"] = n;
|
|
1042
|
-
__stack.args["value"] = value;
|
|
1043
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
1044
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "max", threads: __setupData.threads });
|
|
1045
|
-
let __resultCheckpointId = -1;
|
|
1046
|
-
if (__ctx._pendingArgOverrides) {
|
|
1047
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1048
|
-
__ctx._pendingArgOverrides = void 0;
|
|
1049
|
-
if ("n" in __overrides) {
|
|
1050
|
-
n = __overrides["n"];
|
|
1051
|
-
__stack.args["n"] = n;
|
|
1052
|
-
}
|
|
1053
|
-
if ("value" in __overrides) {
|
|
1054
|
-
value = __overrides["value"];
|
|
1055
|
-
__stack.args["value"] = value;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
try {
|
|
1059
|
-
await agencyStore.run({
|
|
1060
|
-
...getRuntimeContext(),
|
|
1061
|
-
ctx: __ctx,
|
|
1062
|
-
stack: __setupData.stateStack,
|
|
1063
|
-
threads: __setupData.threads
|
|
1064
|
-
}, async () => {
|
|
1065
|
-
await runner.hook(0, async () => {
|
|
1066
|
-
await callHook({
|
|
1067
|
-
name: "onFunctionStart",
|
|
1068
|
-
data: {
|
|
1069
|
-
functionName: "max",
|
|
1070
|
-
args: {
|
|
1071
|
-
n,
|
|
1072
|
-
value
|
|
1073
|
-
},
|
|
1074
|
-
isBuiltin: false,
|
|
1075
|
-
moduleId: "stdlib/validators.agency"
|
|
1076
|
-
}
|
|
1077
|
-
});
|
|
1078
|
-
});
|
|
1079
|
-
await runner.step(1, async (runner2) => {
|
|
1080
|
-
__functionCompleted = true;
|
|
1081
|
-
runner2.halt(await __call(_max, {
|
|
1082
|
-
type: "positional",
|
|
1083
|
-
args: [__stack.args.n, __stack.args.value]
|
|
1084
|
-
}));
|
|
1085
|
-
return;
|
|
1086
|
-
});
|
|
1087
|
-
});
|
|
1088
|
-
if (runner.halted) {
|
|
1089
|
-
if (isFailure(runner.haltResult)) {
|
|
1090
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
1091
|
-
}
|
|
1092
|
-
return runner.haltResult;
|
|
1093
|
-
}
|
|
1094
|
-
} catch (__error) {
|
|
1095
|
-
if (__error instanceof RestoreSignal) {
|
|
1096
|
-
throw __error;
|
|
1097
|
-
}
|
|
1098
|
-
if (__error instanceof AgencyAbort) {
|
|
1099
|
-
throw __error;
|
|
1100
|
-
}
|
|
1101
|
-
{
|
|
1102
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
1103
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
1104
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
1105
|
-
__log.error("Function max threw an exception (converted to Failure): " + __errMsg);
|
|
1106
|
-
if (__errStack) __log.error(__errStack);
|
|
1107
|
-
__ctx.statelogClient?.error?.({
|
|
1108
|
-
errorType: "runtimeError",
|
|
1109
|
-
message: __errMsg,
|
|
1110
|
-
functionName: "max",
|
|
1111
|
-
retryable: __self.__retryable
|
|
1112
|
-
});
|
|
1113
|
-
}
|
|
1114
|
-
return failure(
|
|
1115
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
1116
|
-
{
|
|
1117
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1118
|
-
retryable: __self.__retryable,
|
|
1119
|
-
functionName: "max",
|
|
1120
|
-
args: __stack.args
|
|
1121
|
-
}
|
|
1122
|
-
);
|
|
1123
|
-
} finally {
|
|
1124
|
-
__stateStack()?.pop();
|
|
1125
|
-
if (__functionCompleted) {
|
|
1126
|
-
await callHook({
|
|
1127
|
-
name: "onFunctionEnd",
|
|
1128
|
-
data: {
|
|
1129
|
-
functionName: "max",
|
|
1130
|
-
timeTaken: performance.now() - __funcStartTime
|
|
1131
|
-
}
|
|
1132
|
-
});
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
const max = __AgencyFunction.create({
|
|
1137
|
-
name: "max",
|
|
1138
|
-
module: "stdlib/validators.agency",
|
|
1139
|
-
fn: __max_impl,
|
|
1140
|
-
params: [{
|
|
1141
|
-
name: "n",
|
|
1142
|
-
hasDefault: false,
|
|
1143
|
-
defaultValue: void 0,
|
|
1144
|
-
variadic: false,
|
|
1145
|
-
isFunctionTyped: false
|
|
1146
|
-
}, {
|
|
1147
|
-
name: "value",
|
|
1148
|
-
hasDefault: false,
|
|
1149
|
-
defaultValue: void 0,
|
|
1150
|
-
variadic: false,
|
|
1151
|
-
isFunctionTyped: false
|
|
1152
|
-
}],
|
|
1153
|
-
toolDefinition: {
|
|
1154
|
-
name: "max",
|
|
1155
|
-
description: `Returns success if \`value <= n\`, failure otherwise. Bind \`n\` via PFA
|
|
1156
|
-
before passing to \`@validate(...)\`, e.g. \`@validate(max.partial(n: 150))\`.
|
|
1157
|
-
|
|
1158
|
-
@param n - The inclusive maximum allowed value.
|
|
1159
|
-
@param value - The number to check.`,
|
|
1160
|
-
schema: z.object({ "n": z.number(), "value": z.number() })
|
|
1161
|
-
},
|
|
1162
|
-
safe: true,
|
|
1163
|
-
exported: true
|
|
1164
|
-
}, __toolRegistry);
|
|
1165
|
-
async function __minLength_impl(n, value) {
|
|
1166
|
-
const __setupData = setupFunction();
|
|
1167
|
-
const __stack = __setupData.stack;
|
|
1168
|
-
const __step = __setupData.step;
|
|
1169
|
-
const __self = __setupData.self;
|
|
1170
|
-
const __ctx = getRuntimeContext().ctx;
|
|
1171
|
-
let __forked;
|
|
1172
|
-
let __functionCompleted = false;
|
|
1173
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
1174
|
-
await __initializeGlobals(__ctx);
|
|
1175
|
-
}
|
|
1176
|
-
let __funcStartTime = performance.now();
|
|
1177
|
-
__stack.args["n"] = n;
|
|
1178
|
-
__stack.args["value"] = value;
|
|
1179
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
1180
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "minLength", threads: __setupData.threads });
|
|
1181
|
-
let __resultCheckpointId = -1;
|
|
1182
|
-
if (__ctx._pendingArgOverrides) {
|
|
1183
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1184
|
-
__ctx._pendingArgOverrides = void 0;
|
|
1185
|
-
if ("n" in __overrides) {
|
|
1186
|
-
n = __overrides["n"];
|
|
1187
|
-
__stack.args["n"] = n;
|
|
1188
|
-
}
|
|
1189
|
-
if ("value" in __overrides) {
|
|
1190
|
-
value = __overrides["value"];
|
|
1191
|
-
__stack.args["value"] = value;
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
try {
|
|
1195
|
-
await agencyStore.run({
|
|
1196
|
-
...getRuntimeContext(),
|
|
1197
|
-
ctx: __ctx,
|
|
1198
|
-
stack: __setupData.stateStack,
|
|
1199
|
-
threads: __setupData.threads
|
|
1200
|
-
}, async () => {
|
|
1201
|
-
await runner.hook(0, async () => {
|
|
1202
|
-
await callHook({
|
|
1203
|
-
name: "onFunctionStart",
|
|
1204
|
-
data: {
|
|
1205
|
-
functionName: "minLength",
|
|
1206
|
-
args: {
|
|
1207
|
-
n,
|
|
1208
|
-
value
|
|
1209
|
-
},
|
|
1210
|
-
isBuiltin: false,
|
|
1211
|
-
moduleId: "stdlib/validators.agency"
|
|
1212
|
-
}
|
|
1213
|
-
});
|
|
1214
|
-
});
|
|
1215
|
-
await runner.step(1, async (runner2) => {
|
|
1216
|
-
__functionCompleted = true;
|
|
1217
|
-
runner2.halt(await __call(_minLength, {
|
|
1218
|
-
type: "positional",
|
|
1219
|
-
args: [__stack.args.n, __stack.args.value]
|
|
1220
|
-
}));
|
|
1221
|
-
return;
|
|
1222
|
-
});
|
|
1223
|
-
});
|
|
1224
|
-
if (runner.halted) {
|
|
1225
|
-
if (isFailure(runner.haltResult)) {
|
|
1226
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
1227
|
-
}
|
|
1228
|
-
return runner.haltResult;
|
|
1229
|
-
}
|
|
1230
|
-
} catch (__error) {
|
|
1231
|
-
if (__error instanceof RestoreSignal) {
|
|
1232
|
-
throw __error;
|
|
1233
|
-
}
|
|
1234
|
-
if (__error instanceof AgencyAbort) {
|
|
1235
|
-
throw __error;
|
|
1236
|
-
}
|
|
1237
|
-
{
|
|
1238
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
1239
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
1240
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
1241
|
-
__log.error("Function minLength threw an exception (converted to Failure): " + __errMsg);
|
|
1242
|
-
if (__errStack) __log.error(__errStack);
|
|
1243
|
-
__ctx.statelogClient?.error?.({
|
|
1244
|
-
errorType: "runtimeError",
|
|
1245
|
-
message: __errMsg,
|
|
1246
|
-
functionName: "minLength",
|
|
1247
|
-
retryable: __self.__retryable
|
|
1248
|
-
});
|
|
1249
|
-
}
|
|
1250
|
-
return failure(
|
|
1251
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
1252
|
-
{
|
|
1253
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1254
|
-
retryable: __self.__retryable,
|
|
1255
|
-
functionName: "minLength",
|
|
1256
|
-
args: __stack.args
|
|
1257
|
-
}
|
|
1258
|
-
);
|
|
1259
|
-
} finally {
|
|
1260
|
-
__stateStack()?.pop();
|
|
1261
|
-
if (__functionCompleted) {
|
|
1262
|
-
await callHook({
|
|
1263
|
-
name: "onFunctionEnd",
|
|
1264
|
-
data: {
|
|
1265
|
-
functionName: "minLength",
|
|
1266
|
-
timeTaken: performance.now() - __funcStartTime
|
|
1267
|
-
}
|
|
1268
|
-
});
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
const minLength = __AgencyFunction.create({
|
|
1273
|
-
name: "minLength",
|
|
1274
|
-
module: "stdlib/validators.agency",
|
|
1275
|
-
fn: __minLength_impl,
|
|
1276
|
-
params: [{
|
|
1277
|
-
name: "n",
|
|
1278
|
-
hasDefault: false,
|
|
1279
|
-
defaultValue: void 0,
|
|
1280
|
-
variadic: false,
|
|
1281
|
-
isFunctionTyped: false
|
|
1282
|
-
}, {
|
|
1283
|
-
name: "value",
|
|
1284
|
-
hasDefault: false,
|
|
1285
|
-
defaultValue: void 0,
|
|
1286
|
-
variadic: false,
|
|
1287
|
-
isFunctionTyped: false
|
|
1288
|
-
}],
|
|
1289
|
-
toolDefinition: {
|
|
1290
|
-
name: "minLength",
|
|
1291
|
-
description: `Returns success if \`value.length >= n\`, failure otherwise. Bind \`n\`
|
|
1292
|
-
via PFA before passing to \`@validate(...)\`, e.g.
|
|
1293
|
-
\`@validate(minLength.partial(n: 3))\`.
|
|
1294
|
-
|
|
1295
|
-
@param n - The inclusive minimum allowed length.
|
|
1296
|
-
@param value - The string to check.`,
|
|
1297
|
-
schema: z.object({ "n": z.number(), "value": z.string() })
|
|
1298
|
-
},
|
|
1299
|
-
safe: true,
|
|
1300
|
-
exported: true
|
|
1301
|
-
}, __toolRegistry);
|
|
1302
|
-
async function __maxLength_impl(n, value) {
|
|
1303
|
-
const __setupData = setupFunction();
|
|
1304
|
-
const __stack = __setupData.stack;
|
|
1305
|
-
const __step = __setupData.step;
|
|
1306
|
-
const __self = __setupData.self;
|
|
1307
|
-
const __ctx = getRuntimeContext().ctx;
|
|
1308
|
-
let __forked;
|
|
1309
|
-
let __functionCompleted = false;
|
|
1310
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
1311
|
-
await __initializeGlobals(__ctx);
|
|
1312
|
-
}
|
|
1313
|
-
let __funcStartTime = performance.now();
|
|
1314
|
-
__stack.args["n"] = n;
|
|
1315
|
-
__stack.args["value"] = value;
|
|
1316
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
1317
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "maxLength", threads: __setupData.threads });
|
|
1318
|
-
let __resultCheckpointId = -1;
|
|
1319
|
-
if (__ctx._pendingArgOverrides) {
|
|
1320
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1321
|
-
__ctx._pendingArgOverrides = void 0;
|
|
1322
|
-
if ("n" in __overrides) {
|
|
1323
|
-
n = __overrides["n"];
|
|
1324
|
-
__stack.args["n"] = n;
|
|
1325
|
-
}
|
|
1326
|
-
if ("value" in __overrides) {
|
|
1327
|
-
value = __overrides["value"];
|
|
1328
|
-
__stack.args["value"] = value;
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
try {
|
|
1332
|
-
await agencyStore.run({
|
|
1333
|
-
...getRuntimeContext(),
|
|
1334
|
-
ctx: __ctx,
|
|
1335
|
-
stack: __setupData.stateStack,
|
|
1336
|
-
threads: __setupData.threads
|
|
1337
|
-
}, async () => {
|
|
1338
|
-
await runner.hook(0, async () => {
|
|
1339
|
-
await callHook({
|
|
1340
|
-
name: "onFunctionStart",
|
|
1341
|
-
data: {
|
|
1342
|
-
functionName: "maxLength",
|
|
1343
|
-
args: {
|
|
1344
|
-
n,
|
|
1345
|
-
value
|
|
1346
|
-
},
|
|
1347
|
-
isBuiltin: false,
|
|
1348
|
-
moduleId: "stdlib/validators.agency"
|
|
1349
|
-
}
|
|
1350
|
-
});
|
|
1351
|
-
});
|
|
1352
|
-
await runner.step(1, async (runner2) => {
|
|
1353
|
-
__functionCompleted = true;
|
|
1354
|
-
runner2.halt(await __call(_maxLength, {
|
|
1355
|
-
type: "positional",
|
|
1356
|
-
args: [__stack.args.n, __stack.args.value]
|
|
1357
|
-
}));
|
|
1358
|
-
return;
|
|
1359
|
-
});
|
|
1360
|
-
});
|
|
1361
|
-
if (runner.halted) {
|
|
1362
|
-
if (isFailure(runner.haltResult)) {
|
|
1363
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
1364
|
-
}
|
|
1365
|
-
return runner.haltResult;
|
|
1366
|
-
}
|
|
1367
|
-
} catch (__error) {
|
|
1368
|
-
if (__error instanceof RestoreSignal) {
|
|
1369
|
-
throw __error;
|
|
1370
|
-
}
|
|
1371
|
-
if (__error instanceof AgencyAbort) {
|
|
1372
|
-
throw __error;
|
|
1373
|
-
}
|
|
1374
|
-
{
|
|
1375
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
1376
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
1377
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
1378
|
-
__log.error("Function maxLength threw an exception (converted to Failure): " + __errMsg);
|
|
1379
|
-
if (__errStack) __log.error(__errStack);
|
|
1380
|
-
__ctx.statelogClient?.error?.({
|
|
1381
|
-
errorType: "runtimeError",
|
|
1382
|
-
message: __errMsg,
|
|
1383
|
-
functionName: "maxLength",
|
|
1384
|
-
retryable: __self.__retryable
|
|
1385
|
-
});
|
|
1386
|
-
}
|
|
1387
|
-
return failure(
|
|
1388
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
1389
|
-
{
|
|
1390
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1391
|
-
retryable: __self.__retryable,
|
|
1392
|
-
functionName: "maxLength",
|
|
1393
|
-
args: __stack.args
|
|
1394
|
-
}
|
|
1395
|
-
);
|
|
1396
|
-
} finally {
|
|
1397
|
-
__stateStack()?.pop();
|
|
1398
|
-
if (__functionCompleted) {
|
|
1399
|
-
await callHook({
|
|
1400
|
-
name: "onFunctionEnd",
|
|
1401
|
-
data: {
|
|
1402
|
-
functionName: "maxLength",
|
|
1403
|
-
timeTaken: performance.now() - __funcStartTime
|
|
1404
|
-
}
|
|
1405
|
-
});
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
const maxLength = __AgencyFunction.create({
|
|
1410
|
-
name: "maxLength",
|
|
1411
|
-
module: "stdlib/validators.agency",
|
|
1412
|
-
fn: __maxLength_impl,
|
|
1413
|
-
params: [{
|
|
1414
|
-
name: "n",
|
|
1415
|
-
hasDefault: false,
|
|
1416
|
-
defaultValue: void 0,
|
|
1417
|
-
variadic: false,
|
|
1418
|
-
isFunctionTyped: false
|
|
1419
|
-
}, {
|
|
1420
|
-
name: "value",
|
|
1421
|
-
hasDefault: false,
|
|
1422
|
-
defaultValue: void 0,
|
|
1423
|
-
variadic: false,
|
|
1424
|
-
isFunctionTyped: false
|
|
1425
|
-
}],
|
|
1426
|
-
toolDefinition: {
|
|
1427
|
-
name: "maxLength",
|
|
1428
|
-
description: `Returns success if \`value.length <= n\`, failure otherwise. Bind \`n\`
|
|
1429
|
-
via PFA before passing to \`@validate(...)\`, e.g.
|
|
1430
|
-
\`@validate(maxLength.partial(n: 80))\`.
|
|
1431
|
-
|
|
1432
|
-
@param n - The inclusive maximum allowed length.
|
|
1433
|
-
@param value - The string to check.`,
|
|
1434
|
-
schema: z.object({ "n": z.number(), "value": z.string() })
|
|
1435
|
-
},
|
|
1436
|
-
safe: true,
|
|
1437
|
-
exported: true
|
|
1438
|
-
}, __toolRegistry);
|
|
1439
|
-
async function __matches_impl(pattern, value) {
|
|
1440
|
-
const __setupData = setupFunction();
|
|
1441
|
-
const __stack = __setupData.stack;
|
|
1442
|
-
const __step = __setupData.step;
|
|
1443
|
-
const __self = __setupData.self;
|
|
1444
|
-
const __ctx = getRuntimeContext().ctx;
|
|
1445
|
-
let __forked;
|
|
1446
|
-
let __functionCompleted = false;
|
|
1447
|
-
if (!__globals().isInitialized("stdlib/validators.agency")) {
|
|
1448
|
-
await __initializeGlobals(__ctx);
|
|
1449
|
-
}
|
|
1450
|
-
let __funcStartTime = performance.now();
|
|
1451
|
-
__stack.args["pattern"] = pattern;
|
|
1452
|
-
__stack.args["value"] = value;
|
|
1453
|
-
__self.__retryable = __self.__retryable ?? true;
|
|
1454
|
-
const runner = new Runner(__ctx, __stack, { state: __stack, moduleId: "stdlib/validators.agency", scopeName: "matches", threads: __setupData.threads });
|
|
1455
|
-
let __resultCheckpointId = -1;
|
|
1456
|
-
if (__ctx._pendingArgOverrides) {
|
|
1457
|
-
const __overrides = __ctx._pendingArgOverrides;
|
|
1458
|
-
__ctx._pendingArgOverrides = void 0;
|
|
1459
|
-
if ("pattern" in __overrides) {
|
|
1460
|
-
pattern = __overrides["pattern"];
|
|
1461
|
-
__stack.args["pattern"] = pattern;
|
|
1462
|
-
}
|
|
1463
|
-
if ("value" in __overrides) {
|
|
1464
|
-
value = __overrides["value"];
|
|
1465
|
-
__stack.args["value"] = value;
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
try {
|
|
1469
|
-
await agencyStore.run({
|
|
1470
|
-
...getRuntimeContext(),
|
|
1471
|
-
ctx: __ctx,
|
|
1472
|
-
stack: __setupData.stateStack,
|
|
1473
|
-
threads: __setupData.threads
|
|
1474
|
-
}, async () => {
|
|
1475
|
-
await runner.hook(0, async () => {
|
|
1476
|
-
await callHook({
|
|
1477
|
-
name: "onFunctionStart",
|
|
1478
|
-
data: {
|
|
1479
|
-
functionName: "matches",
|
|
1480
|
-
args: {
|
|
1481
|
-
pattern,
|
|
1482
|
-
value
|
|
1483
|
-
},
|
|
1484
|
-
isBuiltin: false,
|
|
1485
|
-
moduleId: "stdlib/validators.agency"
|
|
1486
|
-
}
|
|
1487
|
-
});
|
|
1488
|
-
});
|
|
1489
|
-
await runner.step(1, async (runner2) => {
|
|
1490
|
-
__functionCompleted = true;
|
|
1491
|
-
runner2.halt(await __call(_matches, {
|
|
1492
|
-
type: "positional",
|
|
1493
|
-
args: [__stack.args.pattern, __stack.args.value]
|
|
1494
|
-
}));
|
|
1495
|
-
return;
|
|
1496
|
-
});
|
|
1497
|
-
});
|
|
1498
|
-
if (runner.halted) {
|
|
1499
|
-
if (isFailure(runner.haltResult)) {
|
|
1500
|
-
runner.haltResult.retryable = runner.haltResult.retryable && __self.__retryable;
|
|
1501
|
-
}
|
|
1502
|
-
return runner.haltResult;
|
|
1503
|
-
}
|
|
1504
|
-
} catch (__error) {
|
|
1505
|
-
if (__error instanceof RestoreSignal) {
|
|
1506
|
-
throw __error;
|
|
1507
|
-
}
|
|
1508
|
-
if (__error instanceof AgencyAbort) {
|
|
1509
|
-
throw __error;
|
|
1510
|
-
}
|
|
1511
|
-
{
|
|
1512
|
-
const __errMsg = __error instanceof Error ? __error.message : String(__error);
|
|
1513
|
-
const __errStack = __error instanceof Error && __error.stack ? __error.stack : "";
|
|
1514
|
-
const __log = __createLogger(__ctx.logLevel);
|
|
1515
|
-
__log.error("Function matches threw an exception (converted to Failure): " + __errMsg);
|
|
1516
|
-
if (__errStack) __log.error(__errStack);
|
|
1517
|
-
__ctx.statelogClient?.error?.({
|
|
1518
|
-
errorType: "runtimeError",
|
|
1519
|
-
message: __errMsg,
|
|
1520
|
-
functionName: "matches",
|
|
1521
|
-
retryable: __self.__retryable
|
|
1522
|
-
});
|
|
1523
|
-
}
|
|
1524
|
-
return failure(
|
|
1525
|
-
__error instanceof Error ? __error.message : String(__error),
|
|
1526
|
-
{
|
|
1527
|
-
checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),
|
|
1528
|
-
retryable: __self.__retryable,
|
|
1529
|
-
functionName: "matches",
|
|
1530
|
-
args: __stack.args
|
|
1531
|
-
}
|
|
1532
|
-
);
|
|
1533
|
-
} finally {
|
|
1534
|
-
__stateStack()?.pop();
|
|
1535
|
-
if (__functionCompleted) {
|
|
1536
|
-
await callHook({
|
|
1537
|
-
name: "onFunctionEnd",
|
|
1538
|
-
data: {
|
|
1539
|
-
functionName: "matches",
|
|
1540
|
-
timeTaken: performance.now() - __funcStartTime
|
|
1541
|
-
}
|
|
1542
|
-
});
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
const matches = __AgencyFunction.create({
|
|
1547
|
-
name: "matches",
|
|
1548
|
-
module: "stdlib/validators.agency",
|
|
1549
|
-
fn: __matches_impl,
|
|
1550
|
-
params: [{
|
|
1551
|
-
name: "pattern",
|
|
1552
|
-
hasDefault: false,
|
|
1553
|
-
defaultValue: void 0,
|
|
1554
|
-
variadic: false,
|
|
1555
|
-
isFunctionTyped: false
|
|
1556
|
-
}, {
|
|
1557
|
-
name: "value",
|
|
1558
|
-
hasDefault: false,
|
|
1559
|
-
defaultValue: void 0,
|
|
1560
|
-
variadic: false,
|
|
1561
|
-
isFunctionTyped: false
|
|
1562
|
-
}],
|
|
1563
|
-
toolDefinition: {
|
|
1564
|
-
name: "matches",
|
|
1565
|
-
description: `Returns success if \`value\` matches the regular expression \`pattern\`,
|
|
1566
|
-
failure otherwise. Bind \`pattern\` via PFA before passing to
|
|
1567
|
-
\`@validate(...)\`, e.g. \`@validate(matches.partial(pattern: "^[A-Z]"))\`.
|
|
1568
|
-
|
|
1569
|
-
@param pattern - The regular expression source to match against.
|
|
1570
|
-
@param value - The string to check.`,
|
|
1571
|
-
schema: z.object({ "pattern": z.string(), "value": z.string() })
|
|
1572
|
-
},
|
|
1573
|
-
safe: true,
|
|
1574
|
-
exported: true
|
|
1575
|
-
}, __toolRegistry);
|
|
1576
|
-
var stdin_default = graph;
|
|
1577
|
-
const __sourceMap = { "stdlib/validators.agency:isEmail": { "1": { "line": 42, "col": 2 } }, "stdlib/validators.agency:isUrl": { "1": { "line": 52, "col": 2 } }, "stdlib/validators.agency:isUuid": { "1": { "line": 62, "col": 2 } }, "stdlib/validators.agency:isInt": { "1": { "line": 72, "col": 2 } }, "stdlib/validators.agency:isPositive": { "1": { "line": 81, "col": 2 } }, "stdlib/validators.agency:isNegative": { "1": { "line": 90, "col": 2 } }, "stdlib/validators.agency:min": { "1": { "line": 101, "col": 2 } }, "stdlib/validators.agency:max": { "1": { "line": 112, "col": 2 } }, "stdlib/validators.agency:minLength": { "1": { "line": 124, "col": 2 } }, "stdlib/validators.agency:maxLength": { "1": { "line": 136, "col": 2 } }, "stdlib/validators.agency:matches": { "1": { "line": 148, "col": 2 } } };
|
|
1578
|
-
export {
|
|
1579
|
-
__getCheckpoints,
|
|
1580
|
-
__invokeFunction,
|
|
1581
|
-
__setDebugger,
|
|
1582
|
-
__setLLMClient,
|
|
1583
|
-
__setTraceFile,
|
|
1584
|
-
__sourceMap,
|
|
1585
|
-
__toolRegistry,
|
|
1586
|
-
approve,
|
|
1587
|
-
stdin_default as default,
|
|
1588
|
-
hasInterrupts,
|
|
1589
|
-
interrupt,
|
|
1590
|
-
isDebugger,
|
|
1591
|
-
isEmail,
|
|
1592
|
-
isInt,
|
|
1593
|
-
isInterrupt,
|
|
1594
|
-
isNegative,
|
|
1595
|
-
isPositive,
|
|
1596
|
-
isUrl,
|
|
1597
|
-
isUuid,
|
|
1598
|
-
matches,
|
|
1599
|
-
max,
|
|
1600
|
-
maxLength,
|
|
1601
|
-
min,
|
|
1602
|
-
minLength,
|
|
1603
|
-
reject,
|
|
1604
|
-
respondToInterrupts,
|
|
1605
|
-
rewindFrom
|
|
1606
|
-
};
|