@jfrog/opencode-jfrog-plugin 0.0.2 → 0.0.4

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 (34) hide show
  1. package/README.md +105 -51
  2. package/dist/index.js +30 -238
  3. package/package.json +6 -6
  4. package/skills/jfrog/SKILL.md +529 -0
  5. package/skills/jfrog/assets/.gitkeep +0 -0
  6. package/skills/jfrog/references/apptrust-entities.md +154 -0
  7. package/skills/jfrog/references/artifactory-api-gaps.md +206 -0
  8. package/skills/jfrog/references/artifactory-aql-syntax.md +656 -0
  9. package/skills/jfrog/references/artifactory-entities.md +236 -0
  10. package/skills/jfrog/references/artifactory-operations.md +178 -0
  11. package/skills/jfrog/references/catalog-entities.md +219 -0
  12. package/skills/jfrog/references/general-bulk-operations-and-agent-patterns.md +93 -0
  13. package/skills/jfrog/references/general-parallel-execution.md +131 -0
  14. package/skills/jfrog/references/general-use-case-hints.md +27 -0
  15. package/skills/jfrog/references/jfrog-brand-html-report.md +98 -0
  16. package/skills/jfrog/references/jfrog-cli-install-upgrade.md +30 -0
  17. package/skills/jfrog/references/jfrog-entity-index.md +112 -0
  18. package/skills/jfrog/references/jfrog-login-flow.md +132 -0
  19. package/skills/jfrog/references/jfrog-url-references.md +51 -0
  20. package/skills/jfrog/references/onemodel-common-patterns.md +323 -0
  21. package/skills/jfrog/references/onemodel-graphql.md +446 -0
  22. package/skills/jfrog/references/onemodel-query-examples.md +753 -0
  23. package/skills/jfrog/references/platform-access-entities.md +200 -0
  24. package/skills/jfrog/references/platform-admin-api-gaps.md +164 -0
  25. package/skills/jfrog/references/platform-admin-operations.md +58 -0
  26. package/skills/jfrog/references/projects-api.md +241 -0
  27. package/skills/jfrog/references/release-lifecycle-entities.md +180 -0
  28. package/skills/jfrog/references/stored-packages-entities.md +165 -0
  29. package/skills/jfrog/references/xray-entities.md +740 -0
  30. package/skills/jfrog/scripts/check-environment.sh +224 -0
  31. package/skills/jfrog/scripts/jfrog-login-register-session.sh +84 -0
  32. package/skills/jfrog/scripts/jfrog-login-save-credentials.sh +128 -0
  33. package/skills/jfrog-package-safety-and-download/SKILL.md +275 -0
  34. package/sync-skills-vendor.json +5 -0
