aweshare 0.7.7 → 0.7.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.
Files changed (45) hide show
  1. package/README.md +24 -14
  2. package/apps/agent/dist/config.d.ts +5 -1
  3. package/apps/agent/dist/config.js +1 -1
  4. package/apps/agent/dist/config.js.map +1 -1
  5. package/apps/agent/dist/connection.js +11 -0
  6. package/apps/agent/dist/connection.js.map +1 -1
  7. package/apps/agent/dist/table.js +7 -0
  8. package/apps/agent/dist/table.js.map +1 -1
  9. package/apps/consumer/dist/cli.js +9 -1
  10. package/apps/consumer/dist/cli.js.map +1 -1
  11. package/apps/consumer/dist/hub.d.ts +5 -0
  12. package/apps/consumer/dist/hub.js +7 -1
  13. package/apps/consumer/dist/hub.js.map +1 -1
  14. package/apps/consumer/dist/table.d.ts +23 -3
  15. package/apps/consumer/dist/table.js +63 -7
  16. package/apps/consumer/dist/table.js.map +1 -1
  17. package/apps/hub/dist/admin.js +32 -1
  18. package/apps/hub/dist/admin.js.map +1 -1
  19. package/apps/hub/dist/cli.js +84 -36
  20. package/apps/hub/dist/cli.js.map +1 -1
  21. package/apps/hub/dist/consumer.d.ts +49 -0
  22. package/apps/hub/dist/consumer.js +109 -7
  23. package/apps/hub/dist/consumer.js.map +1 -1
  24. package/apps/hub/dist/db.d.ts +22 -0
  25. package/apps/hub/dist/db.js +93 -2
  26. package/apps/hub/dist/db.js.map +1 -1
  27. package/apps/hub/dist/groups.d.ts +71 -40
  28. package/apps/hub/dist/groups.js +95 -103
  29. package/apps/hub/dist/groups.js.map +1 -1
  30. package/apps/hub/dist/local.js +19 -5
  31. package/apps/hub/dist/local.js.map +1 -1
  32. package/apps/hub/dist/server.d.ts +4 -3
  33. package/apps/hub/dist/server.js +98 -23
  34. package/apps/hub/dist/server.js.map +1 -1
  35. package/apps/hub/dist/table.d.ts +6 -0
  36. package/apps/hub/dist/table.js +6 -0
  37. package/apps/hub/dist/table.js.map +1 -1
  38. package/apps/hub/dist/tunnel.js +35 -1
  39. package/apps/hub/dist/tunnel.js.map +1 -1
  40. package/package.json +1 -1
  41. package/packages/producer-core/dist/catalog.d.ts +16 -0
  42. package/packages/producer-core/dist/catalog.js +47 -1
  43. package/packages/producer-core/dist/catalog.js.map +1 -1
  44. package/packages/protocol/dist/messages.d.ts +23 -0
  45. package/packages/protocol/dist/messages.js.map +1 -1
@@ -30,6 +30,25 @@ export interface Offering {
30
30
  * admits requests to this alias per it. Old hubs ignore unknown fields. */
31
31
  schedule?: ShareSchedule;
32
32
  }
33
+ /**
34
+ * A route group as its own producer declares it: one name in front of an
35
+ * ordered list of that producer's aliases. Groups travel with the register
36
+ * message, never with the hub's config — a producer owns its pools, so the
37
+ * hub cannot assemble one out of aliases their owner never offered to pool.
38
+ * `alias` must sit in the producer's own namespace (enforced by the hub),
39
+ * which makes the namespace the consent boundary.
40
+ */
41
+ export interface GroupDeclaration {
42
+ /** The group's callable alias, in the declaring producer's namespace. */
43
+ alias: string;
44
+ /** Ordered member aliases, all of them this producer's. */
45
+ members: string[];
46
+ /** Overrides; absent means inherit from the members (tokens summed,
47
+ * concurrency maxed). */
48
+ dailyTokens?: number;
49
+ maxConcurrentUsers?: number;
50
+ maxConcurrencyPerUser?: number;
51
+ }
33
52
  export type BackendState = 'ok' | 'unstable' | 'degraded';
34
53
  export interface BackendStatus {
35
54
  state: BackendState;
@@ -52,6 +71,10 @@ export interface BackendStatus {
52
71
  export interface RegisterMessage {
53
72
  type: 'register';
54
73
  offerings: Offering[];
74
+ /** Route groups this producer owns. Optional: an older agent registers
75
+ * offerings only, and the hub keeps whatever groups that producer
76
+ * declared before. */
77
+ groups?: GroupDeclaration[];
55
78
  }
56
79
  export interface HeartbeatMessage {
57
80
  type: 'heartbeat';
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAA;AAI7B,MA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