@makaio/framework 1.0.0-dev-1790599449321 → 1.0.0-dev-1790624115602

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 (58) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/clients/hook-subjects.d.mts +124 -0
  3. package/dist/clients/hook-subjects.mjs +1 -0
  4. package/dist/clients/index.d.mts +2 -118
  5. package/dist/clients/index.mjs +1 -1
  6. package/dist/contracts/artifact/index.d.mts +1 -1
  7. package/dist/contracts/capabilities/index.d.mts +1 -1
  8. package/dist/contracts/client/index.d.mts +1 -1
  9. package/dist/contracts/extension/index.d.mts +2 -2
  10. package/dist/contracts/index.d.mts +18 -18
  11. package/dist/contracts/variant/index.d.mts +1 -1
  12. package/dist/contracts/worker/index.d.mts +1 -1
  13. package/dist/contracts/workflow/index.d.mts +1 -1
  14. package/dist/{framework-packages-CLrOCDDK.mjs → framework-packages-D2fycy02.mjs} +1 -1
  15. package/dist/{index-9O8N514B2.d.mts → index-6UlianLY2.d.mts} +4 -4
  16. package/dist/{index-CPOJqxrf2.d.mts → index-BUtnnwzK2.d.mts} +7 -7
  17. package/dist/{index-CcTlPuIg.d.mts → index-BhvXJhTY.d.mts} +17 -17
  18. package/dist/{index-GlDcAkrf.d.mts → index-BtyeBaw-.d.mts} +31 -31
  19. package/dist/{index-uusIGFLo.d.mts → index-CQAriG-z.d.mts} +1 -1
  20. package/dist/{index-BSYu8AXG.d.mts → index-CbVqpQBu.d.mts} +60 -60
  21. package/dist/{index-xqiInEhj.d.mts → index-DmV9ybgT.d.mts} +24 -2
  22. package/dist/{index-_CsKmUOy.d.mts → index-DpiNhNHS.d.mts} +11 -11
  23. package/dist/{index-D9hIDsPr.d.mts → index-DyWD9bfP.d.mts} +46 -2
  24. package/dist/package.json +1 -1
  25. package/dist/runtime-node/index.d.mts +1 -1
  26. package/dist/runtime-node/index.mjs +22 -22
  27. package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
  28. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  29. package/dist/{schemas-CjFPsYeV.d.mts → schemas-BjhhkGN_.d.mts} +4 -4
  30. package/dist/{schemas-DnyXA-9o.d.mts → schemas-CYjPZwlQ.d.mts} +2 -2
  31. package/dist/{schemas-DPtj1sPC2.d.mts → schemas-RwAlAMbq2.d.mts} +7 -7
  32. package/dist/services/index.d.mts +33 -14
  33. package/dist/services/index.mjs +1 -1
  34. package/dist/services/preferences/index.d.mts +2 -2
  35. package/dist/services/preferences/schemas.d.mts +1 -1
  36. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  37. package/dist/services/settings/namespace.d.mts +2 -2
  38. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  39. package/dist/services/subagent-template/index.d.mts +1 -1
  40. package/dist/services/subagent-template/schemas.d.mts +1 -1
  41. package/dist/services/tool-approval/index.d.mts +1 -1
  42. package/dist/services/tool-approval/index.mjs +1 -1
  43. package/dist/services/tools/index.mjs +1 -1
  44. package/dist/services/workflow-transitions/index.mjs +1 -1
  45. package/dist/{storage-namespace-CwwiV3kt.d.mts → storage-namespace-NHTWAjaX.d.mts} +10 -10
  46. package/dist/tool-approval-service-BCN4W8eS.mjs +1 -0
  47. package/dist/tools/index.d.mts +13 -1
  48. package/dist/tools/index.mjs +1 -1
  49. package/dist/{tools-nkqlVAQ1.mjs → tools-BCL_dtHe.mjs} +1 -1
  50. package/dist/ui-kernel/index.d.mts +4 -4
  51. package/dist/ui-kernel/pages/namespace.d.mts +4 -4
  52. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  53. package/dist/workflow-engine/index.d.mts +23 -23
  54. package/dist/{workflow-transitions-DEaRIZDU.mjs → workflow-transitions-7d9lGi08.mjs} +1 -1
  55. package/dist/workflow-worker-BCLy_g_a.mjs +3 -0
  56. package/package.json +5 -1
  57. package/dist/tool-approval-service-BRyBObcL.mjs +0 -1
  58. package/dist/workflow-worker-DXCXb3g-.mjs +0 -3
@@ -1394,16 +1394,6 @@ declare const ArtifactSchemas$1: {
1394
1394
  excerpt: z.ZodOptional<z.ZodString>;
1395
1395
  }, z.core.$strict>]>>>;
1396
1396
  createdAt: z.ZodOptional<z.ZodNumber>;
