@qwen-code/qwen-harness 0.1.2 → 0.1.3

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.
@@ -4845,6 +4845,15 @@ function resolveHarnessInvocation(invocation) {
4845
4845
  }
4846
4846
  return { kind: "harness", ...invocation };
4847
4847
  }
4848
+ function preserveLegacyLeadingDashPrompt(args) {
4849
+ const preserved = [...args];
4850
+ const promptIndex = preserved.length - 1;
4851
+ const prompt = preserved[promptIndex];
4852
+ if (prompt?.startsWith("-") && /\s/u.test(prompt)) {
4853
+ preserved[promptIndex] = ` ${prompt}`;
4854
+ }
4855
+ return preserved;
4856
+ }
4848
4857
  function parseHarnessName(value) {
4849
4858
  const name = value?.trim().toLowerCase();
4850
4859
  if (name && harnessNames.includes(name)) {
@@ -4860,7 +4869,7 @@ function harnessUsage() {
4860
4869
  "",
4861
4870
  "The harness defaults to pi, which keeps Pi's default prompt and built-in tools",
4862
4871
  "while disabling user and project resource discovery.",
4863
- "All remaining arguments are passed to Pi unchanged."
4872
+ "All remaining arguments are passed to Pi."
4864
4873
  ].join("\n");
4865
4874
  }
4866
4875
  function parseHarnessInvocation(args) {
@@ -4881,7 +4890,10 @@ function parseHarnessInvocation(args) {
4881
4890
  }
4882
4891
  if (argument !== void 0) piArgs.push(argument);
4883
4892
  }
4884
- return { name: name ?? "pi", args: piArgs };
4893
+ return {
4894
+ name: name ?? "pi",
4895
+ args: preserveLegacyLeadingDashPrompt(piArgs)
4896
+ };
4885
4897
  }
4886
4898
 
4887
4899
  // src/runtime/subagent-runtime.ts