@x12i/memorix-skills 0.3.4 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +53 -53
  2. package/agents/BLOCKS.md +21 -21
  3. package/agents/README.md +15 -15
  4. package/agents/evidence-summary/README.md +5 -5
  5. package/agents/evidence-summary/models.json +30 -30
  6. package/agents/evidence-summary/processes/evidence-summary/fixture.json +23 -23
  7. package/agents/evidence-summary/processes/evidence-summary/process.json +96 -96
  8. package/agents/evidence-summary/processes/evidence-summary/processing/check.example-outputs/index.json +21 -21
  9. package/agents/evidence-summary/processes/evidence-summary/processing/check.example-outputs/output.json +9 -9
  10. package/agents/evidence-summary/processes/evidence-summary/processing/check.example-outputs/result.json +3 -3
  11. package/agents/evidence-summary/processes/evidence-summary/processing/draft.example-outputs/index.json +21 -21
  12. package/agents/evidence-summary/processes/evidence-summary/processing/draft.example-outputs/output.json +12 -12
  13. package/agents/evidence-summary/processes/evidence-summary/processing/draft.example-outputs/result.json +3 -3
  14. package/agents/evidence-summary/processes/evidence-summary/processing/incomplete.example-outputs/index.json +21 -21
  15. package/agents/evidence-summary/processes/evidence-summary/processing/incomplete.example-outputs/output.json +11 -11
  16. package/agents/evidence-summary/processes/evidence-summary/processing/incomplete.example-outputs/result.json +3 -3
  17. package/agents/evidence-summary/processes/evidence-summary/processing/publish.example-outputs/index.json +21 -21
  18. package/agents/evidence-summary/processes/evidence-summary/processing/publish.example-outputs/output.json +12 -12
  19. package/agents/evidence-summary/processes/evidence-summary/schemas/summary.json +9 -9
  20. package/agents/foundation/README.md +20 -20
  21. package/agents/foundation/auditing/entity-overview.audit.md +32 -32
  22. package/agents/foundation/auditing/list-overview.audit.md +32 -32
  23. package/agents/foundation/blocks/overview-sections.md +13 -13
  24. package/agents/foundation/processing/entity-overview.md +25 -25
  25. package/agents/foundation/processing/list-overview.md +27 -27
  26. package/agents/record-brief/README.md +7 -7
  27. package/agents/record-brief/models.json +16 -16
  28. package/agents/record-brief/processes/record-brief/edges/summary-when-long.mjs +10 -10
  29. package/agents/record-brief/processes/record-brief/fixture.json +22 -22
  30. package/agents/record-brief/processes/record-brief/process.json +143 -143
  31. package/agents/record-brief/processes/record-brief/processing/count-briefs.example-outputs/index.json +21 -21
  32. package/agents/record-brief/processes/record-brief/processing/count-briefs.example-outputs/output.json +9 -9
  33. package/agents/record-brief/processes/record-brief/processing/index-terms.example-outputs/index.json +21 -21
  34. package/agents/record-brief/processes/record-brief/processing/index-terms.example-outputs/output.json +12 -12
  35. package/agents/record-brief/processes/record-brief/processing/normalize-note.example-outputs/index.json +21 -21
  36. package/agents/record-brief/processes/record-brief/processing/normalize-note.example-outputs/output.json +11 -11
  37. package/agents/record-brief/processes/record-brief/processing/summarize-note.example-outputs/index.json +21 -21
  38. package/agents/record-brief/processes/record-brief/processing/summarize-note.example-outputs/output.json +11 -11
  39. package/agents/record-brief/processes/record-brief/prompts/summarize.md +1 -1
  40. package/agents/record-brief/processes/record-brief/steps/count-briefs.mjs +6 -6
  41. package/agents/record-brief/processes/record-brief/steps/index-terms.mjs +6 -6
  42. package/agents/record-brief/processes/record-brief/steps/normalize-note.mjs +16 -16
  43. package/agents/record-brief/processes/record-brief/steps/summarize-note.mjs +38 -38
  44. package/agents/system/README.md +37 -37
  45. package/agents/system/internal/audit-prompt.md +28 -28
  46. package/agents/system/internal/audit-result.md +28 -28
  47. package/agents/system/internal/fix-attempt.md +17 -17
  48. package/agents/system/internal/improve-prompt.md +17 -17
  49. package/agents/system/internal/investigate-audit.md +9 -9
  50. package/agents/system/internal/investigate-context.md +9 -9
  51. package/agents/system/internal/investigate-contract.md +9 -9
  52. package/agents/system/internal/investigate-execution.md +9 -9
  53. package/agents/system/internal/investigate-inputs.md +9 -9
  54. package/agents/system/internal/investigate-instructions.md +9 -9
  55. package/agents/system/internal/investigate-provenance.md +9 -9
  56. package/agents/system/internal/investigate-response.md +9 -9
  57. package/agents/system/internal/investigate-synthesis.md +19 -19
  58. package/agents/tryout/README.md +7 -7
  59. package/agents/tryout/processes/tryout/fixture.json +28 -28
  60. package/agents/tryout/processes/tryout/process.json +88 -88
  61. package/agents/tryout/processes/tryout/processing/echo-stamp.example-outputs/index.json +16 -16
  62. package/agents/tryout/processes/tryout/processing/echo-stamp.example-outputs/output.json +10 -10
  63. package/agents/tryout/processes/tryout/processing/name-label.example-outputs/index.json +16 -16
  64. package/agents/tryout/processes/tryout/processing/name-label.example-outputs/output.json +9 -9
  65. package/agents/tryout/processes/tryout/processing/stamp-note.example-outputs/index.json +16 -16
  66. package/agents/tryout/processes/tryout/processing/stamp-note.example-outputs/output.json +10 -10
  67. package/agents/tryout/processes/tryout/steps/echo-stamp.mjs +11 -11
  68. package/agents/tryout/processes/tryout/steps/name-label.mjs +8 -8
  69. package/agents/tryout/processes/tryout/steps/stamp-note.mjs +11 -11
  70. package/dist/create-memorix-skills.d.ts +5 -4
  71. package/dist/create-memorix-skills.d.ts.map +1 -1
  72. package/dist/create-memorix-skills.js +32 -7
  73. package/dist/create-memorix-skills.js.map +1 -1
  74. package/dist/shared-packs.d.ts.map +1 -1
  75. package/dist/shared-packs.js +6 -0
  76. package/dist/shared-packs.js.map +1 -1
  77. package/package.json +3 -3
