@dot-agent/compiler 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,11 @@
1
- import { Tree, Node } from 'web-tree-sitter';
2
- import { L as LangId, P as ParseDiagnostic, a as LintMessage, b as PackOptions, c as PackResult, A as AgentBundle } from './core-D2X2Eohl.js';
3
- export { d as AboutMe, e as AgentFiles, B as BuildAboutmeOptions, C as Capability, I as IdParts, f as Integrity, g as aboutmeToJson, h as buildAboutme, i as buildId, j as createZip, k as extractDigest, l as extractFiles, m as extractName, p as parseAboutme, n as parseId } from './core-D2X2Eohl.js';
4
- import { BehaviorFile, DescriptionFile } from '@dot-agent/parser-dsl';
5
- export { AgentDecl, AnnotatedRef, BehaviorFile, DescriptionFile, OntologyRef, PropertyDecl, PropertyType, StateDef, Statement, TriggerDecl, TypeDefinition } from '@dot-agent/parser-dsl';
6
- import JSZip from 'jszip';
7
-
1
+ import { A as PropertyType, C as LangId, D as PackResult, E as PackOptions, M as Statement, N as TriggerDecl, O as ParseDiagnostic, P as TypeDefinition, S as Integrity, T as OntologyRef, _ as BehaviorFile, a as buildId, b as DescriptionFile, c as parseId, d as parseAboutme, f as AboutMe, g as AnnotatedRef, h as AgentFiles, j as StateDef, k as PropertyDecl, l as aboutmeToJson, m as AgentDecl, n as extractFiles, o as extractDigest, p as AgentBundle, s as extractName, t as createZip, u as buildAboutme, v as BuildAboutmeOptions, w as LintMessage, x as IdParts, y as Capability } from "./zip-core-BCiH0sUt.mjs";
2
+ import { Node, Tree } from "web-tree-sitter";
3
+ import JSZip from "jszip";
4
+ //#region src/parser.d.ts
8
5
  declare function initBehaviorParser(): Promise<void>;
9
6
  interface ParseResult<T> {
10
- ok: T | null;
11
- diagnostics: ParseDiagnostic[];
7
+ ok: T | null;
8
+ diagnostics: ParseDiagnostic[];
12
9
  }
13
10
  declare function parseBehaviorFile(text: string): ParseResult<BehaviorFile>;
14
11
  declare function parseDescriptionFile(text: string): ParseResult<DescriptionFile>;
@@ -27,38 +24,43 @@ declare function parseSync(langId: LangId, text: string, previousTree?: Tree): T
27
24
  declare function nodesOfType(tree: Tree, type: string): Node[];
28
25
  declare function nodeAtOffset(tree: Tree, offset: number): Node | null;
29
26
  declare function nodeToRange(node: Node): {
30
- start: {
31
- line: number;
32
- character: number;
33
- };
34
- end: {
35
- line: number;
36
- character: number;
37
- };
27
+ start: {
28
+ line: number;
29
+ character: number;
30
+ };
31
+ end: {
32
+ line: number;
33
+ character: number;
34
+ };
38
35
  };
39
36
  declare function positionToOffset(text: string, line: number, character: number): number;
40
37
  declare function getContextNode(tree: Tree, offset: number): Node;
41
-
38
+ //#endregion
39
+ //#region src/linter.d.ts
42
40
  declare function lintDescription(text: string, file?: string): Promise<LintMessage[]>;
43
41
  declare function lintBehavior(text: string, file?: string, docPath?: string, consolidated?: boolean, externalStates?: Set<string>, mergedText?: string): Promise<LintMessage[]>;
44
42
  declare function createLinter(): Promise<{
45
- lintDescription: typeof lintDescription;
46
- lintBehavior: typeof lintBehavior;
43
+ lintDescription: typeof lintDescription;
44
+ lintBehavior: typeof lintBehavior;
47
45
  }>;
48
-
46
+ //#endregion
47
+ //#region src/zip.d.ts
49
48
  declare function readZip(filePath: string): Promise<JSZip>;
50
49
  declare function validateZipBomb(filePath: string): Promise<boolean>;
51
50
  declare function validateMagicBytes(filePath: string): Promise<boolean>;
52
51
  declare function writeZip(zip: JSZip, outPath: string): Promise<void>;
