@deepraxis/cli 0.1.1-dev.69cffcf → 0.1.1-dev.78b913a

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/COMMANDS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Generated by `bun run commands`. DO NOT EDIT.
4
4
 
5
- 426 HTTP operations; 428 commands including aliases.
5
+ 434 HTTP operations; 436 commands including aliases.
6
6
 
7
7
  Environment: `PRAXIS_ENV=develop|production` (dev package defaults to `develop`; stable package defaults to `production`). No `--env` option.
8
8
 
@@ -36,6 +36,13 @@ Handwritten commands: `login`, `logout`, `whoami`, `org list`, `org switch <orga
36
36
  | `praxis agent customer auth access-token delete-current` | `agent.agents.customers.auth.accessTokens.deleteCurrent` | DELETE `/agent/v1/agents/{agent_id}/customers/auth/access_tokens/current` | `--agent` |
37
37
  | `praxis agent customer auth access-token renew create` | `agent.agents.customers.auth.accessTokens.renew.create` | POST `/agent/v1/agents/{agent_id}/customers/auth/access_tokens/renew` | `--agent` |
38
38
  | `praxis agent customer auth grant-code create` | `agent.agents.customers.auth.grantCodes.create` | POST `/agent/v1/agents/{agent_id}/customers/auth/grant_codes` | `--agent`, `--customer-id`, `--param-version`, `--origin`, `--expires-in`, `--max-session-seconds`, `--anonymous-access-token`, `--hosted` |
39
+ | `praxis agent customer block create` | `agent.agents.customers.block.create` | POST `/agent/v1/agents/{agent_id}/customers/{customer_id}/block` | `--agent`, `--customer` |
40
+ | `praxis agent customer delete <customer_id>` | `agent.agents.customers.delete` | DELETE `/agent/v1/agents/{agent_id}/customers/{customer_id}` | `--agent`, `--confirm` |
41
+ | `praxis agent customer get <customer_id>` | `agent.agents.customers.retrieve` | GET `/agent/v1/agents/{agent_id}/customers/{customer_id}` | `--agent` |
42
+ | `praxis agent customer get-deletion <customer_id>` | `agent.agents.customers.retrieveDeletion` | GET `/agent/v1/agents/{agent_id}/customers/{customer_id}/deletion` | `--agent` |
43
+ | `praxis agent customer list` | `agent.agents.customers.list` | GET `/agent/v1/agents/{agent_id}/customers` | `--agent`, `--param-limit`, `--page`, `--q`, `--type`, `--blocked` |
44
+ | `praxis agent customer revoke-token create` | `agent.agents.customers.revokeTokens.create` | POST `/agent/v1/agents/{agent_id}/customers/{customer_id}/revoke_tokens` | `--agent`, `--customer` |
45
+ | `praxis agent customer unblock create` | `agent.agents.customers.unblock.create` | POST `/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock` | `--agent`, `--customer` |
39
46
  | `praxis agent deployment archive <deployment_id>` | `agent.deployments.archive` | POST `/agent/v1/deployments/{deployment_id}/archive` | |
40
47
  | `praxis agent deployment create` | `agent.deployments.create` | POST `/agent/v1/deployments` | `--environment-id`, `--name`, `--description`, `--vault-ids` |
41
48
  | `praxis agent deployment get <deployment_id>` | `agent.deployments.retrieve` | GET `/agent/v1/deployments/{deployment_id}` | |
@@ -65,6 +72,7 @@ Handwritten commands: `login`, `logout`, `whoami`, `org list`, `org switch <orga
65
72
  | `praxis agent environment list` | `agent.environments.list` | GET `/agent/v1/environments` | `--include-archived`, `--param-limit`, `--page` |
66
73
  | `praxis agent environment update <environment_id>` | `agent.environments.update` | POST `/agent/v1/environments/{environment_id}` | `--description`, `--name` |
67
74
  | `praxis agent get <agent_id>` | `agent.agents.retrieve` | GET `/agent/v1/agents/{agent_id}` | `--param-version` |
75
+ | `praxis agent get-appearance <agent_id>` | `agent.agents.retrieveAppearance` | GET `/agent/v1/agents/{agent_id}/appearance` | |
68
76
  | `praxis agent list` | `agent.agents.list` | GET `/agent/v1/agents` | `--created-at-gte`, `--created-at-lte`, `--include-archived`, `--param-limit`, `--page`, `--kind` |
69
77
  | `praxis agent session archive <session_id>` | `agent.sessions.archive` | POST `/agent/v1/sessions/{session_id}/archive` | |
