@vibesdotdev/hq 0.0.0-stage → 1.0.0-rc.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/LICENSE +18 -0
- package/README.md +49 -2
- package/dist/agent-events/descriptors.d.ts +33 -0
- package/dist/agent-events/descriptors.d.ts.map +1 -0
- package/dist/agent-events/descriptors.js +34 -0
- package/dist/agent-events/descriptors.js.map +1 -0
- package/dist/app/auth/cloud-sync.consumer.d.ts +12 -0
- package/dist/app/auth/cloud-sync.consumer.d.ts.map +1 -0
- package/dist/app/auth/cloud-sync.consumer.js +31 -0
- package/dist/app/auth/cloud-sync.consumer.js.map +1 -0
- package/dist/app/auth/hq.app-auth-machine.record.descriptor.d.ts +5 -0
- package/dist/app/auth/hq.app-auth-machine.record.descriptor.d.ts.map +1 -0
- package/dist/app/auth/hq.app-auth-machine.record.descriptor.js +39 -0
- package/dist/app/auth/hq.app-auth-machine.record.descriptor.js.map +1 -0
- package/dist/app/auth/hq.app-auth-pairings.record.descriptor.d.ts +5 -0
- package/dist/app/auth/hq.app-auth-pairings.record.descriptor.d.ts.map +1 -0
- package/dist/app/auth/hq.app-auth-pairings.record.descriptor.js +43 -0
- package/dist/app/auth/hq.app-auth-pairings.record.descriptor.js.map +1 -0
- package/dist/app/auth/hq.app-auth-tokens.record.descriptor.d.ts +5 -0
- package/dist/app/auth/hq.app-auth-tokens.record.descriptor.d.ts.map +1 -0
- package/dist/app/auth/hq.app-auth-tokens.record.descriptor.js +42 -0
- package/dist/app/auth/hq.app-auth-tokens.record.descriptor.js.map +1 -0
- package/dist/app/auth/schemas/auth.d.ts +146 -0
- package/dist/app/auth/schemas/auth.d.ts.map +1 -0
- package/dist/app/auth/schemas/auth.js +53 -0
- package/dist/app/auth/schemas/auth.js.map +1 -0
- package/dist/app/auth/service.consumer.d.ts +17 -0
- package/dist/app/auth/service.consumer.d.ts.map +1 -0
- package/dist/app/auth/service.consumer.js +79 -0
- package/dist/app/auth/service.consumer.js.map +1 -0
- package/dist/app/auth/sync.consumer.d.ts +2 -0
- package/dist/app/auth/sync.consumer.d.ts.map +1 -0
- package/dist/app/auth/sync.consumer.js +2 -0
- package/dist/app/auth/sync.consumer.js.map +1 -0
- package/dist/app/auth/sync.d.ts +23 -0
- package/dist/app/auth/sync.d.ts.map +1 -0
- package/dist/app/auth/sync.js +290 -0
- package/dist/app/auth/sync.js.map +1 -0
- package/dist/app/auth/types.d.ts +20 -0
- package/dist/app/auth/types.d.ts.map +1 -0
- package/dist/app/auth/types.js +7 -0
- package/dist/app/auth/types.js.map +1 -0
- package/dist/app/sync/hq.app-auth.sync-bridge.descriptor.d.ts +9 -0
- package/dist/app/sync/hq.app-auth.sync-bridge.descriptor.d.ts.map +1 -0
- package/dist/app/sync/hq.app-auth.sync-bridge.descriptor.js +45 -0
- package/dist/app/sync/hq.app-auth.sync-bridge.descriptor.js.map +1 -0
- package/dist/applets/component-ref.d.ts +6 -0
- package/dist/applets/component-ref.d.ts.map +1 -0
- package/dist/applets/component-ref.js +6 -0
- package/dist/applets/component-ref.js.map +1 -0
- package/dist/applets/index.d.ts +3 -0
- package/dist/applets/index.d.ts.map +1 -0
- package/dist/applets/index.js +3 -0
- package/dist/applets/index.js.map +1 -0
- package/dist/approval/approval-resolved.event.descriptor.d.ts +11 -0
- package/dist/approval/approval-resolved.event.descriptor.d.ts.map +1 -0
- package/dist/approval/approval-resolved.event.descriptor.js +11 -0
- package/dist/approval/approval-resolved.event.descriptor.js.map +1 -0
- package/dist/approval/approval-resolved.job.descriptor.d.ts +36 -0
- package/dist/approval/approval-resolved.job.descriptor.d.ts.map +1 -0
- package/dist/approval/approval-resolved.job.descriptor.js +24 -0
- package/dist/approval/approval-resolved.job.descriptor.js.map +1 -0
- package/dist/approval/approval-resolved.job.impl.d.ts +19 -0
- package/dist/approval/approval-resolved.job.impl.d.ts.map +1 -0
- package/dist/approval/approval-resolved.job.impl.js +26 -0
- package/dist/approval/approval-resolved.job.impl.js.map +1 -0
- package/dist/approval/approval-resolved.subscription.descriptor.d.ts +21 -0
- package/dist/approval/approval-resolved.subscription.descriptor.d.ts.map +1 -0
- package/dist/approval/approval-resolved.subscription.descriptor.js +20 -0
- package/dist/approval/approval-resolved.subscription.descriptor.js.map +1 -0
- package/dist/approval/schemas.d.ts +45 -0
- package/dist/approval/schemas.d.ts.map +1 -0
- package/dist/approval/schemas.js +27 -0
- package/dist/approval/schemas.js.map +1 -0
- package/dist/approval/surface-approval-channel.descriptor.d.ts +14 -0
- package/dist/approval/surface-approval-channel.descriptor.d.ts.map +1 -0
- package/dist/approval/surface-approval-channel.descriptor.js +16 -0
- package/dist/approval/surface-approval-channel.descriptor.js.map +1 -0
- package/dist/approval/surface-approval-channel.impl.d.ts +19 -0
- package/dist/approval/surface-approval-channel.impl.d.ts.map +1 -0
- package/dist/approval/surface-approval-channel.impl.js +101 -0
- package/dist/approval/surface-approval-channel.impl.js.map +1 -0
- package/dist/cli/app/handoff/hq.app.handoff.descriptor.d.ts +40 -0
- package/dist/cli/app/handoff/hq.app.handoff.descriptor.d.ts.map +1 -0
- package/dist/cli/app/handoff/hq.app.handoff.descriptor.js +23 -0
- package/dist/cli/app/handoff/hq.app.handoff.descriptor.js.map +1 -0
- package/dist/cli/app/handoff/hq.app.handoff.impl.consumer.d.ts +7 -0
- package/dist/cli/app/handoff/hq.app.handoff.impl.consumer.d.ts.map +1 -0
- package/dist/cli/app/handoff/hq.app.handoff.impl.consumer.js +107 -0
- package/dist/cli/app/handoff/hq.app.handoff.impl.consumer.js.map +1 -0
- package/dist/cli/app/hq.app.cli-group.descriptor.d.ts +12 -0
- package/dist/cli/app/hq.app.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/app/hq.app.cli-group.descriptor.js +12 -0
- package/dist/cli/app/hq.app.cli-group.descriptor.js.map +1 -0
- package/dist/cli/app/pair/hq.app.pair.descriptor.d.ts +43 -0
- package/dist/cli/app/pair/hq.app.pair.descriptor.d.ts.map +1 -0
- package/dist/cli/app/pair/hq.app.pair.descriptor.js +27 -0
- package/dist/cli/app/pair/hq.app.pair.descriptor.js.map +1 -0
- package/dist/cli/app/pair/hq.app.pair.impl.consumer.d.ts +7 -0
- package/dist/cli/app/pair/hq.app.pair.impl.consumer.d.ts.map +1 -0
- package/dist/cli/app/pair/hq.app.pair.impl.consumer.js +89 -0
- package/dist/cli/app/pair/hq.app.pair.impl.consumer.js.map +1 -0
- package/dist/cli/app/shared/options.d.ts +68 -0
- package/dist/cli/app/shared/options.d.ts.map +1 -0
- package/dist/cli/app/shared/options.js +7 -0
- package/dist/cli/app/shared/options.js.map +1 -0
- package/dist/cli/app/token/hq.app.token.descriptor.d.ts +40 -0
- package/dist/cli/app/token/hq.app.token.descriptor.d.ts.map +1 -0
- package/dist/cli/app/token/hq.app.token.descriptor.js +23 -0
- package/dist/cli/app/token/hq.app.token.descriptor.js.map +1 -0
- package/dist/cli/app/token/hq.app.token.impl.consumer.d.ts +7 -0
- package/dist/cli/app/token/hq.app.token.impl.consumer.d.ts.map +1 -0
- package/dist/cli/app/token/hq.app.token.impl.consumer.js +89 -0
- package/dist/cli/app/token/hq.app.token.impl.consumer.js.map +1 -0
- package/dist/cli/channel/hq.channel.cli-group.descriptor.d.ts +12 -0
- package/dist/cli/channel/hq.channel.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.cli-group.descriptor.js +12 -0
- package/dist/cli/channel/hq.channel.cli-group.descriptor.js.map +1 -0
- package/dist/cli/channel/hq.channel.enable.descriptor.d.ts +21 -0
- package/dist/cli/channel/hq.channel.enable.descriptor.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.enable.descriptor.js +16 -0
- package/dist/cli/channel/hq.channel.enable.descriptor.js.map +1 -0
- package/dist/cli/channel/hq.channel.enable.impl.d.ts +7 -0
- package/dist/cli/channel/hq.channel.enable.impl.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.enable.impl.js +23 -0
- package/dist/cli/channel/hq.channel.enable.impl.js.map +1 -0
- package/dist/cli/channel/hq.channel.fire.descriptor.d.ts +17 -0
- package/dist/cli/channel/hq.channel.fire.descriptor.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.fire.descriptor.js +13 -0
- package/dist/cli/channel/hq.channel.fire.descriptor.js.map +1 -0
- package/dist/cli/channel/hq.channel.fire.impl.d.ts +7 -0
- package/dist/cli/channel/hq.channel.fire.impl.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.fire.impl.js +26 -0
- package/dist/cli/channel/hq.channel.fire.impl.js.map +1 -0
- package/dist/cli/channel/hq.channel.list.descriptor.d.ts +16 -0
- package/dist/cli/channel/hq.channel.list.descriptor.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.list.descriptor.js +13 -0
- package/dist/cli/channel/hq.channel.list.descriptor.js.map +1 -0
- package/dist/cli/channel/hq.channel.list.impl.d.ts +7 -0
- package/dist/cli/channel/hq.channel.list.impl.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.list.impl.js +30 -0
- package/dist/cli/channel/hq.channel.list.impl.js.map +1 -0
- package/dist/cli/channel/hq.channel.logs.descriptor.d.ts +24 -0
- package/dist/cli/channel/hq.channel.logs.descriptor.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.logs.descriptor.js +17 -0
- package/dist/cli/channel/hq.channel.logs.descriptor.js.map +1 -0
- package/dist/cli/channel/hq.channel.logs.impl.d.ts +9 -0
- package/dist/cli/channel/hq.channel.logs.impl.d.ts.map +1 -0
- package/dist/cli/channel/hq.channel.logs.impl.js +74 -0
- package/dist/cli/channel/hq.channel.logs.impl.js.map +1 -0
- package/dist/cli/friction/_store-hint.d.ts +7 -0
- package/dist/cli/friction/_store-hint.d.ts.map +1 -0
- package/dist/cli/friction/_store-hint.js +13 -0
- package/dist/cli/friction/_store-hint.js.map +1 -0
- package/dist/cli/friction/hq.friction.cli-group.descriptor.d.ts +11 -0
- package/dist/cli/friction/hq.friction.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.cli-group.descriptor.js +15 -0
- package/dist/cli/friction/hq.friction.cli-group.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.disposition.d.ts +5 -0
- package/dist/cli/friction/hq.friction.disposition.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.disposition.js +64 -0
- package/dist/cli/friction/hq.friction.disposition.js.map +1 -0
- package/dist/cli/friction/hq.friction.emit.descriptor.d.ts +65 -0
- package/dist/cli/friction/hq.friction.emit.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.emit.descriptor.js +70 -0
- package/dist/cli/friction/hq.friction.emit.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.emit.impl.d.ts +7 -0
- package/dist/cli/friction/hq.friction.emit.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.emit.impl.js +85 -0
- package/dist/cli/friction/hq.friction.emit.impl.js.map +1 -0
- package/dist/cli/friction/hq.friction.list.descriptor.d.ts +37 -0
- package/dist/cli/friction/hq.friction.list.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.list.descriptor.js +22 -0
- package/dist/cli/friction/hq.friction.list.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.list.impl.d.ts +7 -0
- package/dist/cli/friction/hq.friction.list.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.list.impl.js +73 -0
- package/dist/cli/friction/hq.friction.list.impl.js.map +1 -0
- package/dist/cli/friction/hq.friction.promote.descriptor.d.ts +21 -0
- package/dist/cli/friction/hq.friction.promote.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.promote.descriptor.js +14 -0
- package/dist/cli/friction/hq.friction.promote.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.promote.impl.d.ts +7 -0
- package/dist/cli/friction/hq.friction.promote.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.promote.impl.js +47 -0
- package/dist/cli/friction/hq.friction.promote.impl.js.map +1 -0
- package/dist/cli/friction/hq.friction.reject.descriptor.d.ts +24 -0
- package/dist/cli/friction/hq.friction.reject.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.reject.descriptor.js +17 -0
- package/dist/cli/friction/hq.friction.reject.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.reject.impl.d.ts +6 -0
- package/dist/cli/friction/hq.friction.reject.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.reject.impl.js +7 -0
- package/dist/cli/friction/hq.friction.reject.impl.js.map +1 -0
- package/dist/cli/friction/hq.friction.resolve.descriptor.d.ts +27 -0
- package/dist/cli/friction/hq.friction.resolve.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.resolve.descriptor.js +18 -0
- package/dist/cli/friction/hq.friction.resolve.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.resolve.impl.d.ts +6 -0
- package/dist/cli/friction/hq.friction.resolve.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.resolve.impl.js +7 -0
- package/dist/cli/friction/hq.friction.resolve.impl.js.map +1 -0
- package/dist/cli/friction/hq.friction.show.descriptor.d.ts +24 -0
- package/dist/cli/friction/hq.friction.show.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.show.descriptor.js +17 -0
- package/dist/cli/friction/hq.friction.show.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.show.impl.d.ts +7 -0
- package/dist/cli/friction/hq.friction.show.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.show.impl.js +64 -0
- package/dist/cli/friction/hq.friction.show.impl.js.map +1 -0
- package/dist/cli/friction/hq.friction.sync.descriptor.d.ts +16 -0
- package/dist/cli/friction/hq.friction.sync.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.sync.descriptor.js +13 -0
- package/dist/cli/friction/hq.friction.sync.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.sync.impl.d.ts +7 -0
- package/dist/cli/friction/hq.friction.sync.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.sync.impl.js +29 -0
- package/dist/cli/friction/hq.friction.sync.impl.js.map +1 -0
- package/dist/cli/friction/hq.friction.triage.descriptor.d.ts +27 -0
- package/dist/cli/friction/hq.friction.triage.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.triage.descriptor.js +18 -0
- package/dist/cli/friction/hq.friction.triage.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.triage.impl.d.ts +6 -0
- package/dist/cli/friction/hq.friction.triage.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.triage.impl.js +7 -0
- package/dist/cli/friction/hq.friction.triage.impl.js.map +1 -0
- package/dist/cli/friction/invocation.d.ts +12 -0
- package/dist/cli/friction/invocation.d.ts.map +1 -0
- package/dist/cli/friction/invocation.js +28 -0
- package/dist/cli/friction/invocation.js.map +1 -0
- package/dist/cli/health/hq.health.descriptor.d.ts +19 -0
- package/dist/cli/health/hq.health.descriptor.d.ts.map +1 -0
- package/dist/cli/health/hq.health.descriptor.js +16 -0
- package/dist/cli/health/hq.health.descriptor.js.map +1 -0
- package/dist/cli/health/hq.health.impl.d.ts +3 -0
- package/dist/cli/health/hq.health.impl.d.ts.map +1 -0
- package/dist/cli/health/hq.health.impl.js +151 -0
- package/dist/cli/health/hq.health.impl.js.map +1 -0
- package/dist/cli/host-platform.d.ts +14 -0
- package/dist/cli/host-platform.d.ts.map +1 -0
- package/dist/cli/host-platform.js +30 -0
- package/dist/cli/host-platform.js.map +1 -0
- package/dist/cli/hq.cli-group.descriptor.d.ts +11 -0
- package/dist/cli/hq.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/hq.cli-group.descriptor.js +11 -0
- package/dist/cli/hq.cli-group.descriptor.js.map +1 -0
- package/dist/cli/init/hq.init.descriptor.d.ts +7 -0
- package/dist/cli/init/hq.init.descriptor.d.ts.map +1 -0
- package/dist/cli/init/hq.init.descriptor.js +36 -0
- package/dist/cli/init/hq.init.descriptor.js.map +1 -0
- package/dist/cli/init/hq.init.impl.d.ts +7 -0
- package/dist/cli/init/hq.init.impl.d.ts.map +1 -0
- package/dist/cli/init/hq.init.impl.js +163 -0
- package/dist/cli/init/hq.init.impl.js.map +1 -0
- package/dist/cli/install/hq.install.descriptor.d.ts +9 -0
- package/dist/cli/install/hq.install.descriptor.d.ts.map +1 -0
- package/dist/cli/install/hq.install.descriptor.js +34 -0
- package/dist/cli/install/hq.install.descriptor.js.map +1 -0
- package/dist/cli/install/hq.install.impl.d.ts +6 -0
- package/dist/cli/install/hq.install.impl.d.ts.map +1 -0
- package/dist/cli/install/hq.install.impl.js +110 -0
- package/dist/cli/install/hq.install.impl.js.map +1 -0
- package/dist/cli/permissions/hq.permissions.descriptor.d.ts +9 -0
- package/dist/cli/permissions/hq.permissions.descriptor.d.ts.map +1 -0
- package/dist/cli/permissions/hq.permissions.descriptor.js +25 -0
- package/dist/cli/permissions/hq.permissions.descriptor.js.map +1 -0
- package/dist/cli/permissions/hq.permissions.impl.d.ts +3 -0
- package/dist/cli/permissions/hq.permissions.impl.d.ts.map +1 -0
- package/dist/cli/permissions/hq.permissions.impl.js +113 -0
- package/dist/cli/permissions/hq.permissions.impl.js.map +1 -0
- package/dist/cli/plugin.d.ts +3 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +77 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/schemas/input.d.ts +117 -0
- package/dist/cli/schemas/input.d.ts.map +1 -0
- package/dist/cli/schemas/input.js +66 -0
- package/dist/cli/schemas/input.js.map +1 -0
- package/dist/cli/service/hq.service.cli-group.descriptor.d.ts +12 -0
- package/dist/cli/service/hq.service.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/service/hq.service.cli-group.descriptor.js +12 -0
- package/dist/cli/service/hq.service.cli-group.descriptor.js.map +1 -0
- package/dist/cli/service/hq.service.list.descriptor.d.ts +16 -0
- package/dist/cli/service/hq.service.list.descriptor.d.ts.map +1 -0
- package/dist/cli/service/hq.service.list.descriptor.js +13 -0
- package/dist/cli/service/hq.service.list.descriptor.js.map +1 -0
- package/dist/cli/service/hq.service.list.impl.d.ts +7 -0
- package/dist/cli/service/hq.service.list.impl.d.ts.map +1 -0
- package/dist/cli/service/hq.service.list.impl.js +31 -0
- package/dist/cli/service/hq.service.list.impl.js.map +1 -0
- package/dist/cli/service/hq.service.manage.descriptor.d.ts +25 -0
- package/dist/cli/service/hq.service.manage.descriptor.d.ts.map +1 -0
- package/dist/cli/service/hq.service.manage.descriptor.js +23 -0
- package/dist/cli/service/hq.service.manage.descriptor.js.map +1 -0
- package/dist/cli/service/hq.service.manage.impl.d.ts +7 -0
- package/dist/cli/service/hq.service.manage.impl.d.ts.map +1 -0
- package/dist/cli/service/hq.service.manage.impl.js +64 -0
- package/dist/cli/service/hq.service.manage.impl.js.map +1 -0
- package/dist/cli/service/hq.service.register.descriptor.d.ts +21 -0
- package/dist/cli/service/hq.service.register.descriptor.d.ts.map +1 -0
- package/dist/cli/service/hq.service.register.descriptor.js +20 -0
- package/dist/cli/service/hq.service.register.descriptor.js.map +1 -0
- package/dist/cli/service/hq.service.register.impl.d.ts +7 -0
- package/dist/cli/service/hq.service.register.impl.d.ts.map +1 -0
- package/dist/cli/service/hq.service.register.impl.js +35 -0
- package/dist/cli/service/hq.service.register.impl.js.map +1 -0
- package/dist/cli/setup/hq.setup.descriptor.d.ts +9 -0
- package/dist/cli/setup/hq.setup.descriptor.d.ts.map +1 -0
- package/dist/cli/setup/hq.setup.descriptor.js +22 -0
- package/dist/cli/setup/hq.setup.descriptor.js.map +1 -0
- package/dist/cli/setup/hq.setup.impl.d.ts +7 -0
- package/dist/cli/setup/hq.setup.impl.d.ts.map +1 -0
- package/dist/cli/setup/hq.setup.impl.js +57 -0
- package/dist/cli/setup/hq.setup.impl.js.map +1 -0
- package/dist/cli/setup/index.d.ts +2 -0
- package/dist/cli/setup/index.d.ts.map +1 -0
- package/dist/cli/setup/index.js +2 -0
- package/dist/cli/setup/index.js.map +1 -0
- package/dist/cli/surface/hq.surface.cli-group.descriptor.d.ts +12 -0
- package/dist/cli/surface/hq.surface.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/surface/hq.surface.cli-group.descriptor.js +12 -0
- package/dist/cli/surface/hq.surface.cli-group.descriptor.js.map +1 -0
- package/dist/cli/surface/hq.surface.list.descriptor.d.ts +20 -0
- package/dist/cli/surface/hq.surface.list.descriptor.d.ts.map +1 -0
- package/dist/cli/surface/hq.surface.list.descriptor.js +20 -0
- package/dist/cli/surface/hq.surface.list.descriptor.js.map +1 -0
- package/dist/cli/surface/hq.surface.list.impl.d.ts +7 -0
- package/dist/cli/surface/hq.surface.list.impl.d.ts.map +1 -0
- package/dist/cli/surface/hq.surface.list.impl.js +35 -0
- package/dist/cli/surface/hq.surface.list.impl.js.map +1 -0
- package/dist/cli/surface/hq.surface.resolve.descriptor.d.ts +22 -0
- package/dist/cli/surface/hq.surface.resolve.descriptor.d.ts.map +1 -0
- package/dist/cli/surface/hq.surface.resolve.descriptor.js +20 -0
- package/dist/cli/surface/hq.surface.resolve.descriptor.js.map +1 -0
- package/dist/cli/surface/hq.surface.resolve.impl.d.ts +7 -0
- package/dist/cli/surface/hq.surface.resolve.impl.d.ts.map +1 -0
- package/dist/cli/surface/hq.surface.resolve.impl.js +29 -0
- package/dist/cli/surface/hq.surface.resolve.impl.js.map +1 -0
- package/dist/client/friction/index.d.ts +58 -0
- package/dist/client/friction/index.d.ts.map +1 -0
- package/dist/client/friction/index.js +146 -0
- package/dist/client/friction/index.js.map +1 -0
- package/dist/client/friction.client.descriptor.d.ts +14 -0
- package/dist/client/friction.client.descriptor.d.ts.map +1 -0
- package/dist/client/friction.client.descriptor.js +14 -0
- package/dist/client/friction.client.descriptor.js.map +1 -0
- package/dist/client/hq.client.descriptor.d.ts +14 -0
- package/dist/client/hq.client.descriptor.d.ts.map +1 -0
- package/dist/client/hq.client.descriptor.js +14 -0
- package/dist/client/hq.client.descriptor.js.map +1 -0
- package/dist/client/index.d.ts +95 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +144 -0
- package/dist/client/index.js.map +1 -0
- package/dist/config/hq-friction.config.descriptor.d.ts +227 -0
- package/dist/config/hq-friction.config.descriptor.d.ts.map +1 -0
- package/dist/config/hq-friction.config.descriptor.js +116 -0
- package/dist/config/hq-friction.config.descriptor.js.map +1 -0
- package/dist/dashboard.d.ts +133 -0
- package/dist/dashboard.d.ts.map +1 -0
- package/dist/dashboard.js +371 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/docs/hq.machines.docs.descriptor.d.ts +22 -0
- package/dist/docs/hq.machines.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/hq.machines.docs.descriptor.js +65 -0
- package/dist/docs/hq.machines.docs.descriptor.js.map +1 -0
- package/dist/docs/hq.sessions.docs.descriptor.d.ts +22 -0
- package/dist/docs/hq.sessions.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/hq.sessions.docs.descriptor.js +74 -0
- package/dist/docs/hq.sessions.docs.descriptor.js.map +1 -0
- package/dist/docs/hq.surfaces.docs.descriptor.d.ts +38 -0
- package/dist/docs/hq.surfaces.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/hq.surfaces.docs.descriptor.js +161 -0
- package/dist/docs/hq.surfaces.docs.descriptor.js.map +1 -0
- package/dist/docs/hq.terminal.docs.descriptor.d.ts +22 -0
- package/dist/docs/hq.terminal.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/hq.terminal.docs.descriptor.js +86 -0
- package/dist/docs/hq.terminal.docs.descriptor.js.map +1 -0
- package/dist/friction/clusters.d.ts +23 -0
- package/dist/friction/clusters.d.ts.map +1 -0
- package/dist/friction/clusters.js +56 -0
- package/dist/friction/clusters.js.map +1 -0
- package/dist/friction/fingerprint.d.ts +56 -0
- package/dist/friction/fingerprint.d.ts.map +1 -0
- package/dist/friction/fingerprint.js +113 -0
- package/dist/friction/fingerprint.js.map +1 -0
- package/dist/friction/friction-dispositions.record.descriptor.d.ts +4 -0
- package/dist/friction/friction-dispositions.record.descriptor.d.ts.map +1 -0
- package/dist/friction/friction-dispositions.record.descriptor.js +36 -0
- package/dist/friction/friction-dispositions.record.descriptor.js.map +1 -0
- package/dist/friction/friction-signals.record.descriptor.d.ts +12 -0
- package/dist/friction/friction-signals.record.descriptor.d.ts.map +1 -0
- package/dist/friction/friction-signals.record.descriptor.js +52 -0
- package/dist/friction/friction-signals.record.descriptor.js.map +1 -0
- package/dist/friction/intake.d.ts +79 -0
- package/dist/friction/intake.d.ts.map +1 -0
- package/dist/friction/intake.js +459 -0
- package/dist/friction/intake.js.map +1 -0
- package/dist/friction/jobs/friction-clusters.job.descriptor.d.ts +71 -0
- package/dist/friction/jobs/friction-clusters.job.descriptor.d.ts.map +1 -0
- package/dist/friction/jobs/friction-clusters.job.descriptor.js +34 -0
- package/dist/friction/jobs/friction-clusters.job.descriptor.js.map +1 -0
- package/dist/friction/jobs/friction-clusters.job.impl.d.ts +22 -0
- package/dist/friction/jobs/friction-clusters.job.impl.d.ts.map +1 -0
- package/dist/friction/jobs/friction-clusters.job.impl.js +33 -0
- package/dist/friction/jobs/friction-clusters.job.impl.js.map +1 -0
- package/dist/friction/promote-input.d.ts +37 -0
- package/dist/friction/promote-input.d.ts.map +1 -0
- package/dist/friction/promote-input.js +58 -0
- package/dist/friction/promote-input.js.map +1 -0
- package/dist/friction/promotion-visibility.d.ts +34 -0
- package/dist/friction/promotion-visibility.d.ts.map +1 -0
- package/dist/friction/promotion-visibility.js +57 -0
- package/dist/friction/promotion-visibility.js.map +1 -0
- package/dist/friction/read.d.ts +21 -0
- package/dist/friction/read.d.ts.map +1 -0
- package/dist/friction/read.js +23 -0
- package/dist/friction/read.js.map +1 -0
- package/dist/friction/schemas/disposition.d.ts +42 -0
- package/dist/friction/schemas/disposition.d.ts.map +1 -0
- package/dist/friction/schemas/disposition.js +22 -0
- package/dist/friction/schemas/disposition.js.map +1 -0
- package/dist/friction/schemas/intake.d.ts +167 -0
- package/dist/friction/schemas/intake.d.ts.map +1 -0
- package/dist/friction/schemas/intake.js +69 -0
- package/dist/friction/schemas/intake.js.map +1 -0
- package/dist/friction/schemas/report.d.ts +138 -0
- package/dist/friction/schemas/report.d.ts.map +1 -0
- package/dist/friction/schemas/report.js +63 -0
- package/dist/friction/schemas/report.js.map +1 -0
- package/dist/friction/schemas/signal.d.ts +170 -0
- package/dist/friction/schemas/signal.d.ts.map +1 -0
- package/dist/friction/schemas/signal.js +77 -0
- package/dist/friction/schemas/signal.js.map +1 -0
- package/dist/friction/signal-recorded.event.descriptor.d.ts +53 -0
- package/dist/friction/signal-recorded.event.descriptor.d.ts.map +1 -0
- package/dist/friction/signal-recorded.event.descriptor.js +38 -0
- package/dist/friction/signal-recorded.event.descriptor.js.map +1 -0
- package/dist/friction/store.d.ts +108 -0
- package/dist/friction/store.d.ts.map +1 -0
- package/dist/friction/store.js +461 -0
- package/dist/friction/store.js.map +1 -0
- package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.d.ts +8 -0
- package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.d.ts.map +1 -0
- package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.js +18 -0
- package/dist/host-guidance/descriptors/accessibility.host-permission-guidance.descriptor.js.map +1 -0
- package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.d.ts +8 -0
- package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.d.ts.map +1 -0
- package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.js +18 -0
- package/dist/host-guidance/descriptors/disk.host-permission-guidance.descriptor.js.map +1 -0
- package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.d.ts +8 -0
- package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.d.ts.map +1 -0
- package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.js +14 -0
- package/dist/host-guidance/descriptors/homebrew.host-health-check.descriptor.js.map +1 -0
- package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.d.ts +8 -0
- package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.d.ts.map +1 -0
- package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.js +18 -0
- package/dist/host-guidance/descriptors/microphone.host-permission-guidance.descriptor.js.map +1 -0
- package/dist/host-guidance/kinds/host-health-check.kind.d.ts +17 -0
- package/dist/host-guidance/kinds/host-health-check.kind.d.ts.map +1 -0
- package/dist/host-guidance/kinds/host-health-check.kind.js +22 -0
- package/dist/host-guidance/kinds/host-health-check.kind.js.map +1 -0
- package/dist/host-guidance/kinds/host-permission-guidance.kind.d.ts +17 -0
- package/dist/host-guidance/kinds/host-permission-guidance.kind.d.ts.map +1 -0
- package/dist/host-guidance/kinds/host-permission-guidance.kind.js +22 -0
- package/dist/host-guidance/kinds/host-permission-guidance.kind.js.map +1 -0
- package/dist/host-guidance/registry.d.ts +16 -0
- package/dist/host-guidance/registry.d.ts.map +1 -0
- package/dist/host-guidance/registry.js +24 -0
- package/dist/host-guidance/registry.js.map +1 -0
- package/dist/hq.cloud.plugin.d.ts +3 -0
- package/dist/hq.cloud.plugin.d.ts.map +1 -0
- package/dist/hq.cloud.plugin.js +40 -0
- package/dist/hq.cloud.plugin.js.map +1 -0
- package/dist/hq.consumer.plugin.d.ts +3 -0
- package/dist/hq.consumer.plugin.d.ts.map +1 -0
- package/dist/hq.consumer.plugin.js +15 -0
- package/dist/hq.consumer.plugin.js.map +1 -0
- package/dist/hq.plugin.d.ts +9 -0
- package/dist/hq.plugin.d.ts.map +1 -0
- package/dist/hq.plugin.js +99 -0
- package/dist/hq.plugin.js.map +1 -0
- package/dist/installers/builtin/ai-runtimes/installer.d.ts +21 -0
- package/dist/installers/builtin/ai-runtimes/installer.d.ts.map +1 -0
- package/dist/installers/builtin/ai-runtimes/installer.js +244 -0
- package/dist/installers/builtin/ai-runtimes/installer.js.map +1 -0
- package/dist/installers/builtin/index.d.ts +9 -0
- package/dist/installers/builtin/index.d.ts.map +1 -0
- package/dist/installers/builtin/index.js +15 -0
- package/dist/installers/builtin/index.js.map +1 -0
- package/dist/installers/builtin/language-servers/installer.d.ts +18 -0
- package/dist/installers/builtin/language-servers/installer.d.ts.map +1 -0
- package/dist/installers/builtin/language-servers/installer.js +139 -0
- package/dist/installers/builtin/language-servers/installer.js.map +1 -0
- package/dist/installers/builtin/system-deps/installer.d.ts +8 -0
- package/dist/installers/builtin/system-deps/installer.d.ts.map +1 -0
- package/dist/installers/builtin/system-deps/installer.js +78 -0
- package/dist/installers/builtin/system-deps/installer.js.map +1 -0
- package/dist/installers/compatibility.consumer.plugin.d.ts +3 -0
- package/dist/installers/compatibility.consumer.plugin.d.ts.map +1 -0
- package/dist/installers/compatibility.consumer.plugin.js +26 -0
- package/dist/installers/compatibility.consumer.plugin.js.map +1 -0
- package/dist/installers/core/index.d.ts +3 -0
- package/dist/installers/core/index.d.ts.map +1 -0
- package/dist/installers/core/index.js +3 -0
- package/dist/installers/core/index.js.map +1 -0
- package/dist/installers/core/installer-result.d.ts +10 -0
- package/dist/installers/core/installer-result.d.ts.map +1 -0
- package/dist/installers/core/installer-result.js +14 -0
- package/dist/installers/core/installer-result.js.map +1 -0
- package/dist/installers/core/installer-runtime.d.ts +18 -0
- package/dist/installers/core/installer-runtime.d.ts.map +1 -0
- package/dist/installers/core/installer-runtime.js +5 -0
- package/dist/installers/core/installer-runtime.js.map +1 -0
- package/dist/installers/core/platform.d.ts +6 -0
- package/dist/installers/core/platform.d.ts.map +1 -0
- package/dist/installers/core/platform.js +19 -0
- package/dist/installers/core/platform.js.map +1 -0
- package/dist/installers/core/workspace.d.ts +4 -0
- package/dist/installers/core/workspace.d.ts.map +1 -0
- package/dist/installers/core/workspace.js +11 -0
- package/dist/installers/core/workspace.js.map +1 -0
- package/dist/installers/index.d.ts +6 -0
- package/dist/installers/index.d.ts.map +1 -0
- package/dist/installers/index.js +6 -0
- package/dist/installers/index.js.map +1 -0
- package/dist/installers/schemas/index.d.ts +2 -0
- package/dist/installers/schemas/index.d.ts.map +1 -0
- package/dist/installers/schemas/index.js +2 -0
- package/dist/installers/schemas/index.js.map +1 -0
- package/dist/installers/schemas/platform.d.ts +10 -0
- package/dist/installers/schemas/platform.d.ts.map +1 -0
- package/dist/installers/schemas/platform.js +9 -0
- package/dist/installers/schemas/platform.js.map +1 -0
- package/dist/installers/schemas/types.d.ts +4 -0
- package/dist/installers/schemas/types.d.ts.map +1 -0
- package/dist/installers/schemas/types.js +4 -0
- package/dist/installers/schemas/types.js.map +1 -0
- package/dist/os-wall/channels.wall.d.ts +9 -0
- package/dist/os-wall/channels.wall.d.ts.map +1 -0
- package/dist/os-wall/channels.wall.js +9 -0
- package/dist/os-wall/channels.wall.js.map +1 -0
- package/dist/os-wall/surface-store.wall.d.ts +3 -0
- package/dist/os-wall/surface-store.wall.d.ts.map +1 -0
- package/dist/os-wall/surface-store.wall.js +3 -0
- package/dist/os-wall/surface-store.wall.js.map +1 -0
- package/dist/runtime-path.d.ts +7 -0
- package/dist/runtime-path.d.ts.map +1 -0
- package/dist/runtime-path.js +7 -0
- package/dist/runtime-path.js.map +1 -0
- package/dist/schemas/host-guidance.d.ts +48 -0
- package/dist/schemas/host-guidance.d.ts.map +1 -0
- package/dist/schemas/host-guidance.js +48 -0
- package/dist/schemas/host-guidance.js.map +1 -0
- package/dist/services/backends/index.d.ts +24 -0
- package/dist/services/backends/index.d.ts.map +1 -0
- package/dist/services/backends/index.js +17 -0
- package/dist/services/backends/index.js.map +1 -0
- package/dist/services/builtin/index.d.ts +78 -0
- package/dist/services/builtin/index.d.ts.map +1 -0
- package/dist/services/builtin/index.js +44 -0
- package/dist/services/builtin/index.js.map +1 -0
- package/dist/services/descriptors/vibes-bridge.os-service.descriptor.d.ts +8 -0
- package/dist/services/descriptors/vibes-bridge.os-service.descriptor.d.ts.map +1 -0
- package/dist/services/descriptors/vibes-bridge.os-service.descriptor.js +21 -0
- package/dist/services/descriptors/vibes-bridge.os-service.descriptor.js.map +1 -0
- package/dist/services/descriptors/vibes-mcp.os-service.descriptor.d.ts +8 -0
- package/dist/services/descriptors/vibes-mcp.os-service.descriptor.d.ts.map +1 -0
- package/dist/services/descriptors/vibes-mcp.os-service.descriptor.js +20 -0
- package/dist/services/descriptors/vibes-mcp.os-service.descriptor.js.map +1 -0
- package/dist/services/descriptors/vibes-pm.os-service.descriptor.d.ts +8 -0
- package/dist/services/descriptors/vibes-pm.os-service.descriptor.d.ts.map +1 -0
- package/dist/services/descriptors/vibes-pm.os-service.descriptor.js +20 -0
- package/dist/services/descriptors/vibes-pm.os-service.descriptor.js.map +1 -0
- package/dist/services/index.d.ts +14 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +12 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/kinds/os-service.kind.d.ts +19 -0
- package/dist/services/kinds/os-service.kind.d.ts.map +1 -0
- package/dist/services/kinds/os-service.kind.js +24 -0
- package/dist/services/kinds/os-service.kind.js.map +1 -0
- package/dist/services/registry.d.ts +45 -0
- package/dist/services/registry.d.ts.map +1 -0
- package/dist/services/registry.js +141 -0
- package/dist/services/registry.js.map +1 -0
- package/dist/services/schemas/service.d.ts +79 -0
- package/dist/services/schemas/service.d.ts.map +1 -0
- package/dist/services/schemas/service.js +82 -0
- package/dist/services/schemas/service.js.map +1 -0
- package/dist/svelte/report/ReportProblemDialog.svelte +205 -0
- package/dist/svelte/report/ReportProblemDialog.svelte.d.ts +5 -0
- package/dist/svelte/report/ReportProblemDialog.svelte.d.ts.map +1 -0
- package/dist/svelte/report/capture-context.d.ts +61 -0
- package/dist/svelte/report/capture-context.d.ts.map +1 -0
- package/dist/svelte/report/capture-context.js +100 -0
- package/dist/svelte/report/report.plugin.d.ts +68 -0
- package/dist/svelte/report/report.plugin.d.ts.map +1 -0
- package/dist/svelte/report/report.plugin.js +109 -0
- package/dist/svelte/report/severity.d.ts +32 -0
- package/dist/svelte/report/severity.d.ts.map +1 -0
- package/dist/svelte/report/severity.js +13 -0
- package/dist/tools/applet/applet.schemas.d.ts +6 -0
- package/dist/tools/applet/applet.schemas.d.ts.map +1 -0
- package/dist/tools/applet/applet.schemas.js +6 -0
- package/dist/tools/applet/applet.schemas.js.map +1 -0
- package/dist/utils/exec.d.ts +22 -0
- package/dist/utils/exec.d.ts.map +1 -0
- package/dist/utils/exec.js +38 -0
- package/dist/utils/exec.js.map +1 -0
- package/dist/utils/fs.d.ts +10 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +25 -0
- package/dist/utils/fs.js.map +1 -0
- package/package.json +268 -4
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime client for reading signals and reporting to HQ's canonical intake.
|
|
3
|
+
* Caller or explicitly service-authenticated; HQ owns durable deduplication.
|
|
4
|
+
*/
|
|
5
|
+
import { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
|
|
6
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
7
|
+
import type { PromoteWorkItemInput } from '../../friction/promote-input.ts';
|
|
8
|
+
import type { ListFrictionSignalsFilter } from '../../friction/store.ts';
|
|
9
|
+
import type { FrictionSignal } from '../../friction/schemas/signal.ts';
|
|
10
|
+
import { FrictionIntakeInputSchema, FrictionIntakeResponseSchema, FrictionPromoteInputSchema, FrictionPromoteResponseSchema, FrictionReportInputSchema, FrictionReportResponseSchema, type FrictionReportInput, type FrictionReportResponse, type FrictionPromoteInput, type FrictionPromoteResponse, type FrictionIntakeInput, type FrictionIntakeResponse } from '../../friction/schemas/intake.ts';
|
|
11
|
+
export interface FrictionServiceRequestOptions {
|
|
12
|
+
origin?: string;
|
|
13
|
+
fetch?: typeof globalThis.fetch;
|
|
14
|
+
userId?: string;
|
|
15
|
+
timeoutMs?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare class FrictionClient extends BaseRuntimeClient {
|
|
18
|
+
private serviceRequest;
|
|
19
|
+
private authentication;
|
|
20
|
+
private readonly persistenceTails;
|
|
21
|
+
/** Serialize fallback read/modify/write operations for this runtime, including legacy adapters. */
|
|
22
|
+
withPersistenceLock<T>(path: string, operation: () => Promise<T>): Promise<T>;
|
|
23
|
+
protected onDispose(): Promise<void>;
|
|
24
|
+
/** Request-local transport/attribution; never mutates the shared runtime client. */
|
|
25
|
+
forServiceRequest(options?: FrictionServiceRequestOptions): FrictionClient;
|
|
26
|
+
/** Request-local caller transport; authentication still resolves through Auth on each emit. */
|
|
27
|
+
forCallerRequest(options?: Omit<FrictionServiceRequestOptions, 'userId'>): FrictionClient;
|
|
28
|
+
/** Emit through HQ. Resolve current credentials on every call, not at construction. */
|
|
29
|
+
emit(input: FrictionIntakeInput): Promise<FrictionIntakeResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* File a "Report a problem" report with HQ's package intake. Caller
|
|
32
|
+
* authentication only: in a browser the session cookie carries it
|
|
33
|
+
* (`credentials: 'include'`); HQ derives the app and target org from the
|
|
34
|
+
* page's `Origin`, never from the body.
|
|
35
|
+
*/
|
|
36
|
+
report(input: FrictionReportInput): Promise<FrictionReportResponse>;
|
|
37
|
+
/** HQ journals admission and recovers the canonical operation before recording disposition. */
|
|
38
|
+
promote(input: FrictionPromoteInput): Promise<FrictionPromoteResponse>;
|
|
39
|
+
private post;
|
|
40
|
+
/** List reported-problem signals, newest first. */
|
|
41
|
+
list(filter?: ListFrictionSignalsFilter): Promise<FrictionSignal[]>;
|
|
42
|
+
/** Get a single reported-problem signal by id. */
|
|
43
|
+
get(id: string): Promise<FrictionSignal | undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* Build the work-item create input for promoting a signal. The convention
|
|
46
|
+
* lives in `friction/promote-input.ts` and is shared with the CLI's
|
|
47
|
+
* `hq friction promote`, so both paths create the identical work item.
|
|
48
|
+
* Pure — the caller owns the actual `createWorkItem` write.
|
|
49
|
+
*/
|
|
50
|
+
promoteInput(signal: FrictionSignal): PromoteWorkItemInput;
|
|
51
|
+
}
|
|
52
|
+
export default FrictionClient;
|
|
53
|
+
export declare function getVibesFrictionClient(runtime: VibesRuntime): Promise<FrictionClient>;
|
|
54
|
+
export { FrictionIntakeInputSchema, FrictionIntakeResponseSchema, FrictionPromoteInputSchema, FrictionPromoteResponseSchema, FrictionReportInputSchema, FrictionReportResponseSchema };
|
|
55
|
+
export type { FrictionIntakeInput, FrictionIntakeResponse, FrictionPromoteInput, FrictionPromoteResponse, FrictionReportInput, FrictionReportResponse };
|
|
56
|
+
export { FrictionReportCaptureSchema, FrictionReportContextSchema, FrictionReportErrorSchema, FrictionReportAttachmentSchema, type FrictionReportCapture, type FrictionReportContext, type FrictionReportError, type FrictionReportAttachment } from '../../friction/schemas/report.ts';
|
|
57
|
+
export type { ListFrictionSignalsFilter, FrictionSignal, PromoteWorkItemInput };
|
|
58
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/friction/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,iBAAiB,EAAkB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EACN,yBAAyB,EACzB,4BAA4B,EAC5B,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,EACzB,4BAA4B,EAC5B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,6BAA6B;IAC7C,MAAM,CAAC,EAAE,M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sB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAErF;AAED,OAAO,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,CAAC;AACvL,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,CAAC;AACxJ,OAAO,EACN,2BAA2B,EAC3B,2BAA2B,EAC3B,yBAAyB,EACzB,8BAA8B,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,MAAM,kCAAkC,CAAC;AAE1C,YAAY,EAAE,yBAAyB,EAAE,cAAc,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime client for reading signals and reporting to HQ's canonical intake.
|
|
3
|
+
* Caller or explicitly service-authenticated; HQ owns durable deduplication.
|
|
4
|
+
*/
|
|
5
|
+
import * as z from 'zod/v4';
|
|
6
|
+
import { ApiResponseError, requestValidated } from '@vibesdotdev/client/validated-request';
|
|
7
|
+
import { BaseRuntimeClient, getVibesClient } from '@vibesdotdev/kernel/client';
|
|
8
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
9
|
+
import { resolveVibesAppOrigin } from '@vibesdotdev/config/environment/resolve-app-origin';
|
|
10
|
+
import { buildPromoteWorkItemInput } from "../../friction/promote-input.js";
|
|
11
|
+
import { FrictionIntakeInputSchema, FrictionIntakeResponseSchema, FrictionPromoteInputSchema, FrictionPromoteResponseSchema, FrictionReportInputSchema, FrictionReportResponseSchema } from "../../friction/schemas/intake.js";
|
|
12
|
+
const HqServiceBindingMethodsSchema = z.object({ fetch: z.function() });
|
|
13
|
+
/** HQ_SERVICE's owning schema: it admits the binding itself, never a copy, so `fetch` keeps its receiver. */
|
|
14
|
+
const HqServiceBindingSchema = z.custom((value) => HqServiceBindingMethodsSchema.safeParse(value).success);
|
|
15
|
+
export class FrictionClient extends BaseRuntimeClient {
|
|
16
|
+
serviceRequest = {};
|
|
17
|
+
authentication = 'caller';
|
|
18
|
+
persistenceTails = new Map();
|
|
19
|
+
/** Serialize fallback read/modify/write operations for this runtime, including legacy adapters. */
|
|
20
|
+
async withPersistenceLock(path, operation) {
|
|
21
|
+
this.runtime.lifecycle.signal.throwIfAborted();
|
|
22
|
+
const previous = this.persistenceTails.get(path) ?? Promise.resolve();
|
|
23
|
+
const completion = Promise.withResolvers();
|
|
24
|
+
this.persistenceTails.set(path, completion.promise);
|
|
25
|
+
await previous;
|
|
26
|
+
try {
|
|
27
|
+
this.runtime.lifecycle.signal.throwIfAborted();
|
|
28
|
+
return await operation();
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
completion.resolve();
|
|
32
|
+
if (this.persistenceTails.get(path) === completion.promise)
|
|
33
|
+
this.persistenceTails.delete(path);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async onDispose() {
|
|
37
|
+
await Promise.all(this.persistenceTails.values());
|
|
38
|
+
}
|
|
39
|
+
/** Request-local transport/attribution; never mutates the shared runtime client. */
|
|
40
|
+
forServiceRequest(options = {}) {
|
|
41
|
+
const fork = new FrictionClient(this.descriptor, undefined, this.runtime);
|
|
42
|
+
fork.serviceRequest = { ...options };
|
|
43
|
+
fork.authentication = 'service';
|
|
44
|
+
return fork;
|
|
45
|
+
}
|
|
46
|
+
/** Request-local caller transport; authentication still resolves through Auth on each emit. */
|
|
47
|
+
forCallerRequest(options = {}) {
|
|
48
|
+
const fork = new FrictionClient(this.descriptor, undefined, this.runtime);
|
|
49
|
+
fork.serviceRequest = { ...options };
|
|
50
|
+
return fork;
|
|
51
|
+
}
|
|
52
|
+
/** Emit through HQ. Resolve current credentials on every call, not at construction. */
|
|
53
|
+
async emit(input) {
|
|
54
|
+
const body = FrictionIntakeInputSchema.parse(input);
|
|
55
|
+
return this.post('/api/internal/friction', body, FrictionIntakeResponseSchema);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* File a "Report a problem" report with HQ's package intake. Caller
|
|
59
|
+
* authentication only: in a browser the session cookie carries it
|
|
60
|
+
* (`credentials: 'include'`); HQ derives the app and target org from the
|
|
61
|
+
* page's `Origin`, never from the body.
|
|
62
|
+
*/
|
|
63
|
+
async report(input) {
|
|
64
|
+
if (this.authentication === 'service') {
|
|
65
|
+
throw new CapabilityError('Service callers emit through the internal friction intake.', 'PERMISSION_DENIED', { reason: 'friction-report-service-caller', retryable: false });
|
|
66
|
+
}
|
|
67
|
+
const body = FrictionReportInputSchema.parse(input);
|
|
68
|
+
return this.post('/api/hq/reports', body, FrictionReportResponseSchema);
|
|
69
|
+
}
|
|
70
|
+
/** HQ journals admission and recovers the canonical operation before recording disposition. */
|
|
71
|
+
async promote(input) {
|
|
72
|
+
const { signalId, ...body } = FrictionPromoteInputSchema.parse(input);
|
|
73
|
+
return this.post(`/api/hq/friction-signals/${encodeURIComponent(signalId)}/promote`, body, FrictionPromoteResponseSchema);
|
|
74
|
+
}
|
|
75
|
+
async post(path, body, schema) {
|
|
76
|
+
let token;
|
|
77
|
+
if (this.authentication === 'service') {
|
|
78
|
+
const credential = await this.runtime.resolveCredential({ source: 'secret', key: 'VIBES_INTERNAL_SERVICE_TOKEN' });
|
|
79
|
+
if (!credential.ok)
|
|
80
|
+
throw credential.error;
|
|
81
|
+
token = credential.value.trim();
|
|
82
|
+
if (!token)
|
|
83
|
+
throw new CapabilityError('HQ friction intake requires an internal service credential', 'NOT_FOUND', { reason: 'credential-not-set' });
|
|
84
|
+
}
|
|
85
|
+
else if (this.runtime.scope.surface === 'browser' && !this.runtime.hasContext('auth/caller-bearer')) {
|
|
86
|
+
// A browser that composes no Auth bearer: the credentialed request's session cookie is the caller.
|
|
87
|
+
token = null;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const caller = await this.runtime.context('auth/caller-bearer');
|
|
91
|
+
token = await caller.resolve();
|
|
92
|
+
if (!token && this.runtime.scope.surface !== 'browser')
|
|
93
|
+
throw new CapabilityError('HQ friction intake requires caller authentication.', 'AUTH_REQUIRED', { reason: 'friction-caller-bearer-unavailable', retryable: false });
|
|
94
|
+
}
|
|
95
|
+
const origin = this.serviceRequest.origin ?? (await resolveVibesAppOrigin('hq', this.runtime));
|
|
96
|
+
if (!origin)
|
|
97
|
+
throw new CapabilityError('HQ friction intake origin is not configured', 'NOT_FOUND', { reason: 'friction-intake-origin-unconfigured' });
|
|
98
|
+
// Transport precedence: an explicit request override, then the bound HQ
|
|
99
|
+
// service, then the runtime environment's HTTP port. Ambient fetch is
|
|
100
|
+
// never consulted, so an environment without HTTP refuses typed.
|
|
101
|
+
const binding = this.runtime.getBinding('HQ_SERVICE', HqServiceBindingSchema);
|
|
102
|
+
const transport = this.serviceRequest.fetch ?? (binding ? binding.fetch.bind(binding) : undefined);
|
|
103
|
+
const headers = new Headers({ 'content-type': 'application/json' });
|
|
104
|
+
if (token)
|
|
105
|
+
headers.set('authorization', `Bearer ${token}`);
|
|
106
|
+
if (this.authentication === 'service' && this.serviceRequest.userId)
|
|
107
|
+
headers.set('x-vibes-user-id', this.serviceRequest.userId);
|
|
108
|
+
return this.runtime.lifecycle.wait((signal) => requestValidated(new URL(path, origin), {
|
|
109
|
+
method: 'POST',
|
|
110
|
+
credentials: this.authentication === 'service' ? 'omit' : 'include',
|
|
111
|
+
signal,
|
|
112
|
+
headers,
|
|
113
|
+
body: JSON.stringify(body)
|
|
114
|
+
}, schema, {
|
|
115
|
+
fetch: transport,
|
|
116
|
+
runtime: this.runtime,
|
|
117
|
+
mapHttpError: (response) => new ApiResponseError(`HQ friction intake failed (${response.status})`, response.status)
|
|
118
|
+
}), { timeoutMs: this.serviceRequest.timeoutMs ?? 10_000, reason: 'hq-friction-intake' });
|
|
119
|
+
}
|
|
120
|
+
/** List reported-problem signals, newest first. */
|
|
121
|
+
async list(filter) {
|
|
122
|
+
const { listFrictionSignals } = await import("../../friction/store.js");
|
|
123
|
+
return listFrictionSignals(this.runtime, filter);
|
|
124
|
+
}
|
|
125
|
+
/** Get a single reported-problem signal by id. */
|
|
126
|
+
async get(id) {
|
|
127
|
+
const { getFrictionSignal } = await import("../../friction/store.js");
|
|
128
|
+
return getFrictionSignal(this.runtime, id);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Build the work-item create input for promoting a signal. The convention
|
|
132
|
+
* lives in `friction/promote-input.ts` and is shared with the CLI's
|
|
133
|
+
* `hq friction promote`, so both paths create the identical work item.
|
|
134
|
+
* Pure — the caller owns the actual `createWorkItem` write.
|
|
135
|
+
*/
|
|
136
|
+
promoteInput(signal) {
|
|
137
|
+
return buildPromoteWorkItemInput(signal);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export default FrictionClient;
|
|
141
|
+
export function getVibesFrictionClient(runtime) {
|
|
142
|
+
return getVibesClient('friction', runtime);
|
|
143
|
+
}
|
|
144
|
+
export { FrictionIntakeInputSchema, FrictionIntakeResponseSchema, FrictionPromoteInputSchema, FrictionPromoteResponseSchema, FrictionReportInputSchema, FrictionReportResponseSchema };
|
|
145
|
+
export { FrictionReportCaptureSchema, FrictionReportContextSchema, FrictionReportErrorSchema, FrictionReportAttachmentSchema } from "../../friction/schemas/report.js";
|
|
146
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/friction/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAA4C,MAAM,uCAAuC,CAAC;AACrI,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAqB,MAAM,qBAAqB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,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,MAAsB;QAClC,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;CACD;AAED,eAAe,cAAc,CAAC;AAE9B,MAAM,UAAU,sBAAsB,CAAC,OAAqB;IAC3D,OAAO,cAAc,CAAiB,UAAU,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC;AAED,OAAO,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,CAAC;AAEvL,OAAO,EACN,2BAA2B,EAC3B,2BAA2B,EAC3B,yBAAyB,EACzB,8BAA8B,EAK9B,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Friction Client Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Registers the `friction` runtime/client for reading signals and emitting
|
|
5
|
+
* service-authenticated reports through the canonical HQ intake.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
kind: "runtime/client";
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=friction.client.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friction.client.descriptor.d.ts","sourceRoot":"","sources":["../../src/client/friction.client.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;AAIH,wBAKG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Friction Client Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Registers the `friction` runtime/client for reading signals and emitting
|
|
5
|
+
* service-authenticated reports through the canonical HQ intake.
|
|
6
|
+
*/
|
|
7
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
8
|
+
export default createRuntimeAsset({
|
|
9
|
+
kind: 'runtime/client',
|
|
10
|
+
id: 'friction',
|
|
11
|
+
name: 'Friction Client',
|
|
12
|
+
description: 'Runtime client for friction signals, promotion inputs, and authenticated HQ intake'
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=friction.client.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friction.client.descriptor.js","sourceRoot":"","sources":["../../src/client/friction.client.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,gBAAgB;IACtB,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,oFAAoF;CACjG,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HQ Client Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Registers the `hq` runtime/client kind (the id the plugin loader binds) for
|
|
5
|
+
* cross-module access to channels, surface, services, workspaces, and apps.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
kind: "runtime/client";
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=hq.client.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hq.client.descriptor.d.ts","sourceRoot":"","sources":["../../src/client/hq.client.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;AAIH,wBAKG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HQ Client Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Registers the `hq` runtime/client kind (the id the plugin loader binds) for
|
|
5
|
+
* cross-module access to channels, surface, services, workspaces, and apps.
|
|
6
|
+
*/
|
|
7
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
8
|
+
export default createRuntimeAsset({
|
|
9
|
+
kind: 'runtime/client',
|
|
10
|
+
id: 'hq',
|
|
11
|
+
name: 'HQ Client',
|
|
12
|
+
description: 'Runtime client for HQ channels, surface notifications, services, workspaces, and app auth'
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=hq.client.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hq.client.descriptor.js","sourceRoot":"","sources":["../../src/client/hq.client.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,gBAAgB;IACtB,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,2FAA2F;CACxG,CAAC,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HQ Client — Runtime client for @vibesdotdev/hq
|
|
3
|
+
*
|
|
4
|
+
* Provides channels, surface, services, and apps sub-clients
|
|
5
|
+
* for cross-module access without deep-imports.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
|
|
8
|
+
import type { VibesRuntime } from '@vibesdotdev/kernel';
|
|
9
|
+
import type { ChannelExecution, CreateChannelInput, ListChannelsFilter } from '@vibesdotdev/os/channels/api';
|
|
10
|
+
import type { ChannelDescriptor } from '@vibesdotdev/os/channels/schemas/channel';
|
|
11
|
+
import type { SurfaceNotification } from '@vibesdotdev/os/surface/schemas/artifact';
|
|
12
|
+
import type { SurfaceOwner } from '@vibesdotdev/os/surface/store';
|
|
13
|
+
import type { ServiceDescriptor, ServiceStatus } from '../services/schemas/service.ts';
|
|
14
|
+
import type { ServiceRegistrationReceipt } from '../services/registry.ts';
|
|
15
|
+
import type { OsAppTokenRecord, OsAppPairingRecord } from '../app/auth/types.ts';
|
|
16
|
+
export { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
|
|
17
|
+
/**
|
|
18
|
+
* HQ Client — Single entry point for HQ primitives
|
|
19
|
+
*
|
|
20
|
+
* This client exposes:
|
|
21
|
+
* - channels: CRUD for scheduled channels
|
|
22
|
+
* - surface: notification dispatch and resolution
|
|
23
|
+
* - services: service registration and control
|
|
24
|
+
* - apps: app token and pairing management
|
|
25
|
+
*
|
|
26
|
+
* Consumed by presence, pm, and sibling modules
|
|
27
|
+
* to avoid deep-imports into @vibesdotdev/hq/channels, etc.
|
|
28
|
+
*
|
|
29
|
+
* Runtime port `VibesRuntime` (Runtime SPEC `./client`): service control
|
|
30
|
+
* selects the OS service manager through `assets` and `declaredScope`, which
|
|
31
|
+
* `RuntimeRef` does not carry.
|
|
32
|
+
*/
|
|
33
|
+
export declare class HqClient extends BaseRuntimeClient<VibesRuntime> {
|
|
34
|
+
/**
|
|
35
|
+
* Channel operations — scheduled invocation slots
|
|
36
|
+
*
|
|
37
|
+
* All methods resolve the OS semantic client and act on this
|
|
38
|
+
* client's runtime (its channel state and channel record).
|
|
39
|
+
*/
|
|
40
|
+
channels: {
|
|
41
|
+
create: (input: CreateChannelInput) => Promise<ChannelDescriptor>;
|
|
42
|
+
list: (filter?: ListChannelsFilter) => Promise<ChannelDescriptor[]>;
|
|
43
|
+
get: (id: string) => Promise<ChannelDescriptor | undefined>;
|
|
44
|
+
enable: (id: string) => Promise<ChannelDescriptor>;
|
|
45
|
+
disable: (id: string) => Promise<ChannelDescriptor>;
|
|
46
|
+
fire: (id: string) => Promise<ChannelExecution>;
|
|
47
|
+
history: (id: string, limit?: number) => Promise<ChannelExecution[]>;
|
|
48
|
+
delete: (id: string) => Promise<void>;
|
|
49
|
+
};
|
|
50
|
+
/** Resolve OS on the runtime handed to this client. */
|
|
51
|
+
private os;
|
|
52
|
+
/**
|
|
53
|
+
* Surface operations — agent notifications
|
|
54
|
+
*
|
|
55
|
+
* All methods resolve the OS semantic client and take an explicit, server-
|
|
56
|
+
* derived `owner` as the first argument (the single tenancy gate). The consumer
|
|
57
|
+
* (PM daemon / CLI) acts as the local vibes-internal Marshal operator — it has
|
|
58
|
+
* no request `locals`, so it passes `SYSTEM_OWNER`, exactly the workboard
|
|
59
|
+
* "non-request bridge → SYSTEM_OWNER" pattern.
|
|
60
|
+
*/
|
|
61
|
+
surface: {
|
|
62
|
+
create: (owner: SurfaceOwner, notification: Omit<SurfaceNotification, "id" | "createdAt" | "status" | "ownerType" | "ownerId" | "agentId">) => Promise<SurfaceNotification>;
|
|
63
|
+
list: (owner: SurfaceOwner, status?: SurfaceNotification["status"]) => Promise<SurfaceNotification[]>;
|
|
64
|
+
get: (owner: SurfaceOwner, id: string) => Promise<SurfaceNotification | undefined>;
|
|
65
|
+
resolve: (owner: SurfaceOwner, id: string, resolution: "approved" | "discarded") => Promise<void>;
|
|
66
|
+
delete: (owner: SurfaceOwner, id: string) => Promise<void>;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Service operations through the runtime's OS service manager
|
|
70
|
+
*/
|
|
71
|
+
services: {
|
|
72
|
+
register: (descriptor: ServiceDescriptor) => Promise<ServiceRegistrationReceipt>;
|
|
73
|
+
start: (id: string) => Promise<boolean>;
|
|
74
|
+
stop: (id: string) => Promise<boolean>;
|
|
75
|
+
status: (id: string) => Promise<ServiceStatus | null>;
|
|
76
|
+
logs: (id: string, lines?: number) => Promise<string[]>;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* App operations — token and pairing management
|
|
80
|
+
*/
|
|
81
|
+
apps: {
|
|
82
|
+
createToken: (input: CreateAppTokenInput) => Promise<CreateAppTokenResult>;
|
|
83
|
+
listTokens: (includeRevoked?: boolean) => Promise<OsAppTokenRecord[]>;
|
|
84
|
+
revokeToken: (tokenId: string) => Promise<OsAppTokenRecord | null>;
|
|
85
|
+
createOrUpdatePairing: (input: CreatePairingInput) => Promise<OsAppPairingRecord>;
|
|
86
|
+
listPairings: (appId?: string) => Promise<OsAppPairingRecord[]>;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export default HqClient;
|
|
90
|
+
import type { CreateAppTokenInput as InternalCreateAppTokenInput, CreateAppTokenResult as InternalCreateAppTokenResult, CreatePairingInput as InternalCreatePairingInput } from '../app/auth/service.consumer.ts';
|
|
91
|
+
type CreateAppTokenInput = InternalCreateAppTokenInput;
|
|
92
|
+
type CreateAppTokenResult = InternalCreateAppTokenResult;
|
|
93
|
+
type CreatePairingInput = InternalCreatePairingInput;
|
|
94
|
+
export type { CreateChannelInput, ListChannelsFilter, ChannelExecution, CreateAppTokenInput, CreateAppTokenResult, CreatePairingInput };
|
|
95
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAkB,MAAM,4BAA4B,CAAC;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EACX,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA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AAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;mBAKxC,MAAM,qBAAgB,OAAO,CAAC,MAAM,EAAE,CAAC;MAKvD;IAEF;;OAEG;IACH,IAAI;6BACwB,mBAAmB,KAAG,OAAO,CAAC,oBAAoB,CAAC;kDAKlC,OAAO,CAAC,gBAAgB,EAAE,CAAC;+BAK1C,MAAM,KAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;uCAKjC,kBAAkB,KAAG,OAAO,CAAC,kBAAkB,CAAC;+BAKxD,MAAM,KAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;MAIlE;CACF;AAED,eAAe,QAAQ,CAAC;AAGxB,OAAO,KAAK,EACX,mBAAmB,IAAI,2BAA2B,EAClD,oBAAoB,IAAI,4BAA4B,EACpD,kBAAkB,IAAI,0BAA0B,EAChD,MAAM,iCAAiC,CAAC;AAEzC,KAAK,mBAAmB,GAAG,2BAA2B,CAAC;AACvD,KAAK,oBAAoB,GAAG,4BAA4B,CAAC;AACzD,KAAK,kBAAkB,GAAG,0BAA0B,CAAC;AAErD,YAAY,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HQ Client — Runtime client for @vibesdotdev/hq
|
|
3
|
+
*
|
|
4
|
+
* Provides channels, surface, services, and apps sub-clients
|
|
5
|
+
* for cross-module access without deep-imports.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseRuntimeClient, getVibesClient } from '@vibesdotdev/kernel/client';
|
|
8
|
+
// Re-export base for consumers
|
|
9
|
+
export { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
|
|
10
|
+
/**
|
|
11
|
+
* HQ Client — Single entry point for HQ primitives
|
|
12
|
+
*
|
|
13
|
+
* This client exposes:
|
|
14
|
+
* - channels: CRUD for scheduled channels
|
|
15
|
+
* - surface: notification dispatch and resolution
|
|
16
|
+
* - services: service registration and control
|
|
17
|
+
* - apps: app token and pairing management
|
|
18
|
+
*
|
|
19
|
+
* Consumed by presence, pm, and sibling modules
|
|
20
|
+
* to avoid deep-imports into @vibesdotdev/hq/channels, etc.
|
|
21
|
+
*
|
|
22
|
+
* Runtime port `VibesRuntime` (Runtime SPEC `./client`): service control
|
|
23
|
+
* selects the OS service manager through `assets` and `declaredScope`, which
|
|
24
|
+
* `RuntimeRef` does not carry.
|
|
25
|
+
*/
|
|
26
|
+
export class HqClient extends BaseRuntimeClient {
|
|
27
|
+
/**
|
|
28
|
+
* Channel operations — scheduled invocation slots
|
|
29
|
+
*
|
|
30
|
+
* All methods resolve the OS semantic client and act on this
|
|
31
|
+
* client's runtime (its channel state and channel record).
|
|
32
|
+
*/
|
|
33
|
+
channels = {
|
|
34
|
+
create: async (input) => {
|
|
35
|
+
return (await this.os()).channels.create(input);
|
|
36
|
+
},
|
|
37
|
+
list: async (filter) => {
|
|
38
|
+
return (await this.os()).channels.list(filter);
|
|
39
|
+
},
|
|
40
|
+
get: async (id) => {
|
|
41
|
+
return (await this.os()).channels.get(id);
|
|
42
|
+
},
|
|
43
|
+
enable: async (id) => {
|
|
44
|
+
return (await this.os()).channels.enable(id);
|
|
45
|
+
},
|
|
46
|
+
disable: async (id) => {
|
|
47
|
+
return (await this.os()).channels.disable(id);
|
|
48
|
+
},
|
|
49
|
+
fire: async (id) => {
|
|
50
|
+
return (await this.os()).channels.fire(id);
|
|
51
|
+
},
|
|
52
|
+
history: async (id, limit) => {
|
|
53
|
+
return (await this.os()).channels.history(id, limit);
|
|
54
|
+
},
|
|
55
|
+
delete: async (id) => {
|
|
56
|
+
return (await this.os()).channels.delete(id);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
/** Resolve OS on the runtime handed to this client. */
|
|
60
|
+
os() {
|
|
61
|
+
return getVibesClient('os', this.runtime);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Surface operations — agent notifications
|
|
65
|
+
*
|
|
66
|
+
* All methods resolve the OS semantic client and take an explicit, server-
|
|
67
|
+
* derived `owner` as the first argument (the single tenancy gate). The consumer
|
|
68
|
+
* (PM daemon / CLI) acts as the local vibes-internal Marshal operator — it has
|
|
69
|
+
* no request `locals`, so it passes `SYSTEM_OWNER`, exactly the workboard
|
|
70
|
+
* "non-request bridge → SYSTEM_OWNER" pattern.
|
|
71
|
+
*/
|
|
72
|
+
surface = {
|
|
73
|
+
create: async (owner, notification) => {
|
|
74
|
+
return (await this.os()).surface.create(owner, notification);
|
|
75
|
+
},
|
|
76
|
+
list: async (owner, status) => {
|
|
77
|
+
return (await this.os()).surface.list(owner, status);
|
|
78
|
+
},
|
|
79
|
+
get: async (owner, id) => {
|
|
80
|
+
return (await this.os()).surface.get(owner, id);
|
|
81
|
+
},
|
|
82
|
+
resolve: async (owner, id, resolution) => {
|
|
83
|
+
return (await this.os()).surface.resolve(owner, id, resolution);
|
|
84
|
+
},
|
|
85
|
+
delete: async (owner, id) => {
|
|
86
|
+
return (await this.os()).surface.delete(owner, id);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Service operations through the runtime's OS service manager
|
|
91
|
+
*/
|
|
92
|
+
services = {
|
|
93
|
+
register: async (descriptor) => {
|
|
94
|
+
const { registerService } = await import('../services/registry.js');
|
|
95
|
+
return registerService(this.runtime, descriptor);
|
|
96
|
+
},
|
|
97
|
+
start: async (id) => {
|
|
98
|
+
const { startService } = await import('../services/registry.js');
|
|
99
|
+
await startService(this.runtime, id);
|
|
100
|
+
return true;
|
|
101
|
+
},
|
|
102
|
+
stop: async (id) => {
|
|
103
|
+
const { stopService } = await import('../services/registry.js');
|
|
104
|
+
await stopService(this.runtime, id);
|
|
105
|
+
return true;
|
|
106
|
+
},
|
|
107
|
+
status: async (id) => {
|
|
108
|
+
const { getServiceStatus } = await import('../services/registry.js');
|
|
109
|
+
return getServiceStatus(this.runtime, id);
|
|
110
|
+
},
|
|
111
|
+
logs: async (id, lines = 100) => {
|
|
112
|
+
const { getServiceLogs } = await import('../services/registry.js');
|
|
113
|
+
const logOutput = await getServiceLogs(this.runtime, id, lines);
|
|
114
|
+
return logOutput.split('\n');
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* App operations — token and pairing management
|
|
119
|
+
*/
|
|
120
|
+
apps = {
|
|
121
|
+
createToken: async (input) => {
|
|
122
|
+
const { createAppToken } = await import('../app/auth/service.consumer.js');
|
|
123
|
+
return createAppToken(this.runtime, input);
|
|
124
|
+
},
|
|
125
|
+
listTokens: async (includeRevoked = false) => {
|
|
126
|
+
const { listAppTokens } = await import('../app/auth/service.consumer.js');
|
|
127
|
+
return listAppTokens(this.runtime, includeRevoked);
|
|
128
|
+
},
|
|
129
|
+
revokeToken: async (tokenId) => {
|
|
130
|
+
const { revokeAppToken } = await import('../app/auth/service.consumer.js');
|
|
131
|
+
return revokeAppToken(this.runtime, tokenId);
|
|
132
|
+
},
|
|
133
|
+
createOrUpdatePairing: async (input) => {
|
|
134
|
+
const { createOrUpdatePairing } = await import('../app/auth/service.consumer.js');
|
|
135
|
+
return createOrUpdatePairing(this.runtime, input);
|
|
136
|
+
},
|
|
137
|
+
listPairings: async (appId) => {
|
|
138
|
+
const { listAppPairings } = await import('../app/auth/service.consumer.js');
|
|
139
|
+
return listAppPairings(this.runtime, appId);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export default HqClient;
|
|
144
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAe/E,+BAA+B;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;;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