@squadrules/mcp 5.0.0-beta.1 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +23 -20
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/config/embedding-fastembed.d.ts +9 -0
  4. package/dist/config/embedding-fastembed.d.ts.map +1 -0
  5. package/dist/config/embedding-fastembed.js +20 -0
  6. package/dist/config/embedding-fastembed.js.map +1 -0
  7. package/dist/config.d.ts +8 -4
  8. package/dist/config.d.ts.map +1 -1
  9. package/dist/config.js +10 -4
  10. package/dist/config.js.map +1 -1
  11. package/dist/embed-docs/mem/adapter-migration.md +1 -1
  12. package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +1 -1
  13. package/dist/embed-docs/mem/challenge-type-guide.md +1 -1
  14. package/dist/embed-docs/mem/create-new-protocol.md +1 -1
  15. package/dist/embed-docs/mem/phase-critic-guide.md +1 -1
  16. package/dist/embed-docs/mem/phase-critic.md +1 -1
  17. package/dist/embed-docs/mem/protocol-linking-guide.md +1 -1
  18. package/dist/embed-docs/mem/refine-search.md +1 -1
  19. package/dist/embed-docs/mem/skill-format-guide.md +1 -1
  20. package/dist/http/http-api-snapshot.d.ts.map +1 -1
  21. package/dist/http/http-api-snapshot.js +13 -1
  22. package/dist/http/http-api-snapshot.js.map +1 -1
  23. package/dist/http/http-health-routes.d.ts.map +1 -1
  24. package/dist/http/http-health-routes.js +6 -3
  25. package/dist/http/http-health-routes.js.map +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +15 -5
  28. package/dist/index.js.map +1 -1
  29. package/dist/resources/embedded-mcp-resources.js +9 -9
  30. package/dist/resources/embedded-mcp-resources.js.map +1 -1
  31. package/dist/resources/mem-resources-boot.d.ts.map +1 -1
  32. package/dist/resources/mem-resources-boot.js +2 -28
  33. package/dist/resources/mem-resources-boot.js.map +1 -1
  34. package/dist/resources/mem-uuid-mapper.d.ts.map +1 -1
  35. package/dist/resources/mem-uuid-mapper.js +8 -23
  36. package/dist/resources/mem-uuid-mapper.js.map +1 -1
  37. package/dist/server.d.ts.map +1 -1
  38. package/dist/server.js +9 -7
  39. package/dist/server.js.map +1 -1
  40. package/dist/services/embedding/fastembed-provider.d.ts +2 -0
  41. package/dist/services/embedding/fastembed-provider.d.ts.map +1 -0
  42. package/dist/services/embedding/fastembed-provider.js +78 -0
  43. package/dist/services/embedding/fastembed-provider.js.map +1 -0
  44. package/dist/services/embedding/health.d.ts.map +1 -1
  45. package/dist/services/embedding/health.js +99 -96
  46. package/dist/services/embedding/health.js.map +1 -1
  47. package/dist/services/embedding/provider-audit.d.ts +15 -0
  48. package/dist/services/embedding/provider-audit.d.ts.map +1 -0
  49. package/dist/services/embedding/provider-audit.js +28 -0
  50. package/dist/services/embedding/provider-audit.js.map +1 -0
  51. package/dist/services/embedding/providers.d.ts +2 -1
  52. package/dist/services/embedding/providers.d.ts.map +1 -1
  53. package/dist/services/embedding/providers.js +21 -23
  54. package/dist/services/embedding/providers.js.map +1 -1
  55. package/dist/services/embedding/service.d.ts +2 -2
  56. package/dist/services/embedding/service.d.ts.map +1 -1
  57. package/dist/services/embedding/service.js +13 -16
  58. package/dist/services/embedding/service.js.map +1 -1
  59. package/dist/services/execution-trace-store.d.ts +5 -29
  60. package/dist/services/execution-trace-store.d.ts.map +1 -1
  61. package/dist/services/execution-trace-store.js +10 -2
  62. package/dist/services/execution-trace-store.js.map +1 -1
  63. package/dist/services/memory/store.d.ts +23 -0
  64. package/dist/services/memory/store.d.ts.map +1 -1
  65. package/dist/services/memory/store.js +110 -3
  66. package/dist/services/memory/store.js.map +1 -1
  67. package/dist/services/memory-store.d.ts +5 -0
  68. package/dist/services/memory-store.d.ts.map +1 -1
  69. package/dist/services/memory-store.js +5 -0
  70. package/dist/services/memory-store.js.map +1 -1
  71. package/dist/services/qdrant/service.d.ts.map +1 -1
  72. package/dist/services/qdrant/service.js +11 -2
  73. package/dist/services/qdrant/service.js.map +1 -1
  74. package/dist/services/vector-store/IExecutionTraceStore.d.ts +25 -0
  75. package/dist/services/vector-store/IExecutionTraceStore.d.ts.map +1 -0
  76. package/dist/services/vector-store/IExecutionTraceStore.js +2 -0
  77. package/dist/services/vector-store/IExecutionTraceStore.js.map +1 -0
  78. package/dist/services/vector-store/IVectorRecordStore.d.ts +58 -0
  79. package/dist/services/vector-store/IVectorRecordStore.d.ts.map +1 -0
  80. package/dist/services/vector-store/IVectorRecordStore.js +2 -0
  81. package/dist/services/vector-store/IVectorRecordStore.js.map +1 -0
  82. package/dist/services/vector-store/commit-retry.d.ts +21 -0
  83. package/dist/services/vector-store/commit-retry.d.ts.map +1 -0
  84. package/dist/services/vector-store/commit-retry.js +58 -0
  85. package/dist/services/vector-store/commit-retry.js.map +1 -0
  86. package/dist/services/vector-store/embedded-store-singleton.d.ts +12 -0
  87. package/dist/services/vector-store/embedded-store-singleton.d.ts.map +1 -0
  88. package/dist/services/vector-store/embedded-store-singleton.js +17 -0
  89. package/dist/services/vector-store/embedded-store-singleton.js.map +1 -0
  90. package/dist/services/vector-store/lancedb/LanceExecutionTraceStore.d.ts +28 -0
  91. package/dist/services/vector-store/lancedb/LanceExecutionTraceStore.d.ts.map +1 -0
  92. package/dist/services/vector-store/lancedb/LanceExecutionTraceStore.js +222 -0
  93. package/dist/services/vector-store/lancedb/LanceExecutionTraceStore.js.map +1 -0
  94. package/dist/services/vector-store/lancedb/LanceVectorRecordStore.d.ts +77 -0
  95. package/dist/services/vector-store/lancedb/LanceVectorRecordStore.d.ts.map +1 -0
  96. package/dist/services/vector-store/lancedb/LanceVectorRecordStore.js +136 -0
  97. package/dist/services/vector-store/lancedb/LanceVectorRecordStore.js.map +1 -0
  98. package/dist/services/vector-store/lancedb/lance-records-engine.d.ts +41 -0
  99. package/dist/services/vector-store/lancedb/lance-records-engine.d.ts.map +1 -0
  100. package/dist/services/vector-store/lancedb/lance-records-engine.js +102 -0
  101. package/dist/services/vector-store/lancedb/lance-records-engine.js.map +1 -0
  102. package/dist/services/vector-store/lancedb/lance-records-mutations.d.ts +22 -0
  103. package/dist/services/vector-store/lancedb/lance-records-mutations.d.ts.map +1 -0
  104. package/dist/services/vector-store/lancedb/lance-records-mutations.js +211 -0
  105. package/dist/services/vector-store/lancedb/lance-records-mutations.js.map +1 -0
  106. package/dist/services/vector-store/lancedb/lance-records-reads.d.ts +64 -0
  107. package/dist/services/vector-store/lancedb/lance-records-reads.d.ts.map +1 -0
  108. package/dist/services/vector-store/lancedb/lance-records-reads.js +237 -0
  109. package/dist/services/vector-store/lancedb/lance-records-reads.js.map +1 -0
  110. package/dist/services/vector-store/lancedb/lance-records-schema.d.ts +48 -0
  111. package/dist/services/vector-store/lancedb/lance-records-schema.d.ts.map +1 -0
  112. package/dist/services/vector-store/lancedb/lance-records-schema.js +159 -0
  113. package/dist/services/vector-store/lancedb/lance-records-schema.js.map +1 -0
  114. package/dist/services/vector-store/lancedb/lance-records-search.d.ts +30 -0
  115. package/dist/services/vector-store/lancedb/lance-records-search.d.ts.map +1 -0
  116. package/dist/services/vector-store/lancedb/lance-records-search.js +112 -0
  117. package/dist/services/vector-store/lancedb/lance-records-search.js.map +1 -0
  118. package/dist/services/vector-store/lancedb/lance-records-write-artifact.d.ts +11 -0
  119. package/dist/services/vector-store/lancedb/lance-records-write-artifact.d.ts.map +1 -0
  120. package/dist/services/vector-store/lancedb/lance-records-write-artifact.js +121 -0
  121. package/dist/services/vector-store/lancedb/lance-records-write-artifact.js.map +1 -0
  122. package/dist/services/vector-store/lancedb/lance-records-write-helpers.d.ts +52 -0
  123. package/dist/services/vector-store/lancedb/lance-records-write-helpers.d.ts.map +1 -0
  124. package/dist/services/vector-store/lancedb/lance-records-write-helpers.js +216 -0
  125. package/dist/services/vector-store/lancedb/lance-records-write-helpers.js.map +1 -0
  126. package/dist/services/vector-store/lancedb/lance-records-writes.d.ts +21 -0
  127. package/dist/services/vector-store/lancedb/lance-records-writes.d.ts.map +1 -0
  128. package/dist/services/vector-store/lancedb/lance-records-writes.js +294 -0
  129. package/dist/services/vector-store/lancedb/lance-records-writes.js.map +1 -0
  130. package/dist/services/vector-store/lancedb-connection.d.ts +12 -0
  131. package/dist/services/vector-store/lancedb-connection.d.ts.map +1 -0
  132. package/dist/services/vector-store/lancedb-connection.js +28 -0
  133. package/dist/services/vector-store/lancedb-connection.js.map +1 -0
  134. package/dist/services/vector-store/types.d.ts +85 -0
  135. package/dist/services/vector-store/types.d.ts.map +1 -0
  136. package/dist/services/vector-store/types.js +2 -0
  137. package/dist/services/vector-store/types.js.map +1 -0
  138. package/dist/tools/artifact-catalog.d.ts.map +1 -1
  139. package/dist/tools/artifact-catalog.js +6 -33
  140. package/dist/tools/artifact-catalog.js.map +1 -1
  141. package/dist/tools/search.d.ts.map +1 -1
  142. package/dist/tools/search.js +6 -20
  143. package/dist/tools/search.js.map +1 -1
  144. package/dist/tools/search_schema.d.ts +1 -1
  145. package/dist/tools/skill-export/enumerate-space-adapters.d.ts +1 -1
  146. package/dist/tools/skill-export/enumerate-space-adapters.d.ts.map +1 -1
  147. package/dist/tools/skill-export/enumerate-space-adapters.js +11 -27
  148. package/dist/tools/skill-export/enumerate-space-adapters.js.map +1 -1
  149. package/dist/tools/spaces.d.ts.map +1 -1
  150. package/dist/tools/spaces.js +2 -15
  151. package/dist/tools/spaces.js.map +1 -1
  152. package/dist/ui/assets/{AccountPage-B0ali9jz.js → AccountPage-Cbsp2hcC.js} +1 -1
  153. package/dist/ui/assets/{ProtocolEditPage-DIySo-F_.js → ProtocolEditPage-mChBe3JY.js} +1 -1
  154. package/dist/ui/assets/{RichTextEditor-uun0UIVc.js → RichTextEditor-Bj6JxHM5.js} +1 -1
  155. package/dist/ui/assets/{SkillBundlePage-DtOlpupj.js → SkillBundlePage-D1OPKJzA.js} +1 -1
  156. package/dist/ui/assets/{index-BlCipoHI.js → index-DL3-JTk4.js} +2 -2
  157. package/dist/ui/index.html +1 -1
  158. package/dist/utils/squadrules-user-dirs.d.ts +10 -0
  159. package/dist/utils/squadrules-user-dirs.d.ts.map +1 -1
  160. package/dist/utils/squadrules-user-dirs.js +12 -0
  161. package/dist/utils/squadrules-user-dirs.js.map +1 -1
  162. package/package.json +18 -11
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EACL,uBAAuB,EACvB,WAAW,EACX,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,eAAe,EACf,6BAA6B,EAC7B,2BAA2B,EAC3B,2BAA2B,EAC3B,gCAAgC,EAChC,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAuC,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,sCAAsC,EACtC,iCAAiC,EACjC,iCAAiC,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,qBAAqB,GAAG,eAAe,CAAC,iCAAiC,CAAC,CAAC;AACjF,MAAM,qBAAqB,GAAG,eAAe,CAAC,iCAAiC,CAAC,CAAC;AACjF,MAAM,oBAAoB,GAAG,qBAAqB,qBAAqB,gCAAgC,CAAC;AACxG,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAElE,sGAAsG;AACtG,SAAS,cAAc,CAAC,KAAa;IACnC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI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AE,6BAA6B,CAAC,CAAC;QAC7F,gBAAgB,CAAC,KAAK,CACpB;YACE,GAAG,cAAc;YACjB,YAAY,EAAE,MAAM;YACpB,4BAA4B,EAAE,6BAA6B;SAC5D,EACD,oCAAoC,CACrC,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,OAAO,EAAE,UAAU,IAAI,UAAU,IAAI,IAAI;QAC9C,CAAC,CAAC,MAAM,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;QACxC,CAAC,CAAC,MAAM,YAAY,EAAE,CAAC;AAC3B,CAAC"}
@@ -16,8 +16,8 @@ export declare const searchOutputSchema: z.ZodObject<{
16
16
  score: z.ZodNullable<z.ZodNumber>;
17
17
  role: z.ZodEnum<{
18
18
  match: "match";
19
- refine: "refine";
20
19
  create: "create";
20
+ refine: "refine";
21
21
  }>;
22
22
  tags: z.ZodArray<z.ZodString>;
23
23
  next_action: z.ZodString;
@@ -6,7 +6,7 @@ import type { MemoryQdrantStore } from '../../services/memory/store.js';
6
6
  * Return `squadrules://adapter/{uuid}` for each distinct adapter in the space.
7
7
  *
8
8
  * Adapter layer payloads do not carry a `content_type` field (only artifact memories do),
9
- * so we cannot filter on `content_type === 'text/markdown'` at the Qdrant level — that
9
+ * so we cannot filter on `content_type === 'text/markdown'` at the store level — that
10
10
  * would exclude every adapter and yield an empty bundle. Instead we scroll the whole
11
11
  * space and dedupe by `adapter.id`, the same shape `tools/spaces.ts` uses to count
12
12
  * adapters per space. Artifact memories share the same `adapter.id` as their parent
@@ -1 +1 @@
1
- {"version":3,"file":"enumerate-space-adapters.d.ts","sourceRoot":"","sources":["../../../src/tools/skill-export/enumerate-space-adapters.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAKxE;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAAC,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA4B/G"}
1
+ {"version":3,"file":"enumerate-space-adapters.d.ts","sourceRoot":"","sources":["../../../src/tools/skill-export/enumerate-space-adapters.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAAC,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAa/G"}
@@ -1,45 +1,29 @@
1
1
  /**
2
2
  * List unique adapter URIs in a space for bulk export.
3
3
  */
4
- import { buildSpaceFilter } from '../../utils/space-filter.js';
5
- const SCROLL_LIMIT = 512;
6
4
  /**
7
5
  * Return `squadrules://adapter/{uuid}` for each distinct adapter in the space.
8
6
  *
9
7
  * Adapter layer payloads do not carry a `content_type` field (only artifact memories do),
10
- * so we cannot filter on `content_type === 'text/markdown'` at the Qdrant level — that
8
+ * so we cannot filter on `content_type === 'text/markdown'` at the store level — that
11
9
  * would exclude every adapter and yield an empty bundle. Instead we scroll the whole
12
10
  * space and dedupe by `adapter.id`, the same shape `tools/spaces.ts` uses to count
13
11
  * adapters per space. Artifact memories share the same `adapter.id` as their parent
14
12
  * adapter, so they collapse under the existing entry rather than introducing a new one.
15
13
  */
16
14
  export async function listAdapterUrisInSpace(memoryStore, spaceId) {
17
- const { client, collection } = memoryStore.getQdrantAccess();
18
- const filter = buildSpaceFilter([spaceId]);
15
+ const records = await memoryStore.scrollSpace(spaceId, { paginate: true });
19
16
  const seen = new Set();
20
17
  const uris = [];
21
- let offset;
22
- do {
23
- const page = await client.scroll(collection, {
24
- filter,
25
- limit: SCROLL_LIMIT,
26
- ...(offset !== undefined ? { offset } : {}),
27
- with_payload: true,
28
- with_vector: false
29
- });
30
- const points = Array.isArray(page?.points) ? page.points : [];
31
- for (const point of points) {
32
- const payload = (point?.payload ?? {});
33
- const adapter = payload['adapter'];
34
- const id = typeof adapter?.id === 'string' && adapter.id.trim().length > 0 ? adapter.id.trim() : '';
35
- if (!id || seen.has(id))
36
- continue;
37
- seen.add(id);
38
- uris.push(`squadrules://adapter/${id}`);
39
- }
40
- const nextOffset = page?.next_page_offset;
41
- offset = typeof nextOffset === 'string' || typeof nextOffset === 'number' ? nextOffset : undefined;
42
- } while (offset !== null && offset !== undefined);
18
+ for (const { payload } of records) {
19
+ const id = typeof payload.adapter?.id === 'string' && payload.adapter.id.trim().length > 0
20
+ ? payload.adapter.id.trim()
21
+ : '';
22
+ if (!id || seen.has(id))
23
+ continue;
24
+ seen.add(id);
25
+ uris.push(`squadrules://adapter/${id}`);
26
+ }
43
27
  return uris;
44
28
  }
45
29
  //# sourceMappingURL=enumerate-space-adapters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enumerate-space-adapters.js","sourceRoot":"","sources":["../../../src/tools/skill-export/enumerate-space-adapters.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,WAA8B,EAAE,OAAe;IAC1F,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;IAC7D,MAAM,MAAM,GAAG,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,MAAmC,CAAC;IACxC,GAAG,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;YAC3C,MAAM;YACN,KAAK,EAAE,YAAY;YACnB,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC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AAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B;AAwHD;;;GAGG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,iBAAiB,EAC9B,OAAO,GAAE;IAAE,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC9E,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC,CAclC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,iBAAiB,EAAE,OAAO,GAAE,qBAA0B,GAAG,IAAI,CA2DzH"}
@@ -5,7 +5,6 @@
5
5
  import { resolveToolDoc } from '../utils/mcp-tool-doc-runtime.js';
6
6
  import { mcpToolCalls, mcpToolDuration, mcpToolErrors, mcpToolInputSize, mcpToolOutputSize } from '../services/metrics/mcp-metrics.js';
7
7
  import { getTenantId, getSpaceContextFromStorage } from '../utils/tenant-context.js';
8
- import { buildSpaceFilter } from '../utils/space-filter.js';
9
8
  import { spaceIdToDisplayName, spaceKindFromSpaceId } from '../utils/space-display.js';
10
9
  import { SQUADRULES_APP_SPACE_ID } from '../config.js';
11
10
  import { SQUADRULES_SPACES_TOOL_UI_META } from '../mcp-apps/squadrules-ui-constants.js';
@@ -33,18 +32,6 @@ function getSpacesToReport() {
33
32
  const allowed = ctx.allowedSpaceIds;
34
33
  return dedupeSpaceIds([...allowed, SQUADRULES_APP_SPACE_ID]);
35
34
  }
36
- async function scrollSpace(client, collection, spaceId) {
37
- const filter = buildSpaceFilter([spaceId]);
38
- const scrollClient = client;
39
- const result = await scrollClient.scroll(collection, {
40
- filter,
41
- limit: SCROLL_LIMIT,
42
- with_payload: true,
43
- with_vector: false
44
- });
45
- const points = result?.points ?? [];
46
- return points;
47
- }
48
35
  function buildSpaceInfo(spaceId, points, includeAdapterTitles, includeArtifacts, spaceNamesById) {
49
36
  const name = spaceIdToDisplayName(spaceId, spaceNamesById);
50
37
  const byAdapter = new Map();
@@ -140,10 +127,10 @@ export async function executeSpaces(memoryStore, options = {}) {
140
127
  const includeArtifacts = options.include_artifacts ?? false;
141
128
  const ctx = getSpaceContextFromStorage();
142
129
  const spaceIds = getSpacesToReport();
143
- const { client, collection } = memoryStore.getQdrantAccess();
144
130
  const spaces = [];
145
131
  for (const spaceId of spaceIds) {
146
- const points = await scrollSpace(client, collection, spaceId);
132
+ const records = await memoryStore.scrollSpace(spaceId, { paginate: false, limit: SCROLL_LIMIT });
133
+ const points = records.map((record) => ({ id: record.uuid, payload: record.payload }));
147
134
  spaces.push(buildSpaceInfo(spaceId, points, includeAdapterTitles || includeArtifacts, includeArtifacts, ctx.spaceNamesById));
148
135
  }
149
136
  return { spaces };
@@ -1 +1 @@
1
- {"version":3,"file":"spaces.js","sourceRoot":"","sources":["../../src/tools/spaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACv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;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- import{g as e,y as t}from"./vendor-DGTQ2S8W.js";import{t as n}from"./react-CR5VJ85Q.js";import{n as r,r as i,t as a}from"./index-BlCipoHI.js";import{t as o}from"./api-BgTb-tmJ.js";async function s(){let e=await o(`/api/me`);if(!e.ok){let t=await e.json().catch(()=>({})),n=Error(t.message??e.statusText);throw n.statusCode=e.status,n}return e.json()}function c(){return e({queryKey:[`me`],queryFn:s,retry:!1})}var l=n(),u={light:`account.themeOptionLight`,dark:`account.themeOptionDark`};function d(e){if(e.name&&e.name.trim().length>0)return e.name;let t=[e.given_name,e.family_name].filter(e=>typeof e==`string`&&e.trim().length>0);return t.length>0?t.join(` `):e.preferred_username&&e.preferred_username.length>0?e.preferred_username:e.sub}function f(){let{t:e}=t(),{data:n,isLoading:o,isError:s}=c(),{preference:f,setPreference:p}=i();return o?(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`account.loading`)}):s||!n?(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-4`,children:e(`account.title`)}),(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`account.notSignedIn`)}),(0,l.jsx)(`a`,{href:`/auth/callback`,className:`mt-4 min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`account.signIn`)})]}):(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-6`,children:e(`account.title`)}),(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)] mb-6`,children:e(`account.intro`)}),(0,l.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-6`,children:[(0,l.jsxs)(`div`,{className:`mb-6 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4`,children:[(0,l.jsx)(`h2`,{className:`mb-1 text-base font-semibold text-[var(--color-text-heading)]`,children:e(`account.themeTitle`)}),(0,l.jsx)(`p`,{className:`mb-3 text-sm text-[var(--color-text-muted)]`,children:e(`account.themeDescription`)}),(0,l.jsx)(`label`,{htmlFor:`account-theme-preference`,className:`sr-only`,children:e(`account.themePreferenceLabel`)}),(0,l.jsxs)(`select`,{id:`account-theme-preference`,value:f,onChange:e=>{let t=e.target.value;r(t)&&p(t)},className:`min-h-[44px] w-full max-w-xs rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2 text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:[(0,l.jsx)(`option`,{value:`system`,children:e(`account.themeOptionSystem`)}),a.map(t=>(0,l.jsx)(`option`,{value:t,children:e(u[t])},t))]})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.name`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:d(n)})]}),n.preferred_username&&n.preferred_username!==d(n)&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.username`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.preferred_username})]}),n.email&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.email`)}),(0,l.jsxs)(`span`,{className:`text-[var(--color-text-heading)]`,children:[n.email,n.email_verified===!0?` (${e(`account.emailVerified`)})`:``]})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.accountType`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.account_label})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.realm`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.realm})]}),n.identity_provider&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.identityProvider`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.identity_provider})]}),n.groups.length>0&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.groups`)}),(0,l.jsx)(`ul`,{className:`list-disc list-inside text-[var(--color-text-heading)] space-y-1`,children:n.groups.map(e=>(0,l.jsx)(`li`,{children:e},e))})]}),(0,l.jsx)(`div`,{className:`mt-6 flex gap-2 flex-wrap`,children:(0,l.jsx)(`a`,{href:`/auth/logout`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium border border-[var(--color-border)] text-[var(--color-text)] bg-transparent no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`account.logOut`)})})]})]})}export{f as AccountPage};
1
+ import{g as e,y as t}from"./vendor-DGTQ2S8W.js";import{t as n}from"./react-CR5VJ85Q.js";import{n as r,r as i,t as a}from"./index-DL3-JTk4.js";import{t as o}from"./api-BgTb-tmJ.js";async function s(){let e=await o(`/api/me`);if(!e.ok){let t=await e.json().catch(()=>({})),n=Error(t.message??e.statusText);throw n.statusCode=e.status,n}return e.json()}function c(){return e({queryKey:[`me`],queryFn:s,retry:!1})}var l=n(),u={light:`account.themeOptionLight`,dark:`account.themeOptionDark`};function d(e){if(e.name&&e.name.trim().length>0)return e.name;let t=[e.given_name,e.family_name].filter(e=>typeof e==`string`&&e.trim().length>0);return t.length>0?t.join(` `):e.preferred_username&&e.preferred_username.length>0?e.preferred_username:e.sub}function f(){let{t:e}=t(),{data:n,isLoading:o,isError:s}=c(),{preference:f,setPreference:p}=i();return o?(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`account.loading`)}):s||!n?(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-4`,children:e(`account.title`)}),(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`account.notSignedIn`)}),(0,l.jsx)(`a`,{href:`/auth/callback`,className:`mt-4 min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`account.signIn`)})]}):(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-6`,children:e(`account.title`)}),(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)] mb-6`,children:e(`account.intro`)}),(0,l.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-6`,children:[(0,l.jsxs)(`div`,{className:`mb-6 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4`,children:[(0,l.jsx)(`h2`,{className:`mb-1 text-base font-semibold text-[var(--color-text-heading)]`,children:e(`account.themeTitle`)}),(0,l.jsx)(`p`,{className:`mb-3 text-sm text-[var(--color-text-muted)]`,children:e(`account.themeDescription`)}),(0,l.jsx)(`label`,{htmlFor:`account-theme-preference`,className:`sr-only`,children:e(`account.themePreferenceLabel`)}),(0,l.jsxs)(`select`,{id:`account-theme-preference`,value:f,onChange:e=>{let t=e.target.value;r(t)&&p(t)},className:`min-h-[44px] w-full max-w-xs rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2 text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:[(0,l.jsx)(`option`,{value:`system`,children:e(`account.themeOptionSystem`)}),a.map(t=>(0,l.jsx)(`option`,{value:t,children:e(u[t])},t))]})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.name`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:d(n)})]}),n.preferred_username&&n.preferred_username!==d(n)&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.username`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.preferred_username})]}),n.email&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.email`)}),(0,l.jsxs)(`span`,{className:`text-[var(--color-text-heading)]`,children:[n.email,n.email_verified===!0?` (${e(`account.emailVerified`)})`:``]})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.accountType`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.account_label})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.realm`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.realm})]}),n.identity_provider&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.identityProvider`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.identity_provider})]}),n.groups.length>0&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.groups`)}),(0,l.jsx)(`ul`,{className:`list-disc list-inside text-[var(--color-text-heading)] space-y-1`,children:n.groups.map(e=>(0,l.jsx)(`li`,{children:e},e))})]}),(0,l.jsx)(`div`,{className:`mt-6 flex gap-2 flex-wrap`,children:(0,l.jsx)(`a`,{href:`/auth/logout`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium border border-[var(--color-border)] text-[var(--color-text)] bg-transparent no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`account.logOut`)})})]})]})}export{f as AccountPage};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,m as n,p as r,t as i,y as a}from"./vendor-DGTQ2S8W.js";import{i as o,t as s}from"./react-CR5VJ85Q.js";import{t as c}from"./api-BgTb-tmJ.js";import{r as l,t as u}from"./SpaceSelect-DDhPkDXU.js";import{t as d}from"./SurfaceCard-CRidnDLP.js";import{a as f,i as p,n as m,o as h,r as g,s as _,t as v}from"./export-skill-zip-C1bRyhE2.js";import{t as y}from"./ChallengeCard-gY-n7rwI.js";import{t as b}from"./RichTextEditor-uun0UIVc.js";var x=e(o(),1),S=i().min(1,`Protocol content is required`).refine(e=>e.includes(`# `),`Protocol must have an H1 title`).refine(e=>/(^|\n)##\s+Activation Patterns\b/i.test(e),`Include an "Activation Patterns" section (H2)`).refine(e=>/(^|\n)##\s+Reward Signal\b/i.test(e),`Include a "Reward Signal" section (H2)`),C={label:`Step`,bodyMarkdown:`What the user or agent does in this step.`,type:`comment`,comment:{min_length:10}},w=[`shell`,`mcp`,`user_input`,`comment`],T=/^squadrules:\/\/adapter\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,E=s();function D({t:e,fileInputRef:n,onUpload:r,isNew:i,decodedUri:a}){return(0,E.jsx)(d,{className:`mb-8`,title:e(`protocolEdit.importCardTitle`),subtitle:e(`protocolEdit.uploadHint`),children:(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(`input`,{ref:n,type:`file`,accept:`.md,text/markdown`,onChange:r,className:`sr-only`,id:`protocol-upload`,"aria-label":e(`protocolEdit.upload`)}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>n.current?.click(),className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocolEdit.upload`)}),!i&&a&&(0,E.jsx)(t,{to:`/protocols/${encodeURIComponent(a)}/skill`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocol.editAsSkill`)})]})})}function O({t:e,preview:n,skillFolderSlug:r,isNew:i,decodedUri:a}){let[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(null);return(0,E.jsxs)(`div`,{className:`space-y-4`,"aria-label":e(`protocolEdit.previewLabel`),children:[(0,E.jsxs)(d,{title:e(`protocolEdit.previewRenderedTitle`),subtitle:e(`protocolEdit.previewRenderedSubtitle`),children:[(0,E.jsx)(`div`,{className:`text-lg font-semibold text-[var(--color-text-heading)]`,children:n.title}),(0,E.jsx)(`div`,{className:`mt-3 space-y-3`,children:n.steps.length===0?(0,E.jsx)(`div`,{className:`text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.previewNoSteps`)}):n.steps.slice(0,20).map((t,n)=>(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--color-border)] bg-[var(--color-surface)] p-3`,children:[(0,E.jsx)(`div`,{className:`font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.previewStepLine`,{n:n+1,label:t.label})}),(0,E.jsx)(`div`,{className:`mt-1 text-sm text-[var(--color-text-muted)]`,children:y[t.type]??t.type})]},`${t.label}:${n}`))}),(0,E.jsxs)(`div`,{className:`mt-4 border-t border-[var(--color-border)] pt-4 text-sm text-[var(--color-text-muted)]`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`strong`,{className:`text-[var(--color-text-heading)]`,children:[e(`protocol.triggers`),`:`]}),` `,n.triggers?e(`protocolEdit.present`):e(`protocolEdit.missing`)]}),(0,E.jsxs)(`div`,{className:`mt-1`,children:[(0,E.jsxs)(`strong`,{className:`text-[var(--color-text-heading)]`,children:[e(`protocol.completion`),`:`]}),` `,n.completion?e(`protocolEdit.present`):e(`protocolEdit.missing`)]})]})]}),!i&&a?(0,E.jsxs)(d,{title:e(`protocolEdit.skillShortcutTitle`),subtitle:e(`protocolEdit.skillShortcutSubtitle`),children:[(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-3`,children:[(0,E.jsxs)(`div`,{className:`font-medium text-[var(--color-text-heading)]`,children:[r,`-skill/`]}),(0,E.jsxs)(`div`,{className:`mt-2 font-mono text-sm text-[var(--color-text-muted)]`,children:[`Skill.md`,(0,E.jsx)(`br`,{}),`references/`,(0,E.jsx)(`br`,{}),`\xA0\xA0SQUADRULES.md`]})]}),(0,E.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,E.jsx)(t,{to:`/protocols/${encodeURIComponent(a)}/skill`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocol.editAsSkill`)}),(0,E.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>{(async()=>{if(a){l(null),s(!0);try{let{blob:e,skill_bundle_manifest:t}=await v(a),n=m(t,r);g(e,n)}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}}})()},className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-60`,children:e(`protocol.downloadAsSkill`)}),c?(0,E.jsx)(`p`,{className:`mt-2 m-0 text-xs text-[var(--color-error)]`,role:`alert`,children:c}):null]})]}):null]})}function k({t:e,isNew:t,spaces:n,spacesLoading:r,targetSpace:i,setTargetSpace:a,forkSourceUri:o,setForkSourceUri:s,moveSpace:c,setMoveSpace:l}){return(0,E.jsx)(`section`,{className:`mb-8 space-y-5 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-5`,children:t?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-target-space`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.targetSpaceLabel`)}),(0,E.jsx)(u,{id:`protocol-target-space`,spaces:n,value:i,onChange:a,disabled:r}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.targetSpaceHint`)})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-fork-source`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.forkSourceLabel`)}),(0,E.jsx)(`input`,{id:`protocol-fork-source`,type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:e(`protocolEdit.forkSourcePlaceholder`),autoComplete:`off`,className:`min-h-[44px] w-full max-w-2xl rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.forkSourceHint`)})]})]}):(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-move-space`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.moveSpaceLabel`)}),(0,E.jsx)(u,{id:`protocol-move-space`,spaces:n,value:c,onChange:l,disabled:r}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.moveSpaceHint`)})]})})}var A=`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,j=`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`;function M({t:e,step:t,index:n,stepsLength:r,uploadKey:i,challengeTypeLabel:a,setStep:o,removeStep:s}){return(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-5 space-y-5`,children:[(0,E.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-2`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.stepHeading`,{n:n+1})}),(0,E.jsx)(`div`,{className:`text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.stepEditorHint`)})]}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>s(n),disabled:r<=1,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-50`,children:e(`protocolEdit.removeStep`)})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.stepLabel`)}),(0,E.jsx)(`input`,{type:`text`,value:t.label,onChange:e=>o(n,{label:e.target.value}),className:A})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`mb-2 font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.challengeType`)}),(0,E.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:w.map(e=>(0,E.jsx)(`button`,{type:`button`,"aria-pressed":t.type===e,onClick:()=>o(n,{type:e,shell:e===`shell`?{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}:void 0,mcp:e===`mcp`?{tool_name:t.mcp?.tool_name??``}:void 0,user_input:e===`user_input`?{prompt:t.user_input?.prompt??``}:void 0,comment:e===`comment`?{min_length:t.comment?.min_length??10}:void 0}),className:`min-h-[44px] rounded-[var(--radius-md)] px-4 text-sm font-medium ${t.type===e?`bg-[var(--color-primary)] text-white`:`border border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)]`}`,children:a[e]},e))})]}),(0,E.jsx)(`div`,{children:(0,E.jsx)(b,{label:e(`protocolEdit.stepContent`),value:t.bodyMarkdown,onChange:e=>o(n,{bodyMarkdown:e}),contentKey:i})}),(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4`,children:[(0,E.jsx)(`div`,{className:`mb-3 text-sm font-medium text-[var(--color-text-heading)]`,children:`Challenge fields`}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[t.type===`shell`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellCmd`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.cmd??``,onChange:e=>o(n,{shell:{cmd:e.target.value,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellTimeout`)}),(0,E.jsx)(`input`,{type:`number`,min:1,value:t.shell?.timeout_seconds??30,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:Math.max(1,Number(e.target.value)||30),interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellInterpreter`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.interpreter??``,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:e.target.value||void 0,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellWorkdir`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.workdir??``,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:e.target.value||void 0,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellFlags`)}),(0,E.jsx)(`textarea`,{rows:3,value:(t.shell?.flags??[]).join(`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,m as n,p as r,t as i,y as a}from"./vendor-DGTQ2S8W.js";import{i as o,t as s}from"./react-CR5VJ85Q.js";import{t as c}from"./api-BgTb-tmJ.js";import{r as l,t as u}from"./SpaceSelect-DDhPkDXU.js";import{t as d}from"./SurfaceCard-CRidnDLP.js";import{a as f,i as p,n as m,o as h,r as g,s as _,t as v}from"./export-skill-zip-C1bRyhE2.js";import{t as y}from"./ChallengeCard-gY-n7rwI.js";import{t as b}from"./RichTextEditor-Bj6JxHM5.js";var x=e(o(),1),S=i().min(1,`Protocol content is required`).refine(e=>e.includes(`# `),`Protocol must have an H1 title`).refine(e=>/(^|\n)##\s+Activation Patterns\b/i.test(e),`Include an "Activation Patterns" section (H2)`).refine(e=>/(^|\n)##\s+Reward Signal\b/i.test(e),`Include a "Reward Signal" section (H2)`),C={label:`Step`,bodyMarkdown:`What the user or agent does in this step.`,type:`comment`,comment:{min_length:10}},w=[`shell`,`mcp`,`user_input`,`comment`],T=/^squadrules:\/\/adapter\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,E=s();function D({t:e,fileInputRef:n,onUpload:r,isNew:i,decodedUri:a}){return(0,E.jsx)(d,{className:`mb-8`,title:e(`protocolEdit.importCardTitle`),subtitle:e(`protocolEdit.uploadHint`),children:(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(`input`,{ref:n,type:`file`,accept:`.md,text/markdown`,onChange:r,className:`sr-only`,id:`protocol-upload`,"aria-label":e(`protocolEdit.upload`)}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>n.current?.click(),className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocolEdit.upload`)}),!i&&a&&(0,E.jsx)(t,{to:`/protocols/${encodeURIComponent(a)}/skill`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocol.editAsSkill`)})]})})}function O({t:e,preview:n,skillFolderSlug:r,isNew:i,decodedUri:a}){let[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(null);return(0,E.jsxs)(`div`,{className:`space-y-4`,"aria-label":e(`protocolEdit.previewLabel`),children:[(0,E.jsxs)(d,{title:e(`protocolEdit.previewRenderedTitle`),subtitle:e(`protocolEdit.previewRenderedSubtitle`),children:[(0,E.jsx)(`div`,{className:`text-lg font-semibold text-[var(--color-text-heading)]`,children:n.title}),(0,E.jsx)(`div`,{className:`mt-3 space-y-3`,children:n.steps.length===0?(0,E.jsx)(`div`,{className:`text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.previewNoSteps`)}):n.steps.slice(0,20).map((t,n)=>(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--color-border)] bg-[var(--color-surface)] p-3`,children:[(0,E.jsx)(`div`,{className:`font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.previewStepLine`,{n:n+1,label:t.label})}),(0,E.jsx)(`div`,{className:`mt-1 text-sm text-[var(--color-text-muted)]`,children:y[t.type]??t.type})]},`${t.label}:${n}`))}),(0,E.jsxs)(`div`,{className:`mt-4 border-t border-[var(--color-border)] pt-4 text-sm text-[var(--color-text-muted)]`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`strong`,{className:`text-[var(--color-text-heading)]`,children:[e(`protocol.triggers`),`:`]}),` `,n.triggers?e(`protocolEdit.present`):e(`protocolEdit.missing`)]}),(0,E.jsxs)(`div`,{className:`mt-1`,children:[(0,E.jsxs)(`strong`,{className:`text-[var(--color-text-heading)]`,children:[e(`protocol.completion`),`:`]}),` `,n.completion?e(`protocolEdit.present`):e(`protocolEdit.missing`)]})]})]}),!i&&a?(0,E.jsxs)(d,{title:e(`protocolEdit.skillShortcutTitle`),subtitle:e(`protocolEdit.skillShortcutSubtitle`),children:[(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-3`,children:[(0,E.jsxs)(`div`,{className:`font-medium text-[var(--color-text-heading)]`,children:[r,`-skill/`]}),(0,E.jsxs)(`div`,{className:`mt-2 font-mono text-sm text-[var(--color-text-muted)]`,children:[`Skill.md`,(0,E.jsx)(`br`,{}),`references/`,(0,E.jsx)(`br`,{}),`\xA0\xA0SQUADRULES.md`]})]}),(0,E.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,E.jsx)(t,{to:`/protocols/${encodeURIComponent(a)}/skill`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocol.editAsSkill`)}),(0,E.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>{(async()=>{if(a){l(null),s(!0);try{let{blob:e,skill_bundle_manifest:t}=await v(a),n=m(t,r);g(e,n)}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}}})()},className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-60`,children:e(`protocol.downloadAsSkill`)}),c?(0,E.jsx)(`p`,{className:`mt-2 m-0 text-xs text-[var(--color-error)]`,role:`alert`,children:c}):null]})]}):null]})}function k({t:e,isNew:t,spaces:n,spacesLoading:r,targetSpace:i,setTargetSpace:a,forkSourceUri:o,setForkSourceUri:s,moveSpace:c,setMoveSpace:l}){return(0,E.jsx)(`section`,{className:`mb-8 space-y-5 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-5`,children:t?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-target-space`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.targetSpaceLabel`)}),(0,E.jsx)(u,{id:`protocol-target-space`,spaces:n,value:i,onChange:a,disabled:r}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.targetSpaceHint`)})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-fork-source`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.forkSourceLabel`)}),(0,E.jsx)(`input`,{id:`protocol-fork-source`,type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:e(`protocolEdit.forkSourcePlaceholder`),autoComplete:`off`,className:`min-h-[44px] w-full max-w-2xl rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.forkSourceHint`)})]})]}):(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-move-space`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.moveSpaceLabel`)}),(0,E.jsx)(u,{id:`protocol-move-space`,spaces:n,value:c,onChange:l,disabled:r}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.moveSpaceHint`)})]})})}var A=`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,j=`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`;function M({t:e,step:t,index:n,stepsLength:r,uploadKey:i,challengeTypeLabel:a,setStep:o,removeStep:s}){return(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-5 space-y-5`,children:[(0,E.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-2`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.stepHeading`,{n:n+1})}),(0,E.jsx)(`div`,{className:`text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.stepEditorHint`)})]}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>s(n),disabled:r<=1,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-50`,children:e(`protocolEdit.removeStep`)})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.stepLabel`)}),(0,E.jsx)(`input`,{type:`text`,value:t.label,onChange:e=>o(n,{label:e.target.value}),className:A})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`mb-2 font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.challengeType`)}),(0,E.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:w.map(e=>(0,E.jsx)(`button`,{type:`button`,"aria-pressed":t.type===e,onClick:()=>o(n,{type:e,shell:e===`shell`?{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}:void 0,mcp:e===`mcp`?{tool_name:t.mcp?.tool_name??``}:void 0,user_input:e===`user_input`?{prompt:t.user_input?.prompt??``}:void 0,comment:e===`comment`?{min_length:t.comment?.min_length??10}:void 0}),className:`min-h-[44px] rounded-[var(--radius-md)] px-4 text-sm font-medium ${t.type===e?`bg-[var(--color-primary)] text-white`:`border border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)]`}`,children:a[e]},e))})]}),(0,E.jsx)(`div`,{children:(0,E.jsx)(b,{label:e(`protocolEdit.stepContent`),value:t.bodyMarkdown,onChange:e=>o(n,{bodyMarkdown:e}),contentKey:i})}),(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4`,children:[(0,E.jsx)(`div`,{className:`mb-3 text-sm font-medium text-[var(--color-text-heading)]`,children:`Challenge fields`}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[t.type===`shell`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellCmd`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.cmd??``,onChange:e=>o(n,{shell:{cmd:e.target.value,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellTimeout`)}),(0,E.jsx)(`input`,{type:`number`,min:1,value:t.shell?.timeout_seconds??30,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:Math.max(1,Number(e.target.value)||30),interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellInterpreter`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.interpreter??``,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:e.target.value||void 0,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellWorkdir`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.workdir??``,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:e.target.value||void 0,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellFlags`)}),(0,E.jsx)(`textarea`,{rows:3,value:(t.shell?.flags??[]).join(`
2
2
  `),onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:e.target.value.split(`
