From 87780eb7d4bbb0df65fde3ecfbc74bfa191c04b7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 02:03:34 +0000 Subject: [PATCH 1/5] chore(internal): codegen related update --- go.mod | 2 -- go.sum | 5 ----- 2 files changed, 7 deletions(-) diff --git a/go.mod b/go.mod index a000854..05dad28 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ require ( github.com/charmbracelet/bubbletea v1.3.6 github.com/charmbracelet/lipgloss v1.1.0 github.com/charmbracelet/x/term v0.2.1 - github.com/context-dot-dev/context-go-sdk/v2 v2.4.0 github.com/goccy/go-yaml v1.18.0 github.com/itchyny/json2yaml v0.1.4 github.com/muesli/reflow v0.3.0 @@ -38,7 +37,6 @@ require ( github.com/rivo/uniseg v0.4.7 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/sjson v1.2.5 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect golang.org/x/sync v0.15.0 // indirect golang.org/x/text v0.3.8 // indirect diff --git a/go.sum b/go.sum index e9ff7cd..4b63f4b 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,6 @@ github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payR github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= -github.com/context-dot-dev/context-go-sdk/v2 v2.4.0 h1:mehuyGuUzgflR7rQpSlPaH7lNj2A8hdtf1+WG4U4h1I= -github.com/context-dot-dev/context-go-sdk/v2 v2.4.0/go.mod h1:CvRANWLP0FHj5XyUwzEVX79ujdwr/2Jy375UVzKNQm8= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -57,7 +55,6 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -65,8 +62,6 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= -github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/urfave/cli-docs/v3 v3.0.0-alpha6 h1:w/l/N0xw1rO/aHRIGXJ0lDwwYFOzilup1qGvIytP3BI= github.com/urfave/cli-docs/v3 v3.0.0-alpha6/go.mod h1:p7Z4lg8FSTrPB9GTaNyTrK3ygffHZcK3w0cU2VE+mzU= github.com/urfave/cli/v3 v3.3.2 h1:BYFVnhhZ8RqT38DxEYVFPPmGFTEf7tJwySTXsVRrS/o= From 0b487b175434d6db1ce66501382164a55b68c557 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 04:09:54 +0000 Subject: [PATCH 2/5] feat(api): api update --- go.mod | 2 ++ go.sum | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/go.mod b/go.mod index 05dad28..12f3f67 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/charmbracelet/bubbletea v1.3.6 github.com/charmbracelet/lipgloss v1.1.0 github.com/charmbracelet/x/term v0.2.1 + github.com/context-dot-dev/context-go-sdk/v2 v2.5.0 github.com/goccy/go-yaml v1.18.0 github.com/itchyny/json2yaml v0.1.4 github.com/muesli/reflow v0.3.0 @@ -37,6 +38,7 @@ require ( github.com/rivo/uniseg v0.4.7 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/sjson v1.2.5 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect golang.org/x/sync v0.15.0 // indirect golang.org/x/text v0.3.8 // indirect diff --git a/go.sum b/go.sum index 4b63f4b..2e31ee8 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,8 @@ github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payR github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= +github.com/context-dot-dev/context-go-sdk/v2 v2.5.0 h1:FK79MDMznyABXAUjRGO44Xmvl6Bi0nz1HBSlwYyMU6U= +github.com/context-dot-dev/context-go-sdk/v2 v2.5.0/go.mod h1:CvRANWLP0FHj5XyUwzEVX79ujdwr/2Jy375UVzKNQm8= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -55,6 +57,7 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -62,6 +65,8 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/urfave/cli-docs/v3 v3.0.0-alpha6 h1:w/l/N0xw1rO/aHRIGXJ0lDwwYFOzilup1qGvIytP3BI= github.com/urfave/cli-docs/v3 v3.0.0-alpha6/go.mod h1:p7Z4lg8FSTrPB9GTaNyTrK3ygffHZcK3w0cU2VE+mzU= github.com/urfave/cli/v3 v3.3.2 h1:BYFVnhhZ8RqT38DxEYVFPPmGFTEf7tJwySTXsVRrS/o= From 3c2c3c2daf40ad8df4df6b9861ed88291b539f91 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 25 Jul 2026 07:12:58 +0000 Subject: [PATCH 3/5] feat(api): api update --- .stats.yml | 4 ++-- pkg/cmd/monitor.go | 22 ++++++++++------------ pkg/cmd/monitor_test.go | 22 +++++++++++----------- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0ac1eb3..6da4682 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-242450ea46eb8c3e843fd6c4bf87e73192b5f62f6da697cd091d13c6aa7a991b.yml -openapi_spec_hash: c1c561976de1abcacede71fd5ab9b3d9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-2bf2b44f6593c44b2948683469bbb2b09cd8e90c97b12057fac6220cf0d2eee7.yml +openapi_spec_hash: ae8b5109ec997cac8d3e6ec96040f6c8 config_hash: 70e7e80b5e87f94981bee396c6cd41e8 diff --git a/pkg/cmd/monitor.go b/pkg/cmd/monitor.go index 1842db3..fac0f1c 100644 --- a/pkg/cmd/monitor.go +++ b/pkg/cmd/monitor.go @@ -19,34 +19,32 @@ var monitorsCreate = requestflag.WithInnerFlags(cli.Command{ Usage: "Creates a monitor. The request body is a union of the supported target/change\ndetection combinations. The monitor runs immediately after creation to create\nits initial baseline.", Suggest: true, Flags: []cli.Flag{ - &requestflag.Flag[map[string]any]{ - Name: "change-detection", - Usage: "Discriminated union describing how changes are detected.", - Required: true, - BodyPath: "change_detection", - }, &requestflag.Flag[string]{ Name: "name", Required: true, BodyPath: "name", }, - &requestflag.Flag[map[string]any]{ - Name: "schedule", - Usage: "Run the monitor on a fixed interval defined by a frequency and a unit, e.g. every 6 hours or every 2 days. The total interval (frequency × unit) must be between 10 minutes and 1 year.", - Required: true, - BodyPath: "schedule", - }, &requestflag.Flag[map[string]any]{ Name: "target", Usage: "Discriminated union describing what the monitor watches.", Required: true, BodyPath: "target", }, + &requestflag.Flag[map[string]any]{ + Name: "change-detection", + Usage: "Discriminated union describing how changes are detected.", + BodyPath: "change_detection", + }, &requestflag.Flag[string]{ Name: "mode", Usage: "Top-level monitor category. Always `web` today; the concrete behavior is described by `target` and `change_detection`.", BodyPath: "mode", }, + &requestflag.Flag[map[string]any]{ + Name: "schedule", + Usage: "Run the monitor on a fixed interval defined by a frequency and a unit, e.g. every 6 hours or every 2 days. The total interval (frequency × unit) must be between 10 minutes and 1 year.", + BodyPath: "schedule", + }, &requestflag.Flag[[]string]{ Name: "tag", Usage: "User-defined tags for grouping and filtering monitors and their changes. Duplicates are removed.", diff --git a/pkg/cmd/monitor_test.go b/pkg/cmd/monitor_test.go index 40e2c3c..ddfa7fb 100644 --- a/pkg/cmd/monitor_test.go +++ b/pkg/cmd/monitor_test.go @@ -16,11 +16,11 @@ func TestMonitorsCreate(t *testing.T) { t, "--api-key", "string", "monitors", "create", - "--change-detection", "{type: exact}", "--name", "Acme pricing page", - "--schedule", "{frequency: 6, type: interval, unit: hours}", "--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}", + "--change-detection", "{type: exact}", "--mode", "web", + "--schedule", "{frequency: 6, type: interval, unit: hours}", "--tag", "pricing", "--tag", "competitor", "--webhook", "{url: https://example.com/webhook, events: [change.detected, run.completed]}", @@ -36,13 +36,13 @@ func TestMonitorsCreate(t *testing.T) { t, "--api-key", "string", "monitors", "create", - "--change-detection", "{type: exact}", "--name", "Acme pricing page", + "--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}", + "--change-detection", "{type: exact}", + "--mode", "web", "--schedule.frequency", "6", "--schedule.type", "interval", "--schedule.unit", "hours", - "--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}", - "--mode", "web", "--tag", "pricing", "--tag", "competitor", "--webhook.url", "https://example.com/webhook", @@ -53,18 +53,18 @@ func TestMonitorsCreate(t *testing.T) { t.Run("piping data", func(t *testing.T) { // Test piping YAML data over stdin pipeData := []byte("" + - "change_detection:\n" + - " type: exact\n" + "name: Acme pricing page\n" + - "schedule:\n" + - " frequency: 6\n" + - " type: interval\n" + - " unit: hours\n" + "target:\n" + " type: page\n" + " url: https://acme.com/pricing\n" + " normalize_whitespace: true\n" + + "change_detection:\n" + + " type: exact\n" + "mode: web\n" + + "schedule:\n" + + " frequency: 6\n" + + " type: interval\n" + + " unit: hours\n" + "tags:\n" + " - pricing\n" + " - competitor\n" + From b8de4ec1e8a39c97e3bbf04dd259c9fa3e8aa44f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 06:43:28 +0000 Subject: [PATCH 4/5] feat(api): api update --- .stats.yml | 4 ++-- pkg/cmd/monitor_test.go | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6da4682..3f4cd2e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-2bf2b44f6593c44b2948683469bbb2b09cd8e90c97b12057fac6220cf0d2eee7.yml -openapi_spec_hash: ae8b5109ec997cac8d3e6ec96040f6c8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-91f4286859fc23813c5255b877395c87dd81520c3913fdfdae3cfa343e1a4873.yml +openapi_spec_hash: 71746b5b65f20617ee021e071d5f7f92 config_hash: 70e7e80b5e87f94981bee396c6cd41e8 diff --git a/pkg/cmd/monitor_test.go b/pkg/cmd/monitor_test.go index ddfa7fb..983650e 100644 --- a/pkg/cmd/monitor_test.go +++ b/pkg/cmd/monitor_test.go @@ -17,7 +17,7 @@ func TestMonitorsCreate(t *testing.T) { "--api-key", "string", "monitors", "create", "--name", "Acme pricing page", - "--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}", + "--target", "{type: page, url: https://acme.com/pricing, instructions: 'Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.', normalize_whitespace: true}", "--change-detection", "{type: exact}", "--mode", "web", "--schedule", "{frequency: 6, type: interval, unit: hours}", @@ -37,7 +37,7 @@ func TestMonitorsCreate(t *testing.T) { "--api-key", "string", "monitors", "create", "--name", "Acme pricing page", - "--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}", + "--target", "{type: page, url: https://acme.com/pricing, instructions: 'Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.', normalize_whitespace: true}", "--change-detection", "{type: exact}", "--mode", "web", "--schedule.frequency", "6", @@ -57,6 +57,9 @@ func TestMonitorsCreate(t *testing.T) { "target:\n" + " type: page\n" + " url: https://acme.com/pricing\n" + + " instructions: >-\n" + + " Report pricing or plan availability changes. Ignore counters, timestamps,\n" + + " testimonials, and navigation.\n" + " normalize_whitespace: true\n" + "change_detection:\n" + " type: exact\n" + @@ -107,7 +110,7 @@ func TestMonitorsUpdate(t *testing.T) { "--status", "active", "--tag", "pricing", "--tag", "competitor", - "--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}", + "--target", "{type: page, url: https://acme.com/pricing, instructions: 'Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.', normalize_whitespace: true}", "--webhook", "{url: https://example.com/webhook, events: [change.detected, run.completed]}", ) }) @@ -130,7 +133,7 @@ func TestMonitorsUpdate(t *testing.T) { "--status", "active", "--tag", "pricing", "--tag", "competitor", - "--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}", + "--target", "{type: page, url: https://acme.com/pricing, instructions: 'Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.', normalize_whitespace: true}", "--webhook.url", "https://example.com/webhook", "--webhook.events", "[change.detected, run.completed]", ) @@ -153,6 +156,9 @@ func TestMonitorsUpdate(t *testing.T) { "target:\n" + " type: page\n" + " url: https://acme.com/pricing\n" + + " instructions: >-\n" + + " Report pricing or plan availability changes. Ignore counters, timestamps,\n" + + " testimonials, and navigation.\n" + " normalize_whitespace: true\n" + "webhook:\n" + " url: https://example.com/webhook\n" + From 9f91a485b5b5d20298cccbdec50f4d5a1257ba0b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 06:43:50 +0000 Subject: [PATCH 5/5] release: 1.2.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ pkg/cmd/version.go | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2601677..d0ab664 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.1.0" + ".": "1.2.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index fdf7d1e..2d03c75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 1.2.0 (2026-07-27) + +Full Changelog: [v1.1.0...v1.2.0](https://github.com/context-dot-dev/context-dev-cli/compare/v1.1.0...v1.2.0) + +### Features + +* **api:** api update ([b8de4ec](https://github.com/context-dot-dev/context-dev-cli/commit/b8de4ec1e8a39c97e3bbf04dd259c9fa3e8aa44f)) +* **api:** api update ([3c2c3c2](https://github.com/context-dot-dev/context-dev-cli/commit/3c2c3c2daf40ad8df4df6b9861ed88291b539f91)) +* **api:** api update ([0b487b1](https://github.com/context-dot-dev/context-dev-cli/commit/0b487b175434d6db1ce66501382164a55b68c557)) + + +### Chores + +* **internal:** codegen related update ([87780eb](https://github.com/context-dot-dev/context-dev-cli/commit/87780eb7d4bbb0df65fde3ecfbc74bfa191c04b7)) + ## 1.1.0 (2026-07-22) Full Changelog: [v1.0.0...v1.1.0](https://github.com/context-dot-dev/context-dev-cli/compare/v1.0.0...v1.1.0) diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go index a47345e..a9464c4 100644 --- a/pkg/cmd/version.go +++ b/pkg/cmd/version.go @@ -2,4 +2,4 @@ package cmd -const Version = "1.1.0" // x-release-please-version +const Version = "1.2.0" // x-release-please-version