oneie 2.0.3 → 2.0.5

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 (75) hide show
  1. package/CLAUDE.md +220 -29
  2. package/LICENSE.md +84 -0
  3. package/README.md +489 -931
  4. package/folders.yaml +78 -17
  5. package/one/.obsidian/workspace.json +6 -6
  6. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
  7. package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
  8. package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
  9. package/one/events/GROUPS-MIGRATION.md +625 -0
  10. package/one/events/INSTALL-TESTS.md +293 -0
  11. package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
  12. package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
  13. package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
  14. package/one/events/INTEGRATION-SUMMARY.md +653 -0
  15. package/one/events/MIGRATION-REPORT.md +435 -0
  16. package/one/events/MIGRATION.md +69 -0
  17. package/one/events/README-archived.md +519 -0
  18. package/one/events/TEST-SUMMARY.md +393 -0
  19. package/one/events/TESTS-QUICK-REF.md +262 -0
  20. package/one/groups/groups.md +543 -0
  21. package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
  22. package/one/knowledge/architecture-any-backend.md +1366 -0
  23. package/one/knowledge/docs/flow.md +0 -0
  24. package/one/knowledge/ontology-documentation.md +18 -18
  25. package/one/knowledge/ontology.md +154 -143
  26. package/one/knowledge/ontology.md.backup +2822 -0
  27. package/one/knowledge/ontology.yaml +87 -87
  28. package/one/knowledge/provider-creation-guide.md +1064 -0
  29. package/one/knowledge/todo.md +251 -0
  30. package/one/license.md +84 -0
  31. package/one/things/CHECKLIST.md +356 -0
  32. package/one/things/ONE.md +510 -0
  33. package/one/things/{cli.md → cli/cli.md} +27 -4
  34. package/one/things/features/2-1-dataprovider-interface.md +2358 -0
  35. package/one/things/features/2-2-config-system.md +3075 -0
  36. package/one/things/features/2-3-effectts-services.md +1498 -0
  37. package/one/things/features/2-4-react-hooks.md +2120 -0
  38. package/one/things/features/2-5-auth-migration.md +2046 -0
  39. package/one/things/features/2-6-dashboard-migration.md +1985 -0
  40. package/one/things/features/2-7-alternative-providers.md +2505 -0
  41. package/one/things/features/2-7-implementation-report.md +680 -0
  42. package/one/things/features/2-cli.md +39 -39
  43. package/one/things/features/2-design.md +1738 -0
  44. package/one/things/features/2-tests.md +520 -0
  45. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
  46. package/one/things/features/DECOUPLING.md +272 -0
  47. package/one/things/features/DEPLOYMENT.md +452 -0
  48. package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
  49. package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
  50. package/one/things/features/improve.md +843 -0
  51. package/one/things/features/remove-convex-deps.md +45 -0
  52. package/one/things/features/top-features.md +79 -0
  53. package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
  54. package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
  55. package/one/things/plans/3-groups.md +502 -0
  56. package/one/things/plans/backend-agnostic-frontend.md +323 -0
  57. package/one/things/plans/deploy-to-cloudflare.md +581 -0
  58. package/one/things/plans/organizations-to-groups.md +705 -0
  59. package/one/things/plans/release.md +432 -0
  60. package/one/things/products/ontology.md +1 -1
  61. package/one/things/system.md +600 -0
  62. package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
  63. package/one/things/tests/2-1-test-analysis.md +496 -0
  64. package/one/things/vision/elegant-interface.md +214 -0
  65. package/package.json +1 -1
  66. package/one/organisation/organisation.md +0 -438
  67. package/one/repomix-output.md +0 -92634
  68. /package/one/{things → connections}/agentkit.md +0 -0
  69. /package/one/{things → connections}/copilotkit.md +0 -0
  70. /package/one/{organisation → groups}/one.md +0 -0
  71. /package/one/{organisation → groups}/revenue.md +0 -0
  72. /package/one/{organisation → groups}/strategy.md +0 -0
  73. /package/one/{organisation → groups}/vision.md +0 -0
  74. /package/one/things/{cli-code.md → cli/cli-code.md} +0 -0
  75. /package/one/things/{cli-compiler-code.md → cli/cli-compiler-code.md} +0 -0