3
3
  `).map(e=>e.trim()).filter(Boolean),args:t.shell?.args??[]}}),className:`w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`})]}),(0,E.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellArgs`)}),(0,E.jsx)(`textarea`,{rows:3,value:(t.shell?.args??[]).join(`
4
4
  `),onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:e.target.value.split(`
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{a as r,c as i,i as a,l as o,n as s,o as c,r as l,s as u,t as d}from"./tiptap-74Cp-fci.js";var f=e(t(),1);function p(){return[c.configure({link:!1,heading:{levels:[2,3,4]}}),u.configure({openOnClick:!1,autolink:!1}),s.configure({resizable:!1}),r,l,a,d.configure({markedOptions:{gfm:!0,breaks:!1}})]}var m=n(),h=`min-h-[11rem] px-4 py-3 text-sm leading-6 text-[var(--color-text)] focus:outline-none prose prose-sm max-w-none [&_table]:my-3 [&_table]:w-full [&_table]:border-collapse [&_th]:border [&_th]:border-[var(--color-border)] [&_th]:bg-[var(--color-surface-elevated)] [&_th]:px-2 [&_th]:py-1.5 [&_td]:border [&_td]:border-[var(--color-border)] [&_td]:px-2 [&_td]:py-1.5`;function g({children:e,className:t=`h-4 w-4`}){return(0,m.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:t,children:e})}function _(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`circle`,{cx:`3`,cy:`4`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,m.jsx)(`circle`,{cx:`3`,cy:`8`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,m.jsx)(`circle`,{cx:`3`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,m.jsx)(`path`,{d:`M6 4h7`}),(0,m.jsx)(`path`,{d:`M6 8h7`}),(0,m.jsx)(`path`,{d:`M6 12h7`})]})}function v(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M6 10L4.5 11.5a2.5 2.5 0 1 1-3.5-3.5L2.5 6.5`}),(0,m.jsx)(`path`,{d:`M10 6l1.5-1.5a2.5 2.5 0 1 1 3.5 3.5L13.5 9.5`}),(0,m.jsx)(`path`,{d:`M5.5 10.5l5-5`})]})}function y(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M5.5 5.5A2.5 2.5 0 0 0 3 8v2.5h3V8H4.5`}),(0,m.jsx)(`path`,{d:`M11.5 5.5A2.5 2.5 0 0 0 9 8v2.5h3V8h-1.5`})]})}function b(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M6 5.5l2 5-2 5`}),(0,m.jsx)(`path`,{d:`M10 5.5l2 5-2 5`})]})}function x(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M6 4L2.5 8L6 12`}),(0,m.jsx)(`path`,{d:`M10 4l3.5 4L10 12`}),(0,m.jsx)(`path`,{d:`M8.75 3.5L7.25 12.5`})]})}function S(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M2 3h12v2H2V3z`}),(0,m.jsx)(`path`,{d:`M2 7h12v1H2V7z`}),(0,m.jsx)(`path`,{d:`M2 11h12v1H2v-1z`}),(0,m.jsx)(`path`,{d:`M2 15h12v1H2v-1z`}),(0,m.jsx)(`path`,{d:`M2 4v11`}),(0,m.jsx)(`path`,{d:`M6 4v11`}),(0,m.jsx)(`path`,{d:`M10 4v11`}),(0,m.jsx)(`path`,{d:`M14 4v11`})]})}function C({label:e,ariaLabel:t,active:n,onClick:r}){return(0,m.jsx)(`button`,{type:`button`,"aria-label":t,title:t,onClick:r,className:`inline-flex min-h-[36px] min-w-[36px] items-center justify-center rounded-[var(--radius-sm)] border px-3 text-xs font-medium transition-colors ${n?`border-[var(--color-primary)] bg-[var(--color-primary)] text-white`:`border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text-muted)] hover:bg-[var(--color-surface)] hover:text-[var(--color-text)]`}`,children:e})}function w({editor:e}){return e?(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface-elevated)] px-3 py-2`,children:[(0,m.jsx)(C,{label:(0,m.jsx)(`span`,{className:`text-base leading-none`,children:`¶`}),ariaLabel:`Paragraph`,active:e.isActive(`paragraph`),onClick:()=>e.chain().focus().setParagraph().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(`strong`,{className:`text-sm font-semibold`,children:`B`}),ariaLabel:`Bold`,active:e.isActive(`bold`),onClick:()=>e.chain().focus().toggleBold().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(`em`,{className:`text-sm`,children:`I`}),ariaLabel:`Italic`,active:e.isActive(`italic`),onClick:()=>e.chain().focus().toggleItalic().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(_,{}),ariaLabel:`Bullet list`,active:e.isActive(`bulletList`),onClick:()=>e.chain().focus().toggleBulletList().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(`span`,{className:`text-sm font-semibold`,children:`1.`}),ariaLabel:`Numbered list`,active:e.isActive(`orderedList`),onClick:()=>e.chain().focus().toggleOrderedList().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(v,{}),ariaLabel:`Link`,active:e.isActive(`link`),onClick:()=>{let t=e.getAttributes(`link`).href,n=window.prompt(`Enter URL`,t??`https://`);if(n==null)return;let r=n.trim();if(!r){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange(`link`).setLink({href:r}).run()}}),(0,m.jsx)(C,{label:(0,m.jsx)(y,{}),ariaLabel:`Quote`,active:e.isActive(`blockquote`),onClick:()=>e.chain().focus().toggleBlockquote().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(b,{}),ariaLabel:`Inline code`,active:e.isActive(`code`),onClick:()=>e.chain().focus().toggleCode().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(x,{}),ariaLabel:`Code block`,active:e.isActive(`codeBlock`),onClick:()=>e.chain().focus().toggleCodeBlock().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(S,{}),ariaLabel:`Insert table`,active:e.isActive(`table`),onClick:()=>e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()})]}):null}function T({value:e,onChange:t,label:n,hint:r,id:a,contentKey:s}){let c=(0,f.useRef)(s),l=(0,f.useRef)(null),u=(0,f.useRef)(e),d=(0,f.useRef)(t);u.current=e,d.current=t;let g=o({key:s??`default`,immediatelyRender:!1,extensions:p(),content:e,contentType:`markdown`,editorProps:{attributes:{class:h}},onUpdate:({editor:e})=>{let t=e.getMarkdown?.()??``;l.current=t,t!==u.current&&d.current(t)}});return(0,f.useEffect)(()=>{if(g){if(s!==c.current){c.current=s,l.current=e,g.commands.setContent(e,!1,{contentType:`markdown`});return}e!==l.current&&(l.current=e,g.commands.setContent(e,!1,{contentType:`markdown`}))}},[s,e,g]),(0,m.jsxs)(`div`,{children:[n&&(0,m.jsx)(`label`,{htmlFor:a,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:n}),(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)]`,children:[(0,m.jsx)(w,{editor:g}),(0,m.jsx)(i,{editor:g})]}),r&&(0,m.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:r})]})}export{T as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{a as r,c as i,i as a,l as o,n as s,o as c,r as l,s as u,t as d}from"./tiptap-74Cp-fci.js";var f=e(t(),1);function p(){return[c.configure({link:!1,heading:{levels:[2,3,4]}}),u.configure({openOnClick:!1,autolink:!1}),s.configure({resizable:!1}),r,l,a,d.configure({markedOptions:{gfm:!0,breaks:!1}})]}var m=n(),h=`min-h-[11rem] px-4 py-3 text-sm leading-6 text-[var(--color-text)] focus:outline-none prose prose-sm max-w-none [&_table]:my-3 [&_table]:w-full [&_table]:border-collapse [&_th]:border [&_th]:border-[var(--color-border)] [&_th]:bg-[var(--color-surface-elevated)] [&_th]:px-2 [&_th]:py-1.5 [&_td]:border [&_td]:border-[var(--color-border)] [&_td]:px-2 [&_td]:py-1.5`;function g({children:e,className:t=`h-4 w-4`}){return(0,m.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:t,children:e})}function _(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`circle`,{cx:`3`,cy:`4`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,m.jsx)(`circle`,{cx:`3`,cy:`8`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,m.jsx)(`circle`,{cx:`3`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,m.jsx)(`path`,{d:`M6 4h7`}),(0,m.jsx)(`path`,{d:`M6 8h7`}),(0,m.jsx)(`path`,{d:`M6 12h7`})]})}function v(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M6 10L4.5 11.5a2.5 2.5 0 1 1-3.5-3.5L2.5 6.5`}),(0,m.jsx)(`path`,{d:`M10 6l1.5-1.5a2.5 2.5 0 1 1 3.5 3.5L13.5 9.5`}),(0,m.jsx)(`path`,{d:`M5.5 10.5l5-5`})]})}function y(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M5.5 5.5A2.5 2.5 0 0 0 3 8v2.5h3V8H4.5`}),(0,m.jsx)(`path`,{d:`M11.5 5.5A2.5 2.5 0 0 0 9 8v2.5h3V8h-1.5`})]})}function b(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M6 5.5l2 5-2 5`}),(0,m.jsx)(`path`,{d:`M10 5.5l2 5-2 5`})]})}function x(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M6 4L2.5 8L6 12`}),(0,m.jsx)(`path`,{d:`M10 4l3.5 4L10 12`}),(0,m.jsx)(`path`,{d:`M8.75 3.5L7.25 12.5`})]})}function S(){return(0,m.jsxs)(g,{children:[(0,m.jsx)(`path`,{d:`M2 3h12v2H2V3z`}),(0,m.jsx)(`path`,{d:`M2 7h12v1H2V7z`}),(0,m.jsx)(`path`,{d:`M2 11h12v1H2v-1z`}),(0,m.jsx)(`path`,{d:`M2 15h12v1H2v-1z`}),(0,m.jsx)(`path`,{d:`M2 4v11`}),(0,m.jsx)(`path`,{d:`M6 4v11`}),(0,m.jsx)(`path`,{d:`M10 4v11`}),(0,m.jsx)(`path`,{d:`M14 4v11`})]})}function C({label:e,ariaLabel:t,active:n,onClick:r}){return(0,m.jsx)(`button`,{type:`button`,"aria-label":t,title:t,onClick:r,className:`inline-flex min-h-[36px] min-w-[36px] items-center justify-center rounded-[var(--radius-sm)] border px-3 text-xs font-medium transition-colors ${n?`border-[var(--color-primary)] bg-[var(--color-primary)] text-white`:`border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text-muted)] hover:bg-[var(--color-surface)] hover:text-[var(--color-text)]`}`,children:e})}function w({editor:e}){return e?(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface-elevated)] px-3 py-2`,children:[(0,m.jsx)(C,{label:(0,m.jsx)(`span`,{className:`text-base leading-none`,children:`¶`}),ariaLabel:`Paragraph`,active:e.isActive(`paragraph`),onClick:()=>e.chain().focus().setParagraph().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(`strong`,{className:`text-sm font-semibold`,children:`B`}),ariaLabel:`Bold`,active:e.isActive(`bold`),onClick:()=>e.chain().focus().toggleBold().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(`em`,{className:`text-sm`,children:`I`}),ariaLabel:`Italic`,active:e.isActive(`italic`),onClick:()=>e.chain().focus().toggleItalic().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(_,{}),ariaLabel:`Bullet list`,active:e.isActive(`bulletList`),onClick:()=>e.chain().focus().toggleBulletList().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(`span`,{className:`text-sm font-semibold`,children:`1.`}),ariaLabel:`Numbered list`,active:e.isActive(`orderedList`),onClick:()=>e.chain().focus().toggleOrderedList().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(v,{}),ariaLabel:`Link`,active:e.isActive(`link`),onClick:()=>{let t=e.getAttributes(`link`).href,n=window.prompt(`Enter URL`,t??`https://`);if(n==null)return;let r=n.trim();if(!r){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange(`link`).setLink({href:r}).run()}}),(0,m.jsx)(C,{label:(0,m.jsx)(y,{}),ariaLabel:`Quote`,active:e.isActive(`blockquote`),onClick:()=>e.chain().focus().toggleBlockquote().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(b,{}),ariaLabel:`Inline code`,active:e.isActive(`code`),onClick:()=>e.chain().focus().toggleCode().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(x,{}),ariaLabel:`Code block`,active:e.isActive(`codeBlock`),onClick:()=>e.chain().focus().toggleCodeBlock().run()}),(0,m.jsx)(C,{label:(0,m.jsx)(S,{}),ariaLabel:`Insert table`,active:e.isActive(`table`),onClick:()=>e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()})]}):null}function T({value:e,onChange:t,label:n,hint:r,id:a,contentKey:s}){let c=(0,f.useRef)(s),l=(0,f.useRef)(null),u=(0,f.useRef)(e),d=(0,f.useRef)(t);u.current=e,d.current=t;let g=o({immediatelyRender:!1,extensions:p(),content:e,contentType:`markdown`,editorProps:{attributes:{class:h}},onUpdate:({editor:e})=>{let t=e.getMarkdown?.()??``;l.current=t,t!==u.current&&d.current(t)}});return(0,f.useEffect)(()=>{if(g){if(s!==c.current){c.current=s,l.current=e,g.commands.setContent(e,{emitUpdate:!1,contentType:`markdown`});return}e!==l.current&&(l.current=e,g.commands.setContent(e,{emitUpdate:!1,contentType:`markdown`}))}},[s,e,g]),(0,m.jsxs)(`div`,{children:[n&&(0,m.jsx)(`label`,{htmlFor:a,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:n}),(0,m.jsxs)(`div`,{className:`overflow-hidden rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)]`,children:[(0,m.jsx)(w,{editor:g}),(0,m.jsx)(i,{editor:g})]}),r&&(0,m.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:r})]})}export{T as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,m as n,y as r}from"./vendor-DGTQ2S8W.js";import{i,t as a}from"./react-CR5VJ85Q.js";import{t as o}from"./SurfaceCard-CRidnDLP.js";import{a as s,n as c,r as l,s as u,t as d}from"./export-skill-zip-C1bRyhE2.js";import{t as f}from"./RichTextEditor-uun0UIVc.js";var p=e(i(),1),m=a();function h(e){return`min-h-[44px] rounded-full px-4 text-sm font-medium ${e?`bg-[var(--color-primary)] text-white`:`border border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)]`}`}function g(){let{t:e}=r(),{uri:i}=n(),{data:a,isLoading:g,isError:_,error:v}=u(i?decodeURIComponent(i):void 0,!0),[y,b]=(0,p.useState)(``),[x,S]=(0,p.useState)(``),[C,w]=(0,p.useState)(``),[T,E]=(0,p.useState)(!0),[D,O]=(0,p.useState)(!1),[k,A]=(0,p.useState)(null);if(g&&!a)return(0,m.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`protocol.loading`)});if(_||!a)return(0,m.jsxs)(`div`,{role:`alert`,className:`rounded-[var(--radius-md)] bg-[var(--color-error-bg)] p-4 text-[var(--color-error)]`,children:[v instanceof Error?v.message:e(`protocol.notFound`),(0,m.jsx)(t,{to:`/`,className:`mt-2 block text-[var(--color-primary)] underline hover:no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`notFound.goHome`)})]});let{title:j}=s(a.content),M=(y.trim()||j).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-|-$/g,``)||`skill`,N=`${M}-skill`,P=async()=>{A(null),O(!0);try{let{blob:e,skill_bundle_manifest:t}=await d(a.uri),n=c(t,M);l(e,n)}catch(e){A(e instanceof Error?e.message:String(e))}finally{O(!1)}};return(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h1`,{className:`mb-1 text-2xl font-semibold text-[var(--color-text-heading)]`,children:e(`skill.title`)}),(0,m.jsx)(`p`,{className:`mb-6 text-sm text-[var(--color-text-muted)]`,children:e(`skill.subtitle`)}),(0,m.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[1.3fr_1fr]`,children:[(0,m.jsxs)(`div`,{className:`space-y-4`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`label`,{htmlFor:`skill-name`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`skill.skillName`)}),(0,m.jsx)(`input`,{id:`skill-name`,type:`text`,value:y,onChange:e=>b(e.target.value),placeholder:j,className:`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`})]}),(0,m.jsx)(f,{label:e(`skill.description`),hint:e(`skill.descriptionHint`),value:x,onChange:S,contentKey:`skill-desc`}),(0,m.jsx)(f,{label:e(`skill.whenToUse`),value:C,onChange:w,contentKey:`skill-when`}),(0,m.jsx)(o,{title:e(`skill.bundleContentsTitle`),subtitle:e(`skill.bundleContentsSubtitle`),children:(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,m.jsx)(`button`,{type:`button`,"aria-pressed":T,onClick:()=>E(e=>!e),className:h(T),children:e(`skill.includeReferences`)}),(0,m.jsx)(`button`,{type:`button`,disabled:!0,className:`${h(!1)} cursor-not-allowed opacity-50`,title:e(`skill.comingSoon`),children:e(`skill.chipReadme`)}),(0,m.jsx)(`button`,{type:`button`,disabled:!0,className:`${h(!1)} cursor-not-allowed opacity-50`,title:e(`skill.comingSoon`),children:e(`skill.chipPrompts`)})]})}),(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,m.jsx)(`button`,{type:`button`,onClick:()=>void P(),disabled:D,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] bg-[var(--color-primary)] px-4 py-2 font-medium text-white hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-60`,children:e(`skill.downloadAsSkill`)}),k?(0,m.jsx)(`p`,{className:`m-0 text-sm text-[var(--color-error)]`,role:`alert`,children:k}):null,(0,m.jsx)(t,{to:`/protocols/${encodeURIComponent(a.uri)}`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`skill.backToProtocol`)})]})]}),(0,m.jsxs)(`div`,{className:`space-y-4`,children:[(0,m.jsx)(o,{title:e(`skill.bundlePreviewTitle`),subtitle:e(`skill.bundlePreviewSubtitle`),children:(0,m.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4 font-mono text-sm text-[var(--color-text)]`,children:[N,`.zip`,(0,m.jsx)(`br`,{}),`└── `,N,`/`,(0,m.jsx)(`br`,{}),`\xA0\xA0\xA0\xA0├── Skill.md`,(0,m.jsx)(`br`,{}),T?(0,m.jsxs)(m.Fragment,{children:[`\xA0\xA0\xA0\xA0└── references/`,(0,m.jsx)(`br`,{}),`\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0└── SQUADRULES.md`]}):(0,m.jsx)(m.Fragment,{children:`\xA0\xA0\xA0\xA0└── (no references/)`})]})}),(0,m.jsx)(o,{title:e(`skill.whyExportTitle`),subtitle:e(`skill.whyExportSubtitle`),children:(0,m.jsx)(`p`,{className:`m-0 text-sm text-[var(--color-text-muted)]`,children:e(`skill.whyExportBody`)})})]})]})]})}export{g as SkillBundlePage};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,m as n,y as r}from"./vendor-DGTQ2S8W.js";import{i,t as a}from"./react-CR5VJ85Q.js";import{t as o}from"./SurfaceCard-CRidnDLP.js";import{a as s,n as c,r as l,s as u,t as d}from"./export-skill-zip-C1bRyhE2.js";import{t as f}from"./RichTextEditor-Bj6JxHM5.js";var p=e(i(),1),m=a();function h(e){return`min-h-[44px] rounded-full px-4 text-sm font-medium ${e?`bg-[var(--color-primary)] text-white`:`border border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)]`}`}function g(){let{t:e}=r(),{uri:i}=n(),{data:a,isLoading:g,isError:_,error:v}=u(i?decodeURIComponent(i):void 0,!0),[y,b]=(0,p.useState)(``),[x,S]=(0,p.useState)(``),[C,w]=(0,p.useState)(``),[T,E]=(0,p.useState)(!0),[D,O]=(0,p.useState)(!1),[k,A]=(0,p.useState)(null);if(g&&!a)return(0,m.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`protocol.loading`)});if(_||!a)return(0,m.jsxs)(`div`,{role:`alert`,className:`rounded-[var(--radius-md)] bg-[var(--color-error-bg)] p-4 text-[var(--color-error)]`,children:[v instanceof Error?v.message:e(`protocol.notFound`),(0,m.jsx)(t,{to:`/`,className:`mt-2 block text-[var(--color-primary)] underline hover:no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`notFound.goHome`)})]});let{title:j}=s(a.content),M=(y.trim()||j).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-|-$/g,``)||`skill`,N=`${M}-skill`,P=async()=>{A(null),O(!0);try{let{blob:e,skill_bundle_manifest:t}=await d(a.uri),n=c(t,M);l(e,n)}catch(e){A(e instanceof Error?e.message:String(e))}finally{O(!1)}};return(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h1`,{className:`mb-1 text-2xl font-semibold text-[var(--color-text-heading)]`,children:e(`skill.title`)}),(0,m.jsx)(`p`,{className:`mb-6 text-sm text-[var(--color-text-muted)]`,children:e(`skill.subtitle`)}),(0,m.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[1.3fr_1fr]`,children:[(0,m.jsxs)(`div`,{className:`space-y-4`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`label`,{htmlFor:`skill-name`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`skill.skillName`)}),(0,m.jsx)(`input`,{id:`skill-name`,type:`text`,value:y,onChange:e=>b(e.target.value),placeholder:j,className:`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`})]}),(0,m.jsx)(f,{label:e(`skill.description`),hint:e(`skill.descriptionHint`),value:x,onChange:S,contentKey:`skill-desc`}),(0,m.jsx)(f,{label:e(`skill.whenToUse`),value:C,onChange:w,contentKey:`skill-when`}),(0,m.jsx)(o,{title:e(`skill.bundleContentsTitle`),subtitle:e(`skill.bundleContentsSubtitle`),children:(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,m.jsx)(`button`,{type:`button`,"aria-pressed":T,onClick:()=>E(e=>!e),className:h(T),children:e(`skill.includeReferences`)}),(0,m.jsx)(`button`,{type:`button`,disabled:!0,className:`${h(!1)} cursor-not-allowed opacity-50`,title:e(`skill.comingSoon`),children:e(`skill.chipReadme`)}),(0,m.jsx)(`button`,{type:`button`,disabled:!0,className:`${h(!1)} cursor-not-allowed opacity-50`,title:e(`skill.comingSoon`),children:e(`skill.chipPrompts`)})]})}),(0,m.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,m.jsx)(`button`,{type:`button`,onClick:()=>void P(),disabled:D,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] bg-[var(--color-primary)] px-4 py-2 font-medium text-white hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-60`,children:e(`skill.downloadAsSkill`)}),k?(0,m.jsx)(`p`,{className:`m-0 text-sm text-[var(--color-error)]`,role:`alert`,children:k}):null,(0,m.jsx)(t,{to:`/protocols/${encodeURIComponent(a.uri)}`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`skill.backToProtocol`)})]})]}),(0,m.jsxs)(`div`,{className:`space-y-4`,children:[(0,m.jsx)(o,{title:e(`skill.bundlePreviewTitle`),subtitle:e(`skill.bundlePreviewSubtitle`),children:(0,m.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4 font-mono text-sm text-[var(--color-text)]`,children:[N,`.zip`,(0,m.jsx)(`br`,{}),`└── `,N,`/`,(0,m.jsx)(`br`,{}),`\xA0\xA0\xA0\xA0├── Skill.md`,(0,m.jsx)(`br`,{}),T?(0,m.jsxs)(m.Fragment,{children:[`\xA0\xA0\xA0\xA0└── references/`,(0,m.jsx)(`br`,{}),`\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0└── SQUADRULES.md`]}):(0,m.jsx)(m.Fragment,{children:`\xA0\xA0\xA0\xA0└── (no references/)`})]})}),(0,m.jsx)(o,{title:e(`skill.whyExportTitle`),subtitle:e(`skill.whyExportSubtitle`),children:(0,m.jsx)(`p`,{className:`m-0 text-sm text-[var(--color-text-muted)]`,children:e(`skill.whyExportBody`)})})]})]})]})}export{g as SkillBundlePage};
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-B06u5RCw.js","assets/vendor-DGTQ2S8W.js","assets/rolldown-runtime-hePW80VL.js","assets/react-CR5VJ85Q.js","assets/tiptap-74Cp-fci.js","assets/SpaceSelect-DDhPkDXU.js","assets/api-BgTb-tmJ.js","assets/SurfaceCard-CRidnDLP.js","assets/SquadrulesPage-D84vIaBc.js","assets/ErrorAlert-BQMph5Nh.js","assets/RunsPage-4kDF_Ylg.js","assets/useRunSession-BX2U9D53.js","assets/ProtocolEditPage-DIySo-F_.js","assets/export-skill-zip-C1bRyhE2.js","assets/ChallengeCard-gY-n7rwI.js","assets/RichTextEditor-uun0UIVc.js","assets/RunGuidedPage-Bd1bUTBH.js","assets/StepFlowGraph-DsL5lsIq.js","assets/SkillBundlePage-DtOlpupj.js","assets/ProtocolDetailPage-DCw5D34S.js","assets/AccountPage-B0ali9jz.js","assets/NotFoundPage-Dz-PKC4R.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-B06u5RCw.js","assets/vendor-DGTQ2S8W.js","assets/rolldown-runtime-hePW80VL.js","assets/react-CR5VJ85Q.js","assets/tiptap-74Cp-fci.js","assets/SpaceSelect-DDhPkDXU.js","assets/api-BgTb-tmJ.js","assets/SurfaceCard-CRidnDLP.js","assets/SquadrulesPage-D84vIaBc.js","assets/ErrorAlert-BQMph5Nh.js","assets/RunsPage-4kDF_Ylg.js","assets/useRunSession-BX2U9D53.js","assets/ProtocolEditPage-mChBe3JY.js","assets/export-skill-zip-C1bRyhE2.js","assets/ChallengeCard-gY-n7rwI.js","assets/RichTextEditor-Bj6JxHM5.js","assets/RunGuidedPage-Bd1bUTBH.js","assets/StepFlowGraph-DsL5lsIq.js","assets/SkillBundlePage-D1OPKJzA.js","assets/ProtocolDetailPage-DCw5D34S.js","assets/AccountPage-Cbsp2hcC.js","assets/NotFoundPage-Dz-PKC4R.js"])))=>i.map(i=>d[i]);
2
2
  import{r as e}from"./rolldown-runtime-hePW80VL.js";import{_ as t,b as n,c as r,d as i,f as a,i as o,l as s,o as c,u as l,v as u,x as d,y as f}from"./vendor-DGTQ2S8W.js";import{i as p,n as m,t as h}from"./react-CR5VJ85Q.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),d.use(n).init({lng:`en`,fallbackLng:`en`,ns:[`translation`],defaultNS:`translation`,resources:{en:{translation:{"nav.home":`Home`,"nav.squadrules":`Browse`,"nav.create":`Create`,"nav.runs":`Test Run`,"nav.account":`Account`,"layout.squadrulesVersion":`SQUADRULES v{{version}}`,skipToMain:`Skip to main content`,"home.title":`Home`,"home.tagline":`Start from a clear task: browse protocols, create a new workflow, or continue protocol testing.`,"home.findCardTitle":`Find the right protocol`,"home.findCardSubtitle":`Home stays lightweight. Search and deeper discovery live in Browse.`,"home.goToBrowse":`Go to Browse`,"home.cardBrowseTitle":`Browse protocols`,"home.cardBrowseSubtitle":`Search or browse by label.`,"home.cardBrowseCta":`Open Browse`,"home.cardCreateTitle":`Create protocol`,"home.cardCreateSubtitle":`Use the rendered editor to draft a new workflow.`,"home.cardCreateCta":`Create new`,"home.cardRunsTitle":`Test Run`,"home.cardRunsSubtitle":`Resume a saved test run from this device.`,"home.cardRunsCta":`Open Test Run`,"home.spacesHeading":`Spaces`,"home.searchLabel":`Search protocols`,"home.searchPlaceholder":`e.g. deploy and test`,"home.searchHint":`Enter a query to find the best matching protocol. Results open in Browse.`,"home.statsLabel":`Space and protocol counts`,"home.stats.personalProtocols":`—`,"home.stats.personalProtocolsLabel":`Personal protocols`,"home.stats.squadrulesApp":`—`,"home.stats.squadrulesAppLabel":`Squadrules app`,"home.stats.spaces":`—`,"home.stats.spacesLabel":`Spaces`,"home.stats.protocolCount":`{{count}} protocol`,"home.stats.protocolCount_plural":`{{count}} protocols`,"home.ctaPre":`Search and manage protocols in`,"home.ctaSuffix":`.`,"squadrules.title":`Browse`,"squadrules.searchLabel":`Activation query`,"squadrules.searchPlaceholder":`e.g. deploy and test`,"squadrules.searchHint":`Search or browse by label. The default view lists protocols by their label.`,"squadrules.searchHintShort":`Run an activation query to rank the best matches, or browse the list below.`,"squadrules.browseByLabel":`Browse by label`,"squadrules.browseByLetterHint":`Click a letter to list protocols whose title starts with that letter (A–Z).`,"squadrules.letterCount":`Letter {{letter}}, {{count}} protocols`,"squadrules.labelsStartingWith":`Labels starting with {{letter}}`,"squadrules.noLabelsForLetter":`No protocols starting with this letter.`,"squadrules.browseFlatListHint":`Protocols listed by label. This is the default view when you open Browse.`,"squadrules.browseEmpty":`No protocols found in your spaces yet.`,"squadrules.enterQueryHint":`Enter an activation query above to find the best matching protocol. Results appear below.`,"spaces.filterAll":`All spaces`,"spaces.type.personal":`Personal`,"spaces.type.group":`Group`,"spaces.type.app":`App`,"spaces.type.other":`Other`,"squadrules.scopeSpaceLabel":`Limit search to a space`,"squadrules.spaceLabel":`Space`,"squadrules.search":`Activate`,"squadrules.loading":`Activating…`,"squadrules.empty":`No matching protocols found`,"squadrules.foundMatches":`Found {{count}} activation choices (top confidence: {{top}}%). View one, refine the query, or create a new protocol.`,"squadrules.resultsLabel":`Activation results`,"squadrules.score":`Score`,"squadrules.version":`Version`,"squadrules.tagsLabel":`Tags`,"squadrules.refineMeta":`Refine query`,"squadrules.createMeta":`Start from scratch`,"squadrules.view":`View`,"squadrules.viewProtocol":`View {{title}}`,"squadrules.refineSearch":`Refine query`,"squadrules.createNew":`Create new`,"protocol.loading":`Loading protocol…`,"protocol.notFound":`Protocol not found`,"protocol.uri":`URI`,"protocol.spaceLabel":`Space`,"protocol.readOnly":`Read-only`,"protocol.copyUri":`Copy URI`,"protocol.download":`Download`,"protocol.downloadAsMarkdown":`Download as Markdown`,"protocol.downloadAsSkill":`Download as Skill`,"protocol.editAsSkill":`Edit as Skill`,"protocol.expand":`Expand`,"protocol.collapse":`Collapse`,"protocol.edit":`Edit`,"protocol.duplicate":`Duplicate`,"protocol.runGuided":`Test Run`,"protocol.steps":`Steps`,"protocol.stepFlow":`Step flow`,"protocol.exportCardTitle":`Export`,"protocol.exportCardSubtitle":`Clear language replaces internal dump terminology.`,"protocol.exportFooter":`Skill export prepares a portable bundle for external AI tools.`,"protocol.triggers":`Activation patterns`,"protocol.completion":`Reward signal`,"protocol.howToUse":`How to use this protocol`,"protocol.howToUseInProduct":`The public UI helps people read, edit, export, and manually test protocol steps. Live AI execution still happens through MCP or CLI tooling.`,"protocol.howToUseCopy":`Use Test Run from the button above to step through this protocol in the browser. For agents or CLI, use Cursor (MCP) or the command line. See`,"protocol.docsLink":`documentation`,"runs.title":`Test Run`,"runs.subtitle":`Continue a test run you started earlier on this device.`,"runs.empty":`No runs yet.`,"runs.listLabel":`Test Run list`,"runs.status":`Status`,"runs.updated":`Updated`,"runs.stepsDone":`{{count}} steps completed`,"runs.resume":`Resume`,"runs.remove":`Remove`,"run.title":`Test Run`,"run.guidedIntro":`Step through the saved run in the browser and submit the same data the current run flow expects.`,"run.progressHeading":`Progress`,"run.currentStepHeading":`Current step`,"run.challengeHeading":`Challenge`,"run.stepProgress":`Step {{current}} of {{total}}`,"run.sessionBadge":`Active manual test session`,"run.flowStepN":`{{n}}`,"run.copyShellCommand":`Copy command`,"run.adapterUri":`Adapter URI`,"run.backToProtocol":`Back to adapter`,"run.start":`Start run`,"run.starting":`Starting…`,"run.safety.title":`Safe by default`,"run.safety.copy":`This guided run never executes shell commands in your browser. For shell challenges, run the command yourself and paste the real results.`,"run.serverMessage":`Server message`,"run.currentLayer":`Current layer`,"run.layerUri":`Layer URI`,"run.noLayerContent":`(No layer content)`,"run.contract":`Contract`,"run.contractType":`Type`,"run.advanced":`Advanced`,"run.nonce":`Nonce`,"run.proofHash":`Challenge proof_hash`,"run.previousProofHash":`Previous proof_hash`,"run.copy":`Copy`,"run.copied":`Copied`,"run.solution":`Solution`,"run.solutionFormLabel":`Submit solution`,"run.submitStep":`Submit step`,"run.shell.command":`Command`,"run.shell.invocation":`Invocation`,"run.shell.exitCode":`Exit code`,"run.shell.stdout":`Stdout`,"run.shell.stderr":`Stderr`,"run.mcp.toolName":`Tool`,"run.mcp.toolMissing":`(Missing tool name)`,"run.mcp.success":`Success`,"run.mcp.arguments":`Arguments (JSON)`,"run.mcp.result":`Result (JSON)`,"run.userInput.prompt":`Prompt`,"run.userInput.promptMissing":`(Missing prompt)`,"run.userInput.confirmation":`User confirmation`,"run.comment.minLength":`Minimum {{count}} characters`,"run.comment.count":`{{count}} typed`,"run.comment.text":`Comment`,"run.reward.title":`Reward completion`,"run.reward.subtitle":`Finalize the run outcome for reward and export quality.`,"run.reward.outcomeLabel":`Outcome`,"run.reward.success":`Success`,"run.reward.failure":`Failure`,"run.reward.feedback":`Feedback`,"run.reward.submit":`Submit reward`,"run.reward.submitting":`Submitting…`,"run.reward.defaultFeedback":`Completed guided run.`,"run.stepperProgress":`{{completed}} step(s) completed`,"run.history":`History`,"run.historyLabel":`Run history`,"run.completed":`Run completed`,"run.missingUri":`Missing adapter URI.`,"protocolEdit.newTitle":`New protocol`,"protocolEdit.editTitle":`Edit protocol`,"protocolEdit.hint":`Write as a human. The editor renders text on input and output while keeping the saved format compatible with generic Markdown.`,"protocolEdit.stepHeading":`Step {{n}}`,"protocolEdit.stepEditorHint":`Human-friendly editor with Markdown-safe formatting.`,"protocolEdit.triggersEditorHint":`Shown to humans as rendered text and serialized as Markdown-compatible content.`,"protocolEdit.previewRenderedTitle":`Rendered preview`,"protocolEdit.previewRenderedSubtitle":`Reading flow is fully rendered. Editing keeps a Markdown-safe rich text surface and this card previews section structure.`,"protocolEdit.previewStepLine":`Step {{n}}: {{label}}`,"protocolEdit.skillShortcutTitle":`Skill bundle shortcut`,"protocolEdit.skillShortcutSubtitle":`Authors can turn a protocol into a reusable skill bundle without learning repo-internal file names.`,"protocolEdit.formLabel":`Protocol form`,"protocolEdit.protocolLabel":`Protocol label`,"protocolEdit.triggersLabel":`Activation patterns`,"protocolEdit.triggersHint":`Describe when this protocol should run (e.g. deploy and test).`,"protocolEdit.stepLabel":`Step label`,"protocolEdit.stepContent":`Step content`,"protocolEdit.challengeType":`Challenge type`,"protocolEdit.addStep":`Add step`,"protocolEdit.removeStep":`Remove step`,"protocolEdit.completionLabel":`Reward signal`,"protocolEdit.challengeShell":`Shell command`,"protocolEdit.challengeMcp":`MCP tool call`,"protocolEdit.challengeUserInput":`User input`,"protocolEdit.challengeComment":`Comment`,"protocolEdit.shellCmd":`Command`,"protocolEdit.shellTimeout":`Timeout (seconds)`,"protocolEdit.shellInterpreter":`Interpreter (optional)`,"protocolEdit.shellFlags":`Flags (one per line, optional)`,"protocolEdit.shellArgs":`Args (one per line, optional)`,"protocolEdit.shellWorkdir":`Workdir (optional)`,"protocolEdit.mcpToolName":`Tool name`,"protocolEdit.userInputPrompt":`Prompt`,"protocolEdit.commentMinLength":`Minimum length (characters)`,"protocolEdit.importCardTitle":`Import existing content`,"protocolEdit.uploadHint":"Uploading a `.md` file fills this editor form. It does not publish or overwrite anything until you save.","protocolEdit.contentLabel":`Protocol content (markdown)`,"protocolEdit.previewLabel":`Protocol preview`,"protocolEdit.previewTitle":`Live preview`,"protocolEdit.previewSteps":`Steps`,"protocolEdit.previewNoSteps":`No steps yet.`,"protocolEdit.previewSections":`Key sections`,"protocolEdit.present":`present`,"protocolEdit.missing":`missing`,"protocolEdit.insertTemplate":`Insert template`,"protocolEdit.upload":`Upload .md file`,"skill.title":`Edit as Skill`,"skill.subtitle":`Prepare a skill bundle for external AI tools before downloading the zip. Protocol content stays connected to the original workflow.`,"skill.bundleContentsTitle":`Bundle contents`,"skill.bundleContentsSubtitle":`Optional protocol references can be included in a dedicated folder.`,"skill.chipReadme":`Include README snippet`,"skill.chipPrompts":`Include example prompts`,"skill.comingSoon":`Coming soon`,"skill.bundlePreviewTitle":`Bundle preview`,"skill.bundlePreviewSubtitle":`Zip root contains the skill folder so users can upload it directly.`,"skill.whyExportTitle":`Why this export exists`,"skill.whyExportSubtitle":`The bundle is for human-friendly reuse, not an internal raw dump.`,"skill.whyExportBody":`Authors can package a protocol as a portable skill with polished naming and usage guidance, then download the final zip in one step.`,"skill.skillName":`Skill name`,"skill.description":`Skill description`,"skill.descriptionHint":`Describe what the skill does and when an AI assistant should use it.`,"skill.whenToUse":`When to use it`,"skill.includeReferences":`Include references folder`,"skill.downloadAsSkill":`Download as Skill`,"skill.backToProtocol":`Back to protocol`,"protocolEdit.placeholder":`# Protocol title
