@uniqbit/mate-core 1.0.0-canary.6 → 1.0.0-canary.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/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/src/cli/commands/doctor.ts +51 -0
- package/src/cli/commands/friction.ts +558 -0
- package/src/cli/commands/studio/connection.ts +53 -0
- package/src/cli/commands/studio/routes.ts +3 -0
- package/src/cli/commands/studio/selection.ts +10 -1
- package/src/cli/commands/studio/server.ts +31 -0
- package/src/cli/commands/studio/services.ts +25 -0
- package/src/cli/commands/triage.ts +151 -0
- package/src/cli/commands/vscode/release-vsix.json +2 -2
- package/src/cli/main.ts +35 -13
- package/src/cli/plugin-commands.ts +6 -1
- package/src/cli/usage.ts +10 -0
- package/src/create-mate.ts +11 -5
- package/src/distribution.ts +2 -0
- package/src/hooks/validate-artifact-path.ts +64 -14
- package/src/lib/friction/describe.ts +42 -0
- package/src/lib/friction/fields.ts +60 -0
- package/src/lib/friction/mark.ts +156 -0
- package/src/lib/friction/view/model.ts +67 -0
- package/src/lib/friction/view/read.ts +136 -0
- package/src/lib/friction/view/select.ts +54 -0
- package/src/lib/orchestrator/adapters/claude.ts +5 -4
- package/src/lib/orchestrator/adapters/opencode.ts +2 -0
- package/src/lib/orchestrator/root-context.ts +23 -6
- package/src/lib/package-paths.ts +23 -15
- package/src/lib/session-attribution.ts +3 -7
- package/src/lib/triage/context.ts +186 -0
- package/src/lib/triage/launch.ts +52 -0
- package/src/lib/triage/prepare.ts +97 -0
- package/src/lib/triage/session.ts +126 -0
- package/src/opencode/companion-hooks.ts +53 -5
- package/src/opencode/projected-guidance.ts +2 -0
- package/src/playbooks/companion-guidance.ts +2 -2
- package/src/plugin-api.ts +5 -0
- package/src/runtime/command-friction.ts +97 -0
- package/src/runtime/companion-guidance.ts +32 -15
- package/src/runtime/friction-fingerprint.ts +35 -0
- package/src/runtime/friction-log.ts +352 -0
- package/src/runtime/friction-recorder.ts +199 -0
- package/src/runtime/friction-retention.ts +1 -0
- package/src/runtime/friction-state.ts +110 -0
- package/src/runtime/friction-switch.ts +26 -0
- package/src/runtime/friction-vocabulary.ts +42 -0
- package/src/runtime/projected-guidance.ts +2 -1
- package/src/runtime/secret-values.ts +16 -0
- package/src/runtime/session-id.ts +24 -0
- package/src/runtime/session-prepare-runner.ts +3 -0
- package/src/runtime/workflow/next-handoff-process.ts +2 -1
- package/src/studio.ts +41 -0
- package/src/templates/triage/PLAYBOOK.md +112 -0
- package/src/tools/setup/capabilities/rtk.ts +19 -8
- package/src/tools/setup/plugin.ts +5 -0
- package/src/tools/setup/service.ts +4 -0
- package/src/tools/setup.ts +16 -2
- package/studio-dist/client/assets/app-aIwDxf48.css +2 -0
- package/studio-dist/client/assets/button-CX0sWAJl.js +1 -0
- package/studio-dist/client/assets/combobox-BmA8RjOc.js +1 -0
- package/studio-dist/client/assets/{companion-view-BVaZNtiI.js → companion-view-DINdPF-b.js} +1 -1
- package/studio-dist/client/assets/fields-BobQ7zRF.js +1 -0
- package/studio-dist/client/assets/friction-YdYd3zaz.js +1 -0
- package/studio-dist/client/assets/getting-started-CY7NEtTw.js +1 -0
- package/studio-dist/client/assets/getting-started-djaQeWlu.js +1 -0
- package/studio-dist/client/assets/getting-started._topic-DVB8e5R9.js +1 -0
- package/studio-dist/client/assets/getting-started.index-DQvLHEr1.js +1 -0
- package/studio-dist/client/assets/graph-DbNnR884.js +2 -0
- package/studio-dist/client/assets/{graph-canvas-DDuzsNSx.js → graph-canvas-DIcAqwtK.js} +1 -1
- package/studio-dist/client/assets/guides-D6T6W_jV.js +1 -0
- package/studio-dist/client/assets/index-CysBCSxM.js +40 -0
- package/studio-dist/client/assets/markdown-view-jMiaBTSO.js +1 -0
- package/studio-dist/client/assets/{panel-B8F8sOKQ.js → panel-Csr49lBo.js} +1 -1
- package/studio-dist/client/assets/plugins._service._view-CEA_CcPe.js +1 -0
- package/studio-dist/client/assets/prepaint-CKsXyJOR.js +27 -0
- package/studio-dist/client/assets/{queries-axYk2u9L.js → queries-Dfp5deWj.js} +1 -1
- package/studio-dist/client/assets/react-BYUSgtBs.js +1 -0
- package/studio-dist/client/assets/reports-CLdgxxkg.js +1 -0
- package/studio-dist/client/assets/routes-DGilWbDE.js +1 -0
- package/studio-dist/client/assets/search-CXosfvYh.js +1 -0
- package/studio-dist/client/assets/select-DdebbX7K.js +1 -0
- package/studio-dist/client/assets/skills-C3zNkU8g.js +1 -0
- package/studio-dist/client/assets/{specs-DU1kqcp5.js → specs-Dl8HfGlU.js} +1 -1
- package/studio-dist/client/assets/specs-view-B_n0Pekv.js +1 -0
- package/studio-dist/client/assets/{steps-DhIFuAZy.js → steps-CKUno4lh.js} +1 -1
- package/studio-dist/client/assets/store-DyXbi6o9.js +1 -0
- package/studio-dist/client/assets/{studio-BR9j15J0.js → studio-0ueISxwP.js} +8 -8
- package/studio-dist/client/assets/{studio-queries-CFP_yTpr.js → studio-queries-BflKt9va.js} +2 -2
- package/studio-dist/client/assets/{usage-CHmwtkoM.js → usage-Blcl8kA_.js} +16 -16
- package/studio-dist/client/assets/useAnchoredPopupScrollLock-BBXJpX5L.js +1 -0
- package/studio-dist/client/assets/{useBaseQuery-BlC-AZ35.js → useBaseQuery-C2cjmeH2.js} +1 -1
- package/studio-dist/client/assets/useMutation-DI6LbvVa.js +1 -0
- package/studio-dist/client/assets/vault-Cb9DmM1i.js +1 -0
- package/studio-dist/client/assets/warnings-B-rvoW8q.js +1 -0
- package/studio-dist/client/assets/workflow-DN5T19jd.js +1 -0
- package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-DAbZ6fzY.js → __23tanstack-start-server-fn-resolver-JoHQ5ihx.js} +30 -14
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +66 -50
- package/studio-dist/server/assets/{button-BfoNadNR.js → button-B7e1fRyW.js} +228 -3
- package/studio-dist/server/assets/combobox--S_OmUfh.js +483 -0
- package/studio-dist/server/assets/{companion-view-DHUjPpA0.js → companion-view-D-vGM55e.js} +2 -2
- package/studio-dist/server/assets/{companions-kBrJZAd6.js → companions-Dr6IpNAb.js} +1 -1
- package/studio-dist/server/assets/{fields-BD_c65T1.js → fields-B4qM2ZwC.js} +1 -1
- package/studio-dist/server/assets/friction-CWOTjpCV.js +62 -0
- package/studio-dist/server/assets/friction-sLxaWY-H.js +903 -0
- package/studio-dist/server/assets/{getting-started-7P0oyWaM.js → getting-started-Cq5Pcnsr.js} +2 -2
- package/studio-dist/server/assets/{getting-started._topic-B1mV0kGz.js → getting-started._topic-CmWdl3u3.js} +2 -2
- package/studio-dist/server/assets/{getting-started.index-CeGtvUsm.js → getting-started.index-AB8xpTFY.js} +2 -2
- package/studio-dist/server/assets/{graph-BWtmJOH2.js → graph-B11ITte0.js} +1 -1
- package/studio-dist/server/assets/{graph-DSDVEELZ.js → graph-C_Hn-Wf_.js} +7 -8
- package/studio-dist/server/assets/{graph-canvas-CID9Nksc.js → graph-canvas-BthrSmPS.js} +2 -2
- package/studio-dist/server/assets/{guides-Bm3RbUB-.js → guides-B8HdeK_C.js} +1 -1
- package/studio-dist/server/assets/{guides-BLJenHwQ.js → guides-BVQ4pt5B.js} +1 -1
- package/studio-dist/server/assets/{guides.server-rHHqRuzV.js → guides.server-DqFQAStf.js} +1 -1
- package/studio-dist/server/assets/{markdown-view-D3v9x-cM.js → markdown-view-rwiiVcPC.js} +1 -1
- package/studio-dist/server/assets/{panel-yqOl5GMU.js → panel-CUxRIpYL.js} +3 -3
- package/studio-dist/server/assets/{plugins._service._view-DwqJX7s9.js → plugins._service._view-BSvGnlhU.js} +6 -4
- package/studio-dist/server/assets/prepaint-B28ClcPN.js +45 -0
- package/studio-dist/server/assets/{queries-DYmGrhNO.js → queries-S_Pl90IG.js} +1 -1
- package/studio-dist/server/assets/react-CiBZPDs8.js +45 -0
- package/studio-dist/server/assets/{reports-C4Y_Jd-x.js → reports-B9k98oE6.js} +1 -1
- package/studio-dist/server/assets/{reports-7yaPz7aP.js → reports-CJpAItPk.js} +6 -7
- package/studio-dist/server/assets/{router-Dnoq5auE.js → router-DF0etoNa.js} +627 -1563
- package/studio-dist/server/assets/{routes-Cok4p3mK.js → routes-6ylCLkyg.js} +7 -8
- package/studio-dist/server/assets/{search-DUK7Jl6f.js → search-b-yQesv3.js} +25 -2
- package/studio-dist/server/assets/{combobox-oxUI6r4V.js → select-CjuKScan.js} +34 -514
- package/studio-dist/server/assets/{shell-DNVXedgE.js → shell-DLkP7wG9.js} +2 -2
- package/studio-dist/server/assets/{skills-pKmuAs0F.js → skills-DGg0mWDM.js} +1 -1
- package/studio-dist/server/assets/{skills-D8qdXSku.js → skills-zeU80A9S.js} +7 -8
- package/studio-dist/server/assets/{specs-DeHYUNFp.js → specs-DDBNT_v1.js} +4 -4
- package/studio-dist/server/assets/{specs-view-BGn-5Ik_.js → specs-view-exvmWdg0.js} +9 -9
- package/studio-dist/server/assets/{steps-CV7Yk7L7.js → steps-D1tYAyWZ.js} +1 -1
- package/studio-dist/server/assets/store-kS7zk0Hr.js +93 -0
- package/studio-dist/server/assets/{studio-CB94np48.js → studio-qRvQjRpz.js} +47 -2
- package/studio-dist/server/assets/{studio-queries-BqZGBE70.js → studio-queries-qOXOYoPt.js} +66 -8
- package/studio-dist/server/assets/{usage-M6Gi6Km7.js → usage-C2um7YiV.js} +12 -43
- package/studio-dist/server/assets/{usage-j5jR9gX9.js → usage-Cwle9-xY.js} +1 -1
- package/studio-dist/server/assets/useAnchoredPopupScrollLock-kQBB3y_b.js +756 -0
- package/studio-dist/server/assets/{useBaseQuery-Tv_QJt9r.js → useBaseQuery--iH3rd-T.js} +1 -1
- package/studio-dist/server/assets/useMutation-C-WO6hCM.js +690 -0
- package/studio-dist/server/assets/{vault-PqVmssmW.js → vault-B8vgVIH9.js} +6 -6
- package/studio-dist/server/assets/{vault-lBlvSyD4.js → vault-CEBBRLMb.js} +1 -1
- package/studio-dist/server/assets/{views-CsFp1i1G.js → views-UgO0Qz_g.js} +2 -2
- package/studio-dist/server/assets/{warnings-BDs34j_m.js → warnings-BxK4VfV5.js} +1 -2
- package/studio-dist/server/assets/{workflow-T0eEldsa.js → workflow-BrTK632u.js} +8 -9
- package/studio-dist/server/server.js +2 -2
- package/studio-dist/client/assets/app-BFVyWHGo.css +0 -2
- package/studio-dist/client/assets/button-D6LrRkOG.js +0 -1
- package/studio-dist/client/assets/combobox-Dk2MMZWE.js +0 -1
- package/studio-dist/client/assets/fields-D_FYhxQr.js +0 -1
- package/studio-dist/client/assets/getting-started-ByWRg7hC.js +0 -1
- package/studio-dist/client/assets/getting-started-DZSjYC-b.js +0 -1
- package/studio-dist/client/assets/getting-started._topic-C6OyQ4G6.js +0 -1
- package/studio-dist/client/assets/getting-started.index-BkmPHdEm.js +0 -1
- package/studio-dist/client/assets/graph-7jm2XzyL.js +0 -2
- package/studio-dist/client/assets/guides-D9VTjWXP.js +0 -1
- package/studio-dist/client/assets/index-BBmFpG4y.js +0 -40
- package/studio-dist/client/assets/markdown-view-RL5YvfZg.js +0 -1
- package/studio-dist/client/assets/plugins._service._view-CynxTbMx.js +0 -1
- package/studio-dist/client/assets/react-r45OnJCw.js +0 -27
- package/studio-dist/client/assets/reports-BCAyXh6p.js +0 -1
- package/studio-dist/client/assets/routes-BFPqq89E.js +0 -1
- package/studio-dist/client/assets/skills-DTks_uBx.js +0 -1
- package/studio-dist/client/assets/specs-view-omrd_5P3.js +0 -1
- package/studio-dist/client/assets/store-DJ5cncKA.js +0 -1
- package/studio-dist/client/assets/vault-DRg8MScm.js +0 -1
- package/studio-dist/client/assets/warnings-UHFy6HAp.js +0 -1
- package/studio-dist/client/assets/workflow-Bv9vSfVV.js +0 -1
- package/studio-dist/server/assets/react-BO0uMhpm.js +0 -89
- package/studio-dist/server/assets/store-CWDGIp6x.js +0 -280
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as createServerRpc } from "./createServerRpc-bFKFpGFG.js";
|
|
2
2
|
import { n as createServerFn } from "../server.js";
|
|
3
|
-
import {
|
|
3
|
+
import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
|
|
4
4
|
// src/server/skills.ts?tss-serverfn-split
|
|
5
5
|
var AGENTS = /* @__PURE__ */ new Set([
|
|
6
6
|
"claude",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { t as CompanionView } from "./companion-view-
|
|
1
|
+
import { t as CompanionView } from "./companion-view-D-vGM55e.js";
|
|
2
2
|
import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { l as Route } from "./router-Dnoq5auE.js";
|
|
3
|
+
import { Lr as cn, ct as ROW, et as CommandLine, it as PAGE_PAD, nt as EmptyNote, ot as Pills, r as Icon, rt as ListCard, zr as useQuery } from "./button-B7e1fRyW.js";
|
|
4
|
+
import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-CUxRIpYL.js";
|
|
5
|
+
import { i as workflowPlan } from "./steps-D1tYAyWZ.js";
|
|
6
|
+
import { B as keepPreviousData, d as skillPreviewQuery } from "./studio-queries-qOXOYoPt.js";
|
|
7
|
+
import { t as MarkdownView } from "./markdown-view-rwiiVcPC.js";
|
|
8
|
+
import { l as Route } from "./router-DF0etoNa.js";
|
|
10
9
|
// src/views/skills/skill-files.tsx
|
|
11
10
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
12
11
|
var import_jsx_runtime = require_jsx_runtime();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./studio-
|
|
2
|
-
import { t as CompanionView } from "./companion-view-
|
|
3
|
-
import { n as Specs } from "./specs-view-
|
|
1
|
+
import "./studio-qRvQjRpz.js";
|
|
2
|
+
import { t as CompanionView } from "./companion-view-D-vGM55e.js";
|
|
3
|
+
import { n as Specs } from "./specs-view-exvmWdg0.js";
|
|
4
4
|
import { n as findAction } from "./actions-D8erOphH.js";
|
|
5
|
-
import { c as Route } from "./router-
|
|
5
|
+
import { c as Route } from "./router-DF0etoNa.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
7
7
|
// src/lib/spec-offers.ts
|
|
8
8
|
/** Spec offers as the view renders them: prompts rebuilt from core's action list. */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./studio-
|
|
2
|
+
import { it as Link, m as vaultQuery } from "./studio-queries-qOXOYoPt.js";
|
|
3
|
+
import { Lr as cn, ct as ROW, it as PAGE_PAD, lt as StatusWord, nt as EmptyNote, r as Icon, rt as ListCard, zr as useQuery } from "./button-B7e1fRyW.js";
|
|
4
|
+
import "./studio-qRvQjRpz.js";
|
|
5
5
|
import { t as SUBJECT_PATTERN } from "./actions-D8erOphH.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as ComboboxItem,
|
|
9
|
-
import { t as MarkdownView } from "./markdown-view-
|
|
10
|
-
import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-
|
|
11
|
-
import { t as Warnings } from "./warnings-
|
|
6
|
+
import { t as Input } from "./fields-B4qM2ZwC.js";
|
|
7
|
+
import { a as Select, c as SelectTrigger, l as SelectValue, o as SelectContent, s as SelectItem } from "./select-CjuKScan.js";
|
|
8
|
+
import { a as ComboboxItem, i as ComboboxInput, n as ComboboxContent, o as ComboboxList, r as ComboboxEmpty, t as Combobox } from "./combobox--S_OmUfh.js";
|
|
9
|
+
import { t as MarkdownView } from "./markdown-view-rwiiVcPC.js";
|
|
10
|
+
import { n as PanelSection, r as SidePanel, t as PanelHead } from "./panel-CUxRIpYL.js";
|
|
11
|
+
import { t as Warnings } from "./warnings-BxK4VfV5.js";
|
|
12
12
|
// ../mate-core/src/cli/commands/studio/graph-model.ts
|
|
13
13
|
/** Edge kinds by wire code: an edge's kind is its index here. */
|
|
14
14
|
var GRAPH_EDGE_KINDS = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as canonicalSchema, d as BUILTIN_ARTIFACT_TYPE, f as WORKFLOW_FILE,
|
|
1
|
+
import { c as canonicalSchema, d as BUILTIN_ARTIFACT_TYPE, f as WORKFLOW_FILE, l as deliveryPath, o as SCHEMA_ARTIFACTS, p as defaultWorkflow, s as SHIPPED_SCHEMAS, u as isMateSchema, w as IDEA_PLACEHOLDER, x as CHANGE_PLACEHOLDER } from "./studio-qRvQjRpz.js";
|
|
2
2
|
// src/views/workflow/steps.ts
|
|
3
3
|
var DEFAULT_WORKFLOW = defaultWorkflow();
|
|
4
4
|
/** The graph node of a review stage: `reviews` for the default one. */
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { i as FloatingRootStore, kr as EMPTY_OBJECT } from "./button-B7e1fRyW.js";
|
|
2
|
+
// ../../node_modules/.bun/@base-ui+react@1.9.0+9e489665888c9e4a/node_modules/@base-ui/react/utils/popups/store.mjs
|
|
3
|
+
/**
|
|
4
|
+
* State common to all popup stores.
|
|
5
|
+
*/
|
|
6
|
+
function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
|
|
7
|
+
return {
|
|
8
|
+
open: false,
|
|
9
|
+
openProp: void 0,
|
|
10
|
+
mounted: false,
|
|
11
|
+
transitionStatus: void 0,
|
|
12
|
+
floatingRootContext: new FloatingRootStore({
|
|
13
|
+
open: false,
|
|
14
|
+
transitionStatus: void 0,
|
|
15
|
+
floatingElement: null,
|
|
16
|
+
referenceElement: null,
|
|
17
|
+
triggerElements,
|
|
18
|
+
floatingId,
|
|
19
|
+
syncOnly: true,
|
|
20
|
+
nested,
|
|
21
|
+
onOpenChange: void 0
|
|
22
|
+
}),
|
|
23
|
+
floatingId,
|
|
24
|
+
triggerCount: 0,
|
|
25
|
+
preventUnmountingOnClose: false,
|
|
26
|
+
payload: void 0,
|
|
27
|
+
activeTriggerId: null,
|
|
28
|
+
activeTriggerElement: null,
|
|
29
|
+
openedWithoutTrigger: false,
|
|
30
|
+
triggerIdProp: void 0,
|
|
31
|
+
popupElement: null,
|
|
32
|
+
positionerElement: null,
|
|
33
|
+
activeTriggerProps: EMPTY_OBJECT,
|
|
34
|
+
inactiveTriggerProps: EMPTY_OBJECT,
|
|
35
|
+
popupProps: EMPTY_OBJECT
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
|
|
39
|
+
var openSelector = (state) => state.openProp ?? state.open;
|
|
40
|
+
var popupIdSelector = (state) => {
|
|
41
|
+
return (state.popupElement?.id ?? state.floatingId) || void 0;
|
|
42
|
+
};
|
|
43
|
+
function triggerOwnsOpenPopup(state, triggerId) {
|
|
44
|
+
return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
|
|
45
|
+
}
|
|
46
|
+
function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
|
|
47
|
+
if (triggerOwnsOpenPopup(state, triggerId)) return true;
|
|
48
|
+
return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && !state.openedWithoutTrigger && state.triggerCount === 1;
|
|
49
|
+
}
|
|
50
|
+
var popupStoreSelectors = {
|
|
51
|
+
open: openSelector,
|
|
52
|
+
mounted: (state) => state.mounted,
|
|
53
|
+
transitionStatus: (state) => openSelector(state) && !state.mounted ? "starting" : state.transitionStatus,
|
|
54
|
+
floatingRootContext: (state) => state.floatingRootContext,
|
|
55
|
+
triggerCount: (state) => state.triggerCount,
|
|
56
|
+
preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
|
|
57
|
+
payload: (state) => state.payload,
|
|
58
|
+
activeTriggerId: activeTriggerIdSelector,
|
|
59
|
+
activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
|
|
60
|
+
popupId: popupIdSelector,
|
|
61
|
+
/**
|
|
62
|
+
* Whether the trigger with the given ID was used to open the popup.
|
|
63
|
+
*/
|
|
64
|
+
isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
|
|
65
|
+
/**
|
|
66
|
+
* Whether the popup is open and was activated by a trigger with the given ID.
|
|
67
|
+
*/
|
|
68
|
+
isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
|
|
69
|
+
/**
|
|
70
|
+
* Whether the popup is mounted and was activated by a trigger with the given ID.
|
|
71
|
+
*/
|
|
72
|
+
isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
|
|
73
|
+
triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
|
|
74
|
+
/**
|
|
75
|
+
* Popup id for the trigger that currently owns the open popup.
|
|
76
|
+
*/
|
|
77
|
+
triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
|
|
78
|
+
popupProps: (state) => state.popupProps,
|
|
79
|
+
popupElement: (state) => state.popupElement,
|
|
80
|
+
positionerElement: (state) => state.positionerElement
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Store members a detached handle-backed trigger reads or invokes for trigger registration and data
|
|
84
|
+
* forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
|
|
85
|
+
* detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
|
|
86
|
+
* be durable. Component handle-store views Pick these from their concrete store (preserving its
|
|
87
|
+
* context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
|
|
88
|
+
*/
|
|
89
|
+
/**
|
|
90
|
+
* The subset of a popup store that trigger registration and data forwarding rely on. Narrow enough
|
|
91
|
+
* that an inert store can be passed while detached.
|
|
92
|
+
*/
|
|
93
|
+
export { popupStoreSelectors as n, createInitialPopupStoreState as t };
|
|
@@ -18,7 +18,8 @@ var SHARED_VIEWS = [
|
|
|
18
18
|
"specs",
|
|
19
19
|
"reports",
|
|
20
20
|
"graph",
|
|
21
|
-
"usage"
|
|
21
|
+
"usage",
|
|
22
|
+
"friction"
|
|
22
23
|
];
|
|
23
24
|
function viewsFor(mode) {
|
|
24
25
|
return [...MODE_VIEWS[mode], ...SHARED_VIEWS];
|
|
@@ -10194,6 +10195,50 @@ function guideTree(source, path, routes) {
|
|
|
10194
10195
|
}
|
|
10195
10196
|
/** `---` YAML, or the `<!-- mate:delta … -->` header Mate writes atop a change's spec delta. */
|
|
10196
10197
|
var FRONTMATTER = /^(?:---[ \t]*\r?\n([\s\S]*?)\r?\n---|<!--[ \t]*mate:delta[ \t]*\r?\n([\s\S]*?)\r?\n[ \t]*-->)[ \t]*(?:\r?\n|$)/;
|
|
10198
|
+
// ../mate-core/src/runtime/friction-vocabulary.ts
|
|
10199
|
+
var REPORT_KINDS = [
|
|
10200
|
+
"bug",
|
|
10201
|
+
"unclear",
|
|
10202
|
+
"missing"
|
|
10203
|
+
];
|
|
10204
|
+
var SUBJECT_TYPES = [
|
|
10205
|
+
"command",
|
|
10206
|
+
"hook",
|
|
10207
|
+
"skill",
|
|
10208
|
+
"guidance",
|
|
10209
|
+
"capability",
|
|
10210
|
+
"docs"
|
|
10211
|
+
];
|
|
10212
|
+
/** A Friction State; a target without one is `open`. */
|
|
10213
|
+
var FRICTION_STATES = [
|
|
10214
|
+
"fixed",
|
|
10215
|
+
"reported",
|
|
10216
|
+
"dismissed"
|
|
10217
|
+
];
|
|
10218
|
+
/** What a mark may set; `open` clears the Friction State. */
|
|
10219
|
+
var MARK_STATES = ["open", ...FRICTION_STATES];
|
|
10220
|
+
var STATE_FILTERS = [
|
|
10221
|
+
"open",
|
|
10222
|
+
"handled",
|
|
10223
|
+
"all"
|
|
10224
|
+
];
|
|
10225
|
+
// ../mate-core/src/lib/friction/view/select.ts
|
|
10226
|
+
/** The Friction Items the filters show, in the view's order. */
|
|
10227
|
+
function selectFriction(view, filters) {
|
|
10228
|
+
const present = /* @__PURE__ */ new Set([...view.groups.map((group) => group.subjectType), ...view.freeReports.map((report) => report.subjectType)]);
|
|
10229
|
+
const types = SUBJECT_TYPES.filter((type) => present.has(type));
|
|
10230
|
+
const type = types.find((known) => known === filters.type);
|
|
10231
|
+
const shown = (item) => (filters.state === "all" || item.open === (filters.state === "open")) && (!type || item.subjectType === type);
|
|
10232
|
+
const groups = view.groups.filter(shown);
|
|
10233
|
+
const freeReports = view.freeReports.filter((report) => shown(report) && (!filters.kind || report.kind === filters.kind));
|
|
10234
|
+
return {
|
|
10235
|
+
groups,
|
|
10236
|
+
freeReports,
|
|
10237
|
+
hidden: view.groups.length + view.freeReports.length - groups.length - freeReports.length,
|
|
10238
|
+
types,
|
|
10239
|
+
type
|
|
10240
|
+
};
|
|
10241
|
+
}
|
|
10197
10242
|
// ../mate-core/src/runtime/workflow/workflow.ts
|
|
10198
10243
|
/**
|
|
10199
10244
|
* A companion's workflow: the Delivery Path's stages with the skills each runs, and the artifact
|
|
@@ -10434,4 +10479,4 @@ var DARK_PALETTE = {
|
|
|
10434
10479
|
hunkBg: "#232A2B"
|
|
10435
10480
|
};
|
|
10436
10481
|
({ ...LIGHT_PALETTE });
|
|
10437
|
-
export {
|
|
10482
|
+
export { VIEW_PARAM as A, COMPANION_PARAM as C, SHARED_VIEWS as D, MODE_VIEWS as E, requestedMode as M, viewsFor as N, STUDIO_MODES as O, COMPANION_DIGEST_PATTERN as S, LEGACY_ROLE_PARAM as T, REPORT_KINDS as _, DEFAULT_SCHEMA as a, guideTree as b, canonicalSchema as c, BUILTIN_ARTIFACT_TYPE as d, WORKFLOW_FILE as f, MARK_STATES as g, FRICTION_STATES as h, stepStage as i, companionDigest as j, STUDIO_MODE_PARAM as k, deliveryPath as l, selectFriction as m, LIGHT_PALETTE as n, SCHEMA_ARTIFACTS as o, defaultWorkflow as p, stagesBeforeWork as r, SHIPPED_SCHEMAS as s, DARK_PALETTE as t, isMateSchema as u, STATE_FILTERS as v, IDEA_PLACEHOLDER as w, CHANGE_PLACEHOLDER as x, SUBJECT_TYPES as y };
|
|
@@ -2,11 +2,11 @@ import { n as require_react, o as __toESM, t as require_jsx_runtime } from "./js
|
|
|
2
2
|
import { C as rootRouteId, S as trimPathRight, _ as invariant, a as useRouter, b as removeTrailingSlash, x as trimPathLeft, y as cleanPath } from "./useSelector-DUmCUXAs.js";
|
|
3
3
|
import { r as redirect } from "./redirect-BaZ_QyqF.js";
|
|
4
4
|
import { a as deepEqual, c as functionalUpdate$1, f as isDangerousProtocol, l as getUrlScheme, p as isModuleNotFoundError } from "./utils-C9CX1kcy.js";
|
|
5
|
-
import { i as reactUse, n as useMatch, t as getServerFnById } from "./__23tanstack-start-server-fn-resolver-
|
|
5
|
+
import { i as reactUse, n as useMatch, t as getServerFnById } from "./__23tanstack-start-server-fn-resolver-JoHQ5ihx.js";
|
|
6
6
|
import { n as createServerFn, r as TSS_SERVER_FUNCTION } from "../server.js";
|
|
7
|
-
import {
|
|
7
|
+
import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
|
|
8
|
+
import { i as validateStudioSearch } from "./search-b-yQesv3.js";
|
|
8
9
|
import { n as unpackGraph } from "./graph-wire-BdSUx0G5.js";
|
|
9
|
-
import { r as validateStudioSearch } from "./search-DUK7Jl6f.js";
|
|
10
10
|
// ../../node_modules/.bun/@tanstack+router-core@1.171.39/node_modules/@tanstack/router-core/dist/esm/route.js
|
|
11
11
|
var BaseRoute = class {
|
|
12
12
|
get to() {
|
|
@@ -1064,6 +1064,67 @@ function addConsumeAwareSignal(object, getSignal, onCancelled, internalSignal) {
|
|
|
1064
1064
|
function queryOptions(options) {
|
|
1065
1065
|
return options;
|
|
1066
1066
|
}
|
|
1067
|
+
// ../mate-core/src/cli/commands/studio/routes.ts
|
|
1068
|
+
/** A hosted report's HTML is served at this prefix plus its id. */
|
|
1069
|
+
var REPORT_VIEW_PREFIX = "/studio/reports/";
|
|
1070
|
+
/** A service plugin's routes: `/api/plugins/<service id>/…`. */
|
|
1071
|
+
var SERVICE_ROUTE_PREFIX = "/api/plugins/";
|
|
1072
|
+
/** Answers 204 to any reader; the page probes its connection here. */
|
|
1073
|
+
var STUDIO_PING_ROUTE = "/api/ping";
|
|
1074
|
+
/** One event stream per page: board, reports and markdown tree changes for a companion. */
|
|
1075
|
+
var STUDIO_EVENTS_ROUTE = "/api/events";
|
|
1076
|
+
/** The terminal's WASM core, loaded by Studio's bundled terminal from Studio itself. */
|
|
1077
|
+
var TERMINAL_WASM = `/studio/terminal/wterm.wasm`;
|
|
1078
|
+
/** The terminal's WebSocket, and its session list and end calls. */
|
|
1079
|
+
var TERMINAL_SOCKET_ROUTE = "/api/terminal";
|
|
1080
|
+
var TERMINAL_SESSIONS_ROUTE = "/api/terminal/sessions";
|
|
1081
|
+
var TERMINAL_SESSIONS_END_ROUTE = "/api/terminal/sessions/end";
|
|
1082
|
+
// ../mate-core/src/cli/commands/studio/connection.ts
|
|
1083
|
+
/**
|
|
1084
|
+
* The page's connection to Studio's server. Browser-safe: plugin view bundles import it,
|
|
1085
|
+
* so it imports nothing from Node.
|
|
1086
|
+
*/
|
|
1087
|
+
/**
|
|
1088
|
+
* The connection problem a request's outcome (its response, or what it threw) shows.
|
|
1089
|
+
* `null` for any answer Studio itself gave, a refusal included, and for an abort.
|
|
1090
|
+
*/
|
|
1091
|
+
function connectionStateOf(outcome) {
|
|
1092
|
+
if (outcome instanceof TypeError) return "offline";
|
|
1093
|
+
if (!(outcome instanceof Response)) return null;
|
|
1094
|
+
if (outcome.type === "opaqueredirect") return "signed-out";
|
|
1095
|
+
if (outcome.status === 401) return "expired";
|
|
1096
|
+
if (outcome.status === 421) return "host-refused";
|
|
1097
|
+
return null;
|
|
1098
|
+
}
|
|
1099
|
+
/** Pings Studio. Never carries the token, so the token exchange's 303 cannot answer it. */
|
|
1100
|
+
async function probeStudio(fetchImpl = fetch) {
|
|
1101
|
+
let outcome;
|
|
1102
|
+
try {
|
|
1103
|
+
outcome = await fetchImpl(STUDIO_PING_ROUTE, {
|
|
1104
|
+
redirect: "manual",
|
|
1105
|
+
credentials: "same-origin",
|
|
1106
|
+
cache: "no-store"
|
|
1107
|
+
});
|
|
1108
|
+
} catch (error) {
|
|
1109
|
+
outcome = error;
|
|
1110
|
+
}
|
|
1111
|
+
return connectionStateOf(outcome) ?? "online";
|
|
1112
|
+
}
|
|
1113
|
+
// src/lib/studio-fetch.ts
|
|
1114
|
+
/**
|
|
1115
|
+
* A background read of Studio's that throws on a connection problem, so the query cache sees
|
|
1116
|
+
* the failure and the page probes. Any answer of Studio's, a refusal included, is returned.
|
|
1117
|
+
*/
|
|
1118
|
+
async function studioFetch(url, init = {}) {
|
|
1119
|
+
const response = await fetch(url, {
|
|
1120
|
+
...init,
|
|
1121
|
+
credentials: "same-origin",
|
|
1122
|
+
redirect: "manual"
|
|
1123
|
+
});
|
|
1124
|
+
const problem = connectionStateOf(response);
|
|
1125
|
+
if (problem) throw new Error(`Studio connection: ${problem}`);
|
|
1126
|
+
return response;
|
|
1127
|
+
}
|
|
1067
1128
|
// ../../node_modules/.bun/@tanstack+start-server-core@1.169.45/node_modules/@tanstack/start-server-core/dist/esm/createSsrRpc.js
|
|
1068
1129
|
var createSsrRpc = (functionId) => {
|
|
1069
1130
|
const url = "/_serverFn/" + functionId;
|
|
@@ -1253,10 +1314,7 @@ var pluginAttentionQuery = (companion, url) => queryOptions({
|
|
|
1253
1314
|
url
|
|
1254
1315
|
],
|
|
1255
1316
|
queryFn: async () => {
|
|
1256
|
-
const response = await
|
|
1257
|
-
credentials: "same-origin",
|
|
1258
|
-
headers: { accept: "application/json" }
|
|
1259
|
-
});
|
|
1317
|
+
const response = await studioFetch(`${url}?companion=${encodeURIComponent(companion)}`, { headers: { accept: "application/json" } });
|
|
1260
1318
|
if (!response.ok) return 0;
|
|
1261
1319
|
const answer = await response.json();
|
|
1262
1320
|
return typeof answer.count === "number" ? answer.count : 0;
|
|
@@ -1332,4 +1390,4 @@ function afterVaultRefresh(queryClient, companion, search, fresh) {
|
|
|
1332
1390
|
var afterVaultFileChange = (queryClient, companion) => stale(queryClient, keys.vaultViews(companion));
|
|
1333
1391
|
/** After Refresh collected `companion` again; other companions keep what they hold. */
|
|
1334
1392
|
var afterRefresh = (queryClient, companion) => stale(queryClient, keys.companion(companion ?? null));
|
|
1335
|
-
export {
|
|
1393
|
+
export { systemSetTimeoutZero as $, addConsumeAwareSignal as A, keepPreviousData as B, SERVICE_ROUTE_PREFIX as C, TERMINAL_SOCKET_ROUTE as D, TERMINAL_SESSIONS_ROUTE as E, functionalUpdate as F, replaceData as G, matchQuery as H, hashKey as I, shallowEqualObjects as J, replaceEqualDeep as K, hashQueryKeyByOptions as L, addToStart as M, ensureQueryFn as N, TERMINAL_WASM as O, fetchSignal as P, timeUntilStale as Q, isServer as R, REPORT_VIEW_PREFIX as S, TERMINAL_SESSIONS_END_ROUTE as T, noop as U, matchMutation as V, partialMatchKey as W, skipToken as X, shouldThrowError as Y, sleep as Z, saveVaultFile as _, companionViewQuery as a, useNavigate as at, studioFetch as b, pluginAttentionQuery as c, skillPreviewQuery as d, timeoutManager as et, vaultChildrenQuery as f, previewVaultFile as g, getVault as h, afterVaultRefresh as i, Link as it, addToEnd as j, queryOptions as k, reportsQuery as l, vaultQuery as m, afterRefresh as n, createFileRoute as nt, graphQuery as o, useParams as ot, vaultMatchesQuery as p, resolveQueryValue as q, afterVaultFileChange as r, createRootRouteWithContext as rt, holdShellForMode as s, afterEvent as t, lazyRouteComponent as tt, shellQuery as u, getShell as v, STUDIO_EVENTS_ROUTE as w, probeStudio as x, createSsrRpc as y, isValidTimeout as z };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { f as useQueryClient } from "./useBaseQuery-
|
|
4
|
-
import {
|
|
1
|
+
import { t as useMutation } from "./useMutation-C-WO6hCM.js";
|
|
2
|
+
import { Lr as cn, Rr as clsx, dt as ToggleGroup, ft as ToggleGroupItem, o as require_with_selector$1, r as Icon, t as Button, ut as ViewLoading, zr as useQuery } from "./button-B7e1fRyW.js";
|
|
3
|
+
import { f as useQueryClient } from "./useBaseQuery--iH3rd-T.js";
|
|
4
|
+
import { at as useNavigate, k as queryOptions, y as createSsrRpc } from "./studio-queries-qOXOYoPt.js";
|
|
5
5
|
import { i as __exportAll, n as require_react, o as __toESM, r as __commonJSMin, t as require_jsx_runtime } from "./jsx-runtime-Bt0s0YKS.js";
|
|
6
|
-
import { t as Input } from "./fields-
|
|
7
|
-
import { a as ComboboxItem,
|
|
6
|
+
import { t as Input } from "./fields-B4qM2ZwC.js";
|
|
7
|
+
import { a as ComboboxItem, i as ComboboxInput, n as ComboboxContent, o as ComboboxList, r as ComboboxEmpty, t as Combobox } from "./combobox--S_OmUfh.js";
|
|
8
|
+
import { a as Select, c as SelectTrigger, l as SelectValue, o as SelectContent, s as SelectItem } from "./select-CjuKScan.js";
|
|
9
|
+
import { C as useMediaQuery, h as useBrowser, s as Route } from "./router-DF0etoNa.js";
|
|
8
10
|
import { i as require_react_dom, n as createServerFn } from "../server.js";
|
|
9
|
-
import {
|
|
11
|
+
import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
|
|
10
12
|
// src/server/usage.ts
|
|
11
13
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
12
14
|
function validateUsageInput(input) {
|
|
@@ -277,44 +279,11 @@ function UsageLedger({ repositories }) {
|
|
|
277
279
|
]
|
|
278
280
|
});
|
|
279
281
|
}
|
|
280
|
-
// src/components/ui/spinner.tsx
|
|
281
|
-
function Spinner({ className, ...props }) {
|
|
282
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
283
|
-
"data-slot": "spinner",
|
|
284
|
-
role: "status",
|
|
285
|
-
"aria-label": "Loading",
|
|
286
|
-
viewBox: "0 0 24 24",
|
|
287
|
-
fill: "none",
|
|
288
|
-
stroke: "currentColor",
|
|
289
|
-
strokeWidth: 2,
|
|
290
|
-
strokeLinecap: "round",
|
|
291
|
-
className: cn("size-4 shrink-0 animate-spin motion-reduce:animate-none", className),
|
|
292
|
-
...props,
|
|
293
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 3a9 9 0 1 1-9 9" })
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
282
|
// src/views/usage/loading.tsx
|
|
297
283
|
function UsageLoading() {
|
|
298
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
302
|
-
className: "flex max-w-sm flex-col items-center gap-3 text-center",
|
|
303
|
-
children: [
|
|
304
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {
|
|
305
|
-
"aria-hidden": "true",
|
|
306
|
-
className: "size-7 text-accent"
|
|
307
|
-
}),
|
|
308
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
309
|
-
className: "text-sm font-medium",
|
|
310
|
-
children: "Collecting usage…"
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
313
|
-
className: "text-xs leading-relaxed text-muted",
|
|
314
|
-
children: "Reading local usage for this companion and its linked repositories."
|
|
315
|
-
})
|
|
316
|
-
]
|
|
317
|
-
})
|
|
284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ViewLoading, {
|
|
285
|
+
title: "Collecting usage…",
|
|
286
|
+
detail: "Reading local usage for this companion and its linked repositories."
|
|
318
287
|
});
|
|
319
288
|
}
|
|
320
289
|
// src/views/usage/sources.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as createServerRpc } from "./createServerRpc-bFKFpGFG.js";
|
|
2
2
|
import { n as createServerFn } from "../server.js";
|
|
3
|
-
import {
|
|
3
|
+
import { S as COMPANION_DIGEST_PATTERN } from "./studio-qRvQjRpz.js";
|
|
4
4
|
// src/server/usage.ts?tss-serverfn-split
|
|
5
5
|
function validateUsageInput(input) {
|
|
6
6
|
if (!input || typeof input.companion !== "string" || !COMPANION_DIGEST_PATTERN.test(input.companion)) throw new Error("No registered companion was selected");
|