@synap-core/cli 1.6.1 → 1.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.
@@ -74,22 +74,19 @@ POST /api/hub/memory body: { userId, fact }
74
74
  GET /api/hub/memory?userId=…&query=…
75
75
  ```
76
76
 
77
- **Common `properties` keys by profile** (stable no round-trip needed for these):
78
-
79
- | Profile | Key properties (slug: type) |
80
- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
81
- | `task` | `status` (todo/in-progress/done/blocked), `priority` (low/medium/high), `dueDate` (date), `projectId` (entity_id), `assignee` (entity_id) |
82
- | `note` | `tags` (string[]), `projectId` (entity_id) |
83
- | `project` | `status` (active/paused/completed/cancelled), `startDate`, `endDate`, `description` |
84
- | `person` | `email`, `role`, `companyId` (entity_id), `linkedinUrl`, `phone` |
85
- | `event` | `startDate`, `endDate`, `location`, `attendees` (entity_id[]) |
86
- | `decision` | `decisionStatus` (draft/accepted/superseded), `decidedAt`, `rationale`, `alternatives`, `projectId` |
87
- | `research` | `researchStatus` (ongoing/concluded), `questionId` (entity_id), `conclusion`, `researchConfidence` |
88
- | `question` | `questionStatus` (exploring/answered), `answeredByDecisionId` (entity_id), `projectId` |
89
- | `deal` | `dealStage` (lead/contacted/qualifying/proposal/won/lost), `estimatedValue` (number) |
90
- | `document` | `contentType` (markdown/html), `summary`, `projectId` (entity_id) |
91
-
92
- For custom profiles or constraint details: `GET /api/hub/profiles?userId={userId}&workspaceId={workspaceId}`.
77
+ **Profile schemas are runtime-discoverednever hardcoded:**
78
+
79
+ ```bash
80
+ synap discover --json # CLI: full profile tree with property schemas + command map
81
+ synap discover --profiles --json # CLI: profiles only
82
+ ```
83
+
84
+ ```
85
+ GET /api/hub/discover?userId={userId}&workspaceId={workspaceId}
86
+ { profiles: [{ slug, displayName, scope, properties: [{ slug, type, options? }], createCommand }], commands: {...} }
87
+ ```
88
+
89
+ Call this once at session start. The response includes every system profile and any custom workspace profiles the user has created, each with its full property schema. Use `createCommand` per profile as a copy-paste template. Do not rely on a static property list — it will drift.
93
90
 
94
91
  **Load more detail on demand** (`GET /api/hub/skills/system?sections=<id>`):
95
92
 
@@ -122,12 +119,14 @@ GET /api/hub/users/me
122
119
  GET /api/hub/workspaces
123
120
  → [{ id, name, role }] ← workspaces[0].id if only one
124
121
 
125
- GET /api/hub/profiles?userId={userId}&workspaceId={workspaceId}
126
- → [{ slug, displayName, entityScope, properties }]
122
+ GET /api/hub/discover?userId={userId}&workspaceId={workspaceId}
123
+ { profiles: [{ slug, displayName, scope, properties, createCommand }], commands: {...} }
124
+ ← replaces /profiles — includes property schemas + custom workspace profiles
127
125
  ```
128
126
 
129
- `entityScope: "pod"` = visible across all workspaces (note, task, project, person, company, bookmark, event, contact, article, website).
130
- `entityScope: "workspace"` = scoped to one workspace (deal, file, capture, custom profiles).
127
+ `scope: "pod"` = visible across all workspaces (note, task, project, person, company, bookmark, event, contact, article, website).
128
+ `scope: "workspace"` = scoped to one workspace (deal, file, capture, custom profiles).
129
+ Each profile includes its full property schema. Use `createCommand` as a template.
131
130
 
132
131
  **2. Search before answering**
133
132
  Before answering any question about the user's projects, tasks, contacts, decisions, or anything they might have captured — search Synap first. Do not answer from your training or context window when Synap may have the authoritative answer.