@webship.co/workspace-redmine 0.0.0-stage → 1.0.1
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/LICENSE +15 -0
- package/README.md +179 -2
- package/ai/agents/redmine-issue-worker.md +90 -0
- package/ai/agents/redmine-site-builder.md +106 -0
- package/ai/agents/redmine-tester.md +119 -0
- package/ai/commands/redmine-test.md +66 -0
- package/ai/prompts/redmine-build-and-test.md +28 -0
- package/ai/prompts/redmine-issue-to-branch.md +24 -0
- package/ai/skills/redmine-scenarios/SKILL.md +72 -0
- package/ai/skills/redmine-scenarios/examples/issue.feature +17 -0
- package/ai/skills/redmine-scenarios/examples/roles.feature +16 -0
- package/ai/skills/redmine-scenarios/examples/session.feature +24 -0
- package/commands/cmd-redmine-project.sh +31 -0
- package/commands/cmd-tools-redmine-cli.sh +24 -0
- package/config/plugin.redmine.settings.yml +29 -0
- package/config/settings.labels.yml +57 -0
- package/dist/src/index.d.ts +34 -0
- package/dist/src/index.js +60 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/tracker.d.ts +28 -0
- package/dist/src/lib/tracker.js +308 -0
- package/dist/src/lib/tracker.js.map +1 -0
- package/features/redmine-runtimes.feature +31 -0
- package/features/redmine.feature +53 -0
- package/package.json +118 -4
- package/scripts/args/arg-redmine-cli.sh +28 -0
- package/scripts/args/arg-redmine.sh +31 -0
- package/scripts/docker-compose.redmine.yaml +41 -0
- package/scripts/functions/fun-redmine.sh +576 -0
- package/scripts/redmine-serve.sh +13 -0
- package/scripts/redmine-site.rb +229 -0
- package/testing/site.feature +28 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: redmine-scenarios
|
|
3
|
+
description: Write webship-js scenarios for a Redmine site (the open-source project management and issue tracking software) of the Webship Workspace from phrases that exist — the Redmine step pack's steps by area (logging in and out and a refused login, a project and who may open it, the issue list, one issue with its status, notes, time and assignee, a new issue, a version and the roadmap, what a Reporter or a stranger may not do, test content), the traps found on real sites, and whole features. Use when asked to write, extend or fix scenarios for a Redmine site, or when a scenario of the site fails on a phrase.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# redmine-scenarios
|
|
7
|
+
|
|
8
|
+
Scenarios for a site built with the Redmine plugin (`bash cmd-redmine-project.sh <site> --install --add-users
|
|
9
|
+
--sample-content`) in a container-based workspace (DDEV by default), tested with webship-js and
|
|
10
|
+
`@webship-js/redmine-steps` once `bash cmd-tools-testing.sh <site>` set the project up. Every phrase below exists in the
|
|
11
|
+
pack or in webship-js; a scenario names no platform.
|
|
12
|
+
|
|
13
|
+
## Accounts
|
|
14
|
+
|
|
15
|
+
- `Given I am a logged in user with the "member" user`: `owner` (Manager of Webship site), `member` (Developer),
|
|
16
|
+
`reader` (Reporter), `stranger` (no membership). `Given I am not logged in` for a visitor.
|
|
17
|
+
- The accounts are made by the build (`cmd-tools-redmine-cli.sh <site> --add-users`); a suite never creates or deletes
|
|
18
|
+
one, and never writes a password: it logs in by the handle.
|
|
19
|
+
|
|
20
|
+
## Phrases by area
|
|
21
|
+
|
|
22
|
+
| Area | Steps |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| Session | `I am a logged in user with the "member" user`, `I log in with the "member" user`, `I log in as "member" with the password "…"`, `the login should be refused with "Invalid user or password"`, `I am not logged in`, `I log out`, `I should be logged in as "Member Test"` (or the login, `"member"`), `I should not be logged in` |
|
|
25
|
+
| Projects | `I open the project "webship-site"` (its identifier, or its name "Webship site"), `I should be refused the project "webship-site"` |
|
|
26
|
+
| Test content | `there is an issue "Webship test …" in the project "webship-site"` (it goes after the scenario), `there is no issue "Webship test …" in the project "webship-site"` |
|
|
27
|
+
| The list | `I open the issues of the project "webship-site"`, `the issue list should show "…"` (`should not show`), `I create an issue "Webship test …" in the project "webship-site"` (it goes after the scenario) |
|
|
28
|
+
| One issue | `I open the issue "…"`, `I set the status of the issue to "In Progress"`, `the status of the issue should be "In Progress"`, `I add the note "…" to the issue`, `the issue should show the note "…"` (`… by "Member Test"`), `I log "0.5" hours on the issue` (`… with the comment "…"`), `the time spent on the issue should be "0:30 h"`, `I assign the issue to "Member Test"`, `the issue should be assigned to "Member Test"` |
|
|
29
|
+
| What an account may not do | `I should not be able to change the status of the issue`, `I should not be able to assign the issue`, `I should be refused the project "webship-site"` |
|
|
30
|
+
| Versions | `I open the version "Sprint 1" of the project "webship-site"`, `the version should be "open"`, `the version should list the issue "…"` (`should not list`), `I open the roadmap of the project "webship-site"`, `the roadmap should list the version "Sprint 1"` (`should not list`) |
|
|
31
|
+
|
|
32
|
+
## The sample content
|
|
33
|
+
|
|
34
|
+
`--sample-content` adds, in Webship site: "The greeting script says Helo instead of Hello" (a Bug by the owner, In
|
|
35
|
+
Progress, assigned to Member Test, in the version "Sprint 1", with the owner's note "The script is in the project's
|
|
36
|
+
repository: `greeting.sh`."), "The usage page spells greeting as greting" (a Bug by the member, New) and "An issue
|
|
37
|
+
opened by someone outside the project" (a Feature opened by the stranger). A suite reads them and never changes them.
|
|
38
|
+
|
|
39
|
+
## Traps found on real sites
|
|
40
|
+
|
|
41
|
+
- A note stays in the history: change only an issue the scenario made (`there is an issue "Webship test …"`), which
|
|
42
|
+
goes after it with all of it.
|
|
43
|
+
- The list shows the open issues: one moved to "Closed" leaves it.
|
|
44
|
+
- An issue changes through its update form; the steps open it ("Edit") and send it, and wait for "Successful update.".
|
|
45
|
+
- Time needs an activity; the step takes the site's first. The spent time shows as "0:30 h".
|
|
46
|
+
- A Reporter adds notes and logs time; the form shows no status and no assignee to it.
|
|
47
|
+
- A project an account may not open answers 403: tag those scenarios `@js-off`, and a refused login too.
|
|
48
|
+
- The roadmap lists only the trackers that are in the roadmap (not Bug): check an issue on its version's page.
|
|
49
|
+
- A run that was stopped half way leaves its "Webship test …" issues: `bash cmd-tools-redmine-cli.sh <site> --tidy`
|
|
50
|
+
removes them, with their time.
|
|
51
|
+
|
|
52
|
+
## Whole features
|
|
53
|
+
|
|
54
|
+
`examples/` holds three features that pass on a site built with `--install --add-users --sample-content`: the session
|
|
55
|
+
(`session.feature`), an issue worked by a member (`issue.feature`) and the roles (`roles.feature`).
|
|
56
|
+
|
|
57
|
+
## The book
|
|
58
|
+
|
|
59
|
+
For any automated functional testing in this work (a Gherkin feature, a step definition, choosing a
|
|
60
|
+
step, a test run and its failures), read the book *Automated Functional Testing Recipes* first.
|
|
61
|
+
|
|
62
|
+
- **Where.** Use the first that exists: `.claude/automated-functional-testing-recipes/` in the project,
|
|
63
|
+
`~/.claude/automated-functional-testing-recipes/` (installed by webship/webship-js-ai-agent,
|
|
64
|
+
webship/webship-js-skills or webship/ai-agents), or
|
|
65
|
+
https://github.com/webship/webship-js-ai-agent/tree/2.0.x/automated-functional-testing-recipes
|
|
66
|
+
- **How.** Its `README.md` first, then the chapter that matches the task (one file per chapter,
|
|
67
|
+
named by its subject), not the single complete file.
|
|
68
|
+
- **Which wins.** The installed webship-js package and the step pack are the source of truth for
|
|
69
|
+
step phrasing. When they differ from the book, follow them and say so.
|
|
70
|
+
- **For a site.** Start with `ch10-authentication-authorization.md` (logins, refusals and what each role may do),
|
|
71
|
+
`ch07-waiting-dynamic-content.md` (waiting on the app's own signals) and `ch26-testing-cms-applications.md`
|
|
72
|
+
(content made and removed, roles, a workflow across roles).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@issues
|
|
2
|
+
Feature: An issue worked by a member
|
|
3
|
+
A member moves an issue of its own through the workflow, adds a note to it, logs time on it and assigns it. The
|
|
4
|
+
issue goes after the scenario, with all of it.
|
|
5
|
+
|
|
6
|
+
Scenario: Its status, a note, the time spent and the assignee
|
|
7
|
+
Given there is an issue "Webship test work" in the project "webship-site"
|
|
8
|
+
And I am a logged in user with the "member" user
|
|
9
|
+
When I open the issue "Webship test work"
|
|
10
|
+
And I set the status of the issue to "In Progress"
|
|
11
|
+
And I add the note "Checked on the test site" to the issue
|
|
12
|
+
And I log "0.5" hours on the issue with the comment "Read the issue"
|
|
13
|
+
And I assign the issue to "Member Test"
|
|
14
|
+
Then the status of the issue should be "In Progress"
|
|
15
|
+
And the issue should show the note "Checked on the test site" by "Member Test"
|
|
16
|
+
And the time spent on the issue should be "0:30 h"
|
|
17
|
+
And the issue should be assigned to "Member Test"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@roles
|
|
2
|
+
Feature: What each account may do in the project
|
|
3
|
+
A Reporter reads the project's issues and adds notes, but neither moves nor assigns them, and an account with no
|
|
4
|
+
membership is refused the project.
|
|
5
|
+
|
|
6
|
+
Scenario: A Reporter neither moves nor assigns an issue
|
|
7
|
+
Given there is an issue "Webship test reporter" in the project "webship-site"
|
|
8
|
+
And I am a logged in user with the "reader" user
|
|
9
|
+
When I open the issue "Webship test reporter"
|
|
10
|
+
Then I should not be able to change the status of the issue
|
|
11
|
+
And I should not be able to assign the issue
|
|
12
|
+
|
|
13
|
+
@js-off
|
|
14
|
+
Scenario: An account with no membership is refused the project
|
|
15
|
+
Given I am a logged in user with the "stranger" user
|
|
16
|
+
Then I should be refused the project "webship-site"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@session
|
|
2
|
+
Feature: Logging in and out
|
|
3
|
+
The accounts of the users registry log in through the login form, a wrong password is refused, and logging out
|
|
4
|
+
ends the session.
|
|
5
|
+
|
|
6
|
+
Scenario: An account logs in through the form and out again
|
|
7
|
+
Given I am not logged in
|
|
8
|
+
When I log in with the "member" user
|
|
9
|
+
Then I should be logged in as "Member Test"
|
|
10
|
+
When I log out
|
|
11
|
+
Then I should not be logged in
|
|
12
|
+
|
|
13
|
+
@js-off
|
|
14
|
+
Scenario: A wrong password is refused
|
|
15
|
+
Given I am not logged in
|
|
16
|
+
When I log in as "member" with the password "not-the-right-password"
|
|
17
|
+
Then the login should be refused with "Invalid user or password"
|
|
18
|
+
And I should not be logged in
|
|
19
|
+
|
|
20
|
+
Scenario: A session of the registry is put back for the next scenario
|
|
21
|
+
Given I am a logged in user with the "owner" user
|
|
22
|
+
Then I should be logged in as "owner"
|
|
23
|
+
Given I am a logged in user with the "member" user
|
|
24
|
+
Then I should be logged in as "Member Test"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# workspace-name: Redmine (project management and issue tracking)
|
|
4
|
+
|
|
5
|
+
# Installed by the Redmine plugin (plugins.sh --install redmine); __WORKSPACE__ is the workspace it was
|
|
6
|
+
# installed into.
|
|
7
|
+
#
|
|
8
|
+
# Build a Redmine site in containers from the official image, on the project's own PostgreSQL: on DDEV at
|
|
9
|
+
# https://<name>.ddev.site (the default), or on Docker Compose with --runtime docker at http://127.0.0.1:<port>. With
|
|
10
|
+
# --install the workspace account is an administrator of the site; with --add-users the default accounts are members
|
|
11
|
+
# of the project Webship site; with --sample-content its issues, its version Sprint 1 and a note.
|
|
12
|
+
|
|
13
|
+
# Bootstrap.
|
|
14
|
+
# Find the workspace tooling from this script, so a fresh clone needs no setup.
|
|
15
|
+
WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
|
|
16
|
+
source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
|
|
17
|
+
|
|
18
|
+
# Load workspace settings.
|
|
19
|
+
eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.__WORKSPACE__.settings.yml);
|
|
20
|
+
|
|
21
|
+
# Distribution.
|
|
22
|
+
distribution_name="redmine";
|
|
23
|
+
distribution_title="Redmine";
|
|
24
|
+
|
|
25
|
+
ARGPARSE_DESCRIPTION="Build an ${distribution_title} site in __WORKSPACE__"
|
|
26
|
+
# The args file comes with the plugin: core/scripts/plugins/redmine/ is where plugins.sh --install puts it.
|
|
27
|
+
source ${WORKSPACE_SCRIPTS}/plugins/redmine/args/arg-redmine.sh || exit 1 ;
|
|
28
|
+
|
|
29
|
+
shift $#;
|
|
30
|
+
|
|
31
|
+
redmine_build ;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Installed by the Redmine plugin (plugins.sh --install redmine); __WORKSPACE__ is the workspace it was
|
|
4
|
+
# installed into.
|
|
5
|
+
#
|
|
6
|
+
# A Redmine site of this folder: what it is and its accounts; --run one of Redmine's own tasks in its
|
|
7
|
+
# container; --add-users and --cancel-users the default accounts; --sample-content the sample content; --tidy what a
|
|
8
|
+
# stopped test run left; --connect the dashboard's Redmine to this site.
|
|
9
|
+
|
|
10
|
+
# Bootstrap.
|
|
11
|
+
# Find the workspace tooling from this script, so a fresh clone needs no setup.
|
|
12
|
+
WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
|
|
13
|
+
source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
|
|
14
|
+
|
|
15
|
+
# Load workspace settings.
|
|
16
|
+
eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.__WORKSPACE__.settings.yml);
|
|
17
|
+
|
|
18
|
+
ARGPARSE_DESCRIPTION="A Redmine site of __WORKSPACE__: what it is, its accounts, Redmine's own tasks"
|
|
19
|
+
# The args file comes with the plugin: core/scripts/plugins/redmine/ is where plugins.sh --install puts it.
|
|
20
|
+
source ${WORKSPACE_SCRIPTS}/plugins/redmine/args/arg-redmine-cli.sh || exit 1 ;
|
|
21
|
+
|
|
22
|
+
shift $#;
|
|
23
|
+
|
|
24
|
+
redmine_cli_tool ;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Redmine — core/config/plugin.redmine.settings.yml
|
|
2
|
+
#
|
|
3
|
+
# The Redmine the dashboard reads issues from: a site the builder made (https://<name>.ddev.site), or
|
|
4
|
+
# your own. The token is the API key of an account there (My account → API access key). Never printed.
|
|
5
|
+
# The Redmine address, without a trailing slash.
|
|
6
|
+
url: CHANGE_ME
|
|
7
|
+
# An API key of the account the dashboard reads (and, with writes on, writes) as.
|
|
8
|
+
token: CHANGE_ME
|
|
9
|
+
# The issues as work items (the tracker family). See @webship.co/workspace-tracker for every key.
|
|
10
|
+
# Writes to Redmine: notes, worklogs (time entries), moves through the workflow, assignees, new issues. Off by default.
|
|
11
|
+
allow_writes: false
|
|
12
|
+
# Author sessions at once.
|
|
13
|
+
max_agents: 1
|
|
14
|
+
# The Redmine project (its identifier) a workspace project works against when it remembers none.
|
|
15
|
+
default_scope: ""
|
|
16
|
+
# The Redmine projects (identifiers) the list may be switched to; empty is any.
|
|
17
|
+
scopes: []
|
|
18
|
+
# branch: a new branch in the project; worktree: a git worktree outside the workspace folders.
|
|
19
|
+
work_in: branch
|
|
20
|
+
# required: Claude Code's sandbox for the author session, and no session without it; off: a person's choice.
|
|
21
|
+
sandbox: required
|
|
22
|
+
# Domains the sandbox allows (the project's package registries).
|
|
23
|
+
network_domains: []
|
|
24
|
+
# WebFetch and WebSearch in the author session.
|
|
25
|
+
allow_web: false
|
|
26
|
+
# The comments a snapshot keeps: members (Managers and Developers), all, none.
|
|
27
|
+
comments_from: members
|
|
28
|
+
# An issue from outside the project (a Reporter, another role, no membership): analyze (work it only after a confirmation that names its author) or refuse.
|
|
29
|
+
outsider_items: analyze
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Labels for core/config/plugin.redmine.settings.yml, merged into the Settings page.
|
|
2
|
+
url:
|
|
3
|
+
label: Redmine address
|
|
4
|
+
info: 'The site the dashboard reads issues from: https://<name>.ddev.site for one the builder made, or your own. No trailing slash.'
|
|
5
|
+
token:
|
|
6
|
+
label: API key
|
|
7
|
+
info: 'The API key of the account the dashboard reads (and, with writes on, writes) as: My account → API access key → Show. Never printed.'
|
|
8
|
+
allow_writes:
|
|
9
|
+
label: Writes to Redmine (issues as work items)
|
|
10
|
+
info: 'Off: the AI works on a branch and nothing leaves this machine. On: you may comment, log time, move through the workflow and assign, each a click after a preview, each a line in actions.log.'
|
|
11
|
+
options:
|
|
12
|
+
"false": "Off — nothing is written to Redmine (default)"
|
|
13
|
+
"true": "On — each write is your click after a preview"
|
|
14
|
+
max_agents:
|
|
15
|
+
label: Author sessions at once
|
|
16
|
+
info: 'How many AI sessions may work issues at the same time. Each is a whole session in a project.'
|
|
17
|
+
number: { min: 1, max: 8, step: 1 }
|
|
18
|
+
default_scope:
|
|
19
|
+
label: Default Redmine project
|
|
20
|
+
info: 'Its identifier: the Redmine project a workspace project works against when it remembers none.'
|
|
21
|
+
scopes:
|
|
22
|
+
label: Redmine projects the list may switch to
|
|
23
|
+
info: 'A list of identifiers. Empty is any. Edit it in the Raw YAML tab.'
|
|
24
|
+
work_in:
|
|
25
|
+
label: Where the AI works
|
|
26
|
+
info: 'A new branch in the project (a running site shows the change), or a git worktree outside the workspace folders (the project stays as it is).'
|
|
27
|
+
options:
|
|
28
|
+
branch: "A branch in the project (default)"
|
|
29
|
+
worktree: "A worktree outside the workspace folders"
|
|
30
|
+
sandbox:
|
|
31
|
+
label: Sandbox for the author session
|
|
32
|
+
info: 'Required: Claude Code''s sandboxed Bash (no network, credentials denied), and no session without it. On Ubuntu 24.04 bubblewrap needs its AppArmor profile (see the tracker''s README). Off: your choice, said in the form.'
|
|
33
|
+
options:
|
|
34
|
+
required: "Required (default)"
|
|
35
|
+
"off": "Off — the session is not sandboxed"
|
|
36
|
+
network_domains:
|
|
37
|
+
label: Domains the sandbox allows
|
|
38
|
+
info: 'The package registries the project needs (registry.npmjs.org, repo.packagist.org…). None by default. Edit it in the Raw YAML tab.'
|
|
39
|
+
allow_web:
|
|
40
|
+
label: Web tools in the author session
|
|
41
|
+
info: 'WebFetch and WebSearch. Off by default: a link in an issue is not opened.'
|
|
42
|
+
options:
|
|
43
|
+
"false": "Off (default)"
|
|
44
|
+
"true": "On"
|
|
45
|
+
comments_from:
|
|
46
|
+
label: Comments the AI reads
|
|
47
|
+
info: 'Members: only comments by Managers and Developers (default). All, or none.'
|
|
48
|
+
options:
|
|
49
|
+
members: "Managers and Developers (default)"
|
|
50
|
+
all: "All comments"
|
|
51
|
+
none: "No comments"
|
|
52
|
+
outsider_items:
|
|
53
|
+
label: Issues from outside the project
|
|
54
|
+
info: 'Opened, or last edited, by a Reporter or someone with no membership. Analyze: analyze only, unless you tick a confirmation that names them. Refuse: analyze only.'
|
|
55
|
+
options:
|
|
56
|
+
analyze: "Analyze only, unless confirmed by name (default)"
|
|
57
|
+
refuse: "Analyze only"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redmine for Webship Workspace: a platform plugin and a provider of the tracker family.
|
|
3
|
+
*
|
|
4
|
+
* What the package carries is placed by the installer from the manifest: the builder and the tool in the sites
|
|
5
|
+
* folders, their functions and argparse under core/scripts/plugins/redmine/ (with the compose file of Redmine's
|
|
6
|
+
* service, the Rails runner script the builder runs in its container, the start of a site on Docker Compose and the
|
|
7
|
+
* first feature of a site), and its AI items (ai/ in this package) in the folder of their kind.
|
|
8
|
+
*
|
|
9
|
+
* What register() adds: the issues of a Redmine as work items (@webship.co/workspace-tracker): the REDMINE menu on
|
|
10
|
+
* the project rows of sites and code folders that work against a Redmine project, the list, one issue, analyze, do the
|
|
11
|
+
* work with the workspace's AI CLI on a branch, and, with writes on, a note, a worklog, a move and an assignee, each a
|
|
12
|
+
* person's click after a preview. And what the assistant is told.
|
|
13
|
+
*
|
|
14
|
+
* Everything the dashboard is asked for goes through `api`; this package requires nothing from the dashboard's own
|
|
15
|
+
* files, so it can be installed from npm and removed without a trace.
|
|
16
|
+
*/
|
|
17
|
+
import type { PluginApi } from '@webship.co/workspace-plugin-api';
|
|
18
|
+
import { redmineTracker } from './lib/tracker';
|
|
19
|
+
export { redmineTracker };
|
|
20
|
+
/** The plugin's name: a site is a generic project in containers that the plugin claims, and the core's tools call its functions under it. */
|
|
21
|
+
export declare const PLATFORM = "redmine";
|
|
22
|
+
/** The commands the installer places in every sites folder. */
|
|
23
|
+
export declare const COMMANDS: string[];
|
|
24
|
+
/** The agents the installer places in the AI Agents folder. */
|
|
25
|
+
export declare const AGENTS: string[];
|
|
26
|
+
/** The skill the installer places in the AI Skills folder (a folder each, with its SKILL.md). */
|
|
27
|
+
export declare const SKILLS: string[];
|
|
28
|
+
/** The slash command the installer places in the AI Commands folder. */
|
|
29
|
+
export declare const AI_COMMANDS: string[];
|
|
30
|
+
/** The prompts the installer places in the AI Prompts folder: each a whole launch command for a new session. */
|
|
31
|
+
export declare const PROMPTS: string[];
|
|
32
|
+
/** What the assistant is told about Redmine sites in this workspace (the issues are told by the tracker). */
|
|
33
|
+
export declare function assistantContext(): string;
|
|
34
|
+
export declare function register(api: PluginApi): void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Redmine for Webship Workspace: a platform plugin and a provider of the tracker family.
|
|
4
|
+
*
|
|
5
|
+
* What the package carries is placed by the installer from the manifest: the builder and the tool in the sites
|
|
6
|
+
* folders, their functions and argparse under core/scripts/plugins/redmine/ (with the compose file of Redmine's
|
|
7
|
+
* service, the Rails runner script the builder runs in its container, the start of a site on Docker Compose and the
|
|
8
|
+
* first feature of a site), and its AI items (ai/ in this package) in the folder of their kind.
|
|
9
|
+
*
|
|
10
|
+
* What register() adds: the issues of a Redmine as work items (@webship.co/workspace-tracker): the REDMINE menu on
|
|
11
|
+
* the project rows of sites and code folders that work against a Redmine project, the list, one issue, analyze, do the
|
|
12
|
+
* work with the workspace's AI CLI on a branch, and, with writes on, a note, a worklog, a move and an assignee, each a
|
|
13
|
+
* person's click after a preview. And what the assistant is told.
|
|
14
|
+
*
|
|
15
|
+
* Everything the dashboard is asked for goes through `api`; this package requires nothing from the dashboard's own
|
|
16
|
+
* files, so it can be installed from npm and removed without a trace.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.PROMPTS = exports.AI_COMMANDS = exports.SKILLS = exports.AGENTS = exports.COMMANDS = exports.PLATFORM = exports.redmineTracker = void 0;
|
|
20
|
+
exports.assistantContext = assistantContext;
|
|
21
|
+
exports.register = register;
|
|
22
|
+
const workspace_tracker_1 = require("@webship.co/workspace-tracker");
|
|
23
|
+
const tracker_1 = require("./lib/tracker");
|
|
24
|
+
Object.defineProperty(exports, "redmineTracker", { enumerable: true, get: function () { return tracker_1.redmineTracker; } });
|
|
25
|
+
/** The plugin's name: a site is a generic project in containers that the plugin claims, and the core's tools call its functions under it. */
|
|
26
|
+
exports.PLATFORM = 'redmine';
|
|
27
|
+
/** The commands the installer places in every sites folder. */
|
|
28
|
+
exports.COMMANDS = ['cmd-redmine-project.sh', 'cmd-tools-redmine-cli.sh'];
|
|
29
|
+
/** The agents the installer places in the AI Agents folder. */
|
|
30
|
+
exports.AGENTS = ['redmine-site-builder', 'redmine-tester', 'redmine-issue-worker'];
|
|
31
|
+
/** The skill the installer places in the AI Skills folder (a folder each, with its SKILL.md). */
|
|
32
|
+
exports.SKILLS = ['redmine-scenarios'];
|
|
33
|
+
/** The slash command the installer places in the AI Commands folder. */
|
|
34
|
+
exports.AI_COMMANDS = ['redmine-test'];
|
|
35
|
+
/** The prompts the installer places in the AI Prompts folder: each a whole launch command for a new session. */
|
|
36
|
+
exports.PROMPTS = ['redmine-build-and-test', 'redmine-issue-to-branch'];
|
|
37
|
+
/** What the assistant is told about Redmine sites in this workspace (the issues are told by the tracker). */
|
|
38
|
+
function assistantContext() {
|
|
39
|
+
return [
|
|
40
|
+
'Redmine (a plugin, @webship.co/workspace-redmine), the open-source project management and issue tracking software: a site is built with',
|
|
41
|
+
'`bash cmd-redmine-project.sh <name> --install --add-users --sample-content` from a sites folder (dev, test, sandboxes, demos):',
|
|
42
|
+
'the official image (7.0.3 by default, `--redmine-version`) on the project\'s own PostgreSQL, on DDEV at https://<name>.ddev.site, or with `--runtime docker` on Docker Compose at http://127.0.0.1:<port>.',
|
|
43
|
+
'The build loads Redmine\'s default data and turns its REST API on; `--install` makes the workspace account an administrator; `--add-users` adds the default accounts (owner: Manager, member: Developer, reader: Reporter of the project Webship site, stranger: no membership), each @example.com;',
|
|
44
|
+
'`--sample-content` adds the issues of Webship site, its version "Sprint 1" and a note.',
|
|
45
|
+
'`bash cmd-tools-redmine-cli.sh <name>` says what the site is and lists its accounts; `--run "<task>"` runs one of Redmine\'s own rake tasks in its container,',
|
|
46
|
+
'`--sample-content` adds the sample content later, `--tidy` removes the issues a stopped test run left ("Webship test …"), `--add-users` and `--cancel-users` manage the default accounts,',
|
|
47
|
+
'and `--connect <login>` points the dashboard\'s Redmine at the site as that account (a new API key in the plugin\'s settings, never shown).',
|
|
48
|
+
'`bash cmd-tools-testing.sh <name>` sets up webship-js with the Redmine step pack; `--run` runs the suite.',
|
|
49
|
+
`For Redmine sites hand over to the agent \`${exports.AGENTS[0]}\`, for testing one to \`${exports.AGENTS[1]}\`, for working an issue to \`${exports.AGENTS[2]}\`.`,
|
|
50
|
+
`The plugin also places the skill ${exports.SKILLS.map((a) => `\`${a}\``).join(', ')} (the step pack's phrases, by area) in ai-skills/,`,
|
|
51
|
+
`the command ${exports.AI_COMMANDS.map((a) => `\`/${a} <site>\``).join(', ')} in ai-commands/ and the prompts ${exports.PROMPTS.map((a) => `\`${a}\``).join(' and ')} in ai-prompts/.`,
|
|
52
|
+
'Never run Redmine\'s tools on the host for a project; removing the project removes its database and its files too.',
|
|
53
|
+
].join(' ');
|
|
54
|
+
}
|
|
55
|
+
function register(api) {
|
|
56
|
+
(0, workspace_tracker_1.registerTracker)(api, (0, tracker_1.redmineTracker)(api));
|
|
57
|
+
if (typeof api.addAssistantContext === 'function')
|
|
58
|
+
api.addAssistantContext(assistantContext);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AA4BH,4CAgBC;AAED,4BAGC;AA9CD,qEAAgE;AAEhE,2CAA+C;AAEtC,+FAFA,wBAAc,OAEA;AAEvB,6IAA6I;AAChI,QAAA,QAAQ,GAAG,SAAS,CAAC;AAElC,+DAA+D;AAClD,QAAA,QAAQ,GAAG,CAAC,wBAAwB,EAAE,0BAA0B,CAAC,CAAC;AAE/E,+DAA+D;AAClD,QAAA,MAAM,GAAG,CAAC,sBAAsB,EAAE,gBAAgB,EAAE,sBAAsB,CAAC,CAAC;AAEzF,iGAAiG;AACpF,QAAA,MAAM,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAE5C,wEAAwE;AAC3D,QAAA,WAAW,GAAG,CAAC,cAAc,CAAC,CAAC;AAE5C,gHAAgH;AACnG,QAAA,OAAO,GAAG,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,CAAC;AAE7E,6GAA6G;AAC7G,SAAgB,gBAAgB;IAC9B,OAAO;QACL,yIAAyI;QACzI,gIAAgI;QAChI,4MAA4M;QAC5M,qSAAqS;QACrS,wFAAwF;QACxF,+JAA+J;QAC/J,2LAA2L;QAC3L,6IAA6I;QAC7I,2GAA2G;QAC3G,8CAA8C,cAAM,CAAC,CAAC,CAAC,4BAA4B,cAAM,CAAC,CAAC,CAAC,iCAAiC,cAAM,CAAC,CAAC,CAAC,KAAK;QAC3I,oCAAoC,cAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oDAAoD;QAChI,eAAe,mBAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oCAAoC,eAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB;QACtK,oHAAoH;KACrH,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAED,SAAgB,QAAQ,CAAC,GAAc;IACrC,IAAA,mCAAe,EAAC,GAAG,EAAE,IAAA,wBAAc,EAAC,GAAG,CAAC,CAAC,CAAC;IAC1C,IAAI,OAAO,GAAG,CAAC,mBAAmB,KAAK,UAAU;QAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redmine, as a provider of the tracker family (@webship.co/workspace-tracker): the issues of a Redmine project, over
|
|
3
|
+
* its REST API with an API key (the X-Redmine-API-Key header), in a header file, never on a command line.
|
|
4
|
+
*
|
|
5
|
+
* Reads: the open issues, mine, assigned to someone, the current version, and a search in the subject; one issue with
|
|
6
|
+
* its notes. Each author's standing is their membership of the project: a Manager and a Developer are inside; a
|
|
7
|
+
* Reporter, another role, and someone with no membership are outside, so the base keeps their issues analyze-only
|
|
8
|
+
* unless a person confirms by name.
|
|
9
|
+
*
|
|
10
|
+
* Writes, which the base offers only with writes on, each after a person's click: a note, a time entry, a status the
|
|
11
|
+
* workflow allows, an assignee, and a new issue. Redmine is not a forge: the pull request of the work is opened from the
|
|
12
|
+
* project's forge menu. A Redmine API key is 40 hex digits, the shape of a git commit too, so it has no token shape of
|
|
13
|
+
* its own here: the base still refuses this site's own key wherever it is.
|
|
14
|
+
*/
|
|
15
|
+
import type { PluginApi } from '@webship.co/workspace-plugin-api';
|
|
16
|
+
import type { Person, TrackerItem, TrackerProvider } from '@webship.co/workspace-tracker';
|
|
17
|
+
/** A project role, as the base reads an author's standing. */
|
|
18
|
+
export declare function roleAssociation(roles: string[]): Person['association'];
|
|
19
|
+
/** How a status reads: a closed one (Closed, Rejected, Resolved) is done; New is open; the rest is work going on. */
|
|
20
|
+
export declare function stateClassOf(status: {
|
|
21
|
+
name?: string;
|
|
22
|
+
is_closed?: boolean;
|
|
23
|
+
} | undefined): TrackerItem['stateClass'];
|
|
24
|
+
/** An issue of the API, as the base reads an item. */
|
|
25
|
+
export declare function itemOf(issue: any, base: string): TrackerItem;
|
|
26
|
+
/** The version a "current version" view means: the open one due first from today, else the open one with no date. */
|
|
27
|
+
export declare function currentVersion(list: any[], now?: Date): string;
|
|
28
|
+
export declare function redmineTracker(api: PluginApi): TrackerProvider;
|