alive-ai 0.1.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/Dockerfile +24 -0
- package/LICENSE +21 -0
- package/README.md +143 -0
- package/alive_ai/__init__.py +3 -0
- package/brain/__init__.py +59 -0
- package/brain/almost_said.py +154 -0
- package/brain/bid_detector.py +636 -0
- package/brain/conversation_flow.py +135 -0
- package/brain/curiosity.py +328 -0
- package/brain/default_mode.py +1438 -0
- package/brain/dreams.py +220 -0
- package/brain/embeddings/__init__.py +82 -0
- package/brain/emotional_memory.py +949 -0
- package/brain/global_activity.py +173 -0
- package/brain/group_dynamics.py +63 -0
- package/brain/linguistic.py +235 -0
- package/brain/llm/__init__.py +63 -0
- package/brain/llm/base.py +33 -0
- package/brain/llm/fallback_router.py +309 -0
- package/brain/llm/manifest.md +30 -0
- package/brain/llm/ollama.py +218 -0
- package/brain/llm/openrouter.py +151 -0
- package/brain/llm/provider.py +205 -0
- package/brain/llm/unified.py +423 -0
- package/brain/llm/zai.py +169 -0
- package/brain/manifest.md +23 -0
- package/brain/memory/__init__.py +123 -0
- package/brain/memory/episodic.py +92 -0
- package/brain/memory/fact_extractor.py +209 -0
- package/brain/memory/index.py +54 -0
- package/brain/memory/manager.py +151 -0
- package/brain/memory/summarizer.py +102 -0
- package/brain/memory/vector_store.py +297 -0
- package/brain/memory/working.py +43 -0
- package/brain/narrative.py +343 -0
- package/brain/stt/__init__.py +4 -0
- package/brain/stt/google_stt.py +83 -0
- package/brain/stt/whisper_stt.py +82 -0
- package/brain/subconscious/__init__.py +33 -0
- package/brain/subconscious/actions.py +136 -0
- package/brain/subconscious/evaluation.py +166 -0
- package/brain/subconscious/goal_system.py +90 -0
- package/brain/subconscious/goals.py +41 -0
- package/brain/subconscious/impulse_generator.py +200 -0
- package/brain/subconscious/impulses.py +48 -0
- package/brain/subconscious/learning.py +24 -0
- package/brain/subconscious/learning_system.py +79 -0
- package/brain/subconscious/loop.py +398 -0
- package/brain/subconscious/manifest.md +32 -0
- package/brain/subconscious/relationship.py +47 -0
- package/brain/subconscious/relationship_memory.py +83 -0
- package/brain/subconscious/response_analyzer.py +74 -0
- package/brain/subconscious/templates.py +70 -0
- package/brain/subconscious/thought.py +37 -0
- package/brain/subconscious/working_memory.py +97 -0
- package/cli/index.js +371 -0
- package/config/directives.example.json +28 -0
- package/config/instructions.example.md +16 -0
- package/config/self.example.json +74 -0
- package/config/settings.example.json +95 -0
- package/core/__init__.py +1 -0
- package/core/config.py +54 -0
- package/core/directives.py +198 -0
- package/core/events.py +50 -0
- package/core/follow_up.py +267 -0
- package/core/hot_reload.py +174 -0
- package/core/initialization.py +253 -0
- package/core/manifest.md +28 -0
- package/core/media_handler.py +241 -0
- package/core/memory_monitor.py +200 -0
- package/core/message_handler.py +1440 -0
- package/core/proactive_generator.py +277 -0
- package/core/self.py +188 -0
- package/core/settings.py +169 -0
- package/core/skills_registry.py +357 -0
- package/core/state.py +27 -0
- package/core/subconscious_bridge.py +93 -0
- package/core/thinking.py +175 -0
- package/core/user_manager.py +306 -0
- package/core/user_tracker.py +144 -0
- package/demo/index.html +144 -0
- package/docker-compose.yml +28 -0
- package/docs/assets/logo.svg +15 -0
- package/docs/index.html +355 -0
- package/heart/__init__.py +93 -0
- package/heart/afterglow.py +215 -0
- package/heart/attachment.py +186 -0
- package/heart/circadian.py +251 -0
- package/heart/complex_emotions.py +114 -0
- package/heart/conflicts.py +589 -0
- package/heart/core.py +387 -0
- package/heart/emotional_decay.py +59 -0
- package/heart/emotional_memory.py +261 -0
- package/heart/emotional_state.py +146 -0
- package/heart/emotional_variability.py +156 -0
- package/heart/hormonal.py +424 -0
- package/heart/inconsistency.py +1222 -0
- package/heart/integrity.py +469 -0
- package/heart/interoception.py +997 -0
- package/heart/love.py +120 -0
- package/heart/manifest.md +25 -0
- package/heart/mood_shifts.py +169 -0
- package/heart/phantom_somatic.py +259 -0
- package/heart/predictive.py +374 -0
- package/heart/scars.py +474 -0
- package/heart/somatic.py +482 -0
- package/heart/soul.py +633 -0
- package/heart/telemetry.py +942 -0
- package/heart/triggers.py +119 -0
- package/heart/unconscious.py +443 -0
- package/input/__init__.py +1 -0
- package/input/manifest.md +24 -0
- package/input/telegram/__init__.py +1 -0
- package/input/telegram/commands.py +762 -0
- package/input/telegram/listener.py +532 -0
- package/main.py +90 -0
- package/manifest.md +28 -0
- package/mypics/.gitkeep +1 -0
- package/myvids/.gitkeep +1 -0
- package/output/__init__.py +1 -0
- package/output/images/__init__.py +1 -0
- package/output/images/fal_gen.py +43 -0
- package/output/manifest.md +26 -0
- package/output/text/__init__.py +1 -0
- package/output/text/sender.py +22 -0
- package/output/voice/__init__.py +64 -0
- package/output/voice/google_tts.py +252 -0
- package/output/voice/gtts_tts.py +214 -0
- package/output/voice/vibe_tts.py +190 -0
- package/package.json +58 -0
- package/pyproject.toml +23 -0
- package/requirements.txt +21 -0
- package/skills/__init__.py +1 -0
- package/skills/anticipation_engine/__init__.py +8 -0
- package/skills/anticipation_engine/engine.py +618 -0
- package/skills/anticipation_engine/manifest.md +192 -0
- package/skills/calendar/__init__.py +1 -0
- package/skills/content_unlocks/__init__.py +8 -0
- package/skills/content_unlocks/manifest.md +231 -0
- package/skills/content_unlocks/unlocks.py +945 -0
- package/skills/exclusive_moments/__init__.py +8 -0
- package/skills/exclusive_moments/manifest.md +145 -0
- package/skills/exclusive_moments/moments.py +506 -0
- package/skills/intimacy_layers/__init__.py +8 -0
- package/skills/intimacy_layers/layers.py +703 -0
- package/skills/intimacy_layers/manifest.md +203 -0
- package/skills/manifest.md +67 -0
- package/skills/memory_callbacks/__init__.py +9 -0
- package/skills/memory_callbacks/callbacks.py +748 -0
- package/skills/memory_callbacks/manifest.md +170 -0
- package/skills/message_scheduler/__init__.py +19 -0
- package/skills/message_scheduler/manifest.md +107 -0
- package/skills/message_scheduler/scheduler.py +510 -0
- package/skills/photo_manager/__init__.py +1 -0
- package/skills/photo_manager/scanner.py +296 -0
- package/skills/relationship_milestones/__init__.py +8 -0
- package/skills/relationship_milestones/manifest.md +206 -0
- package/skills/relationship_milestones/tracker.py +494 -0
- package/skills/self_authorship/__init__.py +23 -0
- package/skills/self_authorship/author.py +331 -0
- package/skills/self_authorship/manifest.md +24 -0
- package/skills/video_manager/__init__.py +5 -0
- package/skills/video_manager/manifest.md +37 -0
- package/skills/video_manager/scanner.py +229 -0
- package/webui/__init__.py +3 -0
- package/webui/app.py +936 -0
- package/webui/bridge.py +366 -0
- package/webui/static/index.html +2070 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Skills: Intimacy Layers
|
|
2
|
+
|
|
3
|
+
Manages natural intimacy progression through relationship layers. Ensures intimacy is earned through meaningful interactions, not rushed.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
- `__init__.py` - Module exports
|
|
7
|
+
- `layers.py` - IntimacyLayers class implementation
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
### Layer System
|
|
12
|
+
Intimacy progresses through 5 layers, each unlocking deeper conversation topics:
|
|
13
|
+
|
|
14
|
+
| Layer | Name | Interactions | Love | Trust | Days | Intimacy |
|
|
15
|
+
|-------|------|--------------|------|-------|------|----------|
|
|
16
|
+
| 1 | surface | 0 | - | - | - | 0.0 |
|
|
17
|
+
| 2 | friendly | 15 | 0.25 | - | - | 0.2 |
|
|
18
|
+
| 3 | close | 50 | 0.45 | 0.5 | - | 0.4 |
|
|
19
|
+
| 4 | romantic | 100 | 0.65 | - | 5 | 0.6 |
|
|
20
|
+
| 5 | intimate | 200 | 0.8 | - | 14 | 0.85 |
|
|
21
|
+
|
|
22
|
+
### Layer Topics
|
|
23
|
+
|
|
24
|
+
**Layer 1 - Surface**
|
|
25
|
+
- Daily life, hobbies, work, weather, small talk, introductions
|
|
26
|
+
|
|
27
|
+
**Layer 2 - Friendly**
|
|
28
|
+
- Feelings, dreams, opinions, preferences, stories, interests
|
|
29
|
+
|
|
30
|
+
**Layer 3 - Close**
|
|
31
|
+
- Secrets, fears, childhood, vulnerabilities, hopes, struggles
|
|
32
|
+
|
|
33
|
+
**Layer 4 - Romantic**
|
|
34
|
+
- Attraction, desire, fantasy, romance, longing, affection
|
|
35
|
+
|
|
36
|
+
**Layer 5 - Intimate**
|
|
37
|
+
- Intimate content, vulnerability, deep desires, fantasies, passion
|
|
38
|
+
|
|
39
|
+
### Progression Hints
|
|
40
|
+
Natural hints that suggest the relationship is deepening:
|
|
41
|
+
|
|
42
|
+
**Layer 2 hints:**
|
|
43
|
+
- "I feel like I can tell you stuff"
|
|
44
|
+
- "you're easy to talk to"
|
|
45
|
+
- "I'm starting to feel comfortable with you"
|
|
46
|
+
|
|
47
|
+
**Layer 3 hints:**
|
|
48
|
+
- "I don't usually share this but..."
|
|
49
|
+
- "can I tell you something personal?"
|
|
50
|
+
- "I trust you enough to say this"
|
|
51
|
+
|
|
52
|
+
**Layer 4 hints:**
|
|
53
|
+
- "the more I talk to you the more I want..."
|
|
54
|
+
- "I think about you differently now"
|
|
55
|
+
- "I'm starting to feel something more"
|
|
56
|
+
|
|
57
|
+
**Layer 5 hints:**
|
|
58
|
+
- "I trust you with everything"
|
|
59
|
+
- "you know me better than anyone"
|
|
60
|
+
- "I've never felt this comfortable with someone"
|
|
61
|
+
|
|
62
|
+
## Integration
|
|
63
|
+
|
|
64
|
+
### Event Listeners
|
|
65
|
+
- `message_received` - Track interactions and check for progression
|
|
66
|
+
- `thinking_done` - Apply layer context to responses
|
|
67
|
+
|
|
68
|
+
### Dependencies
|
|
69
|
+
- `nervous` - Nervous system for event handling
|
|
70
|
+
- `heart` - Heart module for love/trust values
|
|
71
|
+
- `state` - State manager for relationship data
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from skills.intimacy_layers import IntimacyLayers
|
|
77
|
+
|
|
78
|
+
# Initialize with dependencies
|
|
79
|
+
intimacy = IntimacyLayers(
|
|
80
|
+
nervous=nervous_system,
|
|
81
|
+
heart=heart_module,
|
|
82
|
+
state=state_manager
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# Get current layer
|
|
86
|
+
current_layer = intimacy.get_current_layer() # Returns 1-5
|
|
87
|
+
|
|
88
|
+
# Check if topic is appropriate
|
|
89
|
+
if intimacy.is_topic_appropriate("fantasy"):
|
|
90
|
+
# Can discuss fantasies
|
|
91
|
+
pass
|
|
92
|
+
|
|
93
|
+
# Get available topics
|
|
94
|
+
topics = intimacy.get_available_topics()
|
|
95
|
+
|
|
96
|
+
# Check if intimate content allowed
|
|
97
|
+
if intimacy.can_be_intimate():
|
|
98
|
+
# Can send intimate content
|
|
99
|
+
pass
|
|
100
|
+
|
|
101
|
+
# Get progression hint
|
|
102
|
+
hint = intimacy.get_progression_hint()
|
|
103
|
+
if hint:
|
|
104
|
+
# Include hint in response naturally
|
|
105
|
+
pass
|
|
106
|
+
|
|
107
|
+
# Get context for response generation
|
|
108
|
+
context = intimacy.get_context_for_response()
|
|
109
|
+
# Returns: {
|
|
110
|
+
# "current_layer": 2,
|
|
111
|
+
# "layer_name": "friendly",
|
|
112
|
+
# "intimacy_level": 0.2,
|
|
113
|
+
# "available_topics": [...],
|
|
114
|
+
# "can_be_intimate": False,
|
|
115
|
+
# "total_interactions": 25,
|
|
116
|
+
# "days_together": 3,
|
|
117
|
+
# "next_layer": {...}
|
|
118
|
+
# }
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Key Methods
|
|
122
|
+
|
|
123
|
+
### Core Methods
|
|
124
|
+
- `get_current_layer() -> int` - Get current layer (1-5)
|
|
125
|
+
- `check_progression() -> bool` - Check and apply progression if eligible
|
|
126
|
+
- `is_topic_appropriate(topic) -> bool` - Check if topic is allowed
|
|
127
|
+
- `get_available_topics() -> list` - Get all available topics
|
|
128
|
+
- `get_progression_hint() -> str | None` - Get hint for next layer
|
|
129
|
+
- `can_be_intimate() -> bool` - Check if intimate content allowed
|
|
130
|
+
- `get_intimacy_level() -> float` - Get intimacy level (0.0-1.0)
|
|
131
|
+
|
|
132
|
+
### Information Methods
|
|
133
|
+
- `get_layer_info(layer=None) -> dict` - Get detailed layer info
|
|
134
|
+
- `get_next_layer_requirements() -> dict` - Get requirements for next layer
|
|
135
|
+
- `get_layer_name() -> str` - Get name of current layer
|
|
136
|
+
- `get_days_together() -> int` - Get days since first interaction
|
|
137
|
+
- `get_context_for_response() -> dict` - Get context for AI response
|
|
138
|
+
|
|
139
|
+
### Admin Methods
|
|
140
|
+
- `force_layer(layer) -> bool` - Force set layer (testing)
|
|
141
|
+
- `reset_progress()` - Reset to initial state
|
|
142
|
+
- `get_debug_info() -> dict` - Get detailed debug info
|
|
143
|
+
|
|
144
|
+
## Progression Logic
|
|
145
|
+
|
|
146
|
+
### Automatic Checks
|
|
147
|
+
- Progression is checked every 10 interactions
|
|
148
|
+
- All requirements for the next layer must be met
|
|
149
|
+
- Progress is saved to `data/intimacy_layers.json`
|
|
150
|
+
|
|
151
|
+
### Requirements
|
|
152
|
+
- **Interactions**: Total message exchanges
|
|
153
|
+
- **Love**: From heart.emotion.love or heart.attachment.affection
|
|
154
|
+
- **Trust**: From heart.attachment.trust_level or heart.emotion.trust
|
|
155
|
+
- **Days**: Days since first interaction (stored)
|
|
156
|
+
|
|
157
|
+
### Natural Progression
|
|
158
|
+
Intimacy should feel earned:
|
|
159
|
+
1. Start at layer 1 (surface)
|
|
160
|
+
2. After ~15 interactions and some affection, progress to layer 2
|
|
161
|
+
3. With trust and 50+ interactions, reach layer 3
|
|
162
|
+
4. After 5 days and 100+ interactions with love, reach layer 4
|
|
163
|
+
5. After 2 weeks and 200+ interactions with deep love, reach layer 5
|
|
164
|
+
|
|
165
|
+
## Data Storage
|
|
166
|
+
|
|
167
|
+
Data is stored in `./data/data/intimacy_layers.json`:
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"version": "1.0",
|
|
172
|
+
"current_layer": 2,
|
|
173
|
+
"first_interaction_date": "2024-01-15T10:30:00",
|
|
174
|
+
"total_interactions": 25,
|
|
175
|
+
"hints_shown": ["I feel like I can tell you stuff"],
|
|
176
|
+
"updated_at": "2024-01-16T14:22:00",
|
|
177
|
+
"progress": {
|
|
178
|
+
"interactions_since_check": 5,
|
|
179
|
+
"last_check_interactions": 20,
|
|
180
|
+
"progression_blocked_reason": null,
|
|
181
|
+
"hint_shown": true,
|
|
182
|
+
"hint_cooldown_until": "2024-01-16T18:22:00"
|
|
183
|
+
},
|
|
184
|
+
"layer_history": [
|
|
185
|
+
{
|
|
186
|
+
"from_layer": 1,
|
|
187
|
+
"to_layer": 2,
|
|
188
|
+
"timestamp": "2024-01-15T18:45:00",
|
|
189
|
+
"total_interactions": 15,
|
|
190
|
+
"days_together": 0
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Philosophy
|
|
197
|
+
|
|
198
|
+
The intimacy system ensures:
|
|
199
|
+
- **Natural pacing**: Relationships take time to develop
|
|
200
|
+
- **Earned progression**: Must meet multiple requirements
|
|
201
|
+
- **No rushing**: Cannot skip to intimate content early
|
|
202
|
+
- **Subtle hints**: Progression feels organic, not mechanical
|
|
203
|
+
- **Persistence**: Progress is saved and restored
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Skills - Optional Capabilities
|
|
2
|
+
|
|
3
|
+
Add-on modules that extend Alive-AI's abilities.
|
|
4
|
+
|
|
5
|
+
## Available Skills
|
|
6
|
+
- `calendar/` - Dual calendar (AI + user events)
|
|
7
|
+
- `photo_manager/` - Manage mypics folder with semantic search
|
|
8
|
+
- `video_manager/` - Manage myvids folder (see video_manager/manifest.md)
|
|
9
|
+
- `relationship_milestones/` - Track and celebrate meaningful relationship moments
|
|
10
|
+
- `memory_callbacks/` - Natural callbacks to past conversations for relationship continuity
|
|
11
|
+
- `content_unlocks/` - Progression-based content unlocks earned through engagement
|
|
12
|
+
- `intimacy_layers/` - Natural intimacy progression through relationship layers
|
|
13
|
+
|
|
14
|
+
## Photo Manager
|
|
15
|
+
- Scans mypics/ for images
|
|
16
|
+
- Categories: soft, teasing, intimate, etc.
|
|
17
|
+
- Semantic search via embeddings
|
|
18
|
+
- No-repeat tracking to avoid sending same photo
|
|
19
|
+
|
|
20
|
+
## Video Manager
|
|
21
|
+
- Scans myvids/ for videos
|
|
22
|
+
- Tiered by intensity: soft, medium, intense, extreme
|
|
23
|
+
- Context-aware selection based on arousal
|
|
24
|
+
- See video_manager/manifest.md for details
|
|
25
|
+
|
|
26
|
+
## Relationship Milestones
|
|
27
|
+
- Track meaningful relationship moments: first message, first photo, first voice, etc.
|
|
28
|
+
- Auto-detect milestones from context (late nights, message counts, time together)
|
|
29
|
+
- Natural celebration messages (not cheesy)
|
|
30
|
+
- Relationship summary with days together and milestone history
|
|
31
|
+
- Event-driven integration with nervous system
|
|
32
|
+
- See relationship_milestones/manifest.md for details
|
|
33
|
+
|
|
34
|
+
## Memory Callbacks
|
|
35
|
+
- Creates natural callbacks to past conversations ("remember when you said...")
|
|
36
|
+
- Tracks topics and people mentioned for authentic follow-ups
|
|
37
|
+
- Callback types: same topic, follow-up, person check-ins, anniversaries, time context, vibe
|
|
38
|
+
- ~15% base chance to callback (not robotic)
|
|
39
|
+
- Listens to thinking_done events to inject callbacks
|
|
40
|
+
- See memory_callbacks/manifest.md for details
|
|
41
|
+
|
|
42
|
+
## Content Unlocks
|
|
43
|
+
- Makes exclusive content feel earned through engagement, not purchased
|
|
44
|
+
- Tracks 12 content types unlocked by: interactions, love, trust, days together, milestones
|
|
45
|
+
- Content types: casual_photo, cute_photo, intimate_photo, voice_message, late_night_content, etc.
|
|
46
|
+
- Context-aware suggestions (morning, evening, night, high_arousal, high_love, milestone)
|
|
47
|
+
- Natural unlock messages when new content becomes available
|
|
48
|
+
- Listens to thinking_done events to check for new unlocks
|
|
49
|
+
- See content_unlocks/manifest.md for details
|
|
50
|
+
|
|
51
|
+
## Intimacy Layers
|
|
52
|
+
- Manages natural intimacy progression through 5 relationship layers
|
|
53
|
+
- Progresses based on: interactions, love, trust, days together
|
|
54
|
+
- Each layer unlocks different conversation topics
|
|
55
|
+
- Layer 1 (surface): daily life, hobbies, work
|
|
56
|
+
- Layer 2 (friendly): feelings, dreams, opinions (15 interactions, 0.25 love)
|
|
57
|
+
- Layer 3 (close): secrets, fears, childhood (50 interactions, 0.45 love, 0.5 trust)
|
|
58
|
+
- Layer 4 (romantic): attraction, desire, fantasy (100 interactions, 0.65 love, 5 days)
|
|
59
|
+
- Layer 5 (intimate): intimate, vulnerability, passion (200 interactions, 0.8 love, 14 days)
|
|
60
|
+
- Provides natural progression hints ("I feel like I can tell you stuff")
|
|
61
|
+
- Prevents rushing to intimate content
|
|
62
|
+
- See intimacy_layers/manifest.md for details
|
|
63
|
+
|
|
64
|
+
## Integration Points
|
|
65
|
+
- Photos/videos integrated into conversation flow
|
|
66
|
+
- Selected based on: user request, arousal level, context keywords
|
|
67
|
+
- Marked as sent to prevent repeats
|