1397
- schemaVersion: z.ZodNumber;
1398
- scope: z.ZodObject<{
1399
- level: z.ZodString;
1400
- ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1401
- }, z.core.$strip>;
1402
- actor: z.ZodObject<{
1403
- kind: z.ZodString;
1404
- id: z.ZodString;
1405
- displayName: z.ZodOptional<z.ZodString>;
1406
- }, z.core.$strip>;
1407
1397
  relations: z.ZodArray<z.ZodObject<{
1408
1398
  type: z.ZodString;
1409
1399
  sourceLocalId: z.ZodOptional<z.ZodString>;
@@ -1433,6 +1423,16 @@ declare const ArtifactSchemas$1: {
1433
1423
  id: z.ZodString;
1434
1424
  }, z.core.$strict>], "refClass">>;
1435
1425
  }, z.core.$strip>>;
1426
+ schemaVersion: z.ZodNumber;
1427
+ scope: z.ZodObject<{
1428
+ level: z.ZodString;
1429
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1430
+ }, z.core.$strip>;
1431
+ actor: z.ZodObject<{
1432
+ kind: z.ZodString;
1433
+ id: z.ZodString;
1434
+ displayName: z.ZodOptional<z.ZodString>;
1435
+ }, z.core.$strip>;
1436
1436
  confidence: z.ZodOptional<z.ZodObject<{
1437
1437
  level: z.ZodEnum<{
1438
1438
  inferred: "inferred";
@@ -1692,16 +1692,6 @@ declare const ArtifactSchemas$1: {
1692
1692
  excerpt: z.ZodOptional<z.ZodString>;
1693
1693
  }, z.core.$strict>]>>>;
1694
1694
  createdAt: z.ZodOptional<z.ZodNumber>;
1695
- schemaVersion: z.ZodNumber;
1696
- scope: z.ZodObject<{
1697
- level: z.ZodString;
1698
- ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1699
- }, z.core.$strip>;
1700
- actor: z.ZodObject<{
1701
- kind: z.ZodString;
1702
- id: z.ZodString;
1703
- displayName: z.ZodOptional<z.ZodString>;
1704
- }, z.core.$strip>;
1705
1695
  relations: z.ZodArray<z.ZodObject<{
1706
1696
  type: z.ZodString;
1707
1697
  sourceLocalId: z.ZodOptional<z.ZodString>;
@@ -1731,6 +1721,16 @@ declare const ArtifactSchemas$1: {
1731
1721
  id: z.ZodString;
1732
1722
  }, z.core.$strict>], "refClass">>;
1733
1723
  }, z.core.$strip>>;
1724
+ schemaVersion: z.ZodNumber;
1725
+ scope: z.ZodObject<{
1726
+ level: z.ZodString;
1727
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1728
+ }, z.core.$strip>;
1729
+ actor: z.ZodObject<{
1730
+ kind: z.ZodString;
1731
+ id: z.ZodString;
1732
+ displayName: z.ZodOptional<z.ZodString>;
1733
+ }, z.core.$strip>;
1734
1734
  confidence: z.ZodOptional<z.ZodObject<{
1735
1735
  level: z.ZodEnum<{
1736
1736
  inferred: "inferred";
@@ -4205,16 +4205,6 @@ declare const ArtifactNamespace: _$_makaio_core0.BusNamespaceDefinition<"artifac
4205
4205
  excerpt: z.ZodOptional<z.ZodString>;
4206
4206
  }, z.core.$strict>]>>>;
4207
4207
  createdAt: z.ZodOptional<z.ZodNumber>;
4208
- schemaVersion: z.ZodNumber;
4209
- scope: z.ZodObject<{
4210
- level: z.ZodString;
4211
- ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4212
- }, z.core.$strip>;
4213
- actor: z.ZodObject<{
4214
- kind: z.ZodString;
4215
- id: z.ZodString;
4216
- displayName: z.ZodOptional<z.ZodString>;
4217
- }, z.core.$strip>;
4218
4208
  relations: z.ZodArray<z.ZodObject<{
4219
4209
  type: z.ZodString;
4220
4210
  sourceLocalId: z.ZodOptional<z.ZodString>;
@@ -4244,6 +4234,16 @@ declare const ArtifactNamespace: _$_makaio_core0.BusNamespaceDefinition<"artifac
4244
4234
  id: z.ZodString;
4245
4235
  }, z.core.$strict>], "refClass">>;
4246
4236
  }, z.core.$strip>>;
4237
+ schemaVersion: z.ZodNumber;
4238
+ scope: z.ZodObject<{
4239
+ level: z.ZodString;
4240
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4241
+ }, z.core.$strip>;
4242
+ actor: z.ZodObject<{
4243
+ kind: z.ZodString;
4244
+ id: z.ZodString;
4245
+ displayName: z.ZodOptional<z.ZodString>;
4246
+ }, z.core.$strip>;
4247
4247
  confidence: z.ZodOptional<z.ZodObject<{
4248
4248
  level: z.ZodEnum<{
4249
4249
  inferred: "inferred";
@@ -4503,16 +4503,6 @@ declare const ArtifactNamespace: _$_makaio_core0.BusNamespaceDefinition<"artifac
4503
4503
  excerpt: z.ZodOptional<z.ZodString>;
4504
4504
  }, z.core.$strict>]>>>;
