Commit Graph

47 Commits

Author SHA1 Message Date
ARCHITECT
26c9f1f402 HST frontend: data-driven category classification using hst_rules
- Add tableRules to State for caching hst_rules data
- Add getTableRules() API function to fetch hst_rules table
- Modify getCategory() to check if table has categories (hst_permitidos)
- Only use set_hst for sub-categorization on tables with non-empty hst_permitidos
- Tables without categories now correctly show base name as category

Same fixes as DECK frontend for consistent behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 23:16:31 +00:00
ARCHITECT
bee5f9f939 DECK frontend: data-driven category classification using hst_rules
- Add tableRules to State for caching hst_rules data
- Add getTableRules() API function to fetch hst_rules table
- Modify getCategory() to check if table has categories (hst_permitidos)
- Only use set_hst for sub-categorization on tables with non-empty hst_permitidos
- Tables without categories now correctly show base name as category
- Load tableRules once on first data load for performance

Fixes issue where all items were showing sub-categories even when the
table (like itm, flg, loc) doesn't have category restrictions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 23:15:43 +00:00
ARCHITECT
4546003ce7 Fix getCategory to use set_hst for proper categorization
Tags are now categorized based on their set_hst field, which
points to the parent category tag (e.g., hst, spe, vue, vsn, msn).
This uses the actual semantic relationship defined in the database
rather than inferring from ref prefix or using the base.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:34:33 +00:00
ARCHITECT
7f247b446b Fix getCategory to use current base instead of ref prefix
Tags are categorized by the base they belong to, not by their
ref prefix. A tag in the hst table is always a hashtag, regardless
of whether its ref starts with "flg", "ply", etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:23:52 +00:00
ARCHITECT
2e8c1867b2 Graph sidebar shows only categories present in current data
- Count tags per category before rendering sidebar
- Only display categories that have tags in current view
- Show count next to each category name

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:19:18 +00:00
ARCHITECT
697bb27103 Fix graph sidebar state closure issue
Event handlers now read fresh state from State.get() instead of
using captured values from when bindSidebarEvents was called.
This ensures the sidebar updates correctly with each render.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:14:58 +00:00
ARCHITECT
0f2b28a88a Fix getLibraries to query library tables directly
Instead of depending on non-existent api_library_list_* views,
now queries library_${base} for unique mrf_library values and
fetches tag info from main table.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:01:33 +00:00
ARCHITECT
7d15ca010a Remove hst-frontend.html - moved to separate repo
HST frontend now lives in its own repository: tzzr/hst-frontend
This maintains clean separation between DECK and HST frontends.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:05:29 +00:00
ARCHITECT
00ea6cff8c Add HST-specific frontend (hst-frontend.html)
Customized version of DECK frontend for HST server (tzrtech.org):
- Remove DECK-specific bases: MST, BCK, MTH, ATC, Oracle, MAIL, CHAT
- Keep only taxonomy bases: HST, FLG, ITM, LOC, PLY
- Update IMG_BASE to https://tzrtech.org
- Update title to "hst" and logo to "HST"
- Clean up schema documentation

HST serves as the semantic tag model/template that DECK can copy from.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 20:43:21 +00:00
ARCHITECT
bc952aa25d Remove flow-ui and mindlink submodules
Services archived and removed from DECK server.
Documentation preserved in Gitea repositories.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 11:19:07 +00:00
ARCHITECT
f91485f866 Security and multi-instance improvements
captain_api.py:
- Generate random JWT_SECRET if not configured (with warning)
- Restrict CORS to specific origins
- Add POST /sessions endpoint to create screen sessions
- Sanitize session names (prevent command injection)
- Validate file paths to upload directory only
- Improve JWT error handling
- Set TERM environment for screen sessions

flow-ui: Add multi-instance support with server validation
mindlink: Add multi-instance support with category filtering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 11:13:40 +00:00
ARCHITECT
60ca0640a3 Add DECK server Docker Compose configurations
- tzzr-stack: PostgreSQL, PostgREST, Directus (unified DB stack)
- services: Shlink, Filebrowser, Redis, Vaultwarden, ntfy

