@pippit-dev/cli 0.0.28 → 0.0.29

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/checksums.txt CHANGED
@@ -1,6 +1,6 @@
1
- 91f6452453768a4af724e7f478c1d5834b117dfd57545eb28f79838bcefee72c pippit-tool-cli-0.0.28-darwin-amd64.tar.gz
2
- 72784be227214d5821793241ec19c0d41227cbcf1bf10b8d8a3675b8a1093219 pippit-tool-cli-0.0.28-darwin-arm64.tar.gz
3
- 1b7197befef5930b91816a1021a7ab66b9f3d95c0cbd5b0ba5fea20c1a7a1173 pippit-tool-cli-0.0.28-linux-amd64.tar.gz
4
- 2452ba5f9dc74b516af47e4e4620cfcc247ffe0b2d46a847681910442535f62b pippit-tool-cli-0.0.28-linux-arm64.tar.gz
5
- bdb744c4e3cc57774c97148665ba99a6952fd4a1293902728e16a655544b20dc pippit-tool-cli-0.0.28-windows-amd64.zip
6
- 52e660a8b334067fa056021dcf68f1bb13a0385f6792a45b93277463cd583200 pippit-tool-cli-0.0.28-windows-arm64.zip
1
+ c444ddc4fab86a19832f60148c8ce6d51e269796fa15f72a54465b7d763ee70e pippit-tool-cli-0.0.29-darwin-amd64.tar.gz
2
+ 64c24941c80b7ce592ca0875fae671fa704e0798416d1f13a2168cd6d37b28b2 pippit-tool-cli-0.0.29-darwin-arm64.tar.gz
3
+ 551e089b4a533a9ca6fcdb8c3978b48442a2b16ed4d91ed10e789454910f402d pippit-tool-cli-0.0.29-linux-amd64.tar.gz
4
+ b968b76e2486a04b82bf4fed90859428e076f827a61f692522cf6023772830a6 pippit-tool-cli-0.0.29-linux-arm64.tar.gz
5
+ 661f9bd514d04ff1a38143f2b0196fa5dffbd7a8634fac27072d0f9ce71026c1 pippit-tool-cli-0.0.29-windows-amd64.zip
6
+ 26bc973e153cf781244cc1cc6175af2d6650563083e9ac1a2061f28932ff6560 pippit-tool-cli-0.0.29-windows-arm64.zip
@@ -143,7 +143,7 @@ func newShortDramaDownloadResultCommand(stdout, stderr io.Writer, runner *common
143
143
  }
144
144
 
