teamshare-bridge 0.5.2 → 0.7.0

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 (42) hide show
  1. package/dist/bridge/spawn.d.ts +1 -1
  2. package/dist/cli/commands/context.d.ts +1 -0
  3. package/dist/cli/commands/context.js +101 -0
  4. package/dist/cli/commands/context.js.map +1 -0
  5. package/dist/cli/commands/harness.js +58 -1
  6. package/dist/cli/commands/harness.js.map +1 -1
  7. package/dist/cli/index.js +5 -1
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/cli/utils.d.ts +2 -2
  10. package/dist/cli/utils.js.map +1 -1
  11. package/dist/lib/agy-pty.d.ts +25 -0
  12. package/dist/lib/agy-pty.js +85 -0
  13. package/dist/lib/agy-pty.js.map +1 -0
  14. package/dist/lib/api.d.ts +35 -2
  15. package/dist/lib/api.js +26 -0
  16. package/dist/lib/api.js.map +1 -1
  17. package/dist/lib/brief.js +17 -0
  18. package/dist/lib/brief.js.map +1 -1
  19. package/dist/lib/chat-reply.js +4 -4
  20. package/dist/lib/chat-reply.js.map +1 -1
  21. package/dist/lib/config.d.ts +1 -1
  22. package/dist/lib/context/scan.d.ts +10 -0
  23. package/dist/lib/context/scan.js +284 -0
  24. package/dist/lib/context/scan.js.map +1 -0
  25. package/dist/lib/doc-reply.js +4 -4
  26. package/dist/lib/doc-reply.js.map +1 -1
  27. package/dist/lib/git-auth.d.ts +13 -0
  28. package/dist/lib/git-auth.js +84 -0
  29. package/dist/lib/git-auth.js.map +1 -0
  30. package/dist/lib/harness-adapter.d.ts +12 -3
  31. package/dist/lib/harness-adapter.js +93 -9
  32. package/dist/lib/harness-adapter.js.map +1 -1
  33. package/dist/lib/harness.d.ts +9 -0
  34. package/dist/lib/harness.js +26 -0
  35. package/dist/lib/harness.js.map +1 -1
  36. package/dist/lib/orchestrator/client.d.ts +5 -0
  37. package/dist/lib/orchestrator/client.js +56 -11
  38. package/dist/lib/orchestrator/client.js.map +1 -1
  39. package/dist/lib/orchestrator/worktree.js +6 -1
  40. package/dist/lib/orchestrator/worktree.js.map +1 -1
  41. package/package.json +4 -1
  42. package/skills/teamshare-cdd/SKILL.md +27 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamshare-bridge",
3
- "version": "0.5.2",
3
+ "version": "0.7.0",
4
4
  "description": "Local bridge for TeamShare agents - CLI session runner, auto-wake WebSocket daemon, and teamshare:// protocol handler.",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
@@ -43,5 +43,8 @@
43
43
  "devDependencies": {
44
44
  "@types/node": "^22.0.0",
45
45
  "typescript": "^5.6.0"
46
+ },
47
+ "optionalDependencies": {
48
+ "node-pty": "^1.1.0"
46
49
  }
47
50
  }
@@ -44,37 +44,49 @@ Rules that are not optional:
44
44
  ## The workflow — three gates
45
45
 
46
46
  ### START (before touching any code)
