@quietloudlab/ai-interaction-atlas 1.0.11 → 1.0.13

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/dist/index.mjs CHANGED
@@ -1443,6 +1443,45 @@ var HUMAN_TASKS = [
1443
1443
  { target_id: "task_verify", type: "commonly_preceded_by", strength: "weak", reason: "Automated verification may surface flaggable items." }
1444
1444
  ]
1445
1445
  },
1446
+ {
1447
+ id: "human_delegate",
1448
+ layer_id: "layer_interactive",
1449
+ name: "Delegate Authority",
1450
+ slug: "delegate-authority",
1451
+ task_type: "human",
1452
+ elevator_pitch: "User grants an AI agent bounded authority to act on their behalf\u2014spending caps, scope limits, time windows, or approval thresholds.",
1453
+ example_usage: "Authorizing a shopping agent to purchase items under $50 without confirmation, or letting a coding agent merge PRs that pass all checks.",
1454
+ io_spec: {
1455
+ inputs: {
1456
+ required: [{ id: "data_policy", label: "Authority Scope (caps, allowlists, time bounds)" }],
1457
+ optional: [
1458
+ { id: "data_config", label: "Budget / Spending Limits" },
1459
+ { id: "data_policy", label: "Escalation Criteria" }
1460
+ ]
1461
+ },
1462
+ constraints: {
1463
+ optional: [
1464
+ { id: "const_human_loop", label: "Permanent Gate Actions" },
1465
+ { id: "const_cost_budget", label: "Spending Cap" }
1466
+ ]
1467
+ },
1468
+ outputs: {
1469
+ primary: { id: "data_token", label: "Delegation Token / Authority Grant" },
1470
+ metadata: [
1471
+ { id: "data_log", label: "Delegation Audit Record" },
1472
+ { id: "data_policy", label: "Scope Boundaries" }
1473
+ ]
1474
+ }
1475
+ },
1476
+ common_variants: ["grant_spending_authority", "approve_autonomous_mode", "set_agent_permissions", "escalation_override", "revoke_delegation"],
1477
+ relations: [
1478
+ { target_id: "human_configure", type: "commonly_preceded_by", strength: "strong", reason: "Boundaries (caps, allowlists, scope) are typically configured before authority is delegated." },
1479
+ { target_id: "task_act", type: "enables", strength: "strong", reason: "Delegation grants the agent permission to execute actions without per-action approval." },
1480
+ { target_id: "task_monitor", type: "commonly_followed_by", strength: "strong", reason: "Delegated actions should be monitored for drift, overspend, or scope violations." },
1481
+ { target_id: "human_stop_process", type: "related_to", strength: "strong", reason: "Revocation is the inverse of delegation\u2014human reclaims authority from the agent." },
1482
+ { target_id: "human_grant_consent", type: "related_to", strength: "medium", reason: "Consent governs data; delegation governs agency. Both transfer a form of permission, but delegation transfers the right to act." }
1483
+ ]
1484
+ },
1446
1485
  // =========================================================
1447
1486
  // Outbound — user finalizes, refines, exports
1448
1487
  // =========================================================
