@mytegroupinc/myte-core 0.0.9 → 0.0.11

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/cli.js +25 -4
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -2610,15 +2610,26 @@ async function runCreatePrd(args) {
2610
2610
  return;
2611
2611
  }
2612
2612
 
2613
+ const clientSessionId = firstNonEmptyString(args["client-session-id"], args.clientSessionId, args.client_session_id);
2614
+
2613
2615
  if (payloads.length === 1) {
2614
2616
  let data;
2617
+ const payload = payloads[0];
2618
+ if (clientSessionId) payload.client_session_id = clientSessionId;
2619
+ const idempotencyKey = resolveProjectMutationIdempotencyKey({
2620
+ args,
2621
+ operation: "create_prd",
2622
+ payload,
2623
+ });
2615
2624
  try {
2616
- data = await callAssistantQuery({
2625
+ data = await postSuggestionsMutation({
2617
2626
  apiBase,
2618
2627
  key,
2619
- payload: payloads[0],
2628
+ payload,
2620
2629
  timeoutMs,
2621
2630
  endpoint: "/project-assistant/create-prd",
2631
+ idempotencyKey,
2632
+ clientSessionId,
2622
2633
  });
2623
2634
  } catch (err) {
2624
2635
  if (err?.name === "AbortError") {
@@ -2662,12 +2673,21 @@ async function runCreatePrd(args) {
2662
2673
  };
2663
2674
 
2664
2675
  try {
2665
- const data = await callAssistantQuery({
2676
+ const payload = { items: payloads };
2677
+ if (clientSessionId) payload.client_session_id = clientSessionId;
2678
+ const idempotencyKey = resolveProjectMutationIdempotencyKey({
2679
+ args,
2680
+ operation: "create_prds",
2681
+ payload,
2682
+ });
2683
+ const data = await postSuggestionsMutation({
2666
2684
  apiBase,
2667
2685
  key,
2668
- payload: { items: payloads },
2686
+ payload,
2669
2687
  timeoutMs,
2670
2688
  endpoint: "/project-assistant/create-prds",
2689
+ idempotencyKey,
2690
+ clientSessionId,
2671
2691
  });
2672
2692
  aggregated.project_id = data.project_id || null;
2673
2693
  aggregated.created_count = Number(data.created_count || 0);
@@ -3652,6 +3672,7 @@ if (require.main === module) {
3652
3672
  pruneLegacyCommandCenterArtifacts,
3653
3673
  readYamlFile,
3654
3674
  resolveActorScope,
3675
+ main,
3655
3676
  scrubBootstrapValue,
3656
3677
  scrubMissionOpsValue,
3657
3678
  writeBootstrapSnapshot,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mytegroupinc/myte-core",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Myte CLI core implementation (Project Assistant + deterministic diffs).",
5
5
  "type": "commonjs",
6
6
  "main": "cli.js",