4505
4505
  createdAt: z.ZodOptional<z.ZodNumber>;
4506
- schemaVersion: z.ZodNumber;
4507
- scope: z.ZodObject<{
4508
- level: z.ZodString;
4509
- ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4510
- }, z.core.$strip>;
4511
- actor: z.ZodObject<{
4512
- kind: z.ZodString;
4513
- id: z.ZodString;
4514
- displayName: z.ZodOptional<z.ZodString>;
4515
- }, z.core.$strip>;
4516
4506
  relations: z.ZodArray<z.ZodObject<{
4517
4507
  type: z.ZodString;
4518
4508
  sourceLocalId: z.ZodOptional<z.ZodString>;
@@ -4542,6 +4532,16 @@ declare const ArtifactNamespace: _$_makaio_core0.BusNamespaceDefinition<"artifac
4542
4532
  id: z.ZodString;
4543
4533
  }, z.core.$strict>], "refClass">>;
4544
4534
  }, z.core.$strip>>;
4535
+ schemaVersion: z.ZodNumber;
4536
+ scope: z.ZodObject<{
4537
+ level: z.ZodString;
4538
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4539
+ }, z.core.$strip>;
4540
+ actor: z.ZodObject<{
4541
+ kind: z.ZodString;
4542
+ id: z.ZodString;
4543
+ displayName: z.ZodOptional<z.ZodString>;
4544
+ }, z.core.$strip>;
4545
4545
  confidence: z.ZodOptional<z.ZodObject<{
4546
4546
  level: z.ZodEnum<{
4547
4547
  inferred: "inferred";
@@ -7038,16 +7038,6 @@ declare const ArtifactSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7038
7038
  excerpt: z.ZodOptional<z.ZodString>;
7039
7039
  }, z.core.$strict>]>>>;
7040
7040
  createdAt: z.ZodOptional<z.ZodNumber>;
7041
- schemaVersion: z.ZodNumber;
7042
- scope: z.ZodObject<{
7043
- level: z.ZodString;
7044
- ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7045
- }, z.core.$strip>;
7046
- actor: z.ZodObject<{
7047
- kind: z.ZodString;
7048
- id: z.ZodString;
7049
- displayName: z.ZodOptional<z.ZodString>;
7050
- }, z.core.$strip>;
7051
7041
  relations: z.ZodArray<z.ZodObject<{
7052
7042
  type: z.ZodString;
7053
7043
  sourceLocalId: z.ZodOptional<z.ZodString>;
@@ -7077,6 +7067,16 @@ declare const ArtifactSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7077
7067
  id: z.ZodString;
7078
7068
  }, z.core.$strict>], "refClass">>;
7079
7069
  }, z.core.$strip>>;
7070
+ schemaVersion: z.ZodNumber;
7071
+ scope: z.ZodObject<{
7072
+ level: z.ZodString;
7073
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7074
+ }, z.core.$strip>;
7075
+ actor: z.ZodObject<{
7076
+ kind: z.ZodString;
7077
+ id: z.ZodString;
7078
+ displayName: z.ZodOptional<z.ZodString>;
7079
+ }, z.core.$strip>;
7080
7080
  confidence: z.ZodOptional<z.ZodObject<{
7081
7081
  level: z.ZodEnum<{
7082
7082
  inferred: "inferred";
@@ -7336,16 +7336,6 @@ declare const ArtifactSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7336
7336
  excerpt: z.ZodOptional<z.ZodString>;
7337
7337
  }, z.core.$strict>]>>>;
7338
7338
  createdAt: z.ZodOptional<z.ZodNumber>;
7339
- schemaVersion: z.ZodNumber;
7340
- scope: z.ZodObject<{
7341
- level: z.ZodString;
7342
- ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7343
- }, z.core.$strip>;
7344
- actor: z.ZodObject<{
7345
- kind: z.ZodString;
7346
- id: z.ZodString;
7347
- displayName: z.ZodOptional<z.ZodString>;
7348
- }, z.core.$strip>;
7349
7339
  relations: z.ZodArray<z.ZodObject<{
7350
7340
  type: z.ZodString;
7351
7341
  sourceLocalId: z.ZodOptional<z.ZodString>;
@@ -7375,6 +7365,16 @@ declare const ArtifactSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7375
7365
  id: z.ZodString;
7376
7366
  }, z.core.$strict>], "refClass">>;
7377
7367
  }, z.core.$strip>>;