@@ -1,143 +1,143 @@
1
- {
2
- "schemaVersion": "memorix.process/v2",
3
- "id": "record-brief",
4
- "title": "Record brief",
5
- "description": "Normalize a note, index its terms, and optionally summarize it. The count is one run-level checkpoint.",
6
- "initiation": [
7
- { "objectType": "note", "contentType": "note", "events": ["created", "updated"] }
8
- ],
9
- "entryNodes": ["normalize-note", "index-terms"],
10
- "nodes": [
11
- {
12
- "id": "normalize-note",
13
- "label": "Normalize a note",
14
- "kind": "module",
15
- "module": "./steps/normalize-note.mjs",
16
- "scope": "subject",
17
- "activation": "always",
18
- "objectType": "note",
19
- "queryContentType": "note",
20
- "reads": {
21
- "required": [{ "contentType": "note", "requiredFields": ["body"] }],
22
- "optional": [{ "contentType": "attachment" }]
23
- },
24
- "output": {
25
- "contentType": "brief",
26
- "discriminator": "normalized",
27
- "persistence": "derived",
28
- "contract": {
29
- "version": "normalize-1",
30
- "properties": [
31
- { "name": "title", "path": "data.title", "type": "string", "required": true },
32
- { "name": "body", "path": "data.body", "type": "string", "required": true }
33
- ]
34
- }
35
- }
36
- },
37
- {
38
- "id": "index-terms",
39
- "label": "Index note terms",
40
- "kind": "module",
41
- "module": "./steps/index-terms.mjs",
42
- "scope": "subject",
43
- "activation": "always",
44
- "objectType": "note",
45
- "queryContentType": "note",
46
- "reads": {
47
- "required": [{ "contentType": "note", "requiredFields": ["body"] }],
48
- "optional": []
49
- },
50
- "output": {
51
- "contentType": "brief",
52
- "discriminator": "terms",
53
- "persistence": "derived",
54
- "contract": {
55
- "version": "terms-1",
56
- "properties": [{ "name": "terms", "path": "data.terms", "type": "list", "required": true }]
57
- }
58
- }
59
- },
60
- {
61
- "id": "summarize-note",
62
- "label": "Summarize a note",
63
- "kind": "module",
64
- "module": "./steps/summarize-note.mjs",
65
- "scope": "subject",
66
- "activation": "operator",
67
- "objectType": "note",
68
- "reads": {
69
- "required": [
70
- {
71
- "contentType": "brief",
72
- "discriminator": "normalized",
73
- "from": "normalize-note",
74
- "requiredFields": ["title", "body"]
75
- }
76
- ],
77
- "optional": []
78
- },
79
- "ai": {
80
- "prompt": "summarize.md",
81
- "maxCalls": 2,
82
- "profile": "summary",
83
- "reasoningEffort": "low"
84
- },
85
- "output": {
86
- "contentType": "brief",
87
- "discriminator": "summary",
88
- "persistence": "derived",
89
- "contract": {
90
- "version": "summary-1",
91
- "text": "A summary and a tone, each grounded in the note body.",
92
- "properties": [
93
- { "name": "summary", "path": "data.summary", "type": "string", "required": true },
94
- { "name": "tone", "path": "data.tone", "type": "string", "required": true }
95
- ]
96
- }
97
- }
98
- },
99
- {
100
- "id": "count-briefs",
101
- "label": "Count normalized notes",
102
- "kind": "module",
103
- "module": "./steps/count-briefs.mjs",
104
- "scope": "run",
105
- "activation": "always",
106
- "checkpoint": true,
107
- "gate": true,
108
- "readers": ["briefs"],
109
- "output": {
110
- "contentType": "brief-count",
111
- "objectType": "collection",
112
- "recordId": "collection",
113
- "persistence": "derived",
114
- "contract": {
115
- "version": "count-1",
116
- "properties": [{ "name": "count", "path": "data.count", "type": "integer", "required": true }]
117
- }
118
- }
119
- }
120
- ],
121
- "edges": [
122
- { "id": "normalize-summarize", "from": "normalize-note", "to": "summarize-note", "on": "succeeded" },
123
- {
124
- "id": "summary-when-long",
125
- "module": "./edges/summary-when-long.mjs",
126
- "from": "normalize-note",
127
- "to": "summarize-note",
128
- "readers": ["notes"]
129
- },
130
- {
131
- "id": "brief-ready",
132
- "kind": "join",
133
- "mode": "all",
134
- "from": ["normalize-note", "index-terms"],
135
- "to": "count-briefs"
136
- }
137
- ],
138
- "phases": [
139
- { "id": "prepare", "label": "Prepare", "steps": ["normalize-note", "index-terms"] },
140
- { "id": "summarize", "label": "Summarize", "steps": ["summarize-note"] },
141
- { "id": "publish", "label": "Publish", "steps": ["count-briefs"] }
142
- ]
143
- }
1
+ {
2
+ "schemaVersion": "memorix.process/v2",
3
+ "id": "record-brief",
4
+ "title": "Record brief",
5
+ "description": "Normalize a note, index its terms, and optionally summarize it. The count is one run-level checkpoint.",
6
+ "initiation": [
7
+ { "objectType": "note", "contentType": "note", "events": ["created", "updated"] }
8
+ ],
9
+ "entryNodes": ["normalize-note", "index-terms"],
10
+ "nodes": [
11
+ {
12
+ "id": "normalize-note",
13
+ "label": "Normalize a note",
14
+ "kind": "module",
15
+ "module": "./steps/normalize-note.mjs",
16
+ "scope": "subject",
17
+ "activation": "always",
18
+ "objectType": "note",
19
+ "queryContentType": "note",
20
+ "reads": {
21
+ "required": [{ "contentType": "note", "requiredFields": ["body"] }],
22
+ "optional": [{ "contentType": "attachment" }]
23
+ },
24
+ "output": {
25
+ "contentType": "brief",
26
+ "discriminator": "normalized",
27
+ "persistence": "derived",
28
+ "contract": {
29
+ "version": "normalize-1",
30
+ "properties": [
31
+ { "name": "title", "path": "data.title", "type": "string", "required": true },
32
+ { "name": "body", "path": "data.body", "type": "string", "required": true }
33
+ ]
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "id": "index-terms",
39
+ "label": "Index note terms",
40
+ "kind": "module",
41
+ "module": "./steps/index-terms.mjs",
42
+ "scope": "subject",
43
+ "activation": "always",
44
+ "objectType": "note",
45
+ "queryContentType": "note",
46
+ "reads": {
47
+ "required": [{ "contentType": "note", "requiredFields": ["body"] }],
48
+ "optional": []
49
+ },
50
+ "output": {
51
+ "contentType": "brief",
52
+ "discriminator": "terms",
53
+ "persistence": "derived",
54
+ "contract": {
55
+ "version": "terms-1",
56
+ "properties": [{ "name": "terms", "path": "data.terms", "type": "list", "required": true }]
57
+ }
58
+ }
59
+ },
60
+ {
61
+ "id": "summarize-note",
62
+ "label": "Summarize a note",
63
+ "kind": "module",
64
+ "module": "./steps/summarize-note.mjs",
65
+ "scope": "subject",
66
+ "activation": "operator",
67
+ "objectType": "note",
68
+ "reads": {
69
+ "required": [
70
+ {
71
+ "contentType": "brief",
72
+ "discriminator": "normalized",
73
+ "from": "normalize-note",
74
+ "requiredFields": ["title", "body"]
75
+ }
76
+ ],
77
+ "optional": []
78
+ },
79
+ "ai": {
80
+ "prompt": "summarize.md",
81
+ "maxCalls": 2,
82
+ "profile": "summary",
83
+ "reasoningEffort": "low"
84
+ },
85
+ "output": {
86
+ "contentType": "brief",
87
+ "discriminator": "summary",
88
+ "persistence": "derived",
89
+ "contract": {
90
+ "version": "summary-1",
91
+ "text": "A summary and a tone, each grounded in the note body.",
92
+ "properties": [
93
+ { "name": "summary", "path": "data.summary", "type": "string", "required": true },
94
+ { "name": "tone", "path": "data.tone", "type": "string", "required": true }
95
+ ]
96
+ }
97
+ }
98
+ },
99
+ {
100
+ "id": "count-briefs",
101
+ "label": "Count normalized notes",
102
+ "kind": "module",
103
+ "module": "./steps/count-briefs.mjs",
104
+ "scope": "run",
105
+ "activation": "always",
106
+ "checkpoint": true,
107
+ "gate": true,
108
+ "readers": ["briefs"],
109
+ "output": {
110
+ "contentType": "brief-count",
111
+ "objectType": "collection",
112
+ "recordId": "collection",
113
+ "persistence": "derived",
114
+ "contract": {
115
+ "version": "count-1",
116
+ "properties": [{ "name": "count", "path": "data.count", "type": "integer", "required": true }]
117
+ }
118
+ }
119
+ }
120
+ ],
121
+ "edges": [
122
+ { "id": "normalize-summarize", "from": "normalize-note", "to": "summarize-note", "on": "succeeded" },
123
+ {
124
+ "id": "summary-when-long",
125
+ "module": "./edges/summary-when-long.mjs",
126
+ "from": "normalize-note",
127
+ "to": "summarize-note",
128
+ "readers": ["notes"]
129
+ },
130
+ {
131
+ "id": "brief-ready",
132
+ "kind": "join",
133
+ "mode": "all",
134
+ "from": ["normalize-note", "index-terms"],
135
+ "to": "count-briefs"
136
+ }
137
+ ],
138
+ "phases": [
139
+ { "id": "prepare", "label": "Prepare", "steps": ["normalize-note", "index-terms"] },
140
+ { "id": "summarize", "label": "Summarize", "steps": ["summarize-note"] },
141
+ { "id": "publish", "label": "Publish", "steps": ["count-briefs"] }
142
+ ]
143
+ }
@@ -1,21 +1,21 @@
1
- {
2
- "packId": "record-brief",
3
- "skill": "count-briefs",
4
- "subjects": [
5
- {
6
- "id": "collection",
7
- "objectType": "collection",
8
- "contentType": "brief-count",
9
- "recordId": "collection",
10
- "documents": [
11
- {
12
- "objectType": "collection",
13
- "contentType": "brief-count",
14
- "recordId": "collection",
15
- "file": "output.json"
16
- }
17
- ],
18
- "absent": []
19
- }
20
- ]
21
- }
1
+ {
2
+ "packId": "record-brief",
3
+ "skill": "count-briefs",
4
+ "subjects": [
5
+ {
6
+ "id": "collection",
7
+ "objectType": "collection",
8
+ "contentType": "brief-count",
9
+ "recordId": "collection",
10
+ "documents": [
11
+ {
12
+ "objectType": "collection",
13
+ "contentType": "brief-count",
14
+ "recordId": "collection",
15
+ "file": "output.json"
16
+ }
17
+ ],
18
+ "absent": []
19
+ }
20
+ ]
21
+ }
@@ -1,9 +1,9 @@
1
- {
2
- "objectType": "collection",
3
- "contentType": "brief-count",
4
- "recordId": "collection",
5
- "data": {
6
- "count": 1,
7
- "instanceId": "count-briefs"
8
- }
9
- }
1
+ {
2
+ "objectType": "collection",
3
+ "contentType": "brief-count",
4
+ "recordId": "collection",
5
+ "data": {
6
+ "count": 1,
7
+ "instanceId": "count-briefs"
8
+ }
9
+ }
@@ -1,21 +1,21 @@
1
- {
2
- "packId": "record-brief",
3
- "skill": "index-terms",
4
- "subjects": [
5
- {
6
- "id": "note",
7
- "objectType": "note",
8
- "contentType": "brief",
9
- "recordId": "fx-note",
10
- "documents": [
11
- {
12
- "objectType": "note",
13
- "contentType": "brief",
14
- "recordId": "fx-note",
15
- "file": "output.json"
16
- }
17
- ],
18
- "absent": []
19
- }
20
- ]
21
- }
1
+ {
2
+ "packId": "record-brief",
3
+ "skill": "index-terms",
4
+ "subjects": [
5
+ {
6
+ "id": "note",
7
+ "objectType": "note",
8
+ "contentType": "brief",
9
+ "recordId": "fx-note",
10
+ "documents": [
11
+ {
12
+ "objectType": "note",
13
+ "contentType": "brief",
14
+ "recordId": "fx-note",
15
+ "file": "output.json"
16
+ }
17
+ ],
18
+ "absent": []
19
+ }
20
+ ]
21
+ }
@@ -1,12 +1,12 @@
1
- {
2
- "objectType": "note",
3
- "contentType": "brief",
4
- "recordId": "fx-note",
5
- "data": {
6
- "terms": [
7
- "sample"
8
- ],
9
- "instanceId": "index-terms",
10
- "kind": "terms"
11
- }
12
- }
1
+ {
2
+ "objectType": "note",
3
+ "contentType": "brief",
4
+ "recordId": "fx-note",
5
+ "data": {
6
+ "terms": [
7
+ "sample"
8
+ ],
9
+ "instanceId": "index-terms",
10
+ "kind": "terms"
11
+ }
12
+ }
@@ -1,21 +1,21 @@
1
- {
2
- "packId": "record-brief",
3
- "skill": "normalize-note",
4
- "subjects": [
5
- {
6
- "id": "note",
7
- "objectType": "note",
8
- "contentType": "brief",
9
- "recordId": "fx-note",
10
- "documents": [
11
- {
12
- "objectType": "note",
13
- "contentType": "brief",
14
- "recordId": "fx-note",
15
- "file": "output.json"
16
- }
17
- ],
18
- "absent": []
19
- }
20
- ]
21
- }
1
+ {
2
+ "packId": "record-brief",
3
+ "skill": "normalize-note",
4
+ "subjects": [
5
+ {
6
+ "id": "note",
7
+ "objectType": "note",
8
+ "contentType": "brief",
9
+ "recordId": "fx-note",
10
+ "documents": [
11
+ {
12
+ "objectType": "note",
13
+ "contentType": "brief",
14
+ "recordId": "fx-note",
15
+ "file": "output.json"
16
+ }
17
+ ],
18
+ "absent": []
19
+ }
20
+ ]
21
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "objectType": "note",
3
- "contentType": "brief",
4
- "recordId": "fx-note",
5
- "data": {
6
- "title": "sample",
7
- "body": "sample",
8
- "instanceId": "normalize-note",
9
- "kind": "normalized"
10
- }
11
- }
1
+ {
2
+ "objectType": "note",
3
+ "contentType": "brief",
4
+ "recordId": "fx-note",
5
+ "data": {
6
+ "title": "sample",
7
+ "body": "sample",
8
+ "instanceId": "normalize-note",
9
+ "kind": "normalized"
10
+ }
11
+ }
@@ -1,21 +1,21 @@
1
- {
2
- "packId": "record-brief",
3
- "skill": "summarize-note",
4
- "subjects": [
5
- {
6
- "id": "note",
7
- "objectType": "note",
8
- "contentType": "brief",
9
- "recordId": "fx-note",
10
- "documents": [
11
- {
12
- "objectType": "note",
13
- "contentType": "brief",
14
- "recordId": "fx-note",
15
- "file": "output.json"
16
- }
17
- ],
18
- "absent": []
19
- }
20
- ]
21
- }
1
+ {
2
+ "packId": "record-brief",
3
+ "skill": "summarize-note",
4
+ "subjects": [
5
+ {
6
+ "id": "note",
7
+ "objectType": "note",
8
+ "contentType": "brief",
9
+ "recordId": "fx-note",
10
+ "documents": [
11
+ {
12
+ "objectType": "note",
13
+ "contentType": "brief",
14
+ "recordId": "fx-note",
15
+ "file": "output.json"
16
+ }
17
+ ],
18
+ "absent": []
19
+ }
20
+ ]
21
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "objectType": "note",
3
- "contentType": "brief",
4
- "recordId": "fx-note",
5
- "data": {
6
- "summary": "sample",
7
- "tone": "sample",
8
- "instanceId": "summarize-note",
9
- "kind": "summary"
10
- }
11
- }
1
+ {
2
+ "objectType": "note",
3
+ "contentType": "brief",
4
+ "recordId": "fx-note",
5
+ "data": {
6
+ "summary": "sample",
7
+ "tone": "sample",
8
+ "instanceId": "summarize-note",
9
+ "kind": "summary"
10
+ }
11
+ }
@@ -1 +1 @@
1
- Write a short summary of the note and name its tone. Use only the note body.
1
+ Write a short summary of the note and name its tone. Use only the note body.
@@ -1,6 +1,6 @@
1
- /** Behavior only. The process contract is process.json. */
2
- export async function run(ctx) {
3
- const rows = await ctx.readers.briefs({ objectType: "note", contentType: "brief" });
4
- const count = rows.filter((row) => row.data?.kind === "normalized").length;
5
- return { outcome: "emit", data: { count, coverage: "aggregate" } };
6
- }
1
+ /** Behavior only. The process contract is process.json. */
2
+ export async function run(ctx) {
3
+ const rows = await ctx.readers.briefs({ objectType: "note", contentType: "brief" });
4
+ const count = rows.filter((row) => row.data?.kind === "normalized").length;
5
+ return { outcome: "emit", data: { count, coverage: "aggregate" } };
6
+ }
@@ -1,6 +1,6 @@
1
- /** Behavior only. The process contract is process.json. */
2
- export async function run(ctx) {
3
- const body = String(ctx.inputs.note?.data?.body ?? "");
4
- const terms = [...new Set(body.toLowerCase().split(/[^a-z0-9]+/).filter((word) => word.length > 3))].sort();
5
- return { outcome: "emit", data: { kind: "terms", terms, coverage: terms.length ? "indexed" : "none" } };
6
- }
1
+ /** Behavior only. The process contract is process.json. */
2
+ export async function run(ctx) {
3
+ const body = String(ctx.inputs.note?.data?.body ?? "");
4
+ const terms = [...new Set(body.toLowerCase().split(/[^a-z0-9]+/).filter((word) => word.length > 3))].sort();
5
+ return { outcome: "emit", data: { kind: "terms", terms, coverage: terms.length ? "indexed" : "none" } };
6
+ }
@@ -1,16 +1,16 @@
1
- /** Behavior only. The process contract is process.json. */
2
- export async function run(ctx) {
3
- const note = ctx.inputs.note?.data ?? {};
4
- const body = String(note.body ?? "").trim();
5
- const title = String(note.title ?? body.slice(0, 48)).trim();
6
- const attachment = ctx.inputs["attachment:optional"];
7
- return {
8
- outcome: "emit",
9
- data: {
10
- kind: "normalized",
11
- title,
12
- body,
13
- coverage: attachment?.status === "ok" ? "with-attachment" : "note-only",
14
- },
15
- };
16
- }
1
+ /** Behavior only. The process contract is process.json. */
2
+ export async function run(ctx) {
3
+ const note = ctx.inputs.note?.data ?? {};
4
+ const body = String(note.body ?? "").trim();
5
+ const title = String(note.title ?? body.slice(0, 48)).trim();
6
+ const attachment = ctx.inputs["attachment:optional"];
7
+ return {
8
+ outcome: "emit",
9
+ data: {
10
+ kind: "normalized",
11
+ title,
12
+ body,
13
+ coverage: attachment?.status === "ok" ? "with-attachment" : "note-only",
14
+ },
15
+ };
16
+ }