@@ -0,0 +1,51 @@
1
+ # JFrog Documentation URLs
2
+
3
+ ## CLI and Integrations
4
+
5
+ - JFrog CLI: https://docs.jfrog.com/integrations/docs/jfrog-cli
6
+ - JFrog CLI Quick Start: https://docs.jfrog.com/integrations/docs/quick-start
7
+ - JFrog CLI Install: https://docs.jfrog.com/integrations/docs/install-jfrog-cli
8
+ - JFrog CLI Configuration: https://docs.jfrog.com/integrations/docs/cli-configuration
9
+ - JFrog CLI Command Reference: https://docs.jfrog.com/integrations/docs/jfrog-cli-command-reference
10
+ - JFrog API Overview: https://docs.jfrog.com/integrations/docs/jfrog-api
11
+ - JFrog OneModel GraphQL: https://docs.jfrog.com/integrations/docs/jfrog-one-model-graphql
12
+ - JFrog Integrations: https://docs.jfrog.com/integrations/docs
13
+
14
+ ## API References (interactive OpenAPI)
15
+
16
+ - Artifactory API Reference: https://docs.jfrog.com/artifactory/reference
17
+ - Security/Xray API Reference: https://docs.jfrog.com/security/reference
18
+ - Governance/Lifecycle API Reference: https://docs.jfrog.com/governance/reference
19
+ - Administration API Reference: https://docs.jfrog.com/administration/reference
20
+ - Projects API Reference: https://docs.jfrog.com/projects/reference
21
+
22
+ ## Product Documentation (Guides)
23
+
24
+ - Binary Management (Artifactory): https://docs.jfrog.com/artifactory/docs
25
+ - Security (Xray, Curation, Advanced Security): https://docs.jfrog.com/security/docs
26
+ - Security CLI: https://docs.jfrog.com/security/docs/cli
27
+ - Security APIs: https://docs.jfrog.com/security/docs/apis
28
+ - Governance and Lifecycle: https://docs.jfrog.com/governance/docs
29
+ - AI/ML: https://docs.jfrog.com/ai-ml/docs
30
+ - User Management: https://docs.jfrog.com/user-management/docs
31
+ - Projects: https://docs.jfrog.com/projects/docs
32
+ - Basic Projects Terminology: https://docs.jfrog.com/projects/docs/basic-projects-terminology
33
+ - Administration: https://docs.jfrog.com/administration/docs
34
+ - Environments (Administration): https://docs.jfrog.com/administration/docs/environments
35
+
36
+ ## Brand and legal
37
+
38
+ - JFrog Brand Guidelines: https://jfrog.com/brand-guidelines/
39
+
40
+ ## Specific Topics
41
+
42
+ - Artifactory AQL: https://docs.jfrog.com/artifactory/docs/artifactory-query-language
43
+ - Repository Management: https://docs.jfrog.com/artifactory/docs/get-started-with-repositories
44
+ - Build Integration: https://docs.jfrog.com/integrations/docs/about-build-info
45
+ - Xray Watches: https://docs.jfrog.com/security/docs/watches-in-jfrog-xray
46
+ - Xray Policies: https://docs.jfrog.com/security/docs/create-policies
47
+ - Evidence Management: https://docs.jfrog.com/governance/docs/evidence-management
48
+ - Release Lifecycle: https://docs.jfrog.com/governance/docs/release-lifecycle-management
49
+ - AppTrust: https://docs.jfrog.com/governance/docs/apptrust-overview
50
+ - Access Tokens: https://docs.jfrog.com/administration/docs/access-tokens
51
+ - Permissions: https://docs.jfrog.com/administration/docs/permissions
@@ -0,0 +1,323 @@
1
+ # OneModel GraphQL common patterns
2
+
3
+ General GraphQL patterns and conventions that apply across OneModel domains.
4
+ Concrete field names and filter arguments **always** come from the resolved
5
+ schema at `GET /onemodel/api/v1/supergraph/schema`.
6
+
7
+ **When to read this file:** Pagination, filtering, ordering, variables, date
8
+ formatting, or interpreting OneModel JSON responses. For the end-to-end
9
+ workflow, read `onemodel-graphql.md`.
10
+
11
+ In shell examples below, `<skill_path>` is this skill's directory.
12
+
13
+ ## Pagination
14
+
15
+ OneModel uses cursor-based pagination following the Relay specification.
16
+
17
+ ### Forward pagination
18
+
19
+ Use `first` (page size) and `after` (cursor):
20
+
21
+ ```graphql
22
+ query {
23
+ evidence {
24
+ searchEvidence(
25
+ first: 20
26
+ after: "<endCursor-from-previous-page>"
27
+ where: { hasSubjectWith: { repositoryKey: "my-repo-local" } }
28
+ ) {
29
+ edges {
30
+ node {
31
+ predicateSlug
32
+ verified
33
+ }
34
+ cursor
35
+ }
36
+ pageInfo {
37
+ hasNextPage
38
+ endCursor
39
+ }
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ **To fetch all pages:**
46
+
47
+ 1. First request: omit `after` for the first page.
48
+ 2. If `pageInfo.hasNextPage` is true, pass `pageInfo.endCursor` as `after`.
49
+ 3. Repeat until `hasNextPage` is false.
50
+
51
+ ### Backward pagination
52
+
53
+ Some connections support `last` and `before` (for example `publicPackages.searchPackages`). **`evidence.searchEvidence` does not** — it only accepts `first` and `after`; use forward pagination for evidence.
54
+
55
+ Example (public catalog):
56
+
57
+ ```graphql
58
+ query {
59
+ publicPackages {
60
+ searchPackages(last: 10, before: "<cursor>", where: { type: "npm" }) {
61
+ pageInfo {
62
+ hasPreviousPage
63
+ startCursor
64
+ }
65
+ edges {
66
+ node {
67
+ name
68
+ type
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ **Rules:**
77
+
78
+ - `first/after` and `last/before` are mutually exclusive on the same field when both are supported.
79
+ - If no pagination args are provided, the first page is returned (server default
80
+ page size applies).
81
+ - Always confirm pagination arguments on the specific field in the supergraph schema.
82
+
83
+ ## Filtering
84
+
85
+ Use `where` arguments to narrow results. Look up each query's `WhereInput` type
86
+ in the schema for available fields.
87
+
88
+ ### Evidence domain
89
+
90
+ ```graphql
91
+ searchEvidence(
92
+ where: {
93
+ hasSubjectWith: {
94
+ repositoryKey: "my-repo-local"
95
+ path: "path/to"
96
+ name: "file.ext"
97
+ }
98
+ }
99
+ ) { ... }
100
+ ```
101
+
102
+ ### Applications domain
103
+
104
+ ```graphql
105
+ searchApplications(
106
+ where: {
107
+ projectKey: "my-project"
108
+ nameContains: "store"
109
+ criticality: "high"
110
+ }
111
+ first: 25
112
+ ) { ... }
113
+ ```
114
+
115
+ ### Stored packages domain
116
+
117
+ `type` is often required; add `name`, `projectKey`, etc. per schema:
118
+
119
+ ```graphql
120
+ searchPackages(
121
+ where: { type: "docker", name: "my-image" }
122
+ first: 20
123
+ ) { ... }
124
+ ```
125
+
126
+ To search **versions** of a package, use `searchPackageVersions` with package criteria under `hasPackageWith` (not top-level `type` / `name` on the version filter):
127
+
128
+ ```graphql
129
+ searchPackageVersions(
130
+ where: { hasPackageWith: [{ type: "npm", name: "@scope/pkg" }] }
131
+ first: 20
132
+ ) { ... }
133
+ ```
134
+
135
+ ### Public packages domain
136
+
137
+ ```graphql
138
+ searchPackages(
139
+ where: { type: "npm", nameContains: "lodash" }
140
+ first: 20
141
+ ) { ... }
142
+ ```
143
+
144
+ ### Release lifecycle domain
145
+
146
+ Some filters apply on connection fields:
147
+
148
+ ```graphql
149
+ artifactsConnection(
150
+ first: 50
151
+ where: { hasEvidence: true }
152
+ ) { ... }
153
+ ```
154
+
155
+ ## Ordering
156
+
157
+ Use `orderBy` only where the schema defines it. **`evidence.searchEvidence` has no `orderBy` argument.**
158
+
159
+ Example (applications):
160
+
161
+ ```graphql
162
+ query {
163
+ applications {
164
+ searchApplications(
165
+ first: 20
166
+ orderBy: { field: NAME, direction: DESC }
167
+ where: { projectKey: "my-project" }
168
+ ) {
169
+ edges {
170
+ node {
171
+ key
172
+ displayName
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ ```
179
+
180
+ - `field` — sort field (enum or type per schema)
181
+ - `direction` — `ASC` or `DESC`
182
+
183
+ Not every query supports `orderBy` — verify in the schema.
184
+
185
+ ## Variables
186
+
187
+ Use GraphQL variables instead of string interpolation in the query text.
188
+
189
+ ### Query definition
190
+
191
+ ```graphql
192
+ query GetEvidence($repoKey: String!, $path: String!, $name: String!) {
193
+ evidence {
194
+ getEvidence(
195
+ repositoryKey: $repoKey
196
+ path: $path
197
+ name: $name
198
+ ) {
199
+ evidenceId
200
+ verified
201
+ }
202
+ }
203
+ }
204
+ ```
205
+
206
+ ### `jf api` with variables
207
+
208
+ Build the JSON body with `jq -n` into a **file**, then pass the file to
209
+ `jf api` with `--input` — do not hand-escape quotes inside the query:
210
+
211
+ ```bash
212
+ QUERY='query GetEvidence($repoKey: String!, $path: String!, $name: String!) { evidence { getEvidence(repositoryKey: $repoKey, path: $path, name: $name) { evidenceId verified } } }'
213
+
214
+ PAYLOAD_FILE="/tmp/onemodel-payload-$$.json"
215
+ RESPONSE_FILE="/tmp/onemodel-response-$$.json"
216
+
217
+ jq -n \
218
+ --arg q "$QUERY" \
219
+ --arg repoKey "example-repo-local" \
220
+ --arg path "path/to" \
221
+ --arg name "file.ext" \
222
+ '{"query": $q, "variables": {"repoKey": $repoKey, "path": $path, "name": $name}}' \
223
+ > "$PAYLOAD_FILE"
224
+
225
+ jf api /onemodel/api/v1/graphql \
226
+ -X POST -H "Content-Type: application/json" \
227
+ --input "$PAYLOAD_FILE" \
228
+ > "$RESPONSE_FILE"
229
+
230
+ jq . "$RESPONSE_FILE"
231
+ ```
232
+
233
+ Pass `--server-id <id>` to `jf api` when targeting a non-default server
234
+ (see `onemodel-graphql.md` step 1).
235
+
236
+ Echo `$RESPONSE_FILE` if a follow-up Shell call must read it (see SKILL.md
237
+ *Preserving command output*).
238
+
239
+ ## Date formatting
240
+
241
+ Fields ending in `...At` (e.g. `createdAt`) default to ISO-8601 UTC:
242
+ `2024-11-05T13:15:30.972Z`
243
+
244
+ Use the `@dateFormat` directive where supported:
245
+
246
+ ```graphql
247
+ query {
248
+ evidence {
249
+ searchEvidence(
250
+ first: 5
251
+ where: { hasSubjectWith: { repositoryKey: "my-repo-local" } }
252
+ ) {
253
+ edges {
254
+ node {
255
+ createdAt @dateFormat(format: DD_MMM_YYYY)
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
261
+ ```
262
+
263
+ Common formats (verify enum values in schema):
264
+
265
+ - Default: ISO-8601 UTC
266
+ - `DD_MMM_YYYY` — e.g. `05 Nov 2024`
267
+ - `ISO8601_DATE_ONLY` — e.g. `2024-11-05`
268
+
269
+ ## Response structure
270
+
271
+ ### Successful response
272
+
273
+ ```json
274
+ {
275
+ "data": {
276
+ "<namespace>": {
277
+ "<queryName>": {
278
+ "edges": [
279
+ {
280
+ "node": {},
281
+ "cursor": "abc123"
282
+ }
283
+ ],
284
+ "pageInfo": {
285
+ "hasNextPage": true,
286
+ "endCursor": "abc123"
287
+ },
288
+ "totalCount": 42
289
+ }
290
+ }
291
+ }
292
+ }
293
+ ```
294
+
295
+ - `edges` — each item has `node` and optional `cursor`
296
+ - `pageInfo` — pagination metadata
297
+ - `totalCount` — not every connection exposes it; if validation fails, omit it
298
+ and use `pageInfo` only
299
+
300
+ ### Error response
301
+
302
+ ```json
303
+ {
304
+ "errors": [
305
+ {
306
+ "message": "description of what went wrong",
307
+ "path": ["evidence", "searchEvidence"],
308
+ "extensions": {
309
+ "code": "GRAPHQL_VALIDATION_FAILED"
310
+ }
311
+ }
312
+ ]
313
+ }
314
+ ```
315
+
316
+ Errors and `data` can coexist — partial success is possible.
317
+
318
+ ## Experimental and deprecated fields
319
+
320
+ - `@experimental` — may change; use with caution.
321
+ - `@deprecated` — migrate to replacements listed in the schema.
322
+
323
+ Check directives when exploring the supergraph schema file.