taskcarry 0.3.2__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.
Files changed (105) hide show
  1. taskcarry/__init__.py +3 -0
  2. taskcarry/__main__.py +4 -0
  3. taskcarry/adapter_contracts.py +166 -0
  4. taskcarry/agy_turns.py +282 -0
  5. taskcarry/api.py +111 -0
  6. taskcarry/board.py +313 -0
  7. taskcarry/board_assets/board.css +1087 -0
  8. taskcarry/board_assets/board.js +1187 -0
  9. taskcarry/board_assets/browse.js +214 -0
  10. taskcarry/board_assets/index.html +43 -0
  11. taskcarry/board_assets/taskcarry-icon.ico +0 -0
  12. taskcarry/board_assets/taskcarry-mark.svg +28 -0
  13. taskcarry/board_data.py +466 -0
  14. taskcarry/chat_joins.py +157 -0
  15. taskcarry/cli.py +119 -0
  16. taskcarry/codex_capture.py +184 -0
  17. taskcarry/codex_host.py +293 -0
  18. taskcarry/collaboration_exchange.py +316 -0
  19. taskcarry/connection.py +159 -0
  20. taskcarry/continuity.py +300 -0
  21. taskcarry/contracts.py +165 -0
  22. taskcarry/conversation_capture.py +669 -0
  23. taskcarry/core.py +896 -0
  24. taskcarry/cycle_contracts.py +73 -0
  25. taskcarry/discovery.py +434 -0
  26. taskcarry/discovery_contracts.py +52 -0
  27. taskcarry/exchange_contracts.py +67 -0
  28. taskcarry/exchange_endpoint.py +377 -0
  29. taskcarry/exchange_packets.py +142 -0
  30. taskcarry/experience_contracts.py +129 -0
  31. taskcarry/experience_exchange.py +214 -0
  32. taskcarry/experience_notes.py +433 -0
  33. taskcarry/experience_storage.py +125 -0
  34. taskcarry/experience_tools.py +26 -0
  35. taskcarry/feishu/__init__.py +1 -0
  36. taskcarry/feishu/display.py +122 -0
  37. taskcarry/feishu/project_watch.py +145 -0
  38. taskcarry/feishu/review_sets.py +80 -0
  39. taskcarry/feishu/sender.py +42 -0
  40. taskcarry/feishu/subscription.py +193 -0
  41. taskcarry/feishu/windows_agent.py +287 -0
  42. taskcarry/feishu/windows_secret.py +34 -0
  43. taskcarry/gitops.py +170 -0
  44. taskcarry/governance.py +88 -0
  45. taskcarry/governance_cycle.py +775 -0
  46. taskcarry/identification.py +82 -0
  47. taskcarry/integration.py +663 -0
  48. taskcarry/maintenance.py +118 -0
  49. taskcarry/mcp.py +183 -0
  50. taskcarry/member_join.py +184 -0
  51. taskcarry/member_routing.py +145 -0
  52. taskcarry/onboarding.py +272 -0
  53. taskcarry/onboarding_complete.py +252 -0
  54. taskcarry/path_batches.py +19 -0
  55. taskcarry/preservation.py +257 -0
  56. taskcarry/project_collaboration.py +453 -0
  57. taskcarry/project_history.py +166 -0
  58. taskcarry/project_identity.py +51 -0
  59. taskcarry/project_recovery.py +824 -0
  60. taskcarry/recovery_contracts.py +25 -0
  61. taskcarry/recovery_files.py +153 -0
  62. taskcarry/recovery_git.py +234 -0
  63. taskcarry/remote_capture.py +89 -0
  64. taskcarry/remote_transfer.py +356 -0
  65. taskcarry/role_connection.py +215 -0
  66. taskcarry/setup.py +597 -0
  67. taskcarry/shared_workbench.py +480 -0
  68. taskcarry/skill_data/taskcarry-experience-recovery/SKILL.md +37 -0
  69. taskcarry/skill_data/taskcarry-governance-reconcile/SKILL.md +47 -0
  70. taskcarry/skill_data/taskcarry-governance-reconcile/references/daily-governance.md +72 -0
  71. taskcarry/skill_data/taskcarry-project-setup/SKILL.md +48 -0
  72. taskcarry/skill_data/taskcarry-project-setup/references/onboarding.md +198 -0
  73. taskcarry/skill_data/taskcarry-task-delivery/SKILL.md +32 -0
  74. taskcarry/skill_data/taskcarry-task-delivery/references/conditional-experience.md +93 -0
  75. taskcarry/skill_data/taskcarry-task-delivery/references/worker-channel.md +41 -0
  76. taskcarry/source_review_set.py +80 -0
  77. taskcarry/state_format.py +47 -0
  78. taskcarry/store.py +472 -0
  79. taskcarry/task_context.py +141 -0
  80. taskcarry/text_handback.py +98 -0
  81. taskcarry/transfer_contracts.py +18 -0
  82. taskcarry/updates.py +351 -0
  83. taskcarry/workbench.py +625 -0
  84. taskcarry/workbench_contracts.py +32 -0
  85. taskcarry/workbuddy_capture.py +451 -0
  86. taskcarry/workbuddy_setup.py +212 -0
  87. taskcarry/worker_channel.py +859 -0
  88. taskcarry/worker_contracts.py +190 -0
  89. taskcarry/worker_storage.py +60 -0
  90. taskcarry/worker_tools.py +111 -0
  91. taskcarry-0.3.2.dist-info/METADATA +203 -0
  92. taskcarry-0.3.2.dist-info/RECORD +105 -0
  93. taskcarry-0.3.2.dist-info/WHEEL +5 -0
  94. taskcarry-0.3.2.dist-info/entry_points.txt +5 -0
  95. taskcarry-0.3.2.dist-info/licenses/LICENSE +21 -0
  96. taskcarry-0.3.2.dist-info/licenses/LICENSE_SCOPE.md +31 -0
  97. taskcarry-0.3.2.dist-info/top_level.txt +2 -0
  98. taskcarry_https/__init__.py +1 -0
  99. taskcarry_https/consent.py +207 -0
  100. taskcarry_https/reader.py +132 -0
  101. taskcarry_https/review.py +116 -0
  102. taskcarry_https/server.py +163 -0
  103. taskcarry_https/team.py +335 -0
  104. taskcarry_https/team_host.py +109 -0
  105. taskcarry_https/web_host.py +82 -0