3
3
 
4
4
  ## Activation Patterns
5
5
  ...
6
6
 
7
7
  ## Step 1
8
- ...`,"protocolEdit.contentHint":`Include: Activation Patterns (first H2), steps (H2 + optional challenge block), Reward Signal (last H2).`,"protocolEdit.targetSpaceLabel":`Save to space`,"protocolEdit.targetSpaceHint":`New protocols are stored in the space you pick (default: Personal).`,"protocolEdit.forkSourceLabel":`Fork from adapter (optional)`,"protocolEdit.forkSourcePlaceholder":`squadrules://adapter/{slug}`,"protocolEdit.forkSourceHint":`Leave empty for a brand-new protocol, or paste an adapter URI to copy its markdown into the target space as a new adapter.`,"protocolEdit.forkUriInvalid":`Fork source must be a squadrules://adapter/{slug} URI.`,"protocolEdit.moveSpaceLabel":`Space for this protocol`,"protocolEdit.moveSpaceHint":`Change the space and save to move every layer to the selected space (same as tune with a space parameter).`,"protocolEdit.save":`Save`,"protocolEdit.saving":`Saving…`,"protocolEdit.cancel":`Cancel`,"account.title":`Account`,"account.intro":`You are signed in. Sign out below or use the options to manage your profile.`,"account.loading":`Loading…`,"account.notSignedIn":`You are not signed in.`,"account.signIn":`Sign in`,"account.name":`Name`,"account.username":`Username`,"account.email":`Email`,"account.emailVerified":`verified`,"account.accountType":`Account type`,"account.realm":`Realm`,"account.identityProvider":`Login provider`,"account.groups":`Groups`,"account.themeTitle":`Theme`,"account.themeDescription":`Choose how SQUADRULES UI appearance should be rendered.`,"account.themePreferenceLabel":`Theme preference`,"account.themeOptionLight":`Light`,"account.themeOptionDark":`Dark`,"account.themeOptionSystem":`Match system`,"account.logOut":`Log out`,"notFound.title":`Page not found`,"notFound.message":`The page you requested could not be found.`,"notFound.goHome":`Go to Home`,"error.title":`Something went wrong`,"error.retry":`Retry`,"error.goBack":`Go to Home`,"error.support":`Support`}}},interpolation:{escapeValue:!1}});var g=e(p(),1),_=m(),v=`/ui/assets/squadrules-mcp-Qc5pokoj.svg`,y=h(),b=e=>e.startsWith(`/protocols`)||e.startsWith(`/runs`);function x(){let{t:e}=f(),t=a().pathname,n=({isActive:e})=>`min-h-[var(--layout-touch-target)] flex items-center px-4 py-3 text-[var(--color-text)] no-underline border-l-[3px] border-transparent outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] hover:bg-[var(--color-surface)] hover:text-[var(--color-text-heading)] ${e?`font-semibold text-[var(--color-primary)] border-l-[var(--color-primary)] bg-[var(--color-surface)]`:``}`,r=b(t)?`min(100%, var(--layout-main-max), var(--layout-main-wide))`:`min(100%, var(--layout-main-max), var(--layout-main-narrow))`;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`a`,{href:`#main`,className:`skip-link`,children:e(`skipToMain`)}),(0,y.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,y.jsxs)(`aside`,{className:`flex min-h-screen w-[var(--layout-sidebar-width)] flex-shrink-0 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface-elevated)] py-4`,"aria-label":`Main navigation`,children:[(0,y.jsx)(`div`,{className:`px-4 pb-4`,children:(0,y.jsxs)(c,{to:`/`,end:!0,className:`flex min-h-[var(--layout-touch-target)] min-w-[var(--layout-touch-target)] items-center gap-3 rounded-md outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)]`,children:[(0,y.jsx)(`img`,{src:v,alt:``,className:`h-10 w-10 flex-shrink-0 rounded-lg object-contain`,width:`40`,height:`40`}),(0,y.jsxs)(`span`,{className:`flex flex-col leading-tight`,children:[(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-heading)] text-lg`,children:`Squadrules`}),(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-muted)] text-xs uppercase tracking-wide`,children:`MCP`})]})]})}),(0,y.jsxs)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5`,children:[(0,y.jsx)(c,{to:`/`,end:!0,"aria-current":t===`/`?`page`:void 0,className:n,children:e(`nav.home`)}),(0,y.jsx)(c,{to:`/squadrules`,"aria-current":t===`/squadrules`?`page`:void 0,className:n,children:e(`nav.squadrules`)}),(0,y.jsx)(c,{to:`/protocols/new`,"aria-current":t===`/protocols/new`?`page`:void 0,className:n,children:e(`nav.create`)}),(0,y.jsx)(c,{to:`/runs`,"aria-current":t===`/runs`?`page`:void 0,className:n,children:e(`nav.runs`)}),(0,y.jsx)(c,{to:`/account`,"aria-current":t===`/account`?`page`:void 0,className:n,children:e(`nav.account`)})]}),(0,y.jsx)(`div`,{className:`mt-auto border-t border-[var(--color-border)] px-4 pt-3`,children:(0,y.jsx)(`p`,{className:`m-0 text-xs text-[var(--color-text-muted)]`,children:e(`layout.squadrulesVersion`,{version:`5.0.0-beta.1`})})})]}),(0,y.jsx)(`main`,{id:`main`,className:`flex-1 mx-auto w-full py-[var(--layout-main-padding-y)] px-[var(--layout-main-padding-x)]`,style:{maxWidth:r},tabIndex:-1,children:(0,y.jsx)(s,{})})]})]})}var S=(0,g.lazy)(()=>r(()=>import(`./HomePage-B06u5RCw.js`).then(e=>({default:e.HomePage})),__vite__mapDeps([0,1,2,3,4,5,6,7]))),C=(0,g.lazy)(()=>r(()=>import(`./SquadrulesPage-D84vIaBc.js`).then(e=>({default:e.SquadrulesPage})),__vite__mapDeps([8,2,1,3,4,6,5,9]))),w=(0,g.lazy)(()=>r(()=>import(`./RunsPage-4kDF_Ylg.js`).then(e=>({default:e.RunsPage})),__vite__mapDeps([10,1,2,3,4,11]))),T=(0,g.lazy)(()=>r(()=>import(`./ProtocolEditPage-DIySo-F_.js`).then(e=>({default:e.ProtocolEditPage})),__vite__mapDeps([12,2,1,3,4,6,5,7,13,14,15]))),E=(0,g.lazy)(()=>r(()=>import(`./RunGuidedPage-Bd1bUTBH.js`).then(e=>({default:e.RunGuidedPage})),__vite__mapDeps([16,2,1,3,4,6,7,9,14,17,11]))),D=(0,g.lazy)(()=>r(()=>import(`./SkillBundlePage-DtOlpupj.js`).then(e=>({default:e.SkillBundlePage})),__vite__mapDeps([18,2,1,3,4,7,13,6,15]))),O=(0,g.lazy)(()=>r(()=>import(`./ProtocolDetailPage-DCw5D34S.js`).then(e=>({default:e.ProtocolDetailPage})),__vite__mapDeps([19,2,1,3,4,7,13,6,14,17]))),k=(0,g.lazy)(()=>r(()=>import(`./AccountPage-B0ali9jz.js`).then(e=>({default:e.AccountPage})),__vite__mapDeps([20,1,2,3,4,6]))),A=(0,g.lazy)(()=>r(()=>import(`./NotFoundPage-Dz-PKC4R.js`).then(e=>({default:e.NotFoundPage})),__vite__mapDeps([21,1,2,3,4,9])));function j(){return(0,y.jsx)(`div`,{className:`flex min-h-[12rem] items-center justify-center text-[var(--color-text-muted)]`,"aria-busy":`true`,children:`Loading…`})}function M(){return(0,y.jsx)(i,{children:(0,y.jsxs)(l,{path:`/`,element:(0,y.jsx)(x,{}),children:[(0,y.jsx)(l,{index:!0,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(S,{})})}),(0,y.jsx)(l,{path:`squadrules`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(C,{})})}),(0,y.jsx)(l,{path:`runs`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(w,{})})}),(0,y.jsx)(l,{path:`protocols/new`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(T,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/edit`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(T,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/run`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(E,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/skill`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(D,{})})}),(0,y.jsx)(l,{path:`protocols/:uri`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(O,{})})}),(0,y.jsx)(l,{path:`account`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(k,{})})}),(0,y.jsx)(l,{path:`*`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(A,{})})})]})})}function N(){return(0,y.jsx)(o,{basename:`/ui`,children:(0,y.jsx)(M,{})})}var P=[`light`,`dark`],F=`squadrules:ui:theme-preference`,I=`(prefers-color-scheme: dark)`,L=`system`;function R(e){return e===null?!1:e===`system`||P.includes(e)}function z(e,t){return e===`system`?t?`dark`:`light`:e}function B(){if(typeof window>`u`)return L;try{let e=window.localStorage.getItem(F);return R(e)?e:L}catch{return L}}function V(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(I).matches}function H(e){if(typeof document>`u`)return;let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e===`light`?`light`:`dark`}function U(){let[e,t]=(0,g.useState)(()=>B()),[n,r]=(0,g.useState)(()=>V()),i=(0,g.useMemo)(()=>z(e,n),[e,n]);return(0,g.useEffect)(()=>{H(i)},[i]),(0,g.useEffect)(()=>{if(typeof window>`u`||e!==`system`||typeof window.matchMedia!=`function`)return;let t=window.matchMedia(I);r(t.matches);let n=e=>{r(e.matches)};return typeof t.addEventListener==`function`?(t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)):(t.addListener(n),()=>t.removeListener(n))},[e]),(0,g.useEffect)(()=>{if(typeof window>`u`)return;let e=e=>{e.key===`squadrules:ui:theme-preference`&&t(R(e.newValue)?e.newValue:L)};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{preference:e,effectiveTheme:i,setPreference:(0,g.useCallback)(e=>{if(t(e),typeof window<`u`)try{window.localStorage.setItem(F,e)}catch{}},[])}}var W=(0,g.createContext)(null);function G({children:e}){let t=U();return(0,y.jsx)(W.Provider,{value:t,children:e})}function K(){let e=(0,g.useContext)(W);if(!e)throw Error(`useThemePreferenceContext must be used within ThemeProvider`);return e}var q=new t;(0,_.createRoot)(document.getElementById(`root`)).render((0,y.jsx)(g.StrictMode,{children:(0,y.jsx)(u,{client:q,children:(0,y.jsx)(G,{children:(0,y.jsx)(N,{})})})}));export{R as n,K as r,P as t};
8
+ ...`,"protocolEdit.contentHint":`Include: Activation Patterns (first H2), steps (H2 + optional challenge block), Reward Signal (last H2).`,"protocolEdit.targetSpaceLabel":`Save to space`,"protocolEdit.targetSpaceHint":`New protocols are stored in the space you pick (default: Personal).`,"protocolEdit.forkSourceLabel":`Fork from adapter (optional)`,"protocolEdit.forkSourcePlaceholder":`squadrules://adapter/{slug}`,"protocolEdit.forkSourceHint":`Leave empty for a brand-new protocol, or paste an adapter URI to copy its markdown into the target space as a new adapter.`,"protocolEdit.forkUriInvalid":`Fork source must be a squadrules://adapter/{slug} URI.`,"protocolEdit.moveSpaceLabel":`Space for this protocol`,"protocolEdit.moveSpaceHint":`Change the space and save to move every layer to the selected space (same as tune with a space parameter).`,"protocolEdit.save":`Save`,"protocolEdit.saving":`Saving…`,"protocolEdit.cancel":`Cancel`,"account.title":`Account`,"account.intro":`You are signed in. Sign out below or use the options to manage your profile.`,"account.loading":`Loading…`,"account.notSignedIn":`You are not signed in.`,"account.signIn":`Sign in`,"account.name":`Name`,"account.username":`Username`,"account.email":`Email`,"account.emailVerified":`verified`,"account.accountType":`Account type`,"account.realm":`Realm`,"account.identityProvider":`Login provider`,"account.groups":`Groups`,"account.themeTitle":`Theme`,"account.themeDescription":`Choose how SQUADRULES UI appearance should be rendered.`,"account.themePreferenceLabel":`Theme preference`,"account.themeOptionLight":`Light`,"account.themeOptionDark":`Dark`,"account.themeOptionSystem":`Match system`,"account.logOut":`Log out`,"notFound.title":`Page not found`,"notFound.message":`The page you requested could not be found.`,"notFound.goHome":`Go to Home`,"error.title":`Something went wrong`,"error.retry":`Retry`,"error.goBack":`Go to Home`,"error.support":`Support`}}},interpolation:{escapeValue:!1}});var g=e(p(),1),_=m(),v=`/ui/assets/squadrules-mcp-Qc5pokoj.svg`,y=h(),b=e=>e.startsWith(`/protocols`)||e.startsWith(`/runs`);function x(){let{t:e}=f(),t=a().pathname,n=({isActive:e})=>`min-h-[var(--layout-touch-target)] flex items-center px-4 py-3 text-[var(--color-text)] no-underline border-l-[3px] border-transparent outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] hover:bg-[var(--color-surface)] hover:text-[var(--color-text-heading)] ${e?`font-semibold text-[var(--color-primary)] border-l-[var(--color-primary)] bg-[var(--color-surface)]`:``}`,r=b(t)?`min(100%, var(--layout-main-max), var(--layout-main-wide))`:`min(100%, var(--layout-main-max), var(--layout-main-narrow))`;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`a`,{href:`#main`,className:`skip-link`,children:e(`skipToMain`)}),(0,y.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,y.jsxs)(`aside`,{className:`flex min-h-screen w-[var(--layout-sidebar-width)] flex-shrink-0 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface-elevated)] py-4`,"aria-label":`Main navigation`,children:[(0,y.jsx)(`div`,{className:`px-4 pb-4`,children:(0,y.jsxs)(c,{to:`/`,end:!0,className:`flex min-h-[var(--layout-touch-target)] min-w-[var(--layout-touch-target)] items-center gap-3 rounded-md outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)]`,children:[(0,y.jsx)(`img`,{src:v,alt:``,className:`h-10 w-10 flex-shrink-0 rounded-lg object-contain`,width:`40`,height:`40`}),(0,y.jsxs)(`span`,{className:`flex flex-col leading-tight`,children:[(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-heading)] text-lg`,children:`Squadrules`}),(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-muted)] text-xs uppercase tracking-wide`,children:`MCP`})]})]})}),(0,y.jsxs)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5`,children:[(0,y.jsx)(c,{to:`/`,end:!0,"aria-current":t===`/`?`page`:void 0,className:n,children:e(`nav.home`)}),(0,y.jsx)(c,{to:`/squadrules`,"aria-current":t===`/squadrules`?`page`:void 0,className:n,children:e(`nav.squadrules`)}),(0,y.jsx)(c,{to:`/protocols/new`,"aria-current":t===`/protocols/new`?`page`:void 0,className:n,children:e(`nav.create`)}),(0,y.jsx)(c,{to:`/runs`,"aria-current":t===`/runs`?`page`:void 0,className:n,children:e(`nav.runs`)}),(0,y.jsx)(c,{to:`/account`,"aria-current":t===`/account`?`page`:void 0,className:n,children:e(`nav.account`)})]}),(0,y.jsx)(`div`,{className:`mt-auto border-t border-[var(--color-border)] px-4 pt-3`,children:(0,y.jsx)(`p`,{className:`m-0 text-xs text-[var(--color-text-muted)]`,children:e(`layout.squadrulesVersion`,{version:`5.0.1`})})})]}),(0,y.jsx)(`main`,{id:`main`,className:`flex-1 mx-auto w-full py-[var(--layout-main-padding-y)] px-[var(--layout-main-padding-x)]`,style:{maxWidth:r},tabIndex:-1,children:(0,y.jsx)(s,{})})]})]})}var S=(0,g.lazy)(()=>r(()=>import(`./HomePage-B06u5RCw.js`).then(e=>({default:e.HomePage})),__vite__mapDeps([0,1,2,3,4,5,6,7]))),C=(0,g.lazy)(()=>r(()=>import(`./SquadrulesPage-D84vIaBc.js`).then(e=>({default:e.SquadrulesPage})),__vite__mapDeps([8,2,1,3,4,6,5,9]))),w=(0,g.lazy)(()=>r(()=>import(`./RunsPage-4kDF_Ylg.js`).then(e=>({default:e.RunsPage})),__vite__mapDeps([10,1,2,3,4,11]))),T=(0,g.lazy)(()=>r(()=>import(`./ProtocolEditPage-mChBe3JY.js`).then(e=>({default:e.ProtocolEditPage})),__vite__mapDeps([12,2,1,3,4,6,5,7,13,14,15]))),E=(0,g.lazy)(()=>r(()=>import(`./RunGuidedPage-Bd1bUTBH.js`).then(e=>({default:e.RunGuidedPage})),__vite__mapDeps([16,2,1,3,4,6,7,9,14,17,11]))),D=(0,g.lazy)(()=>r(()=>import(`./SkillBundlePage-D1OPKJzA.js`).then(e=>({default:e.SkillBundlePage})),__vite__mapDeps([18,2,1,3,4,7,13,6,15]))),O=(0,g.lazy)(()=>r(()=>import(`./ProtocolDetailPage-DCw5D34S.js`).then(e=>({default:e.ProtocolDetailPage})),__vite__mapDeps([19,2,1,3,4,7,13,6,14,17]))),k=(0,g.lazy)(()=>r(()=>import(`./AccountPage-Cbsp2hcC.js`).then(e=>({default:e.AccountPage})),__vite__mapDeps([20,1,2,3,4,6]))),A=(0,g.lazy)(()=>r(()=>import(`./NotFoundPage-Dz-PKC4R.js`).then(e=>({default:e.NotFoundPage})),__vite__mapDeps([21,1,2,3,4,9])));function j(){return(0,y.jsx)(`div`,{className:`flex min-h-[12rem] items-center justify-center text-[var(--color-text-muted)]`,"aria-busy":`true`,children:`Loading…`})}function M(){return(0,y.jsx)(i,{children:(0,y.jsxs)(l,{path:`/`,element:(0,y.jsx)(x,{}),children:[(0,y.jsx)(l,{index:!0,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(S,{})})}),(0,y.jsx)(l,{path:`squadrules`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(C,{})})}),(0,y.jsx)(l,{path:`runs`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(w,{})})}),(0,y.jsx)(l,{path:`protocols/new`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(T,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/edit`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(T,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/run`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(E,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/skill`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(D,{})})}),(0,y.jsx)(l,{path:`protocols/:uri`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(O,{})})}),(0,y.jsx)(l,{path:`account`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(k,{})})}),(0,y.jsx)(l,{path:`*`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(A,{})})})]})})}function N(){return(0,y.jsx)(o,{basename:`/ui`,children:(0,y.jsx)(M,{})})}var P=[`light`,`dark`],F=`squadrules:ui:theme-preference`,I=`(prefers-color-scheme: dark)`,L=`system`;function R(e){return e===null?!1:e===`system`||P.includes(e)}function z(e,t){return e===`system`?t?`dark`:`light`:e}function B(){if(typeof window>`u`)return L;try{let e=window.localStorage.getItem(F);return R(e)?e:L}catch{return L}}function V(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(I).matches}function H(e){if(typeof document>`u`)return;let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e===`light`?`light`:`dark`}function U(){let[e,t]=(0,g.useState)(()=>B()),[n,r]=(0,g.useState)(()=>V()),i=(0,g.useMemo)(()=>z(e,n),[e,n]);return(0,g.useEffect)(()=>{H(i)},[i]),(0,g.useEffect)(()=>{if(typeof window>`u`||e!==`system`||typeof window.matchMedia!=`function`)return;let t=window.matchMedia(I);r(t.matches);let n=e=>{r(e.matches)};return typeof t.addEventListener==`function`?(t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)):(t.addListener(n),()=>t.removeListener(n))},[e]),(0,g.useEffect)(()=>{if(typeof window>`u`)return;let e=e=>{e.key===`squadrules:ui:theme-preference`&&t(R(e.newValue)?e.newValue:L)};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{preference:e,effectiveTheme:i,setPreference:(0,g.useCallback)(e=>{if(t(e),typeof window<`u`)try{window.localStorage.setItem(F,e)}catch{}},[])}}var W=(0,g.createContext)(null);function G({children:e}){let t=U();return(0,y.jsx)(W.Provider,{value:t,children:e})}function K(){let e=(0,g.useContext)(W);if(!e)throw Error(`useThemePreferenceContext must be used within ThemeProvider`);return e}var q=new t;(0,_.createRoot)(document.getElementById(`root`)).render((0,y.jsx)(g.StrictMode,{children:(0,y.jsx)(u,{client:q,children:(0,y.jsx)(G,{children:(0,y.jsx)(N,{})})})}));export{R as n,K as r,P as t};
@@ -26,7 +26,7 @@
26
26
  root.style.colorScheme = theme;
