@zeyos/client 0.1.0

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.
Files changed (110) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +458 -0
  4. package/agents/README.md +66 -0
  5. package/agents/shared/business-app-benchmarks.md +111 -0
  6. package/agents/shared/zeyos-entity-map.md +142 -0
  7. package/agents/shared/zeyos-entity-reference.md +570 -0
  8. package/agents/shared/zeyos-query-patterns.md +89 -0
  9. package/agents/zeyos-account-intelligence/SKILL.md +34 -0
  10. package/agents/zeyos-account-intelligence/agents/openai.yaml +4 -0
  11. package/agents/zeyos-account-intelligence/references/workflows.md +84 -0
  12. package/agents/zeyos-billing-insights/SKILL.md +41 -0
  13. package/agents/zeyos-billing-insights/agents/openai.yaml +4 -0
  14. package/agents/zeyos-billing-insights/references/workflows.md +106 -0
  15. package/agents/zeyos-campaign-and-outreach/SKILL.md +44 -0
  16. package/agents/zeyos-campaign-and-outreach/agents/openai.yaml +4 -0
  17. package/agents/zeyos-campaign-and-outreach/references/workflows.md +100 -0
  18. package/agents/zeyos-collaboration-and-activity/SKILL.md +37 -0
  19. package/agents/zeyos-collaboration-and-activity/agents/openai.yaml +4 -0
  20. package/agents/zeyos-collaboration-and-activity/references/workflows.md +104 -0
  21. package/agents/zeyos-collections-and-dunning/SKILL.md +46 -0
  22. package/agents/zeyos-collections-and-dunning/agents/openai.yaml +4 -0
  23. package/agents/zeyos-collections-and-dunning/references/workflows.md +132 -0
  24. package/agents/zeyos-commerce-and-inventory/SKILL.md +38 -0
  25. package/agents/zeyos-commerce-and-inventory/agents/openai.yaml +4 -0
  26. package/agents/zeyos-commerce-and-inventory/references/workflows.md +101 -0
  27. package/agents/zeyos-mail-operations/SKILL.md +35 -0
  28. package/agents/zeyos-mail-operations/agents/openai.yaml +4 -0
  29. package/agents/zeyos-mail-operations/references/workflows.md +110 -0
  30. package/agents/zeyos-notes-and-sops/SKILL.md +31 -0
  31. package/agents/zeyos-notes-and-sops/agents/openai.yaml +4 -0
  32. package/agents/zeyos-notes-and-sops/references/workflows.md +85 -0
  33. package/agents/zeyos-platform-and-schema/SKILL.md +37 -0
  34. package/agents/zeyos-platform-and-schema/agents/openai.yaml +4 -0
  35. package/agents/zeyos-platform-and-schema/references/workflows.md +97 -0
  36. package/agents/zeyos-work-management/SKILL.md +45 -0
  37. package/agents/zeyos-work-management/agents/openai.yaml +4 -0
  38. package/agents/zeyos-work-management/references/workflows.md +148 -0
  39. package/docs/01-api-reference/01-data-retrieval.md +601 -0
  40. package/docs/01-api-reference/02-authentication.md +288 -0
  41. package/docs/01-api-reference/03-resources.md +270 -0
  42. package/docs/01-api-reference/04-schema.md +539 -0
  43. package/docs/01-api-reference/_category_.json +9 -0
  44. package/docs/02-javascript-client/01-getting-started.md +146 -0
  45. package/docs/02-javascript-client/02-authentication.md +287 -0
  46. package/docs/02-javascript-client/03-making-requests.md +572 -0
  47. package/docs/02-javascript-client/04-practical-guide.md +348 -0
  48. package/docs/02-javascript-client/_category_.json +9 -0
  49. package/docs/03-cli/01-getting-started.md +219 -0
  50. package/docs/03-cli/02-commands.md +407 -0
  51. package/docs/03-cli/03-configuration.md +220 -0
  52. package/docs/03-cli/_category_.json +9 -0
  53. package/docs/04-agent-workflows/00-coding-agents.md +35 -0
  54. package/docs/04-agent-workflows/01-agent-quickstart.md +147 -0
  55. package/docs/04-agent-workflows/02-agent-recipes.md +109 -0
  56. package/docs/04-agent-workflows/03-cli-coverage-and-escalation.md +65 -0
  57. package/docs/04-agent-workflows/_category_.json +9 -0
  58. package/docs/04-sample-apps/01-kanban.md +89 -0
  59. package/docs/04-sample-apps/02-crm.md +81 -0
  60. package/docs/04-sample-apps/03-dashboard.md +80 -0
  61. package/docs/04-sample-apps/_category_.json +9 -0
  62. package/docs/05-tutorials/00-application-developers.md +43 -0
  63. package/docs/05-tutorials/01-integration-architecture.md +60 -0
  64. package/docs/05-tutorials/02-build-your-own-zeyos-frontend.md +517 -0
  65. package/docs/05-tutorials/03-server-side-integrations.md +185 -0
  66. package/docs/05-tutorials/_category_.json +9 -0
  67. package/docs/intro.md +197 -0
  68. package/openapi/api.json +24308 -0
  69. package/openapi/auth.json +415 -0
  70. package/openapi/dbref.json +56223 -0
  71. package/openapi/oauth2.json +781 -0
  72. package/openapi/sdk.json +949 -0
  73. package/openapi/views.txt +642 -0
  74. package/package.json +49 -0
  75. package/samples/crm/README.md +28 -0
  76. package/samples/crm/index.html +327 -0
  77. package/samples/crm/js/api.js +208 -0
  78. package/samples/crm/js/auth.js +61 -0
  79. package/samples/crm/js/main.js +545 -0
  80. package/samples/crm/js/state.js +90 -0
  81. package/samples/crm/js/ui.js +51 -0
  82. package/samples/dashboard/README.md +28 -0
  83. package/samples/dashboard/index.html +280 -0
  84. package/samples/dashboard/js/api.js +197 -0
  85. package/samples/dashboard/js/auth.js +59 -0
  86. package/samples/dashboard/js/main.js +382 -0
  87. package/samples/dashboard/js/state.js +81 -0
  88. package/samples/dashboard/js/ui.js +48 -0
  89. package/samples/kanban/README.md +28 -0
  90. package/samples/kanban/index.html +263 -0
  91. package/samples/kanban/js/api.js +152 -0
  92. package/samples/kanban/js/auth.js +59 -0
  93. package/samples/kanban/js/constants.js +40 -0
  94. package/samples/kanban/js/kanban.js +246 -0
  95. package/samples/kanban/js/main.js +362 -0
  96. package/samples/kanban/js/modals.js +474 -0
  97. package/samples/kanban/js/settings.js +82 -0
  98. package/samples/kanban/js/state.js +118 -0
  99. package/samples/kanban/js/ui.js +49 -0
  100. package/scripts/generate-client.mjs +344 -0
  101. package/src/generated/operations.js +9772 -0
  102. package/src/generated/schema.js +8982 -0
  103. package/src/index.js +85 -0
  104. package/src/runtime/client.js +1208 -0
  105. package/src/runtime/error.js +29 -0
  106. package/src/runtime/http.js +174 -0
  107. package/src/runtime/request-shape.js +35 -0
  108. package/src/runtime/schema.js +206 -0
  109. package/src/runtime/suggest.js +74 -0
  110. package/src/runtime/token-store.js +105 -0