PostgreSQL migrated from host to Docker with all services
connected via tzzr-net network.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 21:31:31 +00:00
ARCHITECT
4f7f069e18 Add session log: Sistema Multi-Bucket ATC implementado
Implementación completa de soporte multi-bucket para tabla ATC:
- Tabla public.bucket_registry (metadata de buckets)
- Tabla public.bucket_access_log (auditoría)
- Campo bucket_mrf en tzzr_core_secretaria.atc
- 2275 archivos migrados a bucket 'deck'
- Documentación completa de sesión

Cambios menores:
- deck-v4.6.html actualizado
- Caddyfile para captain-mobile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 20:35:28 +00:00
ARCHITECT
5e8e6a8428 DECK Frontend v4.6 - Fix API configuration for production
- Change API_BASE to https://tzrtech.org/api (HST server)
- Update all schemas to 'public' (actual DB schema)
- Fixes TreeView data loading in production

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 20:15:27 +00:00
ARCHITECT
66c45910da Add debug logs to EventBus
Events now logs to console when _debug is true:
- [Events.on] event (N handlers) - green
- [Events.off] event - orange
- [Events.emit] event data → N handlers - blue

Toggle in browser console:
  Events._debug = false  // disable
  Events._debug = true   // enable (default)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 19:56:05 +00:00
ARCHITECT
7672d5582f DECK Frontend v4.6 - EventBus decoupling
Added Events module for inter-component communication:
- Events.on(event, handler) - subscribe
- Events.off(event, handler) - unsubscribe
- Events.emit(event, data) - publish

Decoupled:
- GroupsBar → Events.emit('render') instead of App.renderView()
- LibrariesPanel → Events.emit('render')
- GraphView sidebar → Events.emit('render')
- GraphView node click → Events.emit('detail:show', mrf)

App subscribes to events in init():
- Events.on('render', () => this.renderView())
- Events.on('detail:show', (mrf) => DetailPanel.show(mrf))

Now modules don't know about each other - changes are isolated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 19:37:34 +00:00
ARCHITECT
daea7753b6 DECK Frontend v4.5 - All 12 bases + generic structure
Added bases:
- MST (Masters) - tzzr_core_produccion
- BCK (Backlog) - tzzr_core_produccion
- Oracle - tzzr_core_secretaria

Reorganized UI groups:
- Taxonomía: HST, FLG, ITM, LOC, PLY
- Producción: MST, BCK, MTH
- Secretaría: ATC, Oracle
- Comunicación: MAIL, CHAT

Added categories for graph visualization:
- mst, bck, mth, atc, ora with distinct colors

Tables MST/BCK/Oracle don't exist in DB yet - frontend ready for them.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 19:10:52 +00:00
ARCHITECT
171a356b25 DECK Frontend v4.4 - Tree from tree_* relational tables
- Added API.getTree() to query tree_{base} tables
- TreeView now builds real 1:N hierarchy from tree_* data
- Recursive rendering with proper parent-child relationships
- Library filter still works (filters tags before building tree)
- Updated CSS for hierarchical tree display with depth indicators

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 18:53:37 +00:00
ARCHITECT
0bd1d6fbff DECK Frontend v4.3 - Portable with trivial extraction
- Simplified header (removed tag examples that interfered with extraction)
- Added extract.sh script for 3-file separation
- Structure: <style>, <body>, <script> cleanly separable
- Run: ./extract.sh deck.html → styles.css, app.js, index.html

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 18:37:31 +00:00
ARCHITECT
9b244138b5 Add pending apps and frontend components
- apps/captain-mobile: Mobile API service
- apps/flow-ui: Flow UI application
- apps/mindlink: Mindlink application
- apps/storage: Storage API and workers
- apps/tzzr-cli: TZZR CLI tool
- deck-frontend/backups: Historical TypeScript versions
- hst-frontend: Standalone HST frontend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 18:26:59 +00:00
ARCHITECT
17506aaee2 Fix extraction markers interference in header comments
The example sed commands in the header contained the same
marker strings, causing extraction to capture header content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 18:15:46 +00:00
ARCHITECT
384e9129c1 DECK Frontend v4.2 - Minor Accessibility Polish
- Toast: aria-live="assertive" + role="alert" for immediate announcements
- CSS: prefers-reduced-motion support added
- Version bump v4.1 → v4.2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 18:01:39 +00:00
ARCHITECT
ec650d06df DECK Frontend v4.1 - Security & Accessibility Update
Changes:
- XSS protection with escapeHtml() utility
- Responsive CSS (3 mobile breakpoints)
- Full accessibility: aria-labels, roles, focus-visible
- GraphView memory leak fix
- Immutable state management

