claw.events 0.1.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +18 -27
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3620,12 +3620,12 @@ var PROD_API_URL = "https://claw.events";
3620
3620
  var PROD_WS_URL = "wss://centrifugo.claw.events/connection/websocket";
3621
3621
  var DOCS = {
3622
3622
  quickstart: "https://claw.events/docs/quickstart",
3623
- authentication: "https://claw.events/docs/authentication",
3624
- channels: "https://claw.events/docs/channels",
3625
- permissions: "https://claw.events/docs/permissions",
3626
- advertise: "https://claw.events/docs/advertise",
3627
- timers: "https://claw.events/docs/system-timers",
3628
- cli: "https://claw.events/docs/cli-reference",
3623
+ authentication: "https://claw.events/docs/registration",
3624
+ channels: "https://claw.events/docs/concepts",
3625
+ permissions: "https://claw.events/docs/commands/lock",
3626
+ advertise: "https://claw.events/docs/commands/advertise",
3627
+ timers: "https://claw.events/docs/timers",
3628
+ cli: "https://claw.events/docs",
3629
3629
  skill: "https://claw.events/skill.md"
3630
3630
  };
3631
3631
  var parseGlobalOptions = (args2) => {
@@ -5022,11 +5022,18 @@ if (command === "validate") {
5022
5022
  if (args.length > 0 && !args[0].startsWith("--")) {
5023
5023
  inputData = args[0];
5024
5024
  } else {
5025
- const chunks = [];
5026
- for await (const chunk of Bun.stdin.stream()) {
5027
- chunks.push(Buffer.from(chunk));
5028
- }
5029
- inputData = Buffer.concat(chunks).toString().trim();
5025
+ inputData = await new Promise((resolve) => {
5026
+ const chunks = [];
5027
+ process.stdin.on("data", (chunk) => {
5028
+ chunks.push(chunk);
5029
+ });
5030
+ process.stdin.on("end", () => {
5031
+ resolve(Buffer.concat(chunks).toString().trim());
5032
+ });
5033
+ process.stdin.on("error", () => {
5034
+ resolve("");
5035
+ });
5036
+ });
5030
5037
  }
5031
5038
  if (!inputData) {
5032
5039
  printError(
@@ -5087,14 +5094,6 @@ if (command === "validate") {
5087
5094
  }
5088
5095
  }
5089
5096
  if (!schema) {
5090
- printSuccess("Validation passed (no schema defined)", {
5091
- data: parsedData,
5092
- nextSteps: [
5093
- "Output can be piped to claw.events pub: echo '{...}' | claw.events validate | claw.events pub mychannel",
5094
- "Define a schema with 'claw.events advertise set --channel <ch> --schema <json>'"
5095
- ],
5096
- docs: ["cli", "advertise"]
5097
- });
5098
5097
  console.log(JSON.stringify(parsedData));
5099
5098
  process.exit(0);
5100
5099
  }
@@ -5116,14 +5115,6 @@ if (command === "validate") {
5116
5115
  }
5117
5116
  );
5118
5117
  }
5119
- printSuccess("Schema validation passed", {
5120
- data: parsedData,
5121
- nextSteps: [
5122
- "Output can be piped to claw.events pub: claw.events validate '{...}' --schema '{...}' | claw.events pub mychannel",
5123
- "Data is valid and ready to publish"
5124
- ],
5125
- docs: ["cli", "advertise"]
5126
- });
5127
5118
  console.log(JSON.stringify(parsedData));
5128
5119
  process.exit(0);
5129
5120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claw.events",
3
- "version": "0.1.3",
3
+ "version": "1.0.0",
4
4
  "description": "CLI for claw.events - real-time event bus for AI agents",
5
5
  "type": "module",
6
6
  "bin": {