crewly 1.5.19 → 1.5.20
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/config/orchestrator_tasks/prompts/orchestrator-prompt.md +46 -0
- package/config/risk-policies/no-local-browser.policy.md +43 -0
- package/config/sops/xhs-requirement-log.v1.md +238 -0
- package/dist/backend/backend/src/controllers/mission/mission-policy.routes.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/mission/mission-policy.routes.js +152 -19
- package/dist/backend/backend/src/controllers/mission/mission-policy.routes.js.map +1 -1
- package/dist/backend/backend/src/controllers/task-pool/task-pool.controller.d.ts +23 -0
- package/dist/backend/backend/src/controllers/task-pool/task-pool.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/task-pool/task-pool.controller.js +89 -0
- package/dist/backend/backend/src/controllers/task-pool/task-pool.controller.js.map +1 -1
- package/dist/backend/backend/src/index.d.ts.map +1 -1
- package/dist/backend/backend/src/index.js +37 -0
- package/dist/backend/backend/src/index.js.map +1 -1
- package/dist/backend/backend/src/scripts/backfill-mission-priority.d.ts +43 -0
- package/dist/backend/backend/src/scripts/backfill-mission-priority.d.ts.map +1 -0
- package/dist/backend/backend/src/scripts/backfill-mission-priority.js +90 -0
- package/dist/backend/backend/src/scripts/backfill-mission-priority.js.map +1 -0
- package/dist/backend/backend/src/services/agent/agent-registration.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/agent/agent-registration.service.js +3 -0
- package/dist/backend/backend/src/services/agent/agent-registration.service.js.map +1 -1
- package/dist/backend/backend/src/services/ai/prompt-modules/prompt-assembly.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/ai/prompt-modules/prompt-assembly.service.js +2 -0
- package/dist/backend/backend/src/services/ai/prompt-modules/prompt-assembly.service.js.map +1 -1
- package/dist/backend/backend/src/services/ai/prompt-modules/team-norms.module.d.ts +16 -3
- package/dist/backend/backend/src/services/ai/prompt-modules/team-norms.module.d.ts.map +1 -1
- package/dist/backend/backend/src/services/ai/prompt-modules/team-norms.module.js +116 -19
- package/dist/backend/backend/src/services/ai/prompt-modules/team-norms.module.js.map +1 -1
- package/dist/backend/backend/src/services/core/storage.service.d.ts +33 -0
- package/dist/backend/backend/src/services/core/storage.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/core/storage.service.js +54 -0
- package/dist/backend/backend/src/services/core/storage.service.js.map +1 -1
- package/dist/backend/backend/src/services/task-pool/task-pool.service.d.ts +28 -3
- package/dist/backend/backend/src/services/task-pool/task-pool.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/task-pool/task-pool.service.js +139 -79
- package/dist/backend/backend/src/services/task-pool/task-pool.service.js.map +1 -1
- package/dist/backend/backend/src/services/template/template.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/template/template.service.js +1 -0
- package/dist/backend/backend/src/services/template/template.service.js.map +1 -1
- package/dist/backend/backend/src/services/v3/service-contract-gate.service.d.ts +88 -0
- package/dist/backend/backend/src/services/v3/service-contract-gate.service.d.ts.map +1 -0
- package/dist/backend/backend/src/services/v3/service-contract-gate.service.js +138 -0
- package/dist/backend/backend/src/services/v3/service-contract-gate.service.js.map +1 -0
- package/dist/backend/backend/src/services/v3/team-trigger-reconciler.service.d.ts +77 -0
- package/dist/backend/backend/src/services/v3/team-trigger-reconciler.service.d.ts.map +1 -0
- package/dist/backend/backend/src/services/v3/team-trigger-reconciler.service.js +177 -0
- package/dist/backend/backend/src/services/v3/team-trigger-reconciler.service.js.map +1 -0
- package/dist/backend/backend/src/types/index.d.ts +28 -0
- package/dist/backend/backend/src/types/index.d.ts.map +1 -1
- package/dist/backend/backend/src/types/index.js.map +1 -1
- package/dist/backend/backend/src/types/team-template.types.d.ts +2 -0
- package/dist/backend/backend/src/types/team-template.types.d.ts.map +1 -1
- package/dist/backend/backend/src/types/team-template.types.js.map +1 -1
- package/dist/backend/backend/src/types/v2/mission.types.d.ts +51 -0
- package/dist/backend/backend/src/types/v2/mission.types.d.ts.map +1 -1
- package/dist/backend/backend/src/types/v2/mission.types.js +66 -0
- package/dist/backend/backend/src/types/v2/mission.types.js.map +1 -1
- package/dist/backend/backend/src/types/v2/trigger.types.d.ts +16 -0
- package/dist/backend/backend/src/types/v2/trigger.types.d.ts.map +1 -1
- package/dist/backend/backend/src/types/v2/trigger.types.js +2 -0
- package/dist/backend/backend/src/types/v2/trigger.types.js.map +1 -1
- package/dist/backend/backend/src/types/v2/work-item.types.d.ts +10 -0
- package/dist/backend/backend/src/types/v2/work-item.types.d.ts.map +1 -1
- package/dist/backend/backend/src/types/v2/work-item.types.js +11 -1
- package/dist/backend/backend/src/types/v2/work-item.types.js.map +1 -1
- package/dist/cli/backend/src/services/core/storage.service.d.ts +33 -0
- package/dist/cli/backend/src/services/core/storage.service.d.ts.map +1 -1
- package/dist/cli/backend/src/services/core/storage.service.js +54 -0
- package/dist/cli/backend/src/services/core/storage.service.js.map +1 -1
- package/dist/cli/backend/src/types/index.d.ts +28 -0
- package/dist/cli/backend/src/types/index.d.ts.map +1 -1
- package/dist/cli/backend/src/types/index.js.map +1 -1
- package/dist/cli/backend/src/types/team-template.types.d.ts +2 -0
- package/dist/cli/backend/src/types/team-template.types.d.ts.map +1 -1
- package/dist/cli/backend/src/types/team-template.types.js.map +1 -1
- package/dist/cli/backend/src/types/v2/trigger.types.d.ts +201 -0
- package/dist/cli/backend/src/types/v2/trigger.types.d.ts.map +1 -0
- package/dist/cli/backend/src/types/v2/trigger.types.js +174 -0
- package/dist/cli/backend/src/types/v2/trigger.types.js.map +1 -0
- package/dist/cli/backend/src/types/v2/work-item.types.d.ts +11 -1
- package/dist/cli/backend/src/types/v2/work-item.types.d.ts.map +1 -1
- package/dist/cli/backend/src/types/v2/work-item.types.js +14 -11
- package/dist/cli/backend/src/types/v2/work-item.types.js.map +1 -1
- package/frontend/dist/assets/{index-e3de7a8c.css → index-47564020.css} +1 -1
- package/frontend/dist/assets/index-5e804749.js +5220 -0
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
- package/frontend/dist/assets/index-f6bc685f.js +0 -4924
|
@@ -12,6 +12,52 @@ As the orchestrator, you specialize in:
|
|
|
12
12
|
- Inter-agent communication facilitation
|
|
13
13
|
- Strategic project oversight
|
|
14
14
|
|
|
15
|
+
## Core Concepts — Missions, Requests, Tasks
|
|
16
|
+
|
|
17
|
+
Crewly distinguishes three levels of work. Use the right one for the right horizon:
|
|
18
|
+
|
|
19
|
+
- **Mission** — a team's **long-term objective** (the "O" in OKR). It carries
|
|
20
|
+
a `period` (weekly / biweekly / monthly / quarterly / custom), a `priority`
|
|
21
|
+
(critical / high / medium / low), zero-or-more **Key Results** (the "KR"s —
|
|
22
|
+
measurable numeric / percentage / currency / boolean targets with a
|
|
23
|
+
baseline → current → target trajectory), and an optional `parentMissionId`
|
|
24
|
+
that cascades company-level OKRs down to team-level and individual-level
|
|
25
|
+
OKRs. Missions live for **weeks to a quarter** and are the source of truth
|
|
26
|
+
for "what this team is responsible for right now." They are also where
|
|
27
|
+
KPIs / long-range plans are tracked — if a user says "let's set our Q2
|
|
28
|
+
OKRs" or "track this KPI," that is a Mission, not a Request.
|
|
29
|
+
|
|
30
|
+
- **Request** — a **user-initiated ask** (chat message, Slack message, ticket).
|
|
31
|
+
Requests are short-lived (minutes to days), bound to a single user, and
|
|
32
|
+
usually resolve into one or more Tasks. A Request MAY contribute to a
|
|
33
|
+
Mission's progress but does not replace it.
|
|
34
|
+
|
|
35
|
+
- **Task (WorkItem)** — an **executable unit of work** assigned to an agent.
|
|
36
|
+
Tasks live in the TaskPool and are decomposed from either a Request or a
|
|
37
|
+
Mission (via the `decompose-mission` skill). Tasks carry `contributesToKR`
|
|
38
|
+
links so that completing a Task updates the parent Mission's KR progress.
|
|
39
|
+
|
|
40
|
+
### When to create / touch which
|
|
41
|
+
|
|
42
|
+
| User signal | Right artefact |
|
|
43
|
+
|---|---|
|
|
44
|
+
| "Set our Q2 goals" / "I want to track MRR → $5k" / "What are the team's OKRs?" | **Mission** (create if missing; edit `priority` / `period` / KRs) |
|
|
45
|
+
| "Fix this bug" / "Ship feature X by Friday" | **Request** → decompose into Tasks |
|
|
46
|
+
| "Agent-level action I am delegating now" | **Task** |
|
|
47
|
+
|
|
48
|
+
### Mission lifecycle
|
|
49
|
+
|
|
50
|
+
- `active → paused` — user pauses, no autonomous work
|
|
51
|
+
- `active → completed` — all success criteria (or all KRs `achieved`) met
|
|
52
|
+
- `active → cancelled` — no longer viable; record learnings
|
|
53
|
+
- `paused → active` — resumed
|
|
54
|
+
|
|
55
|
+
Use `review-mission` (OKR review) on cadence; use `decompose-mission` when a
|
|
56
|
+
Mission needs fresh Tasks; use `measure-kr` when you have a new reading for a
|
|
57
|
+
Key Result. Never embed KR tracking inside a Request — it belongs on the
|
|
58
|
+
Mission. When unsure whether something is a Mission or a Request: **if it
|
|
59
|
+
survives the current week and has a measurable target, it is a Mission.**
|
|
60
|
+
|
|
15
61
|
## Registration Required
|
|
16
62
|
|
|
17
63
|
**IMMEDIATELY** after initialization, register yourself by running:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Risk Policy: No Local Browser / Desktop Automation
|
|
2
|
+
|
|
3
|
+
**Applies to:** Agents working on a user's active workstation where opening local browser/desktop windows would interfere with the user's current session.
|
|
4
|
+
|
|
5
|
+
**Why:** Agents have repeatedly opened the user's local Chrome/iPad/desktop, disrupting real user activity. Several reported incidents trace back to this class of skill.
|
|
6
|
+
|
|
7
|
+
## Prohibited Actions
|
|
8
|
+
|
|
9
|
+
**NEVER call any of the following skills:**
|
|
10
|
+
|
|
11
|
+
- `chrome-attach` — attaches to the user's local Chrome (DO NOT USE)
|
|
12
|
+
- `computer-use` — drives the whole local desktop (DO NOT USE)
|
|
13
|
+
- `desktop-app-control` — local GUI automation (DO NOT USE)
|
|
14
|
+
- `browse-stealth` — opens a local browser (DO NOT USE)
|
|
15
|
+
- `screenshot-compare` — only if it invokes local screen capture (use remote equivalent)
|
|
16
|
+
- Any Playwright or direct CDP invocation against the local machine
|
|
17
|
+
- Any skill whose `execute.sh` calls `open`, `osascript`, `xdotool`, or equivalent
|
|
18
|
+
|
|
19
|
+
## Required Alternative
|
|
20
|
+
|
|
21
|
+
When a task requires browsing the web, viewing a page, or interacting with logged-in sites:
|
|
22
|
+
|
|
23
|
+
**Use `remote-browser`** (the Crewly Chrome Extension bridge). It controls the user's real Chrome via WebSocket/Cloud Relay WITHOUT opening new local windows or stealing focus.
|
|
24
|
+
|
|
25
|
+
Example:
|
|
26
|
+
```bash
|
|
27
|
+
bash ${AGENT_SKILLS_PATH}/remote-browser/execute.sh '{"action":"navigate","url":"https://example.com"}'
|
|
28
|
+
bash ${AGENT_SKILLS_PATH}/remote-browser/execute.sh '{"action":"read-text"}'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If `remote-browser` is unavailable (extension not installed / cloud relay down), **STOP and report** via `send-message` to the team leader or orchestrator. Do NOT fall back to local browser skills.
|
|
32
|
+
|
|
33
|
+
## Circuit Breaker
|
|
34
|
+
|
|
35
|
+
If the remote browser service is offline or rate-limited:
|
|
36
|
+
1. Report the blocker immediately
|
|
37
|
+
2. Mark the WorkItem as `blocked`
|
|
38
|
+
3. Wait for human or orchestrator resolution
|
|
39
|
+
4. Never silently switch to a local-browser skill to "unblock yourself"
|
|
40
|
+
|
|
41
|
+
## Logging
|
|
42
|
+
|
|
43
|
+
Every invocation of `remote-browser` is logged by the skill wrapper. Any attempt to invoke a prohibited skill should be refused by the agent and reported via `record-learning` so the pattern can be audited.
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# XHS Requirement Log (Spec-In → Result-Out)
|
|
2
|
+
|
|
3
|
+
> **Authority**: Steve (Founder) policy directive, 2026-04-17.
|
|
4
|
+
> **Effective**: 2026-04-17 — PERMANENT (supersedes every "check iriss-air / scrape / connect" pattern).
|
|
5
|
+
> **Scope**: Every XHS data need. No exceptions.
|
|
6
|
+
> **Owner**: Grace (Distribution & Growth). Co-maintainers: Ella (TL), Luna (Content Strategist).
|
|
7
|
+
> **Upstream counterparty**: iriss-air team (via `crewly-orc` → Rex `rednote-team-rex-*`).
|
|
8
|
+
> **Related policy**: `sop/xhs-remote-only-policy-v2.1.md`, `sop/POLICY-manual-execution-only.md`.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 0. Hard rules (non-negotiable)
|
|
13
|
+
|
|
14
|
+
1. **NO local Chrome / iPad / Playwright / Patchright / CDP / MCP touches XHS.** Any URL under `*.xiaohongshu.com` from a local tool is a policy breach. This includes the `remote-browser` skill pointed at iriss-air when its own extension is `connected=false` (proxy can fall back to local Chrome — confirmed 2026-04-17T14:13Z breach).
|
|
15
|
+
2. **Zero iriss-air internal-state monitoring.** Don't poll `/api/browser/status`, Chrome CDP port 9222, iPad availability, etc. Those are iriss-air's problems.
|
|
16
|
+
3. **Only two legitimate interactions with iriss-air**:
|
|
17
|
+
- Send a **Requirement Spec** (this log).
|
|
18
|
+
- Receive a **Delivery** and run the **Verification Checklist** (§5).
|
|
19
|
+
4. **No workarounds** (VNC, stealth browser, agent-browser to iriss-air, Cloud Relay direct, etc.). If the spec-in/result-out channel is broken, file a Blocker entry and hand back to Ella.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. What a Requirement Spec MUST contain
|
|
24
|
+
|
|
25
|
+
Every spec sent to iriss-air (via `send-message` → `crewly-orc`) must include these **10 fields** (v1.2 adds `job_size`). Anything missing → treated as ambiguous and NACK'd on return.
|
|
26
|
+
|
|
27
|
+
| # | Field | Format | Notes |
|
|
28
|
+
|---|-------|--------|-------|
|
|
29
|
+
| 1 | `spec_id` | `XHS-REQ-YYYYMMDD-HHMM-<slug>` | Unique, monotonically increasing. Example: `XHS-REQ-20260417-1308-daily-comments` |
|
|
30
|
+
| 2 | `origin` | Marketing role + task reference | Who asked and why (which task / cron) |
|
|
31
|
+
| 3 | `priority` | `P0a / P0b / P1 / P2` | **v1.2 split**: P0a = ship today, fast job; P0b = ship today, heavy job; P1 = within 24h; P2 = within this week. `priority` MUST be consistent with `job_size` (see field 10). |
|
|
32
|
+
| 4 | `window` | ISO8601 range | Hard time window the data must cover (e.g. `2026-04-10T13:08Z / 2026-04-17T13:08Z`) |
|
|
33
|
+
| 5 | `delta_anchor` | ISO8601 timestamp OR `none` | "Only new since X" anchor. If `none`, full window |
|
|
34
|
+
| 6 | `targets` | Post IDs or post titles (roster) | Explicit list — do NOT say "all active posts" without enumerating |
|
|
35
|
+
| 7 | `fields` | Schema list | The per-record columns you need (see §2 catalogue) |
|
|
36
|
+
| 8 | `deliverable_path` | Local path under `ops/marketing/tmp/` | Where iriss-air's `reply-remote` should inline-land the file |
|
|
37
|
+
| 9 | `policy_tags` | List | e.g. `data-collection-only`, `no-reply`, `dedupe-on=...` |
|
|
38
|
+
| **10** | **`job_size`** (v1.2) | **`fast-poll` \| `full-scrape`** | **Drives SLA routing in §3.** `fast-poll` = ≤ 4 targets AND no comments-scroll (headline metrics / spot checks / ban-signal). `full-scrape` = ≥ 5 targets OR any comments-scroll OR account-snapshot. Mismatch with `priority` (e.g. P0a + full-scrape) is rejected at dispatch. |
|
|
39
|
+
|
|
40
|
+
### Priority × job_size matrix (reference)
|
|
41
|
+
|
|
42
|
+
| `job_size` | Allowed `priority` | SLA (see §3) | Typical case |
|
|
43
|
+
|------------|--------------------|--------------|--------------|
|
|
44
|
+
| `fast-poll` | `P0a`, `P1`, `P2` | P0a: 20 min; P1: 4 h; P2: same day | Risk-signal check, one-post metric pull, "did this note go viral yet?" |
|
|
45
|
+
| `full-scrape` | `P0b`, `P1`, `P2` | P0b: 90–120 min; P1: 4 h; P2: same day | Cron #10 daily comment sweep, weekly account snapshot, 11-post delta roster |
|
|
46
|
+
|
|
47
|
+
### Spec template (copy when issuing a new request) — v1.2
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
[TASK from <your-session> — <ISO8601 UTC>]
|
|
51
|
+
|
|
52
|
+
spec_id: XHS-REQ-YYYYMMDD-HHMM-<slug>
|
|
53
|
+
priority: P0a|P0b|P1|P2
|
|
54
|
+
job_size: fast-poll|full-scrape # v1.2 — REQUIRED; drives SLA routing
|
|
55
|
+
origin: <role> / <task-or-cron-ref>
|
|
56
|
+
|
|
57
|
+
window: <startISO> / <endISO>
|
|
58
|
+
delta_anchor: <ISO or "none">
|
|
59
|
+
targets:
|
|
60
|
+
- <post_title_or_id>
|
|
61
|
+
- <post_title_or_id>
|
|
62
|
+
...
|
|
63
|
+
fields: [<from §2 catalogue>]
|
|
64
|
+
|
|
65
|
+
deliverable_path (local landing):
|
|
66
|
+
/Users/yellowsunhy/.../ops/marketing/tmp/<filename>.md
|
|
67
|
+
deliverable_path (iriss-air):
|
|
68
|
+
/Users/irisran/projects/rednote-team/tmp/<same-filename>.md
|
|
69
|
+
|
|
70
|
+
policy_tags: [data-collection-only, no-reply, dedupe-on=(post_id,commenter_username,comment_date)]
|
|
71
|
+
|
|
72
|
+
On NO-NEW data, reply with an explicit "NO NEW <scope>" confirmation + dispatch id.
|
|
73
|
+
On partial failure (nav-blocked post, etc.), enumerate which targets failed and why.
|
|
74
|
+
DO NOT fall back to local scraping. If iPad/rednote-reader is down, report and stop.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 2. Field-schema catalogue (what to put in `fields`)
|
|
80
|
+
|
|
81
|
+
Pick exactly the columns you need — don't over-ask.
|
|
82
|
+
|
|
83
|
+
### 2.1 Comment scrape (`kind: comments`)
|
|
84
|
+
```
|
|
85
|
+
commenter_username, commenter_relation (follower|friend|none|unknown),
|
|
86
|
+
comment_date (ISO8601), comment_body,
|
|
87
|
+
parent_post_title (or parent_post_id),
|
|
88
|
+
is_reply_to_steve (bool), has_unread_flag (bool),
|
|
89
|
+
parent_comment_id (for threaded replies, optional)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 2.2 Post metrics (`kind: post-metrics`)
|
|
93
|
+
```
|
|
94
|
+
post_id, post_title, published_date, impressions, likes, saves,
|
|
95
|
+
comments_count, new_followers (if attributable), ces_score (if computed)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 2.3 Account snapshot (`kind: account-snapshot`)
|
|
99
|
+
```
|
|
100
|
+
snapshot_time (ISO), follower_count, total_likes, total_saves, posts_visible,
|
|
101
|
+
verified_status, banner_changed (bool)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 2.4 Competitor / trending (`kind: competitor`)
|
|
105
|
+
```
|
|
106
|
+
account_handle, topic, post_title, likes, comments, saves, posted_at,
|
|
107
|
+
content_hook (1 sentence), observed_pattern
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 2.5 DM / private inbox (`kind: dms`) — *only if Steve authorises*
|
|
111
|
+
```
|
|
112
|
+
sender_username, sender_relation, received_at, body, is_unread, thread_id
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 2.6 Ban / risk signals (`kind: risk-signal`)
|
|
116
|
+
```
|
|
117
|
+
signal_type (shadowban|rate-limit|captcha|login-wall|geo-block),
|
|
118
|
+
post_affected, observed_at, evidence_screenshot_path
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 3. Dispatch mechanics (spec → iriss-air)
|
|
124
|
+
|
|
125
|
+
1. **Write the spec** using template above. Save a dispatch log to `ops/marketing/tmp/xhs-scrape-dispatch-<ISO>.md` (precedent: we've been doing this since 2026-04-14).
|
|
126
|
+
2. **Create placeholder**: `ops/marketing/tmp/<deliverable-filename>.md`.
|
|
127
|
+
- **Required** (v1.1): the placeholder MUST contain the literal string `PLACEHOLDER — DO NOT VERIFY` in its first 5 lines. This is a fail-fast signal for the verification checklist (§5.1).
|
|
128
|
+
- The placeholder should also carry: status header `⏳ PENDING`, the `spec_id`, the dispatch time, and the expected iriss-air-side path.
|
|
129
|
+
3. **Dispatch** via the `send-message` skill → `crewly-orc` on iriss-air. Body = the spec template body (§1).
|
|
130
|
+
4. **Update the Active Register** (§4) with an `OPEN` row, including the dispatch time (this becomes the SLA anchor).
|
|
131
|
+
5. **Do NOT poll** iriss-air. **Calibrated SLA (v1.2 — tiered, approved by Ella TL 2026-04-17)**:
|
|
132
|
+
|
|
133
|
+
| Priority × job_size | Early-warning | SLA (hard breach) | Notes |
|
|
134
|
+
|---|---|---|---|
|
|
135
|
+
| **P0a** + `fast-poll` | 10 min | **20 min** | <5 targets AND no comments-scroll. Risk-signal, single-post metric, spot check. |
|
|
136
|
+
| **P0b** + `full-scrape` | 90 min | **120 min** | ≥5 targets OR comments-scroll OR account-snapshot. Cron #10 daily sweeps, 11-post roster. |
|
|
137
|
+
| **P1** (either `job_size`) | 2 h | **4 h** | Same-day-ish, not urgent. |
|
|
138
|
+
| **P2** (either `job_size`) | noon next day | **end of same operating day** | Weekly/monthly batch work. |
|
|
139
|
+
|
|
140
|
+
- **Early-warning** = log a note in the register row ("approaching SLA"), do nothing else — **no probe to iriss-air**.
|
|
141
|
+
- **Hard breach** = file a `BLOCKED: no-ack` entry and escalate to Ella. Still no probe.
|
|
142
|
+
- **Mismatch rejection**: if `priority=P0a` but `job_size=full-scrape` (or vice versa), verification treats the spec as malformed and marks `BLOCKED: malformed-spec`. Re-dispatch with corrected pairing.
|
|
143
|
+
- **Back-compat**: legacy rows recorded with flat `P0` stay valid; promote them to `P0a`/`P0b` at the next scrub pass (no emergency re-dispatch required).
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 4. Active Register
|
|
148
|
+
|
|
149
|
+
> **Update rule**: one row per `spec_id`. States: `OPEN → DELIVERED → VERIFIED → ARCHIVED`, or `BLOCKED / CANCELLED`. Move ARCHIVED rows to §7 weekly.
|
|
150
|
+
|
|
151
|
+
| spec_id | Origin | Priority | Issued (UTC) | Window | Expected Landing Path | State | Delivered @ | Verified @ | Notes |
|
|
152
|
+
|---------|--------|----------|--------------|--------|-----------------------|-------|-------------|------------|-------|
|
|
153
|
+
| XHS-REQ-20260417-0028-daily-comments | Grace / Cron #10a | P1 | 2026-04-17 00:29 | 7d rolling | `tmp/xhs-raw-comments-2026-04-17.md` | **DELIVERED** (superseded) | ~00:40 | pending | See `tmp/xhs-raw-comments-2026-04-17.md` — earliest of today's 5 dispatches. |
|
|
154
|
+
| XHS-REQ-20260417-0050-daily-comments | Grace / Cron #10a | P1 | 2026-04-17 00:51 | 7d explicit | `tmp/xhs-raw-comments-2026-04-17T0050Z.md` | **DELIVERED** (superseded) | ~01:05 | pending | Superseded by 0306Z full pull. |
|
|
155
|
+
| XHS-REQ-20260417-0306-daily-comments | Grace / Cron #10a | P1 | 2026-04-17 03:06 | delta since 14:00 PT | `tmp/xhs-raw-comments-2026-04-17T0306Z.md` | **DELIVERED** | ~03:25 | **VERIFIED** by Mila (see `reports/2026-04-17-xhs-evening-reply-package-mila.md`) | 20 KB body; largest comment set today. |
|
|
156
|
+
| XHS-REQ-20260417-1248-daily-comments | Grace / Cron #10b | P1 | 2026-04-17 12:48 | delta since 03:06Z | `tmp/xhs-raw-comments-2026-04-17T1248Z.md` | **DELIVERED** (per orc 14:40Z; iriss-air-side) | ~14:10Z (iriss-air-side completion) | pending local-file verification | Original dispatch hit "Rex down 1/1". Rex came back, full-scrape ran ~80min (03:06Z→14:10Z window). Used as authoritative upstream source for the 13:08Z derivative output. No local file landed yet — awaiting iriss-air re-send or treating 1308Z as the sufficient VERIFIED superset. |
|
|
157
|
+
| XHS-REQ-20260417-1308-daily-comments | Grace / Cron #10a | **P0b** (promoted from legacy P0 under v1.2; job_size=`full-scrape`, 11 targets + comments-scroll) | 2026-04-17 13:09 | delta since 12:48Z (fallback: 7d) | `tmp/xhs-raw-comments-2026-04-17T1308Z.md` | **✅ VERIFIED** | 2026-04-17 14:39Z (after re-send — original 14:15Z attempt truncated 4,644B → 2,031B in transport) | 2026-04-17 14:42Z | All §5 layers PASS: early-exit (placeholder gone, size 5,211B > 2,223B placeholder, mtime 14:40Z > dispatch+60s) ✅; envelope (spec_id matches, source declared as rednote-reader iPad Accessibility API / 非 Chrome/9222) ✅; scope (delta 03:06Z→13:08Z honoured; all 11 posts enumerated; post #11 retry succeeded) ✅; records (3 new comments, all mandatory fields present, dedup key unique) ✅; policy (no replies/cookies/tokens) ✅. **Business verdict**: NO NEW COMMENTS vs 12:48Z run — the 3 delta comments are already in the 12:48Z output. Transport truncation bug logged; drove the §5.1 canary add-on. **v1.2 SLA analysis**: under P0b 120min hard-breach clock, delivery at 14:39Z (90 min after 13:09Z dispatch) = within SLA (would have hit "early-warning at 90min" right as delivery landed, no breach). This single case validated the tiered SLA choice. |
|
|
158
|
+
|
|
159
|
+
**Priority backlog (not yet dispatched)**: none. Cron #10a / #10b today are absorbed by the 1308Z dispatch. New dispatches only on next Cron fire or Ella override.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 5. Verification Checklist (when iriss-air delivers)
|
|
164
|
+
|
|
165
|
+
Before marking a delivery `VERIFIED`, run every check. Any fail → NACK back to iriss-air with the failing row.
|
|
166
|
+
|
|
167
|
+
### 5.1 Envelope (metadata) — v1.1 additions in bold
|
|
168
|
+
|
|
169
|
+
**Early-exit (v1.1)** — run these FIRST and fail-fast:
|
|
170
|
+
|
|
171
|
+
1. **Fail-fast grep**: if the file's first 5 lines contain the literal string `PLACEHOLDER — DO NOT VERIFY`, immediately return `NOT DELIVERED`. Do not run any downstream check. (Protects against false-positive ACK of unchanged placeholder.)
|
|
172
|
+
2. **Size comparator**: if `current_size <= placeholder_size_at_dispatch` (recorded in the register row at §4), return `NOT DELIVERED`.
|
|
173
|
+
3. **mtime comparator**: if `file_mtime <= dispatch_time + 60s`, return `NOT DELIVERED` (delivery would have required iriss-air to overwrite the placeholder).
|
|
174
|
+
|
|
175
|
+
**Transport-integrity canary (v1.1, added 2026-04-17 after XHS-REQ-20260417-1308 transport bug)** — when the delivery header declares an upstream size (e.g. `iriss-air side: 4644 bytes`), compare it to `local_size`. If `|local_size - upstream_size| > 128 bytes`, treat as transport-truncation suspect → do NOT mark `VERIFIED`; request iriss-air re-send via single-message (not inline-split) and log as `TRUNCATED`. Root cause of 2026-04-17 truncation: Option-1 inline-split transport landed 2,031B of a 4,644B payload. Re-send via fresh single-message inline payload succeeded.
|
|
176
|
+
|
|
177
|
+
Only if all three early-exit checks pass, proceed to the original envelope checks:
|
|
178
|
+
|
|
179
|
+
- [ ] File landed at the exact `deliverable_path` from the spec (§1 field 8).
|
|
180
|
+
- [ ] File header contains the originating `spec_id` (§1 field 1).
|
|
181
|
+
- [ ] Timestamp in header is within ±30 min of dispatch time (sanity).
|
|
182
|
+
- [ ] Source tool declared (`rednote-reader` on iriss-air — NOT `Chrome`, `Playwright`, `local`).
|
|
183
|
+
- [ ] (v1.1) File does NOT still contain `PLACEHOLDER — DO NOT VERIFY` anywhere (defensive — catches partial overwrites where delivery appended instead of replaced).
|
|
184
|
+
|
|
185
|
+
### 5.2 Scope compliance
|
|
186
|
+
- [ ] Window matches (§1 field 4) — reject if any record falls outside.
|
|
187
|
+
- [ ] Delta anchor respected — no duplicates of records whose `comment_date < delta_anchor`.
|
|
188
|
+
- [ ] All `targets` (§1 field 6) either appear OR are explicitly listed as "failed/nav-blocked" with reason.
|
|
189
|
+
- [ ] Unrequested targets are NOT present (iriss-air did not silently expand scope).
|
|
190
|
+
|
|
191
|
+
### 5.3 Record integrity
|
|
192
|
+
- [ ] Every row has every required `field` (§2) — no blanks in required columns.
|
|
193
|
+
- [ ] `comment_date` parseable ISO8601; not in the future.
|
|
194
|
+
- [ ] `is_reply_to_steve` is a real bool (not "maybe" / empty string).
|
|
195
|
+
- [ ] Dedupe key `(post_id, commenter_username, comment_date)` is unique within file.
|
|
196
|
+
- [ ] UTF-8 clean — no mojibake on Chinese text; emoji preserved.
|
|
197
|
+
|
|
198
|
+
### 5.4 Policy compliance
|
|
199
|
+
- [ ] No reply-bodies, no like-actions, no auth tokens, no cookies in the delivery.
|
|
200
|
+
- [ ] No screenshots outside the `risk-signal` schema (§2.6).
|
|
201
|
+
- [ ] `policy_tags` echoed back in the delivery header.
|
|
202
|
+
- [ ] If `NO NEW <scope>`: delivery is a single-line confirmation matching spec_id — NO stub rows.
|
|
203
|
+
|
|
204
|
+
### 5.5 Sign-off
|
|
205
|
+
- [ ] Register row moved to `VERIFIED` with a timestamp.
|
|
206
|
+
- [ ] If comments delivered → spawn downstream `analyze + draft replies` task. That task is **local-allowed** (drafting is not interaction).
|
|
207
|
+
- [ ] If metrics delivered → update `reports/xhs-data-tracking-2026-04.md`.
|
|
208
|
+
- [ ] If risk-signal → immediate ping to Ella + Steve (Slack D0AC7NF5N7L).
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 6. Escalation / Blocker matrix
|
|
213
|
+
|
|
214
|
+
| Symptom | Owner | Action |
|
|
215
|
+
|---------|-------|--------|
|
|
216
|
+
| No ACK from `crewly-orc` within SLA | Grace | Mark register `BLOCKED: no-ack`. Notify Ella. Do **not** re-dispatch in <10 min (prevents flooding Rex). |
|
|
217
|
+
| iriss-air reports `rednote-reader` failure | iriss-air team | Register `BLOCKED: upstream-failure`. Do not suggest workarounds. Wait. |
|
|
218
|
+
| Delivery fails §5 checks | Grace | NACK with specific failing check. Register stays `DELIVERED` (not VERIFIED). Await re-delivery. |
|
|
219
|
+
| Login wall / captcha / shadowban signal | Grace | File as `kind: risk-signal`, ping Steve. Never attempt local login. |
|
|
220
|
+
| Anyone requests local Chrome/iPad/Playwright touching XHS | Grace | **Refuse.** Quote this doc §0. File the request as `CANCELLED: policy-breach-attempt` for audit. |
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 7. Archive (moved weekly from §4)
|
|
225
|
+
|
|
226
|
+
*Rows older than the current operating week land here. Next archive pass: Fri 16:00 during Cron #7 weekly report.*
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## 8. Change log
|
|
231
|
+
|
|
232
|
+
| Version | Date | Author | Change |
|
|
233
|
+
|---------|------|--------|--------|
|
|
234
|
+
| v1.0 | 2026-04-17 | Grace | Initial draft after Steve's "spec-in / result-out" directive and the 14:13Z proxy-fallback breach. Consolidates ad-hoc dispatch pattern (2026-04-14 → today) into a formal register + verification checklist. |
|
|
235
|
+
| v1.1 | 2026-04-17 | Grace (on Ella TL sign-off) | **SLA recalibration + checklist tightening**. (a) §3 P0 SLA raised from 20 min → 90 min based on observed Rex ~80 min full-scrape runtime (prevents false breach reports on compliant-but-slow jobs). (b) §3 placeholder template now REQUIRES the literal `PLACEHOLDER — DO NOT VERIFY` string in first 5 lines. (c) §5.1 three early-exit checks added (PLACEHOLDER-string grep, size comparator vs placeholder_size_at_dispatch, mtime comparator vs dispatch_time+60s). Triggered by first live test (XHS-REQ-20260417-1308-daily-comments) where v1.0 checklist correctly flagged the placeholder but would have taken longer without a fail-fast signal. |
|
|
236
|
+
| v1.1 (addendum) | 2026-04-17 | Grace (on orc request) | **Transport-integrity canary** added to §5.1. Trigger: the 14:15Z Option-1 inline-split delivery for XHS-REQ-20260417-1308 landed truncated (2,031B local vs 4,644B upstream). Canary spec: if delivery header declares an upstream size and `\|local_size − upstream_size\| > 128 B`, mark `TRUNCATED` and request re-send via single-message (not inline-split). 14:39Z re-send succeeded — verification passed. |
|
|
237
|
+
| **v1.2** | **2026-04-17** | **Grace (on Ella TL sign-off)** | **Tiered SLA — approved.** (a) §1 spec template gains a new REQUIRED field #10 `job_size` with two values: `fast-poll` or `full-scrape`. Selection rule: `fast-poll` = <5 targets AND no comments-scroll; `full-scrape` = ≥5 targets OR comments-scroll OR account-snapshot. (b) §1 `priority` enum split from `P0/P1/P2` → `P0a/P0b/P1/P2`, with a mandatory priority × job_size consistency rule. P0a pairs with fast-poll; P0b pairs with full-scrape. (c) §3 SLA table rewritten as a 4-row matrix with separate early-warning and hard-breach thresholds. Flat v1.1 `P0 ≤ 90 min` is retired; replaced by P0a ≤ 20 min and P0b ≤ 120 min. (d) Mismatch rule added: a spec whose `priority` / `job_size` pairing is inconsistent is NACK'd as `BLOCKED: malformed-spec`. (e) Back-compat: legacy rows recorded with flat `P0` stay valid and are promoted at the next scrub pass. Closes the SOP baseline for spec-in/result-out. |
|
|
238
|
+
| **v1.2 candidate** | *pending Ella ruling* | (orc suggestion, 2026-04-17) | **Tiered SLA proposal**: split P0 into fast-poll (<5 posts) = 20 min and full-scrape (all posts + comments scroll) = 90–120 min. Rationale: single P0 SLA can't fit both lightweight and heavyweight jobs without either over-reporting breach on heavy jobs (v1.0 problem) or under-reporting on light ones (v1.1 risk). Requires adding a `job_size` field to §1 spec template and a P0a/P0b split in §3. Decision deferred to Ella's next SOP review. |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mission-policy.routes.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/controllers/mission/mission-policy.routes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAkD,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"mission-policy.routes.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/controllers/mission/mission-policy.routes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAkD,MAAM,SAAS,CAAC;AAiOjF;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAqIlD"}
|
|
@@ -13,51 +13,130 @@ import { getPolicy, updatePolicy, checkPolicy, } from './mission-policy.controll
|
|
|
13
13
|
import { listKeyResults, createKR, getKR, updateKR, deleteKR, measureKR, getOKRSummary, } from './kr.controller.js';
|
|
14
14
|
import { MissionExecutorService } from '../../services/v3/mission-executor.service.js';
|
|
15
15
|
import { OKRReviewService } from '../../services/v3/okr-review.service.js';
|
|
16
|
+
import { validateParentLink, } from '../../types/v2/mission.types.js';
|
|
17
|
+
/** Default priority applied to missions missing the field at read time. */
|
|
18
|
+
const DEFAULT_PRIORITY = 'medium';
|
|
16
19
|
/** Resolve the missions directory from the project root. */
|
|
17
20
|
function getMissionsDir() {
|
|
18
21
|
return path.join(process.cwd(), '.crewly', 'missions');
|
|
19
22
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Reads all KR JSON files stored under `<missionsDir>/<missionId>/key-results/`.
|
|
25
|
+
*
|
|
26
|
+
* @param missionId - Mission whose KRs should be loaded
|
|
27
|
+
* @returns Array of KR summaries (empty if the folder is missing or unreadable)
|
|
28
|
+
*/
|
|
29
|
+
async function readKeyResultSummaries(missionId) {
|
|
30
|
+
const krDir = path.join(getMissionsDir(), missionId, 'key-results');
|
|
31
|
+
let files = [];
|
|
22
32
|
try {
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
files = (await fs.readdir(krDir)).filter(f => f.endsWith('.json'));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
const krs = await Promise.all(files.map(async (f) => {
|
|
25
39
|
try {
|
|
26
|
-
|
|
40
|
+
const raw = await fs.readFile(path.join(krDir, f), 'utf-8');
|
|
41
|
+
const kr = JSON.parse(raw);
|
|
42
|
+
const summary = {
|
|
43
|
+
id: kr.id,
|
|
44
|
+
title: kr.title,
|
|
45
|
+
metricType: kr.metricType,
|
|
46
|
+
baseline: kr.baseline,
|
|
47
|
+
target: kr.target,
|
|
48
|
+
current: kr.current,
|
|
49
|
+
unit: kr.unit,
|
|
50
|
+
status: kr.status,
|
|
51
|
+
};
|
|
52
|
+
return summary;
|
|
27
53
|
}
|
|
28
|
-
catch {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
return krs.filter((k) => k !== null);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Normalises a raw mission JSON blob into an API response shape:
|
|
62
|
+
* applies the default priority and attaches inline KR summaries.
|
|
63
|
+
*
|
|
64
|
+
* @param raw - Mission object parsed from JSON
|
|
65
|
+
* @returns Mission augmented with `keyResults` and a guaranteed `priority`
|
|
66
|
+
*/
|
|
67
|
+
async function normalizeMissionForResponse(raw) {
|
|
68
|
+
const keyResults = await readKeyResultSummaries(raw.id);
|
|
69
|
+
return {
|
|
70
|
+
...raw,
|
|
71
|
+
priority: raw.priority ?? DEFAULT_PRIORITY,
|
|
72
|
+
keyResults,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** Load every mission from disk, skipping unreadable files. */
|
|
76
|
+
async function loadAllMissionsRaw() {
|
|
77
|
+
const dir = getMissionsDir();
|
|
78
|
+
let files = [];
|
|
79
|
+
try {
|
|
80
|
+
files = (await fs.readdir(dir)).filter(f => f.endsWith('.json'));
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
const missions = await Promise.all(files.map(async (f) => {
|
|
86
|
+
try {
|
|
87
|
+
const raw = await fs.readFile(path.join(dir, f), 'utf-8');
|
|
88
|
+
return JSON.parse(raw);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}));
|
|
94
|
+
return missions.filter((m) => m !== null);
|
|
95
|
+
}
|
|
96
|
+
/** List all missions with KR summaries and normalised priority. */
|
|
97
|
+
async function listMissions(_req, res, next) {
|
|
98
|
+
try {
|
|
99
|
+
const missions = await loadAllMissionsRaw();
|
|
100
|
+
const enriched = await Promise.all(missions.map(normalizeMissionForResponse));
|
|
101
|
+
res.json({ success: true, data: enriched, count: enriched.length });
|
|
39
102
|
}
|
|
40
103
|
catch (err) {
|
|
41
104
|
next(err);
|
|
42
105
|
}
|
|
43
106
|
}
|
|
44
|
-
/** Get a single mission by ID. */
|
|
107
|
+
/** Get a single mission by ID with KR summaries and normalised priority. */
|
|
45
108
|
async function getMission(req, res, next) {
|
|
46
109
|
try {
|
|
47
110
|
const filePath = path.join(getMissionsDir(), `${req.params.id}.json`);
|
|
48
111
|
const raw = await fs.readFile(filePath, 'utf-8');
|
|
49
|
-
|
|
112
|
+
const mission = await normalizeMissionForResponse(JSON.parse(raw));
|
|
113
|
+
res.json({ success: true, data: mission });
|
|
50
114
|
}
|
|
51
115
|
catch {
|
|
52
116
|
res.status(404).json({ success: false, error: 'Mission not found' });
|
|
53
117
|
}
|
|
54
118
|
}
|
|
55
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Create a new mission.
|
|
121
|
+
*
|
|
122
|
+
* Validates `parentMissionId` against existing missions to reject self-reference
|
|
123
|
+
* and cycles before writing to disk.
|
|
124
|
+
*/
|
|
56
125
|
async function createMission(req, res, next) {
|
|
57
126
|
try {
|
|
58
127
|
const dir = getMissionsDir();
|
|
59
128
|
await fs.mkdir(dir, { recursive: true });
|
|
60
129
|
const id = req.body.id || `mission-${Date.now()}`;
|
|
130
|
+
const parentMissionId = req.body.parentMissionId;
|
|
131
|
+
if (parentMissionId) {
|
|
132
|
+
const existing = await loadAllMissionsRaw();
|
|
133
|
+
const byId = new Map(existing.map(m => [m.id, m]));
|
|
134
|
+
const reason = validateParentLink(id, parentMissionId, byId);
|
|
135
|
+
if (reason) {
|
|
136
|
+
res.status(400).json({ success: false, error: reason });
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
61
140
|
const mission = { id, ...req.body, createdAt: new Date().toISOString(), status: req.body.status || 'active' };
|
|
62
141
|
await fs.writeFile(path.join(dir, `${id}.json`), JSON.stringify(mission, null, 2));
|
|
63
142
|
res.status(201).json({ success: true, data: mission });
|
|
@@ -66,6 +145,58 @@ async function createMission(req, res, next) {
|
|
|
66
145
|
next(err);
|
|
67
146
|
}
|
|
68
147
|
}
|
|
148
|
+
/** Fields that are server-controlled and must never be overwritten by a PUT. */
|
|
149
|
+
const IMMUTABLE_MISSION_FIELDS = ['id', 'createdAt'];
|
|
150
|
+
/**
|
|
151
|
+
* Update an existing mission (partial).
|
|
152
|
+
*
|
|
153
|
+
* Accepts any subset of mutable mission fields. `parentMissionId` is re-validated
|
|
154
|
+
* against the current set of missions on every change. `updatedAt` is refreshed
|
|
155
|
+
* automatically; `id` and `createdAt` are immutable.
|
|
156
|
+
*/
|
|
157
|
+
async function updateMission(req, res, next) {
|
|
158
|
+
try {
|
|
159
|
+
const { id } = req.params;
|
|
160
|
+
const filePath = path.join(getMissionsDir(), `${id}.json`);
|
|
161
|
+
let existing;
|
|
162
|
+
try {
|
|
163
|
+
existing = JSON.parse(await fs.readFile(filePath, 'utf-8'));
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
res.status(404).json({ success: false, error: 'Mission not found' });
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
// Re-validate parent link if the caller is changing it.
|
|
170
|
+
if (Object.prototype.hasOwnProperty.call(req.body, 'parentMissionId')) {
|
|
171
|
+
const nextParent = req.body.parentMissionId || undefined;
|
|
172
|
+
if (nextParent) {
|
|
173
|
+
const all = await loadAllMissionsRaw();
|
|
174
|
+
const byId = new Map(all.map(m => [m.id, m]));
|
|
175
|
+
const reason = validateParentLink(id, nextParent, byId);
|
|
176
|
+
if (reason) {
|
|
177
|
+
res.status(400).json({ success: false, error: reason });
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// Merge while guarding immutable fields.
|
|
183
|
+
const patch = { ...req.body };
|
|
184
|
+
for (const f of IMMUTABLE_MISSION_FIELDS)
|
|
185
|
+
delete patch[f];
|
|
186
|
+
const merged = {
|
|
187
|
+
...existing,
|
|
188
|
+
...patch,
|
|
189
|
+
id: existing.id,
|
|
190
|
+
createdAt: existing.createdAt,
|
|
191
|
+
updatedAt: new Date().toISOString(),
|
|
192
|
+
};
|
|
193
|
+
await fs.writeFile(filePath, JSON.stringify(merged, null, 2));
|
|
194
|
+
res.json({ success: true, data: merged });
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
next(err);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
69
200
|
/**
|
|
70
201
|
* Creates the mission router.
|
|
71
202
|
*
|
|
@@ -79,6 +210,8 @@ export function createMissionPolicyRouter() {
|
|
|
79
210
|
router.post('/', createMission);
|
|
80
211
|
// Get a single mission
|
|
81
212
|
router.get('/:id', getMission);
|
|
213
|
+
// Update a mission (partial)
|
|
214
|
+
router.put('/:id', updateMission);
|
|
82
215
|
// Get mission policy
|
|
83
216
|
router.get('/:id/policy', getPolicy);
|
|
84
217
|
// Update mission policy (partial update)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mission-policy.routes.js","sourceRoot":"","sources":["../../../../../../backend/src/controllers/mission/mission-policy.routes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAkD,MAAM,SAAS,CAAC;AACjF,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EACL,SAAS,EACT,YAAY,EACZ,WAAW,GACZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,cAAc,EACd,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAA4B,MAAM,+CAA+C,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAG3E,4DAA4D;AAC5D,SAAS,cAAc;IACrB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACzD,CAAC;AAED,yBAAyB;AACzB,KAAK,UAAU,YAAY,CAAC,IAAa,EAAE,GAAa,EAAE,IAAkB;IAC1E,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;QAC7B,IA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AC,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;QACvF,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,gBAAgB,CAAC,WAAW,EAAE,CAAC;YACrD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAChE,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"mission-policy.routes.js","sourceRoot":"","sources":["../../../../../../backend/src/controllers/mission/mission-policy.routes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAkD,MAAM,SAAS,CAAC;AACjF,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EACL,SAAS,EACT,YAAY,EACZ,WAAW,GACZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,cAAc,EACd,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAA4B,MAAM,+CAA+C,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,EACL,kBAAkB,GAGnB,MAAM,iCAAiC,CAAC;AAEzC,2EAA2E;AAC3E,MAAM,gBAAgB,GAAoB,QAAQ,CAAC;AAcnD,4DAA4D;AAC5D,SAAS,cAAc;IACrB,OAAO,IAAI,CAAC,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ACH,MAAM,aAAa,GAAG,gBAAgB,CAAC,WAAW,EAAE,CAAC;YACrD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAChE,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -10,6 +10,29 @@
|
|
|
10
10
|
* @module controllers/task-pool/task-pool.controller
|
|
11
11
|
*/
|
|
12
12
|
import type { Request, Response } from 'express';
|
|
13
|
+
/**
|
|
14
|
+
* Check a request body for cross-team routing hints and apply the
|
|
15
|
+
* {@link ServiceContractGate} when present. Opt-in: if the body doesn't
|
|
16
|
+
* carry both `fromTeamId` and `toTeamId` the gate is skipped, preserving
|
|
17
|
+
* backward compatibility with existing delegate flows.
|
|
18
|
+
*
|
|
19
|
+
* Accepted body shapes (either works):
|
|
20
|
+
* { fromTeamId, toTeamId, requestType }
|
|
21
|
+
* { metadata: { fromTeamId, toTeamId, requestType } }
|
|
22
|
+
*
|
|
23
|
+
* `requestType` defaults to the WorkItem's `title`/`description` when the
|
|
24
|
+
* caller hasn't supplied a more specific phrase. An explicit boolean
|
|
25
|
+
* `forceCrossTeam: true` bypasses the gate (used for declared emergencies —
|
|
26
|
+
* still logged).
|
|
27
|
+
*
|
|
28
|
+
* @param body - Raw request body (already validated as an object)
|
|
29
|
+
* @returns `null` when the request should proceed; otherwise a gate
|
|
30
|
+
* rejection decision ready to surface as 403.
|
|
31
|
+
*/
|
|
32
|
+
export declare function maybeEnforceContract(body: Record<string, unknown>): Promise<null | {
|
|
33
|
+
status: number;
|
|
34
|
+
payload: Record<string, unknown>;
|
|
35
|
+
}>;
|
|
13
36
|
/**
|
|
14
37
|
* Adds a WorkItem to the Task Pool.
|
|
15
38
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-pool.controller.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/controllers/task-pool/task-pool.controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"task-pool.controller.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/controllers/task-pool/task-pool.controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA2DjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CACN,IAAI,GACJ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CACvD,CAiEA;AAMD;;;;;;;;;;;GAWG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CA+CxE;AAMD;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ9E;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC1E;AAMD;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAA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