@damn-dev/cli 0.14.0 → 0.15.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damn-dev/cli",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "damn.dev — self-hosted workspace OS for human + AI agent collaboration.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://damn.dev",
@@ -98,6 +98,63 @@ Delegation chain failures surface as system messages in the originating channel
98
98
  with the step number and agent name that failed. Push notifications are sent to
99
99
  all workspace members on chain failure.
100
100
 
101
+ ## Team Canvas (Organigram view)
102
+
103
+ The workspace's team structure has a single home: **the Team page** at
104
+ `/governance` (sidebar icon labelled "Team"). Two views, both backed by
105
+ the same data:
106
+
107
+ - **Canvas** (default) — visual graph. Grey dashed lines = "reports to"
108
+ (parsed from `Organigram.md` `## Reporting Structure` section). Indigo
109
+ solid lines = "auto-trusted to delegate" (standing trust grants from
110
+ `DelegationRule` rows). Pink animated dashed lines = COO-proposed trust
111
+ grants awaiting human approval. Layout auto-picks per shape: radial
112
+ hub-and-spoke for flat teams (one root + many reports), dagre top-down
113
+ for hierarchies, grid as fallback.
114
+
115
+ - **Markdown** — editable textarea of `Organigram.md`. Same backing file
116
+ the COO maintains. Saves trigger an instant canvas re-render.
117
+
118
+ The user can:
119
+ - **Left-click any agent on the canvas** → AgentInspector side panel
120
+ shows that agent's parent, direct reports, outgoing/incoming trust,
121
+ per-agent rules, workspace-inherited rules. Quick actions include
122
+ Open channel, Edit soul, Toggle outgoing/incoming delegation, and
123
+ **Change…** (reparent the agent under a different lead).
124
+ - **Drag from one agent's bottom edge to another's top edge** → creates a
125
+ trust grant ("A is auto-trusted to delegate to B"). Drawing IS the
126
+ approval (no card created — the human drawing is the approver).
127
+ - **Hover a trust line** → small Remove/Info popover for revoking.
128
+
129
+ ### Organigram updates by COO — the `organigram-update` block
130
+
131
+ For structural changes (reparent, set-role) the COO should prefer the
132
+ structured `organigram-update` block over rewriting `Organigram.md` prose
133
+ directly. The block goes through the approval pipeline (auto-approvable
134
+ by default), atomically rewrites only the `## Reporting Structure`
135
+ section, broadcasts a `delegationGraph.changed` WS event, and the canvas
136
+ reflects the change within ~1s.
137
+
138
+ Format:
139
+ ```organigram-update
140
+ {
141
+ "operations": [
142
+ {"op": "reparent", "child": "<agentId>", "parent": "<agentId>" | null},
143
+ {"op": "set-role", "agentId": "<agentId>", "role": "<text>"}
144
+ ],
145
+ "reason": "Why this change."
146
+ }
147
+ ```
148
+
149
+ `parent: null` makes the child a root (reports to no one). Cycle
150
+ protection is enforced server-side. Other `Organigram.md` sections
151
+ (Agent Directory descriptions, Federation lists, narrative prose) are
152
+ preserved verbatim — the block only touches Reporting Structure.
153
+
154
+ Use prose editing via `setOrganigram` (the Markdown tab) for descriptive
155
+ content; use the `organigram-update` block for structural mutations the
156
+ canvas needs to reflect live.
157
+
101
158
  ## Approvals
102
159
  All sensitive agent actions require human approval before execution:
103
160
 
@@ -120,18 +177,26 @@ All sensitive agent actions require human approval before execution:
120
177
  - **git_merge** — merges and rebases. **Never auto-approves** (destructive).
121
178
  - **delegation_rule** — the meta-approval for creating rules. **Never
122
179
  auto-approves.**
180
+ - **organigram_update** — structural changes to the team organigram
181
+ (reparent agents, set agent roles) emitted by COO via the
182
+ `organigram-update` block. **Auto-approvable by default** (low risk —
183
+ metadata only); users can opt-in to gate via rule pattern
184
+ `organigram:reparent` / `organigram:set-role` / `organigram:*`.
123
185
 
124
186
  Approval cards appear inline in the chat. The approval panel (shield icon in
125
- sidebar) shows all pending approvals. Telegram bridge supports inline approvals
126
- with risk-tiered buttons.
187
+ sidebar) has two tabs: **Pending** (active approval queue) and **Rules** (every
188
+ auto-approve rule in the workspace, with the rule-owning agent badged). Telegram
189
+ bridge supports inline approvals with risk-tiered buttons.
127
190
 
128
191
  ### Approval Rules System
129
192
 
130
193
  Users auto-approve repetitive actions via per-pattern rules. Two scopes:
131
194
 
132
- - **Workspace rules** (SettingsWorkspace Approval Rules) apply to every
133
- agent. Use for "every agent can run `git status`".
134
- - **Agent rules** (Agent panel → Trust tab → Approval Rules) — apply to one
195
+ - **Workspace rules** (Approvals panel Rules tab, or Settings Workspace
196
+ Approval Rules) — apply to every agent. Use for "every agent can run
197
+ `git status`".
198
+ - **Agent rules** (Agent panel → Trust tab → Approval Rules, OR via the Team
199
+ Canvas Agent Inspector → click any agent on /governance) — apply to one
135
200
  agent. Use for "the COO can run `git push` but others cannot".
136
201
 
137
202
  Precedence: per-agent deny > per-agent allow > workspace deny > workspace allow.
@@ -143,6 +208,9 @@ Pattern syntax by type:
143
208
  - `delegate:<toAgentId>` or `delegate:*` — per-target or any delegation.
144
209
  - `skill_tool:<skill>.<tool>` or `skill_tool:<skill>.*`
145
210
  - `git_pr:<provider>` (github | gitlab)
211
+ - `cron:<jobName>` or `cron:*`
212
+ - `organigram:reparent` / `organigram:set-role` / `organigram:*` — gates the
213
+ structural-mutation block COO can emit.
146
214
 
147
215
  Checking "Always allow <pattern>" on an approval card creates a rule
148
216
  automatically. The card shows the exact pattern being saved so the user knows