What happens
On Windows PowerShell, passing a ConvertTo-Json result as the --data argument through npx.cmd reached the CLI as an object without quoted property names and failed JSON parsing at position 1.
Command
npx @insforge/cli functions invoke ingest --data
Error
Expected property name or '}' in JSON at position 1
Workaround
Invoked the deployed /functions/ingest endpoint with Invoke-RestMethod and the same JSON body.
Triage finding
Triage judged this fixable.
Add client-side JSON.parse validation for --data in CLI/src/commands/functions/invoke.ts:30 (mirroring the existing records/schedules pattern) throwing a CLIError such as "Invalid JSON in --data" plus a shell-quoting hint, optionally add --data-file <path> modeled on the existing compute deploy --env-file, and document Windows/PowerShell JSON quoting in insforge-skills/skills/insforge-cli/SKILL.md:221; verify with a new src/commands/functions/invoke.test.ts asserting --data '{a:1}' fails locally with the clear error and that fetch is never called.
Suggested fix
From automated triage — a starting point, not a verified plan.
Add client-side JSON.parse validation for --data in CLI/src/commands/functions/invoke.ts:30 (mirroring the existing records/schedules pattern) throwing a CLIError such as "Invalid JSON in --data" plus a shell-quoting hint, optionally add --data-file <path> modeled on the existing compute deploy --env-file, and document Windows/PowerShell JSON quoting in insforge-skills/skills/insforge-cli/SKILL.md:221; verify with a new src/commands/functions/invoke.test.ts asserting --data '{a:1}' fails locally with the clear error and that fetch is never called.
Component cli · severity minor · CLI 0.2.1 · win32 10.0.26100
Filed automatically from user feedback.
What happens
On Windows PowerShell, passing a ConvertTo-Json result as the --data argument through npx.cmd reached the CLI as an object without quoted property names and failed JSON parsing at position 1.
Command
Error
Workaround
Invoked the deployed /functions/ingest endpoint with Invoke-RestMethod and the same JSON body.
Triage finding
Triage judged this fixable.
Add client-side
JSON.parsevalidation for--datainCLI/src/commands/functions/invoke.ts:30(mirroring the existingrecords/schedulespattern) throwing aCLIErrorsuch as "Invalid JSON in --data" plus a shell-quoting hint, optionally add--data-file <path>modeled on the existingcompute deploy --env-file, and document Windows/PowerShell JSON quoting ininsforge-skills/skills/insforge-cli/SKILL.md:221; verify with a newsrc/commands/functions/invoke.test.tsasserting--data '{a:1}'fails locally with the clear error and thatfetchis never called.Suggested fix
From automated triage — a starting point, not a verified plan.
Add client-side
JSON.parsevalidation for--datainCLI/src/commands/functions/invoke.ts:30(mirroring the existingrecords/schedulespattern) throwing aCLIErrorsuch as "Invalid JSON in --data" plus a shell-quoting hint, optionally add--data-file <path>modeled on the existingcompute deploy --env-file, and document Windows/PowerShell JSON quoting ininsforge-skills/skills/insforge-cli/SKILL.md:221; verify with a newsrc/commands/functions/invoke.test.tsasserting--data '{a:1}'fails locally with the clear error and thatfetchis never called.Component
cli· severityminor· CLI0.2.1· win32 10.0.26100Filed automatically from user feedback.