@shivaedev/identity 0.34.0 → 0.34.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.34.1 - 2026-11-20
4
+
5
+ ### Changed
6
+
7
+ - Update `@shivaedev/access` from 0.6.5 to 0.6.6.
8
+ - Update `@shivaedev/contract` from 0.49.0 to 0.50.0.
9
+ - Update `@shivaedev/errors` from 0.13.1 to 0.14.0.
10
+ - Update `@shivaedev/rate-limit` from 0.6.14 to 0.6.15.
11
+ - Update `@shivaedev/sql` from 0.51.0 to 0.52.0.
12
+
3
13
  ## 0.34.0 - 2026-11-20
4
14
 
5
15
  ### Added
package/README.md CHANGED
@@ -57,7 +57,7 @@ const Save = command("save", {
57
57
  return `${id}: ${title}`;
58
58
  },
59
59
  });
60
- export const Account = defineModule({ name: "account", operations: [Save], requires: [], subject: selfSubject, wire: accountWire });
60
+ export const Account = defineModule({ name: "account", operations: [Save], subject: selfSubject, wire: accountWire });
61
61
  ```
62
62
 
63
63
  For delegation, use `accountSubject` with an application permission and a typed refusal:
@@ -93,7 +93,7 @@ export const actsAsCoach = delegatedSubject({
93
93
  deny: (client) => new NotYourClient({ client }),
94
94
  });
95
95
 
96
- export const Training = defineModule({ name: "training", operations: [Plan, SavePlan], requires: [SqlClient.SqlClient], subject: actsAsCoach });
96
+ export const Training = defineModule({ name: "training", operations: [Plan, SavePlan], subject: actsAsCoach, wire: trainingWire });
97
97
  ```
98
98
 
99
99
  On the server the application answers one question with a service whose id is the declaration's `service`. Its `allows` operation receives a `DelegationRequest`, `{ subject, module, operation, kind }`, and returns whether the actor may make that call; it may fail with an identity failure, such as `AuthUnavailable`, or the declared refusal. It reads the actor from `CurrentViewer` in `@shivaedev/contract/readPolicy.ts`, which the guard sets to the actor for each question; `CurrentViewer` is a reference, so the service lists only its own dependencies in `requires` and is registered once in the host's `services`:
@@ -857,7 +857,7 @@ An operation on one record reads that record's owner and uses the application's
857
857
 
858
858
  ### Session-scoped contract keys
859
859
 
860
- For self-only features, define the module with `keyScope: "session"` and `subject: selfSubject`, as in `defineModule({ keyScope: "session", name: "preferences", operations, requires, subject: selfSubject, wire })`. The client registry owns cache isolation. Server subscriptions use the same plain record, list and bucket keys as repository writes. Handlers read their owner from `Subject`, and queries need no additional session keys. Matching keys trigger each subscriber's read policy before it can receive a hint or result; shared dependencies can cause authorized rechecks across accounts.
860
+ For self-only features, define the module with `keyScope: "session"` and `subject: selfSubject`, as in `defineModule({ keyScope: "session", name: "preferences", operations, subject: selfSubject, wire })`. The client registry owns cache isolation. Server subscriptions use the same plain record, list and bucket keys as repository writes. Handlers read their owner from `Subject`, and queries need no additional session keys. Matching keys trigger each subscriber's read policy before it can receive a hint or result; shared dependencies can cause authorized rechecks across accounts.
861
861
 
862
862
  The host's generated `$changes` handler accepts `{ queries: [{ query: "get", payload: { id: "theme" } }] }` and resolves the declared query dependencies during that subscription invocation. It accepts no physical subscription keys or caller-selected scope.
863
863
 
