63 Commits

Author SHA1 Message Date
Timmy fd7698f0e7 Bump version to 0.10.3 2026-04-16 18:08:23 +01:00
Timmy f4a97c1135 Bump version to 0.10.2 2026-04-15 20:07:55 +01:00
Timmy 327163eb60 Bump version to 0.10.1 2026-04-14 16:41:27 +01:00
Timmy f2fc33c86b Bump version to 0.10.0 2026-04-13 00:10:03 +01:00
dave ea36160667 fix: read_all_items must use deduplicated index, not raw CRDT entries
read_all_items was iterating all CRDT entries including stale duplicates
from earlier stage writes. A story written multiple times (backlog →
current → done) would appear in the output multiple times with different
stages, causing ghost entries in the pipeline status and backlog views.

Now iterates only the index (story_id → visible_index map) which
represents the latest-wins deduplicated view of each story.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 19:32:55 +00:00
dave 2e0ed98d42 huskies: merge 480_story_cryptographic_node_auth_for_distributed_mesh 2026-04-10 19:14:21 +00:00
Timmy f7d69cde50 sketch(520): typed pipeline state machine — bare and statig versions
Two parallel scratch experiments under server/examples/ exploring the
typed Rust state machine that should replace huskies's current
stringly-typed CRDT representation (story 520).

  - pipeline_state_sketch_bare.rs   — hand-rolled, plain enums + match
  - pipeline_state_sketch_statig.rs — using the statig crate