53
-
52
+ //#endregion
53
+ //#region src/pack.d.ts
54
54
  interface ConsolidateResult {
55
- mergedText: string;
56
- mergeSources: string[];
55
+ mergedText: string;
56
+ mergeSources: string[];
57
57
  }
58
58
  declare function consolidate(agentRoot: string, entryFile: string): Promise<ConsolidateResult>;
59
59
  declare function collectFiles(dir: string, descriptionFile: string, mergedBehaviorText: string, mergeSources: string[], personaFile?: string): Promise<Map<string, string>>;
60
60
  declare function pack(options?: PackOptions): Promise<PackResult>;
61
-
61
+ //#endregion
62
+ //#region src/bundle.d.ts
62
63
  declare function bundleFromDir(dir: string): Promise<AgentBundle>;
63
-
64
- export { AgentBundle, LangId, LintMessage, PackOptions, PackResult, bundleFromDir, collectFiles, consolidate, createLinter, getBehaviorScxml, getContextNode, initBehaviorParser, initParsers, lintBehavior, lintDescription, nodeAtOffset, nodeToRange, nodesOfType, pack, parse, parseBehaviorFile, parseDescriptionFile, parseSync, positionToOffset, readZip, validateMagicBytes, validateZipBomb, writeZip };
64
+ //#endregion
65
+ export { type AboutMe, type AgentBundle, type AgentDecl, type AgentFiles, type AnnotatedRef, type BehaviorFile, type BuildAboutmeOptions, type Capability, type DescriptionFile, type IdParts, type Integrity, type LangId, type LintMessage, type OntologyRef, type PackOptions, type PackResult, type PropertyDecl, type PropertyType, type StateDef, type Statement, type TriggerDecl, type TypeDefinition, aboutmeToJson, buildAboutme, buildId, bundleFromDir, collectFiles, consolidate, createLinter, createZip, extractDigest, extractFiles, extractName, getBehaviorScxml, getContextNode, initBehaviorParser, initParsers, lintBehavior, lintDescription, nodeAtOffset, nodeToRange, nodesOfType, pack, parse, parseAboutme, parseBehaviorFile, parseDescriptionFile, parseId, parseSync, positionToOffset, readZip, validateMagicBytes, validateZipBomb, writeZip };
66
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/parser.ts","../src/linter.ts","../src/zip.ts","../src/pack.ts","../src/bundle.ts"],"mappings":";;;;iBAyBsB,sBAAsB;UAM3B,YAAY;EAC3B,IAAI;EACJ,aAAa;;iBAGC,kBAAkB,eAAe,YAAY;iBAI7C,qBAAqB,eAAe,YAAY;iBAIhD,iBAAiB;iBAIX,eAAe;;;;;;;;iBAmBf,MACpB,QAAQ,QACR,cACA,eAAe,OACd,QAAQ;;iBAOK,UAAU,QAAQ,QAAQ,cAAc,eAAe,OAAO;iBAQ9D,YAAY,MAAM,MAAM,eAAe;iBAKvC,aAAa,MAAM,MAAM,iBAAiB;iBAK1C,YAAY,MAAM;EAChC;IAAS;IAAc;;EACvB;IAAO;IAAc;;;iBAQP,iBAAiB,cAAc,cAAc;iBAS7C,eAAe,MAAM,MAAM,iBAAiB;;;iBCtCtC,gBAAgB,cAAc,gBAA6B,QAAQ;iBAqKnE,aACpB,cACA,eACA,kBACA,wBACA,iBAAiB,aACjB,sBACC,QAAQ;iBAgUW,gBAAY;;;;;;iBCniBZ,QAAQ,mBAAmB,QAAQ;iBAKnC,gBAAgB,mBAAmB;iBAOnC,mBAAmB,mBAAmB;iBAMtC,SAAS,KAAK,OAAO,kBAAkB;;;UC4HnD;EACR;EACA;;iBAGoB,YAAY,mBAAmB,oBAAoB,QAAQ;iBA6K3D,aACpB,aACA,yBACA,4BACA,wBACA,uBACC,QAAQ;iBA2EW,KAAK,UAAS,cAAmB,QAAQ;;;iBCpZzC,cAAc,cAAc,QAAQ"}