47
- 1. `list_document_folders` + `list_documents` for the project.
48
- 2. Read `docs/contracts`, `docs/adr`, `docs/guides` that exist — they govern
47
+ 1. **Read the cloud project context** via `get_project_context` — the
48
+ structured AGENTS.md every agent maintains (overview, architecture,
49
+ structure, workflows, conventions, gotchas). This is your map of the
50
+ codebase; it tells you where things live BEFORE you explore.
51
+ 2. `list_document_folders` + `list_documents` for the project.
52
+ 3. Read `docs/contracts`, `docs/adr`, `docs/guides` that exist — they govern
49
53
  your implementation (same way `docs/api-contract.md` and
50
54
  `docs/ui-style-guide.md` govern TeamShare's repos).
51
- 3. Read your own task folder if this is a `--continue`/resumed session.
52
- 4. **Write `plan.md` FIRST** via `create_document`: goal, decisions, files to
55
+ 4. Read your own task folder if this is a `--continue`/resumed session.
56
+ 5. **Write `plan.md` FIRST** via `create_document`: goal, decisions, files to
53
57
  touch, step list. No code until the plan note exists.
54
- 5. **Move the task to `in_progress`** via `update_task` — you are now working it.
58
+ 6. **Move the task to `in_progress`** via `update_task` — you are now working it.
55
59
 
56
60
  ### DO (while working)
57
- 6. Check off subtasks (`update_subtask done: true`) and update
61
+ 7. Check off subtasks (`update_subtask done: true`) and update
58
62
  `progress.md`/`plan.md` via `update_document_note` as you go — the human
59
63
  watches the app.
60
- 7. **Checklist items — ALWAYS list first.** Before creating checklist items,
64
+ 8. **Checklist items — ALWAYS list first.** Before creating checklist items,
61
65
  call `list_checklist_items` (pass `taskId` or `subtaskId`) to see what
62
66
  already exists. Use `update_checklist_item` with the existing ID to toggle
63
67
  done/rename — do NOT create duplicates. Only call `create_checklist_item`
64
68
  for genuinely new items. The `get_task` response also includes
65
69
  `checklistItems` for task-level items, and `list_subtasks` includes them
66
70
  per subtask.
67
- 8. When you make an architecture decision worth keeping, add it to `docs/adr`
71
+ 9. When you make an architecture decision worth keeping, add it to `docs/adr`
68
72
  as `ADR-<n>-<title>.md` (short: context → decision → consequences).
69
- 9. Blocked? Use `ask_human` and include a pointer to the relevant note.
73
+ 10. Blocked? Use `ask_human` and include a pointer to the relevant note.
70
74
 
71
75
  ### DONE (before closing)
72
- 10. **Move the task to `in_review`** via `update_task` — signals the human
76
+ 11. **Move the task to `in_review`** via `update_task` — signals the human
73
77
  to review your work.
74
- 11. Write `summary.md`: what you built, why, how it maps to the plan, links to
78
+ 12. Write `summary.md`: what you built, why, how it maps to the plan, links to
75
79
  related docs, follow-ups.
76
- 12. Post the closing comment referencing the summary doc.
77
- 13. Never leave a task without `plan.md` + `summary.md` notes.
80
+ 13. Post the closing comment referencing the summary doc.
81
+ 14. Never leave a task without `plan.md` + `summary.md` notes.
82
+ 15. **Update the project context when reality changed** (mandatory). If your
83
+ work added/moved/deleted folders or files that matter, changed commands or
84
+ workflows, or established new conventions — call `update_project_context`
85
+ with the affected sections (`structure`, `workflows`, `conventions`,
86
+ `architecture`, `gotchas`) and the `baseVersion` from your last read.
87
+ A stale version means another writer got there first: re-read via
88
+ `get_project_context`, merge, retry. The next agent depends on this being
89
+ accurate — do not leave the map stale.
78
90
 
79
91
  ## Task status progression (guidance)
80
92
 
@@ -133,6 +145,8 @@ run, the following rules apply ON TOP of everything above:
133
145
 
134
146
  ## Tools to use
135
147
 
148
+ - `get_project_context <projectId>` — the cloud AGENTS.md (all sections + version).
149
+ - `update_project_context` — partial section update (pass `baseVersion`; 409 = re-read + merge).
136
150
  - `list_document_folders <projectId>` — the tree, with per-folder counts.
137
151
  - `list_documents <projectId>` — files (optionally filter by folder).
138
152
  - `read_document <documentId>` — content (notes return their markdown body).