xpander-sdk 2.0.170__py3-none-any.whl → 2.0.172__py3-none-any.whl

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.
@@ -251,7 +251,7 @@ def _configure_deep_planning_guidance(args: Dict[str, Any], agent: Agent, task:
251
251
  2. **START** plan execution (`xpstart_execution_plan`) - MANDATORY to enable enforcement
252
252
  3. **CHECK** plan before each action (`xpget_agent_plan`)
253
253
  4. **DO THE WORK** for one task
254
- 5. **COMPLETE** task IMMEDIATELY - call `xpcomplete_agent_plan_item` RIGHT AFTER finishing work (DO NOT DELAY!)
254
+ 5. **COMPLETE** task IMMEDIATELY - call `xpcomplete_agent_plan_items` RIGHT AFTER finishing work (DO NOT DELAY!)
255
255
  6. **ASK** user for info if needed (`xpask_for_information`) - MANDATORY if you need input or want to pause
256
256
  7. Repeat steps 3-6 until all tasks are done
257
257
 
@@ -307,26 +307,35 @@ def _configure_deep_planning_guidance(args: Dict[str, Any], agent: Agent, task:
307
307
 
308
308
  ---
309
309
 
310
- #### **3. xpcomplete_agent_plan_item** - Mark Task Complete
311
- **When to use**: **IMMEDIATELY** after finishing each task (NOT before, NOT later, RIGHT NOW!)
310
+ #### **3. xpcomplete_agent_plan_items** - Mark Task(s) Complete
311
+ **When to use**: **IMMEDIATELY** after finishing one or more tasks (NOT before, NOT later, RIGHT NOW!)
312
312
 
313
313
  **How to use**:
314
314
  ```json
315
+ // Single task
315
316
  {
316
317
  "body_params": {
317
- "id": "task-uuid-from-plan"
318
+ "ids": ["task-uuid-from-plan"]
319
+ }
320
+ }
321
+
322
+ // Multiple tasks (when finishing related tasks together)
323
+ {
324
+ "body_params": {
325
+ "ids": ["task-uuid-1", "task-uuid-2", "task-uuid-3"]
318
326
  }
319
327
  }
320
328
  ```
321
329
  **🚨 CRITICAL - NON-NEGOTIABLE RULES**:
322
- - Call THIS TOOL the INSTANT you finish a task
323
- - DO NOT wait to mark multiple tasks at once
330
+ - Call THIS TOOL the INSTANT you finish task(s)
331
+ - Can mark single or multiple tasks complete in one call
332
+ - Use multiple IDs when finishing related tasks at the same time
324
333
  - DO NOT postpone marking completion
325
334
  - DO NOT be lazy - mark it complete RIGHT AFTER the work is done
326
335
  - This is MANDATORY for progress tracking and continuation
327
336
  - If you finish a task and don't mark it complete immediately, you are doing it WRONG
328
337
 
329
- **Pattern**: Finish work → IMMEDIATELY call xpcomplete_agent_plan_item → Move to next task
338
+ **Pattern**: Finish work → IMMEDIATELY call xpcomplete_agent_plan_items → Move to next task
330
339
 
331
340
  ---
332
341
 
@@ -435,6 +444,7 @@ def _configure_deep_planning_guidance(args: Dict[str, Any], agent: Agent, task:
435
444
  - Use descriptive, actionable task titles
436
445
  - Check plan before each action to stay oriented
437
446
  - **Mark tasks complete THE INSTANT you finish them - NO DELAYS, NO EXCEPTIONS**
447
+ - **Can mark multiple tasks at once if finished together** (e.g., related tasks done simultaneously)
438
448
  - **ALWAYS use `xpask_for_information` when you need user input or want to pause**
439
449
  - Call plan tools **sequentially** (one at a time, never in parallel)
440
450
  - Follow the pattern: DO WORK → MARK COMPLETE → NEXT TASK
@@ -442,7 +452,7 @@ def _configure_deep_planning_guidance(args: Dict[str, Any], agent: Agent, task:
442
452
  ❌ **DON'T - THESE ARE FORBIDDEN:**
443
453
  - Mark tasks complete before they're actually done
444
454
  - **Be lazy and wait to mark tasks complete later** (FORBIDDEN!)
445
- - **Batch mark multiple tasks at the end** (WRONG! Mark each immediately!)
455
+ - **Postpone marking completion to batch at the end** (WRONG! Mark immediately when done!)
446
456
  - **AFTER plan starts: NEVER write questions in your response text** ("Before I proceed...", "I need clarification...", etc.)
447
457
  - **AFTER plan starts: NEVER respond with questions - ONLY use xpask_for_information tool** (ABSOLUTE RULE!)
448
458
  - Pass plain string arrays - must be objects with `title` field
@@ -481,8 +491,8 @@ def _configure_deep_planning_guidance(args: Dict[str, Any], agent: Agent, task:
481
491
 
482
492
  6. [After user responds, DO THE WORK: Design schema]
483
493
 
484
- 7. ⚠️ IMMEDIATELY Call: xpcomplete_agent_plan_item
485
- id: "abc-123"
494
+ 7. ⚠️ IMMEDIATELY Call: xpcomplete_agent_plan_items
495
+ ids: ["abc-123"]
486
496
  → MARKED COMPLETE RIGHT AFTER FINISHING - NOT DELAYED!
487
497
 
488
498
  8. Call: xpget_agent_plan
@@ -490,11 +500,17 @@ def _configure_deep_planning_guidance(args: Dict[str, Any], agent: Agent, task:
490
500
 
491
501
  9. [DO THE WORK: Create migration file]
492
502
 
493
- 10. ⚠️ IMMEDIATELY Call: xpcomplete_agent_plan_item
494
- id: "def-456"
503
+ 10. ⚠️ IMMEDIATELY Call: xpcomplete_agent_plan_items
504
+ ids: ["def-456"]
495
505
  → MARKED COMPLETE RIGHT AWAY!
506
+
507
+ // Alternative: If tasks 3 and 4 are done together, can batch complete:
508
+ 11a. [DO THE WORK: Implement endpoints AND add auth together]
509
+ 11b. ⚠️ IMMEDIATELY Call: xpcomplete_agent_plan_items
510
+ ids: ["ghi-789", "jkl-012"]
511
+ → Both marked complete at once!
496
512
 
497
- 11. [Continue this pattern: GET PLAN → DO WORK → MARK COMPLETE IMMEDIATELY → REPEAT]
513
+ 12. [Continue this pattern: GET PLAN → DO WORK → MARK COMPLETE IMMEDIATELY → REPEAT]
498
514
  ```
499
515
 
500
516
  ### **WRONG WAY - ANTI-PATTERN (DO NOT DO THIS)**
@@ -560,6 +560,7 @@ class Task(XPanderSharedModel):
560
560
  # restore result and status
561
561
  self.result = task_backup.result
562
562
  self.status = task_backup.status
563
+ self.tokens = task_backup.tokens
563
564
 
564
565
  if not self.deep_planning.question_raised:
565
566
  uncompleted_tasks = [task for task in self.deep_planning.tasks if not task.completed]
@@ -814,6 +815,7 @@ class Task(XPanderSharedModel):
814
815
  # restore result and status
815
816
  self.result = task_backup.result
816
817
  self.status = task_backup.status
818
+ self.tokens = task_backup.tokens
817
819
 
818
820
  if self.deep_planning and self.deep_planning.enabled and self.deep_planning.started and self.deep_planning.enforce:
819
821
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xpander-sdk
3
- Version: 2.0.170
3
+ Version: 2.0.172
4
4
  Summary: xpander.ai Backend-as-a-service for AI Agents - SDK
5
5
  Home-page: https://www.xpander.ai
6
6
  Author: xpanderAI
@@ -30,7 +30,7 @@ xpander_sdk/modules/agents/utils/generic.py,sha256=XbG4OeHMQo4gVYCsasMlW_b8OoqS1
30
30
  xpander_sdk/modules/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  xpander_sdk/modules/backend/backend_module.py,sha256=wYghMuNXEtXgoyMXBgbMhgE7wYcbRwXJcpEyybF30kA,18927
32
32
  xpander_sdk/modules/backend/frameworks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- xpander_sdk/modules/backend/frameworks/agno.py,sha256=z8olkGD4QPMPX-g6Z-4E5n5Gxs8i1L8vbaKXKry7wjU,37881
33
+ xpander_sdk/modules/backend/frameworks/agno.py,sha256=7nDuGVsl0DZlpm9o9vX6cKTU8dZq2iQHyiCYyCCuEis,38702
34
34
  xpander_sdk/modules/backend/frameworks/dispatch.py,sha256=5dP4c37C42U53VjM2kkwIRwEw1i0IN3G0YESHH7J3OE,1557
35
35
  xpander_sdk/modules/backend/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  xpander_sdk/modules/backend/utils/mcp_oauth.py,sha256=slmrtpjGM__g7mkhvnY9yNRtGHS-fDcLH82rIkBKxkA,4527
@@ -60,7 +60,7 @@ xpander_sdk/modules/tasks/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
60
60
  xpander_sdk/modules/tasks/models/task.py,sha256=B0_fwzQEkRE_pZMSLnWuXsUBMdy8HEIxm1FfRpCQma0,5000
61
61
  xpander_sdk/modules/tasks/models/tasks_list.py,sha256=8V1T0vCtGN79qLMPwe37pOA7Wvuf8pbJNOhWL0BPo-8,5126
62
62
  xpander_sdk/modules/tasks/sub_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- xpander_sdk/modules/tasks/sub_modules/task.py,sha256=mQD3_fe4j0HnskahOmxVIsAbVh1czsn3W7nXF91_Zd0,37692
63
+ xpander_sdk/modules/tasks/sub_modules/task.py,sha256=k9GjRmBCL8a2vXWa0TxOdNnjbUovok3ta939FfCOpv4,37782
64
64
  xpander_sdk/modules/tasks/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
65
  xpander_sdk/modules/tasks/utils/files.py,sha256=KqqwSQSrwim2-H3XP5wOadDDfngAyEI034tA7Oon-vc,3631
66
66
  xpander_sdk/modules/tools_repository/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -83,8 +83,8 @@ xpander_sdk/utils/generic.py,sha256=XrRj2-L8c0YWpfPdDyXE-pVL-6lKF9VpyZzKHQ4wuCc,
83
83
  xpander_sdk/utils/tools.py,sha256=lyFkq2yP7DxBkyXYVlnFRwDhQCvf0fZZMDm5fBycze4,1244
84
84
  xpander_sdk/utils/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
85
85
  xpander_sdk/utils/agents/compactization_agent.py,sha256=iMViaUnpuZFMyo-pQCen9bAIADmFWV2yx3JuNaG5bx0,12815
86
- xpander_sdk-2.0.170.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
87
- xpander_sdk-2.0.170.dist-info/METADATA,sha256=F97VFAV0KLgZgilAO42QBdAm_GOG1cKvRCRZoO5_NAo,15312
88
- xpander_sdk-2.0.170.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
89
- xpander_sdk-2.0.170.dist-info/top_level.txt,sha256=UCjnxQpsMy5Zoe7lmRuVDO6DI2V_6PgRFfm4oizRbVs,12
90
- xpander_sdk-2.0.170.dist-info/RECORD,,
86
+ xpander_sdk-2.0.172.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
87
+ xpander_sdk-2.0.172.dist-info/METADATA,sha256=ckb4CWMz2DIR2ixySj_g-JqenY0c7FxBT31hHME66iE,15312
88
+ xpander_sdk-2.0.172.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
89
+ xpander_sdk-2.0.172.dist-info/top_level.txt,sha256=UCjnxQpsMy5Zoe7lmRuVDO6DI2V_6PgRFfm4oizRbVs,12
90
+ xpander_sdk-2.0.172.dist-info/RECORD,,