Both sketches:
  - Define the same Stage enum (Backlog, Coding, Qa, Merge, Done, Archived)
  - Define ArchiveReason (subsumes refactor 436's blocked/merge_failure/review_hold)
  - Define ExecutionState (per-node, separate from synced Stage) — bare only
  - Define PipelineEvent and the valid transitions
  - Make bug 519 unrepresentable: Stage::Merge requires NonZeroU32 commits_ahead
  - Make bug 502 unrepresentable: Coder agents can't be assigned to Merge state
  - Have happy-path tests, retry-loop tests, and invalid-transition tests

Differences:
  - Bare uses pure pattern matching, no framework. ~720 lines.
  - Statig uses #[state_machine] proc macro and gets free hierarchical
    states via the `active` superstate that factors out the cross-cutting
    Block / ReviewHold / Abandon / Supersede transitions across the four
    active stages. ~440 lines, 11 passing tests.

Run with:
  cargo run  --example pipeline_state_sketch_bare   -p huskies
  cargo run  --example pipeline_state_sketch_statig -p huskies
  cargo test --example pipeline_state_sketch_bare   -p huskies
  cargo test --example pipeline_state_sketch_statig -p huskies

Adds statig 0.3 as a dev-dependency in server/Cargo.toml. Cargo.lock
updated to include statig + statig-macro and their transitive deps.

Not wired into the main codebase. Once we agree on which version to
adopt, story 520 promotes the chosen sketch into a real
server/src/pipeline_state.rs module.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:03:07 +01:00
Timmy 5765fb57be merge(478): WebSocket CRDT sync layer (manual squash from feature/story-478)
Manual squash-merge of feature/story-478_… into master after the in-pipeline
mergemaster runs failed silently. The 478 agent did substantial real work
across multiple respawn cycles before being interrupted; commits on the
feature branch were intact and verified high-quality but never merged via
the normal pipeline path due to compounding bugs:

- The first mergemaster attempt ran ($0.82 in tokens) and exited "Done"
  cleanly but didn't push anything to master — likely the worktree was
  briefly on master rather than the feature branch when the merge_agent_work
  MCP tool ran, so it found nothing to merge.
- Subsequent timer fires defaulted to spawning coders instead of resuming
  mergemaster, burning more tokens for no progress.
- Bug 510 (split-brain shadows yanking done stories back to current) and
  bug 501 (timers don't cancel on stop/completion) compounded the cost.

What this commit lands:
- server/src/crdt_sync.rs (new, ~518 lines): GET /crdt-sync WebSocket
  handler that subscribes to locally-applied SignedOps and streams them as
  binary frames. Per-peer bounded queue (256 ops) drops slow peers.
- server/src/crdt_state.rs: new public functions subscribe_ops(),
  all_ops_json(), apply_remote_op() backing the sync handler. Adds the
  CRDT_OP_TX broadcast channel (capacity 1024).
- server/src/main.rs: wires up the sync subsystem at startup.
- server/src/http/mod.rs: registers the new endpoint.
- server/src/config.rs: adds optional rendezvous field for outbound peers.
- server/src/worktree.rs: minor changes from the original branch.
- server/Cargo.toml: cfg lint suppression for CrdtNode derive.
- crates/bft-json-crdt/src/debug.rs: fix unused-variable warnings.

Resolved a trivial test-mod merge conflict in crdt_state.rs (both 478 and
503 added new tests at the end of the test module — kept both sets).

Note: this is the squash of the original 478 work that the user explicitly
authorized landing. The earlier rogue commit ac9f3ecf — which added a
DIFFERENT, broken implementation of the same feature directly to master
under the user's identity without consent — was reverted earlier in this
session. The forensic tags rogue-commit-2026-04-09-ac9f3ecf and
pre-502-reset-2026-04-09 still exist for incident audit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 19:46:29 +01:00
dave 15a52d6d38 ignore kleppmann_trace test — 10+ min, 12GB RAM
Marked #[ignore] so cargo test skips it by default. Run manually with
--ignored flag when needed for benchmarking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:15:38 +00:00
dave c73153dd4e huskies: merge 490_story_crdt_state_layer_backed_by_sqlite
CRDT state layer backed by SQLite for pipeline state. Integrates the
BFT JSON CRDT crate with SQLite persistence via sqlx. Ops are persisted
and replayed on startup. Node identity via Ed25519 keypair.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:12:19 +00:00
dave f1ef31d1ee huskies: merge 489_story_sqlite_shadow_write_for_pipeline_state_via_sqlx 2026-04-07 13:13:17 +00:00
dave c56e462340 huskies: merge 472_story_discord_chat_transport 2026-04-04 12:12:03 +00:00
Timmy eb2b9f435a Bump version to 0.9.0 2026-04-03 17:07:30 +01:00
Timmy 2d8ccb3eb6 huskies: rename project from storkit to huskies
Rename all references from storkit to huskies across the codebase:
- .storkit/ directory → .huskies/
- Binary name, Cargo package name, Docker image references
- Server code, frontend code, config files, scripts
- Fix script/test to build frontend before cargo clippy/test
  so merge worktrees have frontend/dist available for RustEmbed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:12:52 +01:00
dave e9954d244b storkit: merge 466_story_configurable_timezone_in_project_toml_for_timer_scheduling 2026-04-03 13:16:16 +00:00
Timmy 0995c55a82 Bump version to 0.8.8 2026-04-03 11:07:39 +01:00
Timmy 13e3bd00f1 Bump version to 0.8.7 2026-04-02 14:09:25 +01:00
Timmy 358f177584 Bump version to 0.8.6 2026-04-02 13:39:49 +01:00
dave c6020b7f43 storkit: merge 452_bug_claude_code_pty_crashes_with_fatal_runtime_error_on_agent_restart 2026-04-02 10:31:05 +00:00
Timmy 50405800c6 Bump version to 0.8.5 2026-04-02 11:08:18 +01:00
Timmy ff5f9c76fd Bump version to 0.8.4 2026-03-31 11:32:10 +01:00
Timmy a006985faf Bump version to 0.8.3 2026-03-30 18:17:09 +01:00
Timmy b75679175b Bump version to 0.8.2 2026-03-30 11:57:05 +01:00
Timmy 3595df4d9d Bump version to 0.8.1 2026-03-28 15:37:08 +00:00
Timmy e45eab82f2 Bump version to 0.8.0 2026-03-28 13:32:07 +00:00
Timmy aa90646edf Bump version to 0.7.1 2026-03-28 12:51:39 +00:00
Timmy c2f477dde6 Bump version to 0.7.0 2026-03-28 12:20:00 +00:00
dave 40575924b5 chore: bump version to 0.6.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 10:50:59 +00:00
Timmy 877f69c897 feat: browser-based OAuth login flow (story 406)
Add three HTTP endpoints for OAuth login without terminal access:
- GET /oauth/authorize — generates PKCE params, redirects to
  claude.com/cai/oauth/authorize with code=true and full scopes
- GET /callback — exchanges auth code for tokens via JSON POST to
  platform.claude.com/v1/oauth/token, writes ~/.claude/.credentials.json
- GET /oauth/status — returns current credential state as JSON

Uses SHA-256 (sha2 crate) for PKCE code challenge. The authorize URL
targets claude.com/cai/ (not platform.claude.com) which is required
for Max/Pro subscriptions to grant user:inference scope.

Users visit http://localhost:3001/oauth/authorize in their browser
to authenticate. Matrix/WhatsApp can send this link when auth fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 19:58:18 +00:00
dave 821345d266 storkit: accept 383_refactor_reorganize_chat_system_into_chat_module_with_transport_submodules 2026-03-24 21:41:42 +00:00
Timmy 9408bd2cdf Bump version to 0.6.0 2026-03-24 21:06:15 +00:00
dave dedf951b17 storkit: merge 382_story_whatsapp_transport_supports_twilio_api_as_alternative_to_meta_cloud_api 2026-03-24 17:36:32 +00:00
dave 1cce46d3fa chore: bump version to 0.5.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 18:49:54 +00:00
Timmy fcc2b9c3eb Bump version to 0.5.0 2026-03-23 13:11:57 +00:00
dave f610ef6046 Restore codebase deleted by bad auto-commit e4227cf
Commit e4227cf (a story creation auto-commit) erroneously deleted 175
files from master's tree, likely due to a race condition between
concurrent git operations. This commit re-adds all files from the
working directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:07:07 +00:00
dave e4227cf673 storkit: create 365_story_surface_api_rate_limit_warnings_in_chat 2026-03-22 18:19:23 +00:00
Dave b2c9ece9e4 Bump version to 0.4.1 2026-03-20 12:31:19 +00:00
Dave 287c64faf1 story-kit: merge 347_story_mcp_tool_for_shell_command_execution 2026-03-20 09:54:46 +00:00
Dave 39707ce026 story-kit: merge 326_story_slack_slash_commands_for_pipeline_management 2026-03-20 01:26:06 +00:00
Dave 27c406330a rename binary from story-kit to storkit in Cargo.toml
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 00:46:18 +00:00
Dave 7e45a1fba0 Bump version to 0.3.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:49:22 +00:00
Dave 15645a2a3e Bump version to 0.3.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:31:19 +00:00
Dave 83db282892 Bump version to 0.2.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 16:08:59 +00:00
Dave df0fa46591 Revert "story-kit: merge 260_refactor_upgrade_libsqlite3_sys"
This reverts commit ea062400e5.
2026-03-17 15:45:52 +00:00
Dave ea062400e5 story-kit: merge 260_refactor_upgrade_libsqlite3_sys 2026-03-17 13:41:33 +00:00
Dave ebbbfed1d9 Add 10-minute timeout to test commands and disable e2e in merge pipeline
Test commands in run_project_tests now use wait-timeout to enforce a
600-second ceiling, preventing hung processes (e.g. Playwright with no
server) from blocking the merge pipeline indefinitely. Also disables
e2e tests in script/test until the merge workspace can run them safely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 11:32:44 +00:00
Dave 6a7baa4a15 Reverting sqlite upgrade 2026-03-14 13:28:33 +00:00
Dave 5f7647cbda Dependencies upgrade 2026-03-14 11:44:51 +00:00
Dave 27d9d3a3a9 Renaming the binary to "story-kit" 2026-03-13 12:34:29 +00:00
Dave d4f23051aa feat(matrix): render bot messages with HTML formatting
Add HTML formatted_body to Matrix bot messages so that markdown-style
formatting (code blocks, bold, italic, lists) renders properly in Matrix
clients. Uses the pulldown-cmark crate to convert markdown to HTML and
sets the message format to org.matrix.custom.html.

Story: 188_story_render_matrix_bot_messages_with_html_formatting
2026-02-25 16:08:57 +00:00