145
145
  func newShortDramaGetThreadCommand(stdout, stderr io.Writer, runner *common.Runner) *cobra.Command {
146
- var opts short_drama.GetThreadOptions
146
+ var opts common.GetThreadOptions
147
147
 
148
148
  cmd := &cobra.Command{
149
149
  Use: "+get-thread",
@@ -161,7 +161,7 @@ func newShortDramaGetThreadCommand(stdout, stderr io.Writer, runner *common.Runn
161
161
  }
162
162
  opts.RunID = strings.TrimSpace(opts.RunID)
163
163
 
164
- result, err := short_drama.GetThread(cmd.Context(), &opts, runner)
164
+ result, err := common.GetThread(cmd.Context(), &opts, runner)
165
165
  if err != nil {
166
166
  return err
167
167
  }
@@ -180,8 +180,6 @@ func reportSkillTelemetry(payload telemetryPayload) error {
180
180
  }
181
181
  req.Header.Set("Content-Type", "application/json")
182
182
  req.Header.Set("Authorization", telemetryAuthHeader)
183
- req.Header.Set("x-use-ppe", "1")
184
- req.Header.Set("x-tt-env", "ppe_harness_novel_v2")
185
183
 
186
184
  resp, err := telemetryHTTPClient.Do(req)
187
185
  if err != nil {
@@ -77,14 +77,12 @@ func TestCleanupLegacyGlobalSkills(t *testing.T) {
77
77
 
78
78
  func TestReportSkillTelemetry(t *testing.T) {
79
79
  var gotAuth string
80
- var gotHeaders http.Header
81
80
  var gotPayload telemetryPayload
82
81
  server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
83
82
  if r.URL.Path != telemetryPath {
84
83
  t.Fatalf("path = %q, want %q", r.URL.Path, telemetryPath)
85
84
  }
86
85
  gotAuth = r.Header.Get("Authorization")
87
- gotHeaders = r.Header.Clone()
88
86
  if err := json.NewDecoder(r.Body).Decode(&gotPayload); err != nil {
89
87
  t.Fatalf("decode request body: %v", err)
90
88
  }
@@ -107,12 +105,6 @@ func TestReportSkillTelemetry(t *testing.T) {
107
105
  if gotAuth != telemetryAuthHeader {
108
106
  t.Fatalf("Authorization = %q, want %q", gotAuth, telemetryAuthHeader)
109
107
  }
110
- if got := gotHeaders.Get("x-use-ppe"); got != "1" {
111
- t.Fatalf("x-use-ppe = %q, want 1", got)
112
- }
113
- if got := gotHeaders.Get("x-tt-env"); got != "ppe_harness_novel_v2" {
114
- t.Fatalf("x-tt-env = %q, want ppe_harness_novel_v2", got)
115
- }
116
108
  if gotPayload.Event != "update" || gotPayload.SkillName != "xyq-skill" || gotPayload.Source != "cli_update" {
117
109
  t.Fatalf("payload = %#v", gotPayload)
118
110
  }
@@ -202,8 +202,6 @@ func (c *httpClient) injectHeaders(req *http.Request) {
202
202
  }
203
203
  }
204
204
  req.Header.Set("User-Agent", "Pippit-CLI/1.0")
205
- req.Header.Set("x-use-ppe", "1")
206
- req.Header.Set("x-tt-env", "ppe_harness_novel_v2")
207
205
  }
208
206
 
209
207
  func (c *httpClient) do(req *http.Request, out any) error {
@@ -1,10 +1,9 @@
1
- package short_drama
1
+ package common
2
2
 
3
3
  import (
4
4
  "context"
5
5
  "fmt"
6
6
 
7
- "github.com/Pippit-dev/pippit-cli/internal/common"
8
7
  "github.com/Pippit-dev/pippit-cli/internal/config"
9
8
  )
10
9
 
@@ -29,7 +28,7 @@ type getThreadResponse struct {
29
28
  } `json:"data"`
30
29
  }
31
30
 
32
- func GetThread(ctx context.Context, opts *GetThreadOptions, runner *common.Runner) (*GetThreadResult, error) {
31
+ func GetThread(ctx context.Context, opts *GetThreadOptions, runner *Runner) (*GetThreadResult, error) {
33
32
  if runner == nil || runner.Client == nil {
34
33
  return nil, fmt.Errorf("get_thread runner client is required")
35
34
  }
@@ -61,7 +60,7 @@ func GetThread(ctx context.Context, opts *GetThreadOptions, runner *common.Runne
61
60
  }, nil
62
61
  }
63
62
 
64
- func getThreadPath(runner *common.Runner) string {
63
+ func getThreadPath(runner *Runner) string {
65
64
  if runner != nil && runner.Config != nil && runner.Config.Paths != nil && runner.Config.Paths.GetThread != "" {
66
65
  return runner.Config.Paths.GetThread
67
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pippit-dev/cli",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "description": "Pippit CLI",
5
5
  "bin": {
6
6
  "pippit-tool-cli": "scripts/run.js"
@@ -48,8 +48,6 @@ function reportSkillTelemetry(payload) {
48
48
  "Content-Type": "application/json",
49
49
  "Content-Length": Buffer.byteLength(body),
50
50
  "Authorization": AUTH_HEADER,
51
- "x-use-ppe": "1",
52
- "x-tt-env": "ppe_harness_novel_v2",
53
51
  },
54
52
  }, (res) => {
55
53
  res.resume();