litedbmodel-gen 0.6.1 → 0.6.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/cli-contract.yaml +33 -0
- package/dist/{dsl-4XI72SJ5.js → chunk-GERYNDPH.js} +645 -3
- package/dist/chunk-GERYNDPH.js.map +1 -0
- package/dist/cli.js +98 -3
- package/dist/cli.js.map +1 -1
- package/dist/dist-3WIAIIE5.js +7333 -0
- package/dist/dist-3WIAIIE5.js.map +1 -0
- package/dist/dsl-GOTBG3JL.js +19 -0
- package/dist/dsl-GOTBG3JL.js.map +1 -0
- package/dist/litedbmodel-gen.bundle.mjs +695 -279
- package/dist/litedbmodel-gen.bundle.mjs.map +4 -4
- package/docs/cli-reference.md +42 -0
- package/package.json +2 -2
- package/dist/dsl-4XI72SJ5.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
resolvedDsl
|
|
4
|
+
} from "./chunk-GERYNDPH.js";
|
|
2
5
|
import {
|
|
3
6
|
__commonJS,
|
|
4
7
|
__require,
|
|
@@ -6462,6 +6465,39 @@ command_sets:
|
|
|
6462
6465
|
stderr:
|
|
6463
6466
|
format: json
|
|
6464
6467
|
|
|
6468
|
+
# \u2500\u2500 agents \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
6469
|
+
agents:
|
|
6470
|
+
summary: Output the full resolved agent DSL as structured data.
|
|
6471
|
+
description: >-
|
|
6472
|
+
Outputs the complete resolved agent-contracts DSL (agents, tasks,
|
|
6473
|
+
workflows, handoff_types) embedded in this CLI binary.
|
|
6474
|
+
Useful for debugging, external tooling integration, and DSL
|
|
6475
|
+
inspection.
|
|
6476
|
+
options:
|
|
6477
|
+
- name: format
|
|
6478
|
+
aliases: [F]
|
|
6479
|
+
description: Output format.
|
|
6480
|
+
schema:
|
|
6481
|
+
type: string
|
|
6482
|
+
enum: [yaml, json]
|
|
6483
|
+
default: yaml
|
|
6484
|
+
|
|
6485
|
+
exits:
|
|
6486
|
+
'0':
|
|
6487
|
+
description: DSL output successfully.
|
|
6488
|
+
stdout:
|
|
6489
|
+
format: text
|
|
6490
|
+
'1':
|
|
6491
|
+
description: Failed to load embedded DSL.
|
|
6492
|
+
stderr:
|
|
6493
|
+
format: text
|
|
6494
|
+
|
|
6495
|
+
x-agent:
|
|
6496
|
+
riskLevel: low
|
|
6497
|
+
requiresConfirmation: false
|
|
6498
|
+
idempotent: true
|
|
6499
|
+
sideEffects: []
|
|
6500
|
+
|
|
6465
6501
|
components:
|
|
6466
6502
|
schemas:
|
|
6467
6503
|
AgentEvidence:
|
|
@@ -7045,6 +7081,47 @@ var CONTRACT_JSON_STR = `{
|
|
|
7045
7081
|
}
|
|
7046
7082
|
}
|
|
7047
7083
|
}
|
|
7084
|
+
},
|
|
7085
|
+
"agents": {
|
|
7086
|
+
"summary": "Output the full resolved agent DSL as structured data.",
|
|
7087
|
+
"description": "Outputs the complete resolved agent-contracts DSL (agents, tasks, workflows, handoff_types) embedded in this CLI binary. Useful for debugging, external tooling integration, and DSL inspection.",
|
|
7088
|
+
"options": [
|
|
7089
|
+
{
|
|
7090
|
+
"name": "format",
|
|
7091
|
+
"aliases": [
|
|
7092
|
+
"F"
|
|
7093
|
+
],
|
|
7094
|
+
"description": "Output format.",
|
|
7095
|
+
"schema": {
|
|
7096
|
+
"type": "string",
|
|
7097
|
+
"enum": [
|
|
7098
|
+
"yaml",
|
|
7099
|
+
"json"
|
|
7100
|
+
],
|
|
7101
|
+
"default": "yaml"
|
|
7102
|
+
}
|
|
7103
|
+
}
|
|
7104
|
+
],
|
|
7105
|
+
"exits": {
|
|
7106
|
+
"0": {
|
|
7107
|
+
"description": "DSL output successfully.",
|
|
7108
|
+
"stdout": {
|
|
7109
|
+
"format": "text"
|
|
7110
|
+
}
|
|
7111
|
+
},
|
|
7112
|
+
"1": {
|
|
7113
|
+
"description": "Failed to load embedded DSL.",
|
|
7114
|
+
"stderr": {
|
|
7115
|
+
"format": "text"
|
|
7116
|
+
}
|
|
7117
|
+
}
|
|
7118
|
+
},
|
|
7119
|
+
"x-agent": {
|
|
7120
|
+
"riskLevel": "low",
|
|
7121
|
+
"requiresConfirmation": false,
|
|
7122
|
+
"idempotent": true,
|
|
7123
|
+
"sideEffects": []
|
|
7124
|
+
}
|
|
7048
7125
|
}
|
|
7049
7126
|
}
|
|
7050
7127
|
}
|
|
@@ -7311,6 +7388,9 @@ function createProgram(handlers2, version) {
|
|
|
7311
7388
|
}
|
|
7312
7389
|
await handlers2.implement(description, opts, cmd.optsWithGlobals());
|
|
7313
7390
|
});
|
|
7391
|
+
program2.command("agents").description("Output the full resolved agent DSL as structured data.").option("-F, --format <value>", "Output format.", "yaml").action(async (opts, cmd) => {
|
|
7392
|
+
await handlers2.agents(opts, cmd.optsWithGlobals());
|
|
7393
|
+
});
|
|
7314
7394
|
program2.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]", "Command IDs to extract. Use dot notation.").option("-a, --all", "Extract all commands.", false).option("--include-meta", "Include extraction metadata.", true).option("-F, --format <format>", "Output format (yaml or json).", "yaml").action(async (commands, opts, cmd) => {
|
|
7315
7395
|
if (commands.length === 0 && !opts.all) {
|
|
7316
7396
|
process.stderr.write(JSON.stringify({ code: "INVALID_ARGS", message: "Specify command IDs or use --all" }) + "\n");
|
|
@@ -7328,7 +7408,7 @@ function createProgram(handlers2, version) {
|
|
|
7328
7408
|
type: "cli-contracts/extract",
|
|
7329
7409
|
extractedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7330
7410
|
specVersion: doc.cli_contracts ?? "0.1.0",
|
|
7331
|
-
commands: ["litedbmodel-gen.init", "litedbmodel-gen.audit", "litedbmodel-gen.implement"]
|
|
7411
|
+
commands: ["litedbmodel-gen.init", "litedbmodel-gen.audit", "litedbmodel-gen.implement", "litedbmodel-gen.agents"]
|
|
7332
7412
|
};
|
|
7333
7413
|
}
|
|
7334
7414
|
Object.assign(out, doc);
|
|
@@ -7345,7 +7425,7 @@ function createProgram(handlers2, version) {
|
|
|
7345
7425
|
yamlLines.push("extractedAt: " + (/* @__PURE__ */ new Date()).toISOString());
|
|
7346
7426
|
yamlLines.push("spec_version: " + (doc.cli_contracts ?? "0.1.0"));
|
|
7347
7427
|
yamlLines.push("commands:");
|
|
7348
|
-
for (const id of ["litedbmodel-gen.init", "litedbmodel-gen.audit", "litedbmodel-gen.implement"]) {
|
|
7428
|
+
for (const id of ["litedbmodel-gen.init", "litedbmodel-gen.audit", "litedbmodel-gen.implement", "litedbmodel-gen.agents"]) {
|
|
7349
7429
|
yamlLines.push(" - " + id);
|
|
7350
7430
|
}
|
|
7351
7431
|
}
|
|
@@ -7477,7 +7557,7 @@ async function createAdapter(adapterName, config) {
|
|
|
7477
7557
|
}
|
|
7478
7558
|
async function loadRegistries() {
|
|
7479
7559
|
try {
|
|
7480
|
-
const dsl = await import("./dsl-
|
|
7560
|
+
const dsl = await import("./dsl-GOTBG3JL.js");
|
|
7481
7561
|
return {
|
|
7482
7562
|
agentRegistry: dsl.agentRegistry ?? {},
|
|
7483
7563
|
taskRegistry: dsl.taskRegistry ?? {},
|
|
@@ -7925,6 +8005,21 @@ var handlers = {
|
|
|
7925
8005
|
reportFormat: opts.reportFormat
|
|
7926
8006
|
});
|
|
7927
8007
|
},
|
|
8008
|
+
// ── agents ─────────────────────────────────────────────────────────────────
|
|
8009
|
+
agents: async (opts) => {
|
|
8010
|
+
const YAML = await import("./dist-3WIAIIE5.js");
|
|
8011
|
+
const format = opts.format ?? "yaml";
|
|
8012
|
+
try {
|
|
8013
|
+
if (format === "json") {
|
|
8014
|
+
console.log(JSON.stringify(resolvedDsl, null, 2));
|
|
8015
|
+
} else {
|
|
8016
|
+
console.log(YAML.stringify(resolvedDsl, { lineWidth: 120 }));
|
|
8017
|
+
}
|
|
8018
|
+
} catch (err) {
|
|
8019
|
+
console.error(`Failed to output DSL: ${err.message}`);
|
|
8020
|
+
process.exit(1);
|
|
8021
|
+
}
|
|
8022
|
+
},
|
|
7928
8023
|
// ── init ───────────────────────────────────────────────────────────────────
|
|
7929
8024
|
init: async (config) => {
|
|
7930
8025
|
const configPath = config ?? "embedoc.config.yaml";
|