writers_room 0.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e4019a62ac29cae454ec0050e68fa9b42bc77512328ff34f031f746d6c704e06
4
+ data.tar.gz: e1ecf942cc34516ccb8344951f4244dc9cd561994235e38377d96531667688e3
5
+ SHA512:
6
+ metadata.gz: 69075ebef8b630cd979824096be322871a2fbd0c59135fa3dd693e0eb965e23f676e933a868a5706195d7b994aefee376ece168eda127788af1a6dc20bbae149
7
+ data.tar.gz: d16baf2bc9894f42c8db7c4e44e480fe96815e73974ccd6cb05df27ed423c43e3981568d45a088a72b1ae8ab64fbc50dbd3ce3c9d3ed074d27673e13b26e73e0
data/.envrc ADDED
@@ -0,0 +1 @@
1
+ export RR=`pwd`
data/CHANGELOG.md ADDED
@@ -0,0 +1,186 @@
1
+ # Writer's Room - Changelog
2
+
3
+ ## [Latest] - Ollama Configuration Update
4
+
5
+ ### Changed
6
+
7
+ #### Default LLM Provider Configuration
8
+ - **Default Provider**: Changed to Ollama (was: environment-dependent)
9
+ - **Default Model**: Set to `gpt-oss`
10
+ - **Default URL**: `http://localhost:11434`
11
+ - **Timeout**: Set to 120 seconds (2 minutes)
12
+
13
+ #### Files Modified
14
+
15
+ **actor.rb** - `setup_llm` method:
16
+ - Added explicit Ollama configuration as default
17
+ - Added environment variable support for customization:
18
+ - `RUBY_LLM_PROVIDER` - Override provider (default: ollama)
19
+ - `RUBY_LLM_MODEL` - Override model (default: gpt-oss)
20
+ - `OLLAMA_URL` - Override Ollama server URL
21
+ - Added timeout configuration
22
+ - Enhanced debug output to show provider, model, and base_url
23
+
24
+ **run_scene_example.sh**:
25
+ - Added Ollama service check before running scenes
26
+ - Added gpt-oss model availability check
27
+ - Provides helpful error messages if Ollama not running
28
+ - Suggests alternative providers if Ollama unavailable
29
+ - Respects `RUBY_LLM_PROVIDER` environment variable
30
+
31
+ **README.md**:
32
+ - Updated "Configure LLM Provider" section
33
+ - Changed from multiple providers to Ollama-first approach
34
+ - Added environment variable override instructions
35
+ - Added Ollama verification steps
36
+ - Added link to CONFIGURATION.md
37
+
38
+ **QUICKSTART.md**:
39
+ - Updated Step 2 to focus on Ollama setup
40
+ - Changed from API keys to Ollama serve instructions
41
+ - Added model pull instructions
42
+ - Simplified getting started flow
43
+
44
+ ### Added
45
+
46
+ **CONFIGURATION.md** - New comprehensive configuration guide:
47
+ - Default configuration reference
48
+ - Environment variables table
49
+ - Configuration examples for all providers
50
+ - Model selection guide
51
+ - Performance tuning recommendations
52
+ - Troubleshooting configuration issues
53
+ - Advanced configuration options
54
+
55
+ ### Environment Variables
56
+
57
+ New environment variables supported:
58
+
59
+ | Variable | Default | Purpose |
60
+ |----------|---------|---------|
61
+ | `RUBY_LLM_PROVIDER` | `ollama` | LLM provider selection |
62
+ | `RUBY_LLM_MODEL` | `gpt-oss` | Model name |
63
+ | `OLLAMA_URL` | `http://localhost:11434` | Ollama server URL |
64
+ | `MAX_LINES` | `50` | Maximum dialog lines per scene |
65
+ | `DEBUG_ME` | (unset) | Debug mode toggle |
66
+
67
+ Existing variables still supported:
68
+ - `OPENAI_API_KEY` - For OpenAI provider
69
+ - `ANTHROPIC_API_KEY` - For Anthropic provider
70
+
71
+ ### Migration Guide
72
+
73
+ #### Before (Generic Configuration)
74
+
75
+ ```bash
76
+ # User had to configure provider
77
+ export OPENAI_API_KEY="sk-..."
78
+ ./director.rb -s scenes/scene_01_gym_wars.yml
79
+ ```
80
+
81
+ #### After (Ollama Default)
82
+
83
+ ```bash
84
+ # Just start Ollama and run
85
+ ollama serve
86
+ ollama pull gpt-oss
87
+ ./run_scene_example.sh
88
+ ```
89
+
90
+ #### Switching Providers (Still Easy)
91
+
92
+ **Use OpenAI:**
93
+ ```bash
94
+ export RUBY_LLM_PROVIDER="openai"
95
+ export OPENAI_API_KEY="sk-..."
96
+ ./director.rb -s scenes/scene_01_gym_wars.yml
97
+ ```
98
+
99
+ **Use Different Ollama Model:**
100
+ ```bash
101
+ export RUBY_LLM_MODEL="llama2"
102
+ ./director.rb -s scenes/scene_01_gym_wars.yml
103
+ ```
104
+
105
+ ### Benefits
106
+
107
+ 1. **Out-of-the-box Experience**: Works immediately with local Ollama
108
+ 2. **No API Keys Required**: For default configuration
109
+ 3. **Cost-Free**: Using local models
110
+ 4. **Privacy**: Data stays on your machine
111
+ 5. **Flexibility**: Easy to switch providers when needed
112
+ 6. **Development-Friendly**: Fast iteration with local models
113
+
114
+ ### Backwards Compatibility
115
+
116
+ ✅ All existing environment variable configurations still work
117
+ ✅ Existing provider integrations unchanged (OpenAI, Anthropic, etc.)
118
+ ✅ Can still use cloud providers by setting `RUBY_LLM_PROVIDER`
119
+ ✅ No breaking changes to Actor or Director APIs
120
+
121
+ ### Requirements
122
+
123
+ **New Requirement (for default config):**
124
+ - Ollama must be installed and running
125
+ - gpt-oss model must be pulled
126
+
127
+ **Alternative:**
128
+ - Set `RUBY_LLM_PROVIDER` to use OpenAI, Anthropic, or others
129
+
130
+ ### Verification
131
+
132
+ Check your configuration is working:
133
+
134
+ ```bash
135
+ # 1. Verify Redis
136
+ redis-cli ping
137
+
138
+ # 2. Verify Ollama
139
+ curl http://localhost:11434
140
+ ollama list | grep gpt-oss
141
+
142
+ # 3. Run test scene
143
+ ./run_scene_example.sh
144
+
145
+ # 4. Check logs for configuration
146
+ DEBUG_ME=1 ./actor.rb -c characters/marcus.yml -s scenes/scene_01_gym_wars.yml
147
+ ```
148
+
149
+ Expected debug output:
150
+ ```
151
+ DEBUG: LLM setup complete for Marcus
152
+ provider: "ollama"
153
+ model: "gpt-oss"
154
+ base_url: "http://localhost:11434"
155
+ ```
156
+
157
+ ### Documentation Updates
158
+
159
+ - ✅ README.md - Updated setup section
160
+ - ✅ QUICKSTART.md - Updated to Ollama-first approach
161
+ - ✅ CONFIGURATION.md - Added comprehensive configuration guide
162
+ - ✅ run_scene_example.sh - Added Ollama checks
163
+ - ✅ actor.rb - Added inline documentation
164
+
165
+ ### Future Enhancements
166
+
167
+ Potential future additions:
168
+ - [ ] Auto-detect available Ollama models
169
+ - [ ] Fallback provider if Ollama unavailable
170
+ - [ ] Configuration file support (.env auto-loading)
171
+ - [ ] Per-character model selection
172
+ - [ ] Model performance benchmarking
173
+ - [ ] Automatic model downloading
174
+
175
+ ---
176
+
177
+ ## Previous Versions
178
+
179
+ ### [Initial Release]
180
+
181
+ - Created Actor class with RubyLLM integration
182
+ - Created Director orchestration system
183
+ - Implemented SmartMessage Redis communication
184
+ - Added 6 character definitions
185
+ - Added 4 scene definitions
186
+ - Created comprehensive documentation
data/COMMITS.md ADDED
@@ -0,0 +1,196 @@
1
+ ---
2
+ url: https://www.conventionalcommits.org/en/v1.0.0/
3
+ title: Conventional Commits
4
+ description: A specification for adding human and machine readable meaning to commit messages
5
+ access_date: 2025-07-31T20:51:29.000Z
6
+ current_date: 2025-07-31T20:51:29.601Z
7
+ ---
8
+
9
+ # Conventional Commits
10
+
11
+ A specification for adding human and machine readable meaning to commit messages
12
+
13
+ Quick Summary Full Specification Contribute
14
+
15
+ # Conventional Commits 1.0.0
16
+
17
+ ## Summary
18
+
19
+ The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.
20
+
21
+ The commit message should be structured as follows:
22
+
23
+ ---
24
+
25
+ ```
26
+ <type>[optional scope]: <description>
27
+
28
+ [optional body]
29
+
30
+ [optional footer(s)]
31
+
32
+ ```
33
+
34
+ ---
35
+
36
+ The commit contains the following structural elements, to communicate intent to the consumers of your library:
37
+
38
+ 1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with `PATCH` in Semantic Versioning).
39
+ 2. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with `MINOR` in Semantic Versioning).
40
+ 3. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with `MAJOR` in Semantic Versioning). A BREAKING CHANGE can be part of commits of any _type_.
41
+ 4. _types_ other than `fix:` and `feat:` are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommends `build:`, `chore:`,`ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.
42
+ 5. _footers_ other than `BREAKING CHANGE: <description>` may be provided and follow a convention similar to git trailer format.
43
+
44
+ Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). A scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.
45
+
46
+ ## Examples
47
+
48
+ ### Commit message with description and breaking change footer
49
+
50
+ ```
51
+ feat: allow provided config object to extend other configs
52
+
53
+ BREAKING CHANGE: `extends` key in config file is now used for extending other config files
54
+
55
+ ```
56
+
57
+ ### Commit message with `!` to draw attention to breaking change
58
+
59
+ ```
60
+ feat!: send an email to the customer when a product is shipped
61
+
62
+ ```
63
+
64
+ ### Commit message with scope and `!` to draw attention to breaking change
65
+
66
+ ```
67
+ feat(api)!: send an email to the customer when a product is shipped
68
+
69
+ ```
70
+
71
+ ### Commit message with both `!` and BREAKING CHANGE footer
72
+
73
+ ```
74
+ chore!: drop support for Node 6
75
+
76
+ BREAKING CHANGE: use JavaScript features not available in Node 6.
77
+
78
+ ```
79
+
80
+ ### Commit message with no body
81
+
82
+ ```
83
+ docs: correct spelling of CHANGELOG
84
+
85
+ ```
86
+
87
+ ### Commit message with scope
88
+
89
+ ```
90
+ feat(lang): add Polish language
91
+
92
+ ```
93
+
94
+ ### Commit message with multi-paragraph body and multiple footers
95
+
96
+ ```
97
+ fix: prevent racing of requests
98
+
99
+ Introduce a request id and a reference to latest request. Dismiss
100
+ incoming responses other than from latest request.
101
+
102
+ Remove timeouts which were used to mitigate the racing issue but are
103
+ obsolete now.
104
+
105
+ Reviewed-by: Z
106
+ Refs: #123
107
+
108
+ ```
109
+
110
+ ## Specification
111
+
112
+ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
113
+
114
+ 1. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space.
115
+ 2. The type `feat` MUST be used when a commit adds a new feature to your application or library.
116
+ 3. The type `fix` MUST be used when a commit represents a bug fix for your application.
117
+ 4. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., `fix(parser):`
118
+ 5. A description MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_.
119
+ 6. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
120
+ 7. A commit body is free-form and MAY consist of any number of newline separated paragraphs.
121
+ 8. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of a word token, followed by either a `:<space>` or `<space>#` separator, followed by a string value (this is inspired by the git trailer convention).
122
+ 9. A footer’s token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token.
123
+ 10. A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.
124
+ 11. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the footer.
125
+ 12. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g.,_BREAKING CHANGE: environment variables now take precedence over config files_.
126
+ 13. If included in the type/scope prefix, breaking changes MUST be indicated by a`!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section, and the commit description SHALL be used to describe the breaking change.
127
+ 14. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._
128
+ 15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.
129
+ 16. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.
130
+
131
+ ## Why Use Conventional Commits
132
+
133
+ * Automatically generating CHANGELOGs.
134
+ * Automatically determining a semantic version bump (based on the types of commits landed).
135
+ * Communicating the nature of changes to teammates, the public, and other stakeholders.
136
+ * Triggering build and publish processes.
137
+ * Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.
138
+
139
+ ## FAQ
140
+
141
+ ### How should I deal with commit messages in the initial development phase?
142
+
143
+ We recommend that you proceed as if you’ve already released the product. Typically _somebody_, even if it’s your fellow software developers, is using your software. They’ll want to know what’s fixed, what breaks etc.
144
+
145
+ ### Are the types in the commit title uppercase or lowercase?
146
+
147
+ Any casing may be used, but it’s best to be consistent.
148
+
149
+ ### What do I do if the commit conforms to more than one of the commit types?
150
+
151
+ Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.
152
+
153
+ ### Doesn’t this discourage rapid development and fast iteration?
154
+
155
+ It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.
156
+
157
+ ### Might Conventional Commits lead developers to limit the type of commits they make because they’ll be thinking in the types provided?
158
+
159
+ Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.
160
+
161
+ ### How does this relate to SemVer?
162
+
163
+ `fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases.
164
+
165
+ ### How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`?
166
+
167
+ We recommend using SemVer to release your own extensions to this specification (and encourage you to make these extensions!)
168
+
169
+ ### What do I do if I accidentally use the wrong commit type?
170
+
171
+ #### When you used a type that’s of the spec but not the correct type, e.g. `fix` instead of `feat`
172
+
173
+ Prior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.
174
+
175
+ #### When you used a type _not_ of the spec, e.g. `feet` instead of `feat`
176
+
177
+ In a worst case scenario, it’s not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.
178
+
179
+ ### Do all my contributors need to use the Conventional Commits specification?
180
+
181
+ No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they’re merged—adding no workload to casual committers. A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.
182
+
183
+ ### How does Conventional Commits handle revert commits?
184
+
185
+ Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?
186
+
187
+ Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling authors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts.
188
+
189
+ One recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted:
190
+
191
+ ```
192
+ revert: let us never again speak of the noodle incident
193
+
194
+ Refs: 676104e, a215868
195
+
196
+ ```
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Dewayne VanHoozer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.