arispay 0.1.6 → 0.1.7

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/cli.js CHANGED
@@ -191,10 +191,11 @@ ${bold("Connect your agent to ArisPay")}`);
191
191
  ${dim("How does your agent make payments?")}
192
192
  `);
193
193
  console.log(` ${cyan("[1]")} Platform ${dim("\u2014 Your app triggers payments on behalf of the agent")}`);
194
- console.log(` ${cyan("[2]")} Autonomous ${dim("\u2014 The agent decides when to pay, within spend limits you set")}
194
+ console.log(` ${cyan("[2]")} Autonomous ${dim("\u2014 The agent decides when to pay, within spend limits you set")}`);
195
+ console.log(` ${cyan("[3]")} Both ${dim("\u2014 Platform and autonomous, depending on the transaction")}
195
196
  `);
196
197
  const modeChoice = await prompt(` Enter choice ${dim("[1]")}: `);
197
- const mode = modeChoice === "2" ? "autonomous" : "platform";
198
+ const mode = modeChoice === "2" ? "autonomous" : modeChoice === "3" ? "both" : "platform";
198
199
  console.log(`
199
200
  ${dim("Connecting agent...")}`);
200
201
  try {
@@ -219,7 +220,7 @@ ${bold("Connect your agent to ArisPay")}`);
219
220
  console.log(` ${bold("Mode:")} ${a.mode || mode}`);
220
221
  console.log(` ${bold("Status:")} ${a.status}
221
222
  `);
222
- if (mode === "autonomous") {
223
+ if (mode === "autonomous" || mode === "both") {
223
224
  console.log(` ${bold("Set spend limits")}`);
224
225
  console.log(` ${dim("Autonomous agents need spend limits so they can only spend within bounds you control.")}
225
226
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arispay",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "SDK and CLI for enabling agent-initiated payments via Visa TAP + Fiserv",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/cli.ts CHANGED
@@ -222,10 +222,11 @@ async function wizardConnectAgent(client: ArisPayClient): Promise<void> {
222
222
 
223
223
  console.log(`\n ${dim('How does your agent make payments?')}\n`);
224
224
  console.log(` ${cyan('[1]')} Platform ${dim('— Your app triggers payments on behalf of the agent')}`);
225
- console.log(` ${cyan('[2]')} Autonomous ${dim('— The agent decides when to pay, within spend limits you set')}\n`);
225
+ console.log(` ${cyan('[2]')} Autonomous ${dim('— The agent decides when to pay, within spend limits you set')}`);
226
+ console.log(` ${cyan('[3]')} Both ${dim('— Platform and autonomous, depending on the transaction')}\n`);
226
227
 
227
228
  const modeChoice = await prompt(` Enter choice ${dim('[1]')}: `);
228
- const mode = modeChoice === '2' ? 'autonomous' : 'platform';
229
+ const mode = modeChoice === '2' ? 'autonomous' : modeChoice === '3' ? 'both' : 'platform';
229
230
 
230
231
  console.log(`\n ${dim('Connecting agent...')}`);
231
232
 
@@ -253,7 +254,7 @@ async function wizardConnectAgent(client: ArisPayClient): Promise<void> {
253
254
  console.log(` ${bold('Status:')} ${a.status}\n`);
254
255
 
255
256
  // Prompt for spend limits when autonomous
256
- if (mode === 'autonomous') {
257
+ if (mode === 'autonomous' || mode === 'both') {
257
258
  console.log(` ${bold('Set spend limits')}`);
258
259
  console.log(` ${dim('Autonomous agents need spend limits so they can only spend within bounds you control.')}\n`);
259
260