Skip to content

Comments

Optimize PayLoad and Introduce New WorkSpace Environment Variables#195

Merged
RyanNg1403 merged 6 commits intomainfrom
feat/optimize-payload
Aug 10, 2025
Merged

Optimize PayLoad and Introduce New WorkSpace Environment Variables#195
RyanNg1403 merged 6 commits intomainfrom
feat/optimize-payload

Conversation

@RyanNg1403
Copy link
Collaborator

Optimize Payload and Introduce New Workspace Environment Variables

Overview

This PR optimizes the workspace memory system by cleaning up unused parameters and introducing new environment variables for better cross-tool memory sharing and workspace configuration.

🧹 Payload Optimization

Removed Unused Parameters

  • conversationTopic - Was defined in schema but never used in processing logic or stored in payload
  • workEnvironment - Dead code parameter that wasn't actually utilized
  • teamId - Legacy parameter that wasn't included in any storage payloads

Cleaner Context Schema

The cipher_workspace_store tool now has a more focused context schema with only the parameters that are actually used:

  • sessionId - Current session identifier
  • projectId - Project identifier for scoped workspace memory
  • userId - User identifier

🔧 New Workspace Environment Variables

Cross-Tool Memory Sharing

  • CIPHER_USER_ID - User identifier for cross-tool memory sharing
  • CIPHER_PROJECT_NAME - Project identifier for scoped memory operations
  • CIPHER_WORKSPACE_MODE - Workspace mode (shared | isolated, default: isolated)

🔄 Enhanced Payload Structure

Environment Variable Precedence

Environment variables now take precedence over agent-provided parameters for security:

userId: env.CIPHER_USER_ID || options.userId,
projectId: env.CIPHER_PROJECT_NAME || options.projectId,
workspaceMode: env.CIPHER_WORKSPACE_MODE || options.workspaceMode || 'isolated'

Hybrid Information Extraction

The workspace store tool now supports hybrid extraction with LLM precedence:

  • LLM-provided structured data takes priority over regex extraction
  • Regex extraction serves as fallback/supplement
  • mergeWorkspaceInfo() function ensures LLM data always wins

🧪 Testing

  • All existing tests pass after parameter cleanup
  • No breaking changes to existing functionality
  • Environment variable integration tested and validated

�� Impact

  • Cleaner API: Removed dead code parameters for better maintainability
  • Enhanced Security: Environment variables take precedence over agent parameters
  • Better Configuration: Dedicated workspace vector store configuration
  • Improved Sharing: Cross-tool memory sharing with user/project scoping
  • Flexible Deployment: Support for both shared and isolated workspace modes

🔗 Related

  • Follows the same pattern established in cipher_workspace_store for hybrid extraction
  • Aligns with the broader memory system optimization efforts
  • Enables better team collaboration and project progress tracking

@RyanNg1403 RyanNg1403 merged commit d4a28cc into main Aug 10, 2025
5 checks passed
@RyanNg1403 RyanNg1403 deleted the feat/optimize-payload branch August 11, 2025 04:48
Ptah-CT pushed a commit to DerAuctor/ct-cipher that referenced this pull request Oct 2, 2025
Optimize PayLoad and Introduce New WorkSpace Environment Variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant