react-agentic 0.0.4 → 0.0.7

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.
@@ -3975,17 +3975,18 @@ ${node.content}
3975
3975
  }
3976
3976
  }
3977
3977
  /**
3978
- * Emit RuntimeCallNode as declarative table
3978
+ * Emit RuntimeCallNode as declarative table + bash execution
3979
3979
  *
3980
3980
  * Output:
3981
3981
  * **Runtime Call**: `functionName`
3982
3982
  *
3983
- * | Argument | Value |
3984
- * |----------|-------|
3985
- * | phaseId | CTX.phaseId |
3986
- * | mode | If ctx.flags.gaps then "gap_closure", otherwise "standard" |
3983
+ * | Argument | Source |
3984
+ * |----------|--------|
3985
+ * | projectId | CTX.projectId |
3987
3986
  *
3988
- * **Output Variable**: RESULT
3987
+ * ```bash
3988
+ * RESULT=$(node .claude/runtime/runtime.js functionName '{"projectId": ...}')
3989
+ * ```
3989
3990
  */
3990
3991
  emitRuntimeCall(node) {
3991
3992
  const lines = [];
@@ -3993,8 +3994,8 @@ ${node.content}
3993
3994
  lines.push("");
3994
3995
  const argEntries = Object.entries(node.args);
3995
3996
  if (argEntries.length > 0) {
3996
- lines.push("| Argument | Value |");
3997
- lines.push("|----------|-------|");
3997
+ lines.push("| Argument | Source |");
3998
+ lines.push("|----------|--------|");
3998
3999
  for (const [name, value] of argEntries) {
3999
4000
  const formattedValue = this.formatArgValue(value);
4000
4001
  const escapedValue = formattedValue.replace(/\|/g, "\\|");
@@ -4002,9 +4003,52 @@ ${node.content}
4002
4003
  }
4003
4004
  lines.push("");
4004
4005
  }
4005
- lines.push(`**Output Variable**: ${node.outputVar}`);
4006
+ lines.push("```bash");
4007
+ lines.push(`${node.outputVar}=$(node .claude/runtime/runtime.js ${node.fnName} '${this.buildJsonArgs(argEntries)}')`);
4008
+ lines.push("```");
4006
4009
  return lines.join("\n");
4007
4010
  }
4011
+ /**
4012
+ * Build JSON args string for bash command
4013
+ * Shows literal values directly, variable refs as placeholders
4014
+ */
4015
+ buildJsonArgs(argEntries) {
4016
+ if (argEntries.length === 0) return "{}";
4017
+ const parts = [];
4018
+ for (const [name, value] of argEntries) {
4019
+ parts.push(`"${name}": ${this.formatArgForJson(value)}`);
4020
+ }
4021
+ return `{${parts.join(", ")}}`;
4022
+ }
4023
+ /**
4024
+ * Format a RuntimeCallArgValue for JSON in bash
4025
+ */
4026
+ formatArgForJson(value) {
4027
+ switch (value.type) {
4028
+ case "literal":
4029
+ if (value.value === null) return "null";
4030
+ if (typeof value.value === "string") return `"${value.value}"`;
4031
+ if (typeof value.value === "boolean") return value.value ? "true" : "false";
4032
+ return String(value.value);
4033
+ case "runtimeVarRef": {
4034
+ const { varName, path: path5 } = value.ref;
4035
+ const jqPath = path5.length === 0 ? "." : "." + path5.join(".");
4036
+ return `"$(echo "$${varName}" | jq -r '${jqPath}')"`;
4037
+ }
4038
+ case "expression":
4039
+ return `"<${value.description}>"`;
4040
+ case "json": {
4041
+ if (Array.isArray(value.value)) {
4042
+ const items = value.value.map((v) => this.formatArgForJson(v));
4043
+ return `[${items.join(", ")}]`;
4044
+ }
4045
+ const entries = Object.entries(value.value).map(([k, v]) => `"${k}": ${this.formatArgForJson(v)}`);
4046
+ return `{${entries.join(", ")}}`;
4047
+ }
4048
+ default:
4049
+ return '""';
4050
+ }
4051
+ }
4008
4052
  /**
4009
4053
  * Format a RuntimeCallArgValue for display in the arguments table
4010
4054
  */
@@ -8115,4 +8159,4 @@ export {
8115
8159
  getSourceCode,
8116
8160
  formatTranspileError
8117
8161
  };
8118
- //# sourceMappingURL=chunk-ILV2NZWS.js.map
8162
+ //# sourceMappingURL=chunk-FAH35DIE.js.map