@@ -0,0 +1,82 @@
1
+ """Run the optional Gemini web connection for one existing project assignment."""
2
+ import argparse
3
+ import json
4
+ from pathlib import Path
5
+ import secrets
6
+ import sys
7
+ import time
8
+ from urllib.parse import urlsplit
9
+
10
+ from .reader import ReaderInvitation, SharedText
11
+ from .review import ReviewInvitation
12
+
13
+
14
+ def invitation_from_profile(profile):
15
+ """Build a bounded invitation from the project owner's local configuration."""
16
+ if not isinstance(profile, dict):
17
+ raise ValueError("The web profile must be a JSON object.")
18
+ data = profile.copy()
19
+ mode = data.pop("mode", None)
20
+ common = {"control", "project_id", "project_name", "binding_id", "binding_revision",
21
+ "role_label", "task_id", "workspace_id", "expires_at", "sources"}
22
+ if mode == "reader":
23
+ cls = ReaderInvitation
24
+ allowed = common
25
+ elif mode == "reviewer":
26
+ cls = ReviewInvitation
27
+ allowed = common | {"draft_reference_id", "handback_id", "instructions"}
28
+ data.setdefault("include_project_map", False)
29
+ allowed.add("include_project_map")
30
+ if type(data["include_project_map"]) is not bool:
31
+ raise ValueError("Use true or false for include_project_map.")
32
+ else:
33
+ raise ValueError("Choose reader or reviewer for this web invitation.")
34
+ if data.keys() != allowed:
35
+ raise ValueError("The profile fields do not match the selected invitation mode.")
36
+ if type(data["expires_at"]) is not int or time.time() >= data["expires_at"]:
37
+ raise ValueError("Choose a future Unix timestamp for the web invitation.")
38
+ if type(data["binding_revision"]) is not int or data["binding_revision"] < 1:
39
+ raise ValueError("Select the current binding revision.")
40
+ if not isinstance(data["sources"], list):
41
+ raise ValueError("Provide an array of frozen source references.")
42
+ try:
43
+ data["control"] = Path(data["control"])
44
+ data["sources"] = tuple(SharedText(**item) for item in data["sources"])
45
+ return cls(**data)
46
+ except (TypeError, AttributeError) as exc:
47
+ raise ValueError("Invalid field type or source reference in the web profile.") from exc
48
+
49
+
50
+ def main():
51
+ parser = argparse.ArgumentParser(description=__doc__)
52
+ parser.add_argument("--profile", type=Path, required=True, help="Private JSON prepared by the project manager")
53
+ parser.add_argument("--origin", required=True, help="Public HTTPS origin forwarded to this connection")
54
+ parser.add_argument("--port", type=int, required=True, help="Local loopback port")
55
+ parser.add_argument("--approval-code-file", type=Path, help="Read an owner-generated random code from a private local file for unattended startup")
56
+ args = parser.parse_args()
57
+ if urlsplit(args.origin).scheme != "https" or not 1 <= args.port <= 65535:
58
+ parser.error("Provide an HTTPS origin and a valid loopback port.")
59
+ if not args.approval_code_file and not sys.stdout.isatty():
60
+ parser.error("Start in a local terminal to view the approval code, or use --approval-code-file.")
61
+
62
+ try:
63
+ import uvicorn
64
+ from .server import create_app
65
+ except ImportError:
66
+ parser.exit(2, "Install this wheel with its [https] extra in the serving environment.\n")
67
+ try:
68
+ invitation = invitation_from_profile(json.loads(args.profile.read_text(encoding="utf-8-sig")))
69
+ code = (args.approval_code_file.read_text(encoding="utf-8-sig").strip()
70
+ if args.approval_code_file else secrets.token_urlsafe(24))
71
+ app = create_app(args.origin, invitation, code)
72
+ except (OSError, ValueError) as exc:
73
+ parser.exit(2, f"Cannot start this web invitation: {exc}\n")
74
+ print(f"Gemini MCP URL: {args.origin}/mcp", flush=True)
75
+ if not args.approval_code_file:
76
+ print(f"Enter this code only in the project's browser approval form: {code}", flush=True)
77
+ uvicorn.run(app, host="127.0.0.1", port=args.port, proxy_headers=False,
78
+ access_log=False, server_header=False)
79
+
80
+
81
+ if __name__ == "__main__":
82
+ main()