@@ -0,0 +1,111 @@
1
+ # Business App Benchmarks For ZeyOS Agents
2
+
3
+ This file summarizes how established business platforms model activities, timelines, collaboration spaces, and collections workflows. Use it to set better default assumptions for ZeyOS agents.
4
+
5
+ ## Source Set
6
+
7
+ - [Salesforce Trailhead: Collaborate with Everyone](https://trailhead.salesforce.com/content/learn/modules/chatter_basics/chatter_basics_collaborate)
8
+ - [Salesforce Help: Access Salesforce Records in Slack Channels](https://help.salesforce.com/s/articleView?id=slack.salesforce_record_access_slack.htm&type=5)
9
+ - [Odoo Documentation: Activities](https://www.odoo.com/documentation/19.0/applications/essentials/activities.html)
10
+ - [Odoo Documentation: Channels](https://www.odoo.com/documentation/19.0/applications/productivity/discuss/team_communication.html)
11
+ - [Odoo Documentation: Follow-up on Invoices](https://www.odoo.com/documentation/19.0/applications/finance/accounting/payments/follow_up.html)
12
+ - [SAP Help: Dunning](https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/99fb46a79ab241d5984df80fe7a9aa32/4df4cd53d7667514e10000000a174cb4.html)
13
+ - [SAP Help: SAP Collections Management](https://help.sap.com/docs/SAP_ERP/d7d4594de25b40e895b13d63b17437bb/7401d553088f4308e10000000a174cb4.html)
14
+ - [SAP Help: Analysis of Receivables in Connection with SAP Collections Management](https://help.sap.com/doc/saphelp_scm700_ehp02/7.0.2/en-US/c5/63652eb3b34e97ba6f9fefcebf5d36/content.htm)
15
+ - [Workday: Business Process Framework Datasheet](https://forms.workday.com/en-us/reports/business-process-framework-datasheet/form.html)
16
+ - [Workday Everywhere for Slack and Microsoft Teams](https://www.workday.com/en-us/products/workday-everywhere.html)
17
+ - [Microsoft Dynamics 365: Timeline Wall and Activities](https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/basics/activities-activity-feeds?view=op-9-1)
18
+
19
+ ## Stable Cross-Platform Patterns
20
+
21
+ ### 1. Activities Are Smaller Than Tasks Or Projects
22
+
23
+ - Salesforce lets users turn collaboration posts into tasks.
24
+ - Odoo has scheduled activities directly on records.
25
+ - Dynamics treats activities as record-level work and reminders.
26
+ - Workday routes work as inbox tasks inside business processes.
27
+
28
+ Implication for ZeyOS:
29
+
30
+ - Treat `actionsteps` as record-bound activities or follow-ups.
31
+ - Prefer `tasks` for broader delivery work.
32
+ - Prefer `projects` for governed multi-record initiatives.
33
+
34
+ ### 2. Mature Systems Keep A Record Timeline
35
+
36
+ - Salesforce record pages surface feed tracking, posts, comments, and tasks.
37
+ - Odoo chatter keeps notes, messages, followers, and activities on the record.
38
+ - Dynamics uses a timeline to combine notes, posts, and activities.
39
+ - Workday is less social, but still centers process history and in-context tasks around the record or process step.
40
+
41
+ Implication for ZeyOS:
42
+
43
+ - Treat `records`, `comments`, `files`, and `events` as a likely user-facing timeline layer.
44
+ - When the user asks for "what happened recently?", start there before over-querying operational tables.
45
+
46
+ ### 3. Collaboration Spaces And Record Feeds Are Separate
47
+
48
+ - Salesforce distinguishes record feeds from Slack channels and groups.
49
+ - Odoo distinguishes chatter on a business record from Discuss channels.
50
+ - Dynamics distinguishes the record timeline from broader collaboration tooling.
51
+
52
+ Implication for ZeyOS:
53
+
54
+ - Treat `channels` as shared collaboration spaces.
55
+ - Treat `entities2channels` as the bridge between a business record and a collaboration room.
56
+ - Do not collapse channels into tags or categories unless instance evidence supports that.
57
+
58
+ ### 4. Followers Mean Attention, Not Ownership
59
+
60
+ - Salesforce users follow records to receive updates.
61
+ - Odoo followers receive record updates in chatter.
62
+ - Dynamics and adjacent CRMs use subscriptions or following similarly.
63
+
64
+ Implication for ZeyOS:
65
+
66
+ - Treat `follows` as watcher or notification intent.
67
+ - Do not confuse a follower with the assignee, owner, or permission holder.
68
+
69
+ ### 5. Collections Is Stage-Based And Worklist-Driven
70
+
71
+ - SAP models dunning with procedures, levels, and specialist worklists.
72
+ - SAP Collections Management prioritizes overdue receivables and assigns them to collectors.
73
+ - Odoo follow-up runs can send letters, emails, SMS, or create activities depending on the configured level.
74
+
75
+ Implication for ZeyOS:
76
+
77
+ - Separate:
78
+ - receivable exposure in `transactions`
79
+ - cash received in `payments`
80
+ - collection stage in `dunning`
81
+ - collector next step in `actionsteps` or other operational work
82
+ - Collection answers should report both balance state and follow-up stage.
83
+
84
+ ### 6. Process Systems Favor Explicit Responsibility
85
+
86
+ - Workday business processes push named approval, review, and action tasks to users.
87
+ - SAP collections assigns worklist items to collection specialists or groups.
88
+ - Odoo activities always carry an assigned user and deadline.
89
+
90
+ Implication for ZeyOS:
91
+
92
+ - Favor `assigneduser`, `duedate`, and status when choosing which entity best represents a next action.
93
+ - If the user asks "who should act next?", prefer the entity with explicit assignee and due date over looser discussion artifacts.
94
+
95
+ ## Recommended Default Interpretations For ZeyOS
96
+
97
+ - `actionsteps`: scheduled activities or follow-ups
98
+ - `tasks`: broader execution work
99
+ - `tickets`: service or issue work
100
+ - `records` + `comments` + `files` + `events`: timeline/feed layer
101
+ - `channels`: collaboration rooms or shared streams
102
+ - `follows`: subscriptions/watchers
103
+ - `dunning`: collection-stage object
104
+
105
+ ## Enhancements This Benchmark Supports
106
+
107
+ - Add a dedicated collaboration and activity skill for `records`, `comments`, `files`, `channels`, and `follows`.
108
+ - Route "what happened on X?" questions through a timeline workflow instead of only querying tickets and tasks.
109
+ - Prefer `actionsteps` for promised next actions on accounts, invoices, and tickets.
110
+ - Strengthen collections answers with stage, assignee, and next-step language.
111
+ - Treat record feed questions and channel questions as related but distinct workflows.
@@ -0,0 +1,142 @@
1
+ # ZeyOS Entity Map
2
+
3
+ Use this file when a question spans more than one business area.
4
+
5
+ This is the high-level relationship map. For the source-backed inventory, read [zeyos-entity-reference.md](./zeyos-entity-reference.md), which is derived from [../../openapi/dbref.json](../../openapi/dbref.json) and [../../openapi/api.json](../../openapi/api.json).
6
+
7
+ The names below are dbref/DB-table nouns used to describe relationships. They are **not** the
8
+ `@zeyos/client` operationIds. Several diverge (e.g. `dunning` -> `listDunningNotices`,
9
+ `dunning2transactions` -> `listDunningToTransactions`, `pricelists2accounts` ->
10
+ `listPriceListsToAccounts`, `mailinglists` -> `listMailingLists`). Before constructing a call, map
11
+ the noun to its operationId via [zeyos-entity-reference.md](./zeyos-entity-reference.md#entity-noun-to-rest-operationid).
12
+
13
+ ## Work Graph
14
+
15
+ - `projects` are the top-level work containers.
16
+ - `tickets` link to either an `account` or a `project`.
17
+ - `tasks` link to either a `ticket` or a `project`.
18
+ - `actionsteps` are smaller follow-up work items linked to a `task`, `ticket`, or `account`, with an optional `transaction`.
19
+ - `assigneduser` appears on projects, tickets, tasks, transactions, documents, notes, and payments.
20
+
21
+ Implication:
22
+
23
+ - To answer project-workload questions, you often need `tasks`, `tickets`, and sometimes `actionsteps`.
24
+ - To infer project activity from tasks, follow `task.project` directly or infer it through `task.ticket -> ticket.project`.
25
+ - Account or transaction follow-up work can live in `actionsteps` even when there is no standalone task.
26
+
27
+ ## Customer Graph
28
+
29
+ - `accounts` are the main company/customer records.
30
+ - `contacts` are people linked to accounts.
31
+ - `addresses` add typed billing and shipping address records.
32
+ - `opportunities` add pipeline state and expected commercial value.
33
+ - `contracts` add signed or active commercial commitments.
34
+ - `pricelists2accounts` maps account-specific pricing.
35
+ - `users` are system identities and may not match contact names directly.
36
+
37
+ Implication:
38
+
39
+ - Human prompts such as "customer XYZ" often resolve through `accounts`.
40
+ - Human prompts such as "Max Power" may require checking both `users` and `contacts`.
41
+ - Customer 360 answers often need multiple follow-up queries rather than one joined query.
42
+
43
+ ## Communication Graph
44
+
45
+ - `messages` link directly to `ticket`, `opportunity`, `mailinglist`, and `reference`.
46
+ - `messages` do not expose a direct `account` foreign key in the documented schema.
47
+ - `mailingrecipients` link outbound messages to `participants`.
48
+ - Email context often has to be inferred from `sender_email`, `to_email`, or linked tickets/opportunities.
49
+
50
+ Implication:
51
+
52
+ - For "recent mails from customer XYZ", resolve customer email addresses first, then search messages.
53
+ - Use `reference`, `messageid`, and `subject` to reconstruct threads.
54
+ - For mailing or campaign questions, go through `mailinglist -> messages -> mailingrecipients -> participants`.
55
+
56
+ ## Outreach Graph
57
+
58
+ - `campaigns` define outreach initiatives and status windows.
59
+ - `mailinglists` belong to campaigns and define sender-facing communication groups.
60
+ - `participants` belong either to a `campaign` or a `mailinglist`.
61
+ - `messages` can point to a `mailinglist`.
62
+ - `mailingrecipients` connect outbound messages to individual participants.
63
+
64
+ Implication:
65
+
66
+ - Audience definition and actual message delivery are different layers.
67
+ - To answer "who received this campaign mailing?", resolve the campaign, then the mailing list, then the messages, then the recipients.
68
+
69
+ ## Finance Graph
70
+
71
+ - `transactions` are the main billing and procurement records.
72
+ - `payments` link either to a `transaction` or directly to an `account`.
73
+ - `dunning` stores reminder and notice records for overdue receivables.
74
+ - `dunning2transactions` links collection notices back to the covered invoices.
75
+ - `items` appear in product catalogs and transaction line-item JSON.
76
+ - `pricelists`, `prices`, and `pricelists2accounts` shape effective commercial pricing.
77
+ - `documents` can represent invoice-like business documents, but `transactions` are the better source for monetary analysis.
78
+
79
+ Implication:
80
+
81
+ - Use `transactions` for invoice value, credits, and billing pipeline questions.
82
+ - Use `payments` for cash movement and settlement questions.
83
+ - Use `dunning` and `dunning2transactions` when the question is about collection stage, notices, or reminder fees.
84
+ - Use `expand: ['items']` or the raw JSON field when line-item analysis matters.
85
+
86
+ ## Commerce Graph
87
+
88
+ - `items` are the catalog anchor.
89
+ - `prices` belong to items and price lists.
90
+ - `pricelists2accounts` applies price lists to customers.
91
+ - `stocktransactions` move item quantities across `storages`.
92
+ - `suppliers` link items to vendor accounts.
93
+
94
+ Implication:
95
+
96
+ - "What price does customer XYZ get?" usually needs account resolution, price-list resolution, then item pricing.
97
+ - "What stock do we have?" is often an aggregation over stock movements, not a single scalar field.
98
+
99
+ ## Platform Graph
100
+
101
+ - `applications` own app-level assets.
102
+ - `resources`, `services`, and `weblets` describe runtime, automation, and UI surfaces.
103
+ - `groups`, `groups2users`, and `permissions` shape access.
104
+ - `customfields` and `objects` extend the schema.
105
+
106
+ Implication:
107
+
108
+ - Builder and admin questions often require platform entities rather than business entities.
109
+ - The schema often reveals structure even when product semantics remain instance-specific.
110
+
111
+ ## Collaboration Graph
112
+
113
+ - `records` are the generic activity and posting wrapper tied to an `entity` and `index`.
114
+ - `comments` attach to a `record`.
115
+ - `files` can attach to either a `record` or a `comment`.
116
+ - `channels` group records, and `entities2channels` map business records into channels.
117
+ - `follows`, `likes`, and `events` add watchers, reactions, and timeline-style activity.
118
+
119
+ Implication:
120
+
121
+ - Questions like "what happened on this project recently?" may require `records`, `comments`, `files`, and `events`, not only tickets and tasks.
122
+ - This layer looks powerful in the schema, but the product importance still needs confirmation per instance.
123
+
124
+ ## Knowledge Graph
125
+
126
+ - `notes` store plain text and are the easiest source for direct summarization.
127
+ - `documents` store formal file-like artifacts and metadata such as `documentnum`, `filename`, and status.
128
+ - `files` are attachment records linked to a `record` or `comment`.
129
+
130
+ Implication:
131
+
132
+ - Prefer `notes` when the user wants readable text now.
133
+ - Prefer `documents` when the user wants the official or final SOP artifact.
134
+ - Prefer `files` only when the question is explicitly about attachments.
135
+
136
+ ## Ambiguity Patterns
137
+
138
+ - "Worked on" is not the same as logged time. The documented schema shows assignment and modification timestamps, not timesheets.
139
+ - "Revenue" can mean invoiced value, net revenue, gross revenue, or cash received.
140
+ - "Latest SOP" can mean most recently modified, most recently finalized, or the document currently in force.
141
+
142
+ Always state which interpretation you used.