27
27
  })();
28
28
  </script>
29
- <script type="module" crossorigin src="/ui/assets/index-BlCipoHI.js"></script>
29
+ <script type="module" crossorigin src="/ui/assets/index-DL3-JTk4.js"></script>
30
30
  <link rel="modulepreload" crossorigin href="/ui/assets/rolldown-runtime-hePW80VL.js">
31
31
  <link rel="modulepreload" crossorigin href="/ui/assets/react-CR5VJ85Q.js">
32
32
  <link rel="modulepreload" crossorigin href="/ui/assets/tiptap-74Cp-fci.js">
@@ -13,4 +13,14 @@ export declare function getSquadrulesConfigDir(env?: NodeJS.ProcessEnv): string;
13
13
  export declare function getSquadrulesSkillsInstallBaseDir(env?: NodeJS.ProcessEnv): string;
14
14
  /** Suggested install path for one skill slug (e.g. after `export` + unzip). */
15
15
  export declare function getSquadrulesSkillInstallDirForSlug(slug: string, env?: NodeJS.ProcessEnv): string;
16
+ /**
17
+ * Base directory for locally downloaded embedding-model artifacts (fastembed ONNX
18
+ * weights), under the same tree as CLI config and the embedded LanceDB store.
19
+ * Passed to `fastembed` as its `cacheDir`; fastembed owns fetching/verification
20
+ * inside this directory. Created on demand by the downloader, so like the skills
21
+ * base this helper does not `mkdir` eagerly.
22
+ * - Windows: `%APPDATA%\squadrules\models`
23
+ * - Unix: `$XDG_CONFIG_HOME/squadrules/models` or `~/.config/squadrules/models`
24
+ */
25
+ export declare function getSquadrulesModelsDir(env?: NodeJS.ProcessEnv): string;
16
26
  //# sourceMappingURL=squadrules-user-dirs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"squadrules-user-dirs.d.ts","sourceRoot":"","sources":["../../src/utils/squadrules-user-dirs.ts"],"names":[],"mappings":"AAwBA,6CAA6C;AAC7C,wBAAgB,0BAA0B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAEvF;AAMD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAQnF;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE9F;AAED,+EAA+E;AAC/E,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAG9G"}
