@techdivision/opencode-time-tracking 0.1.4 → 0.1.8
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/.github/workflows/publish.yml +32 -0
- package/README.md +2 -3
- package/package.json +6 -13
- package/src/Plugin.ts +2 -8
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Setup Node.js
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: '20'
|
|
24
|
+
registry-url: 'https://registry.npmjs.org'
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: npm ci
|
|
28
|
+
|
|
29
|
+
- name: Publish to npm
|
|
30
|
+
run: npm publish --provenance --access public
|
|
31
|
+
env:
|
|
32
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# opencode-time-tracking
|
|
1
|
+
# @techdivision/opencode-time-tracking
|
|
2
2
|
|
|
3
3
|
Automatic time tracking plugin for OpenCode. Tracks session duration and tool usage, writing entries to a CSV file compatible with Jira worklog sync.
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ Add to your `opencode.json`:
|
|
|
8
8
|
|
|
9
9
|
```json
|
|
10
10
|
{
|
|
11
|
-
"plugin": ["opencode-time-tracking"]
|
|
11
|
+
"plugin": ["@techdivision/opencode-time-tracking"]
|
|
12
12
|
}
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -42,4 +42,3 @@ id,start_date,end_date,user,ticket_name,issue_key,account_key,start_time,end_tim
|
|
|
42
42
|
| Event | When triggered |
|
|
43
43
|
|-------|----------------|
|
|
44
44
|
| `session.idle` | After each complete AI response (including all tool calls) |
|
|
45
|
-
| `session.deleted` | When a session is explicitly deleted |
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techdivision/opencode-time-tracking",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Automatic time tracking plugin for OpenCode - tracks session duration and tool usage to CSV",
|
|
5
5
|
"main": "src/Plugin.ts",
|
|
6
6
|
"types": "src/Plugin.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/techdivision/opencode-time-tracking"
|
|
10
|
+
},
|
|
7
11
|
"keywords": [
|
|
8
12
|
"opencode",
|
|
9
13
|
"plugin",
|
|
@@ -22,16 +26,5 @@
|
|
|
22
26
|
},
|
|
23
27
|
"peerDependencies": {
|
|
24
28
|
"bun": ">=1.0.0"
|
|
25
|
-
}
|
|
26
|
-
"scripts": {
|
|
27
|
-
"test": "npm test"
|
|
28
|
-
},
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "git+https://github.com/techdivision/opencode-time-tracking.git"
|
|
32
|
-
},
|
|
33
|
-
"bugs": {
|
|
34
|
-
"url": "https://github.com/techdivision/opencode-time-tracking/issues"
|
|
35
|
-
},
|
|
36
|
-
"homepage": "https://github.com/techdivision/opencode-time-tracking#readme"
|
|
29
|
+
}
|
|
37
30
|
}
|
package/src/Plugin.ts
CHANGED
|
@@ -47,14 +47,8 @@ export const plugin: Plugin = async ({
|
|
|
47
47
|
const config = await ConfigLoader.load(directory)
|
|
48
48
|
|
|
49
49
|
if (!config) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
message:
|
|
53
|
-
"Time Tracking: No config found. Run /init-time-tracking to create one.",
|
|
54
|
-
variant: "warning",
|
|
55
|
-
},
|
|
56
|
-
})
|
|
57
|
-
|
|
50
|
+
// Silently return empty hooks if no config found
|
|
51
|
+
// Toast notifications don't work during plugin initialization
|
|
58
52
|
return {}
|
|
59
53
|
}
|
|
60
54
|
|