Files:
- deck-v4.1.html: Production-ready monolith
- CHANGELOG.md: Version history and documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 19:35:52 +00:00
ARCHITECT
3c0f18529a Add session log: Directus DECK configuration
Documents complete Directus setup on DECK server including:
- Multi-schema PostgreSQL access configuration
- External-image extension for thumbnails
- 57 collections with presets and relations
- Troubleshooting guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:43:16 +00:00
ARCHITECT
295caa58c1 Fix graph view overflow and sidebar visibility
- Add graph-mode class to parent containers when graph view is active
- Add CSS rules for .graph-mode and :has(.graph-view) for overflow: visible
- Ensure sidebar and controls are not clipped by parent overflow
- Add width/height 100% to content-area.graph-view

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 00:47:57 +00:00
ARCHITECT
62408182a0 Fix graph sidebar visibility with overflow visible
- Add overflow: visible to .graph-view to prevent clipping
- Add .content-area.graph-view rule for parent overflow fix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 00:19:34 +00:00
ARCHITECT
6d6e4e1bdf Fix view-tab reactivity using direct onclick binding
- Change view-tabs from delegateEvent to direct onclick like hst-frontend
- Remove hardcoded 'active' class from grid tab in HTML
- Update active class immediately on click before state update
- Update proxy target to tzrtech.org

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 00:16:38 +00:00
ARCHITECT
131e198851 Refactor GraphView with floating sidebar and zoom controls
- Move graph options from left panel to floating sidebar in GraphView
- Add zoom controls (fit, +, -) in top-right corner
- Add dynamic legend showing active categories
- Add cleanup system to View base class for event listeners
- Update delegateEvent to return cleanup function
- Filter nodes by category before rendering
- Fix text color variable (--text-primary to --text)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 00:07:26 +00:00
ARCHITECT
f55945fdb8 Add ATC thumbnail URL resolution for R2 storage
- Add resolveImgUrl() to prepend https://atc.tzzrdeck.me/ to relative paths
- Update getImg() and getFullImg() to use the new resolver
- Enables thumbnail display for attachments stored in R2 bucket

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 12:30:56 +00:00
ARCHITECT
0c3f95750c Move SEL/GET buttons to view-bar as grouped button pair
- Moved SEL and GET buttons from topbar to view-bar
- Created button group with consistent styling
- Positioned to the left of Grid/Tree/Graph tabs
- Added spacer for balanced layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 10:09:31 +00:00
ARCHITECT
79b7389f1f Add graph options panel and separate view bar
- Move view tabs (Grid/Tree/Graph) to dedicated bar below topbar
- Add graph options panel in left sidebar when in graph view:
  - Stats: node count, edge count
  - Category filters: Hashtags, Specs, Values, Visions, Missions, Flags
  - Relation filters: all edge types with color indicators
  - Visualization: images toggle, labels toggle, node size slider, link distance slider
- Left panel shows libraries in grid/tree view, graph options in graph view

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:59:00 +00:00
ARCHITECT
a0b20fc5db Fix library loading per base with new API views
- Use api_library_list_{base} views instead of generic query
- Add name_en and member_count to Library type
- Created PostgreSQL views for hst, flg, itm, loc, ply libraries

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:54:18 +00:00
ARCHITECT
a7ab3bab7d Add multi-schema support and per-base libraries
- Swap MST/BCK and MTH/ATC button positions
- Add schema support for different PostgreSQL schemas:
  - secretaria_clara: atc, mst, bck
  - production_alfred: mth
  - mail_manager: mail
  - context_manager: chat