@@ -27,7 +27,18 @@ export declare const AccountPreferences: import("@shivaedev/contract/defineModul
27
27
  readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
28
28
  readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
29
29
  readonly AuthUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").AuthUnavailable;
30
- }, import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, "@shivaedev/identity/AccountPreferencesStore" | Subject>>] & readonly import("@shivaedev/contract/defineModule.ts").ModuleOperation[], readonly [import("effect/Context").Service<"@shivaedev/identity/AccountPreferencesStore", Readonly<{
30
+ }, import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, "@shivaedev/identity/AccountPreferencesStore" | Subject>>] & readonly import("@shivaedev/contract/defineModule.ts").ModuleOperation[], import("@shivaedev/contract/moduleProof.ts").ModuleRequirements<readonly [import("@shivaedev/contract/servedOperation.ts").ServedQuery<"get", import("effect/Schema").Void, import("effect/Schema").Void, {
31
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
32
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
33
+ }, never, never, import("effect/Effect").Effect<{
34
+ readonly locale: string;
35
+ readonly timezone: string;
36
+ readonly units: "imperial" | "metric";
37
+ }, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, "@shivaedev/identity/AccountPreferencesStore" | Subject>>, import("@shivaedev/contract/servedOperation.ts").ServedCommandOf<"set", {
38
+ readonly locale: import("effect/Schema").NonEmptyString;
39
+ readonly timezone: import("effect/Schema").String;
40
+ readonly units: import("effect/Schema").Literals<readonly ["metric", "imperial"]>;
41
+ }, import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, never> | import("effect/Effect").Effect<Readonly<{
31
42
  readonly capture: (id: string, values: {
32
43
  readonly locale: string;
33
44
  readonly timezone: string;
@@ -43,9 +54,34 @@ export declare const AccountPreferences: import("@shivaedev/contract/defineModul
43
54
  readonly timezone: string;
44
55
  readonly units: "imperial" | "metric";
45
56
  }) => import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, never>;
46
- }>> & {
47
- readonly layer: import("effect/Layer").Layer<"@shivaedev/identity/AccountPreferencesStore", never, "@shivaedev/identity/AccountPreferenceRows">;
48
- }], never, {
57
+ }>, never, "@shivaedev/identity/AccountPreferencesStore"> | import("effect/Effect").Effect<{
58
+ readonly id: import("#subject.ts").SubjectId;
59
+ }, never, Subject>, void>, import("@shivaedev/contract/servedOperation.ts").ServedCommandOf<"capture", {
60
+ readonly locale: import("effect/Schema").NonEmptyString;
61
+ readonly timezone: import("effect/Schema").String;
62
+ readonly units: import("effect/Schema").Literals<readonly ["metric", "imperial"]>;
63
+ }, import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, never> | import("effect/Effect").Effect<Readonly<{
64
+ readonly capture: (id: string, values: {
65
+ readonly locale: string;
66
+ readonly timezone: string;
67
+ readonly units: "imperial" | "metric";
68
+ }) => import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, never>;
69
+ readonly get: (id: string) => import("effect/Effect").Effect<{
70
+ readonly locale: string;
71
+ readonly timezone: string;
72
+ readonly units: "imperial" | "metric";
73
+ }, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, never>;
74
+ readonly set: (id: string, values: {
75
+ readonly locale: string;
76
+ readonly timezone: string;
77
+ readonly units: "imperial" | "metric";
78
+ }) => import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, never>;
79
+ }>, never, "@shivaedev/identity/AccountPreferencesStore"> | import("effect/Effect").Effect<{
80
+ readonly id: import("#subject.ts").SubjectId;
81
+ }, never, Subject>, void>], never, {
82
+ error: import("effect/Schema").Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>;
83
+ middleware: import("effect/Effect").Effect<import("#subject.ts").SubjectMiddleware<never, never>, never, import("#subject.ts").SubjectResolver>;
84
+ }>, never, {
49
85
  error: import("effect/Schema").Union<readonly [typeof import("@shivaedev/errors/taxonomy.ts").Unauthorized, typeof import("@shivaedev/errors/taxonomy.ts").AuthUnavailable, typeof import("@shivaedev/errors/taxonomy.ts").Forbidden, typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>;
50
86
  middleware: import("effect/Effect").Effect<import("#subject.ts").SubjectMiddleware<never, never>, never, import("#subject.ts").SubjectResolver>;
51
87
  }, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"AccountPreferences.d.ts","sourceRoot":"","sources":["../src/AccountPreferences.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAe,MAAM,aAAa,CAAC;AA4BnD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAM7B,CAAC"}
1
+ {"version":3,"file":"AccountPreferences.d.ts","sourceRoot":"","sources":["../src/AccountPreferences.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAe,MAAM,aAAa,CAAC;AA4BnD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAK7B,CAAC"}
@@ -30,7 +30,6 @@ const CapturePreferences = command("capture", {
30
30
  export const AccountPreferences = defineModule({
31
31
  name: "identity.accountPreferences",
32
32
  operations: [GetPreferences, SetPreferences, CapturePreferences],
33
- requires: [AccountPreferencesStore],
34
33
  subject: selfSubject,
35
34
  wire: identityAccountPreferencesWire,
36
35
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AccountPreferences.js","sourceRoot":"","sources":["../src/AccountPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,cAAc,GAAG,KAAK,CAAC,K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D,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,OAAO,CAAC,SAAS,EAAE;IAC7C,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC;IAC/C,OAAO,EAAE,uBAAuB,CAAC,MAAM;IACvC,CAAC,GAAG,CAAC,MAAM;QACV,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC;QAC9B,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC;IAC9C,IAAI,EAAE,6BAA6B;IACnC,UAAU,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,kBAAkB,CAAC;IAChE,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,8BAA8B;CACpC,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { Schema } from "effect";
2
- import { SqlClient } from "effect/sql";
3
2
  import { SessionsPermission } from "#sessionPermissions.ts";
4
3
  export declare const Sessions: import("@shivaedev/contract/defineModule.ts").Module<"identity.sessions", readonly [import("@shivaedev/contract/servedOperation.ts").ServedQuery<"list", Schema.Struct<{
5
4
  readonly cursor: Schema.optionalKey<Schema.Struct<{
@@ -28,7 +27,7 @@ export declare const Sessions: import("@shivaedev/contract/defineModule.ts").Mod
28
27
  readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
29
28
  readonly AuthUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").AuthUnavailable;
30
29
  readonly Forbidden: typeof import("@shivaedev/errors/taxonomy.ts").Forbidden;
31
- }, never, never, import("effect/Effect").Effect<import("#signedInSessions.ts").SessionList, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable | import("@shivaedev/errors/taxonomy.ts").Forbidden, import("./identity.ts").SessionUser | SqlClient.SqlClient>>, import("@shivaedev/contract/servedOperation.ts").ServedCommand<"revoke", Schema.Struct<{
30
+ }, never, never, import("effect/Effect").Effect<import("#signedInSessions.ts").SessionList, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable | import("@shivaedev/errors/taxonomy.ts").Forbidden, import("./identity.ts").SessionUser | import("effect/sql/SqlClient").SqlClient>>, import("@shivaedev/contract/servedOperation.ts").ServedCommand<"revoke", Schema.Struct<{
32
31
  id: Schema.String;
33
32
  }>, Schema.Void, {
34
33
  readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
@@ -36,5 +35,16 @@ export declare const Sessions: import("@shivaedev/contract/defineModule.ts").Mod
36
35
  readonly AuthUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").AuthUnavailable;
37
36
  readonly Forbidden: typeof import("@shivaedev/errors/taxonomy.ts").Forbidden;
38
37
  readonly NotFound: typeof import("@shivaedev/errors/taxonomy.ts").NotFound;
39
- }, import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable | import("@shivaedev/errors/taxonomy.ts").Forbidden | import("@shivaedev/errors/taxonomy.ts").NotFound, import("./identity.ts").SessionUser | SqlClient.SqlClient>>] & readonly import("@shivaedev/contract/defineModule.ts").ModuleOperation[], readonly [import("effect/Context").Service<SqlClient.SqlClient, SqlClient.SqlClient>], typeof SessionsPermission, undefined, undefined>;
38
+ }, import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable | import("@shivaedev/errors/taxonomy.ts").Forbidden | import("@shivaedev/errors/taxonomy.ts").NotFound, import("./identity.ts").SessionUser | import("effect/sql/SqlClient").SqlClient>>] & readonly import("@shivaedev/contract/defineModule.ts").ModuleOperation[], import("@shivaedev/contract/moduleProof.ts").ModuleRequirements<readonly [import("@shivaedev/contract/servedOperation.ts").ServedQuery<"list", Schema.Struct<{
39
+ readonly cursor: Schema.optionalKey<Schema.Struct<{
40
+ readonly id: Schema.String;
41
+ readonly lastActivityAt: Schema.DateTimeUtcFromString;
42
+ }>>;
43
+ readonly limit: Schema.Number;
44
+ }>, Schema.Void, {
45
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
46
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
47
+ }, never, never, import("effect/Effect").Effect<import("#signedInSessions.ts").SessionList, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable | import("@shivaedev/errors/taxonomy.ts").Forbidden, import("./identity.ts").SessionUser | import("effect/sql/SqlClient").SqlClient>>, import("@shivaedev/contract/servedOperation.ts").ServedCommandOf<"revoke", {
48
+ id: Schema.String;
49
+ }, import("effect/Effect").Effect<undefined, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable | import("@shivaedev/errors/taxonomy.ts").Forbidden | import("@shivaedev/errors/taxonomy.ts").NotFound, import("./identity.ts").SessionUser | import("effect/sql/SqlClient").SqlClient>, void>], typeof SessionsPermission, undefined>, typeof SessionsPermission, undefined, undefined>;
40
50
  //# sourceMappingURL=Sessions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sessions.d.ts","sourceRoot":"","sources":["../src/Sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAmB5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wdAMnB,CAAC"}
1
+ {"version":3,"file":"Sessions.d.ts","sourceRoot":"","sources":["../src/Sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAmB5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6XAKnB,CAAC"}
package/dist/Sessions.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Schema } from "effect";
2
- import { SqlClient } from "effect/sql";
3
2
  import { defineModule } from "@shivaedev/contract/defineModule.ts";
4
3
  import { command, query } from "@shivaedev/contract/operation.ts";
5
4
  import { identitySessionsWire } from "#generated/Sessions.ts";
@@ -24,7 +23,6 @@ export const Sessions = defineModule({
24
23
  middleware: SessionsPermission,
25
24
  name: "identity.sessions",
26
25
  operations: [ListSessions, RevokeSession],
27
- requires: [SqlClient.SqlClient],
28
26
  wire: identitySessionsWire,
29
27
  });
30
28
  //# sourceMappingURL=Sessions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sessions.js","sourceRoot":"","sources":["../src/Sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,EAAE;IAClC,OAAO,EAAE,gBAAgB,CAAC,MAAM;IAChC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC,GAAG,CAAC,KAAK;QACT,OAAO,KAAK,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC,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OAAO,KAAK,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,EAAE;IACvC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;IACrC,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE;IAC9B,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE;QACV,KAAK,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC;IACpC,UAAU,EAAE,kBAAkB;IAC9B,IAAI,EAAE,mBAAmB;IACzB,UAAU,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;IACzC,IAAI,EAAE,oBAAoB;CAC1B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/identity",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "description": "Request identity, sessions, transport trust and permission enforcement for Effect RPC servers",
5
5
  "keywords": [
6
6
  "effect"
@@ -46,25 +46,25 @@
46
46
  "README.md"
47
47
  ],
48
48
  "dependencies": {
49
- "@shivaedev/access": "0.6.5",
49
+ "@shivaedev/access": "0.6.6",
50
50
  "@shivaedev/changes": "0.14.1",
51
- "@shivaedev/contract": "0.49.0",
52
- "@shivaedev/errors": "0.13.1",
53
- "@shivaedev/rate-limit": "0.6.14",
51
+ "@shivaedev/contract": "0.50.0",
52
+ "@shivaedev/errors": "0.14.0",
53
+ "@shivaedev/rate-limit": "0.6.15",
54
54
  "@shivaedev/service": "0.9.2",
55
- "@shivaedev/sql": "0.51.0"
55
+ "@shivaedev/sql": "0.52.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@better-auth/oauth-provider": "1.7.22",
59
59
  "@effect/platform-node": "4.1.4",
60
60
  "@effect/sql-pg": "4.1.4",
61
- "@shivaedev/admin": "0.26.4",
62
- "@shivaedev/build": "0.3.0",
63
- "@shivaedev/quality": "0.78.5",
64
- "@shivaedev/server": "0.37.0",
65
- "@shivaedev/test-kits": "0.13.4",
66
- "@shivaedev/test-sql": "0.25.4",
67
- "@shivaedev/test-story": "0.49.0",
61
+ "@shivaedev/admin": "0.27.0",
62
+ "@shivaedev/build": "0.3.1",
63
+ "@shivaedev/quality": "0.78.6",
64
+ "@shivaedev/server": "0.38.0",
65
+ "@shivaedev/test-kits": "0.13.5",
66
+ "@shivaedev/test-sql": "0.25.5",
67
+ "@shivaedev/test-story": "0.49.1",
68
68
  "@types/node": "24.19.2",
69
69
  "better-auth": "1.7.22",
70
70
  "effect": "4.1.4",
@@ -34,7 +34,6 @@ const CapturePreferences = command("capture", {
34
34
  export const AccountPreferences = defineModule({
35
35
  name: "identity.accountPreferences",
36
36
  operations: [GetPreferences, SetPreferences, CapturePreferences],
37
- requires: [AccountPreferencesStore],
38
37
  subject: selfSubject,
39
38
  wire: identityAccountPreferencesWire,
40
39
  });
package/src/Sessions.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Schema } from "effect";
2
- import { SqlClient } from "effect/sql";
3
2
  import { defineModule } from "@shivaedev/contract/defineModule.ts";
4
3
  import { command, query } from "@shivaedev/contract/operation.ts";
5
4
  import { identitySessionsWire } from "#generated/Sessions.ts";
@@ -27,6 +26,5 @@ export const Sessions = defineModule({
27
26
  middleware: SessionsPermission,
28
27
  name: "identity.sessions",
29
28
  operations: [ListSessions, RevokeSession],
30
- requires: [SqlClient.SqlClient],
31
29
  wire: identitySessionsWire,
32
30
  });