@@ -2373,13 +2412,13 @@ var DATA_ARTIFACTS = [
2373
2412
  { id: "data_score", name: "Score", category: "system", icon: "gauge", description: "Numerical value (confidence, similarity, etc)", examples: ["0.85 confidence", "0.92 similarity", "Ranking score"], compatible_with: ["All"], format_notes: "Float, typically 0-1" },
2374
2413
  { id: "data_classification", name: "Classification", category: "system", icon: "tag", description: "Categorical label", examples: ["Spam/Not Spam", "Cat/Dog", "Sentiment labels"], compatible_with: ["Classify", "Verify"], format_notes: "String label from taxonomy" },
2375
2414
  { id: "data_signal", name: "Signal", category: "system", icon: "zap", description: "Control flow trigger", examples: ["Start", "Stop", "Alert", "Threshold breach"], compatible_with: ["Monitor", "Act"], format_notes: "Boolean or Enum" },
2376
- { id: "data_log", name: "Log", category: "system", icon: "list", description: "System event record", examples: ["Error trace (.log)", "Audit log", "Access logs"], compatible_with: ["Adapt"], format_notes: "Timestamped structured data" },
2377
- { id: "data_config", name: "Config", category: "system", icon: "settings", description: "System parameters", examples: ["Model settings (.json, .yaml)", "Thresholds (.yml)", "Environment vars (.env)"], compatible_with: ["Adapt"], format_notes: "JSON/YAML" },
2415
+ { id: "data_log", name: "Log", category: "system", icon: "list", description: "System event record", examples: ["Error trace (.log)", "Audit log", "Access logs"], compatible_with: ["Adapt", "Harvest", "Delegate Authority"], format_notes: "Timestamped structured data" },
2416
+ { id: "data_config", name: "Config", category: "system", icon: "settings", description: "System parameters", examples: ["Model settings (.json, .yaml)", "Thresholds (.yml)", "Environment vars (.env)"], compatible_with: ["Adapt", "Delegate Authority"], format_notes: "JSON/YAML" },
2378
2417
  { id: "data_schema", name: "Schema", category: "system", icon: "file-code", description: "Data structure definition", examples: ["JSON Schema (.json)", "SQL Schema (.sql)", "GraphQL Schema (.graphql)"], compatible_with: ["Format"], format_notes: "Formal specification" },
2379
2418
  { id: "data_db_record", name: "DB Record", category: "system", icon: "database", description: "Persisted entity", examples: ["User row", "Product item", "Transaction record"], compatible_with: ["Load", "Save"], format_notes: "ORM Object" },
2380
2419
  { id: "data_api_response", name: "API Response", category: "system", icon: "globe", description: "External service data", examples: ["Weather data (.json)", "Payment status", "REST response"], compatible_with: ["API Call"], format_notes: "JSON/XML" },
2381
2420
  { id: "data_action", name: "Action", category: "system", icon: "zap", description: "Discrete or continuous action", examples: ["Button press", "Motor command", "API call trigger"], compatible_with: ["Act", "Explore"], format_notes: "Enum or Vector" },
2382
- { id: "data_policy", name: "Policy", category: "system", icon: "shield", description: "Decision-making strategy", examples: ["Neural weights (.pt, .ckpt)", "Ruleset (.yaml)", "Decision trees"], compatible_with: ["Plan", "Act"], format_notes: "Model/Function" },
2421
+ { id: "data_policy", name: "Policy", category: "system", icon: "shield", description: "Decision-making strategy", examples: ["Neural weights (.pt, .ckpt)", "Ruleset (.yaml)", "Decision trees"], compatible_with: ["Plan", "Act", "Delegate Authority"], format_notes: "Model/Function" },
2383
2422
  { id: "data_file", name: "File", category: "system", icon: "file", description: "Binary file blob", examples: ["Uploaded document", "Image file", "Archive (.zip, .tar.gz)"], compatible_with: ["Extract", "Translate"], format_notes: "Binary data with MIME type" },
2384
2423
  { id: "data_selection", name: "Selection", category: "system", icon: "check-square", description: "User choice from options", examples: ["Dropdown value", "Checkbox state"], compatible_with: ["Select"], format_notes: "ID or value from option set" },
2385
2424
  { id: "data_group", name: "Group / Cluster", category: "system", icon: "grid", description: "A collection of items grouped by similarity or logic", examples: ["Cluster ID 1", "Folder: Invoices"], compatible_with: ["Synthesize", "Organize"], format_notes: "Object containing {id, label, items[]}" },
@@ -2393,15 +2432,15 @@ var CONSTRAINTS = [
2393
2432
  { id: "const_privacy", name: "Privacy Preserving", category: "quality_safety", icon: "shield-check", description: "Ensures PII is handled correctly.", type: "Policy", applies_to: ["Extract", "Generate"], ux_note: "Display data handling notice.", example_values: "GDPR compliant, anonymize outputs" },
2394
2433
  { id: "const_latency", name: "Latency Budget", category: "performance_resource", icon: "clock", description: "Maximum allowed time for execution.", type: "Milliseconds", applies_to: ["Generate", "Retrieve"], ux_note: "Show loading indicator if exceeded", example_values: "< 200ms for UI, < 5s for batch" },
2395
2434
  { id: "const_confidence", name: "Confidence Threshold", category: "model_technical", icon: "gauge", description: "Minimum score required to act.", type: "Float (0-1)", applies_to: ["Classify", "Detect", "Verify"], ux_note: "Route low-confidence to human review", example_values: "0.85 for automation, 0.95 for safety-critical" },
2396
- { id: "const_human_loop", name: "Human Verification", category: "quality_safety", icon: "user-check", description: "Requires human approval before action.", type: "Workflow", applies_to: ["Act", "Generate"], ux_note: "Add review step in UI.", example_values: "Always for medical/legal, optional for creative" },
2435
+ { id: "const_human_loop", name: "Human Verification", category: "quality_safety", icon: "user-check", description: "Requires human approval before action.", type: "Workflow", applies_to: ["Act", "Generate", "Harvest", "Delegate Authority"], ux_note: "Add review step in UI.", example_values: "Always for medical/legal, optional for creative" },
2397
2436
  { id: "const_rate_limit", name: "Rate Limit", category: "performance_resource", icon: "bar-chart", description: "Max requests per time window.", type: "Integer", applies_to: ["API Call", "Generate"], ux_note: "Queue or throttle requests", example_values: "100 req/min, 1000 req/hour" },
2398
2437
  { id: "const_context_window", name: "Context Window", category: "model_technical", icon: "layers", description: "Token limit for model input.", type: "Integer", applies_to: ["Generate", "Synthesize"], ux_note: "Truncate or chunk long inputs", example_values: "4k, 32k, 128k tokens" },
2399
2438
  { id: "const_tone", name: "Tone & Voice", category: "ux_interaction", icon: "message-circle", description: "Style of generated content.", type: "String", applies_to: ["Generate", "Transform"], ux_note: "Allow user selection", example_values: "Professional, Casual, Friendly, Technical" },
2400
2439
  { id: "const_format", name: "Output Format", category: "data_context", icon: "file-check", description: "Strict structure requirement.", type: "Schema", applies_to: ["Extract", "Generate"], ux_note: "Validate output before returning", example_values: "JSON Schema, Markdown, CSV" },
2401
2440
  { id: "const_authentication", name: "Authentication Required", category: "quality_safety", icon: "key", description: "User or service authentication is required for this operation.", type: "Policy", applies_to: ["API Call", "Load from Database", "Save to Database"], ux_note: "Display login prompt or return 401 if unauthenticated", example_values: "OAuth2, JWT, API key, SSO, mTLS" },
2402
- { id: "const_authorization", name: "Role-Based Access", category: "quality_safety", icon: "shield-check", description: "Access control based on user roles or permissions.", type: "Policy", applies_to: ["API Call", "Generate", "Act", "Load from Database"], ux_note: "Check user roles before allowing action, show permissions error if unauthorized", example_values: "Admin only, Editor role, View-only for guests, RBAC policy" },
2441
+ { id: "const_authorization", name: "Role-Based Access", category: "quality_safety", icon: "shield-check", description: "Access control based on user roles or permissions.", type: "Policy", applies_to: ["API Call", "Generate", "Act", "Load from Database", "Delegate Authority"], ux_note: "Check user roles before allowing action, show permissions error if unauthorized", example_values: "Admin only, Editor role, View-only for guests, RBAC policy" },
2403
2442
  { id: "const_encryption", name: "Encryption Required", category: "quality_safety", icon: "lock", description: "Data must be encrypted in transit and/or at rest.", type: "Policy", applies_to: ["Save to Database", "API Call", "Generate"], ux_note: "Use TLS/HTTPS, encrypt sensitive fields before storage", example_values: "TLS 1.3, AES-256 at rest, End-to-end encryption" },
2404
- { id: "const_cost_budget", name: "Cost Budget", category: "performance_resource", icon: "dollar-sign", description: "Maximum cost allowed per operation or time period.", type: "Currency", applies_to: ["Generate", "Train Model", "API Call", "Retrieve"], ux_note: "Track spending, alert when approaching limit, block if exceeded", example_values: "$0.01 per query, $100 per day, $1000 per month" },
2443
+ { id: "const_cost_budget", name: "Cost Budget", category: "performance_resource", icon: "dollar-sign", description: "Maximum cost allowed per operation or time period.", type: "Currency", applies_to: ["Generate", "Train Model", "API Call", "Retrieve", "Delegate Authority"], ux_note: "Track spending, alert when approaching limit, block if exceeded", example_values: "$0.01 per query, $100 per day, $1000 per month" },
2405
2444
  { id: "const_compute_budget", name: "Compute Budget", category: "performance_resource", icon: "cpu", description: "Maximum compute resources allowed (tokens, GPU hours, API calls).", type: "Integer", applies_to: ["Generate", "Train Model", "Evaluate Model"], ux_note: "Monitor usage, throttle when approaching limit", example_values: "10k tokens per request, 100 GPU hours per month, 1000 API calls per day" },
2406
2445
  { id: "const_system_instruction", name: "System Instruction", category: "ux_interaction", icon: "file-text", description: "Fixed instruction or role definition for AI model behavior.", type: "String", applies_to: ["Generate", "Classify", "Synthesize"], ux_note: "Prepend to all requests, not visible to end user", example_values: "You are a helpful customer service agent, Always respond in Spanish, Be concise and factual" },
2407
2446
  { id: "const_prompt_template", name: "Prompt Template", category: "data_context", icon: "code", description: "Structured prompt format with variable placeholders.", type: "Template String", applies_to: ["Generate", "Transform", "Synthesize"], ux_note: "Inject user data into template, validate parameters", example_values: "Summarize this {document} in {style}, Translate {text} from {source_lang} to {target_lang}" },
@@ -2411,7 +2450,7 @@ var CONSTRAINTS = [
2411
2450
  { id: "const_content_safety", name: "Content Safety Policy", category: "quality_safety", icon: "shield-alert", description: "Filters for toxicity, hate speech, violence, or inappropriate content.", type: "Policy", applies_to: ["Generate", "Classify", "Transform"], ux_note: "Display content warnings, show filtered results, allow user reporting", example_values: "Block hate speech, Flag NSFW content, Age-restrict violent imagery, Filter profanity" },
2412
2451
  { id: "const_error_handling", name: "Error Handling Strategy", category: "ux_interaction", icon: "alert-triangle", description: "How the system responds when operations fail or produce errors.", type: "Strategy", applies_to: ["Generate", "Retrieve", "API Call", "Act"], ux_note: "Show retry button, display error message, offer alternative path, escalate to support", example_values: "Auto-retry 3x with backoff, Show friendly error + support link, Fallback to cached result, Queue for manual review" },
2413
2452
  { id: "const_streaming", name: "Streaming Mode", category: "ux_interaction", icon: "activity", description: "Whether to stream partial results progressively or return complete output.", type: "Boolean", applies_to: ["Generate", "Transform", "Synthesize"], ux_note: "Show typing indicator, display tokens as they arrive, enable cancel mid-stream", example_values: "Stream for chat interfaces, Batch for reports, Progressive for long content" },
2414
- { id: "const_audit_log", name: "Audit Logging", category: "quality_safety", icon: "history", description: "What user actions and system events to log for accountability.", type: "Policy", applies_to: ["Generate", "Act", "API Call", "Train Model", "Classify"], ux_note: "Minimal UI impact, may show 'Activity tracked' notice for transparency", example_values: "Log all AI decisions, Track user prompts + outputs, Record model versions, Capture timestamps + user IDs" },
2453
+ { id: "const_audit_log", name: "Audit Logging", category: "quality_safety", icon: "history", description: "What user actions and system events to log for accountability.", type: "Policy", applies_to: ["Generate", "Act", "API Call", "Train Model", "Classify", "Harvest", "Delegate Authority"], ux_note: "Minimal UI impact, may show 'Activity tracked' notice for transparency", example_values: "Log all AI decisions, Track user prompts + outputs, Record model versions, Capture timestamps + user IDs" },
2415
2454
  { id: "const_quality_threshold", name: "Quality Threshold", category: "model_technical", icon: "award", description: "Minimum acceptable quality score for outputs before showing to users.", type: "Float (0-1)", applies_to: ["Generate", "Extract", "Transform"], ux_note: "Show 'low quality' warning, offer regenerate option, route to human review", example_values: "0.8 for production, 0.6 for drafts, 0.9 for legal/medical, Block below 0.5" },
2416
2455
  { id: "const_user_consent", name: "User Consent", category: "quality_safety", icon: "user-check", description: "When and how to obtain user permission for data processing or AI usage.", type: "Policy", applies_to: ["Generate", "Train Model", "Save to Database", "API Call"], ux_note: "Display consent dialog, provide opt-out option, link to privacy policy, record consent timestamp", example_values: "Prompt before first use, Explicit opt-in for training data, Annual re-consent, Granular per-feature consent" },
2417
2456
  { id: "const_localization", name: "Localization Requirements", category: "ux_interaction", icon: "globe", description: "Language, region, and cultural adaptation requirements for content.", type: "Locale", applies_to: ["Generate", "Transform", "Synthesize", "Classify"], ux_note: "Detect user language, provide language selector, adapt formatting (dates, currency)", example_values: "Support 10 languages, Auto-detect locale, RTL for Arabic/Hebrew, Region-specific examples" },
@@ -2419,7 +2458,7 @@ var CONSTRAINTS = [
2419
2458
  // Execution Behavior Constraints
2420
2459
  { id: "const_autonomy", name: "Autonomous Execution", category: "execution_behavior", icon: "play-circle", description: "Task runs independently in the background and returns results when complete.", type: "Mode", applies_to: ["Generate", "Retrieve", "Orchestrate"], ux_note: "Show background task indicator, provide status updates, allow cancellation", example_values: "Background agent, Async processing, Fire-and-forget, Blocking (wait for result)" },
2421
2460
  { id: "const_parallelism", name: "Parallel Execution", category: "execution_behavior", icon: "git-branch", description: "Multiple operations execute simultaneously for efficiency.", type: "Strategy", applies_to: ["Retrieve", "Generate", "API Call"], ux_note: "Show progress for parallel tasks, handle partial failures gracefully", example_values: "Parallel searches, Concurrent file reads, Batch API calls, Sequential only" },
2422
- { id: "const_timeout", name: "Timeout Limit", category: "execution_behavior", icon: "timer", description: "Maximum time allowed before operation is cancelled.", type: "Duration", applies_to: ["Generate", "Retrieve", "API Call", "Act"], ux_note: "Show timeout warning, provide extend option, handle graceful cancellation", example_values: "30 seconds, 5 minutes, No timeout, User-configurable" },
2461
+ { id: "const_timeout", name: "Timeout Limit", category: "execution_behavior", icon: "timer", description: "Maximum time allowed before operation is cancelled.", type: "Duration", applies_to: ["Generate", "Retrieve", "API Call", "Act", "Delegate Authority"], ux_note: "Show timeout warning, provide extend option, handle graceful cancellation", example_values: "30 seconds, 5 minutes, No timeout, User-configurable" },
2423
2462
  // Code Generation Philosophy Constraints
2424
2463
  { id: "const_minimalism", name: "Minimal Changes", category: "code_philosophy", icon: "minimize", description: "Prefer editing existing code over creating new files or adding unnecessary features.", type: "Principle", applies_to: ["Generate", "Transform"], ux_note: "Surface this principle in code review, show edit vs write statistics", example_values: "Edit over write, Avoid over-engineering, Only change what's needed, YAGNI (You Aren't Gonna Need It)" },
2425
2464
  { id: "const_code_style", name: "Code Style Adherence", category: "code_philosophy", icon: "code", description: "Follow existing codebase patterns and style conventions.", type: "Policy", applies_to: ["Generate", "Transform"], ux_note: "Run linter/formatter, show style violations, auto-fix when possible", example_values: "Match existing patterns, Follow style guide, Preserve indentation, Consistent naming" },