@webship.co/workspace-openproject 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.
Files changed (32) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +183 -2
  3. package/ai/agents/openproject-site-builder.md +106 -0
  4. package/ai/agents/openproject-tester.md +118 -0
  5. package/ai/agents/openproject-work-package-worker.md +90 -0
  6. package/ai/commands/openproject-test.md +66 -0
  7. package/ai/prompts/openproject-build-and-test.md +28 -0
  8. package/ai/prompts/openproject-work-package-to-branch.md +24 -0
  9. package/ai/skills/openproject-scenarios/SKILL.md +74 -0
  10. package/ai/skills/openproject-scenarios/examples/roles.feature +17 -0
  11. package/ai/skills/openproject-scenarios/examples/session.feature +24 -0
  12. package/ai/skills/openproject-scenarios/examples/work-package.feature +17 -0
  13. package/commands/cmd-openproject-project.sh +31 -0
  14. package/commands/cmd-tools-openproject-cli.sh +24 -0
  15. package/config/plugin.openproject.settings.yml +29 -0
  16. package/config/settings.labels.yml +57 -0
  17. package/dist/src/index.d.ts +34 -0
  18. package/dist/src/index.js +60 -0
  19. package/dist/src/index.js.map +1 -0
  20. package/dist/src/lib/tracker.d.ts +26 -0
  21. package/dist/src/lib/tracker.js +323 -0
  22. package/dist/src/lib/tracker.js.map +1 -0
  23. package/features/openproject-runtimes.feature +32 -0
  24. package/features/openproject.feature +53 -0
  25. package/package.json +118 -4
  26. package/scripts/args/arg-openproject-cli.sh +28 -0
  27. package/scripts/args/arg-openproject.sh +31 -0
  28. package/scripts/docker-compose.openproject.yaml +46 -0
  29. package/scripts/functions/fun-openproject.sh +590 -0
  30. package/scripts/openproject-serve.sh +17 -0
  31. package/scripts/openproject-site.rb +246 -0
  32. package/testing/site.feature +28 -0
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: openproject-scenarios
3
+ description: Write webship-js scenarios for an OpenProject site (the open-source project management software) of the Webship Workspace from phrases that exist — the OpenProject step pack's steps by area (logging in and out and a refused login, a project and who may open it, the work package list, one work package with its status, comments, time and assignee, a new work package, the backlog and its sprints, what a Reader 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 an OpenProject site, or when a scenario of the site fails on a phrase.
4
+ ---
5
+
6
+ # openproject-scenarios
7
+
8
+ Scenarios for a site built with the OpenProject plugin (`bash cmd-openproject-project.sh <site> --install
9
+ --add-users --sample-content`) in a container-based workspace (DDEV by default), tested with webship-js and
10
+ `@webship-js/openproject-steps` once `bash cmd-tools-testing.sh <site>` set the project up. Every phrase below exists
11
+ in the 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` (Project admin of Webship site), `member` (Member),
16
+ `reader` (Reader), `stranger` (no membership). `Given I am not logged in` for a visitor.
17
+ - The accounts are made by the build (`cmd-tools-openproject-cli.sh <site> --add-users`); a suite never creates or
18
+ deletes 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 a work package "Webship test …" in the project "webship-site"` (it goes after the scenario), `there is no work package "Webship test …" in the project "webship-site"` |
27
+ | The list | `I open the work packages of the project "webship-site"`, `the work package list should show "…"` (`should not show`), `I create a work package "Webship test …" in the project "webship-site"` (it goes after the scenario) |
28
+ | One work package | `I open the work package "…"`, `I set the status of the work package to "In progress"`, `the status of the work package should be "In progress"`, `I comment "…" on the work package`, `the work package should show the comment "…"` (`… by "Member Test"`), `I log "0.5" hours on the work package` (`… with the comment "…"`), `the time spent on the work package should be "0.5h"`, `I assign the work package to "Member Test"`, `the work package should be assigned to "Member Test"` |
29
+ | What an account may not do | `I should not be able to change the status of the work package`, `I should not be able to log time on the work package`, `I should not be able to create a work package in the project "webship-site"`, `I should be refused the project "webship-site"` |
30
+ | Backlog and sprints | `I open the backlog of the project "webship-site"`, `the sprint "Sprint 1" should be "Active"`, `the sprint "Sprint 1" should list the work package "…"` (`should not list`), `the backlog should list the work package "…"` (`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 Task by the owner, In
35
+ progress, assigned to Member Test, in the active sprint "Sprint 1", with the owner's comment "The script is in the
36
+ project's repository: `greeting.sh`."), "The usage page spells greeting as greting" (a Bug by the member, New, in the
37
+ backlog) and "A work package opened by someone outside the project" (opened by the stranger). A suite reads them and
38
+ never changes them.
39
+
40
+ ## Traps found on real sites
41
+
42
+ - A comment cannot be taken back, and a status change stays in the history: change only a work package the scenario
43
+ made (`there is a work package "Webship test …"`), which goes after it with all of it.
44
+ - The list shows the open work packages: one moved to "Closed" leaves it.
45
+ - A refused login and a project an account may not open answer with an error status: tag those scenarios `@js-off`.
46
+ - A project an account may not open answers "[Error 404]"; the site does not say the project is there.
47
+ - A Reader's status button is there but cannot be pressed; "Log time" is not there at all.
48
+ - The statuses offered depend on the type and the role's workflow: a Member moves a Task from New to In progress, a
49
+ Bug to Confirmed.
50
+ - The time spent shows as the site formats it, "0.5h" for half an hour.
51
+ - A run that was stopped half way leaves its "Webship test …" work packages: `bash cmd-tools-openproject-cli.sh
52
+ <site> --tidy` removes them, with their time.
53
+
54
+ ## Whole features
55
+
56
+ `examples/` holds three features that pass on a site built with `--install --add-users --sample-content`: the session
57
+ (`session.feature`), a work package worked by a member (`work-package.feature`) and the roles (`roles.feature`).
58
+
59
+ ## The book
60
+
61
+ For any automated functional testing in this work (a Gherkin feature, a step definition, choosing a
62
+ step, a test run and its failures), read the book *Automated Functional Testing Recipes* first.
63
+
64
+ - **Where.** Use the first that exists: `.claude/automated-functional-testing-recipes/` in the project,
65
+ `~/.claude/automated-functional-testing-recipes/` (installed by webship/webship-js-ai-agent,
66
+ webship/webship-js-skills or webship/ai-agents), or
67
+ https://github.com/webship/webship-js-ai-agent/tree/2.0.x/automated-functional-testing-recipes
68
+ - **How.** Its `README.md` first, then the chapter that matches the task (one file per chapter,
69
+ named by its subject), not the single complete file.
70
+ - **Which wins.** The installed webship-js package and the step pack are the source of truth for
71
+ step phrasing. When they differ from the book, follow them and say so.
72
+ - **For a site.** Start with `ch10-authentication-authorization.md` (logins, refusals and what each role may do),
73
+ `ch07-waiting-dynamic-content.md` (waiting on the app's own signals) and `ch26-testing-cms-applications.md`
74
+ (content made and removed, roles, a workflow across roles).
@@ -0,0 +1,17 @@
1
+ @roles
2
+ Feature: What each account may do in the project
3
+ A Reader reads the project's work packages but changes none, and an account with no membership is refused the
4
+ project.
5
+
6
+ Scenario: A Reader reads a work package and changes nothing
7
+ Given there is a work package "Webship test reader" in the project "webship-site"
8
+ And I am a logged in user with the "reader" user
9
+ When I open the work package "Webship test reader"
10
+ Then I should not be able to change the status of the work package
11
+ And I should not be able to log time on the work package
12
+ And I should not be able to create a work package in the project "webship-site"
13
+
14
+ @js-off
15
+ Scenario: An account with no membership is refused the project
16
+ Given I am a logged in user with the "stranger" user
17
+ 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,17 @@
1
+ @work-packages
2
+ Feature: A work package worked by a member
3
+ A member moves a work package of its own through the workflow, comments on it, logs time on it and assigns it.
4
+ The work package goes after the scenario, with all of it.
5
+
6
+ Scenario: Its status, a comment, the time logged and the assignee
7
+ Given there is a work package "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 work package "Webship test work"
10
+ And I set the status of the work package to "In progress"
11
+ And I comment "Checked on the test site" on the work package
12
+ And I log "0.5" hours on the work package with the comment "Read the work package"
13
+ And I assign the work package to "Member Test"
14
+ Then the status of the work package should be "In progress"
15
+ And the work package should show the comment "Checked on the test site" by "Member Test"
16
+ And the time spent on the work package should be "0.5h"
17
+ And the work package should be assigned to "Member Test"
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: OpenProject (project management)
4
+
5
+ # Installed by the OpenProject plugin (plugins.sh --install openproject); __WORKSPACE__ is the workspace it was
6
+ # installed into.
7
+ #
8
+ # Build an OpenProject site in containers from the publisher's 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 work packages, its active sprint and a comment.
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="openproject";
23
+ distribution_title="OpenProject";
24
+
25
+ ARGPARSE_DESCRIPTION="Build an ${distribution_title} site in __WORKSPACE__"
26
+ # The args file comes with the plugin: core/scripts/plugins/openproject/ is where plugins.sh --install puts it.
27
+ source ${WORKSPACE_SCRIPTS}/plugins/openproject/args/arg-openproject.sh || exit 1 ;
28
+
29
+ shift $#;
30
+
31
+ openproject_build ;
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Installed by the OpenProject plugin (plugins.sh --install openproject); __WORKSPACE__ is the workspace it was
4
+ # installed into.
5
+ #
6
+ # An OpenProject site of this folder: what it is and its accounts; --run one of OpenProject'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 OpenProject 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="An OpenProject site of __WORKSPACE__: what it is, its accounts, OpenProject's own tasks"
19
+ # The args file comes with the plugin: core/scripts/plugins/openproject/ is where plugins.sh --install puts it.
20
+ source ${WORKSPACE_SCRIPTS}/plugins/openproject/args/arg-openproject-cli.sh || exit 1 ;
21
+
22
+ shift $#;
23
+
24
+ openproject_cli_tool ;
@@ -0,0 +1,29 @@
1
+ # OpenProject — core/config/plugin.openproject.settings.yml
2
+ #
3
+ # The OpenProject the dashboard reads work packages from: a site the builder made (https://<name>.ddev.site), or
4
+ # your own. The token is an API token of an account there (My account → Access tokens → API). Never printed.
5
+ # The OpenProject address, without a trailing slash.
6
+ url: CHANGE_ME
7
+ # An API token of the account the dashboard reads (and, with writes on, writes) as.
8
+ token: CHANGE_ME
9
+ # The work packages as work items (the tracker family). See @webship.co/workspace-tracker for every key.
10
+ # Writes to OpenProject: comments, worklogs (time entries), moves through the workflow, assignees, new work packages. Off by default.
11
+ allow_writes: false
12
+ # Author sessions at once.
13
+ max_agents: 1
14
+ # The OpenProject project (its identifier) a workspace project works against when it remembers none.
15
+ default_scope: ""
16
+ # The OpenProject 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 (Project admins and Members), all, none.
27
+ comments_from: members
28
+ # A work package from outside the project (a Reader, a commenter, 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.openproject.settings.yml, merged into the Settings page.
2
+ url:
3
+ label: OpenProject address
4
+ info: 'The site the dashboard reads work packages from: https://<name>.ddev.site for one the builder made, or your own. No trailing slash.'
5
+ token:
6
+ label: API token
7
+ info: 'An API token of the account the dashboard reads (and, with writes on, writes) as: My account → Access tokens → API. Never printed.'
8
+ allow_writes:
9
+ label: Writes to OpenProject (work packages 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 OpenProject (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 work packages 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 OpenProject project
20
+ info: 'Its identifier: the OpenProject project a workspace project works against when it remembers none.'
21
+ scopes:
22
+ label: OpenProject 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 a work package 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 Project admins and Members (default). All, or none.'
48
+ options:
49
+ members: "Project admins and Members (default)"
50
+ all: "All comments"
51
+ none: "No comments"
52
+ outsider_items:
53
+ label: Work packages from outside the project
54
+ info: 'Opened, or last edited, by a Reader, a commenter 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
+ * OpenProject 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/openproject/ (with the compose file of OpenProject'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 work packages of an OpenProject as work items (@webship.co/workspace-tracker): the
10
+ * OPENPROJECT menu on the project rows of sites and code folders that work against an OpenProject project, the list,
11
+ * one work package, analyze, do the work with the workspace's AI CLI on a branch, and, with writes on, a comment, a
12
+ * worklog, a move and an assignee, each a 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 { openprojectTracker } from './lib/tracker';
19
+ export { openprojectTracker };
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 = "openproject";
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 OpenProject sites in this workspace (the work packages 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
+ * OpenProject 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/openproject/ (with the compose file of OpenProject'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 work packages of an OpenProject as work items (@webship.co/workspace-tracker): the
11
+ * OPENPROJECT menu on the project rows of sites and code folders that work against an OpenProject project, the list,
12
+ * one work package, analyze, do the work with the workspace's AI CLI on a branch, and, with writes on, a comment, a
13
+ * worklog, a move and an assignee, each a 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.openprojectTracker = 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, "openprojectTracker", { enumerable: true, get: function () { return tracker_1.openprojectTracker; } });
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 = 'openproject';
27
+ /** The commands the installer places in every sites folder. */
28
+ exports.COMMANDS = ['cmd-openproject-project.sh', 'cmd-tools-openproject-cli.sh'];
29
+ /** The agents the installer places in the AI Agents folder. */
30
+ exports.AGENTS = ['openproject-site-builder', 'openproject-tester', 'openproject-work-package-worker'];
31
+ /** The skill the installer places in the AI Skills folder (a folder each, with its SKILL.md). */
32
+ exports.SKILLS = ['openproject-scenarios'];
33
+ /** The slash command the installer places in the AI Commands folder. */
34
+ exports.AI_COMMANDS = ['openproject-test'];
35
+ /** The prompts the installer places in the AI Prompts folder: each a whole launch command for a new session. */
36
+ exports.PROMPTS = ['openproject-build-and-test', 'openproject-work-package-to-branch'];
37
+ /** What the assistant is told about OpenProject sites in this workspace (the work packages are told by the tracker). */
38
+ function assistantContext() {
39
+ return [
40
+ 'OpenProject (a plugin, @webship.co/workspace-openproject), the open-source project management software: a site is built with',
41
+ '`bash cmd-openproject-project.sh <name> --install --add-users --sample-content` from a sites folder (dev, test, sandboxes, demos):',
42
+ 'the publisher\'s image (17.9.8 by default, `--openproject-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
+ '`--install` makes the workspace account an administrator; `--add-users` adds the default accounts (owner: Project admin, member: Member, reader: Reader of the project Webship site, stranger: no membership), each @example.com;',
44
+ '`--sample-content` adds the work packages of Webship site, its active sprint "Sprint 1" and a comment.',
45
+ '`bash cmd-tools-openproject-cli.sh <name>` says what the site is and lists its accounts; `--run "<task>"` runs one of OpenProject\'s own rake tasks in its container,',
46
+ '`--sample-content` adds the sample content later, `--tidy` removes the work packages a stopped test run left ("Webship test …"), `--add-users` and `--cancel-users` manage the default accounts,',
47
+ 'and `--connect <login>` points the dashboard\'s OpenProject at the site as that account (a new API token in the plugin\'s settings, never shown).',
48
+ '`bash cmd-tools-testing.sh <name>` sets up webship-js with the OpenProject step pack; `--run` runs the suite.',
49
+ `For OpenProject sites hand over to the agent \`${exports.AGENTS[0]}\`, for testing one to \`${exports.AGENTS[1]}\`, for working a work package 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 OpenProject\'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.openprojectTracker)(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,2CAAmD;AAE1C,mGAFA,4BAAkB,OAEA;AAE3B,6IAA6I;AAChI,QAAA,QAAQ,GAAG,aAAa,CAAC;AAEtC,+DAA+D;AAClD,QAAA,QAAQ,GAAG,CAAC,4BAA4B,EAAE,8BAA8B,CAAC,CAAC;AAEvF,+DAA+D;AAClD,QAAA,MAAM,GAAG,CAAC,0BAA0B,EAAE,oBAAoB,EAAE,iCAAiC,CAAC,CAAC;AAE5G,iGAAiG;AACpF,QAAA,MAAM,GAAG,CAAC,uBAAuB,CAAC,CAAC;AAEhD,wEAAwE;AAC3D,QAAA,WAAW,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAEhD,gHAAgH;AACnG,QAAA,OAAO,GAAG,CAAC,4BAA4B,EAAE,oCAAoC,CAAC,CAAC;AAE5F,wHAAwH;AACxH,SAAgB,gBAAgB;IAC9B,OAAO;QACL,8HAA8H;QAC9H,oIAAoI;QACpI,qNAAqN;QACrN,mOAAmO;QACnO,wGAAwG;QACxG,uKAAuK;QACvK,kMAAkM;QAClM,mJAAmJ;QACnJ,+GAA+G;QAC/G,kDAAkD,cAAM,CAAC,CAAC,CAAC,4BAA4B,cAAM,CAAC,CAAC,CAAC,uCAAuC,cAAM,CAAC,CAAC,CAAC,KAAK;QACrJ,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,wHAAwH;KACzH,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAED,SAAgB,QAAQ,CAAC,GAAc;IACrC,IAAA,mCAAe,EAAC,GAAG,EAAE,IAAA,4BAAkB,EAAC,GAAG,CAAC,CAAC,CAAC;IAC9C,IAAI,OAAO,GAAG,CAAC,mBAAmB,KAAK,UAAU;QAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAC/F,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * OpenProject, as a provider of the tracker family (@webship.co/workspace-tracker): the work packages of an OpenProject
3
+ * project, over the API v3 with an API token (basic auth as `apikey`), in a header file, never on a command line.
4
+ *
5
+ * Reads: the open work packages, mine, assigned to someone, the current sprint, and a search; one work package with
6
+ * its comments. Each author's standing is their membership of the project: Project admin and Member are inside, a
7
+ * global admin too; a Reader, a commenter or someone with no membership is outside, so the base keeps their work
8
+ * packages analyze-only unless a person confirms by name.
9
+ *
10
+ * Writes, which the base offers only with writes on, each after a person's click: a comment, a worklog (a time
11
+ * entry), a move through the workflow (the statuses the work package's form allows), an assignee, and a new work
12
+ * package. OpenProject is not a forge: the pull request of the work is opened from the project's forge menu.
13
+ */
14
+ import type { PluginApi } from '@webship.co/workspace-plugin-api';
15
+ import type { Person, TrackerItem, TrackerProvider } from '@webship.co/workspace-tracker';
16
+ /** The id at the end of an API link: '/api/v3/users/6' -> '6'. */
17
+ export declare const idOf: (href: unknown) => string;
18
+ /** A project role, as the base reads an author's standing. */
19
+ export declare function roleAssociation(roles: string[]): Person['association'];
20
+ /** How a status reads: closed and rejected are done; new is open; the rest is work going on. */
21
+ export declare function stateClassOf(status: string): TrackerItem['stateClass'];
22
+ /** A work package of the API, as the base reads an item. */
23
+ export declare function itemOf(wp: any, base: string): TrackerItem;
24
+ /** The sprint a "current sprint" view means: the active one, else the one whose dates hold today. */
25
+ export declare function currentSprint(list: any[], now?: Date): string;
26
+ export declare function openprojectTracker(api: PluginApi): TrackerProvider;