@jahia/agentic 0.2.0 → 0.3.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/CHANGELOG.md +4 -0
- package/README.md +28 -0
- package/dist/claude/.claude/skills/jahia/SKILL.md +18 -10
- package/dist/claude/.claude/skills/jahia-content/SKILL.md +102 -84
- package/dist/claude/.claude/skills/jahia-content-create-content/SKILL.md +255 -280
- package/dist/claude/.claude/skills/jahia-content-explore-structure/SKILL.md +187 -96
- package/dist/claude/.claude/skills/jahia-content-media-upload/SKILL.md +197 -0
- package/dist/claude/.claude/skills/jahia-content-move-content/SKILL.md +160 -165
- package/dist/claude/.claude/skills/jahia-content-organize/SKILL.md +209 -0
- package/dist/claude/.claude/skills/jahia-content-publish/SKILL.md +181 -0
- package/dist/claude/.claude/skills/jahia-content-query-content/SKILL.md +122 -92
- package/dist/claude/.claude/skills/jahia-content-translate-content/SKILL.md +154 -225
- package/dist/claude/.claude/skills/jahia-dev-cypress/SKILL.md +150 -330
- package/dist/claude/.claude/skills/jahia-dev-query-content/SKILL.md +93 -296
- package/dist/claude/.claude/skills/jahia-jcr-sql2/SKILL.md +258 -0
- package/dist/claude/CLAUDE.md +1 -7
- package/dist/codex/.agents/skills/jahia/SKILL.md +18 -10
- package/dist/codex/.agents/skills/jahia-content/SKILL.md +102 -84
- package/dist/codex/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
- package/dist/codex/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
- package/dist/codex/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
- package/dist/codex/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
- package/dist/codex/.agents/skills/jahia-content-organize/SKILL.md +209 -0
- package/dist/codex/.agents/skills/jahia-content-publish/SKILL.md +181 -0
- package/dist/codex/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
- package/dist/codex/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
- package/dist/codex/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
- package/dist/codex/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
- package/dist/codex/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
- package/dist/codex/AGENTS.md +2 -4
- package/dist/copilot/.agents/skills/jahia/SKILL.md +18 -10
- package/dist/copilot/.agents/skills/jahia-content/SKILL.md +102 -84
- package/dist/copilot/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
- package/dist/copilot/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
- package/dist/copilot/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
- package/dist/copilot/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
- package/dist/copilot/.agents/skills/jahia-content-organize/SKILL.md +209 -0
- package/dist/copilot/.agents/skills/jahia-content-publish/SKILL.md +181 -0
- package/dist/copilot/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
- package/dist/copilot/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
- package/dist/copilot/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
- package/dist/copilot/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
- package/dist/copilot/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
- package/dist/copilot/AGENTS.md +2 -4
- package/dist/cursor/.agents/skills/jahia/SKILL.md +18 -10
- package/dist/cursor/.agents/skills/jahia-content/SKILL.md +102 -84
- package/dist/cursor/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
- package/dist/cursor/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
- package/dist/cursor/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
- package/dist/cursor/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
- package/dist/cursor/.agents/skills/jahia-content-organize/SKILL.md +209 -0
- package/dist/cursor/.agents/skills/jahia-content-publish/SKILL.md +181 -0
- package/dist/cursor/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
- package/dist/cursor/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
- package/dist/cursor/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
- package/dist/cursor/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
- package/dist/cursor/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
- package/dist/gemini/.agents/skills/jahia/SKILL.md +18 -10
- package/dist/gemini/.agents/skills/jahia-content/SKILL.md +102 -84
- package/dist/gemini/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
- package/dist/gemini/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
- package/dist/gemini/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
- package/dist/gemini/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
- package/dist/gemini/.agents/skills/jahia-content-organize/SKILL.md +209 -0
- package/dist/gemini/.agents/skills/jahia-content-publish/SKILL.md +181 -0
- package/dist/gemini/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
- package/dist/gemini/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
- package/dist/gemini/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
- package/dist/gemini/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
- package/dist/gemini/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
- package/dist/gemini/AGENTS.md +2 -4
- package/dist/gemini/GEMINI.md +2 -2
- package/dist/opencode/.agents/skills/jahia/SKILL.md +18 -10
- package/dist/opencode/.agents/skills/jahia-content/SKILL.md +102 -84
- package/dist/opencode/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
- package/dist/opencode/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
- package/dist/opencode/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
- package/dist/opencode/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
- package/dist/opencode/.agents/skills/jahia-content-organize/SKILL.md +209 -0
- package/dist/opencode/.agents/skills/jahia-content-publish/SKILL.md +181 -0
- package/dist/opencode/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
- package/dist/opencode/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
- package/dist/opencode/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
- package/dist/opencode/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
- package/dist/opencode/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
- package/dist/opencode/AGENTS.md +2 -4
- package/dist/windsurf/.windsurf/skills/jahia/SKILL.md +18 -10
- package/dist/windsurf/.windsurf/skills/jahia-content/SKILL.md +102 -84
- package/dist/windsurf/.windsurf/skills/jahia-content-create-content/SKILL.md +255 -280
- package/dist/windsurf/.windsurf/skills/jahia-content-explore-structure/SKILL.md +187 -96
- package/dist/windsurf/.windsurf/skills/jahia-content-media-upload/SKILL.md +197 -0
- package/dist/windsurf/.windsurf/skills/jahia-content-move-content/SKILL.md +160 -165
- package/dist/windsurf/.windsurf/skills/jahia-content-organize/SKILL.md +209 -0
- package/dist/windsurf/.windsurf/skills/jahia-content-publish/SKILL.md +181 -0
- package/dist/windsurf/.windsurf/skills/jahia-content-query-content/SKILL.md +122 -92
- package/dist/windsurf/.windsurf/skills/jahia-content-translate-content/SKILL.md +154 -225
- package/dist/windsurf/.windsurf/skills/jahia-dev-cypress/SKILL.md +150 -330
- package/dist/windsurf/.windsurf/skills/jahia-dev-query-content/SKILL.md +93 -296
- package/dist/windsurf/.windsurf/skills/jahia-jcr-sql2/SKILL.md +258 -0
- package/dist/windsurf/AGENTS.md +2 -4
- package/package.json +3 -3
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jahia-jcr-sql2
|
|
3
|
+
description: JCR-SQL2 reference for Jahia queries. Use when building, reviewing, or debugging SQL2 statements for content listings, full-text search, sorting, pagination, or Java back-end query code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: jahia-jcr-sql2
|
|
7
|
+
|
|
8
|
+
Use this skill when you need the JCR-SQL2 language itself: selectors, path constraints, filters, ordering, full-text syntax, joins, pagination rules, and performance guardrails.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## When to use JCR-SQL2
|
|
13
|
+
|
|
14
|
+
JCR-SQL2 is the standard Jahia query language for:
|
|
15
|
+
|
|
16
|
+
- listing pages or content with filtering and sorting
|
|
17
|
+
- querying a folder subtree
|
|
18
|
+
- searching by property value, date, or reference
|
|
19
|
+
- full-text search across indexed content
|
|
20
|
+
- back-end Java code using `QueryManagerWrapper`
|
|
21
|
+
- template-set listings that use `useJCRQuery` or the Page Builder query component
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Basic syntax
|
|
26
|
+
|
|
27
|
+
### Select by node type
|
|
28
|
+
|
|
29
|
+
```sql
|
|
30
|
+
SELECT * FROM [jnt:page] AS page
|
|
31
|
+
SELECT * FROM [jnt:content] AS content
|
|
32
|
+
SELECT * FROM [jnt:file] AS file
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The selector matches the named type and its subtypes.
|
|
36
|
+
|
|
37
|
+
### Common node types
|
|
38
|
+
|
|
39
|
+
| Type | Meaning |
|
|
40
|
+
|------|---------|
|
|
41
|
+
| `jnt:page` | pages |
|
|
42
|
+
| `jnt:content` | editorial content |
|
|
43
|
+
| `jnt:file` | files |
|
|
44
|
+
| `jnt:virtualsite` | sites |
|
|
45
|
+
| `jmix:searchable` | general searchable content |
|
|
46
|
+
| `nt:base` | all nodes — avoid unless paired with a strict path |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Path constraints
|
|
51
|
+
|
|
52
|
+
### Recursive subtree
|
|
53
|
+
|
|
54
|
+
```sql
|
|
55
|
+
SELECT * FROM [jnt:page] AS page
|
|
56
|
+
WHERE ISDESCENDANTNODE(page, '/sites/luxe/home')
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Direct children only
|
|
60
|
+
|
|
61
|
+
```sql
|
|
62
|
+
SELECT * FROM [jnt:page] AS page
|
|
63
|
+
WHERE ISCHILDNODE(page, '/sites/luxe/home')
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Guardrail:** always constrain by path to avoid repository-wide scans.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Property constraints
|
|
71
|
+
|
|
72
|
+
### Exact match
|
|
73
|
+
|
|
74
|
+
```sql
|
|
75
|
+
WHERE page.[j:templateName] = 'home'
|
|
76
|
+
WHERE node.[jcr:title] = 'My Title'
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Pattern match
|
|
80
|
+
|
|
81
|
+
```sql
|
|
82
|
+
WHERE node.[jcr:title] LIKE '%keyword%'
|
|
83
|
+
WHERE node.[j:nodename] LIKE '%.png'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Null checks
|
|
87
|
+
|
|
88
|
+
```sql
|
|
89
|
+
WHERE page.[jcr:title] IS NOT NULL
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Boolean
|
|
93
|
+
|
|
94
|
+
```sql
|
|
95
|
+
WHERE node.[j:published] = CAST('true' AS BOOLEAN)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Date comparison
|
|
99
|
+
|
|
100
|
+
```sql
|
|
101
|
+
WHERE page.[jcr:lastModified] > CAST('2026-01-01T00:00:00.000Z' AS DATE)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Use the millisecond form `yyyy-MM-dd'T'HH:mm:ss.SSSX` for SQL2 date casts.
|
|
105
|
+
|
|
106
|
+
### Multiple conditions
|
|
107
|
+
|
|
108
|
+
```sql
|
|
109
|
+
WHERE ISDESCENDANTNODE(page, '/sites/luxe')
|
|
110
|
+
AND page.[jcr:lastModified] > CAST('2026-01-01T00:00:00.000Z' AS DATE)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### OR conditions
|
|
114
|
+
|
|
115
|
+
```sql
|
|
116
|
+
WHERE node.[jcr:primaryType] = 'jnt:bigText'
|
|
117
|
+
OR node.[jcr:primaryType] = 'jnt:article'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Ordering
|
|
123
|
+
|
|
124
|
+
```sql
|
|
125
|
+
ORDER BY page.[jcr:lastModified] DESC
|
|
126
|
+
ORDER BY page.[jcr:created] ASC
|
|
127
|
+
ORDER BY node.[jcr:title]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Multiple columns:
|
|
131
|
+
|
|
132
|
+
```sql
|
|
133
|
+
ORDER BY page.[j:templateName] ASC, page.[jcr:lastModified] DESC
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Full-text search
|
|
139
|
+
|
|
140
|
+
### Search indexed content
|
|
141
|
+
|
|
142
|
+
```sql
|
|
143
|
+
WHERE CONTAINS(node.*, 'digital')
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Search one property
|
|
147
|
+
|
|
148
|
+
```sql
|
|
149
|
+
WHERE CONTAINS(node.[jcr:title], 'welcome')
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Expression syntax
|
|
153
|
+
|
|
154
|
+
| Syntax | Meaning |
|
|
155
|
+
|--------|---------|
|
|
156
|
+
| `term` | must contain the term |
|
|
157
|
+
| `term1 term2` | implicit AND |
|
|
158
|
+
| `term1 OR term2` | either term |
|
|
159
|
+
| `"exact phrase"` | exact phrase |
|
|
160
|
+
| `-term` | exclude term |
|
|
161
|
+
|
|
162
|
+
### Relevance sort
|
|
163
|
+
|
|
164
|
+
```sql
|
|
165
|
+
SELECT * FROM [jnt:content] AS n
|
|
166
|
+
WHERE ISDESCENDANTNODE(n, '/sites/luxe')
|
|
167
|
+
AND CONTAINS(n.*, 'digital')
|
|
168
|
+
ORDER BY SCORE(n) DESC
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Combine full-text with path constraints for performance.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Joins
|
|
176
|
+
|
|
177
|
+
```sql
|
|
178
|
+
SELECT * FROM [jnt:imageReferenceLink] AS img
|
|
179
|
+
INNER JOIN [jnt:file] AS file
|
|
180
|
+
ON img.[j:node] = file.[jcr:uuid]
|
|
181
|
+
WHERE img.[j:node] = 'UUID'
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Jahia supports inner joins, but keep them focused and path-constrained whenever possible.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Using SQL2 in Jahia code
|
|
189
|
+
|
|
190
|
+
### Template-set listing with `useJCRQuery`
|
|
191
|
+
|
|
192
|
+
```tsx
|
|
193
|
+
const posts = useJCRQuery({
|
|
194
|
+
query: `SELECT * FROM [namespace:blogPost] AS post
|
|
195
|
+
WHERE ISDESCENDANTNODE(post, '/sites/${siteKey}/contents/blog')
|
|
196
|
+
ORDER BY post.[publicationDate] DESC`,
|
|
197
|
+
});
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Java back-end query execution
|
|
201
|
+
|
|
202
|
+
```java
|
|
203
|
+
QueryManagerWrapper qm = session.getWorkspace().getQueryManager();
|
|
204
|
+
QueryWrapper query = qm.createQuery(sql2Statement, Query.JCR_SQL2);
|
|
205
|
+
query.setLimit(limit);
|
|
206
|
+
query.setOffset(offset);
|
|
207
|
+
JCRNodeIteratorWrapper nodes = query.execute().getNodes();
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Guardrail:** never embed `LIMIT` or `OFFSET` inside the SQL2 string. Use `setLimit()` and `setOffset()`.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Security and validation
|
|
215
|
+
|
|
216
|
+
### Escape user input
|
|
217
|
+
|
|
218
|
+
In Java back-end code, escape user-provided values with `JCRContentUtils.sqlEncode()` before interpolating them into a SQL2 string.
|
|
219
|
+
|
|
220
|
+
```java
|
|
221
|
+
String safeValue = JCRContentUtils.sqlEncode(userInput);
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Validate dynamic sort fields
|
|
225
|
+
|
|
226
|
+
If a user can choose the sort field, validate it against a whitelist before interpolating it into `ORDER BY`.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Performance best practices
|
|
231
|
+
|
|
232
|
+
1. Always constrain by path.
|
|
233
|
+
2. Use the most specific node type possible.
|
|
234
|
+
3. Keep result sets small.
|
|
235
|
+
4. Prefer indexed equality filters over broad `LIKE '%...%'` patterns.
|
|
236
|
+
5. Use full-text sparingly on large trees.
|
|
237
|
+
6. Sort on common indexed fields such as `jcr:lastModified` or `jcr:created`.
|
|
238
|
+
7. Cap API result limits to a sane maximum.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Quick checklist
|
|
243
|
+
|
|
244
|
+
- [ ] Query has a path constraint
|
|
245
|
+
- [ ] Node type is specific
|
|
246
|
+
- [ ] Sort field is intentional and safe
|
|
247
|
+
- [ ] Full-text is combined with a subtree path
|
|
248
|
+
- [ ] Dates use `yyyy-MM-dd'T'HH:mm:ss.SSSX`
|
|
249
|
+
- [ ] Java code uses `setLimit()` and `setOffset()` instead of inline SQL clauses
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Related skills
|
|
254
|
+
|
|
255
|
+
- `/jahia-dev-query-content` — apply SQL2 inside Page Builder queries and JS module views
|
|
256
|
+
- `/jahia-dev-define-content-type` — define the content types you will query
|
|
257
|
+
- `/jahia-java-jcr` — implement back-end JCR logic around the query
|
|
258
|
+
|
package/dist/windsurf/AGENTS.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# AGENTS.md
|
|
2
2
|
<!-- Generated by APM CLI from distributed .apm/ primitives -->
|
|
3
|
-
<!-- Build ID:
|
|
4
|
-
<!-- APM Version: 0.
|
|
5
|
-
<!-- Source: local -->
|
|
3
|
+
<!-- Build ID: 971609428c97 -->
|
|
4
|
+
<!-- APM Version: 0.20.0 -->
|
|
6
5
|
|
|
7
6
|
## Global Instructions
|
|
8
7
|
|
|
9
|
-
<!-- Source: local .apm/instructions/jahia.instructions.md -->
|
|
10
8
|
# Jahia JavaScript Module Development
|
|
11
9
|
|
|
12
10
|
## Context
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jahia/agentic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A CLI to bootstrap an agentic harness for Jahia",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "git+https://github.com/Jahia/agentic.git"
|
|
8
9
|
},
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"type": "module",
|
|
11
10
|
"bin": "./dist/index.js",
|
|
12
11
|
"files": [
|
|
13
12
|
"dist"
|
|
14
13
|
],
|
|
14
|
+
"type": "module",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"benchmark": "node src/benchmark/index.ts",
|
|
17
17
|
"build": "node src/build/index.ts",
|