@makaio/framework 1.0.0-dev-1779051654000 → 1.0.0-dev-1781022866275
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/LICENSE +1 -1
- package/package.json +55 -2
- package/dist/account-identity-Bg_vKkcs.mjs +0 -1
- package/dist/adapter-CpF2aK_-.mjs +0 -1
- package/dist/adapters/acp-client/index.d.mts +0 -209
- package/dist/adapters/acp-client/index.mjs +0 -1
- package/dist/adapters/config/index.d.mts +0 -429
- package/dist/adapters/config/index.mjs +0 -1
- package/dist/adapters/index.d.mts +0 -4175
- package/dist/adapters/index.mjs +0 -11
- package/dist/adapters/node.d.mts +0 -263
- package/dist/adapters/node.mjs +0 -4
- package/dist/adapters/stream-session/index.d.mts +0 -1384
- package/dist/adapters/stream-session/index.mjs +0 -1
- package/dist/adapters/stream-session/testing/index.d.mts +0 -29
- package/dist/adapters/stream-session/testing/index.mjs +0 -1
- package/dist/base-orchestrator-BOAPgqF7.d.mts +0 -772
- package/dist/bus/index.d.mts +0 -3331
- package/dist/bus/index.mjs +0 -1
- package/dist/bus-B1seC4M_.mjs +0 -2
- package/dist/capability-service-DV32ecwR.mjs +0 -1
- package/dist/chunk-Dc06z0qk.mjs +0 -1
- package/dist/chunk-cpUYaJdV.mjs +0 -1
- package/dist/cleanEnvForAdapter-hTPNvPU5.mjs +0 -1
- package/dist/client-DMWXCWhM.mjs +0 -1
- package/dist/clients/index.d.mts +0 -2561
- package/dist/clients/index.mjs +0 -2
- package/dist/clients-namespace-UHj5wt-l.d.mts +0 -332
- package/dist/config-namespace-ChZOpi1W.d.mts +0 -638
- package/dist/config-namespace-wJ2CakDB.mjs +0 -1
- package/dist/contracts/adapter/index.d.mts +0 -3
- package/dist/contracts/adapter/index.mjs +0 -1
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +0 -2
- package/dist/contracts/adapter/schemas/session-lineage.mjs +0 -1
- package/dist/contracts/client/index.d.mts +0 -3
- package/dist/contracts/client/index.mjs +0 -1
- package/dist/contracts/common/index.d.mts +0 -2
- package/dist/contracts/common/index.mjs +0 -1
- package/dist/contracts/config/index.d.mts +0 -455
- package/dist/contracts/config/index.mjs +0 -1
- package/dist/contracts/extension/index.d.mts +0 -3
- package/dist/contracts/extension/index.mjs +0 -1
- package/dist/contracts/harness/index.d.mts +0 -2
- package/dist/contracts/harness/index.mjs +0 -1
- package/dist/contracts/host/index.d.mts +0 -2
- package/dist/contracts/host/index.mjs +0 -1
- package/dist/contracts/index.d.mts +0 -12666
- package/dist/contracts/index.mjs +0 -1
- package/dist/contracts/model-registry/index.d.mts +0 -2
- package/dist/contracts/model-registry/index.mjs +0 -1
- package/dist/contracts/native-session-supervisor/index.d.mts +0 -2
- package/dist/contracts/native-session-supervisor/index.mjs +0 -1
- package/dist/contracts/platform/index.d.mts +0 -2
- package/dist/contracts/platform/index.mjs +0 -1
- package/dist/contracts/provider/index.d.mts +0 -3
- package/dist/contracts/provider/index.mjs +0 -1
- package/dist/contracts/session/index.d.mts +0 -3
- package/dist/contracts/session/index.mjs +0 -1
- package/dist/contracts/shared/index.d.mts +0 -2
- package/dist/contracts/shared/index.mjs +0 -1
- package/dist/contracts/skill/index.d.mts +0 -2
- package/dist/contracts/skill/index.mjs +0 -1
- package/dist/contracts/timeout/index.d.mts +0 -2
- package/dist/contracts/timeout/index.mjs +0 -1
- package/dist/contracts/toast/index.d.mts +0 -198
- package/dist/contracts/toast/index.mjs +0 -1
- package/dist/contracts/variant/index.d.mts +0 -2
- package/dist/contracts/variant/index.mjs +0 -1
- package/dist/core/index.d.mts +0 -1001
- package/dist/core/index.mjs +0 -1
- package/dist/credential-ref-DLCsoKVZ.mjs +0 -1
- package/dist/cursor-storage-BoNI7OAR.mjs +0 -1
- package/dist/definition-DB7bbFSa.d.mts +0 -369
- package/dist/definition-DkYy1PZz.mjs +0 -1
- package/dist/definition-DtUNiGom.d.mts +0 -158
- package/dist/drizzle-Bn2GtW8c.mjs +0 -1
- package/dist/execution-target-D6MgthYs.mjs +0 -1
- package/dist/extension-53GerdGg.mjs +0 -1
- package/dist/extension-fJmv8Yri.mjs +0 -1
- package/dist/extension-namespace-CTd9kOtt.mjs +0 -1
- package/dist/handlers-DR_4_rAT.mjs +0 -41
- package/dist/harness-B6lGP9rm.mjs +0 -1
- package/dist/hooks/index.d.mts +0 -423
- package/dist/hooks/index.mjs +0 -1
- package/dist/host-CvEht5RT.mjs +0 -1
- package/dist/identity-DBST3-XO.mjs +0 -1
- package/dist/index-6lyShOoU.d.mts +0 -225
- package/dist/index-7sXlairn2.d.mts +0 -43
- package/dist/index-BXP9GK5q.d.mts +0 -1075
- package/dist/index-BePI0ckL.d.mts +0 -40
- package/dist/index-Bigx81Kr.d.mts +0 -37
- package/dist/index-BnNqbx2I.d.mts +0 -134
- package/dist/index-BnSQE7z7.d.mts +0 -4843
- package/dist/index-C-myW_aK.d.mts +0 -412
- package/dist/index-C_kS2aqV2.d.mts +0 -438
- package/dist/index-Ch3ph52M2.d.mts +0 -40
- package/dist/index-CnZOKNjU.d.mts +0 -89
- package/dist/index-CnmPtjnA.d.mts +0 -995
- package/dist/index-Cq8B7cwK.d.mts +0 -13592
- package/dist/index-D1T-PPqF.d.mts +0 -67
- package/dist/index-D2jejYlV.d.mts +0 -180
- package/dist/index-D7T8XCku.d.mts +0 -341
- package/dist/index-DEw90pa2.d.mts +0 -183
- package/dist/index-DGTFJB_8.d.mts +0 -729
- package/dist/index-DQRsGXb5.d.mts +0 -109
- package/dist/index-DQWMu5fS.d.mts +0 -6760
- package/dist/index-DaEp4UWW.d.mts +0 -996
- package/dist/index-Dd5s4MSm.d.mts +0 -72
- package/dist/index-DwCA1HWa.d.mts +0 -2992
- package/dist/index-E8d_RwaF.d.mts +0 -28
- package/dist/index-ESSDWIB7.d.mts +0 -11
- package/dist/index-N5K1NOYs.d.mts +0 -184
- package/dist/index-SzSiyG61.d.mts +0 -117
- package/dist/index-WKjrpcA_.d.mts +0 -218
- package/dist/index-e5C62_M3.d.mts +0 -3917
- package/dist/index-iID2R9G1.d.mts +0 -1490
- package/dist/index-sBob9D25.d.mts +0 -389
- package/dist/index-tKvu34DJ2.d.mts +0 -535
- package/dist/index-yvN8UcEH.d.mts +0 -1730
- package/dist/kernel/cli/index.d.mts +0 -141
- package/dist/kernel/cli/index.mjs +0 -1
- package/dist/kernel/cli/schemas.d.mts +0 -63
- package/dist/kernel/cli/schemas.mjs +0 -1
- package/dist/kernel/extension/index.d.mts +0 -2
- package/dist/kernel/extension/index.mjs +0 -1
- package/dist/kernel/index.d.mts +0 -296
- package/dist/kernel/index.mjs +0 -1
- package/dist/kernel/namespace/index.d.mts +0 -2
- package/dist/kernel/namespace/index.mjs +0 -1
- package/dist/kernel/observability/index.d.mts +0 -2
- package/dist/kernel/observability/index.mjs +0 -1
- package/dist/kernel/providers/index.d.mts +0 -2
- package/dist/kernel/providers/index.mjs +0 -1
- package/dist/kernel/window/index.d.mts +0 -2
- package/dist/kernel/window/index.mjs +0 -1
- package/dist/model-registry-Dzpssh9j.mjs +0 -1
- package/dist/model-registry-xINyxQUT.mjs +0 -1
- package/dist/namespace-B1E57soL.d.mts +0 -580
- package/dist/namespace-B5ZCshBw.d.mts +0 -2046
- package/dist/namespace-BCRNwPnw.d.mts +0 -1313
- package/dist/namespace-BK2erxpV.d.mts +0 -921
- package/dist/namespace-BKrV_2gZ.d.mts +0 -3019
- package/dist/namespace-BpIE-jQW.d.mts +0 -2226
- package/dist/namespace-C54Oj025.d.mts +0 -159
- package/dist/namespace-C_h7scWx2.mjs +0 -1
- package/dist/namespace-DBw9BYr8.mjs +0 -1
- package/dist/namespace-DGMO2E8f.mjs +0 -1
- package/dist/namespace-DUVgMfTR.mjs +0 -1
- package/dist/namespace-DXnMk3U8.d.mts +0 -611
- package/dist/namespace-DZcuLwEA.d.mts +0 -51
- package/dist/namespace-DwCyOaZn2.d.mts +0 -189
- package/dist/namespace-GLGGcWPH.d.mts +0 -43
- package/dist/namespace-OwAf1Brw.mjs +0 -1
- package/dist/namespace-Ysg1N6rR.d.mts +0 -767
- package/dist/namespace-Zb8HAbyF.mjs +0 -1
- package/dist/namespace-ZbthBQVt.d.mts +0 -142
- package/dist/namespace-aALq9tnE.mjs +0 -1
- package/dist/namespace-yxIxUsjo.mjs +0 -1
- package/dist/native-session-supervisor-zPt624Tp.mjs +0 -1
- package/dist/node/bus-server/index.d.mts +0 -178
- package/dist/node/bus-server/index.mjs +0 -1
- package/dist/node/bus-server/server-lifecycle.d.mts +0 -2
- package/dist/node/bus-server/server-lifecycle.mjs +0 -1
- package/dist/node/machine-identity/index.d.mts +0 -85
- package/dist/node/machine-identity/index.mjs +0 -3
- package/dist/node/transports/index.d.mts +0 -1752
- package/dist/node/transports/index.mjs +0 -2
- package/dist/orchestrator-shared-D2txLAUs.mjs +0 -1
- package/dist/orchestrator-shared-DrjtTXYh.d.mts +0 -249
- package/dist/platform-BMFUpmTA.mjs +0 -1
- package/dist/profile-Cq4A7kQa.mjs +0 -1
- package/dist/provider-context-BB4eD8ON.mjs +0 -1
- package/dist/providers/index.d.mts +0 -135
- package/dist/providers/index.mjs +0 -1
- package/dist/providers-DhiW_fx4.mjs +0 -1
- package/dist/providers-namespace-CDwxY_DV.d.mts +0 -583
- package/dist/schema-B295yplx.d.mts +0 -837
- package/dist/schema-C4iznV0q.mjs +0 -1
- package/dist/schema-D3ZG13h9.mjs +0 -1
- package/dist/schema-introspection-DCYC47_d.mjs +0 -1
- package/dist/schemas-BWvuaL0w.d.mts +0 -160
- package/dist/schemas-BfMZAwff.d.mts +0 -182
- package/dist/schemas-Bn8aqDIE.mjs +0 -1
- package/dist/schemas-C31qbb0s.d.mts +0 -312
- package/dist/schemas-C5xtVqdb.d.mts +0 -46
- package/dist/schemas-CEBe89yE.mjs +0 -1
- package/dist/schemas-COnLJnt_.mjs +0 -1
- package/dist/schemas-CrnlCRep.mjs +0 -1
- package/dist/schemas-DYqKRNju.d.mts +0 -174
- package/dist/schemas-Di0XnnMX.d.mts +0 -73
- package/dist/schemas-KMA1efQg.d.mts +0 -944
- package/dist/schemas-Ra8pz5M-.d.mts +0 -463
- package/dist/schemas-sshQEF3l.d.mts +0 -237
- package/dist/server-lifecycle-BC6FRn86.d.mts +0 -160
- package/dist/server-lifecycle-Dx5WgfoS.mjs +0 -1
- package/dist/service-base/index.d.mts +0 -98
- package/dist/service-base/index.mjs +0 -1
- package/dist/services/adapter-runtime/index.d.mts +0 -4
- package/dist/services/adapter-runtime/index.mjs +0 -1
- package/dist/services/adapter-runtime/namespace.d.mts +0 -2
- package/dist/services/adapter-runtime/namespace.mjs +0 -1
- package/dist/services/adapter-runtime/schemas.d.mts +0 -2
- package/dist/services/adapter-runtime/schemas.mjs +0 -1
- package/dist/services/adapter-subsystem/index.d.mts +0 -3
- package/dist/services/adapter-subsystem/index.mjs +0 -1
- package/dist/services/adapter-subsystem/namespace.d.mts +0 -2
- package/dist/services/adapter-subsystem/namespace.mjs +0 -1
- package/dist/services/agent-runtime/index.d.mts +0 -3
- package/dist/services/agent-runtime/index.mjs +0 -1
- package/dist/services/agent-runtime/namespace.d.mts +0 -2
- package/dist/services/agent-runtime/namespace.mjs +0 -1
- package/dist/services/agent-runtime/schemas.d.mts +0 -2
- package/dist/services/agent-runtime/schemas.mjs +0 -1
- package/dist/services/capability/index.d.mts +0 -2
- package/dist/services/capability/index.mjs +0 -1
- package/dist/services/cli-detection/namespace.d.mts +0 -56
- package/dist/services/cli-detection/namespace.mjs +0 -1
- package/dist/services/codebase/index.d.mts +0 -3
- package/dist/services/codebase/index.mjs +0 -1
- package/dist/services/codebase/namespace.d.mts +0 -2
- package/dist/services/codebase/namespace.mjs +0 -1
- package/dist/services/codebase/schemas.d.mts +0 -2
- package/dist/services/codebase/schemas.mjs +0 -1
- package/dist/services/compression/index.d.mts +0 -3
- package/dist/services/compression/index.mjs +0 -1
- package/dist/services/compression/namespace.d.mts +0 -2
- package/dist/services/compression/namespace.mjs +0 -1
- package/dist/services/compression/schemas.d.mts +0 -2
- package/dist/services/compression/schemas.mjs +0 -1
- package/dist/services/context-rules/index.d.mts +0 -412
- package/dist/services/context-rules/index.mjs +0 -1
- package/dist/services/credential-change/index.d.mts +0 -17
- package/dist/services/credential-change/index.mjs +0 -1
- package/dist/services/definition/index.d.mts +0 -2
- package/dist/services/definition/index.mjs +0 -1
- package/dist/services/definition/namespace.d.mts +0 -71
- package/dist/services/definition/namespace.mjs +0 -1
- package/dist/services/definition/schemas.d.mts +0 -38
- package/dist/services/definition/schemas.mjs +0 -1
- package/dist/services/dialog/namespace.d.mts +0 -105
- package/dist/services/dialog/namespace.mjs +0 -1
- package/dist/services/dialog/schemas.d.mts +0 -109
- package/dist/services/dialog/schemas.mjs +0 -1
- package/dist/services/execution-target/index.d.mts +0 -4
- package/dist/services/execution-target/index.mjs +0 -1
- package/dist/services/execution-target/namespace.d.mts +0 -2
- package/dist/services/execution-target/namespace.mjs +0 -1
- package/dist/services/execution-target/schemas.d.mts +0 -2
- package/dist/services/execution-target/schemas.mjs +0 -1
- package/dist/services/filesystem/namespace.d.mts +0 -432
- package/dist/services/filesystem/namespace.mjs +0 -1
- package/dist/services/filesystem/schemas.d.mts +0 -240
- package/dist/services/filesystem/schemas.mjs +0 -1
- package/dist/services/harness/index.d.mts +0 -861
- package/dist/services/harness/index.mjs +0 -1
- package/dist/services/harness/storage/schema.d.mts +0 -424
- package/dist/services/harness/storage/schema.mjs +0 -1
- package/dist/services/index.d.mts +0 -5702
- package/dist/services/index.mjs +0 -1
- package/dist/services/local-notification/index.d.mts +0 -25
- package/dist/services/local-notification/index.mjs +0 -1
- package/dist/services/local-notification/namespace.d.mts +0 -73
- package/dist/services/local-notification/namespace.mjs +0 -1
- package/dist/services/local-notification/schemas.d.mts +0 -88
- package/dist/services/local-notification/schemas.mjs +0 -1
- package/dist/services/log-import/browser.d.mts +0 -3
- package/dist/services/log-import/browser.mjs +0 -1
- package/dist/services/log-import/index.d.mts +0 -275
- package/dist/services/log-import/index.mjs +0 -2
- package/dist/services/log-import/log-import.d.mts +0 -3
- package/dist/services/log-import/log-import.mjs +0 -1
- package/dist/services/log-import/namespace.d.mts +0 -327
- package/dist/services/log-import/namespace.mjs +0 -1
- package/dist/services/log-import/schemas.d.mts +0 -217
- package/dist/services/log-import/schemas.mjs +0 -1
- package/dist/services/model-registry/index.d.mts +0 -2
- package/dist/services/model-registry/index.mjs +0 -1
- package/dist/services/preferences/index.d.mts +0 -3
- package/dist/services/preferences/index.mjs +0 -1
- package/dist/services/preferences/schemas.d.mts +0 -2
- package/dist/services/preferences/schemas.mjs +0 -1
- package/dist/services/preferences/storage-namespace.d.mts +0 -3
- package/dist/services/preferences/storage-namespace.mjs +0 -1
- package/dist/services/provider-context/index.d.mts +0 -2
- package/dist/services/provider-context/index.mjs +0 -1
- package/dist/services/provider-runtime/index.d.mts +0 -136
- package/dist/services/provider-runtime/index.mjs +0 -1
- package/dist/services/session/handlers/index.d.mts +0 -2
- package/dist/services/session/handlers/index.mjs +0 -1
- package/dist/services/session/index.d.mts +0 -10
- package/dist/services/session/index.mjs +0 -1
- package/dist/services/session/messages/namespace.d.mts +0 -2
- package/dist/services/session/messages/namespace.mjs +0 -1
- package/dist/services/session/orchestrator-testing/index.d.mts +0 -2
- package/dist/services/session/orchestrator-testing/index.mjs +0 -1
- package/dist/services/session/session-events/namespace.d.mts +0 -2
- package/dist/services/session/session-events/namespace.mjs +0 -1
- package/dist/services/session/storage/namespace.d.mts +0 -2
- package/dist/services/session/storage/namespace.mjs +0 -1
- package/dist/services/session/storage/schema.d.mts +0 -2
- package/dist/services/session/storage/schema.mjs +0 -1
- package/dist/services/session/testing/index.d.mts +0 -35
- package/dist/services/session/testing/index.mjs +0 -52
- package/dist/services/session/testing/orchestrator-shared.d.mts +0 -2
- package/dist/services/session/testing/orchestrator-shared.mjs +0 -1
- package/dist/services/session/turns/namespace.d.mts +0 -2
- package/dist/services/session/turns/namespace.mjs +0 -1
- package/dist/services/session-editor/index.d.mts +0 -119
- package/dist/services/session-editor/index.mjs +0 -1
- package/dist/services/settings/index.d.mts +0 -47
- package/dist/services/settings/index.mjs +0 -1
- package/dist/services/settings/namespace.d.mts +0 -662
- package/dist/services/settings/namespace.mjs +0 -1
- package/dist/services/settings/storage/clients-namespace.d.mts +0 -2
- package/dist/services/settings/storage/clients-namespace.mjs +0 -1
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +0 -184
- package/dist/services/settings/storage/extension-configs/namespace.mjs +0 -1
- package/dist/services/settings/storage/index.d.mts +0 -4
- package/dist/services/settings/storage/index.mjs +0 -1
- package/dist/services/settings/storage/providers-namespace.d.mts +0 -2
- package/dist/services/settings/storage/providers-namespace.mjs +0 -1
- package/dist/services/tool-approval/index.d.mts +0 -2
- package/dist/services/tool-approval/index.mjs +0 -1
- package/dist/services/tools/index.d.mts +0 -2
- package/dist/services/tools/index.mjs +0 -1
- package/dist/services/tray-menu/index.d.mts +0 -4
- package/dist/services/tray-menu/index.mjs +0 -1
- package/dist/services/tray-menu/namespace.d.mts +0 -2
- package/dist/services/tray-menu/namespace.mjs +0 -1
- package/dist/services/tray-menu/schemas.d.mts +0 -2
- package/dist/services/tray-menu/schemas.mjs +0 -1
- package/dist/services/turn/index.d.mts +0 -2
- package/dist/services/turn/index.mjs +0 -1
- package/dist/services/turn/namespace.d.mts +0 -2
- package/dist/services/turn/namespace.mjs +0 -1
- package/dist/services/turn/schemas.d.mts +0 -335
- package/dist/services/turn/schemas.mjs +0 -1
- package/dist/services/worker/index.d.mts +0 -3
- package/dist/services/worker/index.mjs +0 -1
- package/dist/services/worker/namespace.d.mts +0 -2
- package/dist/services/worker/namespace.mjs +0 -1
- package/dist/services/worker/schemas.d.mts +0 -2
- package/dist/services/worker/schemas.mjs +0 -1
- package/dist/session-BCSf-Fgj.mjs +0 -1
- package/dist/session-BNo_cIiz.mjs +0 -123
- package/dist/session-lineage-B0cpHfuc.d.mts +0 -65
- package/dist/shared-BhuSHZXH.mjs +0 -1
- package/dist/shared-schemas-Byah36lG.mjs +0 -1
- package/dist/skill-20_SBXaI.mjs +0 -1
- package/dist/storage/drizzle/client.d.mts +0 -78
- package/dist/storage/drizzle/client.mjs +0 -1
- package/dist/storage/drizzle/index.d.mts +0 -98
- package/dist/storage/drizzle/index.mjs +0 -1
- package/dist/storage/handlers/drizzle/index.d.mts +0 -2
- package/dist/storage/handlers/drizzle/index.mjs +0 -1
- package/dist/storage/handlers/index.d.mts +0 -33
- package/dist/storage/handlers/index.mjs +0 -1
- package/dist/storage/index.d.mts +0 -192
- package/dist/storage/index.mjs +0 -1
- package/dist/storage-namespace-BIDs9LPb.mjs +0 -1
- package/dist/storage-namespace-DoH-Wkjp.d.mts +0 -221
- package/dist/storage-namespace-definition-BjK9nZAN.mjs +0 -1
- package/dist/storage-namespace-definition-CJgqyXH1.d.mts +0 -17
- package/dist/style.css +0 -3782
- package/dist/testing/drizzle-harness.d.mts +0 -130
- package/dist/testing/drizzle-harness.mjs +0 -1
- package/dist/testing/index.d.mts +0 -106
- package/dist/testing/index.mjs +0 -1
- package/dist/timeout-D33CUZ0M.mjs +0 -1
- package/dist/tool-approval-service-CZCPfvVy.mjs +0 -1
- package/dist/tools/index.d.mts +0 -825
- package/dist/tools/index.mjs +0 -1
- package/dist/tools/testing/index.d.mts +0 -53
- package/dist/tools/testing/index.mjs +0 -1
- package/dist/tools-Cid9D99F.mjs +0 -1
- package/dist/tray-menu-service-BAYtLdAg.mjs +0 -1
- package/dist/types--nrtGZ1V.d.mts +0 -6619
- package/dist/types-6WxLfoM3.d.mts +0 -31
- package/dist/types-C11LvekX.d.mts +0 -1009
- package/dist/types-Cvrj2ogm.d.mts +0 -305
- package/dist/types-DYF5LxZY.d.mts +0 -233
- package/dist/types-t295YC6T.d.mts +0 -262
- package/dist/types-vNpkAe4Y.d.mts +0 -128
- package/dist/ui-components/index.d.mts +0 -2342
- package/dist/ui-components/index.mjs +0 -8
- package/dist/ui-config-zawaoEfB.mjs +0 -1
- package/dist/ui-hooks/index.d.mts +0 -1805
- package/dist/ui-hooks/index.mjs +0 -1
- package/dist/ui-kernel/index.d.mts +0 -2793
- package/dist/ui-kernel/index.mjs +0 -1
- package/dist/ui-kernel/pages/namespace.d.mts +0 -88
- package/dist/ui-kernel/pages/namespace.mjs +0 -1
- package/dist/ui-kernel/pages/schemas.d.mts +0 -2
- package/dist/ui-kernel/pages/schemas.mjs +0 -1
- package/dist/ui-views/index.d.mts +0 -487
- package/dist/ui-views/index.mjs +0 -30
- package/dist/utils/health-probe.d.mts +0 -26
- package/dist/utils/health-probe.mjs +0 -1
- package/dist/utils/index.d.mts +0 -227
- package/dist/utils/index.mjs +0 -2
- package/dist/utils/keychain.d.mts +0 -31
- package/dist/utils/keychain.mjs +0 -1
- package/dist/utils/resolve-package-root.d.mts +0 -12
- package/dist/utils/resolve-package-root.mjs +0 -1
- package/dist/utils/workspace-root.d.mts +0 -27
- package/dist/utils/workspace-root.mjs +0 -2
- package/dist/variant-BZWfmS0q.mjs +0 -1
- package/dist/version-D8S4O22A.mjs +0 -1
- package/dist/visibility-CZu8ooOA.mjs +0 -1
- package/dist/window-registry-B_-hBEcV.mjs +0 -1
- package/dist/window-registry-C_IJmY8_.d.mts +0 -130
package/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makaio/framework",
|
|
3
|
-
"version": "1.0.0-dev-
|
|
3
|
+
"version": "1.0.0-dev-1781022866275",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/makaio-ai/makaio-framework.git",
|
|
7
|
+
"directory": "packages/framework"
|
|
8
|
+
},
|
|
4
9
|
"description": "Typed, bus-centric framework for building and orchestrating AI agents with tools, sessions, and events",
|
|
5
10
|
"license": "MIT",
|
|
6
11
|
"type": "module",
|
|
@@ -46,6 +51,10 @@
|
|
|
46
51
|
"types": "./dist/contracts/adapter/index.d.mts",
|
|
47
52
|
"default": "./dist/contracts/adapter/index.mjs"
|
|
48
53
|
},
|
|
54
|
+
"./contracts/artifact": {
|
|
55
|
+
"types": "./dist/contracts/artifact/index.d.mts",
|
|
56
|
+
"default": "./dist/contracts/artifact/index.mjs"
|
|
57
|
+
},
|
|
49
58
|
"./contracts/adapter/schemas/session-lineage": {
|
|
50
59
|
"types": "./dist/contracts/adapter/schemas/session-lineage.d.mts",
|
|
51
60
|
"default": "./dist/contracts/adapter/schemas/session-lineage.mjs"
|
|
@@ -66,6 +75,14 @@
|
|
|
66
75
|
"types": "./dist/contracts/extension/index.d.mts",
|
|
67
76
|
"default": "./dist/contracts/extension/index.mjs"
|
|
68
77
|
},
|
|
78
|
+
"./contracts/facet": {
|
|
79
|
+
"types": "./dist/contracts/facet/index.d.mts",
|
|
80
|
+
"default": "./dist/contracts/facet/index.mjs"
|
|
81
|
+
},
|
|
82
|
+
"./contracts/materialization": {
|
|
83
|
+
"types": "./dist/contracts/materialization/index.d.mts",
|
|
84
|
+
"default": "./dist/contracts/materialization/index.mjs"
|
|
85
|
+
},
|
|
69
86
|
"./contracts/model-registry": {
|
|
70
87
|
"types": "./dist/contracts/model-registry/index.d.mts",
|
|
71
88
|
"default": "./dist/contracts/model-registry/index.mjs"
|
|
@@ -134,6 +151,10 @@
|
|
|
134
151
|
"types": "./dist/clients/index.d.mts",
|
|
135
152
|
"default": "./dist/clients/index.mjs"
|
|
136
153
|
},
|
|
154
|
+
"./git": {
|
|
155
|
+
"types": "./dist/git/index.d.mts",
|
|
156
|
+
"default": "./dist/git/index.mjs"
|
|
157
|
+
},
|
|
137
158
|
"./services": {
|
|
138
159
|
"types": "./dist/services/index.d.mts",
|
|
139
160
|
"default": "./dist/services/index.mjs"
|
|
@@ -182,6 +203,10 @@
|
|
|
182
203
|
"types": "./dist/services/session/storage/namespace.d.mts",
|
|
183
204
|
"default": "./dist/services/session/storage/namespace.mjs"
|
|
184
205
|
},
|
|
206
|
+
"./services/subagent": {
|
|
207
|
+
"types": "./dist/services/subagent/index.d.mts",
|
|
208
|
+
"default": "./dist/services/subagent/index.mjs"
|
|
209
|
+
},
|
|
185
210
|
"./services/tool-approval": {
|
|
186
211
|
"types": "./dist/services/tool-approval/index.d.mts",
|
|
187
212
|
"default": "./dist/services/tool-approval/index.mjs"
|
|
@@ -190,6 +215,26 @@
|
|
|
190
215
|
"types": "./dist/services/cli-detection/namespace.d.mts",
|
|
191
216
|
"default": "./dist/services/cli-detection/namespace.mjs"
|
|
192
217
|
},
|
|
218
|
+
"./services/filesystem": {
|
|
219
|
+
"types": "./dist/services/filesystem/index.d.mts",
|
|
220
|
+
"default": "./dist/services/filesystem/index.mjs"
|
|
221
|
+
},
|
|
222
|
+
"./services/filesystem/namespace": {
|
|
223
|
+
"types": "./dist/services/filesystem/namespace.d.mts",
|
|
224
|
+
"default": "./dist/services/filesystem/namespace.mjs"
|
|
225
|
+
},
|
|
226
|
+
"./services/filesystem/schemas": {
|
|
227
|
+
"types": "./dist/services/filesystem/schemas.d.mts",
|
|
228
|
+
"default": "./dist/services/filesystem/schemas.mjs"
|
|
229
|
+
},
|
|
230
|
+
"./services/git/namespace": {
|
|
231
|
+
"types": "./dist/services/git/namespace.d.mts",
|
|
232
|
+
"default": "./dist/services/git/namespace.mjs"
|
|
233
|
+
},
|
|
234
|
+
"./services/git/schemas": {
|
|
235
|
+
"types": "./dist/services/git/schemas.d.mts",
|
|
236
|
+
"default": "./dist/services/git/schemas.mjs"
|
|
237
|
+
},
|
|
193
238
|
"./services/log-import": {
|
|
194
239
|
"types": "./dist/services/log-import/index.d.mts",
|
|
195
240
|
"default": "./dist/services/log-import/index.mjs"
|
|
@@ -342,9 +387,17 @@
|
|
|
342
387
|
"types": "./dist/utils/health-probe.d.mts",
|
|
343
388
|
"default": "./dist/utils/health-probe.mjs"
|
|
344
389
|
},
|
|
390
|
+
"./utils/project-manifest": {
|
|
391
|
+
"types": "./dist/utils/project-manifest.d.mts",
|
|
392
|
+
"default": "./dist/utils/project-manifest.mjs"
|
|
393
|
+
},
|
|
394
|
+
"./utils/workspace-packages": {
|
|
395
|
+
"types": "./dist/utils/workspace-packages.d.mts",
|
|
396
|
+
"default": "./dist/utils/workspace-packages.mjs"
|
|
397
|
+
},
|
|
345
398
|
"./utils/workspace-root": {
|
|
346
399
|
"types": "./dist/utils/workspace-root.d.mts",
|
|
347
400
|
"default": "./dist/utils/workspace-root.mjs"
|
|
348
401
|
}
|
|
349
402
|
}
|
|
350
|
-
}
|
|
403
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as e}from"./shared-BhuSHZXH.mjs";import{g as t,h as n}from"./profile-Cq4A7kQa.mjs";import{n as r}from"./version-D8S4O22A.mjs";import{z as i}from"zod";const a=i.enum([`strong`,`alias`]),o=i.object({scheme:t,value:t,strength:a}),s=i.object({key:t,label:i.string(),usedPercentage:i.number().finite().min(0).max(100),resetsAt:n.optional()}),c=i.object({windows:i.array(s)}),l=i.record(i.string(),i.unknown()).optional(),u=i.object({clientId:t,found:i.boolean(),version:i.string().optional(),warningMessage:i.string().optional()}),d=i.object({clientId:t,binaryName:t,supportedVersions:r.optional()}),f=i.object({clientAccountId:t,clientId:t,observedAt:n,source:t,displayLabel:i.string().optional(),usage:c,metadata:l}),p=i.discriminatedUnion(`kind`,[i.object({kind:i.literal(`session`),sessionId:t}),i.object({kind:i.literal(`adapter-session`),adapterSessionId:t}),i.object({kind:i.literal(`both`),sessionId:t,adapterSessionId:t})]),m=i.object({clientId:i.string(),source:i.string(),kind:i.string(),observedAt:n,payload:e}),h={request:i.object({clientId:t,observedAt:n.optional(),displayLabel:i.string().optional(),identifiers:i.array(o).min(1),metadata:l}),response:i.object({clientAccountId:t,displayLabel:i.string().optional()})},g={request:m.extend({locator:p}),response:i.object({handled:i.boolean(),sessionId:t.nullable(),clientAccountId:t.nullable(),changed:i.boolean()})},_={request:i.object({clientId:t,observedAt:n,source:t,account:i.object({displayLabel:i.string().optional(),identifiers:i.array(o).min(1)}),usage:c,metadata:l}),response:i.object({clientAccountId:t,snapshot:f})};export{l as a,g as c,f as d,s as f,m as i,p as l,h as n,u as o,c as p,a as r,d as s,o as t,_ as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,ot as u,p as d,r as f,s as p,t as m,u as h,v as g,x as _,y as v}from"./schemas-Bn8aqDIE.mjs";import"./contracts/adapter/schemas/session-lineage.mjs";import{createBusNamespace as y}from"@makaio/framework/core";const b={getCapabilities:u,startAgent:_,infer:t,listAgents:v,getAgent:g,stopAgent:e,rehydrateAgent:a,getConfigSchema:o,"agent.created":l,"session.created":d,"session.discovered":s,"session.linked":f,"session.statusChanged":m,"session.usage":i,"session.closed":r,log:h,error:c,initialized:n,quota:p},x=y(`adapter`,b),S=x.subjects;export{S as n,b as r,x as t};
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import * as acp from "@agentclientprotocol/sdk";
|
|
2
|
-
import { Client, CreateTerminalRequest, CreateTerminalResponse, KillTerminalRequest, KillTerminalResponse, ReadTextFileRequest, ReadTextFileResponse, ReleaseTerminalRequest, ReleaseTerminalResponse, RequestPermissionRequest, RequestPermissionResponse, SessionNotification, TerminalOutputRequest, TerminalOutputResponse, WaitForTerminalExitRequest, WaitForTerminalExitResponse, WriteTextFileRequest, WriteTextFileResponse } from "@agentclientprotocol/sdk";
|
|
3
|
-
|
|
4
|
-
//#region adapters/shared/acp-client/src/terminal-manager.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Manages stateful terminal lifecycles for ACP agents.
|
|
7
|
-
*
|
|
8
|
-
* ACP's terminal protocol is stateful (create → output → wait_for_exit → kill → release),
|
|
9
|
-
* which does not map cleanly to a single request/response. This manager handles direct
|
|
10
|
-
* child_process lifecycle with bounded output buffering.
|
|
11
|
-
*/
|
|
12
|
-
declare class TerminalManager {
|
|
13
|
-
private readonly terminals;
|
|
14
|
-
private nextId;
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new terminal subprocess.
|
|
17
|
-
* @param params - ACP create terminal request
|
|
18
|
-
* @returns Terminal ID for subsequent operations
|
|
19
|
-
*/
|
|
20
|
-
createTerminal(params: acp.CreateTerminalRequest): Promise<acp.CreateTerminalResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* Gets the current output of a terminal without waiting for it to exit.
|
|
23
|
-
* @param params - ACP terminal output request
|
|
24
|
-
* @returns Current buffered output and truncation status
|
|
25
|
-
*/
|
|
26
|
-
getOutput(params: acp.TerminalOutputRequest): Promise<acp.TerminalOutputResponse>;
|
|
27
|
-
/**
|
|
28
|
-
* Waits for a terminal process to exit.
|
|
29
|
-
* @param params - ACP wait for exit request
|
|
30
|
-
* @returns Exit code and terminating signal
|
|
31
|
-
*/
|
|
32
|
-
waitForExit(params: acp.WaitForTerminalExitRequest): Promise<acp.WaitForTerminalExitResponse>;
|
|
33
|
-
/**
|
|
34
|
-
* Kills a terminal process without releasing it.
|
|
35
|
-
*
|
|
36
|
-
* The terminal remains valid after this call, allowing callers to retrieve
|
|
37
|
-
* final output before releasing.
|
|
38
|
-
* @param params - ACP kill terminal request
|
|
39
|
-
* @returns Empty response object
|
|
40
|
-
*/
|
|
41
|
-
killTerminal(params: acp.KillTerminalRequest): Promise<acp.KillTerminalResponse>;
|
|
42
|
-
/**
|
|
43
|
-
* Releases a terminal, killing the process and freeing all associated resources.
|
|
44
|
-
*
|
|
45
|
-
* After this call the terminal ID is no longer valid.
|
|
46
|
-
* @param params - ACP release terminal request
|
|
47
|
-
* @returns Empty response object
|
|
48
|
-
*/
|
|
49
|
-
releaseTerminal(params: acp.ReleaseTerminalRequest): Promise<acp.ReleaseTerminalResponse>;
|
|
50
|
-
/**
|
|
51
|
-
* Kills and removes all managed terminals.
|
|
52
|
-
*
|
|
53
|
-
* Should be called during connector shutdown to prevent resource leaks.
|
|
54
|
-
*/
|
|
55
|
-
releaseAll(): void;
|
|
56
|
-
/**
|
|
57
|
-
* Returns a managed terminal by ID, throwing if not found.
|
|
58
|
-
* @param terminalId - Terminal identifier assigned at creation time
|
|
59
|
-
* @returns The managed terminal state
|
|
60
|
-
*/
|
|
61
|
-
private requireTerminal;
|
|
62
|
-
}
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region adapters/shared/acp-client/src/types.d.ts
|
|
65
|
-
/**
|
|
66
|
-
* Configuration for spawning an ACP agent subprocess.
|
|
67
|
-
*/
|
|
68
|
-
interface AcpConnectionOptions {
|
|
69
|
-
/** Subprocess command (e.g., 'qwen') */
|
|
70
|
-
command: string;
|
|
71
|
-
/** CLI arguments (e.g., ['--acp', '--model', 'qwen3-coder']) */
|
|
72
|
-
args: string[];
|
|
73
|
-
/** Working directory for the subprocess */
|
|
74
|
-
cwd: string;
|
|
75
|
-
/** Environment variables passed to the subprocess */
|
|
76
|
-
env: Record<string, string>;
|
|
77
|
-
/** Callback for stderr output */
|
|
78
|
-
onStderr?: (data: string) => void;
|
|
79
|
-
/** Callback for subprocess spawn/runtime errors */
|
|
80
|
-
onError?: (error: Error) => void;
|
|
81
|
-
/** Callback for subprocess exit */
|
|
82
|
-
onExit?: (code: number | null) => void;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Handle to a running ACP connection (subprocess + protocol layer).
|
|
86
|
-
*/
|
|
87
|
-
interface AcpConnectionHandle {
|
|
88
|
-
/** The ACP client-side connection for sending requests to the agent */
|
|
89
|
-
connection: acp.ClientSideConnection;
|
|
90
|
-
/** Kill the subprocess with SIGTERM */
|
|
91
|
-
kill(): void;
|
|
92
|
-
/** Promise that resolves with the exit code when the subprocess exits */
|
|
93
|
-
exited: Promise<number | null>;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Callbacks for routing ACP server requests to Makaio infrastructure.
|
|
97
|
-
*/
|
|
98
|
-
interface MakaioAcpClientConfig {
|
|
99
|
-
/**
|
|
100
|
-
* Handle session update notifications (message chunks, tool calls, usage, etc.).
|
|
101
|
-
* @param notification - The session notification from the agent
|
|
102
|
-
*/
|
|
103
|
-
onSessionUpdate: (notification: acp.SessionNotification) => Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Handle permission requests (tool approval).
|
|
106
|
-
* @param params - The permission request from the agent
|
|
107
|
-
*/
|
|
108
|
-
onRequestPermission: (params: acp.RequestPermissionRequest) => Promise<acp.RequestPermissionResponse>;
|
|
109
|
-
/**
|
|
110
|
-
* Handle file read requests. Only required if fs.readTextFile capability is advertised.
|
|
111
|
-
* @param params - The read file request from the agent
|
|
112
|
-
*/
|
|
113
|
-
onReadTextFile?: (params: acp.ReadTextFileRequest) => Promise<acp.ReadTextFileResponse>;
|
|
114
|
-
/**
|
|
115
|
-
* Handle file write requests. Only required if fs.writeTextFile capability is advertised.
|
|
116
|
-
* @param params - The write file request from the agent
|
|
117
|
-
*/
|
|
118
|
-
onWriteTextFile?: (params: acp.WriteTextFileRequest) => Promise<acp.WriteTextFileResponse>;
|
|
119
|
-
/** Terminal lifecycle manager for stateful terminal operations */
|
|
120
|
-
terminalManager?: TerminalManager;
|
|
121
|
-
}
|
|
122
|
-
//#endregion
|
|
123
|
-
//#region adapters/shared/acp-client/src/connection.d.ts
|
|
124
|
-
/**
|
|
125
|
-
* Spawns an ACP agent subprocess and establishes a protocol connection over stdio.
|
|
126
|
-
*
|
|
127
|
-
* The subprocess stdin/stdout are bridged to the ACP SDK via Web Streams using
|
|
128
|
-
* `Readable.toWeb()` / `Writable.toWeb()` (Node.js 16+). The returned handle
|
|
129
|
-
* exposes the {@link acp.ClientSideConnection} for issuing ACP requests along with
|
|
130
|
-
* lifecycle controls.
|
|
131
|
-
* @param clientFactory - Factory called with the negotiated {@link acp.Agent} proxy;
|
|
132
|
-
* must return the {@link acp.Client} implementation that handles incoming agent requests
|
|
133
|
-
* @param options - Subprocess spawn configuration
|
|
134
|
-
* @returns Handle containing the live connection, a kill function, and an exit promise
|
|
135
|
-
*/
|
|
136
|
-
declare function createAcpConnection(clientFactory: (agent: acp.Agent) => acp.Client, options: AcpConnectionOptions): Promise<AcpConnectionHandle>;
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region adapters/shared/acp-client/src/client.d.ts
|
|
139
|
-
/**
|
|
140
|
-
* ACP {@link Client} implementation that bridges agent requests to Makaio infrastructure.
|
|
141
|
-
*
|
|
142
|
-
* Routes session updates, permission requests, filesystem operations, and terminal
|
|
143
|
-
* lifecycle events to the connector-provided callbacks and optional terminal manager.
|
|
144
|
-
* All optional Client methods throw a descriptive error when the corresponding
|
|
145
|
-
* capability has not been configured.
|
|
146
|
-
*/
|
|
147
|
-
declare class MakaioAcpClient implements Client {
|
|
148
|
-
private readonly config;
|
|
149
|
-
/**
|
|
150
|
-
* @param config - Callbacks and optional managers for each ACP client capability
|
|
151
|
-
*/
|
|
152
|
-
constructor(config: MakaioAcpClientConfig);
|
|
153
|
-
/**
|
|
154
|
-
* Forwards session update notifications to the connector.
|
|
155
|
-
* @param params - Session notification from the agent
|
|
156
|
-
* @returns Void promise resolving after the notification is processed
|
|
157
|
-
*/
|
|
158
|
-
sessionUpdate(params: SessionNotification): Promise<void>;
|
|
159
|
-
/**
|
|
160
|
-
* Forwards permission requests to the connector approval handler.
|
|
161
|
-
* @param params - Permission request from the agent
|
|
162
|
-
* @returns The user's permission decision
|
|
163
|
-
*/
|
|
164
|
-
requestPermission(params: RequestPermissionRequest): Promise<RequestPermissionResponse>;
|
|
165
|
-
/**
|
|
166
|
-
* Forwards file read requests to the optional handler.
|
|
167
|
-
* @param params - Read file request from the agent
|
|
168
|
-
* @returns File contents
|
|
169
|
-
*/
|
|
170
|
-
readTextFile(params: ReadTextFileRequest): Promise<ReadTextFileResponse>;
|
|
171
|
-
/**
|
|
172
|
-
* Forwards file write requests to the optional handler.
|
|
173
|
-
* @param params - Write file request from the agent
|
|
174
|
-
* @returns Write confirmation
|
|
175
|
-
*/
|
|
176
|
-
writeTextFile(params: WriteTextFileRequest): Promise<WriteTextFileResponse>;
|
|
177
|
-
/**
|
|
178
|
-
* Creates a new terminal process via the terminal manager.
|
|
179
|
-
* @param params - Terminal creation parameters from the agent
|
|
180
|
-
* @returns Terminal ID for subsequent operations
|
|
181
|
-
*/
|
|
182
|
-
createTerminal(params: CreateTerminalRequest): Promise<CreateTerminalResponse>;
|
|
183
|
-
/**
|
|
184
|
-
* Retrieves the current output of a managed terminal.
|
|
185
|
-
* @param params - Terminal output request from the agent
|
|
186
|
-
* @returns Current buffered output and truncation status
|
|
187
|
-
*/
|
|
188
|
-
terminalOutput(params: TerminalOutputRequest): Promise<TerminalOutputResponse>;
|
|
189
|
-
/**
|
|
190
|
-
* Waits for a managed terminal to exit.
|
|
191
|
-
* @param params - Wait for exit request from the agent
|
|
192
|
-
* @returns Exit code and terminating signal
|
|
193
|
-
*/
|
|
194
|
-
waitForTerminalExit(params: WaitForTerminalExitRequest): Promise<WaitForTerminalExitResponse>;
|
|
195
|
-
/**
|
|
196
|
-
* Kills a managed terminal process without releasing it.
|
|
197
|
-
* @param params - Kill terminal request from the agent
|
|
198
|
-
* @returns Empty kill response
|
|
199
|
-
*/
|
|
200
|
-
killTerminal(params: KillTerminalRequest): Promise<KillTerminalResponse>;
|
|
201
|
-
/**
|
|
202
|
-
* Releases a managed terminal and frees all associated resources.
|
|
203
|
-
* @param params - Release terminal request from the agent
|
|
204
|
-
* @returns Empty release response
|
|
205
|
-
*/
|
|
206
|
-
releaseTerminal(params: ReleaseTerminalRequest): Promise<ReleaseTerminalResponse>;
|
|
207
|
-
}
|
|
208
|
-
//#endregion
|
|
209
|
-
export { type AcpConnectionHandle, type AcpConnectionOptions, MakaioAcpClient, type MakaioAcpClientConfig, TerminalManager, createAcpConnection };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{spawn as e}from"node:child_process";import{Readable as t,Writable as n}from"node:stream";import*as r from"@agentclientprotocol/sdk";function i(e){return new Promise((t,n)=>{let r=()=>{e.off(`error`,i),t()},i=t=>{e.off(`spawn`,r),n(t)};e.once(`spawn`,r),e.once(`error`,i)})}async function a(e){e.stdin?.destroy(),e.stdout?.destroy(),e.stderr?.destroy(),e.kill(`SIGTERM`),await new Promise(t=>{e.once(`exit`,()=>t()),e.once(`close`,()=>t()),setTimeout(t,100)})}function o(e){return e}function s(e){return e}async function c(c,l){let u=e(l.command,l.args,{cwd:l.cwd,env:l.env,stdio:[`pipe`,`pipe`,`pipe`]});try{await i(u)}catch(e){throw l.onError?.(e),e}l.onStderr&&u.stderr&&u.stderr.on(`data`,e=>{l.onStderr(e.toString(`utf-8`))});let d=new Promise(e=>{u.once(`exit`,t=>{l.onExit?.(t),e(t)})});u.on(`error`,e=>{l.onError?.(e)});let f;try{let e=t.toWeb(u.stdout),i=n.toWeb(u.stdin),a=r.ndJsonStream(s(i),o(e));f=new r.ClientSideConnection(c,a)}catch(e){throw await a(u),e}return{connection:f,kill:()=>u.kill(`SIGTERM`),exited:d}}var l=class{config;constructor(e){this.config=e}async sessionUpdate(e){await this.config.onSessionUpdate(e)}async requestPermission(e){return this.config.onRequestPermission(e)}async readTextFile(e){if(!this.config.onReadTextFile)throw Error(`readTextFile not supported: no handler configured`);return this.config.onReadTextFile(e)}async writeTextFile(e){if(!this.config.onWriteTextFile)throw Error(`writeTextFile not supported: no handler configured`);return this.config.onWriteTextFile(e)}async createTerminal(e){if(!this.config.terminalManager)throw Error(`createTerminal not supported: no terminal manager configured`);return this.config.terminalManager.createTerminal(e)}async terminalOutput(e){if(!this.config.terminalManager)throw Error(`terminalOutput not supported: no terminal manager configured`);return this.config.terminalManager.getOutput(e)}async waitForTerminalExit(e){if(!this.config.terminalManager)throw Error(`waitForTerminalExit not supported: no terminal manager configured`);return this.config.terminalManager.waitForExit(e)}async killTerminal(e){if(!this.config.terminalManager)throw Error(`killTerminal not supported: no terminal manager configured`);return this.config.terminalManager.killTerminal(e)}async releaseTerminal(e){if(!this.config.terminalManager)throw Error(`releaseTerminal not supported: no terminal manager configured`);return this.config.terminalManager.releaseTerminal(e)}},u=class{terminals=new Map;nextId=0;async createTerminal(t){let n=`terminal-${(++this.nextId).toString()}`,r=t.outputByteLimit??1024*1024,o={...process.env};if(t.env)for(let e of t.env)o[e.name]=e.value;let s=e(t.command,t.args??[],{cwd:t.cwd??void 0,env:o,stdio:[`pipe`,`pipe`,`pipe`]});try{await i(s)}catch(e){throw await a(s),e}let c={process:s,output:``,outputByteLimit:r,truncated:!1,exitCode:void 0,signal:void 0,hasExited:!1,exitPromise:new Promise(e=>{s.on(`exit`,(e,t)=>{c.exitCode=e,c.signal=t??null}),s.on(`close`,()=>{c.hasExited=!0,e({exitCode:c.exitCode??null,signal:c.signal??null})})})},l=e=>{if(c.output+=e.toString(`utf-8`),Buffer.byteLength(c.output,`utf-8`)>c.outputByteLimit){let e=Buffer.from(c.output,`utf-8`),t=e.length-c.outputByteLimit;for(;t<e.length&&(e[t]&192)==128;)t+=1;c.output=e.subarray(t).toString(`utf-8`),c.truncated=!0}};return s.stdout?.on(`data`,l),s.stderr?.on(`data`,l),this.terminals.set(n,c),{terminalId:n}}async getOutput(e){let t=this.requireTerminal(e.terminalId);return{output:t.output,truncated:t.truncated,...t.hasExited&&{exitStatus:{exitCode:t.exitCode??null,signal:t.signal??null}}}}async waitForExit(e){let{exitCode:t,signal:n}=await this.requireTerminal(e.terminalId).exitPromise;return{exitCode:t??void 0,signal:n??void 0}}async killTerminal(e){return this.requireTerminal(e.terminalId).process.kill(`SIGTERM`),{}}async releaseTerminal(e){let t=this.terminals.get(e.terminalId);return t&&(t.process.kill(`SIGKILL`),this.terminals.delete(e.terminalId)),{}}releaseAll(){for(let[e,t]of this.terminals)t.process.kill(`SIGKILL`),this.terminals.delete(e)}requireTerminal(e){let t=this.terminals.get(e);if(!t)throw Error(`Terminal not found: ${e}`);return t}};export{l as MakaioAcpClient,u as TerminalManager,c as createAcpConnection};
|