@@ -1,7 +1,7 @@
1
1
  # ONE Platform - Ontology Specification (YAML)
2
2
 
3
3
  version: 2.0.0
4
- status: Complete - Reality-Aware Architecture
4
+ status: Complete - Groups-Based Reality Model
5
5
  principle: This ontology models reality in six dimensions. All protocols map TO this ontology via metadata.
6
6
 
7
7
  # ======================================================================
@@ -9,13 +9,13 @@ principle: This ontology models reality in six dimensions. All protocols map TO
9
9
  # ======================================================================
10
10
 
11
11
  dimensions:
12
- - name: organizations
13
- description: Multi-tenant isolation boundary - who owns what at org level
14
- purpose: Partition the system for multi-tenant scale
12
+ - name: groups
13
+ description: Multi-tenant isolation boundary with hierarchical nesting - who owns what at group level
14
+ purpose: Partition the system with perfect isolation, supporting nested groups (groups within groups)
15
15
 
16
16
  - name: people
17
- description: Authorization & governance - platform owner, org owners
18
- purpose: Define who can do what. People direct organizations, customize AI agents, and govern access
17
+ description: Authorization & governance - platform owner, group owners
18
+ purpose: Define who can do what. People direct groups, customize AI agents, and govern access
19
19
 
20
20
  - name: things
21
21
  description: Every "thing" - users, agents, content, tokens, courses
@@ -35,60 +35,60 @@ dimensions:
35
35
 
36
36
  golden_rule: "If you can't map your feature to these 6 dimensions, you're thinking about it wrong."
37
37
 
38
- simplicity: "ONE is six dimensions — organizations partition, people authorize, things exist, connections relate, events record, and knowledge understands. Everything composes from these building blocks."
38
+ simplicity: "ONE is six dimensions — groups partition, people authorize, things exist, connections relate, events record, and knowledge understands. Everything composes from these building blocks."
39
39
 
40
40
  # ======================================================================
41
- # ORGANIZATIONS: The Isolation Boundary
41
+ # GROUPS: The Isolation Boundary with Nesting
42
42
  # ======================================================================
43
43
 
44
- organizations:
44
+ groups:
45
45
  structure:
46
- _id: Id<'organizations'>
46
+ _id: Id<'groups'>
47
+ slug: string # REQUIRED: URL identifier (/group/slug)
47
48
  name: string # REQUIRED: Display name
48
- slug: string # REQUIRED: URL identifier (/org/slug)
49
- domain: string? # OPTIONAL: Custom domain
50
- logo: string? # OPTIONAL: Organization logo
49
+ type:
50
+ - friend_circle
51
+ - business
52
+ - community
53
+ - dao
54
+ - government
55
+ - organization # Legacy type for backward compatibility
56
+ parentGroupId: Id<'groups'>? # OPTIONAL: Parent group for nesting
51
57
  description: string? # OPTIONAL: About text
58
+ metadata: Record<string, any>
59
+ settings:
60
+ visibility:
61
+ - public
62
+ - private
63
+ joinPolicy:
64
+ - open
65
+ - invite_only
66
+ - approval_required
67
+ plan:
68
+ - starter
69
+ - pro
70
+ - enterprise
71
+ limits:
72
+ users: number
73
+ storage: number # GB
74
+ apiCalls: number
52
75
  status:
53
76
  - active
54
- - suspended
55
- - trial
56
- - cancelled
57
- plan:
58
- - starter
59
- - pro
60
- - enterprise
61
- limits:
62
- users: number
63
- storage: number # GB
64
- apiCalls: number
65
- inference: number # Monthly LLM calls
66
- usage:
67
- users: number
68
- storage: number
69
- apiCalls: number
70
- inference: number
71
- billing:
72
- customerId: string? # Stripe customer
73
- subscriptionId: string?
74
- settings:
75
- allowSignups: boolean
76
- requireEmailVerification: boolean
77
- enableTwoFactor: boolean
77
+ - archived
78
78
  createdAt: number
79
79
  updatedAt: number
80
- trialEndsAt: number?
81
80
 
82
81
  common_fields:
83
- identity: [name, slug]
84
- web: [slug, name, logo, description, domain]
85
- operations: [status, plan, limits, usage, settings]
82
+ identity: [slug, name]
83
+ web: [slug, name, description]
84
+ operations: [status, type, settings, parentGroupId]
86
85
 
87
86
  why_matters:
88
- - Multi-Tenant Isolation: Each org's data is completely separate
89
- - Resource Quotas: Control costs and usage per organization
90
- - Custom Branding: Each org can have unique frontend/domain
91
- - Billing Flexibility: Per-org subscriptions and revenue sharing
87
+ - Multi-Tenant Isolation: Each group's data is completely separate
88
+ - Hierarchical Nesting: Groups can contain sub-groups for complex organizations
89
+ - Flexible Types: From friend circles to DAOs to governments
90
+ - Resource Quotas: Control costs and usage per group
91
+ - Privacy Control: Groups can be public or private with controlled access
92
92
 
93
93
  # ======================================================================
94
94
  # PEOPLE: Authorization & Governance
@@ -102,14 +102,14 @@ people:
102
102
  displayName: string # REQUIRED: Display name
103
103
  role:
104
104
  - platform_owner
105
- - org_owner
106
- - org_user
105
+ - group_owner
106
+ - group_user
107
107
  - customer
108
- organizationId: Id<'organizations'>? # Current/default org
108
+ groupId: Id<'groups'>? # Current/default group
109
109
  permissions: string[]? # Additional permissions
110
110
  bio: string? # OPTIONAL: About text
111
111
  avatar: string? # OPTIONAL: Profile image
112
- organizations: Id<'organizations'>[] # All orgs this person belongs to
112
+ groups: Id<'groups'>[] # All groups this person belongs to
113
113
  createdAt: number
114
114
  updatedAt: number
115
115
 
@@ -117,24 +117,24 @@ people:
117
117
  identity: [email, username, displayName]
118
118
  auth: [email, username, role, permissions]
119
119
  web: [username, displayName, avatar, bio]
120
- governance: [role, organizationId, organizations, permissions]
120
+ governance: [role, groupId, groups, permissions]
121
121
 
122
122
  roles:
123
123
  platform_owner:
124
124
  description: Owns the ONE Platform
125
125
  revenue: 100% from platform-level services
126
- access: Can access all organizations (support/debugging)
127
- capabilities: Creates new organizations
126
+ access: Can access all groups (support/debugging)
127
+ capabilities: Creates new groups
128
128
 
129
- org_owner:
130
- description: Owns/manages one or more organizations
131
- control: Users, permissions, billing within org
129
+ group_owner:
130
+ description: Owns/manages one or more groups
131
+ control: Users, permissions, billing within group
132
132
  customization: AI agents and frontend
133
133
  revenue: Revenue sharing with platform
134
134
 
135
- org_user:
136
- description: Works within an organization
137
- permissions: Limited permissions (defined by org owner)
135
+ group_user:
136
+ description: Works within a group
137
+ permissions: Limited permissions (defined by group owner)
138
138
  capabilities: Can create content, run agents (within quotas)
139
139
 
140
140
  customer:
@@ -144,7 +144,7 @@ people:
144
144
 
145
145
  why_matters:
146
146
  - Authorization: Every action must have an actor (person)
147
- - Governance: Org owners control who can do what
147
+ - Governance: Group owners control who can do what
148
148
  - Audit Trail: Events log who did what when
149
149
  - Customization: People teach AI agents their preferences
150
150
 
@@ -250,10 +250,10 @@ things:
250
250
 
251
251
  types:
252
252
  core:
253
- - creator # Human creator (role: platform_owner, org_owner, org_user, customer)
253
+ - creator # Human creator (role: platform_owner, group_owner, group_user, customer)
254
254
  - ai_clone # Digital twin of creator
255
255
  - audience_member # Fan/user (role: customer)
256
- - organization # Multi-tenant organization
256
+ - organization # DEPRECATED: Legacy - Use type='organization' group instead
257
257
 
258
258
  business_agents:
259
259
  - strategy_agent # Vision, planning, OKRs
@@ -357,13 +357,13 @@ things:
357
357
  totalRevenue: number
358
358
  role:
359
359
  - platform_owner
