@vibesdotdev/hq 0.0.0-stage → 1.0.0-rc.2
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 +70 -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.reassign-org.descriptor.d.ts +25 -0
- package/dist/cli/friction/hq.friction.reassign-org.descriptor.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.reassign-org.descriptor.js +18 -0
- package/dist/cli/friction/hq.friction.reassign-org.descriptor.js.map +1 -0
- package/dist/cli/friction/hq.friction.reassign-org.impl.d.ts +6 -0
- package/dist/cli/friction/hq.friction.reassign-org.impl.d.ts.map +1 -0
- package/dist/cli/friction/hq.friction.reassign-org.impl.js +27 -0
- package/dist/cli/friction/hq.friction.reassign-org.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 +17 -0
- package/dist/cli/friction/invocation.d.ts.map +1 -0
- package/dist/cli/friction/invocation.js +76 -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 +79 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/schemas/input.d.ts +119 -0
- package/dist/cli/schemas/input.d.ts.map +1 -0
- package/dist/cli/schemas/input.js +67 -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/reassign-org.d.ts +21 -0
- package/dist/friction/reassign-org.d.ts.map +1 -0
- package/dist/friction/reassign-org.js +121 -0
- package/dist/friction/reassign-org.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 +109 -0
- package/dist/friction/store.d.ts.map +1 -0
- package/dist/friction/store.js +466 -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,71 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const FrictionClusterJobInputSchema: z.ZodObject<{
|
|
3
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
"agent-self-observed": "agent-self-observed";
|
|
6
|
+
"agent-watched-user": "agent-watched-user";
|
|
7
|
+
"rum-error": "rum-error";
|
|
8
|
+
"chat-confusion": "chat-confusion";
|
|
9
|
+
"incomplete-marker": "incomplete-marker";
|
|
10
|
+
"user-explicit": "user-explicit";
|
|
11
|
+
"support-ticket": "support-ticket";
|
|
12
|
+
"telemetry-signal": "telemetry-signal";
|
|
13
|
+
}>>;
|
|
14
|
+
audience: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
user: "user";
|
|
16
|
+
agent: "agent";
|
|
17
|
+
both: "both";
|
|
18
|
+
}>>;
|
|
19
|
+
surface: z.ZodOptional<z.ZodString>;
|
|
20
|
+
since: z.ZodOptional<z.ZodString>;
|
|
21
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const FrictionClusterJobOutputSchema: z.ZodObject<{
|
|
25
|
+
clusters: z.ZodArray<z.ZodUnknown>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type FrictionClusterJobInput = z.infer<typeof FrictionClusterJobInputSchema>;
|
|
28
|
+
declare const _default: {
|
|
29
|
+
id: string;
|
|
30
|
+
kind: "workers/job";
|
|
31
|
+
queue: string;
|
|
32
|
+
schemas: {
|
|
33
|
+
input: z.ZodObject<{
|
|
34
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
"agent-self-observed": "agent-self-observed";
|
|
37
|
+
"agent-watched-user": "agent-watched-user";
|
|
38
|
+
"rum-error": "rum-error";
|
|
39
|
+
"chat-confusion": "chat-confusion";
|
|
40
|
+
"incomplete-marker": "incomplete-marker";
|
|
41
|
+
"user-explicit": "user-explicit";
|
|
42
|
+
"support-ticket": "support-ticket";
|
|
43
|
+
"telemetry-signal": "telemetry-signal";
|
|
44
|
+
}>>;
|
|
45
|
+
audience: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
user: "user";
|
|
47
|
+
agent: "agent";
|
|
48
|
+
both: "both";
|
|
49
|
+
}>>;
|
|
50
|
+
surface: z.ZodOptional<z.ZodString>;
|
|
51
|
+
since: z.ZodOptional<z.ZodString>;
|
|
52
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
output: z.ZodObject<{
|
|
56
|
+
clusters: z.ZodArray<z.ZodUnknown>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
};
|
|
59
|
+
retries: {
|
|
60
|
+
maxAttempts: number;
|
|
61
|
+
};
|
|
62
|
+
timeout: number;
|
|
63
|
+
isolation: "subprocess";
|
|
64
|
+
metadata: {
|
|
65
|
+
description: string;
|
|
66
|
+
feature: string;
|
|
67
|
+
};
|
|
68
|
+
enabled: boolean;
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|
|
71
|
+
//# sourceMappingURL=friction-clusters.job.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friction-clusters.job.descriptor.d.ts","sourceRoot":"","sources":["../../../src/friction/jobs/friction-clusters.job.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;iBAUxC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpF,wBAgBE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { FrictionAudienceSchema, FrictionSourceSchema } from "../schemas/signal.js";
|
|
3
|
+
export const FrictionClusterJobInputSchema = z.object({
|
|
4
|
+
filter: z
|
|
5
|
+
.object({
|
|
6
|
+
source: FrictionSourceSchema.optional(),
|
|
7
|
+
audience: FrictionAudienceSchema.optional(),
|
|
8
|
+
surface: z.string().optional(),
|
|
9
|
+
since: z.string().optional(),
|
|
10
|
+
limit: z.number().int().positive().optional()
|
|
11
|
+
})
|
|
12
|
+
.optional()
|
|
13
|
+
});
|
|
14
|
+
export const FrictionClusterJobOutputSchema = z.object({
|
|
15
|
+
clusters: z.array(z.unknown())
|
|
16
|
+
});
|
|
17
|
+
export default {
|
|
18
|
+
id: 'hq.friction.cluster',
|
|
19
|
+
kind: 'workers/job',
|
|
20
|
+
queue: 'hq-friction',
|
|
21
|
+
schemas: {
|
|
22
|
+
input: FrictionClusterJobInputSchema,
|
|
23
|
+
output: FrictionClusterJobOutputSchema
|
|
24
|
+
},
|
|
25
|
+
retries: { maxAttempts: 1 },
|
|
26
|
+
timeout: 30_000,
|
|
27
|
+
isolation: 'subprocess',
|
|
28
|
+
metadata: {
|
|
29
|
+
description: 'Materialize the read-only friction signature cluster projection.',
|
|
30
|
+
feature: 'hq-friction'
|
|
31
|
+
},
|
|
32
|
+
enabled: true
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=friction-clusters.job.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friction-clusters.job.descriptor.js","sourceRoot":"","sources":["../../../src/friction/jobs/friction-clusters.job.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEpF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,MAAM,EAAE,CAAC;SACP,MAAM,CAAC;QACP,MAAM,EAAE,oBAAoB,CAAC,QAAQ,EAAE;QACvC,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;QAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;KAC7C,CAAC;SACD,QAAQ,EAAE;CACZ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;CAC9B,CAAC,CAAC;AAIH,eAAe;IACd,EAAE,EAAE,qBAAqB;IACzB,IAAI,EAAE,aAAsB;IAC5B,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE;QACR,KAAK,EAAE,6BAA6B;QACpC,MAAM,EAAE,8BAA8B;KACtC;IACD,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE;IAC3B,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,YAAqB;IAChC,QAAQ,EAAE;QACT,WAAW,EAAE,kEAAkE;QAC/E,OAAO,EAAE,aAAa;KACtB;IACD,OAAO,EAAE,IAAI;CACb,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
2
|
+
import type { JobDescriptor, JobExecutionContext } from '@vibesdotdev/kernel/kinds';
|
|
3
|
+
import type { FrictionCluster } from '../clusters.ts';
|
|
4
|
+
import { type FrictionClusterJobInput } from './friction-clusters.job.descriptor.ts';
|
|
5
|
+
/**
|
|
6
|
+
* Materialize friction clusters on the runtime that constructed the job (the
|
|
7
|
+
* `workers/job` kind hands it `context.runtime`), never the host's default.
|
|
8
|
+
*/
|
|
9
|
+
declare class FrictionClustersJob {
|
|
10
|
+
readonly descriptor: JobDescriptor;
|
|
11
|
+
readonly id: string;
|
|
12
|
+
private readonly runtime;
|
|
13
|
+
constructor(descriptor: JobDescriptor, context: {
|
|
14
|
+
runtime?: VibesRuntime;
|
|
15
|
+
});
|
|
16
|
+
handle(context: Pick<JobExecutionContext<FrictionClusterJobInput>, 'data'>): Promise<{
|
|
17
|
+
clusters: FrictionCluster[];
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: import("@vibesdotdev/kernel").RuntimeImplementationWrapper<typeof FrictionClustersJob>;
|
|
21
|
+
export default _default;
|
|
22
|
+
//# sourceMappingURL=friction-clusters.job.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friction-clusters.job.impl.d.ts","sourceRoot":"","sources":["../../../src/friction/jobs/friction-clusters.job.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtG,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAiC,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEpH;;;GAGG;AACH,cAAM,mBAAmB;IAKvB,QAAQ,CAAC,UAAU,EAAE,aAAa;IAJnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;gBAG7B,UAAU,EAAE,aAAa,EAClC,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,YAAY,CAAA;KAAE;IAY9B,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,eAAe,EAAE,CAAA;KAAE,CAAC;CAI3H;;AAED,wBAIG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CapabilityError, createRuntimeImplementation } from '@vibesdotdev/kernel';
|
|
2
|
+
import { listFrictionClusters } from "../clusters.js";
|
|
3
|
+
import { FrictionClusterJobInputSchema } from "./friction-clusters.job.descriptor.js";
|
|
4
|
+
/**
|
|
5
|
+
* Materialize friction clusters on the runtime that constructed the job (the
|
|
6
|
+
* `workers/job` kind hands it `context.runtime`), never the host's default.
|
|
7
|
+
*/
|
|
8
|
+
class FrictionClustersJob {
|
|
9
|
+
descriptor;
|
|
10
|
+
id;
|
|
11
|
+
runtime;
|
|
12
|
+
constructor(descriptor, context) {
|
|
13
|
+
this.descriptor = descriptor;
|
|
14
|
+
this.id = descriptor.id;
|
|
15
|
+
if (!context?.runtime) {
|
|
16
|
+
throw new CapabilityError('The friction cluster job was constructed without its runtime.', 'INTERNAL', {
|
|
17
|
+
reason: 'runtime-invalid',
|
|
18
|
+
retryable: false
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
this.runtime = context.runtime;
|
|
22
|
+
}
|
|
23
|
+
async handle(context) {
|
|
24
|
+
const input = FrictionClusterJobInputSchema.parse(context.data);
|
|
25
|
+
return { clusters: await listFrictionClusters(this.runtime, input.filter) };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export default createRuntimeImplementation({
|
|
29
|
+
id: 'hq.friction.cluster',
|
|
30
|
+
kind: 'workers/job',
|
|
31
|
+
implementation: FrictionClustersJob
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=friction-clusters.job.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"friction-clusters.job.impl.js","sourceRoot":"","sources":["../../../src/friction/jobs/friction-clusters.job.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAqB,MAAM,qBAAqB,CAAC;AAGtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAgC,MAAM,uCAAuC,CAAC;AAEpH;;;GAGG;AACH,MAAM,mBAAmB;IAKd;IAJD,EAAE,CAAS;IACH,OAAO,CAAe;IAEvC,YACU,UAAyB,EAClC,OAAmC;QAD1B,eAAU,GAAV,UAAU,CAAe;QAGlC,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;YACvB,MAAM,IAAI,eAAe,CAAC,+DAA+D,EAAE,UAAU,EAAE;gBACtG,MAAM,EAAE,iBAAiB;gBACzB,SAAS,EAAE,KAAK;aAChB,CAAC,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAmE;QAC/E,MAAM,KAAK,GAAG,6BAA6B,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;IAC7E,CAAC;CACD;AAED,eAAe,2BAA2B,CAAC;IAC1C,EAAE,EAAE,qBAAqB;IACzB,IAAI,EAAE,aAAa;IACnB,cAAc,EAAE,mBAAmB;CACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Promote-a-signal → work-item create input — the ONE home for the promote
|
|
3
|
+
* convention (title cap, description body, severity→priority table, tags and
|
|
4
|
+
* the metadata back-link). Both promote paths consume this so a signal
|
|
5
|
+
* promotes to the SAME work item no matter which surface fired it:
|
|
6
|
+
*
|
|
7
|
+
* - the CLI command (`cli/friction/hq.friction.promote.impl.ts`)
|
|
8
|
+
* - the friction runtime/client's `promoteInput` (`client/friction/index.ts`),
|
|
9
|
+
* which the /work-items TUI's "Promote to task" action calls.
|
|
10
|
+
*
|
|
11
|
+
* Changing any field here changes the convention for every path at once —
|
|
12
|
+
* that is the point. Keep it pure: no runtime, no I/O.
|
|
13
|
+
*/
|
|
14
|
+
import type { FrictionSignal } from './schemas/signal.ts';
|
|
15
|
+
import type { JsonValue } from '@vibesdotdev/kernel/schemas/json';
|
|
16
|
+
export declare const SEVERITY_TO_PRIORITY: {
|
|
17
|
+
readonly blocker: "urgent";
|
|
18
|
+
readonly annoyance: "medium";
|
|
19
|
+
readonly confusion: "medium";
|
|
20
|
+
readonly 'nice-to-have': "low";
|
|
21
|
+
};
|
|
22
|
+
export interface PromoteWorkItemInput {
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
priority: 'low' | 'medium' | 'high' | 'urgent';
|
|
26
|
+
tags: string[];
|
|
27
|
+
metadata: {
|
|
28
|
+
source: 'friction';
|
|
29
|
+
custom: {
|
|
30
|
+
frictionSignalId: string;
|
|
31
|
+
frictionSignatureHash: string;
|
|
32
|
+
frictionEvidence?: JsonValue;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export declare function buildPromoteWorkItemInput(signal: FrictionSignal): PromoteWorkItemInput;
|
|
37
|
+
//# sourceMappingURL=promote-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promote-input.d.ts","sourceRoot":"","sources":["../../src/friction/promote-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,eAAO,MAAM,oBAAoB;;;;;CAK4D,CAAC;AAE9F,MAAM,WAAW,oBAAoB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC/C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,EAAE;QACT,MAAM,EAAE,UAAU,CAAC;QACnB,MAAM,EAAE;YACP,gBAAgB,EAAE,MAAM,CAAC;YACzB,qBAAqB,EAAE,MAAM,CAAC;YAC9B,gBAAgB,CAAC,EAAE,SAAS,CAAC;SAC7B,CAAC;KACF,CAAC;CACF;AAsBD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,cAAc,GAAG,oBAAoB,CAetF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Promote-a-signal → work-item create input — the ONE home for the promote
|
|
3
|
+
* convention (title cap, description body, severity→priority table, tags and
|
|
4
|
+
* the metadata back-link). Both promote paths consume this so a signal
|
|
5
|
+
* promotes to the SAME work item no matter which surface fired it:
|
|
6
|
+
*
|
|
7
|
+
* - the CLI command (`cli/friction/hq.friction.promote.impl.ts`)
|
|
8
|
+
* - the friction runtime/client's `promoteInput` (`client/friction/index.ts`),
|
|
9
|
+
* which the /work-items TUI's "Promote to task" action calls.
|
|
10
|
+
*
|
|
11
|
+
* Changing any field here changes the convention for every path at once —
|
|
12
|
+
* that is the point. Keep it pure: no runtime, no I/O.
|
|
13
|
+
*/
|
|
14
|
+
export const SEVERITY_TO_PRIORITY = {
|
|
15
|
+
blocker: 'urgent',
|
|
16
|
+
annoyance: 'medium',
|
|
17
|
+
confusion: 'medium',
|
|
18
|
+
'nice-to-have': 'low'
|
|
19
|
+
};
|
|
20
|
+
function buildTitle(signal) {
|
|
21
|
+
const observed = signal.observed.trim();
|
|
22
|
+
return observed.length > 120 ? `${observed.slice(0, 117)}…` : observed;
|
|
23
|
+
}
|
|
24
|
+
function buildDescription(signal) {
|
|
25
|
+
const lines = [
|
|
26
|
+
`Promoted from friction signal ${signal.id}.`,
|
|
27
|
+
'',
|
|
28
|
+
`surface: ${signal.surface}`,
|
|
29
|
+
`source: ${signal.source}`,
|
|
30
|
+
`severity: ${signal.severity}`,
|
|
31
|
+
`observed: ${signal.observed}`
|
|
32
|
+
];
|
|
33
|
+
if (signal.expected)
|
|
34
|
+
lines.push(`expected: ${signal.expected}`);
|
|
35
|
+
if (signal.repro)
|
|
36
|
+
lines.push(`repro: ${signal.repro}`);
|
|
37
|
+
if (signal.workaround)
|
|
38
|
+
lines.push(`workaround: ${signal.workaround}`);
|
|
39
|
+
return lines.join('\n');
|
|
40
|
+
}
|
|
41
|
+
export function buildPromoteWorkItemInput(signal) {
|
|
42
|
+
const custom = {
|
|
43
|
+
frictionSignalId: signal.id, frictionSignatureHash: signal.signatureHash
|
|
44
|
+
};
|
|
45
|
+
if (signal.evidence !== undefined)
|
|
46
|
+
custom.frictionEvidence = signal.evidence;
|
|
47
|
+
return {
|
|
48
|
+
title: buildTitle(signal),
|
|
49
|
+
description: buildDescription(signal),
|
|
50
|
+
priority: SEVERITY_TO_PRIORITY[signal.severity],
|
|
51
|
+
tags: ['friction'],
|
|
52
|
+
metadata: {
|
|
53
|
+
source: 'friction',
|
|
54
|
+
custom
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=promote-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promote-input.js","sourceRoot":"","sources":["../../src/friction/promote-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,cAAc,EAAE,KAAK;CACuE,CAAC;AAiB9F,SAAS,UAAU,CAAC,MAAsB;IACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACxC,OAAO,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;AACxE,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAsB;IAC/C,MAAM,KAAK,GAAG;QACb,iCAAiC,MAAM,CAAC,EAAE,GAAG;QAC7C,EAAE;QACF,YAAY,MAAM,CAAC,OAAO,EAAE;QAC5B,WAAW,MAAM,CAAC,MAAM,EAAE;QAC1B,aAAa,MAAM,CAAC,QAAQ,EAAE;QAC9B,aAAa,MAAM,CAAC,QAAQ,EAAE;KAC9B,CAAC;IACF,IAAI,MAAM,CAAC,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChE,IAAI,MAAM,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IACvD,IAAI,MAAM,CAAC,UAAU;QAAE,KAAK,CAAC,IAAI,CAAC,eAAe,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;IACtE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,MAAsB;IAC/D,MAAM,MAAM,GAA+C;QAC1D,gBAAgB,EAAE,MAAM,CAAC,EAAE,EAAE,qBAAqB,EAAE,MAAM,CAAC,aAAa;KACxE,CAAC;IACF,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS;QAAE,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC7E,OAAO;QACN,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC;QACzB,WAAW,EAAE,gBAAgB,CAAC,MAAM,CAAC;QACrC,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC/C,IAAI,EAAE,CAAC,UAAU,CAAC;QAClB,QAAQ,EAAE;YACT,MAAM,EAAE,UAAU;YAClB,MAAM;SACN;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Read-only reverse projection from work-item metadata to friction signals. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { WorkItemMetadataSchema } from '@vibesdotdev/projects/work/schemas/work-item';
|
|
4
|
+
import type { RuntimeRef } from '@vibesdotdev/kernel';
|
|
5
|
+
export interface FrictionPromotionSignal {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FrictionPromotionWorkItem {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
metadata?: z.infer<typeof WorkItemMetadataSchema>;
|
|
12
|
+
}
|
|
13
|
+
export interface FrictionPromotionWorkStore {
|
|
14
|
+
listWorkItems(input: {
|
|
15
|
+
includeCompleted: boolean;
|
|
16
|
+
includeCancelled: boolean;
|
|
17
|
+
limit: number;
|
|
18
|
+
offset: number;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
items: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
}>;
|
|
23
|
+
hasMore: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
getWorkItem(id: string): Promise<FrictionPromotionWorkItem | null>;
|
|
26
|
+
}
|
|
27
|
+
/** The runtime the promotion lookup resolves the work store through (and logs on). */
|
|
28
|
+
export type FrictionPromotionRuntime = RuntimeRef & {
|
|
29
|
+
resolve<T>(kind: string, id: string): Promise<T>;
|
|
30
|
+
};
|
|
31
|
+
export declare function mapPromotedWorkItems<T extends FrictionPromotionWorkItem>(signals: readonly FrictionPromotionSignal[], workItems: readonly T[]): Map<string, T[]>;
|
|
32
|
+
export declare function resolvePromotedWorkItems(runtime: FrictionPromotionRuntime, signals: readonly FrictionPromotionSignal[]): Promise<Map<string, FrictionPromotionWorkItem[]> | null>;
|
|
33
|
+
export declare function formatPromotedWorkItems(workItems: readonly FrictionPromotionWorkItem[]): string;
|
|
34
|
+
//# sourceMappingURL=promotion-visibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-visibility.d.ts","sourceRoot":"","sources":["../../src/friction/promotion-visibility.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,uBAAuB;IACvC,EAAE,EAAE,M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0,0 +1,57 @@
|
|
|
1
|
+
/** Read-only reverse projection from work-item metadata to friction signals. */
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { WorkItemMetadataSchema } from '@vibesdotdev/projects/work/schemas/work-item';
|
|
4
|
+
const PromotionMetadataSchema = WorkItemMetadataSchema.extend({
|
|
5
|
+
custom: z.object({ frictionSignalId: z.string().optional() }).loose().optional()
|
|
6
|
+
});
|
|
7
|
+
function frictionSignalIdFromMetadata(metadata) {
|
|
8
|
+
return PromotionMetadataSchema.optional().parse(metadata)?.custom?.frictionSignalId;
|
|
9
|
+
}
|
|
10
|
+
export function mapPromotedWorkItems(signals, workItems) {
|
|
11
|
+
const promotions = new Map();
|
|
12
|
+
const signalIds = new Set(signals.map((signal) => signal.id));
|
|
13
|
+
for (const workItem of workItems) {
|
|
14
|
+
const signalId = frictionSignalIdFromMetadata(workItem.metadata);
|
|
15
|
+
if (!signalId || !signalIds.has(signalId))
|
|
16
|
+
continue;
|
|
17
|
+
const matches = promotions.get(signalId);
|
|
18
|
+
if (matches)
|
|
19
|
+
matches.push(workItem);
|
|
20
|
+
else
|
|
21
|
+
promotions.set(signalId, [workItem]);
|
|
22
|
+
}
|
|
23
|
+
return promotions;
|
|
24
|
+
}
|
|
25
|
+
export async function resolvePromotedWorkItems(runtime, signals) {
|
|
26
|
+
if (signals.length === 0)
|
|
27
|
+
return new Map();
|
|
28
|
+
if (!runtime.hasKind('storage/manifest') || runtime.query('storage/manifest').withId('work.items').descriptors().length === 0)
|
|
29
|
+
return null;
|
|
30
|
+
{
|
|
31
|
+
const store = await runtime.resolve('storage/manifest', 'work.items');
|
|
32
|
+
const workItems = [];
|
|
33
|
+
let offset = 0;
|
|
34
|
+
while (true) {
|
|
35
|
+
const page = await store.listWorkItems({
|
|
36
|
+
includeCompleted: true,
|
|
37
|
+
includeCancelled: true,
|
|
38
|
+
limit: 100,
|
|
39
|
+
offset
|
|
40
|
+
});
|
|
41
|
+
const rows = await Promise.all(page.items.map((item) => store.getWorkItem(item.id)));
|
|
42
|
+
for (const row of rows)
|
|
43
|
+
if (row)
|
|
44
|
+
workItems.push(row);
|
|
45
|
+
if (!page.hasMore || page.items.length === 0)
|
|
46
|
+
break;
|
|
47
|
+
offset += page.items.length;
|
|
48
|
+
}
|
|
49
|
+
return mapPromotedWorkItems(signals, workItems);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export function formatPromotedWorkItems(workItems) {
|
|
53
|
+
return workItems.length === 0
|
|
54
|
+
? '—'
|
|
55
|
+
: workItems.map((workItem) => `${workItem.id.slice(0, 8)} ${workItem.title}`).join(', ');
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=promotion-visibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotion-visibility.js","sourceRoot":"","sources":["../../src/friction/promotion-visibility.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AA4BtF,MAAM,uBAAuB,GAAG,sBAAsB,CAAC,MAAM,CAAC;IAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CAChF,CAAC,CAAC;AAEH,SAAS,4BAA4B,CAAC,QAA+C;IACpF,OAAO,uBAAuB,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC;AACrF,CAAC;AAED,MAAM,UAAU,oBAAoB,CACnC,OAA2C,EAC3C,SAAuB;IAEvB,MAAM,UAAU,GAAG,IAAI,GAAG,EAAe,CAAC;IAC1C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,E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M,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACrF,KAAK,MAAM,GAAG,IAAI,IAAI;gBAAE,IAAI,GAAG;oBAAE,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,MAAM;YACpD,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAC7B,CAAC;QACD,OAAO,oBAAoB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACjD,CAAC;AACF,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,SAA+C;IACtF,OAAO,SAAS,CAAC,MAAM,KAAK,CAAC;QAC5B,CAAC,CAAC,GAAG;QACL,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type FrictionRuntime, type ListFrictionSignalsFilter } from './store.ts';
|
|
2
|
+
import type { FrictionDisposition } from './schemas/disposition.ts';
|
|
3
|
+
import type { FrictionSignal } from './schemas/signal.ts';
|
|
4
|
+
/**
|
|
5
|
+
* Public, read-only friction surface. Consumers use this DTO/helper entrypoint
|
|
6
|
+
* for types and projections; runtime clients still resolve through the registry.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FrictionReadClient {
|
|
9
|
+
private readonly runtime;
|
|
10
|
+
/** Reads through `runtime` (the caller's own), never a default runtime. */
|
|
11
|
+
constructor(runtime: FrictionRuntime);
|
|
12
|
+
list(filter?: ListFrictionSignalsFilter): Promise<FrictionSignal[]>;
|
|
13
|
+
show(id: string): Promise<FrictionSignal | undefined>;
|
|
14
|
+
latestDispositions(signalIds: readonly string[]): Promise<Map<string, FrictionDisposition>>;
|
|
15
|
+
}
|
|
16
|
+
export { formatPromotedWorkItems, mapPromotedWorkItems, resolvePromotedWorkItems, type FrictionPromotionRuntime, type FrictionPromotionSignal, type FrictionPromotionWorkItem, type FrictionPromotionWorkStore } from './promotion-visibility.ts';
|
|
17
|
+
export type { FrictionCluster, FrictionClusterBackend, LatestDispositionsResolver } from './clusters.ts';
|
|
18
|
+
export type { FrictionDisposition, FrictionDispositionKind } from './schemas/disposition.ts';
|
|
19
|
+
export type { FrictionAudience, FrictionEvidenceLink, FrictionEvidenceLinkKind, FrictionPersonalDataLevel, FrictionSeverity, FrictionSignal, FrictionSource } from './schemas/signal.ts';
|
|
20
|
+
export type { FrictionRuntime, ListFrictionSignalsFilter } from './store.ts';
|
|
21
|
+
//# sourceMappingURL=read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/friction/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;GAGG;AACH,qBAAa,kBAAkB;IAElB,OAAO,CAAC,QAAQ,CAAC,OAAO;IADpC,2EAA2E;gBAC9C,OAAO,EAAE,eAAe;IAE/C,IAAI,CAAC,MAAM,GAAE,yBAA8B,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAIvE,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAIrD,kBAAkB,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CAGjG;AAED,OAAO,EACN,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AACzG,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAC7F,YAAY,EACX,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getFrictionSignal, latestDispositionsBySignal, listFrictionSignals } from "./store.js";
|
|
2
|
+
/**
|
|
3
|
+
* Public, read-only friction surface. Consumers use this DTO/helper entrypoint
|
|
4
|
+
* for types and projections; runtime clients still resolve through the registry.
|
|
5
|
+
*/
|
|
6
|
+
export class FrictionReadClient {
|
|
7
|
+
runtime;
|
|
8
|
+
/** Reads through `runtime` (the caller's own), never a default runtime. */
|
|
9
|
+
constructor(runtime) {
|
|
10
|
+
this.runtime = runtime;
|
|
11
|
+
}
|
|
12
|
+
async list(filter = {}) {
|
|
13
|
+
return listFrictionSignals(this.runtime, filter);
|
|
14
|
+
}
|
|
15
|
+
async show(id) {
|
|
16
|
+
return getFrictionSignal(this.runtime, id);
|
|
17
|
+
}
|
|
18
|
+
async latestDispositions(signalIds) {
|
|
19
|
+
return latestDispositionsBySignal(this.runtime, signalIds);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export { formatPromotedWorkItems, mapPromotedWorkItems, resolvePromotedWorkItems } from "./promotion-visibility.js";
|
|
23
|
+
//# sourceMappingURL=read.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/friction/read.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EAGnB,MAAM,YAAY,CAAC;AAIpB;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAED;IAD7B,2EAA2E;IAC3E,YAA6B,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;IAAG,CAAC;IAEzD,KAAK,CAAC,IAAI,CAAC,SAAoC,EAAE;QAChD,OAAO,mBAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAU;QACpB,OAAO,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,SAA4B;QACpD,OAAO,0BAA0B,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;CACD;AAED,OAAO,EACN,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EAKxB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type FrictionRuntime } from './store.ts';
|
|
2
|
+
export interface ReassignFrictionOrgInput {
|
|
3
|
+
/** Legacy org references to move off (e.g. `vibes`, `local`). */
|
|
4
|
+
from: readonly string[];
|
|
5
|
+
/** The canonical org id the rows move to. */
|
|
6
|
+
to: string;
|
|
7
|
+
dryRun: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ReassignFrictionOrgResult {
|
|
10
|
+
dryRun: boolean;
|
|
11
|
+
from: string[];
|
|
12
|
+
to: string;
|
|
13
|
+
/** Spool rows drained into the record store first (counted, not drained, on a dry run). */
|
|
14
|
+
spoolRows: number;
|
|
15
|
+
rewritten: number;
|
|
16
|
+
merged: number;
|
|
17
|
+
dispositionsRepointed: number;
|
|
18
|
+
linksRewritten: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function reassignFrictionOrg(runtime: FrictionRuntime, input: ReassignFrictionOrgInput): Promise<ReassignFrictionOrgResult>;
|
|
21
|
+
//# sourceMappingURL=reassign-org.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reassign-org.d.ts","sourceRoot":"","sources":["../../src/friction/reassign-org.ts"],"names":[],"mappings":"AAiBA,OAAO,EAQN,KAAK,eAAe,EACpB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,wBAAwB;IACxC,iEAAiE;IACjE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACzC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,2FAA2F;IAC3F,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;CACvB;AAwBD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAiFvI"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reassign friction rows from legacy org references (the `vibes` alias, the
|
|
3
|
+
* old `local` default) to a canonical org id.
|
|
4
|
+
*
|
|
5
|
+
* The org is part of a row's causal fingerprint, so a reassigned row gets a new
|
|
6
|
+
* fingerprint. A row whose new fingerprint is unclaimed under the target org is
|
|
7
|
+
* rewritten in place. A row that collides with an existing target-org row (or
|
|
8
|
+
* with another reassigned row) merges its occurrences into that row through the
|
|
9
|
+
* store's merge, has its dispositions re-pointed, and is then removed: merge
|
|
10
|
+
* first, remove last, so an interrupted run re-merges idempotently and loses
|
|
11
|
+
* nothing. `friction-signal` evidence links naming a reassigned row follow it.
|
|
12
|
+
*
|
|
13
|
+
* Spool rows are drained into the record store first (`drainFrictionSpool`);
|
|
14
|
+
* a dry run plans the record rows and only counts the spool.
|
|
15
|
+
*/
|
|
16
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
17
|
+
import { FrictionSignalSchema } from "./schemas/signal.js";
|
|
18
|
+
import { canonicalizeFrictionSignal, drainFrictionSpool, frictionBackendInfo, mergeRecordFrictionSignal, resolveFrictionDispositionRecord, resolveFrictionRecord } from "./store.js";
|
|
19
|
+
/** The aggregate a row becomes under `to`, with its fingerprint recomputed. */
|
|
20
|
+
async function reassigned(row, to) {
|
|
21
|
+
const { fingerprint: _fingerprint, fingerprintVersion: _version, ...rest } = row;
|
|
22
|
+
return canonicalizeFrictionSignal(FrictionSignalSchema.parse({ ...rest, orgId: to }));
|
|
23
|
+
}
|
|
24
|
+
function rewriteLinks(row, moved, from, to) {
|
|
25
|
+
let changed = false;
|
|
26
|
+
const links = row.evidenceLinks.map((link) => {
|
|
27
|
+
if (link.kind !== 'friction-signal')
|
|
28
|
+
return link;
|
|
29
|
+
const [org, id] = link.ref.split('/', 2);
|
|
30
|
+
if (!org || !id || !from.has(org))
|
|
31
|
+
return link;
|
|
32
|
+
changed = true;
|
|
33
|
+
return { ...link, ref: `${to}/${moved.get(id) ?? id}` };
|
|
34
|
+
});
|
|
35
|
+
return changed ? links : null;
|
|
36
|
+
}
|
|
37
|
+
export async function reassignFrictionOrg(runtime, input) {
|
|
38
|
+
const from = new Set(input.from.map((org) => org.trim()).filter(Boolean));
|
|
39
|
+
if (from.size === 0 || from.has(input.to)) {
|
|
40
|
+
throw new CapabilityError('Reassignment needs legacy orgs distinct from the target org.', 'INVALID_INPUT', { reason: 'friction-reassign-input-invalid' });
|
|
41
|
+
}
|
|
42
|
+
const record = await resolveFrictionRecord(runtime);
|
|
43
|
+
if (!record) {
|
|
44
|
+
throw new CapabilityError('Friction reassignment needs the os.friction-signals record store.', 'UNAVAILABLE', { reason: 'friction-record-unavailable' });
|
|
45
|
+
}
|
|
46
|
+
await record.initialize?.();
|
|
47
|
+
const backends = await frictionBackendInfo(runtime);
|
|
48
|
+
if (!input.dryRun && backends.spool.rowCount > 0)
|
|
49
|
+
await drainFrictionSpool(runtime);
|
|
50
|
+
const rows = (await record.list()).items.map((item) => FrictionSignalSchema.parse(item));
|
|
51
|
+
const claimed = new Map();
|
|
52
|
+
for (const row of rows) {
|
|
53
|
+
if (row.orgId === input.to && row.fingerprint)
|
|
54
|
+
claimed.set(row.fingerprint, row.id);
|
|
55
|
+
}
|
|
56
|
+
// Plan in creation order, so the earliest legacy row keeps its id when legacy rows collide.
|
|
57
|
+
const plans = [];
|
|
58
|
+
for (const row of [...rows].sort((a, b) => a.createdAt.localeCompare(b.createdAt))) {
|
|
59
|
+
if (!from.has(row.orgId))
|
|
60
|
+
continue;
|
|
61
|
+
const next = await reassigned(row, input.to);
|
|
62
|
+
const owner = claimed.get(next.fingerprint);
|
|
63
|
+
if (owner)
|
|
64
|
+
plans.push({ kind: 'merge', row, next, mergeInto: owner });
|
|
65
|
+
else {
|
|
66
|
+
claimed.set(next.fingerprint, row.id);
|
|
67
|
+
plans.push({ kind: 'rewrite', row, next });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const merges = plans.flatMap((plan) => (plan.kind === 'merge' ? [plan] : []));
|
|
71
|
+
const moved = new Map(merges.map((plan) => [plan.row.id, plan.mergeInto]));
|
|
72
|
+
const linkRows = rows.filter((row) => !moved.has(row.id) && rewriteLinks(row, moved, from, input.to));
|
|
73
|
+
const dispositions = await resolveFrictionDispositionRecord(runtime);
|
|
74
|
+
await dispositions?.initialize?.();
|
|
75
|
+
const dispositionRows = dispositions ? (await dispositions.list()).items.filter((item) => moved.has(item.signalId)) : [];
|
|
76
|
+
const result = {
|
|
77
|
+
dryRun: input.dryRun,
|
|
78
|
+
from: [...from],
|
|
79
|
+
to: input.to,
|
|
80
|
+
spoolRows: backends.spool.rowCount,
|
|
81
|
+
rewritten: plans.length - merges.length,
|
|
82
|
+
merged: moved.size,
|
|
83
|
+
dispositionsRepointed: dispositionRows.length,
|
|
84
|
+
linksRewritten: linkRows.length
|
|
85
|
+
};
|
|
86
|
+
if (input.dryRun)
|
|
87
|
+
return result;
|
|
88
|
+
for (const plan of plans) {
|
|
89
|
+
if (plan.kind !== 'rewrite')
|
|
90
|
+
continue;
|
|
91
|
+
await record.update(plan.row.id, {
|
|
92
|
+
orgId: input.to,
|
|
93
|
+
fingerprint: plan.next.fingerprint,
|
|
94
|
+
fingerprintVersion: plan.next.fingerprintVersion,
|
|
95
|
+
signatureHash: plan.next.signatureHash
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
for (const plan of merges) {
|
|
99
|
+
await mergeRecordFrictionSignal(record, plan.next);
|
|
100
|
+
// The merged row's evidence links (re-pointed) join the surviving row's, so no evidence is dropped.
|
|
101
|
+
const carried = rewriteLinks(plan.row, moved, from, input.to) ?? plan.row.evidenceLinks;
|
|
102
|
+
if (carried.length > 0) {
|
|
103
|
+
const target = FrictionSignalSchema.parse(await record.get(plan.mergeInto));
|
|
104
|
+
const known = new Set(target.evidenceLinks.map((link) => `${link.kind}:${link.ref}`));
|
|
105
|
+
const added = carried.filter((link) => !known.has(`${link.kind}:${link.ref}`));
|
|
106
|
+
if (added.length > 0)
|
|
107
|
+
await record.update(plan.mergeInto, { evidenceLinks: [...target.evidenceLinks, ...added] });
|
|
108
|
+
}
|
|
109
|
+
for (const disposition of dispositionRows.filter((item) => item.signalId === plan.row.id)) {
|
|
110
|
+
await dispositions?.update(disposition.id, { signalId: plan.mergeInto });
|
|
111
|
+
}
|
|
112
|
+
await record.delete(plan.row.id);
|
|
113
|
+
}
|
|
114
|
+
for (const row of linkRows) {
|
|
115
|
+
const links = rewriteLinks(row, moved, from, input.to);
|
|
116
|
+
if (links)
|
|
117
|
+
await record.update(row.id, { evidenceLinks: links });
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=reassign-org.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reassign-org.js","sourceRoot":"","sources":["../../src/friction/reassign-org.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAuB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EACN,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,gCAAgC,EAChC,qBAAqB,EAGrB,MAAM,YAAY,CAAC;AA0BpB,+EAA+E;AAC/E,KAAK,UAAU,UAAU,CAAC,GAAmB,EAAE,EAAU;IACxD,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG,CAAC;IACjF,OAAO,0BAA0B,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AACvF,CAAC;AAED,SAAS,YAAY,CAAC,GAAmB,EAAE,KAAkC,EAAE,IAAyB,EAAE,EAAU;IACnH,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5C,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB;YAAE,OAAO,IAAI,CAAC;QACjD,MAAM,CAAC,GAAG,E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