1
+ {"version":3,"file":"squadrules-user-dirs.d.ts","sourceRoot":"","sources":["../../src/utils/squadrules-user-dirs.ts"],"names":[],"mappings":"AAwBA,6CAA6C;AAC7C,wBAAgB,0BAA0B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAEvF;AAMD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAQnF;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE9F;AAED,+EAA+E;AAC/E,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAG9G;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAEnF"}
@@ -52,4 +52,16 @@ export function getSquadrulesSkillInstallDirForSlug(slug, env = process.env) {
52
52
  const safe = slug.replace(/[/\\]/g, '_');
53
53
  return join(getSquadrulesSkillsInstallBaseDir(env), safe);
54
54
  }
55
+ /**
56
+ * Base directory for locally downloaded embedding-model artifacts (fastembed ONNX
57
+ * weights), under the same tree as CLI config and the embedded LanceDB store.
58
+ * Passed to `fastembed` as its `cacheDir`; fastembed owns fetching/verification
59
+ * inside this directory. Created on demand by the downloader, so like the skills
60
+ * base this helper does not `mkdir` eagerly.
61
+ * - Windows: `%APPDATA%\squadrules\models`
62
+ * - Unix: `$XDG_CONFIG_HOME/squadrules/models` or `~/.config/squadrules/models`
63
+ */
64
+ export function getSquadrulesModelsDir(env = process.env) {
65
+ return join(getSquadrulesConfigDir(env), 'models');
66
+ }
55
67
  //# sourceMappingURL=squadrules-user-dirs.js.map
@@ -1 +1 @@
1
- {"version":3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