- Libraries now load per-base (library_{base})
- Add new base types: key, mindlink
- Update FetchOptions to use schema instead of headers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:43:54 +00:00
ARCHITECT
030b2a5312 Rename hst-frontend-new to deck-frontend
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:00:56 +00:00
ARCHITECT
4e9377cf09 Add DECK Frontend - Vite + TypeScript migration
- Migrated vanilla JS frontend to Vite + TypeScript
- Modular architecture: views, components, utils, api, state
- Three-panel layout: libraries (left), content (center), detail (right)
- Group name resolution via hstTags (set_hst -> readable name)
- Name priority: name_es -> alias -> ref -> hash truncated
- D3.js lazy loading in GraphView
- Hash-based routing
- Deployed to tzzrdeck.me

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 23:55:09 +00:00
ARCHITECT
0980688b21 Update HST session - database schema changes
- Renamed fields to English (nombre→name, estandar→standard, grupo→group)
- Renamed relational fields (padre→parent, hijo→child, biblioteca→library)
- Removed legacy fields from ply, itm, loc
- Generated backups v3 with new schema
- Created TZZR_Database_Spec_v2.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 03:12:32 +00:00
ARCHITECT
61dfcc5478 Add HST session 2026-01-04 documentation
- Kelvin temperature images management (delete/add)
- New ribbon cable record (rbc)
- Full database backup (26 tables)
- Image backup to R2 (875 images)
- Generated listado_hst_flg.md and backup_hst_flg.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 02:31:09 +00:00
ARCHITECT
66f4c8ab64 Add HST image system manual
Documents how the image system works internally:
- img vs mrf fields explained
- File naming convention (SHA256 hash)
- Step-by-step image upload procedure
- Common errors and solutions
- Diagnostic commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 16:06:14 +00:00
ARCHITECT
341221dd6e Update HST session docs - complete state documentation
- Tags: 542/679 detailed (79.8%)
- Graph: 507/810 reclassified (62.6%)
- Tree: 188 hierarchies
- Library: 12 active, 0 orphans
- Decision: nid and uid kept separate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 15:48:08 +00:00
ARCHITECT
633aa48a8e Update HST session docs - 80.2% detailed tags achieved
- Fixed 8 orphan libraries (SHA256 hashes without HST records)
- Reassigned 5 to existing tags (cmd, aco, qlt, nid, lib_ilum)
- Created 3 new library tags (lib_pind, lib_ent, lib_mat)
- Final: 12 libraries, 82 tag associations, 0 orphans

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 15:42:41 +00:00
ARCHITECT
10da3857f7 Update HST session docs - 80.2% detailed tags achieved
- 542/676 tags with detailed standards (80.2%)
- 188 tree hierarchies
- 87 library associations
- 9 edge types in graph (303 relation, 245 specialization, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 13:40:15 +00:00
ARCHITECT
8201f499bb Update HST session docs - 61.3% detailed tags achieved
- Extended session with 7 update batches (~200 tags)
- Multi-jurisdiction standards (EU/Spain, USA, China, UAE, Singapore)
- Improved from 18.9% to 61.3% detailed coverage
- Changelog v3 uploaded to R2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 12:54:56 +00:00
ARCHITECT
313ba83a52 Add HST session notes - 10 refinement iterations
- 957 tags standardized (99.7% coverage)
- 127 detailed standards with IEC/ISO/EN/MIL references
- 810 graph relations reclassified to 8 edge types
- 166 tree hierarchies maintained
- Full changelog in R2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 12:16:16 +00:00
ARCHITECT
d35f11e2f7 Add apps modules and improve captain_claude logging
- Add apps/ directory with modular components:
  - captain.py: Main orchestrator
  - corp/, deck/, devops/, docker/, hst/: Domain-specific apps
- Fix duplicate logger handlers in long sessions
- Add flush=True to print statements for real-time output

Note: flow-ui, mindlink, tzzr-cli are separate repos (not included)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 01:13:30 +00:00
ARCHITECT
acffd2a2a7 Remove context-manager (moved to dedicated repo) 2025-12-31 20:07:26 +00:00
ARCHITECT
224d2f522c Add comprehensive README for CAPTAIN CLAUDE system
- Document full infrastructure overview (Central, DECK, CORP, HST)
- Add SSH access instructions and R2 storage documentation
- Detail all available services and microservices
- Include context-manager CLI commands and examples
- Document operation rules and automatic cleanup procedures
- Provide troubleshooting and contact information
- Add examples for common use cases

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 18:20:01 +00:00
ARCHITECT
d21bd9e650 Initial commit - Captain Claude multiagent system
- Core captain_claude.py orchestrator
- Context manager with SQL schemas
- Provider adapters (Anthropic, OpenAI)
- Execution scripts
2025-12-29 18:31:54 +00:00