@suveren/gateway 0.2.7 → 0.2.9

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,173 @@
1
+ {
2
+ "id": "github.com/humanagencyprotocol/hap-profiles/charge@0.3",
3
+ "version": "0.3",
4
+ "name": "Charge",
5
+ "description": "Charge authority — governs charging customers: payments, refunds, subscriptions",
6
+
7
+ "frameSchema": {
8
+ "keyOrder": ["profile", "path", "amount_max", "currency", "action_type"],
9
+ "fields": {
10
+ "profile": { "type": "string", "required": true },
11
+ "path": { "type": "string", "required": true },
12
+ "amount_max": {
13
+ "type": "number",
14
+ "required": true,
15
+ "description": "Maximum monetary amount per transaction in currency units",
16
+ "constraint": { "type": "number", "enforceable": ["max"] }
17
+ },
18
+ "currency": {
19
+ "type": "string",
20
+ "required": true,
21
+ "description": "Permitted currency code",
22
+ "constraint": { "type": "string", "enforceable": ["enum"] }
23
+ },
24
+ "action_type": {
25
+ "type": "string",
26
+ "required": true,
27
+ "description": "Authorized financial operation (charge, refund, subscribe)",
28
+ "constraint": { "type": "string", "enforceable": ["enum"] }
29
+ },
30
+ "amount_daily_max": {
31
+ "type": "number",
32
+ "required": true,
33
+ "description": "Maximum cumulative charges per day in currency units",
34
+ "constraint": { "type": "number", "enforceable": ["max"] }
35
+ },
36
+ "amount_monthly_max": {
37
+ "type": "number",
38
+ "required": true,
39
+ "description": "Maximum cumulative charges per month in currency units",
40
+ "constraint": { "type": "number", "enforceable": ["max"] }
41
+ },
42
+ "transaction_count_daily_max": {
43
+ "type": "number",
44
+ "required": true,
45
+ "description": "Maximum number of transactions per day",
46
+ "constraint": { "type": "number", "enforceable": ["max"] }
47
+ }
48
+ }
49
+ },
50
+
51
+ "executionContextSchema": {
52
+ "fields": {
53
+ "action_type": {
54
+ "source": "declared",
55
+ "description": "Financial operation being performed",
56
+ "required": true,
57
+ "constraint": { "type": "string", "enforceable": ["enum"] }
58
+ },
59
+ "amount": {
60
+ "source": "declared",
61
+ "description": "Monetary amount in currency units",
62
+ "required": true,
63
+ "constraint": { "type": "number", "enforceable": ["max"] }
64
+ },
65
+ "currency": {
66
+ "source": "declared",
67
+ "description": "Currency code",
68
+ "required": true,
69
+ "constraint": { "type": "string", "enforceable": ["enum"] }
70
+ },
71
+ "amount_daily": {
72
+ "source": "cumulative",
73
+ "cumulativeField": "amount",
74
+ "window": "daily",
75
+ "description": "Running daily charge total (resolved from execution log)",
76
+ "required": true,
77
+ "constraint": { "type": "number", "enforceable": ["max"] }
78
+ },
79
+ "amount_monthly": {
80
+ "source": "cumulative",
81
+ "cumulativeField": "amount",
82
+ "window": "monthly",
83
+ "description": "Running monthly charge total (resolved from execution log)",
84
+ "required": true,
85
+ "constraint": { "type": "number", "enforceable": ["max"] }
86
+ },
87
+ "transaction_count_daily": {
88
+ "source": "cumulative",
89
+ "cumulativeField": "_count",
90
+ "window": "daily",
91
+ "description": "Running daily transaction count (resolved from execution log)",
92
+ "required": true,
93
+ "constraint": { "type": "number", "enforceable": ["max"] }
94
+ }
95
+ }
96
+ },
97
+
98
+ "executionPaths": {
99
+ "charge-routine": {
100
+ "description": "Day-to-day financial transactions within authorized bounds",
101
+ "requiredDomains": ["finance"],
102
+ "ttl": { "default": 86400, "max": 86400 }
103
+ },
104
+ "charge-reviewed": {
105
+ "description": "Large or unusual transactions requiring dual authorization",
106
+ "requiredDomains": ["finance", "compliance"],
107
+ "ttl": { "default": 14400, "max": 86400 }
108
+ }
109
+ },
110
+
111
+ "requiredGates": ["frame", "problem", "objective", "tradeoff", "commitment", "decision_owner"],
112
+
113
+ "gateQuestions": {
114
+ "problem": { "question": "What problem does this charge authority address?", "required": true },
115
+ "objective": { "question": "What outcome should this charge authority enable?", "required": true },
116
+ "tradeoffs": { "question": "What financial risks do you accept with this authority?", "required": true }
117
+ },
118
+
119
+ "ttl": { "default": 86400, "max": 86400 },
120
+ "retention_minimum": 7776000,
121
+
122
+ "toolGating": {
123
+ "default": {
124
+ "executionMapping": {},
125
+ "staticExecution": { "action_type": "read" }
126
+ },
127
+ "overrides": {
128
+ "create_payment_link": {
129
+ "executionMapping": {
130
+ "unit_amount": { "field": "amount", "divisor": 100 },
131
+ "currency": "currency"
132
+ },
133
+ "staticExecution": { "action_type": "charge" }
134
+ },
135
+ "create_price": {
136
+ "executionMapping": {
137
+ "unit_amount": { "field": "amount", "divisor": 100 },
138
+ "currency": "currency"
139
+ },
140
+ "staticExecution": { "action_type": "charge" }
141
+ },
142
+ "create_invoice_item": {
143
+ "executionMapping": {
144
+ "amount": { "field": "amount", "divisor": 100 },
145
+ "currency": "currency"
146
+ },
147
+ "staticExecution": { "action_type": "charge" }
148
+ },
149
+ "create_refund": {
150
+ "executionMapping": {
151
+ "amount": { "field": "amount", "divisor": 100 }
152
+ },
153
+ "staticExecution": { "action_type": "refund" }
154
+ },
155
+ "create_subscription": {
156
+ "executionMapping": {},
157
+ "staticExecution": { "action_type": "subscribe" }
158
+ },
159
+ "cancel_subscription": {
160
+ "executionMapping": {},
161
+ "staticExecution": { "action_type": "subscribe" }
162
+ },
163
+ "update_subscription": {
164
+ "executionMapping": {},
165
+ "staticExecution": { "action_type": "subscribe" }
166
+ },
167
+ "retrieve_balance": null,
168
+ "list_invoices": null,
169
+ "list_subscriptions": null,
170
+ "list_payment_methods": null
171
+ }
172
+ }
173
+ }
@@ -0,0 +1,200 @@
1
+ {
2
+ "id": "github.com/humanagencyprotocol/hap-profiles/charge@0.4",
3
+ "name": "Charge",
4
+ "version": "0.4",
5
+ "description": "Charge authority \u2014 governs charging customers: payments, refunds, subscriptions",
6
+ "boundsSchema": {
7
+ "keyOrder": [
8
+ "profile",
9
+ "amount_max",
10
+ "amount_daily_max",
11
+ "amount_monthly_max",
12
+ "transaction_count_daily_max"
13
+ ],
14
+ "fields": {
15
+ "profile": {
16
+ "type": "string",
17
+ "required": true
18
+ },
19
+ "amount_max": {
20
+ "type": "number",
21
+ "required": true,
22
+ "displayName": "Max per transaction",
23
+ "description": "Maximum monetary amount per transaction in currency units",
24
+ "unit": "currency:EUR",
25
+ "boundType": {
26
+ "kind": "per_transaction",
27
+ "of": "amount"
28
+ }
29
+ },
30
+ "amount_daily_max": {
31
+ "type": "number",
32
+ "required": true,
33
+ "displayName": "Daily charge limit",
34
+ "description": "Maximum cumulative charges per day in currency units",
35
+ "unit": "currency:EUR",
36
+ "boundType": {
37
+ "kind": "cumulative_sum",
38
+ "of": "amount",
39
+ "window": "daily"
40
+ }
41
+ },
42
+ "amount_monthly_max": {
43
+ "type": "number",
44
+ "required": true,
45
+ "displayName": "Monthly charge limit",
46
+ "description": "Maximum cumulative charges per month in currency units",
47
+ "unit": "currency:EUR",
48
+ "boundType": {
49
+ "kind": "cumulative_sum",
50
+ "of": "amount",
51
+ "window": "monthly"
52
+ }
53
+ },
54
+ "transaction_count_daily_max": {
55
+ "type": "number",
56
+ "required": true,
57
+ "displayName": "Daily transaction limit",
58
+ "description": "Maximum number of transactions per day",
59
+ "unit": "count",
60
+ "boundType": {
61
+ "kind": "cumulative_count",
62
+ "window": "daily"
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "contextSchema": {
68
+ "keyOrder": [
69
+ "currency",
70
+ "action_type"
71
+ ],
72
+ "fields": {
73
+ "currency": {
74
+ "type": "string",
75
+ "required": true,
76
+ "displayName": "Currency",
77
+ "description": "Permitted currency code",
78
+ "constraint": {
79
+ "type": "string",
80
+ "enforceable": [
81
+ "enum"
82
+ ]
83
+ },
84
+ "enum": [
85
+ "USD",
86
+ "EUR",
87
+ "GBP",
88
+ "CHF",
89
+ "JPY",
90
+ "CAD",
91
+ "AUD"
92
+ ]
93
+ },
94
+ "action_type": {
95
+ "type": "string",
96
+ "required": true,
97
+ "displayName": "Action type",
98
+ "description": "Authorized financial operation",
99
+ "constraint": {
100
+ "type": "string",
101
+ "enforceable": [
102
+ "enum"
103
+ ]
104
+ },
105
+ "enum": [
106
+ "charge",
107
+ "refund",
108
+ "subscribe"
109
+ ]
110
+ }
111
+ }
112
+ },
113
+ "executionContextSchema": {
114
+ "fields": {
115
+ "action_type": {
116
+ "source": "declared",
117
+ "description": "Financial operation being performed",
118
+ "required": true,
119
+ "constraint": {
120
+ "type": "string",
121
+ "enforceable": [
122
+ "enum"
123
+ ]
124
+ }
125
+ },
126
+ "amount": {
127
+ "source": "declared",
128
+ "description": "Monetary amount in currency units",
129
+ "required": true,
130
+ "constraint": {
131
+ "type": "number",
132
+ "enforceable": [
133
+ "max"
134
+ ]
135
+ }
136
+ },
137
+ "currency": {
138
+ "source": "declared",
139
+ "description": "Currency code",
140
+ "required": true,
141
+ "constraint": {
142
+ "type": "string",
143
+ "enforceable": [
144
+ "enum"
145
+ ]
146
+ }
147
+ },
148
+ "amount_daily": {
149
+ "source": "cumulative",
150
+ "cumulativeField": "amount",
151
+ "window": "daily",
152
+ "description": "Running daily charge total (resolved from execution log)",
153
+ "required": true,
154
+ "constraint": {
155
+ "type": "number",
156
+ "enforceable": [
157
+ "max"
158
+ ]
159
+ }
160
+ },
161
+ "amount_monthly": {
162
+ "source": "cumulative",
163
+ "cumulativeField": "amount",
164
+ "window": "monthly",
165
+ "description": "Running monthly charge total (resolved from execution log)",
166
+ "required": true,
167
+ "constraint": {
168
+ "type": "number",
169
+ "enforceable": [
170
+ "max"
171
+ ]
172
+ }
173
+ },
174
+ "transaction_count_daily": {
175
+ "source": "cumulative",
176
+ "cumulativeField": "_count",
177
+ "window": "daily",
178
+ "description": "Running daily transaction count (resolved from execution log)",
179
+ "required": true,
180
+ "constraint": {
181
+ "type": "number",
182
+ "enforceable": [
183
+ "max"
184
+ ]
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "requiredGates": [
190
+ "bounds",
191
+ "intent",
192
+ "commitment",
193
+ "decision_owner"
194
+ ],
195
+ "ttl": {
196
+ "default": 86400,
197
+ "max": 2592000
198
+ },
199
+ "retention_minimum": 7776000
200
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "id": "github.com/humanagencyprotocol/hap-profiles/customers@0.4",
3
+ "name": "Customer Management",
4
+ "version": "0.4",
5
+ "description": "Customer authority \u2014 governs CRM operations: contacts, activities, deals, tasks",
6
+ "boundsSchema": {
7
+ "keyOrder": [
8
+ "profile",
9
+ "write_daily_max",
10
+ "delete_daily_max"
11
+ ],
12
+ "fields": {
13
+ "profile": {
14
+ "type": "string",
15
+ "required": true
16
+ },
17
+ "write_daily_max": {
18
+ "type": "number",
19
+ "required": true,
20
+ "displayName": "Daily write limit",
21
+ "description": "Maximum CRM write operations per day (creates, updates)",
22
+ "unit": "count",
23
+ "boundType": {
24
+ "kind": "cumulative_count",
25
+ "window": "daily"
26
+ },
27
+ "paths": [
28
+ "customers-write"
29
+ ]
30
+ },
31
+ "delete_daily_max": {
32
+ "type": "number",
33
+ "required": true,
34
+ "displayName": "Daily delete limit",
35
+ "description": "Maximum CRM delete operations per day",
36
+ "unit": "count",
37
+ "boundType": {
38
+ "kind": "cumulative_count",
39
+ "window": "daily"
40
+ },
41
+ "paths": [
42
+ "customers-delete"
43
+ ]
44
+ }
45
+ }
46
+ },
47
+ "contextSchema": {
48
+ "keyOrder": [
49
+ "contact_type"
50
+ ],
51
+ "fields": {
52
+ "contact_type": {
53
+ "type": "string",
54
+ "required": true,
55
+ "displayName": "Contact types",
56
+ "description": "Permitted contact types",
57
+ "enum": [
58
+ "customer",
59
+ "lead",
60
+ "partner",
61
+ "vendor"
62
+ ],
63
+ "constraint": {
64
+ "type": "string",
65
+ "enforceable": [
66
+ "subset"
67
+ ]
68
+ }
69
+ }
70
+ }
71
+ },
72
+ "executionContextSchema": {
73
+ "fields": {
74
+ "contact_type": {
75
+ "source": "declared",
76
+ "description": "Contact type being accessed",
77
+ "required": true,
78
+ "constraint": {
79
+ "type": "string",
80
+ "enforceable": [
81
+ "subset"
82
+ ]
83
+ }
84
+ },
85
+ "write_count_daily": {
86
+ "source": "cumulative",
87
+ "cumulativeField": "_count",
88
+ "window": "daily",
89
+ "description": "Running daily write operation count",
90
+ "required": true,
91
+ "constraint": {
92
+ "type": "number",
93
+ "enforceable": [
94
+ "max"
95
+ ]
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "requiredGates": [
101
+ "bounds",
102
+ "intent",
103
+ "commitment",
104
+ "decision_owner"
105
+ ],
106
+ "ttl": {
107
+ "default": 86400,
108
+ "max": 31536000
109
+ },
110
+ "retention_minimum": 7776000
111
+ }
@@ -0,0 +1,119 @@
1
+ {
2
+ "id": "github.com/humanagencyprotocol/hap-profiles/email@0.3",
3
+ "version": "0.3",
4
+ "name": "Email",
5
+ "description": "Email authority — governs sending, drafting, and reading email via Gmail",
6
+
7
+ "frameSchema": {
8
+ "keyOrder": ["profile", "path", "recipient_max", "send_daily_max", "read_max_age_days", "read_daily_max"],
9
+ "fields": {
10
+ "profile": { "type": "string", "required": true },
11
+ "path": { "type": "string", "required": true },
12
+ "recipient_max": {
13
+ "type": "number",
14
+ "required": false,
15
+ "description": "Maximum recipients per email (send/draft paths)",
16
+ "constraint": { "type": "number", "enforceable": ["max"] }
17
+ },
18
+ "send_daily_max": {
19
+ "type": "number",
20
+ "required": false,
21
+ "description": "Maximum emails sent or drafted per day",
22
+ "constraint": { "type": "number", "enforceable": ["max"] }
23
+ },
24
+ "read_max_age_days": {
25
+ "type": "number",
26
+ "required": false,
27
+ "description": "Maximum age in days for email search (read path)",
28
+ "constraint": { "type": "number", "enforceable": ["max"] }
29
+ },
30
+ "read_daily_max": {
31
+ "type": "number",
32
+ "required": false,
33
+ "description": "Maximum emails read per day (read path)",
34
+ "constraint": { "type": "number", "enforceable": ["max"] }
35
+ }
36
+ }
37
+ },
38
+
39
+ "executionContextSchema": {
40
+ "fields": {
41
+ "recipient_count": {
42
+ "source": "declared",
43
+ "description": "Number of recipients in this email",
44
+ "required": true,
45
+ "constraint": { "type": "number", "enforceable": ["max"] }
46
+ },
47
+ "send_count_daily": {
48
+ "source": "cumulative",
49
+ "cumulativeField": "_count",
50
+ "window": "daily",
51
+ "description": "Running daily send/draft count (resolved from execution log)",
52
+ "required": true,
53
+ "constraint": { "type": "number", "enforceable": ["max"] }
54
+ }
55
+ }
56
+ },
57
+
58
+ "executionPaths": {
59
+ "email-draft": {
60
+ "description": "Create email drafts for human review before sending",
61
+ "requiredDomains": ["communications"],
62
+ "ttl": { "default": 86400, "max": 86400 }
63
+ },
64
+ "email-send": {
65
+ "description": "Send emails directly within authorized bounds",
66
+ "requiredDomains": ["communications"],
67
+ "ttl": { "default": 14400, "max": 86400 }
68
+ },
69
+ "email-read": {
70
+ "description": "Read and search inbox within time and volume bounds",
71
+ "requiredDomains": ["communications"],
72
+ "ttl": { "default": 86400, "max": 86400 }
73
+ }
74
+ },
75
+
76
+ "requiredGates": ["frame", "problem", "objective", "tradeoff", "commitment", "decision_owner"],
77
+
78
+ "gateQuestions": {
79
+ "problem": { "question": "What problem does this email authority address?", "required": true },
80
+ "objective": { "question": "What outcome should this email authority enable?", "required": true },
81
+ "tradeoffs": { "question": "What risks do you accept with this email authority?", "required": true }
82
+ },
83
+
84
+ "ttl": { "default": 86400, "max": 86400 },
85
+ "retention_minimum": 7776000,
86
+
87
+ "toolGating": {
88
+ "default": {
89
+ "executionMapping": {},
90
+ "staticExecution": { "recipient_count": 0 }
91
+ },
92
+ "overrides": {
93
+ "send_message": {
94
+ "executionMapping": {
95
+ "to": "recipient_count"
96
+ },
97
+ "staticExecution": {}
98
+ },
99
+ "create_draft": {
100
+ "executionMapping": {
101
+ "to": "recipient_count"
102
+ },
103
+ "staticExecution": {}
104
+ },
105
+ "send_draft": {
106
+ "executionMapping": {},
107
+ "staticExecution": { "recipient_count": 1 }
108
+ },
109
+ "list_messages": null,
110
+ "get_message": null,
111
+ "get_attachment": null,
112
+ "list_drafts": null,
113
+ "get_draft": null,
114
+ "delete_draft": null,
115
+ "list_labels": null,
116
+ "get_profile": null
117
+ }
118
+ }
119
+ }