70
78
  | `praxis agent session background-task get-output <task_id>` | `agent.sessions.backgroundTasks.retrieveOutput` | GET `/agent/v1/sessions/{session_id}/background_tasks/{task_id}/output` | `--session`, `--offset`, `--max-bytes` |
package/dist/praxis.js CHANGED
@@ -451,6 +451,26 @@ current version; omit to apply the update unconditionally.`
451
451
  ]
452
452
  }
453
453
  },
454
+ {
455
+ resource: "agent.agents",
456
+ method: "retrieveAppearance",
457
+ summary: "Get agent appearance",
458
+ description: `Read the saved chat appearance of a service agent.
459
+
460
+ Agent Kit calls this from the page with a customer access token of this agent; your API key and console members can read it too. A token of another agent returns 404. The body is the same as the embed appearance read; a missing appearance returns the agent's own name and avatar only. Responses are private and cacheable for 60 seconds.`,
461
+ http: "GET",
462
+ path: "/agent/v1/agents/{agent_id}/appearance",
463
+ streaming: "no",
464
+ pagination: false,
465
+ pathParams: [
466
+ {
467
+ name: "agent_id",
468
+ sdkName: "agent_id",
469
+ description: "Service agent id from agent creation or listing; with a customer access token, the agent the token was issued for."
470
+ }
471
+ ],
472
+ query: []
473
+ },
454
474
  {
455
475
  resource: "agent.agents",
456
476
  method: "archive",
@@ -469,6 +489,61 @@ current version; omit to apply the update unconditionally.`
469
489
  ],
470
490
  query: []
471
491
  },
492
+ {
493
+ resource: "agent.agents.customers",
494
+ method: "list",
495
+ summary: "List customers",
496
+ description: `List the customers of a service agent, identified and anonymous, most recently seen first.
497
+
498
+ Call this from your backend with your API key, or from the console. Customers follow Shopify Admin customers (list, retrieve, block, sign-out and data deletion of the people who use your storefront), so that experience applies. The list includes customers who signed in but have not started a session yet, and customers recorded under your own ids by embed tokens before customer sign-in existed; an id first seen that way is identified unless it starts with anon_. Unlike Shopify, a customer can be anonymous: a visitor admitted with the publishable key gets an anon_ id, and when it later signs in with anonymous_access_token it is merged: merged_into names the identified customer, and its sessions count toward that customer. Filter with q (a case-sensitive customer id prefix), type (identified or anonymous) and blocked (true or false). limit is 1 to 100, default 20; reuse next_page with the same filters and limit. A customer access token gets 404. Example: GET /agent/v1/agents/agent_example/customers?type=identified&blocked=false&limit=50.`,
499
+ http: "GET",
500
+ path: "/agent/v1/agents/{agent_id}/customers",
501
+ streaming: "no",
502
+ pagination: false,
503
+ pathParams: [
504
+ {
505
+ name: "agent_id",
506
+ sdkName: "agent_id",
507
+ description: "Active service agent id from agent creation or listing."
508
+ }
509
+ ],
510
+ query: [
511
+ {
512
+ name: "limit",
513
+ type: "integer",
514
+ required: false,
515
+ description: "Maximum customers per page, 1 to 100; defaults to 20."
516
+ },
517
+ {
518
+ name: "page",
519
+ type: "string",
520
+ required: false,
521
+ description: "next_page from the previous response with the same q, type, blocked and limit."
522
+ },
523
+ {
524
+ name: "q",
525
+ type: "string",
526
+ required: false,
527
+ description: "Case-sensitive literal prefix of the customer id; omit for all customers."
528
+ },
529
+ {
530
+ name: "type",
531
+ type: "string",
532
+ enum: [
533
+ "identified",
534
+ "anonymous"
535
+ ],
536
+ required: false,
537
+ description: "Only identified or only anonymous customers; omit for both."
538
+ },
539
+ {
540
+ name: "blocked",
541
+ type: "boolean",
542
+ required: false,
543
+ description: "true for blocked customers only, false for customers who are not blocked; omit for both."
544
+ }
545
+ ]
546
+ },
472
547
  {
473
548
  resource: "agent.agents.customers.auth.accessTokens",
474
549
  method: "create",
@@ -625,6 +700,163 @@ Call this from your backend with your API key after your own login succeeds, the
625
700
  ]
626
701
  }
627
702
  },
703
+ {
704
+ resource: "agent.agents.customers",
705
+ method: "delete",
706
+ summary: "Delete customer data",
707
+ description: `Delete a customer's data from one service agent after explicit confirmation.
708
+
709
+ Develop only. Set confirm to the exact customer id; a missing or different confirm returns 400 naming the value to send. Returns 202 with a pending task id; poll the deletion endpoint. Concurrent requests reuse the unfinished task; retry DELETE after failure to resume it. Tokens are revoked and the customer is blocked before a seven-day recovery snapshot is verified; sessions including child sessions, conversation data, grants and feedback are then removed. A block that existed before stays; a temporary block is removed on success. File attachments are retained. Example: DELETE /agent/v1/agents/agent_example/customers/cus_8f2a91?confirm=cus_8f2a91.`,
710
+ http: "DELETE",
711
+ path: "/agent/v1/agents/{agent_id}/customers/{customer_id}",
712
+ streaming: "no",
713
+ pagination: false,
714
+ pathParams: [
715
+ {
716
+ name: "agent_id",
717
+ sdkName: "agent_id",
718
+ description: "Active service agent id from agent creation or listing."
719
+ },
720
+ {
721
+ name: "customer_id",
722
+ sdkName: "customer_id",
723
+ description: "Customer id from customer listing, or your own customer_id."
724
+ }
725
+ ],
726
+ query: [
727
+ {
728
+ name: "confirm",
729
+ type: "string",
730
+ required: true,
731
+ description: "Must equal the customer_id path parameter exactly, confirming the destructive deletion."
732
+ }
733
+ ]
734
+ },
735
+ {
736
+ resource: "agent.agents.customers",
737
+ method: "retrieve",
738
+ summary: "Get customer",
739
+ description: `Retrieve one customer of a service agent with its twenty most recently updated sessions.
740
+
741
+ Use the customer id from the list or your own customer_id. An unknown customer returns 404 CUSTOMER_NOT_FOUND, and so does a customer access token. Unlike Shopify, an identified customer's session_count, cost and recent_sessions include the sessions of anonymous customers merged into it; the merged anonymous customer still shows its own sessions and its merged_into.`,
742
+ http: "GET",
743
+ path: "/agent/v1/agents/{agent_id}/customers/{customer_id}",
744
+ streaming: "no",
745
+ pagination: false,
746
+ pathParams: [
747
+ {
748
+ name: "agent_id",
749
+ sdkName: "agent_id",
750
+ description: "Active service agent id from agent creation or listing."
751
+ },
752
+ {
753
+ name: "customer_id",
754
+ sdkName: "customer_id",
755
+ description: "Customer id from customer listing, or your own customer_id."
756
+ }
757
+ ],
758
+ query: []
759
+ },
760
+ {
761
+ resource: "agent.agents.customers.block",
762
+ method: "create",
763
+ summary: "Block customer",
764
+ description: `Block a customer and end every sign-in it has on this agent.
765
+
766
+ Blocks the customer, then ends every live sign-in the way logout does: each access token is revoked and its open event streams close. From then on grant_codes, access_tokens, renew and new sessions for this customer return CUSTOMER_BLOCKED until you unblock it. Idempotent: a repeat keeps the first block time and revokes whatever is still live. If credential revocation fails the request returns 502 and the customer stays blocked; retry to finish. An unknown customer returns 404 CUSTOMER_NOT_FOUND.`,
767
+ http: "POST",
768
+ path: "/agent/v1/agents/{agent_id}/customers/{customer_id}/block",
769
+ streaming: "no",
770
+ pagination: false,
771
+ pathParams: [
772
+ {
773
+ name: "agent_id",
774
+ sdkName: "agent_id",
775
+ description: "Active service agent id from agent creation or listing."
776
+ },
777
+ {
778
+ name: "customer_id",
779
+ sdkName: "customer_id",
780
+ description: "Customer id from customer listing, or your own customer_id."
781
+ }
782
+ ],
783
+ query: []
784
+ },
785
+ {
786
+ resource: "agent.agents.customers",
787
+ method: "retrieveDeletion",
788
+ summary: "Get customer deletion",
789
+ description: `Poll the latest deletion task of a customer, including after its data has been removed.
790
+
791
+ Use the same agent_id and customer id as the confirmed DELETE. Status is pending, snapshotting, deleting, done or failed. Counts are empty until a verified snapshot exists. snapshot_key is an operator recovery reference retained for seven days, not a download URL. A customer access token and a missing task return 404.`,
792
+ http: "GET",
793
+ path: "/agent/v1/agents/{agent_id}/customers/{customer_id}/deletion",
794
+ streaming: "no",
795
+ pagination: false,
796
+ pathParams: [
797
+ {
798
+ name: "agent_id",
799
+ sdkName: "agent_id",
800
+ description: "Active service agent id from agent creation or listing."
801
+ },
802
+ {
803
+ name: "customer_id",
804
+ sdkName: "customer_id",
805
+ description: "Customer id from customer listing, or your own customer_id."
806
+ }
807
+ ],
808
+ query: []
809
+ },
810
+ {
811
+ resource: "agent.agents.customers.revokeTokens",
812
+ method: "create",
813
+ summary: "Revoke customer tokens",
814
+ description: `Sign a customer out everywhere without blocking it.
815
+
816
+ Ends every live sign-in of the customer, revoking each access token and closing its open event streams; the customer can sign in again right away. Returns the number of access tokens this request revoked; a repeat returns 0. Credential revocation failure returns 502; retry to finish. An unknown customer returns 404 CUSTOMER_NOT_FOUND.`,
817
+ http: "POST",
818
+ path: "/agent/v1/agents/{agent_id}/customers/{customer_id}/revoke_tokens",
819
+ streaming: "no",
820
+ pagination: false,
821
+ pathParams: [
822
+ {
823
+ name: "agent_id",
824
+ sdkName: "agent_id",
825
+ description: "Active service agent id from agent creation or listing."
826
+ },
827
+ {
828
+ name: "customer_id",
829
+ sdkName: "customer_id",
830
+ description: "Customer id from customer listing, or your own customer_id."
831
+ }
832
+ ],
833
+ query: []
834
+ },
835
+ {
836
+ resource: "agent.agents.customers.unblock",
837
+ method: "create",
838
+ summary: "Unblock customer",
839
+ description: `Allow a blocked customer to sign in and start sessions again.
840
+
841
+ Idempotent. Access tokens revoked while the customer was blocked stay revoked; sign the customer in again with a new grant code. An unknown customer returns 404 CUSTOMER_NOT_FOUND.`,
842
+ http: "POST",
843
+ path: "/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock",
844
+ streaming: "no",
845
+ pagination: false,
846
+ pathParams: [
847
+ {
848
+ name: "agent_id",
849
+ sdkName: "agent_id",
850
+ description: "Active service agent id from agent creation or listing."
851
+ },
852
+ {
853
+ name: "customer_id",
854
+ sdkName: "customer_id",
855
+ description: "Customer id from customer listing, or your own customer_id."
856
+ }
857
+ ],
858
+ query: []
859
+ },
628
860
  {
629
861
  resource: "agent.agents.endUsers",
630
862
  method: "list",
@@ -18410,6 +18642,110 @@ var unblockEndUser = (options) => (options.client ?? client).post({
18410
18642
  url: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock",
18411
18643
  ...options
18412
18644
  });
18645
+ var listCustomers = (options) => (options.client ?? client).get({
18646
+ security: [{
18647
+ key: "BearerAuth",
18648
+ scheme: "bearer",
18649
+ type: "http"
18650
+ }, {
18651
+ key: "ApiKeyAuth",
18652
+ name: "X-API-Key",
18653
+ type: "apiKey"
18654
+ }],
18655
+ url: "/agent/v1/agents/{agent_id}/customers",
18656
+ ...options
18657
+ });
18658
+ var deleteCustomer = (options) => (options.client ?? client).delete({
18659
+ security: [{
18660
+ key: "BearerAuth",
18661
+ scheme: "bearer",
18662
+ type: "http"
18663
+ }, {
18664
+ key: "ApiKeyAuth",
18665
+ name: "X-API-Key",
18666
+ type: "apiKey"
18667
+ }],
18668
+ url: "/agent/v1/agents/{agent_id}/customers/{customer_id}",
18669
+ ...options
18670
+ });
18671
+ var getCustomer = (options) => (options.client ?? client).get({
18672
+ security: [{
18673
+ key: "BearerAuth",
18674
+ scheme: "bearer",
18675
+ type: "http"
18676
+ }, {
18677
+ key: "ApiKeyAuth",
18678
+ name: "X-API-Key",
18679
+ type: "apiKey"
18680
+ }],
18681
+ url: "/agent/v1/agents/{agent_id}/customers/{customer_id}",
18682
+ ...options
18683
+ });
18684
+ var getCustomerDeletion = (options) => (options.client ?? client).get({
18685
+ security: [{
18686
+ key: "BearerAuth",
18687
+ scheme: "bearer",
18688
+ type: "http"
18689
+ }, {
18690
+ key: "ApiKeyAuth",
18691
+ name: "X-API-Key",
18692
+ type: "apiKey"
18693
+ }],
18694
+ url: "/agent/v1/agents/{agent_id}/customers/{customer_id}/deletion",
18695
+ ...options
18696
+ });
18697
+ var blockCustomer = (options) => (options.client ?? client).post({
18698
+ security: [{
18699
+ key: "BearerAuth",
18700
+ scheme: "bearer",
18701
+ type: "http"
18702
+ }, {
18703
+ key: "ApiKeyAuth",
18704
+ name: "X-API-Key",
18705
+ type: "apiKey"
18706
+ }],
18707
+ url: "/agent/v1/agents/{agent_id}/customers/{customer_id}/block",
18708
+ ...options
18709
+ });
18710
+ var unblockCustomer = (options) => (options.client ?? client).post({
18711
+ security: [{
18712
+ key: "BearerAuth",
18713
+ scheme: "bearer",
18714
+ type: "http"
18715
+ }, {
18716
+ key: "ApiKeyAuth",
18717
+ name: "X-API-Key",
18718
+ type: "apiKey"
18719
+ }],
18720
+ url: "/agent/v1/agents/{agent_id}/customers/{customer_id}/unblock",
18721
+ ...options
18722
+ });
18723
+ var revokeCustomerTokens = (options) => (options.client ?? client).post({
18724
+ security: [{
18725
+ key: "BearerAuth",
18726
+ scheme: "bearer",
18727
+ type: "http"
18728
+ }, {
18729
+ key: "ApiKeyAuth",
18730
+ name: "X-API-Key",
18731
+ type: "apiKey"
18732
+ }],
18733
+ url: "/agent/v1/agents/{agent_id}/customers/{customer_id}/revoke_tokens",
18734
+ ...options
18735
+ });
18736
+ var getAgentAppearance = (options) => (options.client ?? client).get({
18737
+ security: [{
18738
+ key: "BearerAuth",
18739
+ scheme: "bearer",
18740
+ type: "http"
18741
+ }, {
18742
+ key: "ApiKeyAuth",
18743
+ name: "X-API-Key",
18744
+ type: "apiKey"
18745
+ }],
18746
+ url: "/agent/v1/agents/{agent_id}/appearance",
18747
+ ...options
18748
+ });
18413
18749
  var createCustomerGrantCode = (options) => (options.client ?? client).post({
18414
18750
  security: [{
18415
18751
  key: "BearerAuth",
@@ -24189,6 +24525,19 @@ function createAgent(transport) {
24189
24525
  grantCodes: {
24190
24526
  create: bind(transport, createCustomerGrantCode)
24191
24527
  }
24528
+ },
24529
+ block: {
24530
+ create: bind(transport, blockCustomer)
24531
+ },
24532
+ delete: bind(transport, deleteCustomer),
24533
+ list: bind(transport, listCustomers),
24534
+ retrieve: bind(transport, getCustomer),
24535
+ retrieveDeletion: bind(transport, getCustomerDeletion),
24536
+ revokeTokens: {
24537
+ create: bind(transport, revokeCustomerTokens)
24538
+ },
24539
+ unblock: {
24540
+ create: bind(transport, unblockCustomer)
24192
24541
  }
24193
24542
  },
24194
24543
  endUsers: {
@@ -24208,6 +24557,7 @@ function createAgent(transport) {
24208
24557
  },
24209
24558
  list: bind(transport, agentsList),
24210
24559
  retrieve: bind(transport, agentsRetrieve),
24560
+ retrieveAppearance: bind(transport, getAgentAppearance),
24211
24561
  unarchive: {
24212
24562
  create: bind(transport, unarchiveAgent)
24213
24563
  },
@@ -27041,7 +27391,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
27041
27391
  }
27042
27392
 
27043
27393
  // src/main.ts
27044
- var version = "0.1.1-dev.69cffcf";
27394
+ var version = "0.1.1-dev.78b913a";
27045
27395
  var commands = commandTree(operations);
27046
27396
  var manual = [["login"], ["logout"], ["whoami"], ["org", "list"], ["org", "switch"], ["api"], ["skill"]];
27047
27397
  function route(argv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepraxis/cli",
3
- "version": "0.1.1-dev.69cffcf",
3
+ "version": "0.1.1-dev.78b913a",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "praxis": "dist/praxis.js"