7368
+ schemaVersion: z.ZodNumber;
7369
+ scope: z.ZodObject<{
7370
+ level: z.ZodString;
7371
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7372
+ }, z.core.$strip>;
7373
+ actor: z.ZodObject<{
7374
+ kind: z.ZodString;
7375
+ id: z.ZodString;
7376
+ displayName: z.ZodOptional<z.ZodString>;
7377
+ }, z.core.$strip>;
7378
7378
  confidence: z.ZodOptional<z.ZodObject<{
7379
7379
  level: z.ZodEnum<{
7380
7380
  inferred: "inferred";
@@ -56,7 +56,29 @@ declare class ToolApprovalService extends BaseService {
56
56
  */
57
57
  private dispatchAlwaysAskApproval;
58
58
  /**
59
- * Evaluate `.makaioignore` file access rules before policy cascade handling.
59
+ * Evaluate `.makaioignore` file access rules and the directory allowlist before policy
60
+ * cascade handling.
61
+ *
62
+ * The rules are tested against both the lexical and the canonical (symlink-resolved)
63
+ * target, so an in-tree symlink cannot alias a denied path such as `.git/config`. A
64
+ * target that cannot be canonicalized safely (dangling symlink, non-`ENOENT` error) is
65
+ * denied; a missing file canonicalizes through its nearest existing ancestor, so a Write
66
+ * of a new file stays possible. A symlinked cwd itself is not covered: the rules are
67
+ * cwd-relative, so a canonical spelling outside the lexical cwd is not matched (same
68
+ * limit as `createPathValidator` in the filesystem extension).
69
+ *
70
+ * A raw path argument with a `..` segment (split on `/` and `\`) is denied outright:
71
+ * `path.resolve` collapses `..` before symlinks are followed, so `link/../config` with
72
+ * `link -> .git/subdir` would be checked as `<cwd>/config` while the OS opens
73
+ * `<cwd>/.git/config`. This also denies harmless spellings such as `src/../README.md`.
74
+ *
75
+ * The allowlist is `agent.allowedDirectories`, else the profile's. A target whose
76
+ * canonical path lies outside every entry is denied, so an empty list denies every
77
+ * native file-tool call with a path, matching the runtime contract and the filesystem
78
+ * extension's path validator. An absent list (`undefined`) adds no containment. An
79
+ * agent with a `profileId` but no own list gets `[]` when the profile RPC is unhandled
80
+ * or fails, so such a host denies all native file-tool calls with a path; hosts without
81
+ * a profile service set the agent's `allowedDirectories` or leave `profileId` unset.
60
82
  * @param payload - Incoming tool approval payload
61
83
  * @param context - CWD and directory constraints for rule evaluation
62
84
  * @returns Deny message when access should be blocked, otherwise undefined
@@ -116,4 +138,4 @@ declare class ToolApprovalService extends BaseService {
116
138
  private resolveHarnessPolicy;
117
139
  }
118
140
  //#endregion
119
- export { ToolApprovalService as t };
141
+ export { ToolApprovalServiceOptions as n, ToolApprovalService as t };
@@ -90,8 +90,8 @@ declare const ClientSchemas: {
90
90
  projectDir: z.ZodOptional<z.ZodString>;
91
91
  configInheritance: z.ZodOptional<z.ZodEnum<{
92
92
  empty: "empty";
93
- "auth-only": "auth-only";
94
93
  full: "full";
94
+ "auth-only": "auth-only";
95
95
  }>>;
96
96
  }, z.core.$strip>;
97
97
  response: z.ZodObject<{
@@ -551,8 +551,8 @@ declare const ClientSchemas: {
551
551
  machineId: z.ZodOptional<z.ZodString>;
552
552
  startMode: z.ZodOptional<z.ZodEnum<{
553
553
  fork: "fork";
554
- resume: "resume";
555
554
  fresh: "fresh";
555
+ resume: "resume";
556
556
  clear: "clear";
557
557
  compact: "compact";
558
558
  }>>;
@@ -1646,8 +1646,8 @@ declare const CLIENT_SESSION_START_MODES: readonly ["fresh", "fork", "resume", "
1646
1646
  /** Zod schema for the client-reported session start mode. */
1647
1647
  declare const ClientSessionStartModeSchema: z.ZodEnum<{
1648
1648
  fork: "fork";
1649
- resume: "resume";
1650
1649
  fresh: "fresh";
1650
+ resume: "resume";
1651
1651
  clear: "clear";
1652
1652
  compact: "compact";
1653
1653
  }>;
@@ -1665,8 +1665,8 @@ declare const ClientSessionStartedSchema: z.ZodObject<{
1665
1665
  machineId: z.ZodOptional<z.ZodString>;
1666
1666
  startMode: z.ZodOptional<z.ZodEnum<{
1667
1667
  fork: "fork";
1668
- resume: "resume";
1669
1668
  fresh: "fresh";
1669
+ resume: "resume";
1670
1670
  clear: "clear";
1671
1671
  compact: "compact";
1672
1672
  }>>;
@@ -2005,8 +2005,8 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
2005
2005
  projectDir: _$zod.ZodOptional<_$zod.ZodString>;
2006
2006
  configInheritance: _$zod.ZodOptional<_$zod.ZodEnum<{
2007
2007
  empty: "empty";
2008
- "auth-only": "auth-only";
2009
2008
  full: "full";
2009
+ "auth-only": "auth-only";
2010
2010
  }>>;
2011
2011
  }, _$zod_v4_core0.$strip>;
2012
2012
  response: _$zod.ZodObject<{
@@ -2450,8 +2450,8 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
2450
2450
  machineId: _$zod.ZodOptional<_$zod.ZodString>;
2451
2451
  startMode: _$zod.ZodOptional<_$zod.ZodEnum<{
2452
2452
  fork: "fork";
2453
- resume: "resume";
2454
2453
  fresh: "fresh";
2454
+ resume: "resume";
2455
2455
  clear: "clear";
2456
2456
  compact: "compact";
2457
2457
  }>>;
@@ -2735,8 +2735,8 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
2735
2735
  projectDir: _$zod.ZodOptional<_$zod.ZodString>;
2736
2736
  configInheritance: _$zod.ZodOptional<_$zod.ZodEnum<{
2737
2737
  empty: "empty";
2738
- "auth-only": "auth-only";
2739
2738
  full: "full";
2739
+ "auth-only": "auth-only";
2740
2740
  }>>;
2741
2741
  }, _$zod_v4_core0.$strip>;
2742
2742
  response: _$zod.ZodObject<{
@@ -3180,8 +3180,8 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
3180
3180
  machineId: _$zod.ZodOptional<_$zod.ZodString>;
3181
3181
  startMode: _$zod.ZodOptional<_$zod.ZodEnum<{
3182
3182
  fork: "fork";
3183
- resume: "resume";
3184
3183
  fresh: "fresh";
3184
+ resume: "resume";
3185
3185
  clear: "clear";
3186
3186
  compact: "compact";
3187
3187
  }>>;
@@ -3488,8 +3488,8 @@ declare const SessionConfigEnvSchema: z.ZodRecord<z.ZodString, z.ZodString>;
3488
3488
  */
3489
3489
  declare const SessionConfigInheritanceSchema: z.ZodEnum<{
3490
3490
  empty: "empty";
3491
- "auth-only": "auth-only";
3492
3491
  full: "full";
3492
+ "auth-only": "auth-only";
3493
3493
  }>;
3494
3494
  type SessionConfigInheritance = z.infer<typeof SessionConfigInheritanceSchema>;
3495
3495
  /**
@@ -3646,8 +3646,8 @@ declare const ClientSessionConfigSchemas: {
3646
3646
  projectDir: z.ZodOptional<z.ZodString>;
3647
3647
  configInheritance: z.ZodOptional<z.ZodEnum<{
3648
3648
  empty: "empty";
3649
- "auth-only": "auth-only";
3650
3649
  full: "full";
3650
+ "auth-only": "auth-only";
3651
3651
  }>>;
3652
3652
  }, z.core.$strip>;
3653
3653
  response: z.ZodObject<{
@@ -3702,8 +3702,8 @@ declare const SessionConfigSetupRequestSchema: z.ZodObject<{
3702
3702
  }>;
3703
3703
  configInheritance: z.ZodEnum<{
3704
3704
  empty: "empty";
3705
- "auth-only": "auth-only";
3706
3705
  full: "full";
3706
+ "auth-only": "auth-only";
3707
3707
  }>;
3708
3708
  }, z.core.$strip>;
3709
3709
  type SessionConfigSetupRequest = z.infer<typeof SessionConfigSetupRequestSchema>;
@@ -5,7 +5,8 @@ import { BusTransport, IFilteredBus, IMakaioBus, SubjectTelemetryProjectorRegist
5
5
  import { DispatchingAuth, HmacAuth, TransportAuth } from "@makaio/framework/node/transports";
6
6
  import { ContributionProcessor, ExtensionCoordinator, ExtensionRuntimeSurface, KernelExtensionContext, KernelMakaioExtension, RuntimeCapability, TransportProvider, WindowRegistry } from "@makaio/framework/kernel";
7
7
  import { StorageEngine } from "@makaio/framework/storage/drizzle";
8
- import { Toolset } from "@makaio/framework/tools";
8
+ import { FileAccessRuleProvider, Toolset } from "@makaio/framework/tools";
9
+ import { FrameworkFileAccessOptions } from "@makaio/framework/services";
9
10
  import { IAdapterConfigRepository } from "@makaio/framework/services/adapter-subsystem";
10
11
  import { PostInstallHandler, StrategyDependencies } from "@makaio/framework/clients";
11
12
  import { DatabaseClient } from "@makaio/framework/storage/drizzle/client";
@@ -356,9 +357,11 @@ type RuntimeOwnershipPackageView = Pick<KernelMakaioExtension, 'name' | 'display
356
357
  * `runtimeOwnership.sessionOrchestrator`, and boot fails if more than one
357
358
  * loaded extension declares that ownership.
358
359
  * @param loadedExtensionPackages - Descriptor-loaded executable extension packages.
360
+ * @param fileAccessOptions - Host file-access rule provider bound into the tool
361
+ * registry and tool approval packages; without one the static core set is used.
359
362
  * @returns Framework core packages for this boot.
360
363
  */
361
- declare function selectFrameworkCorePackages(loadedExtensionPackages: ReadonlyArray<RuntimeOwnershipPackageView> | true): ReadonlyArray<KernelMakaioExtension>;
364
+ declare function selectFrameworkCorePackages(loadedExtensionPackages: ReadonlyArray<RuntimeOwnershipPackageView> | true, fileAccessOptions?: FrameworkFileAccessOptions): ReadonlyArray<KernelMakaioExtension>;
362
365
  //#endregion
363
366
  //#region runtimes/node/src/initialize-node-database.d.ts
364
367
  /**
@@ -1111,6 +1114,47 @@ interface CoreBootOptions {
1111
1114
  * `MachineIdentity` shape.
1112
1115
  */
1113
1116
  readonly machineIdentity?: PersistedMachineIdentity;
1117
+ /**
1118
+ * Host-provided file-access rule provider (`.makaioignore` hierarchy plus
1119
+ * built-in deny list), for example `createMakaioIgnoreProvider()` from
1120
+ * `@makaio/extension-filesystem`.
1121
+ *
1122
+ * When provided, boot binds it into the framework tool registry, which
1123
+ * injects the resolved rules into every tool execution context, and into the
1124
+ * tool approval service, which denies file tool calls whose path argument
1125
+ * names a restricted path (lexical or symlink-resolved) before any approval
1126
+ * policy applies. When omitted, neither enforces file-access rules.
1127
+ *
1128
+ * Scope:
1129
+ * - The patterns apply inside the agent's working directory. With a provider
1130
+ * configured, the approval service also denies native file-tool calls
1131
+ * outside the agent's `allowedDirectories` (else the profile's); an empty
1132
+ * list denies every native file-tool call with a path. Without
1133
+ * `allowedDirectories` (`undefined`), paths outside the working directory
1134
+ * are not restricted by this check. An agent with a `profileId` but no own
1135
+ * list gets an empty list when the profile RPC is unhandled or fails, so a
1136
+ * host without a profile service denies all native file tools for such
1137
+ * agents unless it sets the agent's `allowedDirectories`.
1138
+ * - A path argument with a `..` segment is denied, because resolving it
1139
+ * before following symlinks could alias a restricted path; harmless
1140
+ * spellings such as `src/../README.md` are denied too.
1141
+ * - `Glob` and `Grep` are checked on their supplied search root only. Without
1142
+ * a `path` argument they get no file-access check, and files reached
1143
+ * recursively are not filtered by the patterns; filtering descendants needs
1144
+ * OS-level isolation (Cyberport FACT-272).
1145
+ * - A symlinked working directory itself is not resolved: the patterns match
1146
+ * cwd-relative spellings only.
1147
+ * - Only file tools with a path argument are inspected. Shell commands and
1148
+ * other tools without a path argument are not.
1149
+ * - A known file-tool call from an agent without a working directory is
1150
+ * denied (fail-closed), because the rules cannot be resolved without one.
1151
+ * - Boot fails when an extension overrides the framework tool registry or
1152
+ * tool approval package while a provider is configured, since the
1153
+ * override would drop the provider.
1154
+ * - Workflow-worker tool registries are not covered: they run in separate
1155
+ * threads or processes and do not receive this provider.
1156
+ */
1157
+ readonly fileAccessRuleProvider?: FileAccessRuleProvider;
1114
1158
  /**
1115
1159
  * Host launcher command embedded into client wiring installed from warning actions.
1116
1160
  *
package/dist/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@makaio/framework",
3
- "version": "1.0.0-dev-1790599449321",
3
+ "version": "1.0.0-dev-1790624115602",
4
4
  "type": "module"
5
5
  }
@@ -5,7 +5,7 @@ import { a as CODE_EXECUTION_DEFAULT_MAX_PROGRAM_FILES, c as CODE_EXECUTION_DEFA
5
5
  import { t as PiscinaCodeExecutionProvider } from "../index-BfFi98B_.mjs";
6
6
  import { a as ExtensionNameCollisionError, c as MergedDescriptorDiscovery, n as ExplicitDescriptorDiscovery, o as FilesystemDescriptorDiscovery, r as ExtensionDiscovery, s as FilesystemDescriptorDiscoveryOptions, t as DiscoveredExtension } from "../extension-discovery-BqSPn73R.mjs";
7
7
  import { a as isWithinDirectory, c as resolveConventionEntrypoint, i as isMakaioExtensionLike, n as entrypointStem, o as loadExtensions, r as isCliContributionLike, s as normalizePackageExport, t as LoadExtensionsOptions } from "../load-extensions-CCzTHlUE.mjs";
8
- import { $ as CreateIsolatedWorkflowRuntimeOptions, A as createLocalGitWorkspacePreparation, An as HttpRouteGraphBuilder, B as HeadlessWorkerMaterializer, Bn as PreparedAdapterRuntime, Bt as BootMakaioRuntimeOptions, C as admitWorkflowRunOperation, Cn as selectFrameworkCorePackages, Dn as NodeFrameworkModuleResolver, E as registerWorkerRuntime, En as FrameworkModuleResolver, F as HeadlessWorkerBootstrap, Fn as HonoRouteGraphOptions, Ft as IWorkflowRunner, G as runHeadlessWorkflowWorker, Gt as UpstreamTelemetryBootOptions, H as HeadlessWorkflowWorkerDeps, Hn as prepareAdapterRuntime, Ht as MakaioRuntime, I as HeadlessWorkerBootstrapCredentials, In as createHonoRouteGraph, J as WorkloadControlBinding, K as InstalledWorkloadAdapter, Kt as WorkflowRunnerBootOptions, L as HeadlessWorkerBusConnector, Ln as ActivateAdapterRuntimeIdentityInput, Lt as ThinWorkflowPiscinaRunnerOptions, M as HeadlessWorkerDeps, Mn as HttpContributionPhase, N as HeadlessWorkerResult, Nn as HttpRouteContribution, On as NoopFrameworkModuleResolver, P as runHeadlessWorker, Pn as HonoRouteGraph, Pt as ThinWorkflowPiscinaRunner, Q as SetupProcessGroupObservation, R as HeadlessWorkerContributionLoader, Rn as ActivatedAdapterRuntimeIdentity, Rt as WorkflowRunResult, S as RuntimeRegistrationRefusedError, Sn as normalizeNodeHostCapabilities, T as registerAndAdmitWorkflowRun, Tn as BridgeBrowserOptions, U as HeadlessWorkflowWorkerResult, Ut as ServerTransportProvider, V as HeadlessWorkerPostCommitObserver, Vn as activateAdapterRuntimeIdentity, Vt as CoreBootOptions, Wt as TransportReadyInfo, X as WorkloadInvocationResult, Y as WorkloadInvocationPreparation, Z as runWorkloadInvocation, _ as OperationDeliveryEndpointIdentity, _n as DatabaseBootOptions, a as InstalledAttemptControlEndpoint, an as WorkflowWorkerEntryMode, at as InProcessWorkflowRunner, b as RegisterAndAdmitWorkflowRunOptions, bn as initializeNodeDatabase, bt as submitAttemptOutcomeWithAck, c as BootstrapStartRefusedError, cn as ExtensionOperatorConfigConsumer, d as bootstrapWorkerRuntime, dn as MAX_OPERATOR_CONFIG_BYTES, et as IsolatedWorkflowRuntime, f as AdmitWorkflowRunOperationOptions, fn as createExtensionOperatorConfigSnapshot, ft as AttemptOutcomeDeliveryError, g as OperationDeliveryEndpoint, gn as warnOnUnappliedExtensionOperatorConfig, gt as OutcomeDeliveryError, h as OperationAdmissionRefusedError, hn as warnOnUnaddressableExtensionOperatorConfigNames, i as AttemptControlReportOptions, it as createIsolatedWorkflowRuntime, j as LocalGitSourceOptions, jn as createHttpRouteGraphBuilder, kn as resolveFrameworkSpecifier, l as BootstrapWorkerRuntimeOptions, ln as ExtensionOperatorConfigSnapshot, m as DeliverableOperationKind, mn as resolveExtensionOperatorConfigDir, mt as AuthorityRequestDeliveryError, n as AttemptControlEndpointIdentity, nt as WorkflowRuntimeAuthorityConnector, o as installAttemptControlEndpoint, on as WorkflowWorkerEntryResolverOptions, ot as InProcessWorkflowRunnerOptions, p as AdmittedWorkflowRun, pn as loadExtensionOperatorConfig, q as RunWorkloadInvocationOptions, r as AttemptControlLastReport, rt as WorkflowRuntimeContributionLoader, s as BootstrapRuntimeConnection, sn as resolveWorkflowWorkerEntry, t as AttemptControlEndpointDeps, tt as IsolatedWorkflowRuntimeContext, u as StartedWorkerRuntime, un as LoadExtensionOperatorConfigOptions, v as OperationDeliveryHandler, vn as InitializeNodeDatabaseOptions, w as installOperationDeliveryEndpoint, wn as ShutdownStep, x as RegisterWorkerRuntimeOptions, xn as HostCapabilityDeclaration, y as OperationDeliveryHandlers, yn as InitializeNodeDatabaseResult, z as HeadlessWorkerExecutor, zn as PrepareAdapterRuntimeInput, zt as BootCoordinatorSetupContext } from "../index-D9hIDsPr.mjs";
8
+ import { $ as CreateIsolatedWorkflowRuntimeOptions, A as createLocalGitWorkspacePreparation, An as HttpRouteGraphBuilder, B as HeadlessWorkerMaterializer, Bn as PreparedAdapterRuntime, Bt as BootMakaioRuntimeOptions, C as admitWorkflowRunOperation, Cn as selectFrameworkCorePackages, Dn as NodeFrameworkModuleResolver, E as registerWorkerRuntime, En as FrameworkModuleResolver, F as HeadlessWorkerBootstrap, Fn as HonoRouteGraphOptions, Ft as IWorkflowRunner, G as runHeadlessWorkflowWorker, Gt as UpstreamTelemetryBootOptions, H as HeadlessWorkflowWorkerDeps, Hn as prepareAdapterRuntime, Ht as MakaioRuntime, I as HeadlessWorkerBootstrapCredentials, In as createHonoRouteGraph, J as WorkloadControlBinding, K as InstalledWorkloadAdapter, Kt as WorkflowRunnerBootOptions, L as HeadlessWorkerBusConnector, Ln as ActivateAdapterRuntimeIdentityInput, Lt as ThinWorkflowPiscinaRunnerOptions, M as HeadlessWorkerDeps, Mn as HttpContributionPhase, N as HeadlessWorkerResult, Nn as HttpRouteContribution, On as NoopFrameworkModuleResolver, P as runHeadlessWorker, Pn as HonoRouteGraph, Pt as ThinWorkflowPiscinaRunner, Q as SetupProcessGroupObservation, R as HeadlessWorkerContributionLoader, Rn as ActivatedAdapterRuntimeIdentity, Rt as WorkflowRunResult, S as RuntimeRegistrationRefusedError, Sn as normalizeNodeHostCapabilities, T as registerAndAdmitWorkflowRun, Tn as BridgeBrowserOptions, U as HeadlessWorkflowWorkerResult, Ut as ServerTransportProvider, V as HeadlessWorkerPostCommitObserver, Vn as activateAdapterRuntimeIdentity, Vt as CoreBootOptions, Wt as TransportReadyInfo, X as WorkloadInvocationResult, Y as WorkloadInvocationPreparation, Z as runWorkloadInvocation, _ as OperationDeliveryEndpointIdentity, _n as DatabaseBootOptions, a as InstalledAttemptControlEndpoint, an as WorkflowWorkerEntryMode, at as InProcessWorkflowRunner, b as RegisterAndAdmitWorkflowRunOptions, bn as initializeNodeDatabase, bt as submitAttemptOutcomeWithAck, c as BootstrapStartRefusedError, cn as ExtensionOperatorConfigConsumer, d as bootstrapWorkerRuntime, dn as MAX_OPERATOR_CONFIG_BYTES, et as IsolatedWorkflowRuntime, f as AdmitWorkflowRunOperationOptions, fn as createExtensionOperatorConfigSnapshot, ft as AttemptOutcomeDeliveryError, g as OperationDeliveryEndpoint, gn as warnOnUnappliedExtensionOperatorConfig, gt as OutcomeDeliveryError, h as OperationAdmissionRefusedError, hn as warnOnUnaddressableExtensionOperatorConfigNames, i as AttemptControlReportOptions, it as createIsolatedWorkflowRuntime, j as LocalGitSourceOptions, jn as createHttpRouteGraphBuilder, kn as resolveFrameworkSpecifier, l as BootstrapWorkerRuntimeOptions, ln as ExtensionOperatorConfigSnapshot, m as DeliverableOperationKind, mn as resolveExtensionOperatorConfigDir, mt as AuthorityRequestDeliveryError, n as AttemptControlEndpointIdentity, nt as WorkflowRuntimeAuthorityConnector, o as installAttemptControlEndpoint, on as WorkflowWorkerEntryResolverOptions, ot as InProcessWorkflowRunnerOptions, p as AdmittedWorkflowRun, pn as loadExtensionOperatorConfig, q as RunWorkloadInvocationOptions, r as AttemptControlLastReport, rt as WorkflowRuntimeContributionLoader, s as BootstrapRuntimeConnection, sn as resolveWorkflowWorkerEntry, t as AttemptControlEndpointDeps, tt as IsolatedWorkflowRuntimeContext, u as StartedWorkerRuntime, un as LoadExtensionOperatorConfigOptions, v as OperationDeliveryHandler, vn as InitializeNodeDatabaseOptions, w as installOperationDeliveryEndpoint, wn as ShutdownStep, x as RegisterWorkerRuntimeOptions, xn as HostCapabilityDeclaration, y as OperationDeliveryHandlers, yn as InitializeNodeDatabaseResult, z as HeadlessWorkerExecutor, zn as PrepareAdapterRuntimeInput, zt as BootCoordinatorSetupContext } from "../index-DyWD9bfP.mjs";
9
9
  import { ConfiguredRuntimeOptions, LoadMakaioConfigOptions, LoadedMakaioConfig, MAKAIO_CONFIG_FILE_ENV, MAKAIO_HOME_ENV, MakaioConfig, ParseMakaioConfigOptions, ParsedMakaioConfig, WorkflowRunnerConfig, buildConfiguredRuntimeOptions, createMakaioConfigDiscovery, defineMakaioConfig, loadMakaioConfig, parseMakaioConfig, resolveMakaioConfigPath, resolveMakaioHome, shouldIncludeExtension } from "./makaio-config.mjs";
10
10
  import { RotateWorkflowExecutionBusSecretParams, captureWorkflowExecutionBusSecretCleanup } from "./workflow-execution-bus-access.mjs";
11
11
  import { z } from "zod";