agentlang
Version:
The easiest way to build the most reliable AI agents - enterprise-grade teams of AI agents that collaborate with each other and humans
86 lines • 4.92 kB
TypeScript
import { AliasSpec, CatchSpec, ExtendsClause, MapLiteral, MetaDefinition, PrePostTriggerDefinition, RbacSpecDefinition, RecordSchemaDefinition, Statement } from '../language/generated/ast.js';
export declare const QuerySuffix = "?";
export declare function isNumber(x: any): boolean;
export declare function isMinusZero(value: number): boolean;
export declare function isBoolean(x: any): boolean;
export declare function isStringNumeric(str: string): boolean;
type MaybeString = string | undefined;
export declare function isString(s: MaybeString): boolean;
export declare function restoreSpecialChars(s: string): string;
export declare function escapeSpecialChars(s: string): string;
export declare class Path {
private moduleName;
private entryName;
constructor(moduleName: MaybeString, entryName: MaybeString);
hasModule(): boolean;
hasEntry(): boolean;
setModuleName(n: string): Path;
getModuleName(): string;
setEntryname(n: string): Path;
getEntryName(): string;
asFqName(): string;
equals(p: Path): boolean;
}
export declare function newPath(): Path;
export declare function makeFqName(moduleName: string, entryName: string): string;
export declare function forceAsFqName(entryName: string, moduleName: string): string;
export declare function forceAsEscapedName(entryName: string, moduleName: string): string;
export declare function isFqName(s: string): boolean;
export declare function nameToPath(s: string): Path;
export declare function splitFqName(s: string): string[];
export declare function splitRefs(s: string): string[];
export declare function rootRef(s: string): string;
export declare function runShellCommand(cmd: string, options?: any, continuation?: Function): void;
export declare function escapeFqName(n: string, moduleName?: string): string;
export declare function restoreFqName(n: string): string;
export declare function arrayEquals(a: Array<any>, b: Array<any>): boolean;
export declare const DefaultModuleName = "agentlang";
export declare const DefaultModules: Set<unknown>;
export declare const DefaultFileHandlingDirectory = "fs";
export declare function makeCoreModuleName(n: string): string;
export declare function isCoreModule(n: string): boolean;
export declare function isCoreDefinition(n: string): boolean;
export declare function registerInitFunction(f: Function): void;
export declare function runInitFunctions(): Promise<void>;
export declare function maybeExtends(ext: ExtendsClause | undefined): string | undefined;
export declare function escapeQueryName(s: string): string;
export declare function joinStatements(stmts: string[]): string;
export declare const sleepMilliseconds: any;
export declare function now(): string;
export declare function slurpJsonFile(fileName: string): Promise<any>;
export declare function findMetaSchema(scm: RecordSchemaDefinition | undefined): MetaDefinition | undefined;
export declare function findRbacSchema(scm: RecordSchemaDefinition | undefined): RbacSpecDefinition | undefined;
export declare function findUqCompositeAttributes(scm: RecordSchemaDefinition | undefined): Array<string> | undefined;
export declare function findAllPrePostTriggerSchema(scm: RecordSchemaDefinition | undefined): PrePostTriggerDefinition[] | undefined;
export declare enum CrudType {
CREATE = 0,
UPDATE = 1,
DELETE = 2,
READ = 3,
UPSERT = 4
}
export declare function asCrudType(s: string): CrudType;
export declare function isPath(obj: any, ref?: string): boolean;
export declare function fqNameFromPath(path: string): string | undefined;
export declare function firstAliasSpec(stmt: Statement): AliasSpec | undefined;
export declare function firstCatchSpec(stmt: Statement): CatchSpec | undefined;
export declare function walkDownInstancePath(path: string): [string, string, string | undefined, string[]];
export declare function areSetsEqual<T>(set1: Set<T>, set2: Set<T>): boolean;
export declare function isReservedName(s: string): boolean;
export declare function encryptPassword(s: string): string;
export declare function comparePassword(s: string, hash: string): boolean;
export declare function fileExtension(fileName: string): string;
export declare function trimQuotes(s: string): string;
export declare function asStringLiteralsMap(mapLit: MapLiteral): Map<string, string>;
export declare function escapeSepInPath(path: string): string;
export declare function validateIdFormat(idAttrName: string, idAttrValue: any): void;
export declare function nameContainsSepEscape(n: string): boolean;
export declare function generateUrlSafePassword(length?: number): string;
export declare function preprocessRawConfig(rawConfig: any): any;
type ReadSecret = (k: string, configuration?: any) => any;
declare global {
function readSecret(k: string, configuration?: any): any;
}
export declare function setScecretReader(f: ReadSecret): void;
export {};
//# sourceMappingURL=util.d.ts.map