@synap-core/workspace-templates 0.72.0 → 0.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3888,6 +3888,20 @@ var DATA = {
3888
3888
  "inputType": "tags",
3889
3889
  "description": "The repositories this work touches, each as <owner>/<repo> (e.g. Synap-core/backend). Set when the work is shaped."
3890
3890
  },
3891
+ {
3892
+ "slug": "workedIn",
3893
+ "label": "Claude Code session",
3894
+ "valueType": "string",
3895
+ "inputType": "text",
3896
+ "description": "Written by the pod: the Claude Code session (<harness>:<conversation id>) that most recently started a session on this work. Read-only."
3897
+ },
3898
+ {
3899
+ "slug": "workedInAll",
3900
+ "label": "All Claude Code sessions",
3901
+ "valueType": "array",
3902
+ "inputType": "tags",
3903
+ "description": "Written by the pod: every Claude Code session that worked this work, newest first. Read-only."
3904
+ },
3891
3905
  {
3892
3906
  "slug": "linkedApp",
3893
3907
  "label": "Linked App",
@@ -6754,6 +6768,24 @@ var DATA = {
6754
6768
  }
6755
6769
  }
6756
6770
  },
6771
+ {
6772
+ "name": "Features by Claude Code session",
6773
+ "slug": "features-by-claude-code-session",
6774
+ "type": "kanban",
6775
+ "scopeProfileSlug": "devplane_feature",
6776
+ "description": "Every work grouped by the Claude Code session that last worked it, each card marked with its type.",
6777
+ "config": {
6778
+ "groupByField": "properties.workedIn",
6779
+ "cardFields": [
6780
+ "change",
6781
+ "priority",
6782
+ "repos"
6783
+ ],
6784
+ "cardSettings": {
6785
+ "colorField": "change"
6786
+ }
6787
+ }
6788
+ },
6757
6789
  {
6758
6790
  "name": "Changes by state",
6759
6791
  "slug": "changes-by-state",
@@ -40928,6 +40960,26 @@ function checkPresentationDeclarations(tpl, resolveDep, corpus, add) {
40928
40960
  );
40929
40961
  }
40930
40962
  }
40963
+ var SERVER_DERIVED_PROPERTY_KEYS = ["workedIn", "workedInAll"];
40964
+ var SERVER_DERIVED_GROUP_KEYS = ["workedIn"];
40965
+ function checkServerDerivedProperties(tpl, add) {
40966
+ for (const p of tpl.profiles || [])
40967
+ for (const pr of p.properties || []) {
40968
+ if (!SERVER_DERIVED_PROPERTY_KEYS.includes(pr.slug)) continue;
40969
+ const c = pr.constraints ?? {};
40970
+ const valued = [
40971
+ ...Array.isArray(pr.enumValues) && pr.enumValues.length > 0 ? ["enumValues"] : [],
40972
+ ..."defaultValue" in c ? ["constraints.defaultValue"] : [],
40973
+ ..."enum" in c ? ["constraints.enum"] : []
40974
+ ];
40975
+ if (valued.length > 0)
40976
+ add(
40977
+ "property-server-derived-value",
40978
+ `profiles.${p.slug}.${pr.slug}`,
40979
+ `property ${p.slug}.${pr.slug} is written by the pod alone; a template declares it and gives it no value (${valued.join(", ")})`
40980
+ );
40981
+ }
40982
+ }
40931
40983
  function checkKanbanGrouping(tpl, resolveDep, corpus, add) {
40932
40984
  for (const v of tpl.views ?? []) {
40933
40985
  if (String(v.type || "").toLowerCase() !== "kanban") continue;
@@ -40954,7 +41006,8 @@ function checkKanbanGrouping(tpl, resolveDep, corpus, add) {
40954
41006
  const decls = profileDeclarations(kind, tpl, resolveDep, corpus);
40955
41007
  if (decls.length === 0) continue;
40956
41008
  const prop = decls.flatMap((p) => p.properties ?? []).find((p) => p.slug === slug);
40957
- if (!prop || prop.inputType !== "select" || !Array.isArray(prop.enumValues) || prop.enumValues.length === 0)
41009
+ const derivedGroup = !!prop && SERVER_DERIVED_GROUP_KEYS.includes(prop.slug) && prop.valueType === "string";
41010
+ if (!derivedGroup && (!prop || prop.inputType !== "select" || !Array.isArray(prop.enumValues) || prop.enumValues.length === 0))
40958
41011
  add(
40959
41012
  "view-kanban-group-unknown",
40960
41013
  `${at}.config.groupByField`,
@@ -41862,6 +41915,7 @@ function validateTemplate(authored, authoredOpts = {}) {
41862
41915
  checkStageDomains(tpl, resolveDepFrom(opts), add);
41863
41916
  checkProcessContract(tpl, resolveDepFrom(opts), opts.corpus, add);
41864
41917
  checkKanbanGrouping(tpl, resolveDepFrom(opts), opts.corpus, add);
41918
+ checkServerDerivedProperties(tpl, add);
41865
41919
  checkLifecycleDeclarations(tpl, resolveDepFrom(opts), opts.corpus, add);
41866
41920
  checkPresentationDeclarations(tpl, resolveDepFrom(opts), opts.corpus, add);
41867
41921
  checkIntent(tpl, resolveDepFrom(opts), add);