heyspex 0.2.6 → 0.2.7
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/bin/hs.mjs +85 -25
- package/bin/spexcode.mjs +31 -0
- package/dev-factory/lib/local-firecrawl.mjs +294 -0
- package/dev-factory/lib/seat-context.mjs +20 -4
- package/dev-factory/model-catalog.json +222 -222
- package/dev-factory/spexcrawl/firecrawl-cli.mjs +755 -0
- package/dist/cli/hs-connect.mjs +20 -2
- package/dist/cli/hs-defer.mjs +19 -1
- package/dist/cli/hs-index-rebuild.mjs +19 -1
- package/dist/cli/hs-index-reconcile.mjs +19 -1
- package/dist/cli/hs-init.mjs +2 -2
- package/dist/cli/hs-install.mjs +2 -2
- package/dist/cli/hs-join.mjs +20 -2
- package/dist/cli/hs-next-launch.mjs +89 -10
- package/dist/cli/hs-spawn.mjs +27 -1
- package/dist/cli/hs-vault-pull.mjs +19 -1
- package/dist/cli/hs-vault-push.mjs +19 -1
- package/dist/cli/hs-vault.mjs +21 -7
- package/dist/cli/hs-workspace.mjs +19 -1
- package/dist/cli-templates/customer-vault/specs/entity-model.md +1728 -1728
- package/dist/cli-templates/customer-vault/specs/protocols/canonical-frontmatter-templates.md +464 -464
- package/dist/cli-templates/customer-vault/specs/protocols/destructive-action-checklist.md +122 -122
- package/dist/cli-templates/customer-vault/specs/protocols/memory-protocol.md +46 -46
- package/dist/cli-templates/customer-vault/specs/protocols/spec-hierarchy.md +530 -530
- package/dist/cli-templates/customer-vault/specs/protocols/spec-summary-authoring.md +83 -83
- package/dist/cli-templates/harness-commands/claude/hs-backfill.md +28 -28
- package/dist/cli-templates/harness-commands/claude/hs-capture.md +62 -62
- package/dist/cli-templates/harness-commands/claude/hs-defer.md +29 -29
- package/dist/cli-templates/harness-commands/claude/hs-ground.md +30 -30
- package/dist/cli-templates/harness-commands/claude/hs-next.md +29 -29
- package/dist/cli-templates/harness-commands/claude/hs-promote.md +70 -70
- package/dist/cli-templates/harness-commands/claude/hs-push.md +35 -35
- package/dist/cli-templates/harness-commands/claude/hs-qc.md +27 -27
- package/dist/cli-templates/harness-commands/claude/hs-res.md +20 -8
- package/dist/cli-templates/harness-commands/claude/hs-resolve.md +23 -23
- package/dist/cli-templates/harness-commands/claude/hs-view.md +28 -28
- package/dist/cli-templates/harness-commands/claude/kill-ports.md +32 -32
- package/dist/cli-templates/harness-commands/claude/prototype.md +91 -91
- package/dist/cli-templates/harness-commands/cursor/hs-backfill.md +22 -22
- package/dist/cli-templates/harness-commands/cursor/hs-capture.md +56 -56
- package/dist/cli-templates/harness-commands/cursor/hs-defer.md +23 -23
- package/dist/cli-templates/harness-commands/cursor/hs-ground.md +24 -24
- package/dist/cli-templates/harness-commands/cursor/hs-next.md +23 -23
- package/dist/cli-templates/harness-commands/cursor/hs-promote.md +64 -64
- package/dist/cli-templates/harness-commands/cursor/hs-push.md +29 -29
- package/dist/cli-templates/harness-commands/cursor/hs-qc.md +21 -21
- package/dist/cli-templates/harness-commands/cursor/hs-res.md +20 -8
- package/dist/cli-templates/harness-commands/cursor/hs-resolve.md +17 -17
- package/dist/cli-templates/harness-commands/cursor/hs-view.md +23 -23
- package/dist/cli-templates/harness-commands/cursor/kill-ports.md +26 -26
- package/dist/cli-templates/harness-commands/cursor/prototype.md +86 -86
- package/docs/copilot-plugin-install.md +7 -0
- package/docs/mcp-client-config.md +6 -0
- package/package.json +7 -2
- package/plugins/heyspex/README.md +6 -0
- package/plugins/heyspex/bin/launch-mcp.mjs +17 -0
- package/plugins/heyspex/hooks/hooks.json +418 -418
- package/scripts/claude-hooks/_intent-classifier-semantic.mjs +2 -2
- package/scripts/hs-companion.mjs +38 -8
- package/scripts/lib/companion-install.mjs +768 -0
- package/scripts/lib/customer-kit.mjs +5 -3
- package/scripts/lib/hs-companion-settings.mjs +1 -0
- package/scripts/lib/hs-source-push.mjs +386 -386
- package/spexharness/doctrine/baseline/SPEXCODE-DOCTRINE.baseline.json +29 -29
- package/spexharness/src/adapters/copilot-models.mjs +179 -0
- package/spexharness/src/adapters/harness-detect.mjs +148 -0
- package/spexharness/src/gates/directive-obligation-gate.decide.mjs +132 -132
- package/spexharness/src/gates/vault-write-tier-guard.decide.mjs +153 -125
- package/spexharness/src/seat-context.mjs +10 -5
- package/spexharness/src/session-bootstrap.mjs +6 -3
- package/vendor/heyspex-mcp/cli.mjs +6 -1
- package/vendor/heyspex-mcp/config-seed.yaml +15 -15
- package/vendor/heyspex-mcp/dev-factory-overlay.mjs +142 -0
- package/vendor/heyspex-mcp/memory-tools.mjs +523 -523
- package/vendor/heyspex-mcp/on-deck-scheduler.mjs +1708 -1708
- package/vendor/heyspex-mcp/procedure-handlers.mjs +327 -327
- package/vendor/heyspex-mcp/procedure-tools.mjs +1209 -1181
- package/vendor/heyspex-mcp/research-tools.mjs +22 -2
- package/vendor/heyspex-mcp/seat-assign-cli.mjs +242 -0
- package/vendor/heyspex-mcp/seat-assignment-rules.mjs +96 -0
- package/vendor/heyspex-mcp/seat-assignments-client.mjs +265 -0
- package/vendor/heyspex-mcp/seat-defaults-cli.mjs +45 -0
- package/vendor/heyspex-mcp/seat-defaults.mjs +232 -0
- package/vendor/heyspex-mcp/seat-identity.mjs +171 -0
- package/vendor/heyspex-mcp/vault-io.mjs +720 -720
package/dist/cli/hs-connect.mjs
CHANGED
|
@@ -2286,6 +2286,24 @@ var consoleSettingsStore = pgTable(
|
|
|
2286
2286
|
},
|
|
2287
2287
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
2288
2288
|
);
|
|
2289
|
+
var seatAssignments = pgTable(
|
|
2290
|
+
"seat_assignments",
|
|
2291
|
+
{
|
|
2292
|
+
accountId: text("account_id").notNull(),
|
|
2293
|
+
vaultId: text("vault_id").notNull(),
|
|
2294
|
+
harness: text("harness").notNull(),
|
|
2295
|
+
seatId: text("seat_id").notNull(),
|
|
2296
|
+
model: text("model").notNull(),
|
|
2297
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
2298
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
2299
|
+
// cleared whenever the user sets a new model.
|
|
2300
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
2301
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
2302
|
+
},
|
|
2303
|
+
(table) => [
|
|
2304
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
2305
|
+
]
|
|
2306
|
+
);
|
|
2289
2307
|
var wipLedger = pgTable(
|
|
2290
2308
|
"wip_ledger",
|
|
2291
2309
|
{
|
|
@@ -4289,7 +4307,7 @@ var COMMAND_SCOPES = Object.freeze({
|
|
|
4289
4307
|
"hs-promote.md": { scope: "customer", why: "Capture \u2192 research \u2192 milestone promotion." },
|
|
4290
4308
|
"hs-push.md": { scope: "customer", why: "Push an epic plan into the vault." },
|
|
4291
4309
|
"hs-qc.md": { scope: "customer", why: "Post-plan QC gate." },
|
|
4292
|
-
"hs-res.md": { scope: "customer", why: "Research method entrypoint (SpexCrawl/DeepSeek)." },
|
|
4310
|
+
"hs-res.md": { scope: "customer", why: "Research method entrypoint (local Docker Firecrawl search + SpexCrawl/Firecrawl fetch; DeepSeek on the platform)." },
|
|
4293
4311
|
"hs-resolve.md": { scope: "customer", why: "Resolution lane." },
|
|
4294
4312
|
"hs-review.md": { scope: "customer", why: "Review queue." },
|
|
4295
4313
|
"hs-view.md": { scope: "customer", why: "Open a console surface." },
|
|
@@ -4699,7 +4717,7 @@ function githubHookNames() {
|
|
|
4699
4717
|
}
|
|
4700
4718
|
function githubHookCommand(row2) {
|
|
4701
4719
|
const tail = hookTail(row2);
|
|
4702
|
-
return `R=node_modules/heyspex/scripts/claude-hooks/_run.mjs; [ -f "$R" ] || R=./scripts/claude-hooks/_run.mjs; [ -f "$R" ] || exit 0; exec node "$R" ${tail}`;
|
|
4720
|
+
return `export HEYSPEX_HARNESS="\${HEYSPEX_HARNESS:-copilot}"; R=node_modules/heyspex/scripts/claude-hooks/_run.mjs; [ -f "$R" ] || R=./scripts/claude-hooks/_run.mjs; [ -f "$R" ] || exit 0; exec node "$R" ${tail}`;
|
|
4703
4721
|
}
|
|
4704
4722
|
function renderGithubHooksDocument() {
|
|
4705
4723
|
const allowed = githubHookNames();
|
package/dist/cli/hs-defer.mjs
CHANGED
|
@@ -1256,7 +1256,7 @@ var init_interfaces = __esm({
|
|
|
1256
1256
|
});
|
|
1257
1257
|
|
|
1258
1258
|
// spex-console/src/lib/db/schema/postgres.ts
|
|
1259
|
-
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
1259
|
+
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, seatAssignments, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
1260
1260
|
var init_postgres = __esm({
|
|
1261
1261
|
"spex-console/src/lib/db/schema/postgres.ts"() {
|
|
1262
1262
|
"use strict";
|
|
@@ -2206,6 +2206,24 @@ var init_postgres = __esm({
|
|
|
2206
2206
|
},
|
|
2207
2207
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
2208
2208
|
);
|
|
2209
|
+
seatAssignments = pgTable(
|
|
2210
|
+
"seat_assignments",
|
|
2211
|
+
{
|
|
2212
|
+
accountId: text("account_id").notNull(),
|
|
2213
|
+
vaultId: text("vault_id").notNull(),
|
|
2214
|
+
harness: text("harness").notNull(),
|
|
2215
|
+
seatId: text("seat_id").notNull(),
|
|
2216
|
+
model: text("model").notNull(),
|
|
2217
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
2218
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
2219
|
+
// cleared whenever the user sets a new model.
|
|
2220
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
2221
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
2222
|
+
},
|
|
2223
|
+
(table) => [
|
|
2224
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
2225
|
+
]
|
|
2226
|
+
);
|
|
2209
2227
|
wipLedger = pgTable(
|
|
2210
2228
|
"wip_ledger",
|
|
2211
2229
|
{
|
|
@@ -2015,7 +2015,7 @@ var init_interfaces = __esm({
|
|
|
2015
2015
|
});
|
|
2016
2016
|
|
|
2017
2017
|
// spex-console/src/lib/db/schema/postgres.ts
|
|
2018
|
-
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
2018
|
+
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, seatAssignments, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
2019
2019
|
var init_postgres = __esm({
|
|
2020
2020
|
"spex-console/src/lib/db/schema/postgres.ts"() {
|
|
2021
2021
|
"use strict";
|
|
@@ -2965,6 +2965,24 @@ var init_postgres = __esm({
|
|
|
2965
2965
|
},
|
|
2966
2966
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
2967
2967
|
);
|
|
2968
|
+
seatAssignments = pgTable(
|
|
2969
|
+
"seat_assignments",
|
|
2970
|
+
{
|
|
2971
|
+
accountId: text("account_id").notNull(),
|
|
2972
|
+
vaultId: text("vault_id").notNull(),
|
|
2973
|
+
harness: text("harness").notNull(),
|
|
2974
|
+
seatId: text("seat_id").notNull(),
|
|
2975
|
+
model: text("model").notNull(),
|
|
2976
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
2977
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
2978
|
+
// cleared whenever the user sets a new model.
|
|
2979
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
2980
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
2981
|
+
},
|
|
2982
|
+
(table) => [
|
|
2983
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
2984
|
+
]
|
|
2985
|
+
);
|
|
2968
2986
|
wipLedger = pgTable(
|
|
2969
2987
|
"wip_ledger",
|
|
2970
2988
|
{
|
|
@@ -2010,7 +2010,7 @@ var init_interfaces = __esm({
|
|
|
2010
2010
|
});
|
|
2011
2011
|
|
|
2012
2012
|
// spex-console/src/lib/db/schema/postgres.ts
|
|
2013
|
-
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
2013
|
+
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, seatAssignments, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
2014
2014
|
var init_postgres = __esm({
|
|
2015
2015
|
"spex-console/src/lib/db/schema/postgres.ts"() {
|
|
2016
2016
|
"use strict";
|
|
@@ -2960,6 +2960,24 @@ var init_postgres = __esm({
|
|
|
2960
2960
|
},
|
|
2961
2961
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
2962
2962
|
);
|
|
2963
|
+
seatAssignments = pgTable(
|
|
2964
|
+
"seat_assignments",
|
|
2965
|
+
{
|
|
2966
|
+
accountId: text("account_id").notNull(),
|
|
2967
|
+
vaultId: text("vault_id").notNull(),
|
|
2968
|
+
harness: text("harness").notNull(),
|
|
2969
|
+
seatId: text("seat_id").notNull(),
|
|
2970
|
+
model: text("model").notNull(),
|
|
2971
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
2972
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
2973
|
+
// cleared whenever the user sets a new model.
|
|
2974
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
2975
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
2976
|
+
},
|
|
2977
|
+
(table) => [
|
|
2978
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
2979
|
+
]
|
|
2980
|
+
);
|
|
2963
2981
|
wipLedger = pgTable(
|
|
2964
2982
|
"wip_ledger",
|
|
2965
2983
|
{
|
package/dist/cli/hs-init.mjs
CHANGED
|
@@ -2837,7 +2837,7 @@ var COMMAND_SCOPES = Object.freeze({
|
|
|
2837
2837
|
"hs-promote.md": { scope: "customer", why: "Capture \u2192 research \u2192 milestone promotion." },
|
|
2838
2838
|
"hs-push.md": { scope: "customer", why: "Push an epic plan into the vault." },
|
|
2839
2839
|
"hs-qc.md": { scope: "customer", why: "Post-plan QC gate." },
|
|
2840
|
-
"hs-res.md": { scope: "customer", why: "Research method entrypoint (SpexCrawl/DeepSeek)." },
|
|
2840
|
+
"hs-res.md": { scope: "customer", why: "Research method entrypoint (local Docker Firecrawl search + SpexCrawl/Firecrawl fetch; DeepSeek on the platform)." },
|
|
2841
2841
|
"hs-resolve.md": { scope: "customer", why: "Resolution lane." },
|
|
2842
2842
|
"hs-review.md": { scope: "customer", why: "Review queue." },
|
|
2843
2843
|
"hs-view.md": { scope: "customer", why: "Open a console surface." },
|
|
@@ -3166,7 +3166,7 @@ function githubHookNames() {
|
|
|
3166
3166
|
}
|
|
3167
3167
|
function githubHookCommand(row) {
|
|
3168
3168
|
const tail = hookTail(row);
|
|
3169
|
-
return `R=node_modules/heyspex/scripts/claude-hooks/_run.mjs; [ -f "$R" ] || R=./scripts/claude-hooks/_run.mjs; [ -f "$R" ] || exit 0; exec node "$R" ${tail}`;
|
|
3169
|
+
return `export HEYSPEX_HARNESS="\${HEYSPEX_HARNESS:-copilot}"; R=node_modules/heyspex/scripts/claude-hooks/_run.mjs; [ -f "$R" ] || R=./scripts/claude-hooks/_run.mjs; [ -f "$R" ] || exit 0; exec node "$R" ${tail}`;
|
|
3170
3170
|
}
|
|
3171
3171
|
function renderGithubHooksDocument() {
|
|
3172
3172
|
const allowed = githubHookNames();
|
package/dist/cli/hs-install.mjs
CHANGED
|
@@ -2342,7 +2342,7 @@ var COMMAND_SCOPES = Object.freeze({
|
|
|
2342
2342
|
"hs-promote.md": { scope: "customer", why: "Capture \u2192 research \u2192 milestone promotion." },
|
|
2343
2343
|
"hs-push.md": { scope: "customer", why: "Push an epic plan into the vault." },
|
|
2344
2344
|
"hs-qc.md": { scope: "customer", why: "Post-plan QC gate." },
|
|
2345
|
-
"hs-res.md": { scope: "customer", why: "Research method entrypoint (SpexCrawl/DeepSeek)." },
|
|
2345
|
+
"hs-res.md": { scope: "customer", why: "Research method entrypoint (local Docker Firecrawl search + SpexCrawl/Firecrawl fetch; DeepSeek on the platform)." },
|
|
2346
2346
|
"hs-resolve.md": { scope: "customer", why: "Resolution lane." },
|
|
2347
2347
|
"hs-review.md": { scope: "customer", why: "Review queue." },
|
|
2348
2348
|
"hs-view.md": { scope: "customer", why: "Open a console surface." },
|
|
@@ -2752,7 +2752,7 @@ function githubHookNames() {
|
|
|
2752
2752
|
}
|
|
2753
2753
|
function githubHookCommand(row) {
|
|
2754
2754
|
const tail = hookTail(row);
|
|
2755
|
-
return `R=node_modules/heyspex/scripts/claude-hooks/_run.mjs; [ -f "$R" ] || R=./scripts/claude-hooks/_run.mjs; [ -f "$R" ] || exit 0; exec node "$R" ${tail}`;
|
|
2755
|
+
return `export HEYSPEX_HARNESS="\${HEYSPEX_HARNESS:-copilot}"; R=node_modules/heyspex/scripts/claude-hooks/_run.mjs; [ -f "$R" ] || R=./scripts/claude-hooks/_run.mjs; [ -f "$R" ] || exit 0; exec node "$R" ${tail}`;
|
|
2756
2756
|
}
|
|
2757
2757
|
function renderGithubHooksDocument() {
|
|
2758
2758
|
const allowed = githubHookNames();
|
package/dist/cli/hs-join.mjs
CHANGED
|
@@ -23909,6 +23909,24 @@ var consoleSettingsStore = pgTable(
|
|
|
23909
23909
|
},
|
|
23910
23910
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
23911
23911
|
);
|
|
23912
|
+
var seatAssignments = pgTable(
|
|
23913
|
+
"seat_assignments",
|
|
23914
|
+
{
|
|
23915
|
+
accountId: text("account_id").notNull(),
|
|
23916
|
+
vaultId: text("vault_id").notNull(),
|
|
23917
|
+
harness: text("harness").notNull(),
|
|
23918
|
+
seatId: text("seat_id").notNull(),
|
|
23919
|
+
model: text("model").notNull(),
|
|
23920
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
23921
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
23922
|
+
// cleared whenever the user sets a new model.
|
|
23923
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
23924
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
23925
|
+
},
|
|
23926
|
+
(table) => [
|
|
23927
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
23928
|
+
]
|
|
23929
|
+
);
|
|
23912
23930
|
var wipLedger = pgTable(
|
|
23913
23931
|
"wip_ledger",
|
|
23914
23932
|
{
|
|
@@ -26034,7 +26052,7 @@ var COMMAND_SCOPES = Object.freeze({
|
|
|
26034
26052
|
"hs-promote.md": { scope: "customer", why: "Capture \u2192 research \u2192 milestone promotion." },
|
|
26035
26053
|
"hs-push.md": { scope: "customer", why: "Push an epic plan into the vault." },
|
|
26036
26054
|
"hs-qc.md": { scope: "customer", why: "Post-plan QC gate." },
|
|
26037
|
-
"hs-res.md": { scope: "customer", why: "Research method entrypoint (SpexCrawl/DeepSeek)." },
|
|
26055
|
+
"hs-res.md": { scope: "customer", why: "Research method entrypoint (local Docker Firecrawl search + SpexCrawl/Firecrawl fetch; DeepSeek on the platform)." },
|
|
26038
26056
|
"hs-resolve.md": { scope: "customer", why: "Resolution lane." },
|
|
26039
26057
|
"hs-review.md": { scope: "customer", why: "Review queue." },
|
|
26040
26058
|
"hs-view.md": { scope: "customer", why: "Open a console surface." },
|
|
@@ -26444,7 +26462,7 @@ function githubHookNames() {
|
|
|
26444
26462
|
}
|
|
26445
26463
|
function githubHookCommand(row2) {
|
|
26446
26464
|
const tail = hookTail(row2);
|
|
26447
|
-
return `R=node_modules/heyspex/scripts/claude-hooks/_run.mjs; [ -f "$R" ] || R=./scripts/claude-hooks/_run.mjs; [ -f "$R" ] || exit 0; exec node "$R" ${tail}`;
|
|
26465
|
+
return `export HEYSPEX_HARNESS="\${HEYSPEX_HARNESS:-copilot}"; R=node_modules/heyspex/scripts/claude-hooks/_run.mjs; [ -f "$R" ] || R=./scripts/claude-hooks/_run.mjs; [ -f "$R" ] || exit 0; exec node "$R" ${tail}`;
|
|
26448
26466
|
}
|
|
26449
26467
|
function renderGithubHooksDocument() {
|
|
26450
26468
|
const allowed = githubHookNames();
|
|
@@ -124,9 +124,9 @@ function resolveBearer({ envToken, credentialsText, accountId, legacyAccountId }
|
|
|
124
124
|
if (entry?.mcp_token) return { token: entry.mcp_token, source: "credentials-file" };
|
|
125
125
|
return { token: null, source: null };
|
|
126
126
|
}
|
|
127
|
-
function readTextOrNull(read,
|
|
127
|
+
function readTextOrNull(read, path4) {
|
|
128
128
|
try {
|
|
129
|
-
const raw = read(
|
|
129
|
+
const raw = read(path4);
|
|
130
130
|
return typeof raw === "string" ? raw : null;
|
|
131
131
|
} catch {
|
|
132
132
|
return null;
|
|
@@ -427,14 +427,14 @@ var VAULT_LESS_ENDPOINTS = Object.freeze([
|
|
|
427
427
|
"GET /api/workspaces",
|
|
428
428
|
"* /api/admin/dev-mode"
|
|
429
429
|
]);
|
|
430
|
-
function pathnameOf(
|
|
431
|
-
const raw = String(
|
|
430
|
+
function pathnameOf(path4) {
|
|
431
|
+
const raw = String(path4 ?? "").split("?")[0].split("#")[0];
|
|
432
432
|
const noTrailing = raw.length > 1 ? raw.replace(/\/+$/, "") : raw;
|
|
433
433
|
return noTrailing || "/";
|
|
434
434
|
}
|
|
435
|
-
function isVaultLessEndpoint(method,
|
|
435
|
+
function isVaultLessEndpoint(method, path4) {
|
|
436
436
|
const m = String(method || "GET").toUpperCase();
|
|
437
|
-
const pathname = pathnameOf(
|
|
437
|
+
const pathname = pathnameOf(path4);
|
|
438
438
|
return VAULT_LESS_ENDPOINTS.some((row) => {
|
|
439
439
|
const [rowMethod, rowPath] = row.split(" ");
|
|
440
440
|
return rowPath === pathname && (rowMethod === "*" || rowMethod === m);
|
|
@@ -806,11 +806,11 @@ function bearerHeaderFor(consoleUrl, opts = {}) {
|
|
|
806
806
|
return {};
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
function scopeHeadersFor(scope, method,
|
|
809
|
+
function scopeHeadersFor(scope, method, path4) {
|
|
810
810
|
if (scope === "none") {
|
|
811
|
-
if (!isVaultLessEndpoint(method,
|
|
811
|
+
if (!isVaultLessEndpoint(method, path4)) {
|
|
812
812
|
throw new Error(
|
|
813
|
-
`controlRequest: scope "none" is only allowed for the vault-less endpoints (${VAULT_LESS_ENDPOINTS.join(", ")}); ${method.toUpperCase()} ${
|
|
813
|
+
`controlRequest: scope "none" is only allowed for the vault-less endpoints (${VAULT_LESS_ENDPOINTS.join(", ")}); ${method.toUpperCase()} ${path4} is vault-scoped and must name { accountId, vaultId }.`
|
|
814
814
|
);
|
|
815
815
|
}
|
|
816
816
|
return {};
|
|
@@ -1728,10 +1728,80 @@ var CLAUDE_PERMISSION_MODE_OPTIONS = [
|
|
|
1728
1728
|
var CURSOR_PERMISSION_MODE_OPTIONS = [];
|
|
1729
1729
|
|
|
1730
1730
|
// spex-console/src/lib/model-registry/types.ts
|
|
1731
|
+
var DEFAULT_LAUNCH_BACKEND = "anthropic";
|
|
1732
|
+
function defaultLaunchBackendForHarness(harness) {
|
|
1733
|
+
return harness === "copilot" ? null : DEFAULT_LAUNCH_BACKEND;
|
|
1734
|
+
}
|
|
1731
1735
|
function isLaunchBackend(v) {
|
|
1732
1736
|
return v === "anthropic" || v === "ollama" || v === "deepseek";
|
|
1733
1737
|
}
|
|
1734
1738
|
|
|
1739
|
+
// spexharness/src/adapters/harness-detect.mjs
|
|
1740
|
+
import path3 from "node:path";
|
|
1741
|
+
|
|
1742
|
+
// spexharness/src/adapters/detect-harness.mjs
|
|
1743
|
+
var OVERRIDES = /* @__PURE__ */ new Set(["copilot", "claude-code", "cursor"]);
|
|
1744
|
+
function detectHarness(payload, env = process.env) {
|
|
1745
|
+
const forced = String(env?.HEYSPEX_HARNESS ?? "").trim().toLowerCase();
|
|
1746
|
+
if (OVERRIDES.has(forced)) return forced;
|
|
1747
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return "unknown";
|
|
1748
|
+
const p = (
|
|
1749
|
+
/** @type {Record<string, unknown>} */
|
|
1750
|
+
payload
|
|
1751
|
+
);
|
|
1752
|
+
if ("conversation_id" in p || "workspace_roots" in p || "cursor_version" in p) return "cursor";
|
|
1753
|
+
const camel = ("toolName" in p || "toolArgs" in p) && !("tool_name" in p);
|
|
1754
|
+
if ("timestamp" in p || camel) return "copilot";
|
|
1755
|
+
if (typeof p.hook_event_name === "string" && typeof p.session_id === "string") return "claude-code";
|
|
1756
|
+
return "unknown";
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
// spexharness/src/adapters/harness-detect.mjs
|
|
1760
|
+
var SEAT_HARNESSES = Object.freeze(["claude-code", "copilot"]);
|
|
1761
|
+
var COPILOT_ENV_MARKERS = Object.freeze(["COPILOT_AGENT_SESSION_ID", "COPILOT_CLI", "COPILOT_PLUGIN_ROOT"]);
|
|
1762
|
+
var CLAUDE_ENV_MARKERS = Object.freeze(["CLAUDECODE", "CLAUDE_CODE_SESSION_ID"]);
|
|
1763
|
+
var EXPLICIT = Object.freeze({
|
|
1764
|
+
"claude-code": "claude-code",
|
|
1765
|
+
claude: "claude-code",
|
|
1766
|
+
claudecode: "claude-code",
|
|
1767
|
+
copilot: "copilot",
|
|
1768
|
+
"github-copilot": "copilot",
|
|
1769
|
+
none: null
|
|
1770
|
+
});
|
|
1771
|
+
function normalizeHarness(value) {
|
|
1772
|
+
const key = String(value ?? "").trim().toLowerCase();
|
|
1773
|
+
if (!key || !Object.prototype.hasOwnProperty.call(EXPLICIT, key)) return void 0;
|
|
1774
|
+
return EXPLICIT[key];
|
|
1775
|
+
}
|
|
1776
|
+
var present = (env, k) => typeof env?.[k] === "string" && env[k].trim() !== "";
|
|
1777
|
+
function detectHarness2(env = {}, payload = null, installedPlugins = []) {
|
|
1778
|
+
const safeEnv = env && typeof env === "object" ? env : {};
|
|
1779
|
+
if (present(safeEnv, "HEYSPEX_HARNESS")) {
|
|
1780
|
+
const h = normalizeHarness(safeEnv.HEYSPEX_HARNESS);
|
|
1781
|
+
if (h !== void 0) {
|
|
1782
|
+
return Object.freeze({ harness: h, status: h ? "resolved" : "none", source: "env:HEYSPEX_HARNESS", detail: String(safeEnv.HEYSPEX_HARNESS).trim() });
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
if (payload && typeof payload === "object" && !Array.isArray(payload)) {
|
|
1786
|
+
const fromPayload = detectHarness(payload, {});
|
|
1787
|
+
if (fromPayload === "claude-code" || fromPayload === "copilot") {
|
|
1788
|
+
return Object.freeze({ harness: fromPayload, status: "resolved", source: "hook-payload", detail: fromPayload });
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
const copilotMarker = COPILOT_ENV_MARKERS.find((k) => present(safeEnv, k));
|
|
1792
|
+
if (copilotMarker) return Object.freeze({ harness: "copilot", status: "resolved", source: "env-marker", detail: copilotMarker });
|
|
1793
|
+
const claudeMarker = CLAUDE_ENV_MARKERS.find((k) => present(safeEnv, k));
|
|
1794
|
+
if (claudeMarker) return Object.freeze({ harness: "claude-code", status: "resolved", source: "env-marker", detail: claudeMarker });
|
|
1795
|
+
const installed = [...new Set((Array.isArray(installedPlugins) ? installedPlugins : []).map(normalizeHarness).filter(Boolean))].sort();
|
|
1796
|
+
if (installed.length === 1) {
|
|
1797
|
+
return Object.freeze({ harness: installed[0], status: "resolved", source: "installed-plugin", detail: installed[0] });
|
|
1798
|
+
}
|
|
1799
|
+
if (installed.length > 1) {
|
|
1800
|
+
return Object.freeze({ harness: null, status: "needs-choice", source: "installed-plugin", detail: null, choices: Object.freeze(installed) });
|
|
1801
|
+
}
|
|
1802
|
+
return Object.freeze({ harness: null, status: "none", source: "none", detail: null });
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1735
1805
|
// spex-console/src/lib/cli/backend.ts
|
|
1736
1806
|
var LAUNCH_BACKENDS = ["anthropic", "ollama", "deepseek"];
|
|
1737
1807
|
var BACKEND_VALID_SET_MESSAGE = `valid backends: ${LAUNCH_BACKENDS.join(", ")}`;
|
|
@@ -1746,6 +1816,15 @@ function maskBackendEnvValue(key, value) {
|
|
|
1746
1816
|
const last4 = value.length > 4 ? value.slice(-4) : value;
|
|
1747
1817
|
return `****${last4}`;
|
|
1748
1818
|
}
|
|
1819
|
+
function harnessFallbackBackend(env = process.env) {
|
|
1820
|
+
let harness = null;
|
|
1821
|
+
try {
|
|
1822
|
+
harness = detectHarness2(env).harness ?? null;
|
|
1823
|
+
} catch {
|
|
1824
|
+
harness = null;
|
|
1825
|
+
}
|
|
1826
|
+
return defaultLaunchBackendForHarness(harness) ?? "harness-default (copilot: auto)";
|
|
1827
|
+
}
|
|
1749
1828
|
async function resolveKindBackend(kind, deps) {
|
|
1750
1829
|
const res = await controlRequest(deps, {
|
|
1751
1830
|
method: "POST",
|
|
@@ -1760,7 +1839,7 @@ async function resolveKindBackend(kind, deps) {
|
|
|
1760
1839
|
value: {
|
|
1761
1840
|
kind,
|
|
1762
1841
|
agent: typeof c.agent === "string" ? c.agent : "claude-code",
|
|
1763
|
-
backend: typeof c.backend === "string" ? c.backend :
|
|
1842
|
+
backend: typeof c.backend === "string" ? c.backend : harnessFallbackBackend(),
|
|
1764
1843
|
backendSource: typeof c.backendSource === "string" ? c.backendSource : "?"
|
|
1765
1844
|
}
|
|
1766
1845
|
};
|
package/dist/cli/hs-spawn.mjs
CHANGED
|
@@ -699,6 +699,14 @@ var init_settings_nav_config = __esm({
|
|
|
699
699
|
wired: true,
|
|
700
700
|
ownerRef: "HS-ZY8T-EPIC-encrypted-key-store-and-settings-page"
|
|
701
701
|
},
|
|
702
|
+
{
|
|
703
|
+
id: "seats",
|
|
704
|
+
glyph: "\u25EB",
|
|
705
|
+
title: "SpexFleet seats",
|
|
706
|
+
subtitle: "Which model each SpexFleet seat uses for you, per coding tool.",
|
|
707
|
+
wired: true,
|
|
708
|
+
ownerRef: "HS-K9L7-C86Z-EPIC-per-user-per-vault-seat-assignments"
|
|
709
|
+
},
|
|
702
710
|
{
|
|
703
711
|
id: "secrets",
|
|
704
712
|
glyph: "\u26C9",
|
|
@@ -5398,7 +5406,7 @@ var init_interfaces = __esm({
|
|
|
5398
5406
|
});
|
|
5399
5407
|
|
|
5400
5408
|
// spex-console/src/lib/db/schema/postgres.ts
|
|
5401
|
-
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
5409
|
+
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, seatAssignments, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
5402
5410
|
var init_postgres = __esm({
|
|
5403
5411
|
"spex-console/src/lib/db/schema/postgres.ts"() {
|
|
5404
5412
|
"use strict";
|
|
@@ -6348,6 +6356,24 @@ var init_postgres = __esm({
|
|
|
6348
6356
|
},
|
|
6349
6357
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
6350
6358
|
);
|
|
6359
|
+
seatAssignments = pgTable(
|
|
6360
|
+
"seat_assignments",
|
|
6361
|
+
{
|
|
6362
|
+
accountId: text("account_id").notNull(),
|
|
6363
|
+
vaultId: text("vault_id").notNull(),
|
|
6364
|
+
harness: text("harness").notNull(),
|
|
6365
|
+
seatId: text("seat_id").notNull(),
|
|
6366
|
+
model: text("model").notNull(),
|
|
6367
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
6368
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
6369
|
+
// cleared whenever the user sets a new model.
|
|
6370
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
6371
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
6372
|
+
},
|
|
6373
|
+
(table) => [
|
|
6374
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
6375
|
+
]
|
|
6376
|
+
);
|
|
6351
6377
|
wipLedger = pgTable(
|
|
6352
6378
|
"wip_ledger",
|
|
6353
6379
|
{
|
|
@@ -1368,7 +1368,7 @@ var init_interfaces = __esm({
|
|
|
1368
1368
|
});
|
|
1369
1369
|
|
|
1370
1370
|
// spex-console/src/lib/db/schema/postgres.ts
|
|
1371
|
-
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
1371
|
+
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, seatAssignments, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
1372
1372
|
var init_postgres = __esm({
|
|
1373
1373
|
"spex-console/src/lib/db/schema/postgres.ts"() {
|
|
1374
1374
|
"use strict";
|
|
@@ -2318,6 +2318,24 @@ var init_postgres = __esm({
|
|
|
2318
2318
|
},
|
|
2319
2319
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
2320
2320
|
);
|
|
2321
|
+
seatAssignments = pgTable(
|
|
2322
|
+
"seat_assignments",
|
|
2323
|
+
{
|
|
2324
|
+
accountId: text("account_id").notNull(),
|
|
2325
|
+
vaultId: text("vault_id").notNull(),
|
|
2326
|
+
harness: text("harness").notNull(),
|
|
2327
|
+
seatId: text("seat_id").notNull(),
|
|
2328
|
+
model: text("model").notNull(),
|
|
2329
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
2330
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
2331
|
+
// cleared whenever the user sets a new model.
|
|
2332
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
2333
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
2334
|
+
},
|
|
2335
|
+
(table) => [
|
|
2336
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
2337
|
+
]
|
|
2338
|
+
);
|
|
2321
2339
|
wipLedger = pgTable(
|
|
2322
2340
|
"wip_ledger",
|
|
2323
2341
|
{
|
|
@@ -1364,7 +1364,7 @@ var init_interfaces = __esm({
|
|
|
1364
1364
|
});
|
|
1365
1365
|
|
|
1366
1366
|
// spex-console/src/lib/db/schema/postgres.ts
|
|
1367
|
-
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
1367
|
+
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, seatAssignments, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
1368
1368
|
var init_postgres = __esm({
|
|
1369
1369
|
"spex-console/src/lib/db/schema/postgres.ts"() {
|
|
1370
1370
|
"use strict";
|
|
@@ -2314,6 +2314,24 @@ var init_postgres = __esm({
|
|
|
2314
2314
|
},
|
|
2315
2315
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
2316
2316
|
);
|
|
2317
|
+
seatAssignments = pgTable(
|
|
2318
|
+
"seat_assignments",
|
|
2319
|
+
{
|
|
2320
|
+
accountId: text("account_id").notNull(),
|
|
2321
|
+
vaultId: text("vault_id").notNull(),
|
|
2322
|
+
harness: text("harness").notNull(),
|
|
2323
|
+
seatId: text("seat_id").notNull(),
|
|
2324
|
+
model: text("model").notNull(),
|
|
2325
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
2326
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
2327
|
+
// cleared whenever the user sets a new model.
|
|
2328
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
2329
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
2330
|
+
},
|
|
2331
|
+
(table) => [
|
|
2332
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
2333
|
+
]
|
|
2334
|
+
);
|
|
2317
2335
|
wipLedger = pgTable(
|
|
2318
2336
|
"wip_ledger",
|
|
2319
2337
|
{
|
package/dist/cli/hs-vault.mjs
CHANGED
|
@@ -1107,7 +1107,7 @@ var init_interfaces = __esm({
|
|
|
1107
1107
|
});
|
|
1108
1108
|
|
|
1109
1109
|
// spex-console/src/lib/db/schema/postgres.ts
|
|
1110
|
-
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
1110
|
+
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, seatAssignments, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
1111
1111
|
var init_postgres = __esm({
|
|
1112
1112
|
"spex-console/src/lib/db/schema/postgres.ts"() {
|
|
1113
1113
|
"use strict";
|
|
@@ -2057,6 +2057,24 @@ var init_postgres = __esm({
|
|
|
2057
2057
|
},
|
|
2058
2058
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
2059
2059
|
);
|
|
2060
|
+
seatAssignments = pgTable(
|
|
2061
|
+
"seat_assignments",
|
|
2062
|
+
{
|
|
2063
|
+
accountId: text("account_id").notNull(),
|
|
2064
|
+
vaultId: text("vault_id").notNull(),
|
|
2065
|
+
harness: text("harness").notNull(),
|
|
2066
|
+
seatId: text("seat_id").notNull(),
|
|
2067
|
+
model: text("model").notNull(),
|
|
2068
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
2069
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
2070
|
+
// cleared whenever the user sets a new model.
|
|
2071
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
2072
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
2073
|
+
},
|
|
2074
|
+
(table) => [
|
|
2075
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
2076
|
+
]
|
|
2077
|
+
);
|
|
2060
2078
|
wipLedger = pgTable(
|
|
2061
2079
|
"wip_ledger",
|
|
2062
2080
|
{
|
|
@@ -4519,9 +4537,7 @@ async function listVaultsNeon(accountId2, deps = {}) {
|
|
|
4519
4537
|
githubRemote: vaults.githubRemote,
|
|
4520
4538
|
schemaVersion: vaults.schemaVersion,
|
|
4521
4539
|
createdAt: vaults.createdAt,
|
|
4522
|
-
archived: vaults.archived
|
|
4523
|
-
// [[HS-RRCG-8QDO-DIAG-a-shared-vault-is-labelled-read-only-in]] -- the grant's access level must reach the client.
|
|
4524
|
-
access: vaultGrants.access
|
|
4540
|
+
archived: vaults.archived
|
|
4525
4541
|
}).from(vaultGrants).innerJoin(vaults, eq(vaults.id, vaultGrants.vaultId)).where(and(eq(vaultGrants.accountId, accountId2), ne(vaults.accountId, accountId2)));
|
|
4526
4542
|
const toRecord = (r, granted) => ({
|
|
4527
4543
|
id: r.id,
|
|
@@ -4540,9 +4556,7 @@ async function listVaultsNeon(accountId2, deps = {}) {
|
|
|
4540
4556
|
// `GET /api/vaults` kept listing the vault with no `archived` field.
|
|
4541
4557
|
archived: r.archived,
|
|
4542
4558
|
...r.githubRemote ? { github_remote: r.githubRemote } : {},
|
|
4543
|
-
...granted ? { granted: true } : {}
|
|
4544
|
-
// [[HS-RRCG-8QDO-DIAG-a-shared-vault-is-labelled-read-only-in]]: granted rows only; unknown = read.
|
|
4545
|
-
...granted ? { access: r.access === "write" ? "write" : "read" } : {}
|
|
4559
|
+
...granted ? { granted: true } : {}
|
|
4546
4560
|
});
|
|
4547
4561
|
return [
|
|
4548
4562
|
...ownedRows.map((r) => toRecord(r, false)),
|
|
@@ -376,7 +376,7 @@ var init_interfaces = __esm({
|
|
|
376
376
|
});
|
|
377
377
|
|
|
378
378
|
// spex-console/src/lib/db/schema/postgres.ts
|
|
379
|
-
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
379
|
+
var edgeTypeEnum, validationSeverityEnum, outboxOpEnum, tsvector, specs, tags, edges, wikilinks, specLinks, aliases, validationIssues, indexMeta, frontmatterFields, eventOutbox, captureSessions, handoffContext, claimEventKindEnum, activeClaimStatusEnum, pendingReasonEnum, focusEventKindEnum, specEventKindEnum, focusPin, captureFocusPin, captureFocusSelection, focusSelection, focusSkips, activeClaims, claimWaiters, fileClaims, claimEvents, focusEvents, focusAreas, focusAreasEvents, specEvents, rateLimitBuckets, userVaults, milestoneSnapshots, modelRegistryEntries, launchIntentStatusEnum, launchIntents, companionRelayPresence, companionSettingsStore, consoleSettingsStore, seatAssignments, wipLedger, wipLedgerArchive, gatherResults, agentSessions, usageEvents, streamEvents, jobStreams, resolutionStatusEnum, resolutionFocusPin, resolutionLedger, workspaces, vaults, accountSettings, vaultGrants, pendingVaultGrants, githubInstallations, fleetMachines, fleetTasks, fleetResults, userApiKeys, apiKeys, mcpSessions, pairingCodes, companionSessions, inviteRequests, notifications, webhookIngestions, specSettlements, sessionBranchDeclarations;
|
|
380
380
|
var init_postgres = __esm({
|
|
381
381
|
"spex-console/src/lib/db/schema/postgres.ts"() {
|
|
382
382
|
"use strict";
|
|
@@ -1326,6 +1326,24 @@ var init_postgres = __esm({
|
|
|
1326
1326
|
},
|
|
1327
1327
|
(table) => [primaryKey({ columns: [table.userId, table.vaultId, table.namespace] })]
|
|
1328
1328
|
);
|
|
1329
|
+
seatAssignments = pgTable(
|
|
1330
|
+
"seat_assignments",
|
|
1331
|
+
{
|
|
1332
|
+
accountId: text("account_id").notNull(),
|
|
1333
|
+
vaultId: text("vault_id").notNull(),
|
|
1334
|
+
harness: text("harness").notNull(),
|
|
1335
|
+
seatId: text("seat_id").notNull(),
|
|
1336
|
+
model: text("model").notNull(),
|
|
1337
|
+
// Set when a launch reported the harness REFUSED this model and the run fell
|
|
1338
|
+
// back to auto (Copilot's `heyspex.copilot_model_fallback` event, HS-F4UM);
|
|
1339
|
+
// cleared whenever the user sets a new model.
|
|
1340
|
+
overrideRejectedAt: timestamp("override_rejected_at", { withTimezone: true }),
|
|
1341
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().default(sql`now()`)
|
|
1342
|
+
},
|
|
1343
|
+
(table) => [
|
|
1344
|
+
primaryKey({ columns: [table.accountId, table.vaultId, table.harness, table.seatId] })
|
|
1345
|
+
]
|
|
1346
|
+
);
|
|
1329
1347
|
wipLedger = pgTable(
|
|
1330
1348
|
"wip_ledger",
|
|
1331
1349
|
{
|