Add manifest.json for update discovery
Updates now fetch manifest.json first to discover all updatable components. This allows 1.0 users to learn about new files (like commands.md) when they run "update". Safety-protocol.md bumped to 1.1.0 with update notice for 1.0 users. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+23
-10
@@ -1,4 +1,4 @@
|
||||
<!-- version: 1.0.0 -->
|
||||
<!-- version: 1.1.0 -->
|
||||
# Customization Commands
|
||||
|
||||
The client can request changes to their therapy setup during a session. All customization files are stored locally in `.therapy/library/`.
|
||||
@@ -63,15 +63,28 @@ Recognize conversational requests, not just exact command phrases:
|
||||
|
||||
## When client says "update", "check for updates", or "get latest version"
|
||||
|
||||
1. Read `.therapy/version.json` for current versions and `source_url`
|
||||
2. Use WebFetch to get files from GitHub raw URLs:
|
||||
- `https://raw.githubusercontent.com/ataglianetti/inner-dialogue/main/safety-protocol.md`
|
||||
- `https://raw.githubusercontent.com/ataglianetti/inner-dialogue/main/commands.md`
|
||||
- Extract `<!-- version: X.Y.Z -->` header from fetched content
|
||||
3. Compare with installed versions
|
||||
4. Show available updates, recommend safety-protocol updates
|
||||
5. Fetch and write updated files to `.therapy/` and `.therapy/library/`
|
||||
6. Update version.json
|
||||
1. Read `.therapy/version.json` for current versions
|
||||
|
||||
2. Fetch the manifest from GitHub:
|
||||
```
|
||||
https://raw.githubusercontent.com/ataglianetti/inner-dialogue/main/manifest.json
|
||||
```
|
||||
|
||||
3. For each component in manifest, fetch the file and extract its version from `<!-- version: X.Y.Z -->` header
|
||||
|
||||
4. Compare with installed versions and show available updates:
|
||||
> **Updates available:**
|
||||
> - safety-protocol: 1.0.0 → 1.1.0 ⚠️ (recommended)
|
||||
> - commands: (new) → 1.0.0
|
||||
>
|
||||
> Apply updates?
|
||||
|
||||
5. For approved updates:
|
||||
- Fetch files from GitHub using manifest's `base_url` + `file` path
|
||||
- Write to location specified in manifest's `target`
|
||||
- Update `.therapy/version.json`
|
||||
|
||||
6. Always recommend safety-protocol updates (crisis resources should never be stale)
|
||||
|
||||
## When client says "import", "import notes", or "I have files to import"
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"description": "Inner Dialogue updatable components",
|
||||
"components": {
|
||||
"safety-protocol": {
|
||||
"file": "safety-protocol.md",
|
||||
"target": ".therapy/safety-protocol.md",
|
||||
"required": true,
|
||||
"description": "Crisis protocols and safety guidelines"
|
||||
},
|
||||
"commands": {
|
||||
"file": "commands.md",
|
||||
"target": ".therapy/commands.md",
|
||||
"required": true,
|
||||
"description": "Customization commands (import, update, persona, etc.)"
|
||||
},
|
||||
"personas": {
|
||||
"files": "personas/*.md",
|
||||
"target": ".therapy/library/personas/",
|
||||
"required": false,
|
||||
"description": "Communication style options"
|
||||
},
|
||||
"modalities": {
|
||||
"files": "modalities/*.md",
|
||||
"target": ".therapy/library/modalities/",
|
||||
"required": false,
|
||||
"description": "Therapeutic approach options"
|
||||
},
|
||||
"structures": {
|
||||
"files": "structures/*.md",
|
||||
"target": ".therapy/library/structures/",
|
||||
"required": false,
|
||||
"description": "Session structure options"
|
||||
}
|
||||
},
|
||||
"base_url": "https://raw.githubusercontent.com/ataglianetti/inner-dialogue/main/"
|
||||
}
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
<!-- version: 1.0.0 -->
|
||||
<!-- version: 1.1.0 -->
|
||||
# Safety & Crisis Protocol
|
||||
|
||||
> **Update Notice:** If updating from v1.0, also fetch `manifest.json` and `commands.md` from GitHub. The manifest lists all updatable components. Commands.md includes the new import feature.
|
||||
|
||||
**This section is non-negotiable. Always follow these protocols.**
|
||||
|
||||
## Crisis Recognition
|
||||
|
||||
Reference in New Issue
Block a user