360
- - org_owner
361
- - org_user
360
+ - group_owner
361
+ - group_user
362
362
  - customer
363
- organizationId: Id<"things">?
363
+ groupId: Id<"groups">?
364
364
  permissions: string[]?
365
365
 
366
- organization:
366
+ organization: # DEPRECATED: Legacy type for backward compatibility
367
367
  name: string
368
368
  slug: string
369
369
  domain: string?
@@ -554,14 +554,14 @@ connections:
554
554
  balance: 1000
555
555
  acquiredAt: timestamp
556
556
 
557
- org_membership:
558
- description: User is member of organization with role
557
+ group_membership:
558
+ description: User is member of group with role
559
559
  example:
560
560
  fromThingId: userId
561
- toThingId: organizationId
561
+ toThingId: groupId
562
562
  relationshipType: member_of
563
563
  metadata:
564
- role: org_owner # or org_user
564
+ role: group_owner # or group_user
565
565
  permissions: [read, write, admin]
566
566
  invitedBy: userId?
567
567
  joinedAt: timestamp
@@ -619,12 +619,12 @@ events:
619
619
  - two_factor_enabled
620
620
  - two_factor_disabled
621
621
 
622
- organization_events:
623
- - organization_created
624
- - organization_updated
625
- - user_invited_to_org
626
- - user_joined_org
627
- - user_removed_from_org
622
+ group_events:
623
+ - group_created
624
+ - group_updated
625
+ - user_invited_to_group
626
+ - user_joined_group
627
+ - user_removed_from_group
628
628
 
629
629
  dashboard_ui_events:
630
630
  - dashboard_viewed
@@ -902,7 +902,7 @@ statistics:
902
902
  entity_lifecycle: 4
903
903
  user: 5
904
904
  authentication: 6
905
- organization: 5
905
+ group: 5
906
906
  dashboard_ui: 4
907
907
  ai_clone: 4
908
908
  agent: 4
@@ -949,7 +949,7 @@ philosophy:
949
949
 
950
950
  one_approach:
951
951
  - Map every feature to 6 dimensions
952
- - Organizations partition the space
952
+ - Groups partition the space
953
953
  - People authorize and govern
954
954
  - Things, connections, events flow from there
955
955
  - Knowledge understands it all
@@ -983,18 +983,18 @@ extensibility:
983
983
  # ======================================================================
984
984
 
985
985
  universal_fields:
986
- description: "Fields that EVERY person/org has for auth and web generation"
986
+ description: "Fields that EVERY person/group has for auth and web generation"
987
987
 
988
- organizations_require:
989
- identity: [name, slug] # Who they are + URL
990
- web: [slug, logo?, description?, domain?]
991
- operations: [status, plan, limits, usage]
988
+ groups_require:
989
+ identity: [slug, name] # Who they are + URL
990
+ web: [slug, name, description?]
991
+ operations: [status, type, settings, parentGroupId?]
992
992
 
993
993
  people_require:
994
994
  identity: [email, username, displayName] # Who they are + URL
995
995
  auth: [email, username, role] # Authentication
996
996
  web: [username, displayName, avatar?, bio?]
997
- governance: [role, organizationId?, organizations]
997
+ governance: [role, groupId?, groups]
998
998
 
999
999
  things_require:
1000
1000
  identity: [type, name] # What it is
@@ -1002,15 +1002,15 @@ universal_fields:
1002
1002
  status: enum # Visibility/state
1003
1003
 
1004
1004
  web_generation_pattern: |
1005
- Every person/org can be a website:
1006
- - Organizations: /org/{slug} → generated from org data
1005
+ Every person/group can be a website:
1006
+ - Groups: /group/{slug} → generated from group data
1007
1007
  - People: /{username} → generated from person data
1008
- - Things: Rendered in context of their owner (org or person)
1008
+ - Things: Rendered in context of their owner (group or person)
1009
1009
 
1010
1010
  Required for ANY web page:
1011
1011
  1. URL identifier (slug/username in properties)
1012
1012
  2. Display name (name field)
1013
- 3. Visual identity (logo/avatar in properties)
1013
+ 3. Visual identity (description in properties)
1014
1014
  4. Description (bio/description in properties)
1015
1015
  5. Visibility (status field)
1016
1016