@ouro.bot/cli 0.1.0-alpha.237 → 0.1.0-alpha.239

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.
@@ -0,0 +1,116 @@
1
+ # Commerce Setup Guide
2
+
3
+ Human-facing guide for configuring the agent's commerce capabilities.
4
+
5
+ ## Architecture Overview
6
+
7
+ The agent's commerce system has three pillars:
8
+
9
+ 1. **User Profile**: Secure storage of personal data (name, passport, payment preferences) in Vaultwarden, accessed only when needed for specific transactions.
10
+
11
+ 2. **Booking Delegation**: Direct API access to flight (Duffel) and hotel (LiteAPI) booking systems, plus browser automation fallback for sites without APIs.
12
+
13
+ 3. **Payment**: Stripe Issuing virtual cards created per-transaction, with spend limits and merchant category restrictions. Card numbers never enter the model's context.
14
+
15
+ ## Setup Steps
16
+
17
+ ### 1. Stripe Issuing (Required for Payments)
18
+
19
+ - Create a Stripe account: https://dashboard.stripe.com
20
+ - Enable Stripe Issuing (requires business verification)
21
+ - Create a restricted API key: https://dashboard.stripe.com/apikeys
22
+ - Permissions needed: `issuing_cards:write`, `issuing_cards:read`
23
+ - Store in vault: `credential_store stripe.com --password <key>`
24
+
25
+ ### 2. Duffel (Flights)
26
+
27
+ - Create a Duffel account: https://app.duffel.com
28
+ - Generate a sandbox token: https://app.duffel.com/tokens
29
+ - Store in vault: `credential_store duffel.com --password <token>`
30
+
31
+ ### 3. LiteAPI (Hotels)
32
+
33
+ - Create a LiteAPI account: https://dashboard.liteapi.travel
34
+ - Get your sandbox API key
35
+ - Store in vault: `credential_store liteapi.travel --password <key>`
36
+ - Configure MCP server in agent.json (see commerce-setup.md skill for details)
37
+
38
+ ### 4. User Profile
39
+
40
+ Store your travel profile with the agent:
41
+ ```
42
+ user_profile_store '{"legalName":{"first":"...","last":"..."},"email":"...","phone":"...","preferences":{}}'
43
+ ```
44
+
45
+ ## Tool Reference
46
+
47
+ ### User Profile Tools
48
+ | Tool | Description | Trust Level |
49
+ |------|-------------|-------------|
50
+ | `user_profile_store` | Store/update profile fields | Family |
51
+ | `user_profile_get` | Retrieve a specific profile field | Family |
52
+ | `user_profile_delete` | Delete entire profile | Family |
53
+
54
+ ### Payment Tools
55
+ | Tool | Description | Trust Level |
56
+ |------|-------------|-------------|
57
+ | `stripe_create_card` | Create a virtual card | Family |
58
+ | `stripe_deactivate_card` | Deactivate a card | Family |
59
+ | `stripe_list_cards` | List active cards | Family |
60
+
61
+ ### Flight Tools
62
+ | Tool | Description | Trust Level |
63
+ |------|-------------|-------------|
64
+ | `flight_search` | Search for flights | Friend |
65
+ | `flight_hold` | Hold a flight offer | Family |
66
+ | `flight_book` | Book a flight | Family |
67
+ | `flight_cancel` | Cancel a booking | Family |
68
+
69
+ ### Hotel Tools
70
+ Hotels are accessed through the LiteAPI MCP server. Tools are dynamically registered when the MCP server connects. Common tools include search, get rates, and book.
71
+
72
+ ## Security Model
73
+
74
+ ### Credential Gateway
75
+ All API keys are stored in the agent's Vaultwarden vault. They are never exposed as environment variables or stored in config files. MCP servers receive credentials at startup via `vault:` env resolution.
76
+
77
+ ### Card Number Isolation
78
+ Virtual card numbers exist only within the Stripe client's internal functions during a payment flow. They are never:
79
+ - Returned to the model in tool outputs
80
+ - Included in nerves events or logs
81
+ - Stored in any persistent state
82
+ - Shown in chat messages
83
+
84
+ The model only sees card IDs (e.g., `ic_...`) and last-4 digits.
85
+
86
+ ### Trust Gating
87
+ - **Family trust required**: All profile, payment, and booking tools
88
+ - **Friend trust sufficient**: Flight search (read-only, no payment)
89
+ - **Stranger/acquaintance**: No commerce access
90
+
91
+ ### Vault Resolution Failures
92
+ When a `vault:` reference cannot be resolved for an MCP server:
93
+ - The specific server is skipped (not crashed)
94
+ - Other servers continue to start normally
95
+ - An error event is emitted with the specific resolution failure
96
+ - Error messages are actionable (e.g., "item not found", "field empty")
97
+
98
+ ## Verification Tiers
99
+
100
+ ### Tier 1: Real-Tested
101
+ - User profile vault CRUD (tested against live Vaultwarden)
102
+ - MCP credential injection (tested with real `vault:` env resolution)
103
+ - Tool registration and guardrail enforcement
104
+
105
+ ### Tier 2: Mocked
106
+ - Stripe Issuing API calls (mocked SDK)
107
+ - Duffel flight API calls (mocked HTTP)
108
+ - LiteAPI hotel API calls (MCP config only)
109
+ - Full booking flow (profile -> search -> card -> book -> confirm -> deactivate)
110
+ - Card number leakage verification
111
+
112
+ ### Post-Handoff
113
+ - Real Stripe Issuing card creation (requires live Stripe account with Issuing)
114
+ - Real Duffel booking (requires live API key)
115
+ - Real LiteAPI hotel search (requires live MCP server)
116
+ - Browser automation for Pattern B sites
@@ -0,0 +1,84 @@
1
+ # Commerce Setup Wizard
2
+
3
+ Step-by-step guide for setting up the agent's commerce infrastructure: payment, booking, and accommodation APIs.
4
+
5
+ last_verified: 2026-04-06
6
+
7
+ ## Prerequisites
8
+
9
+ - Agent vault must be set up (run `vault_setup` tool if not done)
10
+ - Vault must be reachable at the configured server URL
11
+
12
+ ## Step 1: Stripe Issuing (Payments)
13
+
14
+ 1. Create a Stripe account at https://dashboard.stripe.com
15
+ 2. Enable Stripe Issuing (requires business verification)
16
+ 3. Create a restricted API key at https://dashboard.stripe.com/apikeys
17
+ - Enable only `issuing_cards:write` and `issuing_cards:read` permissions
18
+ 4. Store the key in the vault: `credential_store stripe.com --password <restricted_key> --notes "Stripe Issuing restricted key"`
19
+
20
+ ### Verification
21
+ Run `stripe_list_cards` to verify the key works. Expected: empty list or existing cards.
22
+
23
+ ## Step 2: Duffel (Flights)
24
+
25
+ 1. Create a Duffel account at https://app.duffel.com
26
+ 2. Generate a sandbox API token at https://app.duffel.com/tokens
27
+ - Start with sandbox mode for testing
28
+ - Switch to live mode when ready for real bookings
29
+ 3. Store the key in the vault: `credential_store duffel.com --password <api_token> --notes "Duffel API token (sandbox)"`
30
+
31
+ ### Verification
32
+ Run `flight_search` with any route (e.g., SFO to JFK). Expected: list of flight offers.
33
+
34
+ ## Step 3: LiteAPI (Hotels)
35
+
36
+ 1. Create a LiteAPI account at https://dashboard.liteapi.travel
37
+ 2. Get your sandbox API key from the dashboard
38
+ 3. Store the key in the vault: `credential_store liteapi.travel --password <api_key> --notes "LiteAPI sandbox key"`
39
+ 4. Configure the MCP server in agent.json:
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "liteapi": {
44
+ "command": "npx",
45
+ "args": ["tsx", "src/index.ts"],
46
+ "cwd": "/path/to/liteapi-mcp-server",
47
+ "env": {
48
+ "LITEAPI_API_KEY": "vault:liteapi.travel/apiKey"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Verification
56
+ The LiteAPI MCP server will start automatically when the agent boots. Check agent logs for `mcp.connect_end` event for the liteapi server.
57
+
58
+ ## Step 4: User Profile
59
+
60
+ Store the human's travel profile:
61
+ ```
62
+ user_profile_store '{"legalName": {"first": "...", "last": "..."}, "email": "...", "phone": "...", "preferences": {}}'
63
+ ```
64
+
65
+ Optional but recommended fields: dateOfBirth, passport, driverLicense, addresses, loyaltyPrograms.
66
+
67
+ ## Self-Test
68
+
69
+ After setup, run the commerce self-test to verify all services:
70
+ - Stripe: creates and deactivates a test virtual card
71
+ - Duffel: runs a test flight search
72
+ - LiteAPI: verifies the API key is stored in the vault
73
+
74
+ The self-test reports per-service health with actionable error messages:
75
+ - "Flights working, hotels not yet -- LiteAPI key missing."
76
+ - "Your Duffel key returned 401. Verify it at app.duffel.com/tokens."
77
+
78
+ ## Security Model
79
+
80
+ - All API keys stored in the agent's Vaultwarden vault (not env vars)
81
+ - Card numbers never appear in model context or logs
82
+ - Virtual cards are single-use by default, deactivated after each transaction
83
+ - User profile access requires family trust level
84
+ - Vault credentials are resolved at MCP server startup, not at runtime